]> Pileus Git - ~andy/gtk/blob - gdk/gdkinternals.h
gdk: Move scratch GC handling to X11
[~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 /*************************************
328  * Interfaces used by windowing code *
329  *************************************/
330
331 GdkPixmap *_gdk_pixmap_new               (GdkDrawable    *drawable,
332                                           gint            width,
333                                           gint            height,
334                                           gint            depth);
335 GdkPixmap *_gdk_pixmap_create_from_data  (GdkDrawable    *drawable,
336                                           const gchar    *data,
337                                           gint            width,
338                                           gint            height,
339                                           gint            depth,
340                                           const GdkColor *fg,
341                                           const GdkColor *bg);
342 GdkPixmap *_gdk_bitmap_create_from_data  (GdkDrawable    *drawable,
343                                           const gchar    *data,
344                                           gint            width,
345                                           gint            height);
346
347 void       _gdk_window_impl_new          (GdkWindow      *window,
348                                           GdkWindow      *real_parent,
349                                           GdkScreen      *screen,
350                                           GdkVisual      *visual,
351                                           GdkEventMask    event_mask,
352                                           GdkWindowAttr  *attributes,
353                                           gint            attributes_mask);
354 void       _gdk_window_destroy           (GdkWindow      *window,
355                                           gboolean        foreign_destroy);
356 void       _gdk_window_clear_update_area (GdkWindow      *window);
357 void       _gdk_window_update_size       (GdkWindow      *window);
358 gboolean   _gdk_window_update_viewable   (GdkWindow      *window);
359
360 void       _gdk_window_process_updates_recurse (GdkWindow *window,
361                                                 cairo_region_t *expose_region);
362
363 void       _gdk_screen_close             (GdkScreen      *screen);
364
365 const char *_gdk_get_sm_client_id (void);
366
367 void _gdk_gc_init (GdkGC           *gc,
368                    GdkDrawable     *drawable,
369                    GdkGCValues     *values,
370                    GdkGCValuesMask  values_mask);
371
372 cairo_region_t *_gdk_gc_get_clip_region (GdkGC *gc);
373 GdkBitmap *_gdk_gc_get_clip_mask   (GdkGC *gc);
374 gboolean   _gdk_gc_get_exposures   (GdkGC *gc);
375 GdkFill    _gdk_gc_get_fill        (GdkGC *gc);
376 GdkPixmap *_gdk_gc_get_tile        (GdkGC *gc);
377 GdkBitmap *_gdk_gc_get_stipple     (GdkGC *gc);
378 guint32    _gdk_gc_get_fg_pixel    (GdkGC *gc);
379 guint32    _gdk_gc_get_bg_pixel    (GdkGC *gc);
380 void      _gdk_gc_add_drawable_clip     (GdkGC     *gc,
381                                          guint32    region_tag,
382                                          cairo_region_t *region,
383                                          int        offset_x,
384                                          int        offset_y);
385 void      _gdk_gc_remove_drawable_clip  (GdkGC     *gc);
386 void       _gdk_gc_set_clip_region_internal (GdkGC     *gc,
387                                              cairo_region_t *region,
388                                              gboolean reset_origin);
389 GdkSubwindowMode _gdk_gc_get_subwindow (GdkGC *gc);
390
391 GdkDrawable *_gdk_drawable_begin_direct_draw (GdkDrawable *drawable,
392                                               GdkGC *gc,
393                                               gpointer *priv_data,
394                                               gint *x_offset_out,
395                                               gint *y_offset_out);
396 void         _gdk_drawable_end_direct_draw (gpointer priv_data);
397
398
399 /*****************************************
400  * Interfaces provided by windowing code *
401  *****************************************/
402
403 /* Font/string functions implemented in module-specific code */
404
405 void _gdk_colormap_real_destroy (GdkColormap *colormap);
406
407 void _gdk_cursor_destroy (GdkCursor *cursor);
408
409 void     _gdk_windowing_init                    (void);
410
411 extern const GOptionEntry _gdk_windowing_args[];
412 void     _gdk_windowing_set_default_display     (GdkDisplay *display);
413
414 gchar *_gdk_windowing_substitute_screen_number (const gchar *display_name,
415                                                 gint         screen_number);
416
417 gulong   _gdk_windowing_window_get_next_serial  (GdkDisplay *display);
418 void     _gdk_windowing_window_get_offsets      (GdkWindow  *window,
419                                                  gint       *x_offset,
420                                                  gint       *y_offset);
421 cairo_region_t *_gdk_windowing_window_get_shape      (GdkWindow  *window);
422 cairo_region_t *_gdk_windowing_window_get_input_shape(GdkWindow  *window);
423 cairo_region_t *_gdk_windowing_get_shape_for_mask    (GdkBitmap *mask);
424 void     _gdk_windowing_window_beep             (GdkWindow *window);
425
426
427 void       _gdk_windowing_get_device_state   (GdkDisplay       *display,
428                                               GdkDevice        *device,
429                                               GdkScreen       **screen,
430                                               gint             *x,
431                                               gint             *y,
432                                               GdkModifierType  *mask);
433 GdkWindow* _gdk_windowing_window_at_device_position  (GdkDisplay       *display,
434                                                       GdkDevice        *device,
435                                                       gint             *win_x,
436                                                       gint             *win_y,
437                                                       GdkModifierType  *mask,
438                                                       gboolean          get_toplevel);
439 GdkGrabStatus _gdk_windowing_device_grab     (GdkDevice        *device,
440                                               GdkWindow        *window,
441                                               GdkWindow        *native,
442                                               gboolean          owner_events,
443                                               GdkEventMask      event_mask,
444                                               GdkWindow        *confine_to,
445                                               GdkCursor        *cursor,
446                                               guint32           time);
447 void _gdk_windowing_got_event                (GdkDisplay       *display,
448                                               GList            *event_link,
449                                               GdkEvent         *event,
450                                               gulong            serial);
451
452 void _gdk_windowing_window_process_updates_recurse (GdkWindow *window,
453                                                     cairo_region_t *expose_region);
454 void _gdk_windowing_before_process_all_updates     (void);
455 void _gdk_windowing_after_process_all_updates      (void);
456
457 /* Return the number of bits-per-pixel for images of the specified depth. */
458 gint _gdk_windowing_get_bits_for_depth (GdkDisplay *display,
459                                         gint        depth);
460
461
462 #define GDK_WINDOW_IS_MAPPED(window) ((((GdkWindowObject*)window)->state & GDK_WINDOW_STATE_WITHDRAWN) == 0)
463
464
465 /* Called when gdk_window_destroy() is called on a foreign window
466  * or an ancestor of the foreign window. It should generally reparent
467  * the window out of it's current heirarchy, hide it, and then
468  * send a message to the owner requesting that the window be destroyed.
469  */
470 void _gdk_windowing_window_destroy_foreign (GdkWindow *window);
471
472 void _gdk_windowing_display_set_sm_client_id (GdkDisplay  *display,
473                                               const gchar *sm_client_id);
474
475 void _gdk_windowing_window_set_composited (GdkWindow *window,
476                                            gboolean composited);
477
478 #define GDK_TYPE_PAINTABLE            (_gdk_paintable_get_type ())
479 #define GDK_PAINTABLE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_PAINTABLE, GdkPaintable))
480 #define GDK_IS_PAINTABLE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_PAINTABLE))
481 #define GDK_PAINTABLE_GET_IFACE(obj)  (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GDK_TYPE_PAINTABLE, GdkPaintableIface))
482
483 typedef struct _GdkPaintable        GdkPaintable;
484 typedef struct _GdkPaintableIface   GdkPaintableIface;
485
486 struct _GdkPaintableIface
487 {
488   GTypeInterface g_iface;
489   
490   void (* begin_paint_region)       (GdkPaintable    *paintable,
491                                      GdkWindow       *window,
492                                      const cairo_region_t *region);
493   void (* end_paint)                (GdkPaintable    *paintable);
494 };
495
496 GType _gdk_paintable_get_type (void) G_GNUC_CONST;
497
498 /* Implementation types */
499 GType _gdk_window_impl_get_type (void) G_GNUC_CONST;
500 GType _gdk_pixmap_impl_get_type (void) G_GNUC_CONST;
501
502
503 /**
504  * _gdk_windowing_gc_set_clip_region:
505  * @gc: a #GdkGC
506  * @region: the new clip region
507  * @reset_origin: if TRUE, reset the clip_x/y_origin values to 0
508  * 
509  * Do any window-system specific processing necessary
510  * for a change in clip region. Since the clip origin
511  * will likely change before the GC is used with the
512  * new clip, frequently this function will only set a flag and
513  * do the real processing later.
514  *
515  * When this function is called, _gdk_gc_get_clip_region
516  * will already return the new region.
517  **/
518 void _gdk_windowing_gc_set_clip_region (GdkGC           *gc,
519                                         const cairo_region_t *region,
520                                         gboolean reset_origin);
521
522 /**
523  * _gdk_windowing_gc_copy:
524  * @dst_gc: a #GdkGC from the GDK backend
525  * @src_gc: a #GdkGC from the GDK backend
526  * 
527  * Copies backend specific state from @src_gc to @dst_gc.
528  * This is called before the generic state is copied, so
529  * the old generic state is still available from @dst_gc
530  **/
531 void _gdk_windowing_gc_copy (GdkGC *dst_gc,
532                              GdkGC *src_gc);
533      
534 /* Queries the current foreground color of a GdkGC */
535 void _gdk_windowing_gc_get_foreground (GdkGC    *gc,
536                                        GdkColor *color);
537 /* Queries the current background color of a GdkGC */
538 void _gdk_windowing_gc_get_background (GdkGC    *gc,
539                                        GdkColor *color);
540
541 struct GdkAppLaunchContextPrivate
542 {
543   GdkDisplay *display;
544   GdkScreen *screen;
545   gint workspace;
546   guint32 timestamp;
547   GIcon *icon;
548   char *icon_name;
549 };
550
551 char *_gdk_windowing_get_startup_notify_id (GAppLaunchContext *context,
552                                             GAppInfo          *info, 
553                                             GList             *files);
554 void  _gdk_windowing_launch_failed         (GAppLaunchContext *context, 
555                                             const char        *startup_notify_id);
556
557 void _gdk_display_device_grab_update                     (GdkDisplay *display,
558                                                           GdkDevice  *device,
559                                                           gulong      current_serial);
560 GdkDeviceGrabInfo  *_gdk_display_get_last_device_grab  (GdkDisplay *display,
561                                                         GdkDevice  *device);
562 GdkDeviceGrabInfo  *_gdk_display_add_device_grab   (GdkDisplay       *display,
563                                                     GdkDevice        *device,
564                                                     GdkWindow        *window,
565                                                     GdkWindow        *native_window,
566                                                     GdkGrabOwnership  grab_ownership,
567                                                     gboolean          owner_events,
568                                                     GdkEventMask      event_mask,
569                                                     unsigned long     serial_start,
570                                                     guint32           time,
571                                                     gboolean          implicit);
572 GdkDeviceGrabInfo  * _gdk_display_has_device_grab  (GdkDisplay *display,
573                                                     GdkDevice  *device,
574                                                     gulong      serial);
575 gboolean _gdk_display_end_device_grab  (GdkDisplay *display,
576                                         GdkDevice  *device,
577                                         gulong      serial,
578                                         GdkWindow  *if_child,
579                                         gboolean    implicit);
580 gboolean _gdk_display_check_grab_ownership (GdkDisplay *display,
581                                             GdkDevice  *device,
582                                             gulong      serial);
583 void _gdk_display_enable_motion_hints     (GdkDisplay *display,
584                                            GdkDevice  *device);
585
586 GdkPointerWindowInfo * _gdk_display_get_pointer_info (GdkDisplay *display,
587                                                       GdkDevice  *device);
588
589 void _gdk_display_pointer_info_foreach (GdkDisplay                   *display,
590                                         GdkDisplayPointerInfoForeach  func,
591                                         gpointer                      user_data);
592
593 void _gdk_window_invalidate_for_expose (GdkWindow       *window,
594                                         cairo_region_t       *region);
595
596 void _gdk_windowing_set_cairo_surface_size (cairo_surface_t *surface,
597                                             int width,
598                                             int height);
599
600 cairo_surface_t * _gdk_windowing_create_cairo_surface (GdkDrawable *drawable,
601                                                        int width,
602                                                        int height);
603 GdkWindow * _gdk_window_find_child_at (GdkWindow *window,
604                                        int x, int y);
605 GdkWindow * _gdk_window_find_descendant_at (GdkWindow *toplevel,
606                                             double x, double y,
607                                             double *found_x,
608                                             double *found_y);
609
610 void _gdk_window_add_damage (GdkWindow *toplevel,
611                              cairo_region_t *damaged_region);
612
613 GdkEvent * _gdk_make_event (GdkWindow    *window,
614                             GdkEventType  type,
615                             GdkEvent     *event_in_queue,
616                             gboolean      before_event);
617 gboolean _gdk_window_event_parent_of (GdkWindow *parent,
618                                       GdkWindow *child);
619
620 void _gdk_synthesize_crossing_events (GdkDisplay                 *display,
621                                       GdkWindow                  *src,
622                                       GdkWindow                  *dest,
623                                       GdkDevice                  *device,
624                                       GdkCrossingMode             mode,
625                                       gint                        toplevel_x,
626                                       gint                        toplevel_y,
627                                       GdkModifierType             mask,
628                                       guint32                     time_,
629                                       GdkEvent                   *event_in_queue,
630                                       gulong                      serial,
631                                       gboolean                    non_linear);
632 void _gdk_display_set_window_under_pointer (GdkDisplay *display,
633                                             GdkDevice  *device,
634                                             GdkWindow  *window);
635
636
637 void _gdk_synthesize_crossing_events_for_geometry_change (GdkWindow *changed_window);
638
639 cairo_region_t *_gdk_window_calculate_full_clip_region    (GdkWindow     *window,
640                                                       GdkWindow     *base_window,
641                                                       gboolean       do_children,
642                                                       gint          *base_x_offset,
643                                                       gint          *base_y_offset);
644 gboolean    _gdk_window_has_impl (GdkWindow *window);
645 GdkWindow * _gdk_window_get_impl_window (GdkWindow *window);
646 GdkWindow *_gdk_window_get_input_window_for_event (GdkWindow *native_window,
647                                                    GdkEventType event_type,
648                                                    int x, int y,
649                                                    gulong serial);
650
651 /*****************************
652  * offscreen window routines *
653  *****************************/
654 GType gdk_offscreen_window_get_type (void);
655 void       _gdk_offscreen_window_new                 (GdkWindow     *window,
656                                                       GdkScreen     *screen,
657                                                       GdkVisual     *visual,
658                                                       GdkWindowAttr *attributes,
659                                                       gint           attributes_mask);
660
661
662 /************************************
663  * Initialization and exit routines *
664  ************************************/
665
666 void _gdk_windowing_exit (void);
667
668 G_END_DECLS
669
670 #endif /* __GDK_INTERNALS_H__ */