[cairo-commit] gtkcairo/gtkcairo gdkcairo.c, 1.2, 1.3 gdkcairo.h, 1.4, 1.5 gtkcairo.c, 1.15, 1.16 gtkcairo.h, 1.8, 1.9

OEyvind Kolaas commit at pdx.freedesktop.org
Tue Jun 29 01:20:51 PDT 2004


Committed by: pippin

Update of /cvs/cairo/gtkcairo/gtkcairo
In directory pdx:/tmp/cvs-serv3464/gtkcairo

Modified Files:
	gdkcairo.c gdkcairo.h gtkcairo.c gtkcairo.h 
Log Message:
renamed the redraw signal to paint


Index: gdkcairo.c
===================================================================
RCS file: /cvs/cairo/gtkcairo/gtkcairo/gdkcairo.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** gdkcairo.c	23 May 2004 22:30:21 -0000	1.2
--- gdkcairo.c	29 Jun 2004 08:20:48 -0000	1.3
***************
*** 153,162 ****
  	             onscreen_format = glitz_glx_find_standard_format (dpy, screen,
  	             GLITZ_FORMAT_OPTION_ONSCREEN_MASK, GLITZ_STANDARD_RGB24);
! 
  	        /*  XSetWindowAttributes xswa;*/
  
-             vinfo = glitz_glx_get_visual_info_from_format (dpy, screen, onscreen_format);
- 
  	        if (onscreen_format) {
                gtk_widget_set_double_buffered (widget, FALSE);
                attributes.visual = gdkx_visual_get (vinfo->visualid);
--- 153,161 ----
  	             onscreen_format = glitz_glx_find_standard_format (dpy, screen,
  	             GLITZ_FORMAT_OPTION_ONSCREEN_MASK, GLITZ_STANDARD_RGB24);
!             
  	        /*  XSetWindowAttributes xswa;*/
  
  	        if (onscreen_format) {
+               vinfo = glitz_glx_get_visual_info_from_format (dpy, screen, onscreen_format);
                gtk_widget_set_double_buffered (widget, FALSE);
                attributes.visual = gdkx_visual_get (vinfo->visualid);
***************
*** 238,242 ****
              cairo_fill      (self->cr);
  
! 	        g_signal_emit_by_name (self->widget, "redraw", self->cr);
              glitz_surface_swap_buffers (self->glitz_surface);
              XSync (gdk_x11_get_default_xdisplay (), 0);
--- 237,241 ----
              cairo_fill      (self->cr);
  
! 	        g_signal_emit_by_name (self->widget, "paint", self->cr);
              glitz_surface_swap_buffers (self->glitz_surface);
              XSync (gdk_x11_get_default_xdisplay (), 0);
***************
*** 261,265 ****
  	        }
  
! 	        g_signal_emit_by_name (self->widget, "redraw", self->cr);
  
  	        if (x_off || y_off) {
--- 260,264 ----
  	        }
  
! 	        g_signal_emit_by_name (self->widget, "paint", self->cr);
  
  	        if (x_off || y_off) {

Index: gdkcairo.h
===================================================================
RCS file: /cvs/cairo/gtkcairo/gtkcairo/gdkcairo.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** gdkcairo.h	8 Jun 2004 10:36:36 -0000	1.4
--- gdkcairo.h	29 Jun 2004 08:20:48 -0000	1.5
***************
*** 41,53 ****
  #endif
  
- 
  typedef enum {
      GDKCAIRO_BACKEND_IMAGE,
- //    #ifdef CAIRO_HAS_XLIB_SURFACE
      GDKCAIRO_BACKEND_XLIB,
- //    #endif
- //    #ifdef USE_GLITZ
      GDKCAIRO_BACKEND_GL,
- //    #endif
      GDKCAIRO_BACKEND_NONE
  } gdkcairo_backend;
--- 41,48 ----

Index: gtkcairo.c
===================================================================
RCS file: /cvs/cairo/gtkcairo/gtkcairo/gtkcairo.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** gtkcairo.c	20 Jun 2004 21:15:29 -0000	1.15
--- gtkcairo.c	29 Jun 2004 08:20:48 -0000	1.16
***************
*** 33,37 ****
  
  enum {
! 	REDRAW,
  	LAST_SIGNAL
  };
--- 33,37 ----
  
  enum {
! 	PAINT,
  	LAST_SIGNAL
  };
***************
*** 103,110 ****
  	widget_class->size_allocate = gtk_cairo_size_allocate;
  
! 	signals[REDRAW] = g_signal_new ("redraw",
  			GTK_TYPE_CAIRO,
  			G_SIGNAL_RUN_LAST,
! 			G_STRUCT_OFFSET (GtkCairoClass, redraw),
  			NULL, NULL,
  			g_cclosure_marshal_VOID__POINTER,
--- 103,110 ----
  	widget_class->size_allocate = gtk_cairo_size_allocate;
  
! 	signals[PAINT] = g_signal_new ("paint",
  			GTK_TYPE_CAIRO,
  			G_SIGNAL_RUN_LAST,
! 			G_STRUCT_OFFSET (GtkCairoClass, paint),
  			NULL, NULL,
  			g_cclosure_marshal_VOID__POINTER,
***************
*** 189,193 ****
--- 189,195 ----
  	gtkcairo = GTK_CAIRO (widget);
  
+ 	cairo_save (gtk_cairo_get_cairo (gtkcairo));
  	gdkcairo_expose (gtkcairo->gdkcairo, event);
+ 	cairo_restore (gtk_cairo_get_cairo (gtkcairo));
  	return FALSE;
  }

Index: gtkcairo.h
===================================================================
RCS file: /cvs/cairo/gtkcairo/gtkcairo/gtkcairo.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** gtkcairo.h	20 May 2004 18:41:16 -0000	1.8
--- gtkcairo.h	29 Jun 2004 08:20:48 -0000	1.9
***************
*** 56,60 ****
  {
  	GtkWidgetClass parent_class;
! 	void (*redraw)(GtkCairo *, cairo_t *c);
  };
  
--- 56,60 ----
  {
  	GtkWidgetClass parent_class;
! 	void (*paint)(GtkCairo *, cairo_t *c);
  };
  





More information about the cairo-commit mailing list