Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gtkcelllayout.h
Go to the documentation of this file.
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, see <http://www.gnu.org/licenses/>.
16 */
17
18#pragma once
19
20#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
21#error "Only <gtk/gtk.h> can be included directly."
22#endif
23
26#include <gtk/gtkbuildable.h>
27#include <gtk/gtkbuilder.h>
28
30
31#define GTK_TYPE_CELL_LAYOUT (gtk_cell_layout_get_type ())
32#define GTK_CELL_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_CELL_LAYOUT, GtkCellLayout))
33#define GTK_IS_CELL_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_CELL_LAYOUT))
34#define GTK_CELL_LAYOUT_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GTK_TYPE_CELL_LAYOUT, GtkCellLayoutIface))
35
36typedef struct _GtkCellLayout GtkCellLayout; /* dummy typedef */
38
39/* keep in sync with GtkTreeCellDataFunc */
40/**
41 * GtkCellLayoutDataFunc:
42 * @cell_layout: a `GtkCellLayout`
43 * @cell: the cell renderer whose value is to be set
44 * @tree_model: the model
45 * @iter: a `GtkTreeIter` indicating the row to set the value for
46 * @data: (closure): user data passed to gtk_cell_layout_set_cell_data_func()
47 *
48 * A function which should set the value of @cell_layout’s cell renderer(s)
49 * as appropriate.
50 */
51typedef void (* GtkCellLayoutDataFunc) (GtkCellLayout *cell_layout,
52 GtkCellRenderer *cell,
53 GtkTreeModel *tree_model,
54 GtkTreeIter *iter,
55 gpointer data);
56
57/**
58 * GtkCellLayoutIface:
59 * @pack_start: Packs the cell into the beginning of cell_layout.
60 * @pack_end: Adds the cell to the end of cell_layout.
61 * @clear: Unsets all the mappings on all renderers on cell_layout and
62 * removes all renderers from cell_layout.
63 * @add_attribute: Adds an attribute mapping to the list in
64 * cell_layout.
65 * @set_cell_data_func: Sets the `GtkCellLayout`DataFunc to use for
66 * cell_layout.
67 * @clear_attributes: Clears all existing attributes previously set
68 * with gtk_cell_layout_set_attributes().
69 * @reorder: Re-inserts cell at position.
70 * @get_cells: Get the cell renderers which have been added to
71 * cell_layout.
72 * @get_area: Get the underlying `GtkCellArea` which might be
73 * cell_layout if called on a `GtkCellArea` or might be NULL if no
74 * `GtkCellArea` is used by cell_layout.
75 */
77{
78 /*< private >*/
80
81 /*< public >*/
82
83 /* Virtual Table */
84 void (* pack_start) (GtkCellLayout *cell_layout,
85 GtkCellRenderer *cell,
86 gboolean expand);
87 void (* pack_end) (GtkCellLayout *cell_layout,
88 GtkCellRenderer *cell,
89 gboolean expand);
90 void (* clear) (GtkCellLayout *cell_layout);
91 void (* add_attribute) (GtkCellLayout *cell_layout,
92 GtkCellRenderer *cell,
93 const char *attribute,
94 int column);
95 void (* set_cell_data_func) (GtkCellLayout *cell_layout,
96 GtkCellRenderer *cell,
98 gpointer func_data,
99 GDestroyNotify destroy);
100 void (* clear_attributes) (GtkCellLayout *cell_layout,
101 GtkCellRenderer *cell);
102 void (* reorder) (GtkCellLayout *cell_layout,
103 GtkCellRenderer *cell,
104 int position);
105 GList* (* get_cells) (GtkCellLayout *cell_layout);
106
107 GtkCellArea *(* get_area) (GtkCellLayout *cell_layout);
108};
109
114 GtkCellRenderer *cell,
115 gboolean expand);
118 GtkCellRenderer *cell,
119 gboolean expand);
126 GtkCellRenderer *cell,
130 GtkCellRenderer *cell,
131 const char *attribute,
132 int column);
135 GtkCellRenderer *cell,
137 gpointer func_data,
138 GDestroyNotify destroy);
141 GtkCellRenderer *cell);
144 GtkCellRenderer *cell,
145 int position);
148
150 GtkBuilder *builder,
151 GObject *child,
152 const char *tagname,
153 GtkBuildableParser *parser,
154 gpointer *data);
156 GtkBuilder *builder,
157 GObject *child,
158 const char *tagname,
159 gpointer *data);
161 GtkBuilder *builder,
162 GObject *child,
163 const char *type);
164
166
168
#define GDK_DEPRECATED_IN_4_10
#define GDK_AVAILABLE_IN_ALL
typedefG_BEGIN_DECLS struct _GList GList
Definition glist.h:39
#define G_END_DECLS
Definition gmacros.h:910
#define G_GNUC_NULL_TERMINATED
Definition gmacros.h:326
#define G_BEGIN_DECLS
Definition gmacros.h:909
#define G_GNUC_CONST
Definition gmacros.h:637
#define G_DEFINE_AUTOPTR_CLEANUP_FUNC(TypeName, func)
Definition gmacros.h:1400
GOBJECT_AVAILABLE_IN_ALL void g_object_unref(gpointer object)
struct _GtkBuildable GtkBuildable
GDK_DEPRECATED_IN_4_10 void gtk_cell_layout_clear_attributes(GtkCellLayout *cell_layout, GtkCellRenderer *cell)
GDK_AVAILABLE_IN_ALL GType gtk_cell_layout_get_type(void) G_GNUC_CONST
gboolean _gtk_cell_layout_buildable_custom_tag_start(GtkBuildable *buildable, GtkBuilder *builder, GObject *child, const char *tagname, GtkBuildableParser *parser, gpointer *data)
GDK_DEPRECATED_IN_4_10 void gtk_cell_layout_set_attributes(GtkCellLayout *cell_layout, GtkCellRenderer *cell,...) G_GNUC_NULL_TERMINATED
GDK_DEPRECATED_IN_4_10 void gtk_cell_layout_pack_start(GtkCellLayout *cell_layout, GtkCellRenderer *cell, gboolean expand)
void(* GtkCellLayoutDataFunc)(GtkCellLayout *cell_layout, GtkCellRenderer *cell, GtkTreeModel *tree_model, GtkTreeIter *iter, gpointer data)
GDK_DEPRECATED_IN_4_10 void gtk_cell_layout_reorder(GtkCellLayout *cell_layout, GtkCellRenderer *cell, int position)
struct _GtkCellLayout GtkCellLayout
GDK_DEPRECATED_IN_4_10 void gtk_cell_layout_set_cell_data_func(GtkCellLayout *cell_layout, GtkCellRenderer *cell, GtkCellLayoutDataFunc func, gpointer func_data, GDestroyNotify destroy)
GDK_DEPRECATED_IN_4_10 void gtk_cell_layout_add_attribute(GtkCellLayout *cell_layout, GtkCellRenderer *cell, const char *attribute, int column)
GDK_DEPRECATED_IN_4_10 GList * gtk_cell_layout_get_cells(GtkCellLayout *cell_layout)
GDK_DEPRECATED_IN_4_10 void gtk_cell_layout_pack_end(GtkCellLayout *cell_layout, GtkCellRenderer *cell, gboolean expand)
GDK_DEPRECATED_IN_4_10 GtkCellArea * gtk_cell_layout_get_area(GtkCellLayout *cell_layout)
void _gtk_cell_layout_buildable_add_child(GtkBuildable *buildable, GtkBuilder *builder, GObject *child, const char *type)
GDK_DEPRECATED_IN_4_10 void gtk_cell_layout_clear(GtkCellLayout *cell_layout)
gboolean _gtk_cell_layout_buildable_custom_tag_end(GtkBuildable *buildable, GtkBuilder *builder, GObject *child, const char *tagname, gpointer *data)
struct _GtkTreeModel GtkTreeModel
struct _GtkBuilder GtkBuilder
Definition gtktypes.h:38
gsize GType
Definition gtype.h:427
gint gboolean
Definition gtypes.h:56
void * gpointer
Definition gtypes.h:109
void(* GDestroyNotify)(gpointer data)
Definition gtypes.h:140
void(* set_cell_data_func)(GtkCellLayout *cell_layout, GtkCellRenderer *cell, GtkCellLayoutDataFunc func, gpointer func_data, GDestroyNotify destroy)
void(* clear)(GtkCellLayout *cell_layout)
void(* add_attribute)(GtkCellLayout *cell_layout, GtkCellRenderer *cell, const char *attribute, int column)
GTypeInterface g_iface
void(* pack_start)(GtkCellLayout *cell_layout, GtkCellRenderer *cell, gboolean expand)
void(* reorder)(GtkCellLayout *cell_layout, GtkCellRenderer *cell, int position)
void(* clear_attributes)(GtkCellLayout *cell_layout, GtkCellRenderer *cell)
void(* pack_end)(GtkCellLayout *cell_layout, GtkCellRenderer *cell, gboolean expand)