Commit 8202cf02 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

app/tools/Makefile.am back as object.

2001-02-28  Michael Natterer  <mitch@gimp.org>

	* app/tools/Makefile.am
	* app/tools/ink.[ch]: back as object.

	* app/tools/paint_options.c: #include "ink.h"

	* app/tools/tool.h: removed the type #define.

	* app/tools/tools.c: register it.
parent 3d78cbd5
2001-02-28 Michael Natterer <mitch@gimp.org>
* app/tools/Makefile.am
* app/tools/ink.[ch]: back as object.
* app/tools/paint_options.c: #include "ink.h"
* app/tools/tool.h: removed the type #define.
* app/tools/tools.c: register it.
2001-02-28 Michael Natterer <mitch@gimp.org>
* app/context_manager.[ch]: made the global_paint_options public.
......
This diff is collapsed.
......@@ -16,16 +16,60 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __INK_H__
#define __INK_H__
#ifndef __GIMP_INK_TOOL_H__
#define __GIMP_INK_TOOL_H__
Tool * tools_new_ink (void);
void tools_free_ink (Tool *tool);
#include "tool.h"
#include "blob.h" /* only used by ink */
/* Procedure definition and marshalling function */
extern ProcRecord ink_proc;
#define DIST_SMOOTHER_BUFFER 10
#define TIME_SMOOTHER_BUFFER 10
#endif /* __INK_H__ */
#define GIMP_TYPE_INK_TOOL (gimp_ink_tool_get_type ())
#define GIMP_INK_TOOL(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_INK_TOOL, GimpInkTool))
#define GIMP_IS_INK_TOOL(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_INK_TOOL))
#define GIMP_INK_TOOL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_INK_TOOL, GimpInkToolClass))
#define GIMP_IS_INK_TOOL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_INK_TOOL))
typedef struct _GimpInkTool GimpInkTool;
typedef struct _GimpInkToolClass GimpInkToolClass;
struct _GimpInkTool
{
GimpTool parent_instance;
Blob *last_blob; /* blob for last cursor position */
gint x1, y1; /* image space coordinate */
gint x2, y2; /* image space coords */
/* circular distance history buffer */
gdouble dt_buffer[DIST_SMOOTHER_BUFFER];
gint dt_index;
/* circular timing history buffer */
guint32 ts_buffer[TIME_SMOOTHER_BUFFER];
gint ts_index;
gdouble last_time; /* previous time of a motion event */
gdouble lastx, lasty; /* previous position of a motion event */
gboolean init_velocity;
};
struct _GimpInkToolClass
{
GimpToolClass parent_class;
};
void gimp_ink_tool_register (void);
GtkType gimp_ink_tool_get_type (void);
#endif /* __GIMP_INK_TOOL_H__ */
......@@ -12,8 +12,8 @@ libapptools_la_SOURCES = \
## bezier_selectP.h \
## blend.c \
## blend.h \
## blob.c \
## blob.h \
blob.c \
blob.h \
## brightness_contrast.c \
## brightness_contrast.h \
## bucket_fill.c \
......@@ -54,8 +54,8 @@ libapptools_la_SOURCES = \
## histogram_tool.h \
## hue_saturation.c \
## hue_saturation.h \
## ink.c \
## ink.h \
ink.c \
ink.h \
## iscissors.c \
## iscissors.h \
## levels.c \
......
This diff is collapsed.
......@@ -16,16 +16,60 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __INK_H__
#define __INK_H__
#ifndef __GIMP_INK_TOOL_H__
#define __GIMP_INK_TOOL_H__
Tool * tools_new_ink (void);
void tools_free_ink (Tool *tool);
#include "tool.h"
#include "blob.h" /* only used by ink */
/* Procedure definition and marshalling function */
extern ProcRecord ink_proc;
#define DIST_SMOOTHER_BUFFER 10
#define TIME_SMOOTHER_BUFFER 10
#endif /* __INK_H__ */
#define GIMP_TYPE_INK_TOOL (gimp_ink_tool_get_type ())
#define GIMP_INK_TOOL(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_INK_TOOL, GimpInkTool))
#define GIMP_IS_INK_TOOL(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_INK_TOOL))
#define GIMP_INK_TOOL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_INK_TOOL, GimpInkToolClass))
#define GIMP_IS_INK_TOOL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_INK_TOOL))
typedef struct _GimpInkTool GimpInkTool;
typedef struct _GimpInkToolClass GimpInkToolClass;
struct _GimpInkTool
{
GimpTool parent_instance;
Blob *last_blob; /* blob for last cursor position */
gint x1, y1; /* image space coordinate */
gint x2, y2; /* image space coords */
/* circular distance history buffer */
gdouble dt_buffer[DIST_SMOOTHER_BUFFER];
gint dt_index;
/* circular timing history buffer */
guint32 ts_buffer[TIME_SMOOTHER_BUFFER];
gint ts_index;
gdouble last_time; /* previous time of a motion event */
gdouble lastx, lasty; /* previous position of a motion event */
gboolean init_velocity;
};
struct _GimpInkToolClass
{
GimpToolClass parent_class;
};
void gimp_ink_tool_register (void);
GtkType gimp_ink_tool_get_type (void);
#endif /* __GIMP_INK_TOOL_H__ */
......@@ -34,6 +34,7 @@
#include "tool_manager.h"
#include "gimppaintbrushtool.h"
#include "ink.h"
#include "libgimp/gimpintl.h"
......
......@@ -37,7 +37,6 @@
#define GIMP_TYPE_CONVOLVE_TOOL GTK_TYPE_NONE
#define GIMP_TYPE_DODGEBURN_TOOL GTK_TYPE_NONE
#define GIMP_TYPE_SMUDGE_TOOL GTK_TYPE_NONE
#define GIMP_TYPE_INK_TOOL GTK_TYPE_NONE
/* The possibilities for where the cursor lies */
......
This diff is collapsed.
......@@ -16,16 +16,60 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __INK_H__
#define __INK_H__
#ifndef __GIMP_INK_TOOL_H__
#define __GIMP_INK_TOOL_H__
Tool * tools_new_ink (void);
void tools_free_ink (Tool *tool);
#include "tool.h"
#include "blob.h" /* only used by ink */
/* Procedure definition and marshalling function */
extern ProcRecord ink_proc;
#define DIST_SMOOTHER_BUFFER 10
#define TIME_SMOOTHER_BUFFER 10
#endif /* __INK_H__ */
#define GIMP_TYPE_INK_TOOL (gimp_ink_tool_get_type ())
#define GIMP_INK_TOOL(obj) (GTK_CHECK_CAST ((obj), GIMP_TYPE_INK_TOOL, GimpInkTool))
#define GIMP_IS_INK_TOOL(obj) (GTK_CHECK_TYPE ((obj), GIMP_TYPE_INK_TOOL))
#define GIMP_INK_TOOL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GIMP_TYPE_INK_TOOL, GimpInkToolClass))
#define GIMP_IS_INK_TOOL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_INK_TOOL))
typedef struct _GimpInkTool GimpInkTool;
typedef struct _GimpInkToolClass GimpInkToolClass;
struct _GimpInkTool
{
GimpTool parent_instance;
Blob *last_blob; /* blob for last cursor position */
gint x1, y1; /* image space coordinate */
gint x2, y2; /* image space coords */
/* circular distance history buffer */
gdouble dt_buffer[DIST_SMOOTHER_BUFFER];
gint dt_index;
/* circular timing history buffer */
guint32 ts_buffer[TIME_SMOOTHER_BUFFER];
gint ts_index;
gdouble last_time; /* previous time of a motion event */
gdouble lastx, lasty; /* previous position of a motion event */
gboolean init_velocity;
};
struct _GimpInkToolClass
{
GimpToolClass parent_class;
};
void gimp_ink_tool_register (void);
GtkType gimp_ink_tool_get_type (void);
#endif /* __GIMP_INK_TOOL_H__ */
......@@ -34,6 +34,7 @@
#include "tool_manager.h"
#include "gimppaintbrushtool.h"
#include "ink.h"
#include "libgimp/gimpintl.h"
......
......@@ -37,7 +37,6 @@
#define GIMP_TYPE_CONVOLVE_TOOL GTK_TYPE_NONE
#define GIMP_TYPE_DODGEBURN_TOOL GTK_TYPE_NONE
#define GIMP_TYPE_SMUDGE_TOOL GTK_TYPE_NONE
#define GIMP_TYPE_INK_TOOL GTK_TYPE_NONE
/* The possibilities for where the cursor lies */
......
......@@ -41,6 +41,7 @@
#include "free_select.h"
#include "fuzzy_select.h"
#include "gimpimage.h"
#include "ink.h"
#include "measure.h"
#include "move.h"
#include "gimppaintbrushtool.h"
......@@ -57,11 +58,12 @@
void
register_tools (void)
{
gimp_color_picker_tool_register ();
gimp_ink_tool_register ();
gimp_paintbrush_tool_register ();
gimp_measure_tool_register ();
gimp_move_tool_register ();
gimp_color_picker_tool_register ();
gimp_text_tool_register ();
gimp_move_tool_register ();
/*
snatched from the pdb. For inspiration only. ;)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment