]> Pileus Git - ~andy/gtk/blobdiff - gdk/gdkinternals.h
Bug #497218. Emit "active-descendant-changed" when focus first comes into
[~andy/gtk] / gdk / gdkinternals.h
index 6f4c5394243862a6546d2952b813263065a45231..aa56b795a5afcca45ae7324406e5eed713fee737 100644 (file)
@@ -26,6 +26,7 @@
 
 /* Uninstalled header defining types and functions internal to GDK */
 
+#include <gio/gio.h>
 #include <gdk/gdktypes.h>
 #include <gdk/gdkwindow.h>
 #include <gdk/gdkprivate.h>
@@ -33,6 +34,8 @@
 #ifndef __GDK_INTERNALS_H__
 #define __GDK_INTERNALS_H__
 
+G_BEGIN_DECLS
+
 /**********************
  * General Facilities * 
  **********************/
@@ -78,7 +81,8 @@ typedef enum {
   GDK_DEBUG_INPUT        = 1 <<10,
   GDK_DEBUG_CURSOR       = 1 <<11,
   GDK_DEBUG_MULTIHEAD    = 1 <<12,
-  GDK_DEBUG_XINERAMA     = 1 <<13
+  GDK_DEBUG_XINERAMA     = 1 <<13,
+  GDK_DEBUG_DRAW         = 1 <<14
 } GdkDebugFlag;
 
 #ifndef GDK_DISABLE_DEPRECATED
@@ -210,10 +214,18 @@ GdkImage *_gdk_drawable_copy_to_image (GdkDrawable  *drawable,
                                       gint          width,
                                       gint          height);
 
+cairo_surface_t *_gdk_drawable_ref_cairo_surface (GdkDrawable *drawable);
+
 /* GC caching */
 GdkGC *_gdk_drawable_get_scratch_gc (GdkDrawable *drawable,
                                     gboolean     graphics_exposures);
 
+void _gdk_gc_update_context (GdkGC     *gc,
+                            cairo_t   *cr,
+                            GdkColor  *override_foreground,
+                            GdkBitmap *override_stipple,
+                            gboolean   gc_changed);
+
 /*************************************
  * Interfaces used by windowing code *
  *************************************/
@@ -226,6 +238,18 @@ void       _gdk_screen_close             (GdkScreen   *screen);
 
 const char *_gdk_get_sm_client_id (void);
 
+void _gdk_gc_init (GdkGC           *gc,
+                  GdkDrawable     *drawable,
+                  GdkGCValues     *values,
+                  GdkGCValuesMask  values_mask);
+
+GdkRegion *_gdk_gc_get_clip_region (GdkGC *gc);
+GdkFill    _gdk_gc_get_fill        (GdkGC *gc);
+GdkPixmap *_gdk_gc_get_tile        (GdkGC *gc);
+GdkBitmap *_gdk_gc_get_stipple     (GdkGC *gc);
+guint32    _gdk_gc_get_fg_pixel    (GdkGC *gc);
+guint32    _gdk_gc_get_bg_pixel    (GdkGC *gc);
+
 /*****************************************
  * Interfaces provided by windowing code *
  *****************************************/
@@ -238,9 +262,9 @@ void _gdk_colormap_real_destroy (GdkColormap *colormap);
 
 void _gdk_cursor_destroy (GdkCursor *cursor);
 
