27 #ifndef __GTK_WIDGET_H__
28 #define __GTK_WIDGET_H__
30 #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
31 #error "Only <gtk/gtk.h> can be included directly."
117 #ifndef GTK_DISABLE_DEPRECATED
136 #define GTK_TYPE_WIDGET (gtk_widget_get_type ())
137 #define GTK_WIDGET(widget) (G_TYPE_CHECK_INSTANCE_CAST ((widget), GTK_TYPE_WIDGET, GtkWidget))
138 #define GTK_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_WIDGET, GtkWidgetClass))
139 #define GTK_IS_WIDGET(widget) (G_TYPE_CHECK_INSTANCE_TYPE ((widget), GTK_TYPE_WIDGET))
140 #define GTK_IS_WIDGET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_WIDGET))
141 #define GTK_WIDGET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_WIDGET, GtkWidgetClass))
145 #ifndef GTK_DISABLE_DEPRECATED
154 #define GTK_WIDGET_TYPE(wid) (GTK_OBJECT_TYPE (wid))
157 #ifndef GTK_DISABLE_DEPRECATED
166 #define GTK_WIDGET_STATE(wid) (GTK_WIDGET (wid)->state)
169 #ifndef GTK_DISABLE_DEPRECATED
182 #define GTK_WIDGET_SAVED_STATE(wid) (GTK_WIDGET (wid)->saved_state)
204 #define GTK_WIDGET_FLAGS(wid) (GTK_OBJECT_FLAGS (wid))
207 #ifndef GTK_DISABLE_DEPRECATED
216 #define GTK_WIDGET_TOPLEVEL(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_TOPLEVEL) != 0)
219 #ifndef GTK_DISABLE_DEPRECATED
228 #define GTK_WIDGET_NO_WINDOW(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_NO_WINDOW) != 0)
231 #ifndef GTK_DISABLE_DEPRECATED
240 #define GTK_WIDGET_REALIZED(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_REALIZED) != 0)
243 #ifndef GTK_DISABLE_DEPRECATED
252 #define GTK_WIDGET_MAPPED(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_MAPPED) != 0)
255 #ifndef GTK_DISABLE_DEPRECATED
264 #define GTK_WIDGET_VISIBLE(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_VISIBLE) != 0)
267 #ifndef GTK_DISABLE_DEPRECATED
276 #define GTK_WIDGET_DRAWABLE(wid) (GTK_WIDGET_VISIBLE (wid) && GTK_WIDGET_MAPPED (wid))
279 #ifndef GTK_DISABLE_DEPRECATED
288 #define GTK_WIDGET_SENSITIVE(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_SENSITIVE) != 0)
291 #ifndef GTK_DISABLE_DEPRECATED
300 #define GTK_WIDGET_PARENT_SENSITIVE(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_PARENT_SENSITIVE) != 0)
303 #ifndef GTK_DISABLE_DEPRECATED
312 #define GTK_WIDGET_IS_SENSITIVE(wid) (GTK_WIDGET_SENSITIVE (wid) && \
313 GTK_WIDGET_PARENT_SENSITIVE (wid))
316 #ifndef GTK_DISABLE_DEPRECATED
325 #define GTK_WIDGET_CAN_FOCUS(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_CAN_FOCUS) != 0)
328 #ifndef GTK_DISABLE_DEPRECATED
338 #define GTK_WIDGET_HAS_FOCUS(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_HAS_FOCUS) != 0)
341 #ifndef GTK_DISABLE_DEPRECATED
351 #define GTK_WIDGET_CAN_DEFAULT(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_CAN_DEFAULT) != 0)
354 #ifndef GTK_DISABLE_DEPRECATED
363 #define GTK_WIDGET_HAS_DEFAULT(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_HAS_DEFAULT) != 0)
366 #ifndef GTK_DISABLE_DEPRECATED
376 #define GTK_WIDGET_HAS_GRAB(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_HAS_GRAB) != 0)
379 #ifndef GTK_DISABLE_DEPRECATED
389 #define GTK_WIDGET_RC_STYLE(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_RC_STYLE) != 0)
392 #ifndef GTK_DISABLE_DEPRECATED
401 #define GTK_WIDGET_COMPOSITE_CHILD(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_COMPOSITE_CHILD) != 0)
404 #ifndef GTK_DISABLE_DEPRECATED
413 #define GTK_WIDGET_APP_PAINTABLE(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_APP_PAINTABLE) != 0)
416 #ifndef GTK_DISABLE_DEPRECATED
426 #define GTK_WIDGET_RECEIVES_DEFAULT(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_RECEIVES_DEFAULT) != 0)
429 #ifndef GTK_DISABLE_DEPRECATED
438 #define GTK_WIDGET_DOUBLE_BUFFERED(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_DOUBLE_BUFFERED) != 0)
459 #define GTK_WIDGET_SET_FLAGS(wid,flag) G_STMT_START{ (GTK_WIDGET_FLAGS (wid) |= (flag)); }G_STMT_END
471 #define GTK_WIDGET_UNSET_FLAGS(wid,flag) G_STMT_START{ (GTK_WIDGET_FLAGS (wid) &= ~(flag)); }G_STMT_END
474 #define GTK_TYPE_REQUISITION (gtk_requisition_get_type ())
635 GParamSpec **pspecs);
661 gboolean was_grabbed);
667 gboolean group_cycling);
809 gboolean keyboard_tooltip,
841 const gchar *first_property_name,
846 #ifndef GTK_DISABLE_DEPRECATED
850 const gchar *first_property_name,
851 ...) G_GNUC_NULL_TERMINATED;
853 #if !defined(GTK_DISABLE_DEPRECATED) || defined (GTK_COMPILATION)
862 gboolean no_show_all);
876 #ifndef GTK_DISABLE_DEPRECATED
888 #ifndef GTK_DISABLE_DEPRECATED
899 const gchar *accel_signal,
909 const gchar *accel_path,
917 gboolean group_cycling);
940 const gchar *child_property);
951 gboolean can_default);
957 gboolean receives_default);
980 gboolean has_window);
993 gboolean app_paintable);
997 gboolean double_buffered);
1001 gboolean redraw_on_allocate);
1012 gboolean is_visible);
1039 #ifndef GTK_DISABLE_DEPRECATED
1072 #ifndef GTK_DISABLE_DEPRECATED
1081 #define gtk_widget_set_visual(widget,visual) ((void) 0)
1089 #define gtk_widget_push_visual(visual) ((void) 0)
1096 #define gtk_widget_pop_visual() ((void) 0)
1104 #define gtk_widget_set_default_visual(visual) ((void) 0)
1168 PangoFontDescription *font_desc);
1170 #ifndef GTK_DISABLE_DEPRECATED
1180 #define gtk_widget_set_rc_style(widget) (gtk_widget_set_style (widget, NULL))
1190 #define gtk_widget_restore_default_style(widget) (gtk_widget_set_style (widget, NULL))
1199 const gchar *stock_id,
1201 const gchar *detail);
1230 const gchar *property_name);
1232 guint *n_properties);
1234 const gchar *property_name,
1237 const gchar *first_property_name,
1240 const gchar *first_property_name,
1241 ...) G_GNUC_NULL_TERMINATED;
1248 #ifndef GDK_MULTIHEAD_SAFE
1277 #if !defined(GTK_DISABLE_DEPRECATED) || defined (GTK_COMPILATION)
1288 gchar **path_reversed);
1292 gchar **path_reversed);
1308 const gchar *markup);
1311 gboolean has_tooltip);
1318 #if defined (GTK_TRACE_OBJECTS) && defined (__GNUC__)
1319 # define gtk_widget_ref g_object_ref
1320 # define gtk_widget_unref g_object_unref
1324 gboolean has_default);
1328 gboolean is_toplevel);
1331 gboolean was_grabbed);
1353 gpointer user_data);
typedefG_BEGIN_DECLS struct _GdkDragContext GdkDragContext
struct _GdkAtom * GdkAtom
GtkImageIconNameData name
gboolean(* GtkRcPropertyParser)(const GParamSpec *pspec, const GString *rc_string, GValue *property_value)
PBD::PropertyDescriptor< uint32_t > color
PBD::PropertyDescriptor< bool > region
PBD::PropertyDescriptor< bool > locked
link region and track selection