[gimp/soc-2013-combined-selection-tool: 209/230] app:gimpselectbycontent.h



commit e84113c58ba1e3a9bd70a0609348243d5c810c4e
Author: Ajay Ramanathan <ajay 010293 gmail com>
Date:   Sat Aug 24 08:09:19 2013 +0530

    app:gimpselectbycontent.h

 app/tools/gimpselectbycontenttool.h |   57 +++++++++++++++++++----------------
 1 files changed, 31 insertions(+), 26 deletions(-)
---
diff --git a/app/tools/gimpselectbycontenttool.h b/app/tools/gimpselectbycontenttool.h
index e305b19..e4e468d 100644
--- a/app/tools/gimpselectbycontenttool.h
+++ b/app/tools/gimpselectbycontenttool.h
@@ -1,8 +1,6 @@
 /* GIMP - The GNU Image Manipulation Program
  * Copyright (C) 1995 Spencer Kimball and Peter Mattis
  *
- * gimpselectbycolortool.h
- *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 3 of the License, or
@@ -17,45 +15,52 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-//Just for ease of purpose
-
-#if 0
+#ifndef __GIMP_SELECT_BY_CONTENT_TOOL_H__
+#define __GIMP_SELECT_BY_CONTENT_TOOL_H__
 
-#ifndef __GIMP_SELECT_BY_COLOR_TOOL_H__
-#define __GIMP_SELECT_BY_COLOR_TOOL_H__
 
+#include "gimpselectiontool.h"
 
-#include "gimpregionselecttool.h"
 
+#define GIMP_TYPE_SELECT_BY_CONTENT_TOOL            (gimp_select_by_content_tool_get_type ())
+#define GIMP_SELECT_BY_CONTENT_TOOL(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), 
GIMP_TYPE_SELECT_BY_CONTENT_TOOL, GimpSelectByContentTool))
+#define GIMP_SELECT_BY_CONTENT_TOOL_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), 
GIMP_TYPE_SELECT_BY_CONTENT_TOOL, GimpSelectByContentToolClass))
+#define GIMP_IS_SELECT_BY_CONTENT_TOOL(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
GIMP_TYPE_SELECT_BY_CONTENT_TOOL))
+#define GIMP_IS_SELECT_BY_CONTENT_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), 
GIMP_TYPE_SELECT_BY_CONTENT_TOOL))
+#define GIMP_SELECT_BY_CONTENT_TOOL_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), 
GIMP_TYPE_SELECT_BY_CONTENT_TOOL, GimpSelectByContentToolClass))
 
-#define GIMP_TYPE_SELECT_BY_COLOR_TOOL            (gimp_select_by_color_tool_get_type ())
-#define GIMP_SELECT_BY_COLOR_TOOL(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), 
GIMP_TYPE_SELECT_BY_COLOR_TOOL, GimpSelectByColorTool))
-#define GIMP_SELECT_BY_COLOR_TOOL_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), 
GIMP_TYPE_SELECT_BY_COLOR_TOOL, GimpSelectByColorToolClass))
-#define GIMP_IS_SELECT_BY_COLOR_TOOL(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
GIMP_TYPE_SELECT_BY_COLOR_TOOL))
-#define GIMP_IS_SELECT_BY_COLOR_TOOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), 
GIMP_TYPE_SELECT_BY_COLOR_TOOL))
-#define GIMP_SELECT_BY_COLOR_TOOL_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), 
GIMP_TYPE_SELECT_BY_COLOR_TOOL, GimpSelectByColorToolClass))
 
+typedef struct _GimpSelectByContentTool      GimpSelectByContentTool;
+typedef struct _GimpSelectByContentToolClass GimpSelectByContentToolClass;
 
-typedef struct _GimpSelectByColorTool      GimpSelectByColorTool;
-typedef struct _GimpSelectByColorToolClass GimpSelectByColorToolClass;
-
-struct _GimpSelectByColorTool
+struct _GimpSelectByContentTool
 {
-  GimpRegionSelectTool  parent_instance;
+  GimpSelectionTool  parent_instance;
 };
 
-struct _GimpSelectByColorToolClass
+struct _GimpSelectByContentToolClass
 {
-  GimpRegionSelectToolClass  parent_class;
+  GimpSelectionToolClass  parent_class;
+
+  /*  virtual function  */
+
+  void (* select) (GimpSelectByContentTool *select_by_content_tool,
+                   GimpDisplay        *display);
 };
 
 
-void    gimp_select_by_color_tool_register (GimpToolRegisterCallback  callback,
-                                            gpointer                  data);
+void    gimp_fselect_by_content_tool_register   (GimpToolRegisterCallback  callback,
+                                          gpointer                  data);
+
+GType   gimp_select_by_content_tool_get_type   (void) G_GNUC_CONST;
+
+void    gimp_select_by_content_tool_select     (GimpSelectByContentTool       *content_sel,
+                                          GimpDisplay              *display);
 
-GType   gimp_select_by_color_tool_get_type (void) G_GNUC_CONST;
+void    gimp_select_by_content_tool_get_points (GimpSelectByContentTool       *content_sel,
+                                          const GimpVector2       **points,
+                                          gint                     *n_points);
 
 
-#endif  /*  __GIMP_SELECT_BY_COLOR_TOOL_H__  */
+#endif  /*  __GIMP_SELECT_BY_CONTENT_TOOL_H__  */
 
-#endif


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]