[gtk+] API: remove GdkGC
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] API: remove GdkGC
- Date: Tue, 10 Aug 2010 19:17:49 +0000 (UTC)
commit 6a48a042c7a2f61707eeb1f7bfa6438f63be7c04
Author: Benjamin Otte <otte redhat com>
Date: Thu Jul 22 03:55:27 2010 +0200
API: remove GdkGC
XXX: Some traces in the win32 code are left. I suppose they'd best be
replaced using Cairo.
docs/reference/gdk/gdk-docs.sgml | 1 -
docs/reference/gdk/gdk3-sections.txt | 71 --
docs/reference/gdk/gdk3.types | 1 -
docs/reference/gdk/tmpl/gcs.sgml | 426 ----------
docs/reference/gdk/tmpl/x_interaction.sgml | 45 -
gdk/Makefile.am | 3 -
gdk/directfb/Makefile.am | 1 -
gdk/directfb/gdkgc-directfb.c | 386 ---------
gdk/directfb/gdkprivate-directfb.h | 25 -
gdk/gdk.h | 1 -
gdk/gdk.symbols | 42 -
gdk/gdkdraw.c | 5 +-
gdk/gdkdrawable.h | 5 -
gdk/gdkgc.c | 1244 ----------------------------
gdk/gdkgc.h | 288 -------
gdk/gdkinternals.h | 64 --
gdk/gdkoffscreenwindow.c | 13 -
gdk/gdkpixmap.c | 15 -
gdk/gdktypes.h | 1 -
gdk/gdkwindow.c | 116 ---
gdk/quartz/Makefile.am | 1 -
gdk/quartz/gdkgc-quartz.c | 686 ---------------
gdk/quartz/gdkprivate-quartz.h | 49 --
gdk/win32/Makefile.am | 1 -
gdk/win32/gdkdrawable-win32.c | 87 --
gdk/win32/gdkgc-win32.c | 1102 ------------------------
gdk/win32/gdkprivate-win32.h | 55 --
gdk/x11/Makefile.am | 1 -
gdk/x11/gdkdrawable-x11.c | 2 -
gdk/x11/gdkgc-x11.c | 697 ----------------
gdk/x11/gdkprivate-x11.h | 34 -
gdk/x11/gdkx.h | 7 -
32 files changed, 1 insertions(+), 5474 deletions(-)
---
diff --git a/docs/reference/gdk/gdk-docs.sgml b/docs/reference/gdk/gdk-docs.sgml
index 765223f..dff298c 100644
--- a/docs/reference/gdk/gdk-docs.sgml
+++ b/docs/reference/gdk/gdk-docs.sgml
@@ -24,7 +24,6 @@
<xi:include href="xml/gdkscreen.xml" />
<xi:include href="xml/regions.xml" />
- <xi:include href="xml/gcs.xml" />
<xi:include href="xml/drawing.xml" />
<xi:include href="xml/pixmaps.xml" />
diff --git a/docs/reference/gdk/gdk3-sections.txt b/docs/reference/gdk/gdk3-sections.txt
index a283a9f..ccec2bc 100644
--- a/docs/reference/gdk/gdk3-sections.txt
+++ b/docs/reference/gdk/gdk3-sections.txt
@@ -71,18 +71,12 @@ gdk_drag_protocol_get_type
gdk_event_mask_get_type
gdk_event_type_get_type
gdk_extension_mode_get_type
-gdk_fill_get_type
-gdk_fill_rule_get_type
gdk_filter_return_get_type
-gdk_function_get_type
-gdk_gc_values_mask_get_type
gdk_grab_ownership_get_type
gdk_grab_status_get_type
gdk_gravity_get_type
gdk_input_mode_get_type
gdk_input_source_get_type
-gdk_join_style_get_type
-gdk_line_style_get_type
gdk_modifier_type_get_type
gdk_notify_type_get_type
gdk_overlap_type_get_type
@@ -346,69 +340,6 @@ GdkDrawableClass
</SECTION>
<SECTION>
-<TITLE>Graphics Contexts</TITLE>
-<FILE>gcs</FILE>
-GdkGC
-GdkGCValues
-GdkGCValuesMask
-
-GdkFunction
-
-gdk_gc_new
-gdk_gc_new_with_values
-gdk_gc_get_screen
-gdk_gc_set_values
-gdk_gc_get_values
-gdk_gc_set_foreground
-gdk_gc_set_background
-gdk_gc_set_rgb_fg_color
-gdk_gc_set_rgb_bg_color
-gdk_gc_set_function
-gdk_gc_set_fill
-GdkFill
-gdk_gc_set_tile
-gdk_gc_set_stipple
-gdk_gc_set_ts_origin
-gdk_gc_set_clip_origin
-gdk_gc_set_clip_mask
-gdk_gc_set_clip_rectangle
-gdk_gc_set_clip_region
-gdk_gc_set_subwindow
-GdkSubwindowMode
-gdk_gc_set_exposures
-gdk_gc_set_line_attributes
-GdkLineStyle
-GdkCapStyle
-GdkJoinStyle
-gdk_gc_set_dashes
-gdk_gc_copy
-gdk_gc_set_colormap
-gdk_gc_get_colormap
-
-gdk_gc_offset
-
-<SUBSECTION Standard>
-GDK_GC
-GDK_TYPE_GC
-GDK_IS_GC
-GDK_GC_CLASS
-GDK_GC_GET_CLASS
-GDK_IS_GC_CLASS
-GDK_TYPE_CAP_STYLE
-GDK_TYPE_FILL
-GDK_TYPE_FILL_RULE
-GDK_TYPE_FUNCTION
-GDK_TYPE_GC_VALUES_MASK
-GDK_TYPE_JOIN_STYLE
-GDK_TYPE_LINE_STYLE
-GDK_TYPE_SUBWINDOW_MODE
-
-<SUBSECTION Private>
-GdkGCClass
-gdk_gc_get_type
-</SECTION>
-
-<SECTION>
<TITLE>Visuals</TITLE>
<FILE>visuals</FILE>
GdkVisual
@@ -1137,8 +1068,6 @@ gdk_x11_display_set_cursor_theme
gdk_x11_register_standard_event_type
gdk_x11_drawable_get_xdisplay
gdk_x11_drawable_get_xid
-gdk_x11_gc_get_xdisplay
-gdk_x11_gc_get_xgc
gdk_x11_get_default_root_xwindow
gdk_x11_get_default_screen
gdk_x11_get_default_xdisplay
diff --git a/docs/reference/gdk/gdk3.types b/docs/reference/gdk/gdk3.types
index 1e12976..90678f9 100644
--- a/docs/reference/gdk/gdk3.types
+++ b/docs/reference/gdk/gdk3.types
@@ -6,7 +6,6 @@ gdk_screen_get_type
gdk_drawable_get_type
gdk_window_object_get_type
gdk_pixmap_get_type
-gdk_gc_get_type
gdk_keymap_get_type
gdk_device_get_type
gdk_device_manager_get_type
diff --git a/docs/reference/gdk/tmpl/x_interaction.sgml b/docs/reference/gdk/tmpl/x_interaction.sgml
index 28aae1f..43fcc5a 100644
--- a/docs/reference/gdk/tmpl/x_interaction.sgml
+++ b/docs/reference/gdk/tmpl/x_interaction.sgml
@@ -97,15 +97,6 @@ Returns the X resource (window or pixmap) belonging to a #GdkDrawable.
@Returns: the ID of @win's X resource.
-<!-- ##### MACRO GDK_GC_XDISPLAY ##### -->
-<para>
-Returns the display of a #GdkGC.
-</para>
-
- gc: a #GdkGC.
- Returns: an Xlib <type>Display*</type>.
-
-
<!-- ##### MACRO GDK_COLORMAP_XDISPLAY ##### -->
<para>
Returns the display of a #GdkColormap.
@@ -179,24 +170,6 @@ Returns the display of a #GdkCursor.
@Returns: an Xlib <type>Display*</type>.
-<!-- ##### MACRO GDK_GC_XGC ##### -->
-<para>
-Returns the X GC of a #GdkGC.
-</para>
-
- gc: a #GdkGC.
- Returns: an Xlib <type>GC</type>.
-
-
-<!-- ##### MACRO GDK_GC_GET_XGC ##### -->
-<para>
-Returns the X GC of a #GdkGC.
-</para>
-
- gc: a #GdkGC.
- Returns: an Xlib <type>GC</type>.
-
-
<!-- ##### MACRO GDK_WINDOW_XWINDOW ##### -->
<para>
Another name for GDK_DRAWABLE_XID().
@@ -539,24 +512,6 @@ Another name for GDK_DRAWABLE_XID().
@Returns:
-<!-- ##### FUNCTION gdk_x11_gc_get_xdisplay ##### -->
-<para>
-
-</para>
-
- gc:
- Returns:
-
-
-<!-- ##### FUNCTION gdk_x11_gc_get_xgc ##### -->
-<para>
-
-</para>
-
- gc:
- Returns:
-
-
<!-- ##### FUNCTION gdk_x11_get_default_root_xwindow ##### -->
<para>
diff --git a/gdk/Makefile.am b/gdk/Makefile.am
index b63f502..020f99f 100644
--- a/gdk/Makefile.am
+++ b/gdk/Makefile.am
@@ -81,7 +81,6 @@ gdk_public_h_sources = \
gdkdnd.h \
gdkdrawable.h \
gdkevents.h \
- gdkgc.h \
gdkinput.h \
gdkkeys.h \
gdkkeysyms.h \
@@ -121,7 +120,6 @@ gdk_c_sources = \
gdkdnd.c \
gdkdraw.c \
gdkevents.c \
- gdkgc.c \
gdkglobals.c \
gdkkeys.c \
gdkkeyuni.c \
@@ -209,7 +207,6 @@ x11_introspection_files = \
x11/gdkdrawable-x11.c \
x11/gdkeventsource.c \
x11/gdkeventtranslator.c \
- x11/gdkgc-x11.c \
x11/gdkgeometry-x11.c \
x11/gdkglobals-x11.c \
x11/gdkim-x11.c \
diff --git a/gdk/directfb/Makefile.am b/gdk/directfb/Makefile.am
index a11f9de..bfc4771 100644
--- a/gdk/directfb/Makefile.am
+++ b/gdk/directfb/Makefile.am
@@ -27,7 +27,6 @@ libgdk_directfb_la_SOURCES = \
gdkdisplay-directfb.h \
gdkdrawable-directfb.c \
gdkevents-directfb.c \
- gdkgc-directfb.c \
gdkgeometry-directfb.c \
gdkglobals-directfb.c \
gdkim-directfb.c \
diff --git a/gdk/directfb/gdkprivate-directfb.h b/gdk/directfb/gdkprivate-directfb.h
index 9929998..bc35125 100644
--- a/gdk/directfb/gdkprivate-directfb.h
+++ b/gdk/directfb/gdkprivate-directfb.h
@@ -198,31 +198,6 @@ typedef struct
DFBSurfacePixelFormat format;
} GdkVisualDirectFB;
-#define GDK_TYPE_GC_DIRECTFB (_gdk_gc_directfb_get_type ())
-#define GDK_GC_DIRECTFB(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_GC_DIRECTFB, GdkGCDirectFB))
-#define GDK_IS_GC_DIRECTFB(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_GC_DIRECTFB))
-
-typedef struct
-{
- GdkGC parent_instance;
-
- cairo_region_t clip_region;
-
- GdkGCValuesMask values_mask;
- GdkGCValues values;
-} GdkGCDirectFB;
-
-typedef struct
-{
- GdkGCClass parent_class;
-} GdkGCDirectFBClass;
-
-GType _gdk_gc_directfb_get_type (void);
-
-GdkGC * _gdk_directfb_gc_new (GdkDrawable *drawable,
- GdkGCValues *values,
- GdkGCValuesMask values_mask);
-
void gdk_directfb_event_windows_add (GdkWindow *window);
void gdk_directfb_event_windows_remove (GdkWindow *window);
diff --git a/gdk/gdk.h b/gdk/gdk.h
index 4ff1e15..d3a0ea8 100644
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -41,7 +41,6 @@
#include <gdk/gdkdrawable.h>
#include <gdk/gdkenumtypes.h>
#include <gdk/gdkevents.h>
-#include <gdk/gdkgc.h>
#include <gdk/gdkinput.h>
#include <gdk/gdkkeys.h>
#include <gdk/gdkpango.h>
diff --git a/gdk/gdk.symbols b/gdk/gdk.symbols
index def0a44..b52bfd3 100644
--- a/gdk/gdk.symbols
+++ b/gdk/gdk.symbols
@@ -250,20 +250,16 @@ gdk_input_source_get_type G_GNUC_CONST
gdk_input_mode_get_type G_GNUC_CONST
gdk_axis_use_get_type G_GNUC_CONST
gdk_byte_order_get_type G_GNUC_CONST
-gdk_cap_style_get_type G_GNUC_CONST
gdk_crossing_mode_get_type G_GNUC_CONST
gdk_device_type_get_type G_GNUC_CONST
gdk_extension_mode_get_type G_GNUC_CONST
gdk_event_mask_get_type G_GNUC_CONST
gdk_event_type_get_type G_GNUC_CONST
-gdk_fill_get_type G_GNUC_CONST
gdk_filter_return_get_type G_GNUC_CONST
gdk_function_get_type G_GNUC_CONST
gdk_grab_ownership_get_type G_GNUC_CONST
gdk_grab_status_get_type G_GNUC_CONST
gdk_gravity_get_type G_GNUC_CONST
-gdk_join_style_get_type G_GNUC_CONST
-gdk_line_style_get_type G_GNUC_CONST
gdk_modifier_type_get_type G_GNUC_CONST
gdk_notify_type_get_type G_GNUC_CONST
gdk_owner_change_get_type G_GNUC_CONST
@@ -278,7 +274,6 @@ gdk_wm_decoration_get_type G_GNUC_CONST
gdk_wm_function_get_type G_GNUC_CONST
gdk_cursor_type_get_type G_GNUC_CONST
gdk_drag_action_get_type G_GNUC_CONST
-gdk_gc_values_mask_get_type G_GNUC_CONST
gdk_window_attributes_type_get_type G_GNUC_CONST
gdk_window_class_get_type G_GNUC_CONST
gdk_window_edge_get_type G_GNUC_CONST
@@ -552,43 +547,6 @@ gdk_drawable_set_colormap
#endif
#endif
-#if IN_HEADER(__GDK_GC_H__)
-#if IN_FILE(__GDK_GC_C__)
-gdk_gc_new
-gdk_gc_get_type G_GNUC_CONST
-gdk_gc_new_with_values
-gdk_gc_get_values
-gdk_gc_set_values
-gdk_gc_set_foreground
-gdk_gc_set_background
-gdk_gc_set_function
-gdk_gc_set_fill
-gdk_gc_set_tile
-gdk_gc_set_stipple
-gdk_gc_set_ts_origin
-gdk_gc_set_clip_origin
-gdk_gc_set_clip_mask
-gdk_gc_set_clip_rectangle
-gdk_gc_set_clip_region
-gdk_gc_set_subwindow
-gdk_gc_set_exposures
-gdk_gc_set_line_attributes
-gdk_gc_set_dashes
-gdk_gc_offset
-gdk_gc_copy
-gdk_gc_get_colormap
-gdk_gc_set_colormap
-gdk_gc_set_rgb_bg_color
-gdk_gc_set_rgb_fg_color
-#endif
-#endif
-
-#if IN_HEADER(__GDK_GC_H__)
-#if IN_FILE(__GDK_GC_X11_C__)
-gdk_gc_get_screen
-#endif
-#endif
-
#if IN_HEADER(__GDK_PIXMAP_X11_H__)
#if IN_FILE(__GDK_PIXMAP_X11_C__)
#ifdef GDK_WINDOWING_X11
diff --git a/gdk/gdkdraw.c b/gdk/gdkdraw.c
index b7d5bee..1d88cc2 100644
--- a/gdk/gdkdraw.c
+++ b/gdk/gdkdraw.c
@@ -160,10 +160,7 @@ gdk_drawable_get_display (GdkDrawable *drawable)
* use this function if the drawable-creating function did not have a
* way to determine the colormap, and you then use drawable operations
* that require a colormap. The colormap for all drawables and
- * graphics contexts you intend to use together should match. i.e.
- * when using a #GdkGC to draw to a drawable, or copying one drawable
- * to another, the colormaps should match.
- *
+ * graphics contexts you intend to use together should match.
**/
void
gdk_drawable_set_colormap (GdkDrawable *drawable,
diff --git a/gdk/gdkdrawable.h b/gdk/gdkdrawable.h
index 266eaf8..1e0c357 100644
--- a/gdk/gdkdrawable.h
+++ b/gdk/gdkdrawable.h
@@ -32,7 +32,6 @@
#define __GDK_DRAWABLE_H__
#include <gdk/gdktypes.h>
-#include <gdk/gdkgc.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <cairo.h>
@@ -57,10 +56,6 @@ struct _GdkDrawableClass
{
GObjectClass parent_class;
- GdkGC *(*create_gc) (GdkDrawable *drawable,
- GdkGCValues *values,
- GdkGCValuesMask mask);
-
gint (*get_depth) (GdkDrawable *drawable);
void (*get_size) (GdkDrawable *drawable,
gint *width,
diff --git a/gdk/gdkinternals.h b/gdk/gdkinternals.h
index cfe0fb2..cc4b66f 100644
--- a/gdk/gdkinternals.h
+++ b/gdk/gdkinternals.h
@@ -364,31 +364,6 @@ 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);
-
-cairo_region_t *_gdk_gc_get_clip_region (GdkGC *gc);
-GdkBitmap *_gdk_gc_get_clip_mask (GdkGC *gc);
-gboolean _gdk_gc_get_exposures (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);
-void _gdk_gc_add_drawable_clip (GdkGC *gc,
- guint32 region_tag,
- cairo_region_t *region,
- int offset_x,
- int offset_y);
-void _gdk_gc_remove_drawable_clip (GdkGC *gc);
-void _gdk_gc_set_clip_region_internal (GdkGC *gc,
- cairo_region_t *region,
- gboolean reset_origin);
-GdkSubwindowMode _gdk_gc_get_subwindow (GdkGC *gc);
-
-
/*****************************************
* Interfaces provided by windowing code *
*****************************************/
@@ -492,45 +467,6 @@ GType _gdk_paintable_get_type (void) G_GNUC_CONST;
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
- * @reset_origin: if TRUE, reset the clip_x/y_origin values to 0
- *
- * 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,
- const cairo_region_t *region,
- gboolean reset_origin);
-
-/**
- * _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;
diff --git a/gdk/gdkoffscreenwindow.c b/gdk/gdkoffscreenwindow.c
index b6148e5..257abea 100644
--- a/gdk/gdkoffscreenwindow.c
+++ b/gdk/gdkoffscreenwindow.c
@@ -34,7 +34,6 @@
#include "gdkdrawable.h"
#include "gdktypes.h"
#include "gdkscreen.h"
-#include "gdkgc.h"
#include "gdkcolor.h"
#include "gdkcursor.h"
@@ -141,16 +140,6 @@ is_parent_of (GdkWindow *parent,
return FALSE;
}
-static GdkGC *
-gdk_offscreen_window_create_gc (GdkDrawable *drawable,
- GdkGCValues *values,
- GdkGCValuesMask values_mask)
-{
- GdkOffscreenWindow *offscreen = GDK_OFFSCREEN_WINDOW (drawable);
-
- return gdk_gc_new_with_values (offscreen->pixmap, values, values_mask);
-}
-
static cairo_surface_t *
gdk_offscreen_window_ref_cairo_surface (GdkDrawable *drawable)
{
@@ -542,7 +531,6 @@ gdk_offscreen_window_move_resize_internal (GdkWindow *window,
GdkWindowObject *private = (GdkWindowObject *)window;
GdkOffscreenWindow *offscreen;
gint dx, dy, dw, dh;
- GdkGC *gc;
GdkPixmap *old_pixmap;
offscreen = GDK_OFFSCREEN_WINDOW (private->impl);
@@ -899,7 +887,6 @@ gdk_offscreen_window_class_init (GdkOffscreenWindowClass *klass)
object_class->finalize = gdk_offscreen_window_finalize;
- drawable_class->create_gc = gdk_offscreen_window_create_gc;
drawable_class->ref_cairo_surface = gdk_offscreen_window_ref_cairo_surface;
drawable_class->set_colormap = gdk_offscreen_window_set_colormap;
drawable_class->get_colormap = gdk_offscreen_window_get_colormap;
diff --git a/gdk/gdkpixmap.c b/gdk/gdkpixmap.c
index c5e71c4..67035ad 100644
--- a/gdk/gdkpixmap.c
+++ b/gdk/gdkpixmap.c
@@ -31,10 +31,6 @@
#include "gdkscreen.h"
-static GdkGC *gdk_pixmap_create_gc (GdkDrawable *drawable,
- GdkGCValues *values,
- GdkGCValuesMask mask);
-
static void gdk_pixmap_real_get_size (GdkDrawable *drawable,
gint *width,
gint *height);
@@ -91,7 +87,6 @@ gdk_pixmap_class_init (GdkPixmapObjectClass *klass)
object_class->finalize = gdk_pixmap_finalize;
- drawable_class->create_gc = gdk_pixmap_create_gc;
drawable_class->get_depth = gdk_pixmap_real_get_depth;
drawable_class->get_screen = gdk_pixmap_real_get_screen;
drawable_class->get_size = gdk_pixmap_real_get_size;
@@ -160,16 +155,6 @@ gdk_pixmap_create_from_data (GdkDrawable *drawable,
depth, fg,bg);
}
-
-static GdkGC *
-gdk_pixmap_create_gc (GdkDrawable *drawable,
- GdkGCValues *values,
- GdkGCValuesMask mask)
-{
- return gdk_gc_new_with_values (((GdkPixmapObject *) drawable)->impl,
- values, mask);
-}
-
static void
gdk_pixmap_real_get_size (GdkDrawable *drawable,
gint *width,
diff --git a/gdk/gdktypes.h b/gdk/gdktypes.h
index b86cecc..8630d7d 100644
--- a/gdk/gdktypes.h
+++ b/gdk/gdktypes.h
@@ -102,7 +102,6 @@ typedef guint32 GdkNativeWindow;
typedef struct _GdkColor GdkColor;
typedef struct _GdkColormap GdkColormap;
typedef struct _GdkCursor GdkCursor;
-typedef struct _GdkGC GdkGC;
typedef struct _GdkVisual GdkVisual;
typedef struct _GdkDrawable GdkDrawable;
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 73feaa5..387ab8c 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -175,13 +175,6 @@
* we reuse the pixmap from the implicit paint. During repaint we create and at the
* end flush an implicit paint, which means we can collect all the paints on
* multiple client side windows in the same backing store pixmap.
- *
- * All drawing to windows are wrapped with macros that set up the GC such that
- * the offsets and clip region is right for drawing to the paint object or
- * directly to the emulated window. It also automatically handles any flushing
- * needed when drawing directly to a window. Adding window/paint clipping is
- * done using _gdk_gc_add_drawable_clip which lets us efficiently add and then
- * remove a custom clip region.
*/
#define USE_BACKING_STORE /* Appears to work on Win32, too, now. */
@@ -226,10 +219,6 @@ typedef struct {
/* Global info */
-static GdkGC *gdk_window_create_gc (GdkDrawable *drawable,
- GdkGCValues *values,
- GdkGCValuesMask mask);
-
static cairo_surface_t *gdk_window_ref_cairo_surface (GdkDrawable *drawable);
static cairo_surface_t *gdk_window_create_cairo_surface (GdkDrawable *drawable,
int width,
@@ -406,7 +395,6 @@ gdk_window_class_init (GdkWindowObjectClass *klass)
object_class->set_property = gdk_window_set_property;
object_class->get_property = gdk_window_get_property;
- drawable_class->create_gc = gdk_window_create_gc;
drawable_class->get_depth = gdk_window_real_get_depth;
drawable_class->get_screen = gdk_window_real_get_screen;
drawable_class->get_size = gdk_window_real_get_size;
@@ -3609,110 +3597,6 @@ gdk_window_get_internal_paint_info (GdkWindow *window,
}
static GdkDrawable *
-start_draw_helper (GdkDrawable *drawable,
- GdkGC *gc,
- gint *x_offset_out,
- gint *y_offset_out)
-{
- GdkWindowObject *private = (GdkWindowObject *)drawable;
- gint x_offset, y_offset;
- GdkDrawable *impl;
- gint old_clip_x = gc->clip_x_origin;
- gint old_clip_y = gc->clip_y_origin;
- cairo_region_t *clip;
- guint32 clip_region_tag;
- GdkWindowPaint *paint;
-
- paint = NULL;
- if (private->paint_stack)
- paint = private->paint_stack->data;
-
- if (paint)
- {
- x_offset = paint->x_offset;
- y_offset = paint->y_offset;
- }
- else
- {
- x_offset = -private->abs_x;
- y_offset = -private->abs_y;
- }
-
- if (x_offset != 0 || y_offset != 0)
- {
- gdk_gc_set_clip_origin (gc,
- old_clip_x - x_offset,
- old_clip_y - y_offset);
- gdk_gc_set_ts_origin (gc,
- gc->ts_x_origin - x_offset,
- gc->ts_y_origin - y_offset);
- }
-
- *x_offset_out = x_offset;
- *y_offset_out = y_offset;
-
- /* Add client side window clip region to gc */
- clip = NULL;
- if (paint)
- {
- /* Only need clipping if using implicit paint, otherwise
- the pixmap is clipped when copying to the window in end_paint */
- if (paint->uses_implicit)
- {
- /* This includes the window clip */
- clip = paint->region;
- }
- clip_region_tag = paint->region_tag;
-
- /* After having set up the drawable clip rect on a GC we need to make sure
- * that we draw to th the impl, otherwise the pixmap code will reset the
- * drawable clip. */
- impl = ((GdkPixmapObject *)(paint->pixmap))->impl;
- }
- else
- {
- /* Drawing directly to the window, flush anything outstanding to
- guarantee ordering. */
- gdk_window_flush ((GdkWindow *)drawable);
-
- /* Don't clip when drawing to root or all native */
- if (!_gdk_native_windows && private->window_type != GDK_WINDOW_ROOT)
- {
- if (_gdk_gc_get_subwindow (gc) == GDK_CLIP_BY_CHILDREN)
- clip = private->clip_region_with_children;
- else
- clip = private->clip_region;
- }
- clip_region_tag = private->clip_tag;
- impl = private->impl;
- }
-
- if (clip)
- _gdk_gc_add_drawable_clip (gc,
- clip_region_tag, clip,
- /* If there was a clip origin set appart from the
- * window offset, need to take that into
- * consideration */
- -old_clip_x, -old_clip_y);
-
- return impl;
-}
-
-static GdkGC *
-gdk_window_create_gc (GdkDrawable *drawable,
- GdkGCValues *values,
- GdkGCValuesMask mask)
-{
- g_return_val_if_fail (GDK_IS_WINDOW (drawable), NULL);
-
- if (GDK_WINDOW_DESTROYED (drawable))
- return NULL;
-
- return gdk_gc_new_with_values (((GdkWindowObject *) drawable)->impl,
- values, mask);
-}
-
-static GdkDrawable *
gdk_window_get_source_drawable (GdkDrawable *drawable)
{
GdkWindow *window = GDK_WINDOW (drawable);
diff --git a/gdk/quartz/Makefile.am b/gdk/quartz/Makefile.am
index 2681f6d..683ea3e 100644
--- a/gdk/quartz/Makefile.am
+++ b/gdk/quartz/Makefile.am
@@ -32,7 +32,6 @@ libgdk_quartz_la_SOURCES = \
gdkdrawable-quartz.h \
gdkevents-quartz.c \
gdkeventloop-quartz.c \
- gdkgc-quartz.c \
gdkgeometry-quartz.c \
gdkglobals-quartz.c \
gdkim-quartz.c \
diff --git a/gdk/quartz/gdkprivate-quartz.h b/gdk/quartz/gdkprivate-quartz.h
index 89e2e0c..fbf75c2 100644
--- a/gdk/quartz/gdkprivate-quartz.h
+++ b/gdk/quartz/gdkprivate-quartz.h
@@ -35,51 +35,11 @@
#include "config.h"
-#define GDK_TYPE_GC_QUARTZ (_gdk_gc_quartz_get_type ())
-#define GDK_GC_QUARTZ(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_GC_QUARTZ, GdkGCQuartz))
-#define GDK_GC_QUARTZ_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_GC_QUARTZ, GdkGCQuartzClass))
-#define GDK_IS_GC_QUARTZ(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_GC_QUARTZ))
-#define GDK_IS_GC_QUARTZ_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_GC_QUARTZ))
-#define GDK_GC_QUARTZ_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_GC_QUARTZ, GdkGCQuartzClass))
-
#define GDK_DRAG_CONTEXT_PRIVATE(context) ((GdkDragContextPrivate *) GDK_DRAG_CONTEXT (context)->windowing_data)
typedef struct _GdkCursorPrivate GdkCursorPrivate;
-typedef struct _GdkGCQuartz GdkGCQuartz;
-typedef struct _GdkGCQuartzClass GdkGCQuartzClass;
typedef struct _GdkDragContextPrivate GdkDragContextPrivate;
-struct _GdkGCQuartz
-{
- GdkGC parent_instance;
-
- GdkFunction function;
- GdkSubwindowMode subwindow_mode;
- gboolean graphics_exposures;
-
- gboolean have_clip_region;
- gboolean have_clip_mask;
- CGImageRef clip_mask;
-
- gint line_width;
- GdkLineStyle line_style;
- GdkCapStyle cap_style;
- GdkJoinStyle join_style;
-
- CGFloat *dash_lengths;
- gint dash_count;
- CGFloat dash_phase;
-
- CGPatternRef ts_pattern;
-
- guint is_window : 1;
-};
-
-struct _GdkGCQuartzClass
-{
- GdkGCClass parent_class;
-};
-
struct _GdkVisualClass
{
GObjectClass parent_class;
@@ -120,15 +80,6 @@ typedef enum {
GDK_QUARTZ_CONTEXT_TEXT = 1 << 2
} GdkQuartzContextValuesMask;
-GType _gdk_gc_quartz_get_type (void);
-GdkGC *_gdk_quartz_gc_new (GdkDrawable *drawable,
- GdkGCValues *values,
- GdkGCValuesMask values_mask);
-void _gdk_quartz_gc_update_cg_context (GdkGC *gc,
- GdkDrawable *drawable,
- CGContextRef context,
- GdkQuartzContextValuesMask mask);
-
/* Colormap */
CGColorRef _gdk_quartz_colormap_get_cgcolor_from_pixel (GdkDrawable *drawable,
guint32 pixel);
diff --git a/gdk/win32/Makefile.am b/gdk/win32/Makefile.am
index c6b0f9a..889791a 100644
--- a/gdk/win32/Makefile.am
+++ b/gdk/win32/Makefile.am
@@ -40,7 +40,6 @@ libgdk_win32_la_SOURCES = \
gdkdrawable-win32.c \
gdkdrawable-win32.h \
gdkevents-win32.c \
- gdkgc-win32.c \
gdkgeometry-win32.c \
gdkglobals-win32.c \
gdkim-win32.c \
diff --git a/gdk/win32/gdkdrawable-win32.c b/gdk/win32/gdkdrawable-win32.c
index eb126bb..17ccd61 100644
--- a/gdk/win32/gdkdrawable-win32.c
+++ b/gdk/win32/gdkdrawable-win32.c
@@ -317,93 +317,6 @@ render_line_vertical (GdkGCWin32 *gcwin32,
return TRUE;
}
-static void
-draw_tiles_lowlevel (HDC dest,
- HDC tile,
- int rop3,
- gint dest_x,
- gint dest_y,
- gint tile_x_origin,
- gint tile_y_origin,
- gint width,
- gint height,
- gint tile_width,
- gint tile_height)
-{
- gint x, y;
-
- GDK_NOTE (DRAW, g_print ("draw_tiles_lowlevel: %p %+d%+d tile=%p:%dx%d %+d%+d %dx%d\n",
- dest,
- dest_x, dest_y,
- tile, tile_width, tile_height,
- tile_x_origin, tile_y_origin,
- width, height));
-
- y = tile_y_origin % tile_height;
- if (y > 0)
- y -= tile_height;
- while (y < dest_y + height)
- {
- if (y + tile_height >= dest_y)
- {
- x = tile_x_origin % tile_width;
- if (x > 0)
- x -= tile_width;
- while (x < dest_x + width)
- {
- if (x + tile_width >= dest_x)
- {
- gint src_x = MAX (0, dest_x - x);
- gint src_y = MAX (0, dest_y - y);
-
- if (!GDI_CALL (BitBlt, (dest, x + src_x, y + src_y,
- MIN (tile_width, dest_x + width - (x + src_x)),
- MIN (tile_height, dest_y + height - (y + src_y)),
- tile,
- src_x, src_y,
- rop3)))
- return;
- }
- x += tile_width;
- }
- }
- y += tile_height;
- }
-}
-
-static void
-draw_tiles (GdkDrawable *drawable,
- GdkGC *gc,
- int rop3,
- GdkPixmap *tile,
- gint dest_x,
- gint dest_y,
- gint tile_x_origin,
- gint tile_y_origin,
- gint width,
- gint height)
-{
- const GdkGCValuesMask mask = GDK_GC_FOREGROUND;
- gint tile_width, tile_height;
- GdkGC *gc_copy;
- HDC dest_hdc, tile_hdc;
-
- gc_copy = gdk_gc_new (tile);
- gdk_gc_copy (gc_copy, gc);
- dest_hdc = gdk_win32_hdc_get (drawable, gc, mask);
- tile_hdc = gdk_win32_hdc_get (tile, gc_copy, mask);
-
- gdk_drawable_get_size (tile, &tile_width, &tile_height);
-
- draw_tiles_lowlevel (dest_hdc, tile_hdc, rop3,
- dest_x, dest_y, tile_x_origin, tile_y_origin,
- width, height, tile_width, tile_height);
-
- gdk_win32_hdc_release (drawable, gc, mask);
- gdk_win32_hdc_release (tile, gc_copy, mask);
- g_object_unref (gc_copy);
-}
-
static cairo_region_t *
widen_bounds (GdkRectangle *bounds,
gint pen_width)
diff --git a/gdk/win32/gdkprivate-win32.h b/gdk/win32/gdkprivate-win32.h
index d026d89..6e97ac5 100644
--- a/gdk/win32/gdkprivate-win32.h
+++ b/gdk/win32/gdkprivate-win32.h
@@ -105,13 +105,6 @@
#define GDK_DEBUG_MISC_OR_COLORMAP (GDK_DEBUG_MISC|GDK_DEBUG_COLORMAP)
#define GDK_DEBUG_MISC_OR_EVENTS (GDK_DEBUG_MISC|GDK_DEBUG_EVENTS)
-#define GDK_TYPE_GC_WIN32 (_gdk_gc_win32_get_type ())
-#define GDK_GC_WIN32(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_GC_WIN32, GdkGCWin32))
-#define GDK_GC_WIN32_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_GC_WIN32, GdkGCWin32Class))
-#define GDK_IS_GC_WIN32(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_GC_WIN32))
-#define GDK_IS_GC_WIN32_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_GC_WIN32))
-#define GDK_GC_WIN32_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_GC_WIN32, GdkGCWin32Class))
-
//#define GDK_WINDOW_SCREEN(win) (_gdk_screen)
GdkScreen *GDK_WINDOW_SCREEN(GObject *win);
@@ -120,8 +113,6 @@ GdkScreen *GDK_WINDOW_SCREEN(GObject *win);
typedef struct _GdkColormapPrivateWin32 GdkColormapPrivateWin32;
typedef struct _GdkCursorPrivate GdkCursorPrivate;
typedef struct _GdkWin32SingleFont GdkWin32SingleFont;
-typedef struct _GdkGCWin32 GdkGCWin32;
-typedef struct _GdkGCWin32Class GdkGCWin32Class;
struct _GdkCursorPrivate
{
@@ -159,48 +150,6 @@ struct _GdkColormapPrivateWin32
GdkColorInfo *info;
};
-struct _GdkGCWin32
-{
- GdkGC parent_instance;
-
- /* A Windows Device Context (DC) is not equivalent to an X11
- * GC. We can use a DC only in the window for which it was
- * allocated, or (in the case of a memory DC) with the bitmap that
- * has been selected into it. Thus, we have to release and
- * reallocate a DC each time the GdkGC is used to paint into a new
- * window or pixmap. We thus keep all the necessary values in the
- * GdkGCWin32 object.
- */
-
- HRGN hcliprgn;
-
- GdkGCValuesMask values_mask;
-
- gint rop2;
- GdkSubwindowMode subwindow_mode;
- gint graphics_exposures;
- gint pen_width;
- DWORD pen_style;
- GdkLineStyle line_style;
- GdkCapStyle cap_style;
- GdkJoinStyle join_style;
- DWORD *pen_dashes; /* use for PS_USERSTYLE or step-by-step rendering */
- gint pen_num_dashes;
- gint pen_dash_offset;
- HBRUSH pen_hbrbg;
-
- /* Following fields are valid while the GC exists as a Windows DC */
- HDC hdc;
- int saved_dc;
-
- HPALETTE holdpal;
-};
-
-struct _GdkGCWin32Class
-{
- GdkGCClass parent_class;
-};
-
GType _gdk_gc_win32_get_type (void);
gulong _gdk_win32_get_next_tick (gulong suggested_tick);
@@ -232,10 +181,6 @@ void gdk_win32_handle_table_insert (HANDLE *handle,
gpointer data);
void gdk_win32_handle_table_remove (HANDLE handle);
-GdkGC *_gdk_win32_gc_new (GdkDrawable *drawable,
- GdkGCValues *values,
- GdkGCValuesMask values_mask);
-
void _gdk_win32_blit (gboolean use_fg_bg,
GdkDrawableImplWin32 *drawable,
GdkGC *gc,
diff --git a/gdk/x11/Makefile.am b/gdk/x11/Makefile.am
index 080ccd1..c83b7cd 100644
--- a/gdk/x11/Makefile.am
+++ b/gdk/x11/Makefile.am
@@ -37,7 +37,6 @@ libgdk_x11_la_SOURCES = \
gdkeventsource.h \
gdkeventtranslator.c \
gdkeventtranslator.h \
- gdkgc-x11.c \
gdkgeometry-x11.c \
gdkglobals-x11.c \
gdkim-x11.c \
diff --git a/gdk/x11/gdkdrawable-x11.c b/gdk/x11/gdkdrawable-x11.c
index e80152e..8fba6eb 100644
--- a/gdk/x11/gdkdrawable-x11.c
+++ b/gdk/x11/gdkdrawable-x11.c
@@ -72,8 +72,6 @@ _gdk_drawable_impl_x11_class_init (GdkDrawableImplX11Class *klass)
object_class->finalize = gdk_drawable_impl_x11_finalize;
- drawable_class->create_gc = _gdk_x11_gc_new;
-
drawable_class->ref_cairo_surface = gdk_x11_ref_cairo_surface;
drawable_class->set_colormap = gdk_x11_set_colormap;
diff --git a/gdk/x11/gdkprivate-x11.h b/gdk/x11/gdkprivate-x11.h
index f9c205b..3ea4b4d 100644
--- a/gdk/x11/gdkprivate-x11.h
+++ b/gdk/x11/gdkprivate-x11.h
@@ -41,34 +41,8 @@
#include "config.h"
-#define GDK_TYPE_GC_X11 (_gdk_gc_x11_get_type ())
-#define GDK_GC_X11(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_GC_X11, GdkGCX11))
-#define GDK_GC_X11_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_GC_X11, GdkGCX11Class))
-#define GDK_IS_GC_X11(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_GC_X11))
-#define GDK_IS_GC_X11_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_GC_X11))
-#define GDK_GC_X11_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_GC_X11, GdkGCX11Class))
-
typedef struct _GdkCursorPrivate GdkCursorPrivate;
typedef struct _GdkVisualPrivate GdkVisualPrivate;
-typedef struct _GdkGCX11 GdkGCX11;
-typedef struct _GdkGCX11Class GdkGCX11Class;
-
-struct _GdkGCX11
-{
- GdkGC parent_instance;
-
- GC xgc;
- GdkScreen *screen;
- guint16 dirty_mask;
- guint have_clip_region : 1;
- guint have_clip_mask : 1;
- guint depth : 8;
-};
-
-struct _GdkGCX11Class
-{
- GdkGCClass parent_class;
-};
struct _GdkCursorPrivate
{
@@ -98,14 +72,8 @@ gint _gdk_send_xevent (GdkDisplay *display,
glong event_mask,
XEvent *event_send);
-GType _gdk_gc_x11_get_type (void);
-
gboolean _gdk_x11_have_render (GdkDisplay *display);
-GdkGC *_gdk_x11_gc_new (GdkDrawable *drawable,
- GdkGCValues *values,
- GdkGCValuesMask values_mask);
-
/* Routines from gdkgeometry-x11.c */
void _gdk_window_move_resize_child (GdkWindow *window,
gint x,
@@ -150,8 +118,6 @@ void _gdk_keymap_add_virtual_modifiers_compat (GdkKeymap *keymap,
gboolean _gdk_keymap_key_is_modifier (GdkKeymap *keymap,
guint keycode);
-GC _gdk_x11_gc_flush (GdkGC *gc);
-
void _gdk_x11_initialize_locale (void);
void _gdk_xgrab_check_unmap (GdkWindow *window,
diff --git a/gdk/x11/gdkx.h b/gdk/x11/gdkx.h
index 44b0ea6..0053dae 100644
--- a/gdk/x11/gdkx.h
+++ b/gdk/x11/gdkx.h
@@ -48,8 +48,6 @@ Display *gdk_x11_cursor_get_xdisplay (GdkCursor *cursor);
Cursor gdk_x11_cursor_get_xcursor (GdkCursor *cursor);
Display *gdk_x11_display_get_xdisplay (GdkDisplay *display);
Visual * gdk_x11_visual_get_xvisual (GdkVisual *visual);
-Display *gdk_x11_gc_get_xdisplay (GdkGC *gc);
-GC gdk_x11_gc_get_xgc (GdkGC *gc);
Screen * gdk_x11_screen_get_xscreen (GdkScreen *screen);
int gdk_x11_screen_get_screen_number (GdkScreen *screen);
void gdk_x11_window_set_user_time (GdkWindow *window,
@@ -86,13 +84,10 @@ gint gdk_x11_get_default_screen (void);
#define GDK_PIXMAP_XID(pix) (GDK_DRAWABLE_IMPL_X11(((GdkPixmapObject *)pix)->impl)->xid)
#define GDK_DRAWABLE_XDISPLAY(win) (GDK_IS_WINDOW (win) ? GDK_WINDOW_XDISPLAY (win) : GDK_PIXMAP_XDISPLAY (win))
#define GDK_DRAWABLE_XID(win) (GDK_IS_WINDOW (win) ? GDK_WINDOW_XID (win) : GDK_PIXMAP_XID (win))
-#define GDK_GC_XDISPLAY(gc) (GDK_SCREEN_XDISPLAY(GDK_GC_X11(gc)->screen))
-#define GDK_GC_XGC(gc) (GDK_GC_X11(gc)->xgc)
#define GDK_SCREEN_XDISPLAY(screen) (GDK_SCREEN_X11 (screen)->xdisplay)
#define GDK_SCREEN_XSCREEN(screen) (GDK_SCREEN_X11 (screen)->xscreen)
#define GDK_SCREEN_XNUMBER(screen) (GDK_SCREEN_X11 (screen)->screen_num)
#define GDK_VISUAL_XVISUAL(vis) (((GdkVisualPrivate *) vis)->xvisual)
-#define GDK_GC_GET_XGC(gc) (GDK_GC_X11(gc)->dirty_mask ? _gdk_x11_gc_flush (gc) : ((GdkGCX11 *)(gc))->xgc)
#define GDK_WINDOW_XWINDOW GDK_DRAWABLE_XID
#else /* GDK_COMPILATION */
@@ -110,8 +105,6 @@ gint gdk_x11_get_default_screen (void);
#define GDK_PIXMAP_XID(win) (gdk_x11_drawable_get_xid (win))
#define GDK_DRAWABLE_XDISPLAY(win) (gdk_x11_drawable_get_xdisplay (win))
#define GDK_DRAWABLE_XID(win) (gdk_x11_drawable_get_xid (win))
-#define GDK_GC_XDISPLAY(gc) (gdk_x11_gc_get_xdisplay (gc))
-#define GDK_GC_XGC(gc) (gdk_x11_gc_get_xgc (gc))
#define GDK_SCREEN_XDISPLAY(screen) (gdk_x11_display_get_xdisplay (gdk_screen_get_display (screen)))
#define GDK_SCREEN_XSCREEN(screen) (gdk_x11_screen_get_xscreen (screen))
#define GDK_SCREEN_XNUMBER(screen) (gdk_x11_screen_get_screen_number (screen))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]