]> Pileus Git - ~andy/gtk/blob - gdk/gdkinternals.h
bfd9775a07cb035f71e157e3ebcfaaa32380c77b
[~andy/gtk] / gdk / gdkinternals.h
1 /* GDK - The GIMP Drawing Kit
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 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.
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  * Lesser General Public License for more details.
13  *
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.
18  */
19
20 /*
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/. 
25  */
26
27 /* Uninstalled header defining types and functions internal to GDK */
28
29 #ifndef __GDK_INTERNALS_H__
30 #define __GDK_INTERNALS_H__
31
32 #include <gio/gio.h>
33 #include <gdk/gdktypes.h>
34 #include <gdk/gdkwindow.h>
35 #include <gdk/gdkprivate.h>
36 #ifdef USE_MEDIALIB
37 #include <gdk/gdkmedialib.h>
38 #endif
39
40 G_BEGIN_DECLS
41
42 /**********************
43  * General Facilities * 
44  **********************/
45
46 /* Debugging support */
47
48 typedef struct _GdkColorInfo           GdkColorInfo;
49 typedef struct _GdkEventFilter         GdkEventFilter;
50 typedef struct _GdkClientFilter        GdkClientFilter;
51
52 typedef enum {
53   GDK_COLOR_WRITEABLE = 1 << 0
54 } GdkColorInfoFlags;
55
56 struct _GdkColorInfo
57 {
58   GdkColorInfoFlags flags;
59   guint ref_count;
60 };
61
62 struct _GdkEventFilter {
63   GdkFilterFunc function;
64   gpointer data;
65 };
66
67 struct _GdkClientFilter {
68   GdkAtom       type;
69   GdkFilterFunc function;
70   gpointer      data;
71 };
72
73 typedef enum {
74   GDK_DEBUG_MISC          = 1 << 0,
75   GDK_DEBUG_EVENTS        = 1 << 1,
76   GDK_DEBUG_DND           = 1 << 2,
77   GDK_DEBUG_XIM           = 1 << 3,
78   GDK_DEBUG_NOGRABS       = 1 << 4,
79   GDK_DEBUG_COLORMAP      = 1 << 5,
80   GDK_DEBUG_GC            = 1 << 6,
81   GDK_DEBUG_PIXMAP        = 1 << 7,
82   GDK_DEBUG_IMAGE         = 1 << 8,
83   GDK_DEBUG_INPUT         = 1 << 9,
84   GDK_DEBUG_CURSOR        = 1 <<10,
85   GDK_DEBUG_MULTIHEAD     = 1 <<11,
86   GDK_DEBUG_XINERAMA      = 1 <<12,
87   GDK_DEBUG_DRAW          = 1 <<13,
88   GDK_DEBUG_EVENTLOOP     = 1 <<14
89 } GdkDebugFlag;
90
91 extern GList            *_gdk_default_filters;
92 extern GdkWindow        *_gdk_parent_root;
93 extern gint              _gdk_error_code;
94 extern gint              _gdk_error_warnings;
95
96 extern guint _gdk_debug_flags;
97 extern gboolean _gdk_native_windows;
98
99 #ifdef G_ENABLE_DEBUG
100
101 #define GDK_NOTE(type,action)                G_STMT_START { \
102     if (_gdk_debug_flags & GDK_DEBUG_##type)                \
103        { action; };                          } G_STMT_END
104
105 #else /* !G_ENABLE_DEBUG */
106
107 #define GDK_NOTE(type,action)
108
109 #endif /* G_ENABLE_DEBUG */
110
111 /* Arg parsing */
112
113 typedef enum 
114 {
115   GDK_ARG_STRING,
116   GDK_ARG_INT,
117   GDK_ARG_BOOL,
118   GDK_ARG_NOBOOL,
119   GDK_ARG_CALLBACK
120 } GdkArgType;
121
122 typedef struct _GdkArgContext GdkArgContext;
123 typedef struct _GdkArgDesc GdkArgDesc;
124
125 typedef void (*GdkArgFunc) (const char *name, const char *arg, gpointer data);
126
127 struct _GdkArgContext
128 {
129   GPtrArray *tables;
130   gpointer cb_data;
131 };
132
133 struct _GdkArgDesc
134 {
135   const char *name;
136   GdkArgType type;
137   gpointer location;
138   GdkArgFunc callback;
139 };
140
141 /* Event handling */
142
143 typedef struct _GdkEventPrivate GdkEventPrivate;
144
145 typedef enum
146 {
147   /* Following flag is set for events on the event queue during
148    * translation and cleared afterwards.
149    */
150   GDK_EVENT_PENDING = 1 << 0
151 } GdkEventFlags;
152
153 struct _GdkEventPrivate
154 {
155   GdkEvent   event;
156   guint      flags;
157   GdkScreen *screen;
158   gpointer   windowing_data;
159   GdkDevice *device;
160 };
161
162 /* Tracks information about the pointer grab on this display */
163 typedef struct
164 {
165   GdkWindow *window;
166   GdkWindow *native_window;
167   gulong serial_start;
168   gulong serial_end; /* exclusive, i.e. not active on serial_end */
169   gboolean owner_events;
170   guint event_mask;
171   gboolean implicit;
172   guint32 time;
173   GdkGrabOwnership ownership;
174
175   guint activated : 1;
176   guint implicit_ungrab : 1;
177 } GdkDeviceGrabInfo;
178
179 typedef struct _GdkInputWindow GdkInputWindow;
180
181 typedef void (* GdkDisplayPointerInfoForeach) (GdkDisplay           *display,
182                                                GdkDevice            *device,
183                                                GdkPointerWindowInfo *device_info,
184                                                gpointer              user_data);
185
186 /* Private version of GdkWindowObject. The initial part of this strucuture
187    is public for historical reasons. Don't change that part */
188 typedef struct _GdkWindowPaint             GdkWindowPaint;
189
190 #define GDK_WINDOW_OBJECT(object)    ((GdkWindowObject *) GDK_WINDOW (object))
191
192 struct _GdkWindowObject
193 {
194   GdkDrawable parent_instance;
195
196   GdkDrawable *impl; /* window-system-specific delegate object */  
197   
198   GdkWindowObject *parent;
199
200   gpointer user_data;
201
202   gint x;
203   gint y;
204   
205   gint extension_events;
206
207   GList *filters;
208   GList *children;
209
210   GdkColor bg_color;
211   GdkPixmap *bg_pixmap;
212   
213   GSList *paint_stack;
214   
215   cairo_region_t *update_area;
216   guint update_freeze_count;
217   
218   guint8 window_type;
219   guint8 depth;
220   guint8 resize_count;
221
222   GdkWindowState state;
223   
224   guint guffaw_gravity : 1;
225   guint input_only : 1;
226   guint modal_hint : 1;
227   guint composited : 1;
228   
229   guint destroyed : 2;
230
231   guint accept_focus : 1;
232   guint focus_on_map : 1;
233   guint shaped : 1;
234   guint support_multidevice : 1;
235   
236   GdkEventMask event_mask;
237
238   guint update_and_descendants_freeze_count;
239
240   GdkWindowRedirect *redirect;
241
242   /* The GdkWindowObject that has the impl, ref:ed if another window.
243    * This ref is required to keep the wrapper of the impl window alive
244    * for as long as any GdkWindow references the impl. */
245   GdkWindowObject *impl_window; 
246   int abs_x, abs_y; /* Absolute offset in impl */
247   gint width, height;
248   guint32 clip_tag;
249   cairo_region_t *clip_region; /* Clip region (wrt toplevel) in window coords */
250   cairo_region_t *clip_region_with_children; /* Clip region in window coords */
251   GdkCursor *cursor;
252   GHashTable *device_cursor;
253   gint8 toplevel_window_type;
254   guint synthesize_crossing_event_queued : 1;
255   guint effective_visibility : 2;
256   guint visibility : 2; /* The visibility wrt the toplevel (i.e. based on clip_region) */
257   guint native_visibility : 2; /* the native visibility of a impl windows */
258   guint viewable : 1; /* mapped and all parents mapped */
259   guint applied_shape : 1;
260
261   guint num_offscreen_children;
262   GdkWindowPaint *implicit_paint;
263   GdkInputWindow *input_window; /* only set for impl windows */
264
265   GList *outstanding_moves;
266
267   cairo_region_t *shape;
268   cairo_region_t *input_shape;
269   
270   cairo_surface_t *cairo_surface;
271   guint outstanding_surfaces; /* only set on impl window */
272
273   GList *devices_inside;
274   GHashTable *device_events;
275 };
276
277 #define GDK_WINDOW_TYPE(d) (((GdkWindowObject*)(GDK_WINDOW (d)))->window_type)
278 #define GDK_WINDOW_DESTROYED(d) (((GdkWindowObject*)(GDK_WINDOW (d)))->destroyed)
279
280 extern GdkEventFunc   _gdk_event_func;    /* Callback for events */
281 extern gpointer       _gdk_event_data;
282 extern GDestroyNotify _gdk_event_notify;
283
284 extern GSList    *_gdk_displays;
285 extern gchar     *_gdk_display_name;
286 extern gint       _gdk_screen_number;
287 extern gchar     *_gdk_display_arg_name;
288 extern gboolean   _gdk_enable_multidevice;
289
290 void      _gdk_events_queue  (GdkDisplay *display);
291 GdkEvent* _gdk_event_unqueue (GdkDisplay *display);
292
293 GList* _gdk_event_queue_find_first   (GdkDisplay *display);
294 void   _gdk_event_queue_remove_link  (GdkDisplay *display,
295                                       GList      *node);
296 GList* _gdk_event_queue_prepend      (GdkDisplay *display,
297                                       GdkEvent   *event);
298 GList* _gdk_event_queue_append       (GdkDisplay *display,
299                                       GdkEvent   *event);
300 GList* _gdk_event_queue_insert_after (GdkDisplay *display,
301                                       GdkEvent   *after_event,
302                                       GdkEvent   *event);
303 GList* _gdk_event_queue_insert_before(GdkDisplay *display,
304                                       GdkEvent   *after_event,
305                                       GdkEvent   *event);
306 void   _gdk_event_button_generate    (GdkDisplay *display,
307                                       GdkEvent   *event);
308
309 void _gdk_windowing_event_data_copy (const GdkEvent *src,
310                                      GdkEvent       *dst);
311 void _gdk_windowing_event_data_free (GdkEvent       *event);
312
313 void gdk_synthesize_window_state (GdkWindow     *window,
314                                   GdkWindowState unset_flags,
315                                   GdkWindowState set_flags);
316
317 GdkDeviceManager * _gdk_device_manager_new (GdkDisplay *display);
318
319
320 cairo_surface_t *_gdk_drawable_ref_cairo_surface (GdkDrawable *drawable);
321
322 GdkDrawable *_gdk_drawable_get_source_drawable (GdkDrawable *drawable);
323 cairo_surface_t * _gdk_drawable_create_cairo_surface (GdkDrawable *drawable,
324                                                       int width,
325                                                       int height);
326
327 /* GC caching */
328 GdkGC *_gdk_drawable_get_subwindow_scratch_gc (GdkDrawable *drawable);
329
330 /*************************************
331  * Interfaces used by windowing code *
332  *************************************/
333
334 GdkPixmap *_gdk_pixmap_new               (GdkDrawable    *drawable,
335                                           gint            width,
336                                           gint            height,
337                                           gint            depth);
338 GdkPixmap *_gdk_pixmap_create_from_data  (GdkDrawable    *drawable,
339                                           const gchar    *data,
340                                           gint            width,
341                                           gint            height,
342                                           gint            depth,
343                                           const GdkColor *fg,
344                                           const GdkColor *bg);
345 GdkPixmap *_gdk_bitmap_create_from_data  (GdkDrawable    *drawable,
346                                           const gchar    *data,
347                                           gint            width,
348                                           gint            height);
349
350 void       _gdk_window_impl_new          (GdkWindow      *window,
351                                           GdkWindow      *real_parent,
352                                           GdkScreen      *screen,
353                                           GdkVisual      *visual,
354                                           GdkEventMask    event_mask,
355                                           GdkWindowAttr  *attributes,
356                                           gint            attributes_mask);
357 void       _gdk_window_destroy           (GdkWindow      *window,
358                                           gboolean        foreign_destroy);
359 void       _gdk_window_clear_update_area (GdkWindow      *window);
360 void       _gdk_window_update_size       (GdkWindow      *window);
361 gboolean   _gdk_window_update_viewable   (GdkWindow      *window);
362
363 void       _gdk_window_process_updates_recurse (GdkWindow *window,
364                                                 cairo_region_t *expose_region);
365
366 void       _gdk_screen_close             (GdkScreen      *screen);
367
368 const char *_gdk_get_sm_client_id (void);
369
370 void _gdk_gc_init (GdkGC           *gc,
371                    GdkDrawable     *drawable,
372                    GdkGCValues     *values,
373                    GdkGCValuesMask  values_mask);
374
375 cairo_region_t *_gdk_gc_get_clip_region (GdkGC *gc);
376 GdkBitmap *_gdk_gc_get_clip_mask   (GdkGC *gc);
377 gboolean   _gdk_gc_get_exposures   (GdkGC *gc);
378 GdkFill    _gdk_gc_get_fill        (GdkGC *gc);
379 GdkPixmap *_gdk_gc_get_tile        (GdkGC *gc);
380 GdkBitmap *_gdk_gc_get_stipple     (GdkGC *gc);
381 guint32    _gdk_gc_get_fg_pixel    (GdkGC *gc);
382 guint32    _gdk_gc_get_bg_pixel    (GdkGC *gc);
383 void      _gdk_gc_add_drawable_clip     (GdkGC     *gc,
384                                          guint32    region_tag,
385                                          cairo_region_t *region,
386                                          int        offset_x,
387                                          int        offset_y);
388 void      _gdk_gc_remove_drawable_clip  (GdkGC     *gc);
389 void       _gdk_gc_set_clip_region_internal (GdkGC     *gc,
390                                              cairo_region_t *region,
391                                              gboolean reset_origin);
392 GdkSubwindowMode _gdk_gc_get_subwindow (GdkGC *gc);
393
394 GdkDrawable *_gdk_drawable_begin_direct_draw (GdkDrawable *drawable,
395                                               GdkGC *gc,
396                                               gpointer *priv_data,
397                                               gint *x_offset_out,
398                                               gint *y_offset_out);
399 void         _gdk_drawable_end_direct_draw (gpointer priv_data);
400
401
402 /*****************************************
403  * Interfaces provided by windowing code *
404  *****************************************/
405
406 /* Font/string functions implemented in module-specific code */
407
408 void _gdk_colormap_real_destroy (GdkColormap *colormap);
409
410 void _gdk_cursor_destroy (GdkCursor *cursor);
411
412 void     _gdk_windowing_init                    (void);
413
414 extern const GOptionEntry _gdk_windowing_args[];
415 void     _gdk_windowing_set_default_display     (GdkDisplay *display);
416
417 gchar *_gdk_windowing_substitute_screen_number (const gchar *display_name,
418                                                 gint         screen_number);
419
420 gulong   _gdk_windowing_window_get_next_serial  (GdkDisplay *display);
421 void     _gdk_windowing_window_get_offsets      (GdkWindow  *window,
422                                                  gint       *x_offset,
423                                                  gint       *y_offset);
424 cairo_region_t *_gdk_windowing_window_get_shape      (GdkWindow  *window);
425 cairo_region_t *_gdk_windowing_window_get_input_shape(GdkWindow  *window);
426 cairo_region_t *_gdk_windowing_get_shape_for_mask    (GdkBitmap *mask);
427 void     _gdk_windowing_window_beep             (GdkWindow *window);
428
429
430 void       _gdk_windowing_get_device_state   (GdkDisplay       *display,
431                                               GdkDevice        *device,
432                                               GdkScreen       **screen,
433                                               gint             *x,
434                                               gint             *y,
435                                               GdkModifierType  *mask);
436 GdkWindow* _gdk_windowing_window_at_device_position  (GdkDisplay       *display,
437                                                       GdkDevice        *device,
438                                                       gint             *win_x,
439                                                       gint             *win_y,
440                                                       GdkModifierType  *mask,
441                                                       gboolean          get_toplevel);
442 GdkGrabStatus _gdk_windowing_device_grab     (GdkDevice        *device,
443                                               GdkWindow        *window,
444                                               GdkWindow        *native,
445                                               gboolean          owner_events,
446                                               GdkEventMask      event_mask,
447                                               GdkWindow        *confine_to,
448                                               GdkCursor        *cursor,
449                                               guint32           time);
450 void _gdk_windowing_got_event                (GdkDisplay       *display,
451                                               GList            *event_link,
452                                               GdkEvent         *event,
453                                               gulong            serial);
454
455 void _gdk_windowing_window_process_updates_recurse (GdkWindow *window,
456                                                     cairo_region_t *expose_region);
457 void _gdk_windowing_before_process_all_updates     (void);
458 void _gdk_windowing_after_process_all_updates      (void);
459
460 /* Return the number of bits-per-pixel for images of the specified depth. */
461 gint _gdk_windowing_get_bits_for_depth (GdkDisplay *display,
462                                         gint        depth);
463
464
465 #define GDK_WINDOW_IS_MAPPED(window) ((((GdkWindowObject*)window)->state & GDK_WINDOW_STATE_WITHDRAWN) == 0)
466
467
468 /* Called when gdk_window_destroy() is called on a foreign window
469  * or an ancestor of the foreign window. It should generally reparent
470  * the window out of it's current heirarchy, hide it, and then
471  * send a message to the owner requesting that the window be destroyed.
472  */
473 void _gdk_windowing_window_destroy_foreign (GdkWindow *window);
474
475 void _gdk_windowing_display_set_sm_client_id (GdkDisplay  *display,
476                                               const gchar *sm_client_id);
477
478 void _gdk_windowing_window_set_composited (GdkWindow *window,
479                                            gboolean composited);
480
481 #define GDK_TYPE_PAINTABLE            (_gdk_paintable_get_type ())
482 #define GDK_PAINTABLE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_PAINTABLE, GdkPaintable))
483 #define GDK_IS_PAINTABLE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_PAINTABLE))
484 #define GDK_PAINTABLE_GET_IFACE(obj)  (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GDK_TYPE_PAINTABLE, GdkPaintableIface))
485
486 typedef struct _GdkPaintable        GdkPaintable;
487 typedef struct _GdkPaintableIface   GdkPaintableIface;
488
489 struct _GdkPaintableIface
490 {
491   GTypeInterface g_iface;
492   
493   void (* begin_paint_region)       (GdkPaintable    *paintable,
494                                      GdkWindow       *window,
495                                      const cairo_region_t *region);
496   void (* end_paint)                (GdkPaintable    *paintable);
497 };
498
499 GType _gdk_paintable_get_type (void) G_GNUC_CONST;
500
501 /* Implementation types */
502 GType _gdk_window_impl_get_type (void) G_GNUC_CONST;
503 GType _gdk_pixmap_impl_get_type (void) G_GNUC_CONST;
504
505
506 /**
507  * _gdk_windowing_gc_set_clip_region:
508  * @gc: a #GdkGC
509  * @region: the new clip region
510  * @reset_origin: if TRUE, reset the clip_x/y_origin values to 0
511  * 
512  * Do any window-system specific processing necessary
513  * for a change in clip region. Since the clip origin
514  * will likely change before the GC is used with the
515  * new clip, frequently this function will only set a flag and
516  * do the real processing later.
517  *
518  * When this function is called, _gdk_gc_get_clip_region
519  * will already return the new region.
520  **/
521 void _gdk_windowing_gc_set_clip_region (GdkGC           *gc,
522                                         const cairo_region_t *region,
523                                         gboolean reset_origin);
524
525 /**
526  * _gdk_windowing_gc_copy:
527  * @dst_gc: a #GdkGC from the GDK backend
528  * @src_gc: a #GdkGC from the GDK backend
529  * 
530  * Copies backend specific state from @src_gc to @dst_gc.
531  * This is called before the generic state is copied, so
532  * the old generic state is still available from @dst_gc
533  **/
534 void _gdk_windowing_gc_copy (GdkGC *dst_gc,
535                              GdkGC *src_gc);
536      
537 /* Queries the current foreground color of a GdkGC */
538 void _gdk_windowing_gc_get_foreground (GdkGC    *gc,
539                                        GdkColor *color);
540 /* Queries the current background color of a GdkGC */
541 void _gdk_windowing_gc_get_background (GdkGC    *gc,
542                                        GdkColor *color);
543
544 struct GdkAppLaunchContextPrivate
545 {
546   GdkDisplay *display;
547   GdkScreen *screen;
548   gint workspace;
549   guint32 timestamp;
550   GIcon *icon;
551   char *icon_name;
552 };
553
554 char *_gdk_windowing_get_startup_notify_id (GAppLaunchContext *context,
555                                             GAppInfo          *info, 
556                                             GList             *files);
557 void  _gdk_windowing_launch_failed         (GAppLaunchContext *context, 
558                                             const char        *startup_notify_id);
559
560 void _gdk_display_device_grab_update                     (GdkDisplay *display,
561                                                           GdkDevice  *device,
562                                                           gulong      current_serial);
563 GdkDeviceGrabInfo  *_gdk_display_get_last_device_grab  (GdkDisplay *display,
564                                                         GdkDevice  *device);
565 GdkDeviceGrabInfo  *_gdk_display_add_device_grab   (GdkDisplay       *display,
566                                                     GdkDevice        *device,
567                                                     GdkWindow        *window,
568                                                     GdkWindow        *native_window,
569                                                     GdkGrabOwnership  grab_ownership,
570                                                     gboolean          owner_events,
571                                                     GdkEventMask      event_mask,
572                                                     unsigned long     serial_start,
573                                                     guint32           time,
574                                                     gboolean          implicit);
575 GdkDeviceGrabInfo  * _gdk_display_has_device_grab  (GdkDisplay *display,
576                                                     GdkDevice  *device,
577                                                     gulong      serial);
578 gboolean _gdk_display_end_device_grab  (GdkDisplay *display,
579                                         GdkDevice  *device,
580                                         gulong      serial,
581                                         GdkWindow  *if_child,
582                                         gboolean    implicit);
583 gboolean _gdk_display_check_grab_ownership (GdkDisplay *display,
584                                             GdkDevice  *device,
585                                             gulong      serial);
586 void _gdk_display_enable_motion_hints     (GdkDisplay *display,
587                                            GdkDevice  *device);
588
589 GdkPointerWindowInfo * _gdk_display_get_pointer_info (GdkDisplay *display,
590                                                       GdkDevice  *device);
591
592 void _gdk_display_pointer_info_foreach (GdkDisplay                   *display,
593                                         GdkDisplayPointerInfoForeach  func,
594                                         gpointer                      user_data);
595
596 void _gdk_window_invalidate_for_expose (GdkWindow       *window,
597                                         cairo_region_t       *region);
598
599 void _gdk_windowing_set_cairo_surface_size (cairo_surface_t *surface,
600                                             int width,
601                                             int height);
602
603 cairo_surface_t * _gdk_windowing_create_cairo_surface (GdkDrawable *drawable,
604                                                        int width,
605                                                        int height);
606 GdkWindow * _gdk_window_find_child_at (GdkWindow *window,
607                                        int x, int y);
608 GdkWindow * _gdk_window_find_descendant_at (GdkWindow *toplevel,
609                                             double x, double y,
610                                             double *found_x,
611                                             double *found_y);
612
613 void _gdk_window_add_damage (GdkWindow *toplevel,
614                              cairo_region_t *damaged_region);
615
616 GdkEvent * _gdk_make_event (GdkWindow    *window,
617                             GdkEventType  type,
618                             GdkEvent     *event_in_queue,
619                             gboolean      before_event);
620 gboolean _gdk_window_event_parent_of (GdkWindow *parent,
621                                       GdkWindow *child);
622
623 void _gdk_synthesize_crossing_events (GdkDisplay                 *display,
624                                       GdkWindow                  *src,
625                                       GdkWindow                  *dest,
626                                       GdkDevice                  *device,
627                                       GdkCrossingMode             mode,
628                                       gint                        toplevel_x,
629                                       gint                        toplevel_y,
630                                       GdkModifierType             mask,
631                                       guint32                     time_,
632                                       GdkEvent                   *event_in_queue,
633                                       gulong                      serial,
634                                       gboolean                    non_linear);
635 void _gdk_display_set_window_under_pointer (GdkDisplay *display,
636                                             GdkDevice  *device,
637                                             GdkWindow  *window);
638
639
640 void _gdk_synthesize_crossing_events_for_geometry_change (GdkWindow *changed_window);
641
642 cairo_region_t *_gdk_window_calculate_full_clip_region    (GdkWindow     *window,
643                                                       GdkWindow     *base_window,
644                                                       gboolean       do_children,
645                                                       gint          *base_x_offset,
646                                                       gint          *base_y_offset);
647 gboolean    _gdk_window_has_impl (GdkWindow *window);
648 GdkWindow * _gdk_window_get_impl_window (GdkWindow *window);
649 GdkWindow *_gdk_window_get_input_window_for_event (GdkWindow *native_window,
650                                                    GdkEventType event_type,
651                                                    int x, int y,
652                                                    gulong serial);
653
654 /*****************************
655  * offscreen window routines *
656  *****************************/
657 GType gdk_offscreen_window_get_type (void);
658 void       _gdk_offscreen_window_new                 (GdkWindow     *window,
659                                                       GdkScreen     *screen,
660                                                       GdkVisual     *visual,
661                                                       GdkWindowAttr *attributes,
662                                                       gint           attributes_mask);
663
664
665 /************************************
666  * Initialization and exit routines *
667  ************************************/
668
669 void _gdk_windowing_exit (void);
670
671 G_END_DECLS
672
673 #endif /* __GDK_INTERNALS_H__ */