]> Pileus Git - ~andy/gtk/blobdiff - gdk/gdkinternals.h
wayland: don't attempt to unqueue events when events are paused
[~andy/gtk] / gdk / gdkinternals.h
index d14a8ee150ed7765278847076015b90474aa83a1..a187a03106578e00059fb3de68617717cea91bd8 100644 (file)
@@ -12,9 +12,7 @@
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
  */
 
 /*
@@ -74,25 +72,32 @@ struct _GdkClientFilter {
 };
 
 typedef enum {
-  GDK_DEBUG_MISC          = 1 << 0,
-  GDK_DEBUG_EVENTS        = 1 << 1,
-  GDK_DEBUG_DND           = 1 << 2,
-  GDK_DEBUG_XIM           = 1 << 3,
-  GDK_DEBUG_NOGRABS       = 1 << 4,
-  GDK_DEBUG_COLORMAP      = 1 << 5,
-  GDK_DEBUG_INPUT         = 1 << 6,
-  GDK_DEBUG_CURSOR        = 1 << 7,
-  GDK_DEBUG_MULTIHEAD     = 1 << 8,
-  GDK_DEBUG_XINERAMA      = 1 << 9,
-  GDK_DEBUG_DRAW          = 1 <<10,
-  GDK_DEBUG_EVENTLOOP     = 1 <<11
+  GDK_DEBUG_MISC          = 1 <<  0,
+  GDK_DEBUG_EVENTS        = 1 <<  1,
+  GDK_DEBUG_DND           = 1 <<  2,
+  GDK_DEBUG_XIM           = 1 <<  3,
+  GDK_DEBUG_NOGRABS       = 1 <<  4,
+  GDK_DEBUG_INPUT         = 1 <<  5,
+  GDK_DEBUG_CURSOR        = 1 <<  6,
+  GDK_DEBUG_MULTIHEAD     = 1 <<  7,
+  GDK_DEBUG_XINERAMA      = 1 <<  8,
+  GDK_DEBUG_DRAW          = 1 <<  9,
+  GDK_DEBUG_EVENTLOOP     = 1 << 10,
+  GDK_DEBUG_FRAMES        = 1 << 11,
+  GDK_DEBUG_SETTINGS      = 1 << 12
 } GdkDebugFlag;
 
+typedef enum {
+  GDK_RENDERING_MODE_SIMILAR = 0,
+  GDK_RENDERING_MODE_IMAGE,
+  GDK_RENDERING_MODE_RECORDING
+} GdkRenderingMode;
+
 extern GList            *_gdk_default_filters;
 extern GdkWindow        *_gdk_parent_root;
 
 extern guint _gdk_debug_flags;
-extern gboolean _gdk_native_windows;
+extern GdkRenderingMode    _gdk_rendering_mode;
 
 #ifdef G_ENABLE_DEBUG
 
@@ -145,7 +150,13 @@ typedef enum
   /* Following flag is set for events on the event queue during
    * translation and cleared afterwards.
    */
-  GDK_EVENT_PENDING = 1 << 0
+  GDK_EVENT_PENDING = 1 << 0,
+
+  /* The following flag is set for:
+   * 1) touch events emulating pointer events
+   * 2) pointer events being emulated by a touch sequence.
+   */
+  GDK_EVENT_POINTER_EMULATED = 1 << 1
 } GdkEventFlags;
 
 struct _GdkEventPrivate
@@ -164,8 +175,8 @@ struct _GdkWindow
 {
   GObject parent_instance;
 
-  GdkWindowImpl *impl; /* window-system-specific delegate object */  
-  
+  GdkWindowImpl *impl; /* window-system-specific delegate object */
+
   GdkWindow *parent;
   GdkVisual *visual;
 
@@ -173,68 +184,79 @@ struct _GdkWindow
 
   gint x;
   gint y;
-  
-  gint extension_events;
+
+  GdkEventMask event_mask;
 
   GList *filters;
   GList *children;
 
   cairo_pattern_t *background;
-  
+
   GSList *paint_stack;
-  
+
   cairo_region_t *update_area;
   guint update_freeze_count;
-  
+
   guint8 window_type;
   guint8 depth;
   guint8 resize_count;
 
+  gint8 toplevel_window_type;
+  guint8 alpha;
+
   GdkWindowState state;
-  
+
   guint guffaw_gravity : 1;
   guint input_only : 1;
   guint modal_hint : 1;
   guint composited : 1;
-  
+  guint has_alpha_background : 1;
+
   guint destroyed : 2;
 
   guint accept_focus : 1;
   guint focus_on_map : 1;
   guint shaped : 1;
   guint support_multidevice : 1;
-  
-  GdkEventMask event_mask;
-
-  guint update_and_descendants_freeze_count;
+  guint synthesize_crossing_event_queued : 1;
+  guint effective_visibility : 2;
+  guint visibility : 2; /* The visibility wrt the toplevel (i.e. based on clip_region) */
+  guint native_visibility : 2; /* the native visibility of a impl windows */
+  guint viewable : 1; /* mapped and all parents mapped */
+  guint applied_shape : 1;
+  GdkFullscreenMode fullscreen_mode;
 
   /* 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. */
-  GdkWindow *impl_window; 
-  int abs_x, abs_y; /* Absolute offset in impl */
+  GdkWindow *impl_window;
+
+  guint update_and_descendants_freeze_count;
+
+  gint abs_x, abs_y; /* Absolute offset in impl */
   gint width, height;
-  guint32 clip_tag;
-  cairo_region_t *clip_region; /* Clip region (wrt toplevel) in window coords */
-  cairo_region_t *clip_region_with_children; /* Clip region in window coords */
+
+  /* The clip region is the part of the window, in window coordinates
+     that is fully or partially (i.e. semi transparently) visible in
+     the window hierarchy from the toplevel and down */
+  cairo_region_t *clip_region;
+  /* This is the clip region, with additionally all the opaque
+     child windows removed */
+  cairo_region_t *clip_region_with_children;
+  /* The layered region is the subset of clip_region that
+     is covered by non-opaque sibling or ancestor sibling window. */
+  cairo_region_t *layered_region;
+
   GdkCursor *cursor;
   GHashTable *device_cursor;
-  gint8 toplevel_window_type;
-  guint synthesize_crossing_event_queued : 1;
-  guint effective_visibility : 2;
-  guint visibility : 2; /* The visibility wrt the toplevel (i.e. based on clip_region) */
-  guint native_visibility : 2; /* the native visibility of a impl windows */
-  guint viewable : 1; /* mapped and all parents mapped */
-  guint applied_shape : 1;
 
-  guint num_offscreen_children;
-  GdkWindowPaint *implicit_paint;
+  GSList *implicit_paint;
 
   GList *outstanding_moves;
 
   cairo_region_t *shape;
   cairo_region_t *input_shape;
-  
+
   cairo_surface_t *cairo_surface;
 
   GList *devices_inside;
@@ -243,6 +265,10 @@ struct _GdkWindow
   GHashTable *source_event_masks;
   gulong device_added_handler_id;
   gulong device_changed_handler_id;
+
+  guint num_offscreen_children;
+
+  GdkFrameClock *frame_clock; /* NULL to use from parent or default */
 };
 
 #define GDK_WINDOW_TYPE(d) (((GDK_WINDOW (d)))->window_type)
