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