1 /* GTK - The GIMP Toolkit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser 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.
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 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser 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.
21 * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
22 * file for a list of people on the GTK+ Team. See the ChangeLog
23 * files for a list of changes. These files are distributed with
24 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
27 #ifndef __GTK_WIDGET_H__
28 #define __GTK_WIDGET_H__
31 #include <gtk/gtkaccelgroup.h>
32 #include <gtk/gtkobject.h>
33 #include <gtk/gtkadjustment.h>
34 #include <gtk/gtkstyle.h>
39 #endif /* __cplusplus */
42 /* The flags that are used by GtkWidget on top of the
43 * flags field of GtkObject.
47 GTK_TOPLEVEL = 1 << 4,
48 GTK_NO_WINDOW = 1 << 5,
49 GTK_REALIZED = 1 << 6,
52 GTK_SENSITIVE = 1 << 9,
53 GTK_PARENT_SENSITIVE = 1 << 10,
54 GTK_CAN_FOCUS = 1 << 11,
55 GTK_HAS_FOCUS = 1 << 12,
57 /* widget is allowed to receive the default via gtk_widget_grab_default
58 * and will reserve space to draw the default if possible */
59 GTK_CAN_DEFAULT = 1 << 13,
61 /* the widget currently is receiving the default action and should be drawn
62 * appropriately if possible */
63 GTK_HAS_DEFAULT = 1 << 14,
65 GTK_HAS_GRAB = 1 << 15,
66 GTK_RC_STYLE = 1 << 16,
67 GTK_COMPOSITE_CHILD = 1 << 17,
68 GTK_NO_REPARENT = 1 << 18,
69 GTK_APP_PAINTABLE = 1 << 19,
71 /* the widget when focused will receive the default action and have
72 * HAS_DEFAULT set even if there is a different widget set as default */
73 GTK_RECEIVES_DEFAULT = 1 << 20,
75 GTK_DOUBLE_BUFFERED = 1 << 21
78 /* Macro for casting a pointer to a GtkWidget or GtkWidgetClass pointer.
79 * Macros for testing whether `widget' or `klass' are of type GTK_TYPE_WIDGET.
81 #define GTK_TYPE_WIDGET (gtk_widget_get_type ())
82 #define GTK_WIDGET(widget) (GTK_CHECK_CAST ((widget), GTK_TYPE_WIDGET, GtkWidget))
83 #define GTK_WIDGET_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_WIDGET, GtkWidgetClass))
84 #define GTK_IS_WIDGET(widget) (GTK_CHECK_TYPE ((widget), GTK_TYPE_WIDGET))
85 #define GTK_IS_WIDGET_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_WIDGET))
86 #define GTK_WIDGET_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), GTK_TYPE_WIDGET, GtkWidgetClass))
88 /* Macros for extracting various fields from GtkWidget and GtkWidgetClass.
90 #define GTK_WIDGET_TYPE(wid) (GTK_OBJECT_TYPE (wid))
91 #define GTK_WIDGET_STATE(wid) (GTK_WIDGET (wid)->state)
92 #define GTK_WIDGET_SAVED_STATE(wid) (GTK_WIDGET (wid)->saved_state)
94 /* Macros for extracting the widget flags from GtkWidget.
96 #define GTK_WIDGET_FLAGS(wid) (GTK_OBJECT_FLAGS (wid))
97 #define GTK_WIDGET_TOPLEVEL(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_TOPLEVEL) != 0)
98 #define GTK_WIDGET_NO_WINDOW(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_NO_WINDOW) != 0)
99 #define GTK_WIDGET_REALIZED(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_REALIZED) != 0)
100 #define GTK_WIDGET_MAPPED(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_MAPPED) != 0)
101 #define GTK_WIDGET_VISIBLE(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_VISIBLE) != 0)
102 #define GTK_WIDGET_DRAWABLE(wid) (GTK_WIDGET_VISIBLE (wid) && GTK_WIDGET_MAPPED (wid))
103 #define GTK_WIDGET_SENSITIVE(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_SENSITIVE) != 0)
104 #define GTK_WIDGET_PARENT_SENSITIVE(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_PARENT_SENSITIVE) != 0)
105 #define GTK_WIDGET_IS_SENSITIVE(wid) (GTK_WIDGET_SENSITIVE (wid) && \
106 GTK_WIDGET_PARENT_SENSITIVE (wid))
107 #define GTK_WIDGET_CAN_FOCUS(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_CAN_FOCUS) != 0)
108 #define GTK_WIDGET_HAS_FOCUS(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_HAS_FOCUS) != 0)
109 #define GTK_WIDGET_CAN_DEFAULT(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_CAN_DEFAULT) != 0)
110 #define GTK_WIDGET_HAS_DEFAULT(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_HAS_DEFAULT) != 0)
111 #define GTK_WIDGET_HAS_GRAB(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_HAS_GRAB) != 0)
112 #define GTK_WIDGET_RC_STYLE(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_RC_STYLE) != 0)
113 #define GTK_WIDGET_COMPOSITE_CHILD(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_COMPOSITE_CHILD) != 0)
114 #define GTK_WIDGET_APP_PAINTABLE(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_APP_PAINTABLE) != 0)
115 #define GTK_WIDGET_RECEIVES_DEFAULT(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_RECEIVES_DEFAULT) != 0)
116 #define GTK_WIDGET_DOUBLE_BUFFERED(wid) ((GTK_WIDGET_FLAGS (wid) & GTK_DOUBLE_BUFFERED) != 0)
118 /* Macros for setting and clearing widget flags.
120 #define GTK_WIDGET_SET_FLAGS(wid,flag) G_STMT_START{ (GTK_WIDGET_FLAGS (wid) |= (flag)); }G_STMT_END
121 #define GTK_WIDGET_UNSET_FLAGS(wid,flag) G_STMT_START{ (GTK_WIDGET_FLAGS (wid) &= ~(flag)); }G_STMT_END
124 /* forward declaration to avoid excessive includes (and concurrent includes)
126 typedef struct _GtkRequisition GtkRequisition;
127 typedef struct _GdkRectangle GtkAllocation;
128 typedef struct _GtkSelectionData GtkSelectionData;
129 typedef struct _GtkWidgetClass GtkWidgetClass;
130 typedef struct _GtkWidgetAuxInfo GtkWidgetAuxInfo;
131 typedef struct _GtkWidgetShapeInfo GtkWidgetShapeInfo;
132 typedef void (*GtkCallback) (GtkWidget *widget,
135 /* A requisition is a desired amount of space which a
136 * widget may request.
138 struct _GtkRequisition
144 /* The widget is the base of the tree for displayable objects.
145 * (A displayable object is one which takes up some amount
146 * of screen real estate). It provides a common base and interface
147 * which actual widgets must adhere to.
151 /* The object structure needs to be the first
152 * element in the widget structure in order for
153 * the object mechanism to work correctly. This
154 * allows a GtkWidget pointer to be cast to a
159 /* 16 bits of internally used private flags.
160 * this will be packed into the same 4 byte alignment frame that
161 * state and saved_state go. we therefore don't waste any new
164 guint16 private_flags;
166 /* The state of the widget. There are actually only
167 * 5 widget states (defined in "gtkenums.h").
171 /* The saved state of the widget. When a widgets state
172 * is changed to GTK_STATE_INSENSITIVE via
173 * "gtk_widget_set_state" or "gtk_widget_set_sensitive"
174 * the old state is kept around in this field. The state
175 * will be restored once the widget gets sensitive again.
179 /* The widgets name. If the widget does not have a name
180 * (the name is NULL), then its name (as returned by
181 * "gtk_widget_get_name") is its classes name.
182 * Among other things, the widget name is used to determine
183 * the style to use for a widget.
187 /* The style for the widget. The style contains the
188 * colors the widget should be drawn in for each state
189 * along with graphics contexts used to draw with and
190 * the font to use for text.
194 /* The widgets desired size.
196 GtkRequisition requisition;
198 /* The widgets allocated size.
200 GtkAllocation allocation;
202 /* The widgets window or its parent window if it does
203 * not have a window. (Which will be indicated by the
204 * GTK_NO_WINDOW flag being set).
208 /* The widgets parent.
213 struct _GtkWidgetClass
215 /* The object class structure needs to be the first
216 * element in the widget class structure in order for
217 * the class mechanism to work correctly. This allows a
218 * GtkWidgetClass pointer to be cast to a GtkObjectClass
221 GtkObjectClass parent_class;
223 /* The signal to emit when a widget of this class is activated,
224 * gtk_widget_activate() handles the emission.
225 * Implementation of this signal is optional.
227 guint activate_signal;
229 /* This signal is emitted when a widget of this class is added
230 * to a scrolling aware parent, gtk_widget_set_scroll_adjustments()
231 * handles the emission.
232 * Implementation of this signal is optional.
234 guint set_scroll_adjustments_signal;
237 void (* show) (GtkWidget *widget);
238 void (* show_all) (GtkWidget *widget);
239 void (* hide) (GtkWidget *widget);
240 void (* hide_all) (GtkWidget *widget);
241 void (* map) (GtkWidget *widget);
242 void (* unmap) (GtkWidget *widget);
243 void (* realize) (GtkWidget *widget);
244 void (* unrealize) (GtkWidget *widget);
245 void (* size_request) (GtkWidget *widget,
246 GtkRequisition *requisition);
247 void (* size_allocate) (GtkWidget *widget,
248 GtkAllocation *allocation);
249 void (* state_changed) (GtkWidget *widget,
250 GtkStateType previous_state);
251 void (* parent_set) (GtkWidget *widget,
252 GtkWidget *previous_parent);
253 void (* hierarchy_changed) (GtkWidget *widget);
254 void (* style_set) (GtkWidget *widget,
255 GtkStyle *previous_style);
256 void (* direction_changed) (GtkWidget *widget,
257 GtkTextDirection previous_direction);
260 gint (* add_accelerator) (GtkWidget *widget,
261 guint accel_signal_id,
262 GtkAccelGroup *accel_group,
264 GdkModifierType accel_mods,
265 GtkAccelFlags accel_flags);
266 void (* remove_accelerator) (GtkWidget *widget,
267 GtkAccelGroup *accel_group,
269 GdkModifierType accel_mods);
272 gboolean (* activate_mnemonic) (GtkWidget *widget,
273 gboolean group_cycling);
276 void (* grab_focus) (GtkWidget *widget);
279 gint (* event) (GtkWidget *widget,
281 gint (* button_press_event) (GtkWidget *widget,
282 GdkEventButton *event);
283 gint (* button_release_event) (GtkWidget *widget,
284 GdkEventButton *event);
285 gint (* scroll_event) (GtkWidget *widget,
286 GdkEventScroll *event);
287 gint (* motion_notify_event) (GtkWidget *widget,
288 GdkEventMotion *event);
289 gint (* delete_event) (GtkWidget *widget,
291 gint (* destroy_event) (GtkWidget *widget,
293 gint (* expose_event) (GtkWidget *widget,
294 GdkEventExpose *event);
295 gint (* key_press_event) (GtkWidget *widget,
297 gint (* key_release_event) (GtkWidget *widget,
299 gint (* enter_notify_event) (GtkWidget *widget,
300 GdkEventCrossing *event);
301 gint (* leave_notify_event) (GtkWidget *widget,
302 GdkEventCrossing *event);
303 gint (* configure_event) (GtkWidget *widget,
304 GdkEventConfigure *event);
305 gint (* focus_in_event) (GtkWidget *widget,
306 GdkEventFocus *event);
307 gint (* focus_out_event) (GtkWidget *widget,
308 GdkEventFocus *event);
309 gint (* map_event) (GtkWidget *widget,
311 gint (* unmap_event) (GtkWidget *widget,
313 gint (* property_notify_event) (GtkWidget *widget,
314 GdkEventProperty *event);
315 gint (* selection_clear_event) (GtkWidget *widget,
316 GdkEventSelection *event);
317 gint (* selection_request_event) (GtkWidget *widget,
318 GdkEventSelection *event);
319 gint (* selection_notify_event) (GtkWidget *widget,
320 GdkEventSelection *event);
321 gint (* proximity_in_event) (GtkWidget *widget,
322 GdkEventProximity *event);
323 gint (* proximity_out_event) (GtkWidget *widget,
324 GdkEventProximity *event);
325 gint (* visibility_notify_event) (GtkWidget *widget,
326 GdkEventVisibility *event);
327 gint (* client_event) (GtkWidget *widget,
328 GdkEventClient *event);
329 gint (* no_expose_event) (GtkWidget *widget,
331 gint (* window_state_event) (GtkWidget *widget,
332 GdkEventWindowState *event);
335 void (* selection_get) (GtkWidget *widget,
336 GtkSelectionData *selection_data,
339 void (* selection_received) (GtkWidget *widget,
340 GtkSelectionData *selection_data,
343 /* Source side drag signals */
344 void (* drag_begin) (GtkWidget *widget,
345 GdkDragContext *context);
346 void (* drag_end) (GtkWidget *widget,
347 GdkDragContext *context);
348 void (* drag_data_get) (GtkWidget *widget,
349 GdkDragContext *context,
350 GtkSelectionData *selection_data,
353 void (* drag_data_delete) (GtkWidget *widget,
354 GdkDragContext *context);
356 /* Target side drag signals */
357 void (* drag_leave) (GtkWidget *widget,
358 GdkDragContext *context,
360 gboolean (* drag_motion) (GtkWidget *widget,
361 GdkDragContext *context,
365 gboolean (* drag_drop) (GtkWidget *widget,
366 GdkDragContext *context,
370 void (* drag_data_received) (GtkWidget *widget,
371 GdkDragContext *context,
374 GtkSelectionData *selection_data,
378 /* Padding for future expandsion */
385 struct _GtkWidgetAuxInfo
393 struct _GtkWidgetShapeInfo
397 GdkBitmap *shape_mask;
400 GtkType gtk_widget_get_type (void) G_GNUC_CONST;
401 GtkWidget* gtk_widget_new (GtkType type,
402 const gchar *first_property_name,
404 GtkWidget* gtk_widget_ref (GtkWidget *widget);
405 void gtk_widget_unref (GtkWidget *widget);
406 void gtk_widget_destroy (GtkWidget *widget);
407 void gtk_widget_destroyed (GtkWidget *widget,
408 GtkWidget **widget_pointer);
409 void gtk_widget_set (GtkWidget *widget,
410 const gchar *first_property_name,
412 void gtk_widget_unparent (GtkWidget *widget);
413 void gtk_widget_show (GtkWidget *widget);
414 void gtk_widget_show_now (GtkWidget *widget);
415 void gtk_widget_hide (GtkWidget *widget);
416 void gtk_widget_show_all (GtkWidget *widget);
417 void gtk_widget_hide_all (GtkWidget *widget);
418 void gtk_widget_map (GtkWidget *widget);
419 void gtk_widget_unmap (GtkWidget *widget);
420 void gtk_widget_realize (GtkWidget *widget);
421 void gtk_widget_unrealize (GtkWidget *widget);
424 void gtk_widget_queue_draw (GtkWidget *widget);
425 void gtk_widget_queue_draw_area (GtkWidget *widget,
430 #ifndef GTK_DISABLE_DEPRECATED
431 void gtk_widget_queue_clear (GtkWidget *widget);
432 void gtk_widget_queue_clear_area (GtkWidget *widget,
437 #endif /* GTK_DISABLE_DEPRECATED */
440 void gtk_widget_queue_resize (GtkWidget *widget);
441 #ifndef GTK_DISABLE_DEPRECATED
442 void gtk_widget_draw (GtkWidget *widget,
444 #endif /* GTK_DISABLE_DEPRECATED */
445 void gtk_widget_size_request (GtkWidget *widget,
446 GtkRequisition *requisition);
447 void gtk_widget_size_allocate (GtkWidget *widget,
448 GtkAllocation *allocation);
449 void gtk_widget_get_child_requisition (GtkWidget *widget,
450 GtkRequisition *requisition);
451 void gtk_widget_add_accelerator (GtkWidget *widget,
452 const gchar *accel_signal,
453 GtkAccelGroup *accel_group,
456 GtkAccelFlags accel_flags);
457 void gtk_widget_remove_accelerator (GtkWidget *widget,
458 GtkAccelGroup *accel_group,
461 void gtk_widget_remove_accelerators (GtkWidget *widget,
462 const gchar *accel_signal,
463 gboolean visible_only);
464 guint gtk_widget_accelerator_signal (GtkWidget *widget,
465 GtkAccelGroup *accel_group,
468 void gtk_widget_lock_accelerators (GtkWidget *widget);
469 void gtk_widget_unlock_accelerators (GtkWidget *widget);
470 gboolean gtk_widget_accelerators_locked (GtkWidget *widget);
471 gboolean gtk_widget_activate_mnemonic (GtkWidget *widget,
472 gboolean group_cycling);
473 gboolean gtk_widget_event (GtkWidget *widget,
475 gint gtk_widget_send_expose (GtkWidget *widget,
478 gboolean gtk_widget_activate (GtkWidget *widget);
479 gboolean gtk_widget_set_scroll_adjustments (GtkWidget *widget,
480 GtkAdjustment *hadjustment,
481 GtkAdjustment *vadjustment);
483 void gtk_widget_reparent (GtkWidget *widget,
484 GtkWidget *new_parent);
485 void gtk_widget_popup (GtkWidget *widget,
488 gboolean gtk_widget_intersect (GtkWidget *widget,
490 GdkRectangle *intersection);
491 GdkRegion *gtk_widget_region_intersect (GtkWidget *widget,
494 gboolean gtk_widget_is_focus (GtkWidget *widget);
495 void gtk_widget_grab_focus (GtkWidget *widget);
496 void gtk_widget_grab_default (GtkWidget *widget);
498 void gtk_widget_set_name (GtkWidget *widget,
500 G_CONST_RETURN gchar* gtk_widget_get_name (GtkWidget *widget);
501 void gtk_widget_set_state (GtkWidget *widget,
503 void gtk_widget_set_sensitive (GtkWidget *widget,
505 void gtk_widget_set_app_paintable (GtkWidget *widget,
506 gboolean app_paintable);
507 void gtk_widget_set_double_buffered (GtkWidget *widget,
508 gboolean double_buffered);
509 void gtk_widget_set_parent (GtkWidget *widget,
511 void gtk_widget_set_parent_window (GtkWidget *widget,
512 GdkWindow *parent_window);
513 GdkWindow *gtk_widget_get_parent_window (GtkWidget *widget);
514 void gtk_widget_set_uposition (GtkWidget *widget,
517 void gtk_widget_set_usize (GtkWidget *widget,
520 void gtk_widget_set_events (GtkWidget *widget,
522 void gtk_widget_add_events (GtkWidget *widget,
524 void gtk_widget_set_extension_events (GtkWidget *widget,
525 GdkExtensionMode mode);
527 GdkExtensionMode gtk_widget_get_extension_events (GtkWidget *widget);
528 GtkWidget* gtk_widget_get_toplevel (GtkWidget *widget);
529 GtkWidget* gtk_widget_get_ancestor (GtkWidget *widget,
530 GtkType widget_type);
531 GdkColormap* gtk_widget_get_colormap (GtkWidget *widget);
532 GdkVisual* gtk_widget_get_visual (GtkWidget *widget);
534 /* The following functions must not be called on an already
535 * realized widget. Because it is possible that somebody
536 * can call get_colormap() or get_visual() and save the
537 * result, these functions are probably only safe to
538 * call in a widget's init() function.
540 void gtk_widget_set_colormap (GtkWidget *widget,
541 GdkColormap *colormap);
543 gint gtk_widget_get_events (GtkWidget *widget);
544 void gtk_widget_get_pointer (GtkWidget *widget,
548 gboolean gtk_widget_is_ancestor (GtkWidget *widget,
549 GtkWidget *ancestor);
551 /* Hide widget and return TRUE.
553 gboolean gtk_widget_hide_on_delete (GtkWidget *widget);
557 void gtk_widget_set_style (GtkWidget *widget,
559 void gtk_widget_set_rc_style (GtkWidget *widget);
560 void gtk_widget_ensure_style (GtkWidget *widget);
561 GtkStyle* gtk_widget_get_style (GtkWidget *widget);
562 void gtk_widget_restore_default_style (GtkWidget *widget);
564 void gtk_widget_modify_style (GtkWidget *widget,
566 GtkRcStyle *gtk_widget_get_modifier_style (GtkWidget *widget);
567 void gtk_widget_modify_fg (GtkWidget *widget,
570 void gtk_widget_modify_bg (GtkWidget *widget,
573 void gtk_widget_modify_text (GtkWidget *widget,
576 void gtk_widget_modify_base (GtkWidget *widget,
579 void gtk_widget_modify_font (GtkWidget *widget,
580 PangoFontDescription *font_desc);
582 PangoContext *gtk_widget_create_pango_context (GtkWidget *widget);
583 PangoContext *gtk_widget_get_pango_context (GtkWidget *widget);
584 PangoLayout *gtk_widget_create_pango_layout (GtkWidget *widget,
587 GdkPixbuf *gtk_widget_render_icon (GtkWidget *widget,
588 const gchar *stock_id,
590 const gchar *detail);
592 /* handle composite names for GTK_COMPOSITE_CHILD widgets,
593 * the returned name is newly allocated.
595 void gtk_widget_set_composite_name (GtkWidget *widget,
597 gchar* gtk_widget_get_composite_name (GtkWidget *widget);
599 /* Descend recursively and set rc-style on all widgets without user styles */
600 void gtk_widget_reset_rc_styles (GtkWidget *widget);
602 /* Push/pop pairs, to change default values upon a widget's creation.
603 * This will override the values that got set by the
604 * gtk_widget_set_default_* () functions.
606 void gtk_widget_push_style (GtkStyle *style);
607 void gtk_widget_push_colormap (GdkColormap *cmap);
608 void gtk_widget_push_composite_child (void);
609 void gtk_widget_pop_composite_child (void);
610 void gtk_widget_pop_style (void);
611 void gtk_widget_pop_colormap (void);
613 /* widget style properties
615 void gtk_widget_class_install_style_property (GtkWidgetClass *class,
617 void gtk_widget_class_install_style_property_parser (GtkWidgetClass *class,
619 GtkRcPropertyParser parser);
620 void gtk_widget_style_get_property (GtkWidget *widget,
621 const gchar *property_name,
623 void gtk_widget_style_get_valist (GtkWidget *widget,
624 const gchar *first_property_name,
626 void gtk_widget_style_get (GtkWidget *widget,
627 const gchar *first_property_name,
631 /* Set certain default values to be used at widget creation time.
633 void gtk_widget_set_default_style (GtkStyle *style);
634 void gtk_widget_set_default_colormap (GdkColormap *colormap);
635 GtkStyle* gtk_widget_get_default_style (void);
636 GdkColormap* gtk_widget_get_default_colormap (void);
637 GdkVisual* gtk_widget_get_default_visual (void);
639 /* Functions for setting directionality for widgets
642 void gtk_widget_set_direction (GtkWidget *widget,
643 GtkTextDirection dir);
644 GtkTextDirection gtk_widget_get_direction (GtkWidget *widget);
646 void gtk_widget_set_default_direction (GtkTextDirection dir);
647 GtkTextDirection gtk_widget_get_default_direction (void);
649 /* Counterpart to gdk_window_shape_combine_mask.
651 void gtk_widget_shape_combine_mask (GtkWidget *widget,
652 GdkBitmap *shape_mask,
656 /* internal function */
657 void gtk_widget_reset_shapes (GtkWidget *widget);
659 /* Compute a widget's path in the form "GtkWindow.MyLabel", and
660 * return newly alocated strings.
662 void gtk_widget_path (GtkWidget *widget,
665 gchar **path_reversed);
666 void gtk_widget_class_path (GtkWidget *widget,
669 gchar **path_reversed);
671 #if defined (GTK_TRACE_OBJECTS) && defined (__GNUC__)
672 # define gtk_widget_ref gtk_object_ref
673 # define gtk_widget_unref gtk_object_unref
674 #endif /* GTK_TRACE_OBJECTS && __GNUC__ */
679 #endif /* __cplusplus */
682 #endif /* __GTK_WIDGET_H__ */