[gimp/soc-2009-siox-drb] drbsignal should be push by a function
- From: Jie Ding <jieding src gnome org>
- To: svn-commits-list gnome org
- Subject: [gimp/soc-2009-siox-drb] drbsignal should be push by a function
- Date: Wed, 1 Jul 2009 09:12:00 +0000 (UTC)
commit 7c1fe4c87b830ca55f7317d6ce50ce32fe44b5f6
Author: Jie Ding <jieding src gnome org>
Date: Wed Jul 1 13:15:05 2009 +0800
drbsignal should be push by a function
app/tools/gimpforegroundselecttool.c | 25 ++++++++++++++++---------
app/tools/gimpforegroundselecttool.h | 11 +++++++----
2 files changed, 23 insertions(+), 13 deletions(-)
---
diff --git a/app/tools/gimpforegroundselecttool.c b/app/tools/gimpforegroundselecttool.c
index baaa5d0..ff8314c 100644
--- a/app/tools/gimpforegroundselecttool.c
+++ b/app/tools/gimpforegroundselecttool.c
@@ -209,7 +209,7 @@ gimp_foreground_select_tool_init (GimpForegroundSelectTool *fg_select)
fg_select->stroke = NULL;
fg_select->strokes = NULL;
fg_select->mask = NULL;
- fg_select->drbsignal = FALSE; //(new)
+ fg_select->drbsignal = NULL; //(new)
}
static GObject *
@@ -458,6 +458,7 @@ gimp_foreground_select_tool_key_press (GimpTool *tool,
return FALSE;
}
}
+
else
return GIMP_TOOL_CLASS (parent_class)->key_press (tool,
kevent,
@@ -506,10 +507,10 @@ gimp_foreground_select_tool_button_press (GimpTool *tool,
else if (fg_select->drbsignal)
{
GimpVector2 point = gimp_vector2_new (coords->x, coords->y);
-
+ printf("----------------------drb brush");
gimp_draw_tool_pause (draw_tool);
- if (gimp_draw_tool_is_active (draw_tool) && draw_tool->display != display)
+ if (gimp_draw_tool_is_active (draw_tool) && draw_tool->display != display)//?
gimp_draw_tool_stop (draw_tool);
@@ -518,10 +519,10 @@ gimp_foreground_select_tool_button_press (GimpTool *tool,
fg_select->last_coords = *coords;
- g_return_if_fail (fg_select->stroke == NULL);
- fg_select->stroke = g_array_new (FALSE, FALSE, sizeof (GimpVector2));
+ g_return_if_fail (fg_select->drbsignal == NULL);
+ fg_select->drbsignal = g_array_new (FALSE, FALSE, sizeof (GimpVector2));
- g_array_append_val (fg_select->stroke, point);
+ g_array_append_val (fg_select->drbsignal, point);
if (! gimp_draw_tool_is_active (draw_tool))
gimp_draw_tool_start (draw_tool, display);
@@ -706,8 +707,7 @@ gimp_foreground_select_tool_draw (GimpDrawTool *draw_tool)
static void
gimp_foreground_select_tool_select (GimpFreeSelectTool *free_sel,
- GimpDisplay *display)//,
- //GdkEventKey *kevent)
+ GimpDisplay *display)
{printf("===========gimp_foreground_select_tool_select\n");
GimpForegroundSelectTool *fg_select;
GimpForegroundSelectOptions *options;
@@ -773,7 +773,7 @@ gimp_foreground_select_tool_select (GimpFreeSelectTool *free_sel,
//if((kevent->keyval == GDK_Shift_L) || (kevent->keyval == GDK_Shift_R ))
// fg_select->drbsignal= TRUE;
- fg_select->drbsignal = mark_drb;
+ fg_select->drbsignal = mark_drb;//(should be a function to push)
}
@@ -1039,4 +1039,11 @@ gimp_foreground_select_options_notify (GimpForegroundSelectOptions *options,
options->mask_color);
}
}
+/*static void
+gimp_foreground_select_tool_push_drbsignal (GimpForegroundSelectTool *fg_select,
+ GimpDisplay *display,
+ GimpForegroundSelectOptions *options)
+{
+
+}*/
diff --git a/app/tools/gimpforegroundselecttool.h b/app/tools/gimpforegroundselecttool.h
index 1fd845d..09bd3b0 100644
--- a/app/tools/gimpforegroundselecttool.h
+++ b/app/tools/gimpforegroundselecttool.h
@@ -30,8 +30,11 @@
#define GIMP_FOREGROUND_SELECT_TOOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_FOREGROUND_SELECT_TOOL, GimpForegroundSelectToolClass))
#define GIMP_FOREGROUND_SELECT_TOOL_GET_OPTIONS(t) (GIMP_FOREGROUND_SELECT_OPTIONS (gimp_tool_get_options (GIMP_TOOL (t))))
-
-
+/*--------new
+#define GIMP_TYPE_FREE_SELECT_TOOL (gimp_free_select_tool_get_type ())
+#define GIMP_FREE_SELECT_TOOL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_FREE_SELECT_TOOL, GimpFreeSelectTool))
+#define GIMP_IS_FREE_SELECT_TOOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_FREE_SELECT_TOOL))
+/*---------------end*/
typedef struct _GimpForegroundSelectTool GimpForegroundSelectTool;
typedef struct _GimpForegroundSelectToolClass GimpForegroundSelectToolClass;
@@ -43,7 +46,7 @@ struct _GimpForegroundSelectTool
guint idle_id;
GArray *stroke;
GList *strokes;
- gboolean drbsignal;//(new)
+ GArray *drbsignal;//(new)
GimpChannel *mask;
SioxState *state;
SioxRefinementType refinement;
@@ -60,7 +63,7 @@ void gimp_foreground_select_tool_register (GimpToolRegisterCallback callback
/*static void //(new)
gimp_foreground_select_siox_drb (GimpTool *tool,//(new)
- GimpDisplay *display); */
+ GimpDisplay *display); */
GType gimp_foreground_select_tool_get_type (void) G_GNUC_CONST;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]