Commit 015c6403 authored by David Odin's avatar David Odin
Browse files

plug-ins/gfig/gfig-dobject.c plug-ins/gfig/gfig-dobject.h

* plug-ins/gfig/gfig-dobject.c
* plug-ins/gfig/gfig-dobject.h
* plug-ins/gfig/gfig-preview.c
* plug-ins/gfig/gfig-style.h
* plug-ins/gfig/gfig-types.h
* plug-ins/gfig/gfig.h: some more cleanups. The current_style bug is
  still there :(
parent 80893fee
2004-11-02 DindinX <dindinx@gimp.org>
* plug-ins/gfig/gfig-dobject.c
* plug-ins/gfig/gfig-dobject.h
* plug-ins/gfig/gfig-preview.c
* plug-ins/gfig/gfig-style.h
* plug-ins/gfig/gfig-types.h
* plug-ins/gfig/gfig.h: some more cleanups. The current_style bug is
still there :(
2004-11-01 Øyvind Kolås <pippin@gimp.org>
 
* app/xcf/xcf-load.c: applied patch from David Gowers, extra sanity
......
......@@ -378,6 +378,7 @@ object_operation_start (GdkPoint *pnt,
d_draw_bezier (operation_obj);
}
break;
case MOVE_POINT:
if (operation_obj->type == BEZIER)
{
......@@ -405,6 +406,7 @@ object_operation_start (GdkPoint *pnt,
scan_obj_points (operation_obj->points, pnt);
}
break;
case COPY_OBJ:
/* Copy the "operation object" */
/* Then bung us into "copy/move" mode */
......@@ -420,12 +422,15 @@ object_operation_start (GdkPoint *pnt,
new_obj->class->drawfunc (new_obj);
}
break;
case DEL_OBJ:
remove_obj_from_list (gfig_context->current_obj, operation_obj);
break;
case SELECT_OBJ:
/* don't need to do anything */
break;
case MOVE_COPY_OBJ: /* Never when button down */
default:
g_warning ("Internal error selvals.otype object operation start");
......
......@@ -28,13 +28,11 @@
#include "gfig-types.h"
#include "gfig-style.h"
struct Dobject; /* fwd declaration for DobjFunc */
typedef void (*DobjFunc) (struct Dobject *);
typedef struct Dobject *(*DobjGenFunc) (struct Dobject *);
typedef struct Dobject *(*DobjLoadFunc) (FILE *);
typedef void (*DobjSaveFunc) (struct Dobject *, GString *);
typedef struct Dobject *(*DobjCreateFunc) (gint, gint);
typedef void (*DobjFunc) (Dobject *);
typedef Dobject *(*DobjGenFunc) (Dobject *);
typedef Dobject *(*DobjLoadFunc) (FILE *);
typedef void (*DobjSaveFunc) (Dobject *, GString *);
typedef Dobject *(*DobjCreateFunc) (gint, gint);
typedef struct DobjPoints
{
......@@ -55,7 +53,7 @@ typedef struct
DobjClass dobj_class[10];
/* The object itself */
typedef struct Dobject
struct _Dobject
{
DobjType type; /* What is the type? */
DobjClass *class; /* What class does it belong to? */
......@@ -63,13 +61,13 @@ typedef struct Dobject
DobjPoints *points; /* List of points */
Style style; /* this object's individual style settings */
gint style_no; /* style index of this specific object */
} Dobject;
};
typedef struct DAllObjs
struct _DAllObjs
{
struct DAllObjs *next;
Dobject *obj; /* Object on list */
} DAllObjs;
DAllObjs *next;
Dobject *obj; /* Object on list */
};
/* States of the object */
#define GFIG_OK 0x0
......
......@@ -34,6 +34,7 @@
#include "gfig.h"
#include "gfig-grid.h"
#include "gfig-dobject.h"
#include "gfig-preview.h"
#include "libgimp/stdplugins-intl.h"
......
......@@ -28,7 +28,7 @@
#include <libgimp/gimpui.h>
typedef struct
struct _Style
{
gchar *name;
gchar *brush_name;
......@@ -47,7 +47,7 @@ typedef struct
GimpRGB foreground;
GimpRGB background;
gboolean reverselines;
} Style;
};
void set_foreground_callback (GimpColorButton *button,
gpointer data);
......
......@@ -108,6 +108,9 @@ typedef enum
NULL_OPER
} DobjType;
typedef struct _GFigObj GFigObj;
typedef struct _GFigObj GFigObj;
typedef struct _DAllObjs DAllObjs;
typedef struct _Dobject Dobject;
typedef struct _Style Style;
#endif /* __GFIG_ENUMS_H__ */
......@@ -27,7 +27,7 @@
#define __GFIG_H__
#include "gfig-types.h"
#include "gfig-dobject.h"
#include "gfig-style.h"
#define MAX_UNDO 10
#define MIN_UNDO 1
......
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