[cairo-commit] cairo-gtk-engine/src Makefile.am, 1.4,
1.5 caligula-draw.c, NONE, 1.1 caligula-draw.h, NONE,
1.1 caligula.c, 1.2, 1.3
Kristian Hogsberg
commit at pdx.freedesktop.org
Tue Feb 8 19:08:51 PST 2005
Committed by: krh
Update of /cvs/cairo/cairo-gtk-engine/src
In directory gabe:/tmp/cvs-serv3558/src
Modified Files:
Makefile.am caligula.c
Added Files:
caligula-draw.c caligula-draw.h
Log Message:
2005-02-08 Kristian Høgsberg <krh at redhat.com>
* src/caligula-draw.c, src/caligula-draw.h: New file for the
drawing virtual functions.
Index: Makefile.am
===================================================================
RCS file: /cvs/cairo/cairo-gtk-engine/src/Makefile.am,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- Makefile.am 8 Feb 2005 22:36:16 -0000 1.4
+++ Makefile.am 9 Feb 2005 03:08:48 -0000 1.5
@@ -17,7 +17,7 @@
$(CGE_LIBS)
libcaligula_la_SOURCES = \
- caligula.c
+ caligula.c caligula-draw.c caligula-draw.h
libcaligula_la_LDFLAGS = \
-avoid-version -no-undefined -module \
--- NEW FILE: caligula-draw.c ---
(This appears to be a binary file; contents omitted.)
--- NEW FILE: caligula-draw.h ---
(This appears to be a binary file; contents omitted.)
Index: caligula.c
===================================================================
RCS file: /cvs/cairo/cairo-gtk-engine/src/caligula.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- caligula.c 9 Feb 2005 02:48:50 -0000 1.2
+++ caligula.c 9 Feb 2005 03:08:48 -0000 1.3
@@ -19,72 +19,12 @@
* USA
*/
-#include <math.h>
#include <string.h>
#include <gmodule.h>
#include <gtk/gtk.h>
-#include <gdk/gdkx.h>
-
-#include <cairo.h>
-#include <cairo-xlib.h>
-
-#include "cge-style.h"
-
-static cairo_t *
-caligula_begin_paint (GdkDrawable *window, gint *x_offset, gint *y_offset)
-{
- Display *dpy;
- Drawable xid;
- GdkDrawable *drawable;
- cairo_t *cr;
-
- /* Unabstract X from GTK+ */
- if (GDK_IS_WINDOW (window))
- gdk_window_get_internal_paint_info (window, &drawable,
- x_offset, y_offset);
- else
- drawable = window;
-
- dpy = gdk_x11_drawable_get_xdisplay (drawable);
- xid = gdk_x11_drawable_get_xid (drawable);
-
- cr = cairo_create ();
- cairo_set_target_drawable (cr, dpy, xid);
-
- if (GDK_IS_WINDOW (window))
- cairo_translate (cr, -*x_offset, -*y_offset);
- return cr;
-}
-
-static void
-caligula_end_paint (cairo_t *cr)
-{
- cairo_destroy (cr);
-}
-
-static void
-caligula_draw_box (GtkStyle * style,
- GdkWindow * window,
- GtkStateType state_type,
- GtkShadowType shadow_type,
- GdkRectangle * area,
- GtkWidget * widget,
- const gchar * detail,
- gint x, gint y, gint width, gint height)
-{
- cairo_t *cr;
- gint x_offset, y_offset;
-
- cr = caligula_begin_paint (window, &x_offset, &y_offset);
-
- cairo_set_rgb_color (cr, 0.5, 0.5, 1.0);
- cairo_rectangle (cr, x, y, width, height);
- cairo_fill (cr);
-
- caligula_end_paint (cr);
-}
+#include "caligula-draw.h"
GTypeModule *caligula_module;
More information about the cairo-commit
mailing list