]> Pileus Git - ~andy/gtk/blob - gtk/gtkwidget.h
removed duplicate stuff out of gtkwidget.[ch].
[~andy/gtk] / gtk / gtkwidget.h
1 /* GTK - The GIMP Toolkit
2  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
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 Free
16  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17  */
18 #ifndef __GTK_WIDGET_H__
19 #define __GTK_WIDGET_H__
20
21
22 #include <gdk/gdk.h>
23 #include <gtk/gtkaccelerator.h>
24 #include <gtk/gtkobject.h>
25 #include <gtk/gtkstyle.h>
26
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif /* __cplusplus */
31   
32   
33 /* The flags that are used by GtkWidget on top of the
34  * flags field of GtkObject.
35  */
36 enum
37 {
38   GTK_TOPLEVEL          = 1 <<  4,
39   GTK_NO_WINDOW         = 1 <<  5,
40   GTK_REALIZED          = 1 <<  6,
41   GTK_MAPPED            = 1 <<  7,
42   GTK_VISIBLE           = 1 <<  8,
43   GTK_SENSITIVE         = 1 <<  9,
44   GTK_PARENT_SENSITIVE  = 1 << 10,
45   GTK_CAN_FOCUS         = 1 << 11,
46   GTK_HAS_FOCUS         = 1 << 12,
47   GTK_CAN_DEFAULT       = 1 << 13,
48   GTK_HAS_DEFAULT       = 1 << 14,
49   GTK_HAS_GRAB          = 1 << 15,
50   GTK_BASIC             = 1 << 16,
51   GTK_RESERVED_3        = 1 << 17,
52   GTK_RC_STYLE          = 1 << 18
53 };
54
55
56 /* Macro for casting a pointer to a GtkWidget pointer.
57  */
58 #define GTK_WIDGET(wid)                   GTK_CHECK_CAST ((wid), gtk_widget_get_type (), GtkWidget)
59
60 /* Macro for casting the klass field of a widget to a GtkWidgetClass pointer.
61  */
62 #define GTK_WIDGET_CLASS(klass)           GTK_CHECK_CLASS_CAST ((klass), gtk_widget_get_type (), GtkWidgetClass)
63
64 /* Macros for extracting various fields from GtkWidget and GtkWidgetClass.
65  */
66 #define GTK_WIDGET_TYPE(wid)              (GTK_OBJECT_TYPE (wid))
67 #define GTK_WIDGET_STATE(wid)             (GTK_WIDGET (wid)->state)
68 #define GTK_WIDGET_SAVED_STATE(wid)       (GTK_WIDGET (wid)->saved_state)
69
70 /* Macros for extracting the widget flags from GtkWidget.
71  */
72 #define GTK_WIDGET_FLAGS(wid)             (GTK_OBJECT_FLAGS (wid))
73 #define GTK_WIDGET_TOPLEVEL(wid)          (GTK_WIDGET_FLAGS (wid) & GTK_TOPLEVEL)
74 #define GTK_WIDGET_NO_WINDOW(wid)         (GTK_WIDGET_FLAGS (wid) & GTK_NO_WINDOW)
75 #define GTK_WIDGET_REALIZED(wid)          (GTK_WIDGET_FLAGS (wid) & GTK_REALIZED)
76 #define GTK_WIDGET_MAPPED(wid)            (GTK_WIDGET_FLAGS (wid) & GTK_MAPPED)
77 #define GTK_WIDGET_VISIBLE(wid)           (GTK_WIDGET_FLAGS (wid) & GTK_VISIBLE)
78 #define GTK_WIDGET_DRAWABLE(wid)          (GTK_WIDGET_VISIBLE (wid) && GTK_WIDGET_MAPPED (wid))
79 #define GTK_WIDGET_SENSITIVE(wid)         (GTK_WIDGET_FLAGS (wid) & GTK_SENSITIVE)
80 #define GTK_WIDGET_PARENT_SENSITIVE(wid)  (GTK_WIDGET_FLAGS (wid) & GTK_PARENT_SENSITIVE)
81 #define GTK_WIDGET_IS_SENSITIVE(wid)      ((GTK_WIDGET_SENSITIVE (wid) && \
82                                             GTK_WIDGET_PARENT_SENSITIVE (wid)) != 0)
83 #define GTK_WIDGET_CAN_FOCUS(wid)         (GTK_WIDGET_FLAGS (wid) & GTK_CAN_FOCUS)
84 #define GTK_WIDGET_HAS_FOCUS(wid)         (GTK_WIDGET_FLAGS (wid) & GTK_HAS_FOCUS)
85 #define GTK_WIDGET_CAN_DEFAULT(wid)       (GTK_WIDGET_FLAGS (wid) & GTK_CAN_DEFAULT)
86 #define GTK_WIDGET_HAS_DEFAULT(wid)       (GTK_WIDGET_FLAGS (wid) & GTK_HAS_DEFAULT)
87 #define GTK_WIDGET_HAS_GRAB(wid)          (GTK_WIDGET_FLAGS (wid) & GTK_HAS_GRAB)
88 #define GTK_WIDGET_BASIC(wid)             (GTK_WIDGET_FLAGS (wid) & GTK_BASIC)
89 #define GTK_WIDGET_RC_STYLE(wid)          (GTK_WIDGET_FLAGS (wid) & GTK_RC_STYLE)
90   
91 /* Macros for setting and clearing widget flags.
92  */
93 #define GTK_WIDGET_SET_FLAGS(wid,flag)    G_STMT_START{ (GTK_WIDGET_FLAGS (wid) |= (flag)); }G_STMT_END
94 #define GTK_WIDGET_UNSET_FLAGS(wid,flag)  G_STMT_START{ (GTK_WIDGET_FLAGS (wid) &= ~(flag)); }G_STMT_END
95   
96 /* Macros for testing whether "wid" is of type GtkWidget.
97  */
98 #define GTK_IS_WIDGET(wid)                GTK_CHECK_TYPE ((wid), GTK_TYPE_WIDGET)
99 #define GTK_TYPE_WIDGET                   (gtk_widget_get_type ())
100   
101   
102   
103 typedef struct _GtkRequisition    GtkRequisition;
104 typedef struct _GtkAllocation     GtkAllocation;
105 typedef struct _GtkSelectionData GtkSelectionData;
106 typedef struct _GtkWidget         GtkWidget;
107 typedef struct _GtkWidgetClass    GtkWidgetClass;
108 typedef struct _GtkWidgetAuxInfo  GtkWidgetAuxInfo;
109 typedef struct _GtkWidgetShapeInfo GtkWidgetShapeInfo;
110
111 typedef void (*GtkCallback) (GtkWidget *widget,
112                              gpointer   data);
113
114 /* A requisition is a desired amount of space which a
115  *  widget may request.
116  */
117 struct _GtkRequisition
118 {
119   guint16 width;
120   guint16 height;
121 };
122
123 /* An allocation is a size and position. Where a widget
124  *  can ask for a desired size, it is actually given
125  *  this amount of space at the specified position.
126  */
127 struct _GtkAllocation
128 {
129   gint16 x;
130   gint16 y;
131   guint16 width;
132   guint16 height;
133 };
134
135 /* The contents of a selection are returned in a GtkSelectionData
136    structure. selection/target identify the request. 
137    type specifies the type of the return; if length < 0, and
138    the data should be ignored. This structure has object semantics -
139    no fields should be modified directly, they should not be created
140    directly, and pointers to them should not be stored beyond the duration of
141    a callback. (If the last is changed, we'll need to add reference
142    counting) */
143
144 struct _GtkSelectionData
145 {
146   GdkAtom selection;
147   GdkAtom target;
148   GdkAtom type;
149   gint    format;
150   guchar *data;
151   gint    length;
152 };
153
154 /* The widget is the base of the tree for displayable objects.
155  *  (A displayable object is one which takes up some amount
156  *  of screen real estate). It provides a common base and interface
157  *  which actual widgets must adhere to.
158  */
159 struct _GtkWidget
160 {
161   /* The object structure needs to be the first
162    *  element in the widget structure in order for
163    *  the object mechanism to work correctly. This
164    *  allows a GtkWidget pointer to be cast to a
165    *  GtkObject pointer.
166    */
167   GtkObject object;
168   
169   /* 16 bits of internally used private flags.
170    * this will be packed into the same 4 byte alignment frame that
171    * state and saved_state go. we therefore don't waste any new
172    * space on this.
173    */
174   guint16 private_flags;
175   
176   /* The state of the widget. There are actually only
177    *  5 widget states (defined in "gtkenums.h").
178    */
179   guint8 state;
180   
181   /* The saved state of the widget. When a widgets state
182    *  is changed to GTK_STATE_INSENSITIVE via
183    *  "gtk_widget_set_state" or "gtk_widget_set_sensitive"
184    *  the old state is kept around in this field. The state
185    *  will be restored once the widget gets sensitive again.
186    */
187   guint8 saved_state;
188   
189   /* The widgets name. If the widget does not have a name
190    *  (the name is NULL), then its name (as returned by
191    *  "gtk_widget_get_name") is its classes name.
192    * Among other things, the widget name is used to determine
193    *  the style to use for a widget.
194    */
195   gchar *name;
196   
197   /* The style for the widget. The style contains the
198    *  colors the widget should be drawn in for each state
199    *  along with graphics contexts used to draw with and
200    *  the font to use for text.
201    */
202   GtkStyle *style;
203   
204   /* The widgets desired size.
205    */
206   GtkRequisition requisition;
207   
208   /* The widgets allocated size.
209    */
210   GtkAllocation allocation;
211   
212   /* The widgets window or its parent window if it does
213    *  not have a window. (Which will be indicated by the
214    *  GTK_NO_WINDOW flag being set).
215    */
216   GdkWindow *window;
217   
218   /* The widgets parent.
219    */
220   GtkWidget *parent;
221 };
222
223 struct _GtkWidgetClass
224 {
225   /* The object class structure needs to be the first
226    *  element in the widget class structure in order for
227    *  the class mechanism to work correctly. This allows a
228    *  GtkWidgetClass pointer to be cast to a GtkObjectClass
229    *  pointer.
230    */
231   GtkObjectClass parent_class;
232   
233   /* The signal to emit when an object of this class is activated.
234    *  This is used when activating the current focus widget and
235    *  the default widget.
236    */
237   gint activate_signal;
238   
239   /* basics */
240   void (* show)                (GtkWidget      *widget);
241   void (* hide)                (GtkWidget      *widget);
242   void (* show_all)            (GtkWidget      *widget);
243   void (* hide_all)            (GtkWidget      *widget);
244   void (* map)                 (GtkWidget      *widget);
245   void (* unmap)               (GtkWidget      *widget);
246   void (* realize)             (GtkWidget      *widget);
247   void (* unrealize)           (GtkWidget      *widget);
248   void (* draw)                (GtkWidget      *widget,
249                                 GdkRectangle   *area);
250   void (* draw_focus)          (GtkWidget      *widget);
251   void (* draw_default)        (GtkWidget      *widget);
252   void (* size_request)        (GtkWidget      *widget,
253                                 GtkRequisition *requisition);
254   void (* size_allocate)       (GtkWidget      *widget,
255                                 GtkAllocation  *allocation);
256   void (* state_changed)       (GtkWidget      *widget,
257                                 guint           previous_state);
258   void (* parent_set)          (GtkWidget      *widget,
259                                 GtkWidget      *previous_parent);
260   void (* style_set)           (GtkWidget      *widget,
261                                 GtkStyle       *previous_style);
262   
263   /* accelerators */
264   gint (* install_accelerator) (GtkWidget      *widget,
265                                 const gchar    *signal_name,
266                                 gchar           key,
267                                 guint8          modifiers);
268   void (* remove_accelerator)  (GtkWidget      *widget,
269                                 const gchar    *signal_name);
270   
271   /* events */
272   gint (* event)                   (GtkWidget          *widget,
273                                     GdkEvent           *event);
274   gint (* button_press_event)      (GtkWidget          *widget,
275                                     GdkEventButton     *event);
276   gint (* button_release_event)    (GtkWidget          *widget,
277                                     GdkEventButton     *event);
278   gint (* motion_notify_event)     (GtkWidget          *widget,
279                                     GdkEventMotion     *event);
280   gint (* delete_event)            (GtkWidget          *widget,
281                                     GdkEventAny        *event);
282   gint (* destroy_event)           (GtkWidget          *widget,
283                                     GdkEventAny        *event);
284   gint (* expose_event)            (GtkWidget          *widget,
285                                     GdkEventExpose     *event);
286   gint (* key_press_event)         (GtkWidget          *widget,
287                                     GdkEventKey        *event);
288   gint (* key_release_event)       (GtkWidget          *widget,
289                                     GdkEventKey        *event);
290   gint (* enter_notify_event)      (GtkWidget          *widget,
291                                     GdkEventCrossing   *event);
292   gint (* leave_notify_event)      (GtkWidget          *widget,
293                                     GdkEventCrossing   *event);
294   gint (* configure_event)         (GtkWidget          *widget,
295                                     GdkEventConfigure  *event);
296   gint (* focus_in_event)          (GtkWidget          *widget,
297                                     GdkEventFocus      *event);
298   gint (* focus_out_event)         (GtkWidget          *widget,
299                                     GdkEventFocus      *event);
300   gint (* map_event)               (GtkWidget          *widget,
301                                     GdkEventAny        *event);
302   gint (* unmap_event)             (GtkWidget          *widget,
303                                     GdkEventAny        *event);
304   gint (* property_notify_event)   (GtkWidget          *widget,
305                                     GdkEventProperty   *event);
306   gint (* selection_clear_event)   (GtkWidget          *widget,
307                                     GdkEventSelection  *event);
308   gint (* selection_request_event) (GtkWidget          *widget,
309                                     GdkEventSelection  *event);
310   gint (* selection_notify_event)  (GtkWidget          *widget,
311                                     GdkEventSelection  *event);
312   gint (* proximity_in_event)      (GtkWidget          *widget,
313                                     GdkEventProximity  *event);
314   gint (* proximity_out_event)     (GtkWidget          *widget,
315                                     GdkEventProximity  *event);
316   gint (* drag_begin_event)        (GtkWidget          *widget,
317                                     GdkEventDragBegin  *event);
318   gint (* drag_request_event)      (GtkWidget          *widget,
319                                     GdkEventDragRequest *event);
320   gint (* drag_end_event)          (GtkWidget          *widget,
321                                     GdkEvent           *event);
322   gint (* drop_enter_event)        (GtkWidget          *widget,
323                                     GdkEventDropEnter  *event);
324   gint (* drop_leave_event)        (GtkWidget          *widget,
325                                     GdkEventDropLeave  *event);
326   gint (* drop_data_available_event)   (GtkWidget         *widget,
327                                         GdkEventDropDataAvailable *event);
328   gint (* other_event)             (GtkWidget          *widget,
329                                     GdkEventOther      *event);
330   
331   /* selection */
332   void (* selection_received)  (GtkWidget      *widget,
333                                 GtkSelectionData *selection_data);
334   
335   gint (* client_event)            (GtkWidget          *widget,
336                                     GdkEventClient     *event);
337   gint (* no_expose_event)         (GtkWidget          *widget,
338                                     GdkEventAny        *event);
339 };
340
341 struct _GtkWidgetAuxInfo
342 {
343   gint16  x;
344   gint16  y;
345   guint16 width;
346   guint16 height;
347 };
348
349 struct _GtkWidgetShapeInfo
350 {
351   gint16     offset_x;
352   gint16     offset_y;
353   GdkBitmap *shape_mask;
354 };
355
356
357 guint      gtk_widget_get_type            (void);
358 GtkWidget* gtk_widget_new                 (guint                type,
359                                            ...);
360 GtkWidget* gtk_widget_newv                (guint                type,
361                                            guint                nargs,
362                                            GtkArg              *args);
363 void       gtk_widget_ref                 (GtkWidget           *widget);
364 void       gtk_widget_unref               (GtkWidget           *widget);
365 void       gtk_widget_destroy             (GtkWidget           *widget);
366 void       gtk_widget_destroyed           (GtkWidget           *widget,
367                                            GtkWidget          **widget_pointer);
368 void       gtk_widget_get                 (GtkWidget           *widget,
369                                            GtkArg              *arg);
370 void       gtk_widget_getv                (GtkWidget           *widget,
371                                            guint                nargs,
372                                            GtkArg              *args);
373 void       gtk_widget_set                 (GtkWidget           *widget,
374                                            ...);
375 void       gtk_widget_setv                (GtkWidget           *widget,
376                                            guint                nargs,
377                                            GtkArg              *args);
378 void       gtk_widget_unparent            (GtkWidget           *widget);
379 void       gtk_widget_show                (GtkWidget           *widget);
380 void       gtk_widget_hide                (GtkWidget           *widget);
381 void       gtk_widget_show_all            (GtkWidget           *widget);
382 void       gtk_widget_hide_all            (GtkWidget           *widget);
383 void       gtk_widget_map                 (GtkWidget           *widget);
384 void       gtk_widget_unmap               (GtkWidget           *widget);
385 void       gtk_widget_realize             (GtkWidget           *widget);
386 void       gtk_widget_unrealize           (GtkWidget           *widget);
387 void       gtk_widget_queue_draw          (GtkWidget           *widget);
388 void       gtk_widget_queue_resize        (GtkWidget           *widget);
389 void       gtk_widget_draw                (GtkWidget           *widget,
390                                            GdkRectangle        *area);
391 void       gtk_widget_draw_focus          (GtkWidget           *widget);
392 void       gtk_widget_draw_default        (GtkWidget           *widget);
393 void       gtk_widget_draw_children       (GtkWidget           *widget);
394 void       gtk_widget_size_request        (GtkWidget           *widget,
395                                            GtkRequisition      *requisition);
396 void       gtk_widget_size_allocate       (GtkWidget           *widget,
397                                            GtkAllocation       *allocation);
398 void       gtk_widget_install_accelerator (GtkWidget           *widget,
399                                            GtkAcceleratorTable *table,
400                                            const gchar         *signal_name,
401                                            gchar                key,
402                                            guint8               modifiers);
403 void       gtk_widget_remove_accelerator  (GtkWidget           *widget,
404                                            GtkAcceleratorTable *table,
405                                            const gchar         *signal_name);
406 gint       gtk_widget_event               (GtkWidget           *widget,
407                                            GdkEvent            *event);
408
409 void       gtk_widget_activate            (GtkWidget           *widget);
410 void       gtk_widget_reparent            (GtkWidget           *widget,
411                                            GtkWidget           *new_parent);
412 void       gtk_widget_popup               (GtkWidget           *widget,
413                                            gint                 x,
414                                            gint                 y);
415 gint       gtk_widget_intersect           (GtkWidget           *widget,
416                                            GdkRectangle        *area,
417                                            GdkRectangle        *intersection);
418 gint       gtk_widget_basic               (GtkWidget           *widget);
419
420 void       gtk_widget_grab_focus          (GtkWidget           *widget);
421 void       gtk_widget_grab_default        (GtkWidget           *widget);
422
423 void       gtk_widget_set_name            (GtkWidget           *widget,
424                                            const gchar         *name);
425 gchar*     gtk_widget_get_name            (GtkWidget           *widget);
426 void       gtk_widget_set_state           (GtkWidget           *widget,
427                                            GtkStateType         state);
428 void       gtk_widget_set_sensitive       (GtkWidget           *widget,
429                                            gint                 sensitive);
430 void       gtk_widget_set_parent          (GtkWidget           *widget,
431                                            GtkWidget           *parent);
432 void       gtk_widget_set_parent_window   (GtkWidget           *widget,
433                                            GdkWindow           *parent_window);
434 GdkWindow *gtk_widget_get_parent_window   (GtkWidget           *widget);
435 void       gtk_widget_set_uposition       (GtkWidget           *widget,
436                                            gint                 x,
437                                            gint                 y);
438 void       gtk_widget_set_usize           (GtkWidget           *widget,
439                                            gint                 width,
440                                            gint                 height);
441 void       gtk_widget_set_events          (GtkWidget           *widget,
442                                            gint                 events);
443 void       gtk_widget_set_extension_events (GtkWidget           *widget,
444                                             GdkExtensionMode    mode);
445
446 GdkExtensionMode gtk_widget_get_extension_events (GtkWidget     *widget);
447 GtkWidget*   gtk_widget_get_toplevel    (GtkWidget      *widget);
448 GtkWidget*   gtk_widget_get_ancestor    (GtkWidget      *widget,
449                                          gint           type);
450 GdkColormap* gtk_widget_get_colormap    (GtkWidget      *widget);
451 GdkVisual*   gtk_widget_get_visual      (GtkWidget      *widget);
452 gint         gtk_widget_get_events      (GtkWidget      *widget);
453 void         gtk_widget_get_pointer     (GtkWidget      *widget,
454                                          gint           *x,
455                                          gint           *y);
456
457 gint         gtk_widget_is_ancestor     (GtkWidget      *widget,
458                                          GtkWidget      *ancestor);
459 gint         gtk_widget_is_child        (GtkWidget      *widget,
460                                          GtkWidget      *child);
461
462 /* Widget styles.
463  */
464 void       gtk_widget_set_style         (GtkWidget      *widget,
465                                          GtkStyle       *style);
466 void       gtk_widget_set_rc_style      (GtkWidget      *widget);
467 void       gtk_widget_ensure_style      (GtkWidget      *widget);
468 GtkStyle*  gtk_widget_get_style         (GtkWidget      *widget);
469 void       gtk_widget_restore_default_style (GtkWidget  *widget);
470
471 /* Tell other Gtk applications to use the same default colors.
472  */
473 void       gtk_widget_propagate_default_style   (void);
474
475 /* Push/pop pairs, to change default values upon a widget's creation.
476  * This will override the values that got set by the
477  * gtk_widget_set_default_* () functions.
478  */
479 void         gtk_widget_push_style       (GtkStyle      *style);
480 void         gtk_widget_push_colormap    (GdkColormap   *cmap);
481 void         gtk_widget_push_visual      (GdkVisual     *visual);
482 void         gtk_widget_pop_style        (void);
483 void         gtk_widget_pop_colormap     (void);
484 void         gtk_widget_pop_visual       (void);
485
486 /* Set certain default values to be used at widget creation time.
487  */
488 void         gtk_widget_set_default_style    (GtkStyle    *style);
489 void         gtk_widget_set_default_colormap (GdkColormap *colormap);
490 void         gtk_widget_set_default_visual   (GdkVisual   *visual);
491 GtkStyle*    gtk_widget_get_default_style    (void);
492 GdkColormap* gtk_widget_get_default_colormap (void);
493 GdkVisual*   gtk_widget_get_default_visual   (void);
494
495 /* Counterpart to gdk_window_shape_combine_mask.
496  */
497 void         gtk_widget_shape_combine_mask (GtkWidget *widget,
498                                             GdkBitmap *shape_mask,
499                                             gint       offset_x,
500                                             gint       offset_y);
501
502 /* When you get a drag_enter event, you can use this to tell Gtk of other
503  *  items that are to be dragged as well...
504  */
505 void         gtk_widget_dnd_drag_add (GtkWidget *widget);
506
507 /* These two functions enable drag and/or drop on a widget,
508  *  and also let Gtk know what data types will be accepted (use MIME
509  *  type naming, plus tacking "URL:" on the front for link dragging)
510  */
511 void         gtk_widget_dnd_drag_set (GtkWidget     *widget,
512                                       guint8         drag_enable,
513                                       gchar        **type_accept_list,
514                                       guint          numtypes);
515 void         gtk_widget_dnd_drop_set (GtkWidget     *widget,
516                                       guint8         drop_enable,
517                                       gchar        **type_accept_list,
518                                       guint          numtypes,
519                                       guint8         is_destructive_operation);
520
521 /* Used to reply to a DRAG_REQUEST event - if you don't want to 
522  * give the data then pass in NULL for it 
523  */
524 void         gtk_widget_dnd_data_set (GtkWidget     *widget,
525                                       GdkEvent      *event,
526                                       gpointer       data,
527                                       gulong         data_numbytes);
528
529 #if     defined (GTK_TRACE_OBJECTS) && defined (__GNUC__)
530 #  define gtk_widget_ref gtk_object_ref
531 #  define gtk_widget_unref gtk_object_unref
532 #endif  /* GTK_TRACE_OBJECTS && __GNUC__ */
533
534
535 #ifdef __cplusplus
536 }
537 #endif /* __cplusplus */
538
539
540 #endif /* __GTK_WIDGET_H__ */