-extern GdkArgDesc _gdk_windowing_args[];
-void     _gdk_windowing_init                    (gint       *argc,
-                                                 gchar    ***argv);
+void     _gdk_windowing_init                    (void);
+
+extern const GOptionEntry _gdk_windowing_args[];
 void     _gdk_windowing_set_default_display     (GdkDisplay *display);
 
 gchar *_gdk_windowing_substitute_screen_number (const gchar *display_name,
@@ -306,13 +330,103 @@ void _gdk_windowing_window_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 _gdk_windowing_window_destroy_foreign (GdkWindow *window);
+
 void _gdk_windowing_display_set_sm_client_id (GdkDisplay  *display,
                                              const gchar *sm_client_id);
 
+void _gdk_windowing_window_set_composited (GdkWindow *window,
+                                          gboolean composited);
+
+#define GDK_TYPE_PAINTABLE            (_gdk_paintable_get_type ())
+#define GDK_PAINTABLE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_PAINTABLE, GdkPaintable))
+#define GDK_IS_PAINTABLE(obj)        (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_PAINTABLE))
+#define GDK_PAINTABLE_GET_IFACE(obj)  (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GDK_TYPE_PAINTABLE, GdkPaintableIface))
+
+typedef struct _GdkPaintable        GdkPaintable;
+typedef struct _GdkPaintableIface   GdkPaintableIface;
+
+struct _GdkPaintableIface
+{
+  GTypeInterface g_iface;
+  
+  void (* begin_paint_region) (GdkPaintable *paintable,
+                              GdkRegion    *region);
+  void (* end_paint)          (GdkPaintable *paintable);
+
+  void (* invalidate_maybe_recurse) (GdkPaintable *paintable,
+                                    GdkRegion    *region,
+                                    gboolean    (*child_func) (GdkWindow *, gpointer),
+                                    gpointer      user_data);
+  void (* process_updates)          (GdkPaintable *paintable,
+                                    gboolean      update_children);
+};
+
+GType _gdk_paintable_get_type (void) G_GNUC_CONST;
+
 /* Implementation types */
 GType _gdk_window_impl_get_type (void) G_GNUC_CONST;
 GType _gdk_pixmap_impl_get_type (void) G_GNUC_CONST;
 
+
+/**
+ * _gdk_windowing_gc_set_clip_region:
+ * @gc: a #GdkGC
+ * @region: the new clip region
+ * 
+ * Do any window-system specific processing necessary
+ * for a change in clip region. Since the clip origin
+ * will likely change before the GC is used with the
+ * new clip, frequently this function will only set a flag and
+ * do the real processing later.
+ *
+ * When this function is called, _gdk_gc_get_clip_region
+ * will already return the new region.
+ **/
+void _gdk_windowing_gc_set_clip_region (GdkGC     *gc,
+                                       GdkRegion *region);
+
+/**
+ * _gdk_windowing_gc_copy:
+ * @dst_gc: a #GdkGC from the GDK backend
+ * @src_gc: a #GdkGC from the GDK backend
+ * 
+ * Copies backend specific state from @src_gc to @dst_gc.
+ * This is called before the generic state is copied, so
+ * the old generic state is still available from @dst_gc
+ **/
+void _gdk_windowing_gc_copy (GdkGC *dst_gc,
+                            GdkGC *src_gc);
+     
+/* Queries the current foreground color of a GdkGC */
+void _gdk_windowing_gc_get_foreground (GdkGC    *gc,
+                                      GdkColor *color);
+/* Queries the current background color of a GdkGC */
+void _gdk_windowing_gc_get_background (GdkGC    *gc,
+                                      GdkColor *color);
+
+struct GdkAppLaunchContextPrivate
+{
+  GdkDisplay *display;
+  GdkScreen *screen;
+  gint workspace;
+  guint32 timestamp;
+  GIcon *icon;
+  char *icon_name;
+};
+
+char *_gdk_windowing_get_startup_notify_id (GAppLaunchContext *context,
+                                           GAppInfo          *info, 
+                                           GList             *files);
+void  _gdk_windowing_launch_failed         (GAppLaunchContext *context, 
+                                           const char        *startup_notify_id);
+
+
 /************************************
  * Initialization and exit routines *
  ************************************/
@@ -320,11 +434,6 @@ GType _gdk_pixmap_impl_get_type (void) G_GNUC_CONST;
 void _gdk_image_exit  (void);
 void _gdk_windowing_exit (void);
 
-void _gdk_get_command_line_args (int    *argc,
-                                char ***argv);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
+G_END_DECLS
 
 #endif /* __GDK_INTERNALS_H__ */