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