[gnome-photos/wip/rishi/edit-mode: 28/31] tool: deactivate
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/edit-mode: 28/31] tool: deactivate
- Date: Fri, 6 Nov 2015 18:29:40 +0000 (UTC)
commit 8208c520247e72d67b6ee1baf7bb1677ce753df9
Author: Debarshi Ray <debarshir gnome org>
Date: Fri Nov 6 19:25:26 2015 +0100
tool: deactivate
src/photos-tool.c | 14 ++++++++++++++
src/photos-tool.h | 3 +++
2 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-tool.c b/src/photos-tool.c
index e728cbd..792274d 100644
--- a/src/photos-tool.c
+++ b/src/photos-tool.c
@@ -32,6 +32,12 @@ G_DEFINE_ABSTRACT_TYPE (PhotosTool, photos_tool, G_TYPE_OBJECT);
static void
+photos_tool_default_deactivate (PhotosTool *self)
+{
+}
+
+
+static void
photos_tool_default_draw (PhotosTool *self, cairo_t *cr, GdkRectangle *rect)
{
}
@@ -67,6 +73,7 @@ photos_tool_init (PhotosTool *self)
static void
photos_tool_class_init (PhotosToolClass *class)
{
+ class->deactivate = photos_tool_default_deactivate;
class->draw = photos_tool_default_draw;
class->left_click_event = photos_tool_default_left_click_event;
class->left_unclick_event = photos_tool_default_left_unclick_event;
@@ -82,6 +89,13 @@ photos_tool_activate (PhotosTool *self, PhotosBaseItem *item, GeglGtkView *view)
void
+photos_tool_deactivate (PhotosTool *self)
+{
+ PHOTOS_TOOL_GET_CLASS (self)->deactivate (self);
+}
+
+
+void
photos_tool_draw (PhotosTool *self, cairo_t *cr, GdkRectangle *rect)
{
return PHOTOS_TOOL_GET_CLASS (self)->draw (self, cr, rect);
diff --git a/src/photos-tool.h b/src/photos-tool.h
index d98b344..ae17882 100644
--- a/src/photos-tool.h
+++ b/src/photos-tool.h
@@ -71,6 +71,7 @@ struct _PhotosToolClass
/* virtual methods */
void (*activate) (PhotosTool *self, PhotosBaseItem *item, GeglGtkView *view);
+ void (*deactivate) (PhotosTool *self);
void (*draw) (PhotosTool *self, cairo_t *cr, GdkRectangle *rect);
GtkWidget *(*get_widget) (PhotosTool *self);
gboolean (*left_click_event) (PhotosTool *self, GdkEventButton *event);
@@ -85,6 +86,8 @@ GType photos_tool_get_type (void) G_GNUC_CONST;
void photos_tool_activate (PhotosTool *self, PhotosBaseItem *item, GeglGtkView
*view);
+void photos_tool_deactivate (PhotosTool *self);
+
void photos_tool_draw (PhotosTool *self, cairo_t *cr, GdkRectangle *rect);
const gchar *photos_tool_get_icon_name (PhotosTool *self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]