@@ -258,6 +284,10 @@ GdkEvent* _gdk_event_unqueue (GdkDisplay *display);
 void _gdk_event_filter_unref        (GdkWindow      *window,
                                     GdkEventFilter *filter);
 
+void     _gdk_event_set_pointer_emulated (GdkEvent *event,
+                                          gboolean  emulated);
+gboolean _gdk_event_get_pointer_emulated (GdkEvent *event);
+
 void   _gdk_event_emit               (GdkEvent   *event);
 GList* _gdk_event_queue_find_first   (GdkDisplay *display);
 void   _gdk_event_queue_remove_link  (GdkDisplay *display,
@@ -272,6 +302,9 @@ GList* _gdk_event_queue_insert_after (GdkDisplay *display,
 GList* _gdk_event_queue_insert_before(GdkDisplay *display,
                                       GdkEvent   *after_event,
                                       GdkEvent   *event);
+
+void    _gdk_event_queue_handle_motion_compression (GdkDisplay *display);
+
 void   _gdk_event_button_generate    (GdkDisplay *display,
                                       GdkEvent   *event);
 
@@ -283,8 +316,6 @@ void gdk_synthesize_window_state (GdkWindow     *window,
                                   GdkWindowState unset_flags,
                                   GdkWindowState set_flags);
 
-GdkDeviceManager * _gdk_device_manager_new (GdkDisplay *display);
-
 gboolean _gdk_cairo_surface_extents (cairo_surface_t *surface,
                                      GdkRectangle *extents);
 
@@ -295,12 +326,6 @@ gboolean _gdk_cairo_surface_extents (cairo_surface_t *surface,
 cairo_surface_t *
            _gdk_window_ref_cairo_surface (GdkWindow *window);
 
-void       _gdk_window_impl_new          (GdkWindow      *window,
-                                          GdkWindow      *real_parent,
-                                          GdkScreen      *screen,
-                                          GdkEventMask    event_mask,
-                                          GdkWindowAttr  *attributes,
-                                          gint            attributes_mask);
 void       _gdk_window_destroy           (GdkWindow      *window,
                                           gboolean        foreign_destroy);
 void       _gdk_window_clear_update_area (GdkWindow      *window);
@@ -312,8 +337,6 @@ void       _gdk_window_process_updates_recurse (GdkWindow *window,
 
 void       _gdk_screen_close             (GdkScreen      *screen);
 
-const char *_gdk_get_sm_client_id (void);
-
 /*****************************************
  * Interfaces provided by windowing code *
  *****************************************/
@@ -326,10 +349,6 @@ extern const GOptionEntry _gdk_windowing_args[];
 gchar *_gdk_windowing_substitute_screen_number (const gchar *display_name,
                                                 gint         screen_number);
 
-void     _gdk_windowing_window_get_offsets      (GdkWindow  *window,
-                                                 gint       *x_offset,
-                                                 gint       *y_offset);
-
 void _gdk_windowing_got_event                (GdkDisplay       *display,
                                               GList            *event_link,
                                               GdkEvent         *event,
@@ -397,11 +416,6 @@ void _gdk_display_set_window_under_pointer (GdkDisplay *display,
 
 void _gdk_synthesize_crossing_events_for_geometry_change (GdkWindow *changed_window);
 
-cairo_region_t *_gdk_window_calculate_full_clip_region    (GdkWindow     *window,
-                                                      GdkWindow     *base_window,
-                                                      gboolean       do_children,
-                                                      gint          *base_x_offset,
-                                                      gint          *base_y_offset);
 gboolean    _gdk_window_has_impl (GdkWindow *window);
 GdkWindow * _gdk_window_get_impl_window (GdkWindow *window);
 
@@ -416,7 +430,6 @@ cairo_surface_t * _gdk_offscreen_window_create_surface (GdkWindow *window,
                                                         gint       width,
                                                         gint       height);
 
-
 G_END_DECLS
 
 #endif /* __GDK_INTERNALS_H__ */