#include <gio/gio.h>
#include <gdk/gdktypes.h>
#include <gdk/gdkwindow.h>
+#include <gdk/gdkwindowimpl.h>
#include <gdk/gdkprivate.h>
-#ifdef USE_MEDIALIB
-#include <gdk/gdkmedialib.h>
-#endif
G_BEGIN_DECLS
guint ref_count;
};
+typedef enum {
+ GDK_EVENT_FILTER_REMOVED = 1 << 0
+} GdkEventFilterFlags;
+
struct _GdkEventFilter {
GdkFilterFunc function;
gpointer data;
+ GdkEventFilterFlags flags;
+ guint ref_count;
};
struct _GdkClientFilter {
GdkScreen *screen;
gpointer windowing_data;
GdkDevice *device;
+ GdkDevice *source_device;
};
/* Tracks information about the pointer grab on this display */
guint implicit_ungrab : 1;
} GdkDeviceGrabInfo;
-typedef struct _GdkInputWindow GdkInputWindow;
+typedef struct _GdkWindowPaint GdkWindowPaint;
typedef void (* GdkDisplayPointerInfoForeach) (GdkDisplay *display,
GdkDevice *device,
GdkPointerWindowInfo *device_info,
gpointer user_data);
-/* Private version of GdkWindowObject. The initial part of this strucuture
- is public for historical reasons. Don't change that part */
-typedef struct _GdkWindowPaint GdkWindowPaint;
-
-#define GDK_WINDOW_OBJECT(object) ((GdkWindowObject *) GDK_WINDOW (object))
-
-struct _GdkWindowObject
+struct _GdkWindow
{
- GdkDrawable parent_instance;
+ GObject parent_instance;
- GdkDrawable *impl; /* window-system-specific delegate object */
+ GdkWindowImpl *impl; /* window-system-specific delegate object */
- GdkWindowObject *parent;
+ GdkWindow *parent;
GdkVisual *visual;
gpointer user_data;
guint update_and_descendants_freeze_count;
- /* The GdkWindowObject that has the impl, ref:ed if another window.
+ /* The GdkWindow that has the impl, ref:ed if another window.
* This ref is required to keep the wrapper of the impl window alive
* for as long as any GdkWindow references the impl. */
- GdkWindowObject *impl_window;
+ GdkWindow *impl_window;
int abs_x, abs_y; /* Absolute offset in impl */
gint width, height;
guint32 clip_tag;
guint num_offscreen_children;
GdkWindowPaint *implicit_paint;
- GdkInputWindow *input_window; /* only set for impl windows */
GList *outstanding_moves;
cairo_region_t *input_shape;
cairo_surface_t *cairo_surface;
- guint outstanding_surfaces; /* only set on impl window */
GList *devices_inside;
GHashTable *device_events;
-};
-#define GDK_WINDOW_TYPE(d) (((GdkWindowObject*)(GDK_WINDOW (d)))->window_type)
-#define GDK_WINDOW_DESTROYED(d) (((GdkWindowObject*)(GDK_WINDOW (d)))->destroyed)
+ GHashTable *source_event_masks;
+ gulong device_added_handler_id;
+ gulong device_changed_handler_id;
+};
-extern GdkEventFunc _gdk_event_func; /* Callback for events */
-extern gpointer _gdk_event_data;
-extern GDestroyNotify _gdk_event_notify;
+#define GDK_WINDOW_TYPE(d) (((GDK_WINDOW (d)))->window_type)
+#define GDK_WINDOW_DESTROYED(d) (GDK_WINDOW (d)->destroyed)
extern GSList *_gdk_displays;
extern gchar *_gdk_display_name;
extern gint _gdk_screen_number;
extern gchar *_gdk_display_arg_name;
-extern gboolean _gdk_enable_multidevice;
+extern gboolean _gdk_disable_multidevice;
void _gdk_events_queue (GdkDisplay *display);
GdkEvent* _gdk_event_unqueue (GdkDisplay *display);
+void _gdk_event_filter_unref (GdkWindow *window,
+ GdkEventFilter *filter);
+
+void _gdk_event_emit (GdkEvent *event);
GList* _gdk_event_queue_find_first (GdkDisplay *display);
void _gdk_event_queue_remove_link (GdkDisplay *display,
GList *node);
gboolean _gdk_cairo_surface_extents (cairo_surface_t *surface,
GdkRectangle *extents);
-cairo_surface_t *_gdk_drawable_ref_cairo_surface (GdkDrawable *drawable);
-
-cairo_surface_t * _gdk_drawable_create_cairo_surface (GdkDrawable *drawable,
- int width,
- int height);
-
/*************************************
* Interfaces used by windowing code *
*************************************/
+cairo_surface_t *
+ _gdk_window_ref_cairo_surface (GdkWindow *window);
+
void _gdk_window_impl_new (GdkWindow *window,
GdkWindow *real_parent,
GdkScreen *screen,
/* Font/string functions implemented in module-specific code */
-void _gdk_colormap_real_destroy (GdkColormap *colormap);
-
void _gdk_cursor_destroy (GdkCursor *cursor);
void _gdk_windowing_init (void);
void _gdk_windowing_window_get_offsets (GdkWindow *window,
gint *x_offset,
gint *y_offset);
-cairo_region_t *_gdk_windowing_window_get_shape (GdkWindow *window);
-cairo_region_t *_gdk_windowing_window_get_input_shape(GdkWindow *window);
-void _gdk_windowing_window_beep (GdkWindow *window);
void _gdk_windowing_get_device_state (GdkDisplay *display,
void _gdk_windowing_before_process_all_updates (void);
void _gdk_windowing_after_process_all_updates (void);
-/* Return the number of bits-per-pixel for images of the specified depth. */
-gint _gdk_windowing_get_bits_for_depth (GdkDisplay *display,
- gint depth);
-
-#define GDK_WINDOW_IS_MAPPED(window) ((((GdkWindowObject*)window)->state & GDK_WINDOW_STATE_WITHDRAWN) == 0)
+#define GDK_WINDOW_IS_MAPPED(window) (((window)->state & GDK_WINDOW_STATE_WITHDRAWN) == 0)
/* Called when gdk_window_destroy() is called on a foreign window
GType _gdk_paintable_get_type (void) G_GNUC_CONST;
-/* Implementation types */
-GType _gdk_window_impl_get_type (void) G_GNUC_CONST;
-
struct GdkAppLaunchContextPrivate
{
GdkDisplay *display;
void _gdk_display_device_grab_update (GdkDisplay *display,
GdkDevice *device,
+ GdkDevice *source_device,
gulong current_serial);
GdkDeviceGrabInfo *_gdk_display_get_last_device_grab (GdkDisplay *display,
GdkDevice *device);
void _gdk_window_invalidate_for_expose (GdkWindow *window,
cairo_region_t *region);
-gboolean _gdk_windowing_set_cairo_surface_size (cairo_surface_t *surface,
- int width,
- int height);
-
GdkWindow * _gdk_window_find_child_at (GdkWindow *window,
int x, int y);
GdkWindow * _gdk_window_find_descendant_at (GdkWindow *toplevel,
GdkWindow *src,
GdkWindow *dest,
GdkDevice *device,
+ GdkDevice *source_device,
GdkCrossingMode mode,
gint toplevel_x,
gint toplevel_y,
gint *base_y_offset);
gboolean _gdk_window_has_impl (GdkWindow *window);
GdkWindow * _gdk_window_get_impl_window (GdkWindow *window);
-GdkWindow *_gdk_window_get_input_window_for_event (GdkWindow *native_window,
- GdkEventType event_type,
- int x, int y,
- gulong serial);
/*****************************
* offscreen window routines *
*****************************/
GType gdk_offscreen_window_get_type (void);
void _gdk_offscreen_window_new (GdkWindow *window,
- GdkScreen *screen,
GdkWindowAttr *attributes,
gint attributes_mask);
+cairo_surface_t * _gdk_offscreen_window_create_surface (GdkWindow *window,
+ gint width,
+ gint height);
/************************************