Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 
 

123 строки
6.1 KiB

  1. /* gtkcelllayout.h
  2. * Copyright (C) 2003 Kristian Rietveld <kris@gtk.org>
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Library General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2 of the License, or (at your option) any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * Library General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Library General Public
  15. * License along with this library; if not, write to the
  16. * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  17. * Boston, MA 02111-1307, USA.
  18. */
  19. #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
  20. #error "Only <gtk/gtk.h> can be included directly."
  21. #endif
  22. #ifndef __GTK_CELL_LAYOUT_H__
  23. #define __GTK_CELL_LAYOUT_H__
  24. #include <gtk/gtkcellrenderer.h>
  25. #include <gtk/gtktreeviewcolumn.h>
  26. #include <gtk/gtkbuildable.h>
  27. #include <gtk/gtkbuilder.h>
  28. G_BEGIN_DECLS
  29. #define GTK_TYPE_CELL_LAYOUT (gtk_cell_layout_get_type ())
  30. #define GTK_CELL_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CELL_LAYOUT, GtkCellLayout))
  31. #define GTK_IS_CELL_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CELL_LAYOUT))
  32. #define GTK_CELL_LAYOUT_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GTK_TYPE_CELL_LAYOUT, GtkCellLayoutIface))
  33. typedef struct _GtkCellLayout GtkCellLayout; /* dummy typedef */
  34. typedef struct _GtkCellLayoutIface GtkCellLayoutIface;
  35. /* keep in sync with GtkTreeCellDataFunc */
  36. typedef void (* GtkCellLayoutDataFunc) (GtkCellLayout *cell_layout,
  37. GtkCellRenderer *cell,
  38. GtkTreeModel *tree_model,
  39. GtkTreeIter *iter,
  40. gpointer data);
  41. struct _GtkCellLayoutIface
  42. {
  43. GTypeInterface g_iface;
  44. /* Virtual Table */
  45. void (* pack_start) (GtkCellLayout *cell_layout,
  46. GtkCellRenderer *cell,
  47. gboolean expand);
  48. void (* pack_end) (GtkCellLayout *cell_layout,
  49. GtkCellRenderer *cell,
  50. gboolean expand);
  51. void (* clear) (GtkCellLayout *cell_layout);
  52. void (* add_attribute) (GtkCellLayout *cell_layout,
  53. GtkCellRenderer *cell,
  54. const gchar *attribute,
  55. gint column);
  56. void (* set_cell_data_func) (GtkCellLayout *cell_layout,
  57. GtkCellRenderer *cell,
  58. GtkCellLayoutDataFunc func,
  59. gpointer func_data,
  60. GDestroyNotify destroy);
  61. void (* clear_attributes) (GtkCellLayout *cell_layout,
  62. GtkCellRenderer *cell);
  63. void (* reorder) (GtkCellLayout *cell_layout,
  64. GtkCellRenderer *cell,
  65. gint position);
  66. GList* (* get_cells) (GtkCellLayout *cell_layout);
  67. };
  68. GType gtk_cell_layout_get_type (void) G_GNUC_CONST;
  69. void gtk_cell_layout_pack_start (GtkCellLayout *cell_layout,
  70. GtkCellRenderer *cell,
  71. gboolean expand);
  72. void gtk_cell_layout_pack_end (GtkCellLayout *cell_layout,
  73. GtkCellRenderer *cell,
  74. gboolean expand);
  75. GList *gtk_cell_layout_get_cells (GtkCellLayout *cell_layout);
  76. void gtk_cell_layout_clear (GtkCellLayout *cell_layout);
  77. void gtk_cell_layout_set_attributes (GtkCellLayout *cell_layout,
  78. GtkCellRenderer *cell,
  79. ...) G_GNUC_NULL_TERMINATED;
  80. void gtk_cell_layout_add_attribute (GtkCellLayout *cell_layout,
  81. GtkCellRenderer *cell,
  82. const gchar *attribute,
  83. gint column);
  84. void gtk_cell_layout_set_cell_data_func (GtkCellLayout *cell_layout,
  85. GtkCellRenderer *cell,
  86. GtkCellLayoutDataFunc func,
  87. gpointer func_data,
  88. GDestroyNotify destroy);
  89. void gtk_cell_layout_clear_attributes (GtkCellLayout *cell_layout,
  90. GtkCellRenderer *cell);
  91. void gtk_cell_layout_reorder (GtkCellLayout *cell_layout,
  92. GtkCellRenderer *cell,
  93. gint position);
  94. gboolean _gtk_cell_layout_buildable_custom_tag_start (GtkBuildable *buildable,
  95. GtkBuilder *builder,
  96. GObject *child,
  97. const gchar *tagname,
  98. GMarkupParser *parser,
  99. gpointer *data);
  100. void _gtk_cell_layout_buildable_custom_tag_end (GtkBuildable *buildable,
  101. GtkBuilder *builder,
  102. GObject *child,
  103. const gchar *tagname,
  104. gpointer *data);
  105. void _gtk_cell_layout_buildable_add_child (GtkBuildable *buildable,
  106. GtkBuilder *builder,
  107. GObject *child,
  108. const gchar *type);
  109. G_END_DECLS
  110. #endif /* __GTK_CELL_LAYOUT_H__ */