]> Pileus Git - ~andy/gtk/blobdiff - gdk/gdkwindowimpl.h
stylecontext: Do invalidation on first resize container
[~andy/gtk] / gdk / gdkwindowimpl.h
index 05e9da43c89138d6131d7c90d1685e51691ba871..65149e8217e0df3f3e90ce20b019b7e825348687 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/>.
  */
 
 /*
 #define __GDK_WINDOW_IMPL_H__
 
 #include <gdk/gdkwindow.h>
+#include <gdk/gdkproperty.h>
 
 G_BEGIN_DECLS
 
 #define GDK_TYPE_WINDOW_IMPL           (gdk_window_impl_get_type ())
-#define GDK_WINDOW_IMPL(obj)           (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_WINDOW_IMPL, GdkWindowImpl))
-#define GDK_IS_WINDOW_IMPL(obj)        (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_WINDOW_IMPL))
-#define GDK_WINDOW_IMPL_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GDK_TYPE_WINDOW_IMPL, GdkWindowImplIface))
+#define GDK_WINDOW_IMPL(object)           (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_WINDOW_IMPL, GdkWindowImpl))
+#define GDK_WINDOW_IMPL_CLASS(klass)      (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_WINDOW_IMPL, GdkWindowImplClass))
+#define GDK_IS_WINDOW_IMPL(object)        (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_WINDOW_IMPL))
+#define GDK_IS_WINDOW_IMPL_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_WINDOW_IMPL))
+#define GDK_WINDOW_IMPL_GET_CLASS(obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_WINDOW_IMPL, GdkWindowImplClass))
 
-typedef struct _GdkWindowImpl       GdkWindowImpl;      /* dummy */
-typedef struct _GdkWindowImplIface  GdkWindowImplIface;
+typedef struct _GdkWindowImpl       GdkWindowImpl;
+typedef struct _GdkWindowImplClass  GdkWindowImplClass;
 
-struct _GdkWindowImplIface
+struct _GdkWindowImpl
 {
-  GTypeInterface g_iface;
+  GObject parent;
+};
+
+struct _GdkWindowImplClass
+{
+  GObjectClass parent_class;
+
+  cairo_surface_t *
+               (* ref_cairo_surface)    (GdkWindow       *window);
 
   void         (* show)                 (GdkWindow       *window,
                                         gboolean         already_mapped);
@@ -81,8 +90,7 @@ struct _GdkWindowImplIface
                                          gint            *x,
                                          gint            *y,
                                          gint            *width,
-                                         gint            *height,
-                                         gint            *depth);
+                                         gint            *height);
   gint         (* get_root_coords)      (GdkWindow       *window,
                                         gint             x,
                                         gint             y,
@@ -94,6 +102,8 @@ struct _GdkWindowImplIface
                                          gint            *y,
                                          GdkModifierType *mask);
 
