From adfba98c507fd731a96a0551176050b697c14379 Mon Sep 17 00:00:00 2001 From: Jasmine Hassan Date: Thu, 18 Oct 2012 12:26:02 +0200 Subject: [eel] port EelCanvas to cairo drawing http://git.gnome.org/browse/nautilus/commit/?id=759f3401bee333caf6d0ae6ae9820cdadda440e4 --- eel/eel-canvas.h | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'eel/eel-canvas.h') diff --git a/eel/eel-canvas.h b/eel/eel-canvas.h index 2f799c39..453cdaee 100644 --- a/eel/eel-canvas.h +++ b/eel/eel-canvas.h @@ -372,9 +372,6 @@ extern "C" { /* If non-NULL, the currently focused item */ EelCanvasItem *focused_item; - /* GC for temporary draw pixmap */ - GdkGC *pixmap_gc; - /* Event on which selection of current item is based */ GdkEvent pick_event; @@ -527,16 +524,6 @@ extern "C" { */ int eel_canvas_get_color (EelCanvas *canvas, const char *spec, GdkColor *color); - /* Allocates a color from the RGB value passed into this function. */ - gulong eel_canvas_get_color_pixel (EelCanvas *canvas, - guint rgba); - - - /* Sets the stipple origin of the specified gc so that it will be aligned with - * all the stipples used in the specified canvas. This is intended for use only - * by canvas item implementations. - */ - void eel_canvas_set_stipple_origin (EelCanvas *canvas, GdkGC *gc); #ifdef __cplusplus } -- cgit v1.2.1 From 5f7d0e33a04e69778509edb93beabbe0e62ab69b Mon Sep 17 00:00:00 2001 From: Jasmine Hassan Date: Tue, 30 Oct 2012 23:42:48 +0200 Subject: [eel-canvas] don't use GtkObject (GTK3) the ::destroy signal of GtkObject has only been moved to GtkWidget in GTK3 (after GtkObject removal): http://developer.gnome.org/gtk3/3.0/ch25s02.html So, we conditionals in this case, to keep working with GTK2 Nautilus commit message: This implies adding a 'destroy' signal to EelCanvasItem, with similar semantics to gtk_object_destroy() http://git.gnome.org/browse/nautilus/commit/?id=1f615321613751a5dbc84d5ef7f20edd104b8dc4 --- eel/eel-canvas.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'eel/eel-canvas.h') diff --git a/eel/eel-canvas.h b/eel/eel-canvas.h index 453cdaee..b288dedf 100644 --- a/eel/eel-canvas.h +++ b/eel/eel-canvas.h @@ -115,7 +115,7 @@ extern "C" { struct _EelCanvasItem { - GtkObject object; + GInitiallyUnowned object; /* Parent canvas for this item */ EelCanvas *canvas; @@ -132,7 +132,9 @@ extern "C" { struct _EelCanvasItemClass { - GtkObjectClass parent_class; + GInitiallyUnownedClass parent_class; + + void (* destroy) (EelCanvasItem *item); /* Tell the item to update itself. The flags are from the update flags * defined above. The item should update its internal state from its @@ -195,6 +197,8 @@ extern "C" { EelCanvasItem *eel_canvas_item_new (EelCanvasGroup *parent, GType type, const gchar *first_arg_name, ...); + void eel_canvas_item_destroy (EelCanvasItem *item); + /* Constructors for use in derived classes and language wrappers */ void eel_canvas_item_construct (EelCanvasItem *item, EelCanvasGroup *parent, const gchar *first_arg_name, va_list args); -- cgit v1.2.1 From aebf60348dd7675678c28a5c850d1900b7b95e8c Mon Sep 17 00:00:00 2001 From: Jasmine Hassan Date: Wed, 7 Nov 2012 19:19:10 +0200 Subject: [eel-canvas] Port the eel canvas to rendering-cleanup-next http://git.gnome.org/browse/nautilus/commit/?id=58832e54b6a4e596693527d577e4f8fa2f3e4ccf --- eel/eel-canvas.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'eel/eel-canvas.h') diff --git a/eel/eel-canvas.h b/eel/eel-canvas.h index b288dedf..8f49141a 100644 --- a/eel/eel-canvas.h +++ b/eel/eel-canvas.h @@ -159,7 +159,11 @@ extern "C" { * coordinates of the drawable, a temporary pixmap, where things get * drawn. (width, height) are the dimensions of the drawable. */ +#if GTK_CHECK_VERSION(3,0,0) + void (* draw) (EelCanvasItem *item, cairo_t *cr, cairo_region_t *region); +#else void (* draw) (EelCanvasItem *item, GdkDrawable *drawable, GdkEventExpose *expose); +#endif /* Calculate the distance from an item to the specified point. It also * returns a canvas item which is the item itself in the case of the @@ -434,7 +438,11 @@ extern "C" { /* Draw the background for the area given. */ void (* draw_background) (EelCanvas *canvas, +#if GTK_CHECK_VERSION(3,0,0) + cairo_t *cr); +#else int x, int y, int width, int height); +#endif /* Private Virtual methods for groping the canvas inside matecomponent */ void (* request_update) (EelCanvas *canvas); -- cgit v1.2.1