+  cairo_region_t * (* get_shape)        (GdkWindow       *window);
+  cairo_region_t * (* get_input_shape)  (GdkWindow       *window);
   void         (* shape_combine_region) (GdkWindow       *window,
                                          const cairo_region_t *shape_region,
                                          gint             offset_x,
@@ -129,40 +139,164 @@ struct _GdkWindowImplIface
  *
  * window: The window being destroyed
  * recursing: If TRUE, then this is being called because a parent
- *            was destroyed. This generally means that the call to the windowing system
- *            to destroy the window can be omitted, since it will be destroyed as a result
- *            of the parent being destroyed. Unless @foreign_destroy
- *            
- * foreign_destroy: If TRUE, the window or a parent was destroyed by some external 
- *            agency. The window has already been destroyed and no windowing
- *            system calls should be made. (This may never happen for some
- *            windowing systems.)
+ *     was destroyed. This generally means that the call to the windowing
+ *     system to destroy the window can be omitted, since it will be
+ *     destroyed as a result of the parent being destroyed.
+ *     Unless @foreign_destroy
+ * foreign_destroy: If TRUE, the window or a parent was destroyed by some
+ *     external agency. The window has already been destroyed and no
+ *     windowing system calls should be made. (This may never happen
+ *     for some windowing systems.)
  */
   void         (* destroy)              (GdkWindow       *window,
                                         gboolean         recursing,
                                         gboolean         foreign_destroy);
+
+
+ /* Called when gdk_window_destroy() is called on a foreign window
+  * or an ancestor of the foreign window. It should generally reparent
+  * the window out of it's current heirarchy, hide it, and then
+  * send a message to the owner requesting that the window be destroyed.
+  */
+  void         (*destroy_foreign)       (GdkWindow       *window);
+
+  cairo_surface_t * (* resize_cairo_surface) (GdkWindow       *window,
+                                              cairo_surface_t *surface,
+                                              gint             width,
+                                              gint             height);
+
+  /* optional */
+  gboolean     (* beep)                 (GdkWindow       *window);
+
+  void         (* focus)                (GdkWindow       *window,
+                                        guint32          timestamp);
+  void         (* set_type_hint)        (GdkWindow       *window,
+                                        GdkWindowTypeHint hint);
+  GdkWindowTypeHint (* get_type_hint)   (GdkWindow       *window);
+  void         (* set_modal_hint)       (GdkWindow *window,
+                                        gboolean   modal);
+  void         (* set_skip_taskbar_hint) (GdkWindow *window,
+                                         gboolean   skips_taskbar);
+  void         (* set_skip_pager_hint)  (GdkWindow *window,
+                                        gboolean   skips_pager);
+  void         (* set_urgency_hint)     (GdkWindow *window,
+                                        gboolean   urgent);
+  void         (* set_geometry_hints)   (GdkWindow         *window,
+                                        const GdkGeometry *geometry,
+                                        GdkWindowHints     geom_mask);
+  void         (* set_title)            (GdkWindow   *window,
+                                        const gchar *title);
+  void         (* set_role)             (GdkWindow   *window,
+                                        const gchar *role);
+  void         (* set_startup_id)       (GdkWindow   *window,
+                                        const gchar *startup_id);
+  void         (* set_transient_for)    (GdkWindow *window,
+                                        GdkWindow *parent);
+  void         (* get_root_origin)      (GdkWindow *window,
+                                        gint      *x,
+                                        gint      *y);
+  void         (* get_frame_extents)    (GdkWindow    *window,
+                                        GdkRectangle *rect);
+  void         (* set_override_redirect) (GdkWindow *window,
+                                         gboolean override_redirect);
+  void         (* set_accept_focus)     (GdkWindow *window,
+                                        gboolean accept_focus);
+  void         (* set_focus_on_map)     (GdkWindow *window,
+                                        gboolean focus_on_map);
+  void         (* set_icon_list)        (GdkWindow *window,
+                                        GList     *pixbufs);
+  void         (* set_icon_name)        (GdkWindow   *window,
+                                        const gchar *name);
+  void         (* iconify)              (GdkWindow *window);
+  void         (* deiconify)            (GdkWindow *window);
+  void         (* stick)                (GdkWindow *window);
+  void         (* unstick)              (GdkWindow *window);
+  void         (* maximize)             (GdkWindow *window);
+  void         (* unmaximize)           (GdkWindow *window);
+  void         (* fullscreen)           (GdkWindow *window);
+  void         (* apply_fullscreen_mode) (GdkWindow *window);
+  void         (* unfullscreen)         (GdkWindow *window);
+  void         (* set_keep_above)       (GdkWindow *window,
+                                        gboolean   setting);
+  void         (* set_keep_below)       (GdkWindow *window,
+                                        gboolean   setting);
+  GdkWindow *  (* get_group)            (GdkWindow *window);
+  void         (* set_group)            (GdkWindow *window,
+                                        GdkWindow *leader);
+  void         (* set_decorations)      (GdkWindow      *window,
+                                        GdkWMDecoration decorations);
+  gboolean     (* get_decorations)      (GdkWindow       *window,
+                                        GdkWMDecoration *decorations);
+  void         (* set_functions)        (GdkWindow    *window,
+                                        GdkWMFunction functions);
+  void         (* begin_resize_drag)    (GdkWindow     *window,
+                                         GdkWindowEdge  edge,
+                                         GdkDevice     *device,
+                                         gint           button,
+                                         gint           root_x,
+                                         gint           root_y,
+                                         guint32        timestamp);
+  void         (* begin_move_drag)      (GdkWindow *window,
+                                         GdkDevice     *device,
+                                         gint       button,
+                                         gint       root_x,
+                                         gint       root_y,
+                                         guint32    timestamp);
+  void         (* enable_synchronized_configure) (GdkWindow *window);
+  void         (* configure_finished)   (GdkWindow *window);
+  void         (* set_opacity)          (GdkWindow *window,
+                                        gdouble    opacity);
+  void         (* set_composited)       (GdkWindow *window,
+                                         gboolean   composited);
+  void         (* destroy_notify)       (GdkWindow *window);
+  GdkDragProtocol (* get_drag_protocol) (GdkWindow *window,
+                                         GdkWindow **target);
+  void         (* register_dnd)         (GdkWindow *window);
+  GdkDragContext * (*drag_begin)        (GdkWindow *window,
+                                         GdkDevice *device,
+                                         GList     *targets);
+
+  void         (*process_updates_recurse) (GdkWindow      *window,
+                                           cairo_region_t *region);
+
+  void         (*sync_rendering)          (GdkWindow      *window);
+  gboolean     (*simulate_key)            (GdkWindow      *window,
+                                           gint            x,
+                                           gint            y,
+                                           guint           keyval,
+                                           GdkModifierType modifiers,
+                                           GdkEventType    event_type);
+  gboolean     (*simulate_button)         (GdkWindow      *window,
+                                           gint            x,
+                                           gint            y,
+                                           guint           button,
+                                           GdkModifierType modifiers,
+                                           GdkEventType    event_type);
+
+  gboolean     (*get_property)            (GdkWindow      *window,
+                                           GdkAtom         property,
+                                           GdkAtom         type,
+                                           gulong          offset,
+                                           gulong          length,
+                                           gint            pdelete,
+                                           GdkAtom        *actual_type,
+                                           gint           *actual_format,
+                                           gint           *actual_length,
+                                           guchar        **data);
+  void         (*change_property)         (GdkWindow      *window,
+                                           GdkAtom         property,
+                                           GdkAtom         type,
+                                           gint            format,
+                                           GdkPropMode     mode,
+                                           const guchar   *data,
+                                           gint            n_elements);
+  void         (*delete_property)         (GdkWindow      *window,
+                                           GdkAtom         property);
 };
 
 /* Interface Functions */
 GType gdk_window_impl_get_type (void) G_GNUC_CONST;
 
-/* private definitions from gdkwindow.h */
-
-struct _GdkWindowRedirect
-{
-  GdkWindowObject *redirected;
-  GdkDrawable *pixmap;
-
-  gint src_x;
-  gint src_y;
-  gint dest_x;
-  gint dest_y;
-  gint width;
-  gint height;
-
-  cairo_region_t *damage;
-  guint damage_idle;
-};
 
 G_END_DECLS