mirror of https://github.com/GNOME/gimp.git
app/channel.h app/gimpimage.h app/gimpimageP.h app/layer.h app/undo.[ch]
* app/channel.h * app/gimpimage.h * app/gimpimageP.h * app/layer.h * app/undo.[ch] * app/undo_types.h: use proper naming convention for undo enums, and hide them from the pdbgen stuff * app/procedural_db.h: don't skip PDB_END * app/undo_history.c: remove gccism from undo_history_append_special * libgimp/gimpintl.h: INIT_LOCALE should be defined in all cases * plug-ins/script-fu/Makefile.am: add script-fu-constants.[ch] * plug-ins/script-fu/script-fu.c: use init_generated_constants * plug-ins/script-fu/siod.h: #include <stdio.h> for FILE * * tools/pdbgen/script-fu.pl: new file * tools/pdbgen/Makefile.am: add rule for constant script-fu gen * tools/pdbgen/enumgen.pl: add enum skip feature * tools/pdbgen/lib.pl: use nicks for gimpenums.h * tools/pdbgen/pdb/procedural_db.pdb: ignore PDB_END -Yosh
This commit is contained in:
parent
99ed75c9ef
commit
7d62a34eb4
32
ChangeLog
32
ChangeLog
|
@ -1,3 +1,35 @@
|
||||||
|
Thu Sep 23 16:29:09 PDT 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* app/channel.h
|
||||||
|
* app/gimpimage.h
|
||||||
|
* app/gimpimageP.h
|
||||||
|
* app/layer.h
|
||||||
|
* app/undo.[ch]
|
||||||
|
* app/undo_types.h: use proper naming convention for undo enums,
|
||||||
|
and hide them from the pdbgen stuff
|
||||||
|
|
||||||
|
* app/procedural_db.h: don't skip PDB_END
|
||||||
|
|
||||||
|
* app/undo_history.c: remove gccism from undo_history_append_special
|
||||||
|
|
||||||
|
* libgimp/gimpintl.h: INIT_LOCALE should be defined in all cases
|
||||||
|
|
||||||
|
* plug-ins/script-fu/Makefile.am: add script-fu-constants.[ch]
|
||||||
|
|
||||||
|
* plug-ins/script-fu/script-fu.c: use init_generated_constants
|
||||||
|
|
||||||
|
* plug-ins/script-fu/siod.h: #include <stdio.h> for FILE *
|
||||||
|
|
||||||
|
* tools/pdbgen/script-fu.pl: new file
|
||||||
|
|
||||||
|
* tools/pdbgen/Makefile.am: add rule for constant script-fu gen
|
||||||
|
|
||||||
|
* tools/pdbgen/enumgen.pl: add enum skip feature
|
||||||
|
|
||||||
|
* tools/pdbgen/lib.pl: use nicks for gimpenums.h
|
||||||
|
|
||||||
|
* tools/pdbgen/pdb/procedural_db.pdb: ignore PDB_END
|
||||||
|
|
||||||
1999-09-23 Zach Beane <xach@mint.net>
|
1999-09-23 Zach Beane <xach@mint.net>
|
||||||
|
|
||||||
* app/fileops.c: Check trust_dirty_flag preference; if we don't
|
* app/fileops.c: Check trust_dirty_flag preference; if we don't
|
||||||
|
|
|
@ -48,10 +48,11 @@ typedef enum
|
||||||
|
|
||||||
GtkType gimp_channel_get_type (void);
|
GtkType gimp_channel_get_type (void);
|
||||||
|
|
||||||
typedef enum {
|
typedef enum /*< skip >*/
|
||||||
CHANNEL_ADD_UNDO,
|
{
|
||||||
CHANNEL_REMOVE_UNDO
|
CHANNEL_ADD_UNDO,
|
||||||
} channel_undo_type;
|
CHANNEL_REMOVE_UNDO
|
||||||
|
} ChannelUndoType;
|
||||||
|
|
||||||
|
|
||||||
/* Special undo type */
|
/* Special undo type */
|
||||||
|
@ -62,7 +63,7 @@ struct _ChannelUndo
|
||||||
Channel *channel; /* the actual channel */
|
Channel *channel; /* the actual channel */
|
||||||
gint prev_position; /* former position in list */
|
gint prev_position; /* former position in list */
|
||||||
Channel *prev_channel; /* previous active channel */
|
Channel *prev_channel; /* previous active channel */
|
||||||
channel_undo_type undo_type; /* is this a new channel undo */
|
ChannelUndoType undo_type; /* is this a new channel undo */
|
||||||
/* or a remove channel undo? */
|
/* or a remove channel undo? */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -48,10 +48,11 @@ typedef enum
|
||||||
|
|
||||||
GtkType gimp_channel_get_type (void);
|
GtkType gimp_channel_get_type (void);
|
||||||
|
|
||||||
typedef enum {
|
typedef enum /*< skip >*/
|
||||||
CHANNEL_ADD_UNDO,
|
{
|
||||||
CHANNEL_REMOVE_UNDO
|
CHANNEL_ADD_UNDO,
|
||||||
} channel_undo_type;
|
CHANNEL_REMOVE_UNDO
|
||||||
|
} ChannelUndoType;
|
||||||
|
|
||||||
|
|
||||||
/* Special undo type */
|
/* Special undo type */
|
||||||
|
@ -62,7 +63,7 @@ struct _ChannelUndo
|
||||||
Channel *channel; /* the actual channel */
|
Channel *channel; /* the actual channel */
|
||||||
gint prev_position; /* former position in list */
|
gint prev_position; /* former position in list */
|
||||||
Channel *prev_channel; /* previous active channel */
|
Channel *prev_channel; /* previous active channel */
|
||||||
channel_undo_type undo_type; /* is this a new channel undo */
|
ChannelUndoType undo_type; /* is this a new channel undo */
|
||||||
/* or a remove channel undo? */
|
/* or a remove channel undo? */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -48,10 +48,11 @@ typedef enum
|
||||||
|
|
||||||
GtkType gimp_channel_get_type (void);
|
GtkType gimp_channel_get_type (void);
|
||||||
|
|
||||||
typedef enum {
|
typedef enum /*< skip >*/
|
||||||
CHANNEL_ADD_UNDO,
|
{
|
||||||
CHANNEL_REMOVE_UNDO
|
CHANNEL_ADD_UNDO,
|
||||||
} channel_undo_type;
|
CHANNEL_REMOVE_UNDO
|
||||||
|
} ChannelUndoType;
|
||||||
|
|
||||||
|
|
||||||
/* Special undo type */
|
/* Special undo type */
|
||||||
|
@ -62,7 +63,7 @@ struct _ChannelUndo
|
||||||
Channel *channel; /* the actual channel */
|
Channel *channel; /* the actual channel */
|
||||||
gint prev_position; /* former position in list */
|
gint prev_position; /* former position in list */
|
||||||
Channel *prev_channel; /* previous active channel */
|
Channel *prev_channel; /* previous active channel */
|
||||||
channel_undo_type undo_type; /* is this a new channel undo */
|
ChannelUndoType undo_type; /* is this a new channel undo */
|
||||||
/* or a remove channel undo? */
|
/* or a remove channel undo? */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -50,13 +50,15 @@
|
||||||
|
|
||||||
#define COLORMAP_SIZE 768
|
#define COLORMAP_SIZE 768
|
||||||
|
|
||||||
typedef enum {
|
typedef enum /*< skip >*/
|
||||||
|
{
|
||||||
ORIENTATION_UNKNOWN,
|
ORIENTATION_UNKNOWN,
|
||||||
ORIENTATION_HORIZONTAL,
|
ORIENTATION_HORIZONTAL,
|
||||||
ORIENTATION_VERTICAL
|
ORIENTATION_VERTICAL
|
||||||
} InternalOrientationType;
|
} InternalOrientationType;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum
|
||||||
|
{
|
||||||
HORIZONTAL,
|
HORIZONTAL,
|
||||||
VERTICAL,
|
VERTICAL,
|
||||||
UNKNOWN
|
UNKNOWN
|
||||||
|
|
|
@ -50,13 +50,15 @@
|
||||||
|
|
||||||
#define COLORMAP_SIZE 768
|
#define COLORMAP_SIZE 768
|
||||||
|
|
||||||
typedef enum {
|
typedef enum /*< skip >*/
|
||||||
|
{
|
||||||
ORIENTATION_UNKNOWN,
|
ORIENTATION_UNKNOWN,
|
||||||
ORIENTATION_HORIZONTAL,
|
ORIENTATION_HORIZONTAL,
|
||||||
ORIENTATION_VERTICAL
|
ORIENTATION_VERTICAL
|
||||||
} InternalOrientationType;
|
} InternalOrientationType;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum
|
||||||
|
{
|
||||||
HORIZONTAL,
|
HORIZONTAL,
|
||||||
VERTICAL,
|
VERTICAL,
|
||||||
UNKNOWN
|
UNKNOWN
|
||||||
|
|
|
@ -50,13 +50,15 @@
|
||||||
|
|
||||||
#define COLORMAP_SIZE 768
|
#define COLORMAP_SIZE 768
|
||||||
|
|
||||||
typedef enum {
|
typedef enum /*< skip >*/
|
||||||
|
{
|
||||||
ORIENTATION_UNKNOWN,
|
ORIENTATION_UNKNOWN,
|
||||||
ORIENTATION_HORIZONTAL,
|
ORIENTATION_HORIZONTAL,
|
||||||
ORIENTATION_VERTICAL
|
ORIENTATION_VERTICAL
|
||||||
} InternalOrientationType;
|
} InternalOrientationType;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum
|
||||||
|
{
|
||||||
HORIZONTAL,
|
HORIZONTAL,
|
||||||
VERTICAL,
|
VERTICAL,
|
||||||
UNKNOWN
|
UNKNOWN
|
||||||
|
|
|
@ -50,13 +50,15 @@
|
||||||
|
|
||||||
#define COLORMAP_SIZE 768
|
#define COLORMAP_SIZE 768
|
||||||
|
|
||||||
typedef enum {
|
typedef enum /*< skip >*/
|
||||||
|
{
|
||||||
ORIENTATION_UNKNOWN,
|
ORIENTATION_UNKNOWN,
|
||||||
ORIENTATION_HORIZONTAL,
|
ORIENTATION_HORIZONTAL,
|
||||||
ORIENTATION_VERTICAL
|
ORIENTATION_VERTICAL
|
||||||
} InternalOrientationType;
|
} InternalOrientationType;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum
|
||||||
|
{
|
||||||
HORIZONTAL,
|
HORIZONTAL,
|
||||||
VERTICAL,
|
VERTICAL,
|
||||||
UNKNOWN
|
UNKNOWN
|
||||||
|
|
|
@ -50,13 +50,15 @@
|
||||||
|
|
||||||
#define COLORMAP_SIZE 768
|
#define COLORMAP_SIZE 768
|
||||||
|
|
||||||
typedef enum {
|
typedef enum /*< skip >*/
|
||||||
|
{
|
||||||
ORIENTATION_UNKNOWN,
|
ORIENTATION_UNKNOWN,
|
||||||
ORIENTATION_HORIZONTAL,
|
ORIENTATION_HORIZONTAL,
|
||||||
ORIENTATION_VERTICAL
|
ORIENTATION_VERTICAL
|
||||||
} InternalOrientationType;
|
} InternalOrientationType;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum
|
||||||
|
{
|
||||||
HORIZONTAL,
|
HORIZONTAL,
|
||||||
VERTICAL,
|
VERTICAL,
|
||||||
UNKNOWN
|
UNKNOWN
|
||||||
|
|
|
@ -51,17 +51,17 @@
|
||||||
typedef enum {
|
typedef enum {
|
||||||
UNDO = 0,
|
UNDO = 0,
|
||||||
REDO = 1
|
REDO = 1
|
||||||
} undo_state;
|
} UndoState;
|
||||||
|
|
||||||
|
|
||||||
typedef int (* UndoPopFunc) (GImage *, undo_state, undo_type, void *);
|
typedef int (* UndoPopFunc) (GImage *, UndoState, UndoType, void *);
|
||||||
typedef void (* UndoFreeFunc) (undo_state, void *);
|
typedef void (* UndoFreeFunc) (UndoState, void *);
|
||||||
|
|
||||||
typedef struct _undo Undo;
|
typedef struct _undo Undo;
|
||||||
|
|
||||||
struct _undo
|
struct _undo
|
||||||
{
|
{
|
||||||
undo_type type; /* undo type */
|
UndoType type; /* undo type */
|
||||||
void * data; /* data to implement the undo, NULL for group */
|
void * data; /* data to implement the undo, NULL for group */
|
||||||
long bytes; /* size of undo item */
|
long bytes; /* size of undo item */
|
||||||
gboolean dirties_image; /* TRUE if undo mutates image */
|
gboolean dirties_image; /* TRUE if undo mutates image */
|
||||||
|
@ -72,55 +72,55 @@ struct _undo
|
||||||
|
|
||||||
/* Pop functions */
|
/* Pop functions */
|
||||||
|
|
||||||
static int undo_pop_image (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_image (GImage *, UndoState, UndoType, void *);
|
||||||
static int undo_pop_mask (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_mask (GImage *, UndoState, UndoType, void *);
|
||||||
static int undo_pop_layer_displace (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_layer_displace (GImage *, UndoState, UndoType, void *);
|
||||||
static int undo_pop_transform (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_transform (GImage *, UndoState, UndoType, void *);
|
||||||
static int undo_pop_paint (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_paint (GImage *, UndoState, UndoType, void *);
|
||||||
static int undo_pop_layer (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_layer (GImage *, UndoState, UndoType, void *);
|
||||||
static int undo_pop_layer_mod (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_layer_mod (GImage *, UndoState, UndoType, void *);
|
||||||
static int undo_pop_layer_mask (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_layer_mask (GImage *, UndoState, UndoType, void *);
|
||||||
static int undo_pop_channel (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_channel (GImage *, UndoState, UndoType, void *);
|
||||||
static int undo_pop_channel_mod (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_channel_mod (GImage *, UndoState, UndoType, void *);
|
||||||
static int undo_pop_fs_to_layer (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_fs_to_layer (GImage *, UndoState, UndoType, void *);
|
||||||
static int undo_pop_fs_rigor (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_fs_rigor (GImage *, UndoState, UndoType, void *);
|
||||||
static int undo_pop_fs_relax (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_fs_relax (GImage *, UndoState, UndoType, void *);
|
||||||
static int undo_pop_gimage_mod (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_gimage_mod (GImage *, UndoState, UndoType, void *);
|
||||||
static int undo_pop_guide (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_guide (GImage *, UndoState, UndoType, void *);
|
||||||
static int undo_pop_parasite (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_parasite (GImage *, UndoState, UndoType, void *);
|
||||||
static int undo_pop_qmask (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_qmask (GImage *, UndoState, UndoType, void *);
|
||||||
static int undo_pop_layer_rename (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_layer_rename (GImage *, UndoState, UndoType, void *);
|
||||||
static int undo_pop_cantundo (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_cantundo (GImage *, UndoState, UndoType, void *);
|
||||||
|
|
||||||
|
|
||||||
/* Free functions */
|
/* Free functions */
|
||||||
|
|
||||||
static void undo_free_image (undo_state, void *);
|
static void undo_free_image (UndoState, void *);
|
||||||
static void undo_free_mask (undo_state, void *);
|
static void undo_free_mask (UndoState, void *);
|
||||||
static void undo_free_layer_displace (undo_state, void *);
|
static void undo_free_layer_displace (UndoState, void *);
|
||||||
static void undo_free_transform (undo_state, void *);
|
static void undo_free_transform (UndoState, void *);
|
||||||
static void undo_free_paint (undo_state, void *);
|
static void undo_free_paint (UndoState, void *);
|
||||||
static void undo_free_layer (undo_state, void *);
|
static void undo_free_layer (UndoState, void *);
|
||||||
static void undo_free_layer_mod (undo_state, void *);
|
static void undo_free_layer_mod (UndoState, void *);
|
||||||
static void undo_free_layer_mask (undo_state, void *);
|
static void undo_free_layer_mask (UndoState, void *);
|
||||||
static void undo_free_channel (undo_state, void *);
|
static void undo_free_channel (UndoState, void *);
|
||||||
static void undo_free_channel_mod (undo_state, void *);
|
static void undo_free_channel_mod (UndoState, void *);
|
||||||
static void undo_free_fs_to_layer (undo_state, void *);
|
static void undo_free_fs_to_layer (UndoState, void *);
|
||||||
static void undo_free_fs_rigor (undo_state, void *);
|
static void undo_free_fs_rigor (UndoState, void *);
|
||||||
static void undo_free_fs_relax (undo_state, void *);
|
static void undo_free_fs_relax (UndoState, void *);
|
||||||
static void undo_free_gimage_mod (undo_state, void *);
|
static void undo_free_gimage_mod (UndoState, void *);
|
||||||
static void undo_free_guide (undo_state, void *);
|
static void undo_free_guide (UndoState, void *);
|
||||||
static void undo_free_parasite (undo_state, void *);
|
static void undo_free_parasite (UndoState, void *);
|
||||||
static void undo_free_qmask (undo_state, void *);
|
static void undo_free_qmask (UndoState, void *);
|
||||||
static void undo_free_layer_rename (undo_state, void *);
|
static void undo_free_layer_rename (UndoState, void *);
|
||||||
static void undo_free_cantundo (undo_state, void *);
|
static void undo_free_cantundo (UndoState, void *);
|
||||||
|
|
||||||
|
|
||||||
/* Sizing functions */
|
/* Sizing functions */
|
||||||
static int layer_size (Layer *);
|
static int layer_size (Layer *);
|
||||||
static int channel_size (Channel *);
|
static int channel_size (Channel *);
|
||||||
|
|
||||||
static const char *undo_type_to_name (undo_type);
|
static const char *undo_type_to_name (UndoType);
|
||||||
|
|
||||||
static int shrink_wrap = FALSE;
|
static int shrink_wrap = FALSE;
|
||||||
|
|
||||||
|
@ -155,7 +155,7 @@ channel_size (Channel *channel)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_list (GImage *gimage,
|
undo_free_list (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
GSList *list)
|
GSList *list)
|
||||||
{
|
{
|
||||||
GSList * orig;
|
GSList * orig;
|
||||||
|
@ -251,7 +251,7 @@ undo_free_up_space (GImage *gimage)
|
||||||
static Undo *
|
static Undo *
|
||||||
undo_push (GImage *gimage,
|
undo_push (GImage *gimage,
|
||||||
long size,
|
long size,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
gboolean dirties_image)
|
gboolean dirties_image)
|
||||||
{
|
{
|
||||||
Undo * new;
|
Undo * new;
|
||||||
|
@ -312,7 +312,7 @@ static int
|
||||||
pop_stack (GImage *gimage,
|
pop_stack (GImage *gimage,
|
||||||
GSList **stack_ptr,
|
GSList **stack_ptr,
|
||||||
GSList **unstack_ptr,
|
GSList **unstack_ptr,
|
||||||
undo_state state)
|
UndoState state)
|
||||||
{
|
{
|
||||||
Undo * object;
|
Undo * object;
|
||||||
GSList *stack;
|
GSList *stack;
|
||||||
|
@ -573,7 +573,7 @@ undo_free (GImage *gimage)
|
||||||
|
|
||||||
int
|
int
|
||||||
undo_push_group_start (GImage *gimage,
|
undo_push_group_start (GImage *gimage,
|
||||||
undo_type type)
|
UndoType type)
|
||||||
{
|
{
|
||||||
if (! gimage->undo_on)
|
if (! gimage->undo_on)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -765,8 +765,8 @@ undo_push_image_mod (GImage *gimage,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_image (GImage *gimage,
|
undo_pop_image (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *image_undo_ptr)
|
void *image_undo_ptr)
|
||||||
{
|
{
|
||||||
ImageUndo *image_undo;
|
ImageUndo *image_undo;
|
||||||
|
@ -846,7 +846,7 @@ undo_pop_image (GImage *gimage,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_image (undo_state state,
|
undo_free_image (UndoState state,
|
||||||
void *image_undo_ptr)
|
void *image_undo_ptr)
|
||||||
{
|
{
|
||||||
ImageUndo *image_undo;
|
ImageUndo *image_undo;
|
||||||
|
@ -895,8 +895,8 @@ undo_push_mask (GImage *gimage,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_mask (GImage *gimage,
|
undo_pop_mask (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *mask_ptr)
|
void *mask_ptr)
|
||||||
{
|
{
|
||||||
MaskUndo *mask_undo;
|
MaskUndo *mask_undo;
|
||||||
|
@ -980,7 +980,7 @@ undo_pop_mask (GImage *gimage,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_mask (undo_state state,
|
undo_free_mask (UndoState state,
|
||||||
void *mask_ptr)
|
void *mask_ptr)
|
||||||
{
|
{
|
||||||
MaskUndo *mask_undo;
|
MaskUndo *mask_undo;
|
||||||
|
@ -1022,8 +1022,8 @@ undo_push_layer_displace (GImage *gimage,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_layer_displace (GImage *gimage,
|
undo_pop_layer_displace (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *info_ptr)
|
void *info_ptr)
|
||||||
{
|
{
|
||||||
Layer * layer;
|
Layer * layer;
|
||||||
|
@ -1070,7 +1070,7 @@ undo_pop_layer_displace (GImage *gimage,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_layer_displace (undo_state state,
|
undo_free_layer_displace (UndoState state,
|
||||||
void *info_ptr)
|
void *info_ptr)
|
||||||
{
|
{
|
||||||
g_free (info_ptr);
|
g_free (info_ptr);
|
||||||
|
@ -1107,8 +1107,8 @@ undo_push_transform (GImage *gimage,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_transform (GImage *gimage,
|
undo_pop_transform (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *tu_ptr)
|
void *tu_ptr)
|
||||||
{
|
{
|
||||||
TransformCore * tc;
|
TransformCore * tc;
|
||||||
|
@ -1156,7 +1156,7 @@ undo_pop_transform (GImage *gimage,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_transform (undo_state state,
|
undo_free_transform (UndoState state,
|
||||||
void *tu_ptr)
|
void *tu_ptr)
|
||||||
{
|
{
|
||||||
TransformUndo * tu;
|
TransformUndo * tu;
|
||||||
|
@ -1199,8 +1199,8 @@ undo_push_paint (GImage *gimage,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_paint (GImage *gimage,
|
undo_pop_paint (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *pu_ptr)
|
void *pu_ptr)
|
||||||
{
|
{
|
||||||
PaintCore * pc;
|
PaintCore * pc;
|
||||||
|
@ -1244,7 +1244,7 @@ undo_pop_paint (GImage *gimage,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_paint (undo_state state,
|
undo_free_paint (UndoState state,
|
||||||
void *pu_ptr)
|
void *pu_ptr)
|
||||||
{
|
{
|
||||||
PaintUndo * pu;
|
PaintUndo * pu;
|
||||||
|
@ -1293,8 +1293,8 @@ undo_push_layer (GImage *gimage,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_layer (GImage *gimage,
|
undo_pop_layer (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *lu_ptr)
|
void *lu_ptr)
|
||||||
{
|
{
|
||||||
LayerUndo *lu;
|
LayerUndo *lu;
|
||||||
|
@ -1366,7 +1366,7 @@ undo_pop_layer (GImage *gimage,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_layer (undo_state state,
|
undo_free_layer (UndoState state,
|
||||||
void *lu_ptr)
|
void *lu_ptr)
|
||||||
{
|
{
|
||||||
LayerUndo *lu;
|
LayerUndo *lu;
|
||||||
|
@ -1433,8 +1433,8 @@ undo_push_layer_mod (GImage *gimage,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_layer_mod (GImage *gimage,
|
undo_pop_layer_mod (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *data_ptr)
|
void *data_ptr)
|
||||||
{
|
{
|
||||||
void **data;
|
void **data;
|
||||||
|
@ -1502,7 +1502,7 @@ undo_pop_layer_mod (GImage *gimage,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_layer_mod (undo_state state,
|
undo_free_layer_mod (UndoState state,
|
||||||
void *data_ptr)
|
void *data_ptr)
|
||||||
{
|
{
|
||||||
void ** data;
|
void ** data;
|
||||||
|
@ -1551,8 +1551,8 @@ undo_push_layer_mask (GImage *gimage,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_layer_mask (GImage *gimage,
|
undo_pop_layer_mask (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *lmu_ptr)
|
void *lmu_ptr)
|
||||||
{
|
{
|
||||||
LayerMaskUndo *lmu;
|
LayerMaskUndo *lmu;
|
||||||
|
@ -1611,7 +1611,7 @@ undo_pop_layer_mask (GImage *gimage,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_layer_mask (undo_state state,
|
undo_free_layer_mask (UndoState state,
|
||||||
void *lmu_ptr)
|
void *lmu_ptr)
|
||||||
{
|
{
|
||||||
LayerMaskUndo *lmu;
|
LayerMaskUndo *lmu;
|
||||||
|
@ -1668,8 +1668,8 @@ undo_push_channel (GImage *gimage,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_channel (GImage *gimage,
|
undo_pop_channel (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *cu_ptr)
|
void *cu_ptr)
|
||||||
{
|
{
|
||||||
ChannelUndo *cu;
|
ChannelUndo *cu;
|
||||||
|
@ -1725,7 +1725,7 @@ undo_pop_channel (GImage *gimage,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_channel (undo_state state,
|
undo_free_channel (UndoState state,
|
||||||
void *cu_ptr)
|
void *cu_ptr)
|
||||||
{
|
{
|
||||||
ChannelUndo *cu;
|
ChannelUndo *cu;
|
||||||
|
@ -1788,8 +1788,8 @@ undo_push_channel_mod (GImage *gimage,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_channel_mod (GImage *gimage,
|
undo_pop_channel_mod (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *data_ptr)
|
void *data_ptr)
|
||||||
{
|
{
|
||||||
void **data;
|
void **data;
|
||||||
|
@ -1833,7 +1833,7 @@ undo_pop_channel_mod (GImage *gimage,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_channel_mod (undo_state state,
|
undo_free_channel_mod (UndoState state,
|
||||||
void *data_ptr)
|
void *data_ptr)
|
||||||
{
|
{
|
||||||
void ** data;
|
void ** data;
|
||||||
|
@ -1881,8 +1881,8 @@ undo_push_fs_to_layer (GImage *gimage,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_fs_to_layer (GImage *gimage,
|
undo_pop_fs_to_layer (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *fsu_ptr)
|
void *fsu_ptr)
|
||||||
{
|
{
|
||||||
FStoLayerUndo *fsu;
|
FStoLayerUndo *fsu;
|
||||||
|
@ -1952,7 +1952,7 @@ undo_pop_fs_to_layer (GImage *gimage,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_fs_to_layer (undo_state state,
|
undo_free_fs_to_layer (UndoState state,
|
||||||
void *fsu_ptr)
|
void *fsu_ptr)
|
||||||
{
|
{
|
||||||
FStoLayerUndo *fsu;
|
FStoLayerUndo *fsu;
|
||||||
|
@ -1994,8 +1994,8 @@ undo_push_fs_rigor (GImage *gimage,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_fs_rigor (GImage *gimage,
|
undo_pop_fs_rigor (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *layer_ptr)
|
void *layer_ptr)
|
||||||
{
|
{
|
||||||
int layer_id;
|
int layer_id;
|
||||||
|
@ -2036,7 +2036,7 @@ undo_pop_fs_rigor (GImage *gimage,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_fs_rigor (undo_state state,
|
undo_free_fs_rigor (UndoState state,
|
||||||
void *layer_ptr)
|
void *layer_ptr)
|
||||||
{
|
{
|
||||||
g_free (layer_ptr);
|
g_free (layer_ptr);
|
||||||
|
@ -2072,8 +2072,8 @@ undo_push_fs_relax (GImage *gimage,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_fs_relax (GImage *gimage,
|
undo_pop_fs_relax (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *layer_ptr)
|
void *layer_ptr)
|
||||||
{
|
{
|
||||||
int layer_id;
|
int layer_id;
|
||||||
|
@ -2114,7 +2114,7 @@ undo_pop_fs_relax (GImage *gimage,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_fs_relax (undo_state state,
|
undo_free_fs_relax (UndoState state,
|
||||||
void *layer_ptr)
|
void *layer_ptr)
|
||||||
{
|
{
|
||||||
g_free (layer_ptr);
|
g_free (layer_ptr);
|
||||||
|
@ -2153,8 +2153,8 @@ undo_push_gimage_mod (GImage *gimage)
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_gimage_mod (GImage *gimage,
|
undo_pop_gimage_mod (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *data_ptr)
|
void *data_ptr)
|
||||||
{
|
{
|
||||||
int *data;
|
int *data;
|
||||||
|
@ -2190,7 +2190,7 @@ undo_pop_gimage_mod (GImage *gimage,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_gimage_mod (undo_state state,
|
undo_free_gimage_mod (UndoState state,
|
||||||
void *data_ptr)
|
void *data_ptr)
|
||||||
{
|
{
|
||||||
g_free (data_ptr);
|
g_free (data_ptr);
|
||||||
|
@ -2238,8 +2238,8 @@ undo_push_qmask (GImage *gimage,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_qmask (GImage *gimage,
|
undo_pop_qmask (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *data_ptr)
|
void *data_ptr)
|
||||||
{
|
{
|
||||||
QmaskUndo *data;
|
QmaskUndo *data;
|
||||||
|
@ -2258,7 +2258,7 @@ undo_pop_qmask (GImage *gimage,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_qmask (undo_state state,
|
undo_free_qmask (UndoState state,
|
||||||
void *data_ptr)
|
void *data_ptr)
|
||||||
{
|
{
|
||||||
g_free (data_ptr);
|
g_free (data_ptr);
|
||||||
|
@ -2307,8 +2307,8 @@ undo_push_guide (GImage *gimage,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_guide (GImage *gimage,
|
undo_pop_guide (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *data_ptr)
|
void *data_ptr)
|
||||||
{
|
{
|
||||||
GuideUndo *data;
|
GuideUndo *data;
|
||||||
|
@ -2331,7 +2331,7 @@ undo_pop_guide (GImage *gimage,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_guide (undo_state state,
|
undo_free_guide (UndoState state,
|
||||||
void *data_ptr)
|
void *data_ptr)
|
||||||
{
|
{
|
||||||
GuideUndo *data;
|
GuideUndo *data;
|
||||||
|
@ -2474,8 +2474,8 @@ undo_push_drawable_parasite_remove (GImage *gimage,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_parasite (GImage *gimage,
|
undo_pop_parasite (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *data_ptr)
|
void *data_ptr)
|
||||||
{
|
{
|
||||||
ParasiteUndo *data;
|
ParasiteUndo *data;
|
||||||
|
@ -2520,7 +2520,7 @@ undo_pop_parasite (GImage *gimage,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_parasite (undo_state state,
|
undo_free_parasite (UndoState state,
|
||||||
void *data_ptr)
|
void *data_ptr)
|
||||||
{
|
{
|
||||||
ParasiteUndo *data;
|
ParasiteUndo *data;
|
||||||
|
@ -2576,8 +2576,8 @@ undo_push_layer_rename (GImage *gimage, Layer *layer)
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_layer_rename (GImage *gimage,
|
undo_pop_layer_rename (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *data_ptr)
|
void *data_ptr)
|
||||||
{
|
{
|
||||||
LayerRenameUndo *data = data_ptr;
|
LayerRenameUndo *data = data_ptr;
|
||||||
|
@ -2602,7 +2602,7 @@ undo_pop_layer_rename (GImage *gimage,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_layer_rename (undo_state state,
|
undo_free_layer_rename (UndoState state,
|
||||||
void *data_ptr)
|
void *data_ptr)
|
||||||
{
|
{
|
||||||
LayerRenameUndo *data = data_ptr;
|
LayerRenameUndo *data = data_ptr;
|
||||||
|
@ -2642,8 +2642,8 @@ undo_push_cantundo (GImage *gimage,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_cantundo (GImage *gimage,
|
undo_pop_cantundo (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *data_ptr)
|
void *data_ptr)
|
||||||
{
|
{
|
||||||
char *action = data_ptr;
|
char *action = data_ptr;
|
||||||
|
@ -2663,13 +2663,13 @@ undo_pop_cantundo (GImage *gimage,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_cantundo (undo_state state, void *data_ptr)
|
undo_free_cantundo (UndoState state, void *data_ptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static struct undo_name_t {
|
static struct undo_name_t {
|
||||||
undo_type type;
|
UndoType type;
|
||||||
const char *name;
|
const char *name;
|
||||||
} undo_name[] = {
|
} undo_name[] = {
|
||||||
{0, N_("<<invalid>>")},
|
{0, N_("<<invalid>>")},
|
||||||
|
@ -2712,7 +2712,7 @@ static struct undo_name_t {
|
||||||
|
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
undo_type_to_name (undo_type type)
|
undo_type_to_name (UndoType type)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
/* Undo interface functions */
|
/* Undo interface functions */
|
||||||
|
|
||||||
int undo_push_group_start (GImage *, undo_type);
|
int undo_push_group_start (GImage *, UndoType);
|
||||||
int undo_push_group_end (GImage *);
|
int undo_push_group_end (GImage *);
|
||||||
int undo_push_image (GImage *, GimpDrawable *, int, int, int, int);
|
int undo_push_image (GImage *, GimpDrawable *, int, int, int, int);
|
||||||
int undo_push_image_mod (GImage *, GimpDrawable *, int, int, int, int, void *, int);
|
int undo_push_image_mod (GImage *, GimpDrawable *, int, int, int, int, void *, int);
|
||||||
|
|
|
@ -50,13 +50,15 @@
|
||||||
|
|
||||||
#define COLORMAP_SIZE 768
|
#define COLORMAP_SIZE 768
|
||||||
|
|
||||||
typedef enum {
|
typedef enum /*< skip >*/
|
||||||
|
{
|
||||||
ORIENTATION_UNKNOWN,
|
ORIENTATION_UNKNOWN,
|
||||||
ORIENTATION_HORIZONTAL,
|
ORIENTATION_HORIZONTAL,
|
||||||
ORIENTATION_VERTICAL
|
ORIENTATION_VERTICAL
|
||||||
} InternalOrientationType;
|
} InternalOrientationType;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum
|
||||||
|
{
|
||||||
HORIZONTAL,
|
HORIZONTAL,
|
||||||
VERTICAL,
|
VERTICAL,
|
||||||
UNKNOWN
|
UNKNOWN
|
||||||
|
|
|
@ -46,17 +46,18 @@ GtkType gimp_layer_mask_get_type (void);
|
||||||
|
|
||||||
/* Special undo types */
|
/* Special undo types */
|
||||||
|
|
||||||
typedef enum {
|
typedef enum /*< skip >*/
|
||||||
|
{
|
||||||
LAYER_ADD_UNDO = 0,
|
LAYER_ADD_UNDO = 0,
|
||||||
LAYER_REMOVE_UNDO = 1
|
LAYER_REMOVE_UNDO = 1
|
||||||
} layer_undo_type;
|
} LayerUndoType;
|
||||||
|
|
||||||
struct _layer_undo
|
struct _layer_undo
|
||||||
{
|
{
|
||||||
Layer *layer; /* the actual layer */
|
Layer *layer; /* the actual layer */
|
||||||
gint prev_position; /* former position in list */
|
gint prev_position; /* former position in list */
|
||||||
Layer *prev_layer; /* previous active layer */
|
Layer *prev_layer; /* previous active layer */
|
||||||
layer_undo_type undo_type; /* is this a new layer undo *
|
LayerUndoType undo_type; /* is this a new layer undo *
|
||||||
* or a remove layer undo? */
|
* or a remove layer undo? */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -68,7 +69,7 @@ struct _layer_mask_undo
|
||||||
gboolean show_mask; /* show the mask? */
|
gboolean show_mask; /* show the mask? */
|
||||||
LayerMask *mask; /* the layer mask */
|
LayerMask *mask; /* the layer mask */
|
||||||
gint mode; /* the application mode */
|
gint mode; /* the application mode */
|
||||||
layer_undo_type undo_type; /* is this a new layer mask */
|
LayerUndoType undo_type; /* is this a new layer mask */
|
||||||
/* or a remove layer mask */
|
/* or a remove layer mask */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -50,13 +50,15 @@
|
||||||
|
|
||||||
#define COLORMAP_SIZE 768
|
#define COLORMAP_SIZE 768
|
||||||
|
|
||||||
typedef enum {
|
typedef enum /*< skip >*/
|
||||||
|
{
|
||||||
ORIENTATION_UNKNOWN,
|
ORIENTATION_UNKNOWN,
|
||||||
ORIENTATION_HORIZONTAL,
|
ORIENTATION_HORIZONTAL,
|
||||||
ORIENTATION_VERTICAL
|
ORIENTATION_VERTICAL
|
||||||
} InternalOrientationType;
|
} InternalOrientationType;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum
|
||||||
|
{
|
||||||
HORIZONTAL,
|
HORIZONTAL,
|
||||||
VERTICAL,
|
VERTICAL,
|
||||||
UNKNOWN
|
UNKNOWN
|
||||||
|
|
|
@ -48,10 +48,11 @@ typedef enum
|
||||||
|
|
||||||
GtkType gimp_channel_get_type (void);
|
GtkType gimp_channel_get_type (void);
|
||||||
|
|
||||||
typedef enum {
|
typedef enum /*< skip >*/
|
||||||
CHANNEL_ADD_UNDO,
|
{
|
||||||
CHANNEL_REMOVE_UNDO
|
CHANNEL_ADD_UNDO,
|
||||||
} channel_undo_type;
|
CHANNEL_REMOVE_UNDO
|
||||||
|
} ChannelUndoType;
|
||||||
|
|
||||||
|
|
||||||
/* Special undo type */
|
/* Special undo type */
|
||||||
|
@ -62,7 +63,7 @@ struct _ChannelUndo
|
||||||
Channel *channel; /* the actual channel */
|
Channel *channel; /* the actual channel */
|
||||||
gint prev_position; /* former position in list */
|
gint prev_position; /* former position in list */
|
||||||
Channel *prev_channel; /* previous active channel */
|
Channel *prev_channel; /* previous active channel */
|
||||||
channel_undo_type undo_type; /* is this a new channel undo */
|
ChannelUndoType undo_type; /* is this a new channel undo */
|
||||||
/* or a remove channel undo? */
|
/* or a remove channel undo? */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -50,13 +50,15 @@
|
||||||
|
|
||||||
#define COLORMAP_SIZE 768
|
#define COLORMAP_SIZE 768
|
||||||
|
|
||||||
typedef enum {
|
typedef enum /*< skip >*/
|
||||||
|
{
|
||||||
ORIENTATION_UNKNOWN,
|
ORIENTATION_UNKNOWN,
|
||||||
ORIENTATION_HORIZONTAL,
|
ORIENTATION_HORIZONTAL,
|
||||||
ORIENTATION_VERTICAL
|
ORIENTATION_VERTICAL
|
||||||
} InternalOrientationType;
|
} InternalOrientationType;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum
|
||||||
|
{
|
||||||
HORIZONTAL,
|
HORIZONTAL,
|
||||||
VERTICAL,
|
VERTICAL,
|
||||||
UNKNOWN
|
UNKNOWN
|
||||||
|
|
|
@ -99,7 +99,7 @@ struct _GimpImage
|
||||||
gint undo_bytes; /* bytes in undo stack */
|
gint undo_bytes; /* bytes in undo stack */
|
||||||
gint undo_levels; /* levels in undo stack */
|
gint undo_levels; /* levels in undo stack */
|
||||||
gint group_count; /* nested undo groups */
|
gint group_count; /* nested undo groups */
|
||||||
undo_type pushing_undo_group; /* undo group status flag */
|
UndoType pushing_undo_group; /* undo group status flag */
|
||||||
GtkWidget *undo_history; /* history viewer, or NULL */
|
GtkWidget *undo_history; /* history viewer, or NULL */
|
||||||
|
|
||||||
/* Composite preview */
|
/* Composite preview */
|
||||||
|
|
|
@ -46,17 +46,18 @@ GtkType gimp_layer_mask_get_type (void);
|
||||||
|
|
||||||
/* Special undo types */
|
/* Special undo types */
|
||||||
|
|
||||||
typedef enum {
|
typedef enum /*< skip >*/
|
||||||
|
{
|
||||||
LAYER_ADD_UNDO = 0,
|
LAYER_ADD_UNDO = 0,
|
||||||
LAYER_REMOVE_UNDO = 1
|
LAYER_REMOVE_UNDO = 1
|
||||||
} layer_undo_type;
|
} LayerUndoType;
|
||||||
|
|
||||||
struct _layer_undo
|
struct _layer_undo
|
||||||
{
|
{
|
||||||
Layer *layer; /* the actual layer */
|
Layer *layer; /* the actual layer */
|
||||||
gint prev_position; /* former position in list */
|
gint prev_position; /* former position in list */
|
||||||
Layer *prev_layer; /* previous active layer */
|
Layer *prev_layer; /* previous active layer */
|
||||||
layer_undo_type undo_type; /* is this a new layer undo *
|
LayerUndoType undo_type; /* is this a new layer undo *
|
||||||
* or a remove layer undo? */
|
* or a remove layer undo? */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -68,7 +69,7 @@ struct _layer_mask_undo
|
||||||
gboolean show_mask; /* show the mask? */
|
gboolean show_mask; /* show the mask? */
|
||||||
LayerMask *mask; /* the layer mask */
|
LayerMask *mask; /* the layer mask */
|
||||||
gint mode; /* the application mode */
|
gint mode; /* the application mode */
|
||||||
layer_undo_type undo_type; /* is this a new layer mask */
|
LayerUndoType undo_type; /* is this a new layer mask */
|
||||||
/* or a remove layer mask */
|
/* or a remove layer mask */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -46,17 +46,18 @@ GtkType gimp_layer_mask_get_type (void);
|
||||||
|
|
||||||
/* Special undo types */
|
/* Special undo types */
|
||||||
|
|
||||||
typedef enum {
|
typedef enum /*< skip >*/
|
||||||
|
{
|
||||||
LAYER_ADD_UNDO = 0,
|
LAYER_ADD_UNDO = 0,
|
||||||
LAYER_REMOVE_UNDO = 1
|
LAYER_REMOVE_UNDO = 1
|
||||||
} layer_undo_type;
|
} LayerUndoType;
|
||||||
|
|
||||||
struct _layer_undo
|
struct _layer_undo
|
||||||
{
|
{
|
||||||
Layer *layer; /* the actual layer */
|
Layer *layer; /* the actual layer */
|
||||||
gint prev_position; /* former position in list */
|
gint prev_position; /* former position in list */
|
||||||
Layer *prev_layer; /* previous active layer */
|
Layer *prev_layer; /* previous active layer */
|
||||||
layer_undo_type undo_type; /* is this a new layer undo *
|
LayerUndoType undo_type; /* is this a new layer undo *
|
||||||
* or a remove layer undo? */
|
* or a remove layer undo? */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -68,7 +69,7 @@ struct _layer_mask_undo
|
||||||
gboolean show_mask; /* show the mask? */
|
gboolean show_mask; /* show the mask? */
|
||||||
LayerMask *mask; /* the layer mask */
|
LayerMask *mask; /* the layer mask */
|
||||||
gint mode; /* the application mode */
|
gint mode; /* the application mode */
|
||||||
layer_undo_type undo_type; /* is this a new layer mask */
|
LayerUndoType undo_type; /* is this a new layer mask */
|
||||||
/* or a remove layer mask */
|
/* or a remove layer mask */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ typedef enum
|
||||||
PDB_PATH,
|
PDB_PATH,
|
||||||
PDB_PARASITE,
|
PDB_PARASITE,
|
||||||
PDB_STATUS,
|
PDB_STATUS,
|
||||||
PDB_END /*< skip >*/
|
PDB_END
|
||||||
} PDBArgType;
|
} PDBArgType;
|
||||||
|
|
||||||
/* Error types */
|
/* Error types */
|
||||||
|
|
|
@ -90,7 +90,8 @@ static const char * const type_str[] =
|
||||||
"PDB_BOUNDARY",
|
"PDB_BOUNDARY",
|
||||||
"PDB_PATH",
|
"PDB_PATH",
|
||||||
"PDB_PARASITE",
|
"PDB_PARASITE",
|
||||||
"PDB_STATUS"
|
"PDB_STATUS",
|
||||||
|
"PDB_END"
|
||||||
};
|
};
|
||||||
|
|
||||||
static ProcRecord procedural_db_dump_proc;
|
static ProcRecord procedural_db_dump_proc;
|
||||||
|
|
212
app/undo.c
212
app/undo.c
|
@ -51,17 +51,17 @@
|
||||||
typedef enum {
|
typedef enum {
|
||||||
UNDO = 0,
|
UNDO = 0,
|
||||||
REDO = 1
|
REDO = 1
|
||||||
} undo_state;
|
} UndoState;
|
||||||
|
|
||||||
|
|
||||||
typedef int (* UndoPopFunc) (GImage *, undo_state, undo_type, void *);
|
typedef int (* UndoPopFunc) (GImage *, UndoState, UndoType, void *);
|
||||||
typedef void (* UndoFreeFunc) (undo_state, void *);
|
typedef void (* UndoFreeFunc) (UndoState, void *);
|
||||||
|
|
||||||
typedef struct _undo Undo;
|
typedef struct _undo Undo;
|
||||||
|
|
||||||
struct _undo
|
struct _undo
|
||||||
{
|
{
|
||||||
undo_type type; /* undo type */
|
UndoType type; /* undo type */
|
||||||
void * data; /* data to implement the undo, NULL for group */
|
void * data; /* data to implement the undo, NULL for group */
|
||||||
long bytes; /* size of undo item */
|
long bytes; /* size of undo item */
|
||||||
gboolean dirties_image; /* TRUE if undo mutates image */
|
gboolean dirties_image; /* TRUE if undo mutates image */
|
||||||
|
@ -72,55 +72,55 @@ struct _undo
|
||||||
|
|
||||||
/* Pop functions */
|
/* Pop functions */
|
||||||
|
|
||||||
static int undo_pop_image (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_image (GImage *, UndoState, UndoType, void *);
|
||||||
static int undo_pop_mask (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_mask (GImage *, UndoState, UndoType, void *);
|
||||||
static int undo_pop_layer_displace (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_layer_displace (GImage *, UndoState, UndoType, void *);
|
||||||
static int undo_pop_transform (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_transform (GImage *, UndoState, UndoType, void *);
|
||||||
static int undo_pop_paint (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_paint (GImage *, UndoState, UndoType, void *);
|
||||||
static int undo_pop_layer (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_layer (GImage *, UndoState, UndoType, void *);
|
||||||
static int undo_pop_layer_mod (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_layer_mod (GImage *, UndoState, UndoType, void *);
|
||||||
static int undo_pop_layer_mask (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_layer_mask (GImage *, UndoState, UndoType, void *);
|
||||||
static int undo_pop_channel (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_channel (GImage *, UndoState, UndoType, void *);
|
||||||
static int undo_pop_channel_mod (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_channel_mod (GImage *, UndoState, UndoType, void *);
|
||||||
static int undo_pop_fs_to_layer (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_fs_to_layer (GImage *, UndoState, UndoType, void *);
|
||||||
static int undo_pop_fs_rigor (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_fs_rigor (GImage *, UndoState, UndoType, void *);
|
||||||
static int undo_pop_fs_relax (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_fs_relax (GImage *, UndoState, UndoType, void *);
|
||||||
static int undo_pop_gimage_mod (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_gimage_mod (GImage *, UndoState, UndoType, void *);
|
||||||
static int undo_pop_guide (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_guide (GImage *, UndoState, UndoType, void *);
|
||||||
static int undo_pop_parasite (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_parasite (GImage *, UndoState, UndoType, void *);
|
||||||
static int undo_pop_qmask (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_qmask (GImage *, UndoState, UndoType, void *);
|
||||||
static int undo_pop_layer_rename (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_layer_rename (GImage *, UndoState, UndoType, void *);
|
||||||
static int undo_pop_cantundo (GImage *, undo_state, undo_type, void *);
|
static int undo_pop_cantundo (GImage *, UndoState, UndoType, void *);
|
||||||
|
|
||||||
|
|
||||||
/* Free functions */
|
/* Free functions */
|
||||||
|
|
||||||
static void undo_free_image (undo_state, void *);
|
static void undo_free_image (UndoState, void *);
|
||||||
static void undo_free_mask (undo_state, void *);
|
static void undo_free_mask (UndoState, void *);
|
||||||
static void undo_free_layer_displace (undo_state, void *);
|
static void undo_free_layer_displace (UndoState, void *);
|
||||||
static void undo_free_transform (undo_state, void *);
|
static void undo_free_transform (UndoState, void *);
|
||||||
static void undo_free_paint (undo_state, void *);
|
static void undo_free_paint (UndoState, void *);
|
||||||
static void undo_free_layer (undo_state, void *);
|
static void undo_free_layer (UndoState, void *);
|
||||||
static void undo_free_layer_mod (undo_state, void *);
|
static void undo_free_layer_mod (UndoState, void *);
|
||||||
static void undo_free_layer_mask (undo_state, void *);
|
static void undo_free_layer_mask (UndoState, void *);
|
||||||
static void undo_free_channel (undo_state, void *);
|
static void undo_free_channel (UndoState, void *);
|
||||||
static void undo_free_channel_mod (undo_state, void *);
|
static void undo_free_channel_mod (UndoState, void *);
|
||||||
static void undo_free_fs_to_layer (undo_state, void *);
|
static void undo_free_fs_to_layer (UndoState, void *);
|
||||||
static void undo_free_fs_rigor (undo_state, void *);
|
static void undo_free_fs_rigor (UndoState, void *);
|
||||||
static void undo_free_fs_relax (undo_state, void *);
|
static void undo_free_fs_relax (UndoState, void *);
|
||||||
static void undo_free_gimage_mod (undo_state, void *);
|
static void undo_free_gimage_mod (UndoState, void *);
|
||||||
static void undo_free_guide (undo_state, void *);
|
static void undo_free_guide (UndoState, void *);
|
||||||
static void undo_free_parasite (undo_state, void *);
|
static void undo_free_parasite (UndoState, void *);
|
||||||
static void undo_free_qmask (undo_state, void *);
|
static void undo_free_qmask (UndoState, void *);
|
||||||
static void undo_free_layer_rename (undo_state, void *);
|
static void undo_free_layer_rename (UndoState, void *);
|
||||||
static void undo_free_cantundo (undo_state, void *);
|
static void undo_free_cantundo (UndoState, void *);
|
||||||
|
|
||||||
|
|
||||||
/* Sizing functions */
|
/* Sizing functions */
|
||||||
static int layer_size (Layer *);
|
static int layer_size (Layer *);
|
||||||
static int channel_size (Channel *);
|
static int channel_size (Channel *);
|
||||||
|
|
||||||
static const char *undo_type_to_name (undo_type);
|
static const char *undo_type_to_name (UndoType);
|
||||||
|
|
||||||
static int shrink_wrap = FALSE;
|
static int shrink_wrap = FALSE;
|
||||||
|
|
||||||
|
@ -155,7 +155,7 @@ channel_size (Channel *channel)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_list (GImage *gimage,
|
undo_free_list (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
GSList *list)
|
GSList *list)
|
||||||
{
|
{
|
||||||
GSList * orig;
|
GSList * orig;
|
||||||
|
@ -251,7 +251,7 @@ undo_free_up_space (GImage *gimage)
|
||||||
static Undo *
|
static Undo *
|
||||||
undo_push (GImage *gimage,
|
undo_push (GImage *gimage,
|
||||||
long size,
|
long size,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
gboolean dirties_image)
|
gboolean dirties_image)
|
||||||
{
|
{
|
||||||
Undo * new;
|
Undo * new;
|
||||||
|
@ -312,7 +312,7 @@ static int
|
||||||
pop_stack (GImage *gimage,
|
pop_stack (GImage *gimage,
|
||||||
GSList **stack_ptr,
|
GSList **stack_ptr,
|
||||||
GSList **unstack_ptr,
|
GSList **unstack_ptr,
|
||||||
undo_state state)
|
UndoState state)
|
||||||
{
|
{
|
||||||
Undo * object;
|
Undo * object;
|
||||||
GSList *stack;
|
GSList *stack;
|
||||||
|
@ -573,7 +573,7 @@ undo_free (GImage *gimage)
|
||||||
|
|
||||||
int
|
int
|
||||||
undo_push_group_start (GImage *gimage,
|
undo_push_group_start (GImage *gimage,
|
||||||
undo_type type)
|
UndoType type)
|
||||||
{
|
{
|
||||||
if (! gimage->undo_on)
|
if (! gimage->undo_on)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -765,8 +765,8 @@ undo_push_image_mod (GImage *gimage,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_image (GImage *gimage,
|
undo_pop_image (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *image_undo_ptr)
|
void *image_undo_ptr)
|
||||||
{
|
{
|
||||||
ImageUndo *image_undo;
|
ImageUndo *image_undo;
|
||||||
|
@ -846,7 +846,7 @@ undo_pop_image (GImage *gimage,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_image (undo_state state,
|
undo_free_image (UndoState state,
|
||||||
void *image_undo_ptr)
|
void *image_undo_ptr)
|
||||||
{
|
{
|
||||||
ImageUndo *image_undo;
|
ImageUndo *image_undo;
|
||||||
|
@ -895,8 +895,8 @@ undo_push_mask (GImage *gimage,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_mask (GImage *gimage,
|
undo_pop_mask (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *mask_ptr)
|
void *mask_ptr)
|
||||||
{
|
{
|
||||||
MaskUndo *mask_undo;
|
MaskUndo *mask_undo;
|
||||||
|
@ -980,7 +980,7 @@ undo_pop_mask (GImage *gimage,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_mask (undo_state state,
|
undo_free_mask (UndoState state,
|
||||||
void *mask_ptr)
|
void *mask_ptr)
|
||||||
{
|
{
|
||||||
MaskUndo *mask_undo;
|
MaskUndo *mask_undo;
|
||||||
|
@ -1022,8 +1022,8 @@ undo_push_layer_displace (GImage *gimage,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_layer_displace (GImage *gimage,
|
undo_pop_layer_displace (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *info_ptr)
|
void *info_ptr)
|
||||||
{
|
{
|
||||||
Layer * layer;
|
Layer * layer;
|
||||||
|
@ -1070,7 +1070,7 @@ undo_pop_layer_displace (GImage *gimage,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_layer_displace (undo_state state,
|
undo_free_layer_displace (UndoState state,
|
||||||
void *info_ptr)
|
void *info_ptr)
|
||||||
{
|
{
|
||||||
g_free (info_ptr);
|
g_free (info_ptr);
|
||||||
|
@ -1107,8 +1107,8 @@ undo_push_transform (GImage *gimage,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_transform (GImage *gimage,
|
undo_pop_transform (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *tu_ptr)
|
void *tu_ptr)
|
||||||
{
|
{
|
||||||
TransformCore * tc;
|
TransformCore * tc;
|
||||||
|
@ -1156,7 +1156,7 @@ undo_pop_transform (GImage *gimage,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_transform (undo_state state,
|
undo_free_transform (UndoState state,
|
||||||
void *tu_ptr)
|
void *tu_ptr)
|
||||||
{
|
{
|
||||||
TransformUndo * tu;
|
TransformUndo * tu;
|
||||||
|
@ -1199,8 +1199,8 @@ undo_push_paint (GImage *gimage,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_paint (GImage *gimage,
|
undo_pop_paint (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *pu_ptr)
|
void *pu_ptr)
|
||||||
{
|
{
|
||||||
PaintCore * pc;
|
PaintCore * pc;
|
||||||
|
@ -1244,7 +1244,7 @@ undo_pop_paint (GImage *gimage,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_paint (undo_state state,
|
undo_free_paint (UndoState state,
|
||||||
void *pu_ptr)
|
void *pu_ptr)
|
||||||
{
|
{
|
||||||
PaintUndo * pu;
|
PaintUndo * pu;
|
||||||
|
@ -1293,8 +1293,8 @@ undo_push_layer (GImage *gimage,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_layer (GImage *gimage,
|
undo_pop_layer (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *lu_ptr)
|
void *lu_ptr)
|
||||||
{
|
{
|
||||||
LayerUndo *lu;
|
LayerUndo *lu;
|
||||||
|
@ -1366,7 +1366,7 @@ undo_pop_layer (GImage *gimage,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_layer (undo_state state,
|
undo_free_layer (UndoState state,
|
||||||
void *lu_ptr)
|
void *lu_ptr)
|
||||||
{
|
{
|
||||||
LayerUndo *lu;
|
LayerUndo *lu;
|
||||||
|
@ -1433,8 +1433,8 @@ undo_push_layer_mod (GImage *gimage,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_layer_mod (GImage *gimage,
|
undo_pop_layer_mod (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *data_ptr)
|
void *data_ptr)
|
||||||
{
|
{
|
||||||
void **data;
|
void **data;
|
||||||
|
@ -1502,7 +1502,7 @@ undo_pop_layer_mod (GImage *gimage,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_layer_mod (undo_state state,
|
undo_free_layer_mod (UndoState state,
|
||||||
void *data_ptr)
|
void *data_ptr)
|
||||||
{
|
{
|
||||||
void ** data;
|
void ** data;
|
||||||
|
@ -1551,8 +1551,8 @@ undo_push_layer_mask (GImage *gimage,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_layer_mask (GImage *gimage,
|
undo_pop_layer_mask (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *lmu_ptr)
|
void *lmu_ptr)
|
||||||
{
|
{
|
||||||
LayerMaskUndo *lmu;
|
LayerMaskUndo *lmu;
|
||||||
|
@ -1611,7 +1611,7 @@ undo_pop_layer_mask (GImage *gimage,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_layer_mask (undo_state state,
|
undo_free_layer_mask (UndoState state,
|
||||||
void *lmu_ptr)
|
void *lmu_ptr)
|
||||||
{
|
{
|
||||||
LayerMaskUndo *lmu;
|
LayerMaskUndo *lmu;
|
||||||
|
@ -1668,8 +1668,8 @@ undo_push_channel (GImage *gimage,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_channel (GImage *gimage,
|
undo_pop_channel (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *cu_ptr)
|
void *cu_ptr)
|
||||||
{
|
{
|
||||||
ChannelUndo *cu;
|
ChannelUndo *cu;
|
||||||
|
@ -1725,7 +1725,7 @@ undo_pop_channel (GImage *gimage,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_channel (undo_state state,
|
undo_free_channel (UndoState state,
|
||||||
void *cu_ptr)
|
void *cu_ptr)
|
||||||
{
|
{
|
||||||
ChannelUndo *cu;
|
ChannelUndo *cu;
|
||||||
|
@ -1788,8 +1788,8 @@ undo_push_channel_mod (GImage *gimage,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_channel_mod (GImage *gimage,
|
undo_pop_channel_mod (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *data_ptr)
|
void *data_ptr)
|
||||||
{
|
{
|
||||||
void **data;
|
void **data;
|
||||||
|
@ -1833,7 +1833,7 @@ undo_pop_channel_mod (GImage *gimage,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_channel_mod (undo_state state,
|
undo_free_channel_mod (UndoState state,
|
||||||
void *data_ptr)
|
void *data_ptr)
|
||||||
{
|
{
|
||||||
void ** data;
|
void ** data;
|
||||||
|
@ -1881,8 +1881,8 @@ undo_push_fs_to_layer (GImage *gimage,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_fs_to_layer (GImage *gimage,
|
undo_pop_fs_to_layer (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *fsu_ptr)
|
void *fsu_ptr)
|
||||||
{
|
{
|
||||||
FStoLayerUndo *fsu;
|
FStoLayerUndo *fsu;
|
||||||
|
@ -1952,7 +1952,7 @@ undo_pop_fs_to_layer (GImage *gimage,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_fs_to_layer (undo_state state,
|
undo_free_fs_to_layer (UndoState state,
|
||||||
void *fsu_ptr)
|
void *fsu_ptr)
|
||||||
{
|
{
|
||||||
FStoLayerUndo *fsu;
|
FStoLayerUndo *fsu;
|
||||||
|
@ -1994,8 +1994,8 @@ undo_push_fs_rigor (GImage *gimage,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_fs_rigor (GImage *gimage,
|
undo_pop_fs_rigor (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *layer_ptr)
|
void *layer_ptr)
|
||||||
{
|
{
|
||||||
int layer_id;
|
int layer_id;
|
||||||
|
@ -2036,7 +2036,7 @@ undo_pop_fs_rigor (GImage *gimage,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_fs_rigor (undo_state state,
|
undo_free_fs_rigor (UndoState state,
|
||||||
void *layer_ptr)
|
void *layer_ptr)
|
||||||
{
|
{
|
||||||
g_free (layer_ptr);
|
g_free (layer_ptr);
|
||||||
|
@ -2072,8 +2072,8 @@ undo_push_fs_relax (GImage *gimage,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_fs_relax (GImage *gimage,
|
undo_pop_fs_relax (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *layer_ptr)
|
void *layer_ptr)
|
||||||
{
|
{
|
||||||
int layer_id;
|
int layer_id;
|
||||||
|
@ -2114,7 +2114,7 @@ undo_pop_fs_relax (GImage *gimage,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_fs_relax (undo_state state,
|
undo_free_fs_relax (UndoState state,
|
||||||
void *layer_ptr)
|
void *layer_ptr)
|
||||||
{
|
{
|
||||||
g_free (layer_ptr);
|
g_free (layer_ptr);
|
||||||
|
@ -2153,8 +2153,8 @@ undo_push_gimage_mod (GImage *gimage)
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_gimage_mod (GImage *gimage,
|
undo_pop_gimage_mod (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *data_ptr)
|
void *data_ptr)
|
||||||
{
|
{
|
||||||
int *data;
|
int *data;
|
||||||
|
@ -2190,7 +2190,7 @@ undo_pop_gimage_mod (GImage *gimage,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_gimage_mod (undo_state state,
|
undo_free_gimage_mod (UndoState state,
|
||||||
void *data_ptr)
|
void *data_ptr)
|
||||||
{
|
{
|
||||||
g_free (data_ptr);
|
g_free (data_ptr);
|
||||||
|
@ -2238,8 +2238,8 @@ undo_push_qmask (GImage *gimage,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_qmask (GImage *gimage,
|
undo_pop_qmask (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *data_ptr)
|
void *data_ptr)
|
||||||
{
|
{
|
||||||
QmaskUndo *data;
|
QmaskUndo *data;
|
||||||
|
@ -2258,7 +2258,7 @@ undo_pop_qmask (GImage *gimage,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_qmask (undo_state state,
|
undo_free_qmask (UndoState state,
|
||||||
void *data_ptr)
|
void *data_ptr)
|
||||||
{
|
{
|
||||||
g_free (data_ptr);
|
g_free (data_ptr);
|
||||||
|
@ -2307,8 +2307,8 @@ undo_push_guide (GImage *gimage,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_guide (GImage *gimage,
|
undo_pop_guide (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *data_ptr)
|
void *data_ptr)
|
||||||
{
|
{
|
||||||
GuideUndo *data;
|
GuideUndo *data;
|
||||||
|
@ -2331,7 +2331,7 @@ undo_pop_guide (GImage *gimage,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_guide (undo_state state,
|
undo_free_guide (UndoState state,
|
||||||
void *data_ptr)
|
void *data_ptr)
|
||||||
{
|
{
|
||||||
GuideUndo *data;
|
GuideUndo *data;
|
||||||
|
@ -2474,8 +2474,8 @@ undo_push_drawable_parasite_remove (GImage *gimage,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_parasite (GImage *gimage,
|
undo_pop_parasite (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *data_ptr)
|
void *data_ptr)
|
||||||
{
|
{
|
||||||
ParasiteUndo *data;
|
ParasiteUndo *data;
|
||||||
|
@ -2520,7 +2520,7 @@ undo_pop_parasite (GImage *gimage,
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_parasite (undo_state state,
|
undo_free_parasite (UndoState state,
|
||||||
void *data_ptr)
|
void *data_ptr)
|
||||||
{
|
{
|
||||||
ParasiteUndo *data;
|
ParasiteUndo *data;
|
||||||
|
@ -2576,8 +2576,8 @@ undo_push_layer_rename (GImage *gimage, Layer *layer)
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_layer_rename (GImage *gimage,
|
undo_pop_layer_rename (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *data_ptr)
|
void *data_ptr)
|
||||||
{
|
{
|
||||||
LayerRenameUndo *data = data_ptr;
|
LayerRenameUndo *data = data_ptr;
|
||||||
|
@ -2602,7 +2602,7 @@ undo_pop_layer_rename (GImage *gimage,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_layer_rename (undo_state state,
|
undo_free_layer_rename (UndoState state,
|
||||||
void *data_ptr)
|
void *data_ptr)
|
||||||
{
|
{
|
||||||
LayerRenameUndo *data = data_ptr;
|
LayerRenameUndo *data = data_ptr;
|
||||||
|
@ -2642,8 +2642,8 @@ undo_push_cantundo (GImage *gimage,
|
||||||
|
|
||||||
static int
|
static int
|
||||||
undo_pop_cantundo (GImage *gimage,
|
undo_pop_cantundo (GImage *gimage,
|
||||||
undo_state state,
|
UndoState state,
|
||||||
undo_type type,
|
UndoType type,
|
||||||
void *data_ptr)
|
void *data_ptr)
|
||||||
{
|
{
|
||||||
char *action = data_ptr;
|
char *action = data_ptr;
|
||||||
|
@ -2663,13 +2663,13 @@ undo_pop_cantundo (GImage *gimage,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
undo_free_cantundo (undo_state state, void *data_ptr)
|
undo_free_cantundo (UndoState state, void *data_ptr)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static struct undo_name_t {
|
static struct undo_name_t {
|
||||||
undo_type type;
|
UndoType type;
|
||||||
const char *name;
|
const char *name;
|
||||||
} undo_name[] = {
|
} undo_name[] = {
|
||||||
{0, N_("<<invalid>>")},
|
{0, N_("<<invalid>>")},
|
||||||
|
@ -2712,7 +2712,7 @@ static struct undo_name_t {
|
||||||
|
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
undo_type_to_name (undo_type type)
|
undo_type_to_name (UndoType type)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
/* Undo interface functions */
|
/* Undo interface functions */
|
||||||
|
|
||||||
int undo_push_group_start (GImage *, undo_type);
|
int undo_push_group_start (GImage *, UndoType);
|
||||||
int undo_push_group_end (GImage *);
|
int undo_push_group_end (GImage *);
|
||||||
int undo_push_image (GImage *, GimpDrawable *, int, int, int, int);
|
int undo_push_image (GImage *, GimpDrawable *, int, int, int, int);
|
||||||
int undo_push_image_mod (GImage *, GimpDrawable *, int, int, int, int, void *, int);
|
int undo_push_image_mod (GImage *, GimpDrawable *, int, int, int, int, void *, int);
|
||||||
|
|
|
@ -208,7 +208,10 @@ static void
|
||||||
undo_history_append_special (GtkCList *clist)
|
undo_history_append_special (GtkCList *clist)
|
||||||
{
|
{
|
||||||
char *name = _("[ base image ]");
|
char *name = _("[ base image ]");
|
||||||
char *namelist[] = { NULL, name };
|
char *namelist[2];
|
||||||
|
|
||||||
|
namelist[0] = NULL;
|
||||||
|
namelist[1] = name;
|
||||||
|
|
||||||
gtk_clist_append (clist, namelist);
|
gtk_clist_append (clist, namelist);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,8 @@
|
||||||
|
|
||||||
|
|
||||||
/* Undo types */
|
/* Undo types */
|
||||||
typedef enum {
|
typedef enum
|
||||||
|
{
|
||||||
/* Type 0 is special - in the gimpimage structure it means
|
/* Type 0 is special - in the gimpimage structure it means
|
||||||
* there is no undo group currently being added to. */
|
* there is no undo group currently being added to. */
|
||||||
IMAGE_UNDO = 1,
|
IMAGE_UNDO = 1,
|
||||||
|
@ -61,7 +62,7 @@ typedef enum {
|
||||||
QMASK_UNDO, /* 34 */
|
QMASK_UNDO, /* 34 */
|
||||||
|
|
||||||
MISC_UNDO = 100
|
MISC_UNDO = 100
|
||||||
} undo_type;
|
} UndoType;
|
||||||
|
|
||||||
|
|
||||||
#endif /* __UNDO_TYPES_H__ */
|
#endif /* __UNDO_TYPES_H__ */
|
||||||
|
|
|
@ -20,13 +20,6 @@
|
||||||
# else
|
# else
|
||||||
# define N_(String) (String)
|
# define N_(String) (String)
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
#define INIT_LOCALE( domain ) \
|
|
||||||
gtk_set_locale (); \
|
|
||||||
setlocale (LC_NUMERIC, "C"); \
|
|
||||||
bindtextdomain (domain, LOCALEDIR); \
|
|
||||||
textdomain (domain);
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
/* Stubs that do something close enough. */
|
/* Stubs that do something close enough. */
|
||||||
# define textdomain(String) (String)
|
# define textdomain(String) (String)
|
||||||
|
@ -38,5 +31,9 @@
|
||||||
# define N_(String) (String)
|
# define N_(String) (String)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define INIT_LOCALE( domain ) \
|
||||||
|
gtk_set_locale (); \
|
||||||
|
setlocale (LC_NUMERIC, "C"); \
|
||||||
|
bindtextdomain (domain, LOCALEDIR); \
|
||||||
|
textdomain (domain);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -16,6 +16,8 @@ script_fu_SOURCES = \
|
||||||
script-fu.c \
|
script-fu.c \
|
||||||
script-fu-console.c \
|
script-fu-console.c \
|
||||||
script-fu-console.h \
|
script-fu-console.h \
|
||||||
|
script-fu-constants.c \
|
||||||
|
script-fu-constants.h \
|
||||||
script-fu-scripts.c \
|
script-fu-scripts.c \
|
||||||
script-fu-scripts.h \
|
script-fu-scripts.h \
|
||||||
script-fu-server.c \
|
script-fu-server.c \
|
||||||
|
|
|
@ -0,0 +1,228 @@
|
||||||
|
/* The GIMP -- an image manipulation program
|
||||||
|
* Copyright (C) 1995-1999 Spencer Kimball and Peter Mattis
|
||||||
|
*
|
||||||
|
* 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 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* NOTE: This file is autogenerated by script-fu.pl. */
|
||||||
|
|
||||||
|
#include "siod.h"
|
||||||
|
|
||||||
|
void
|
||||||
|
init_generated_constants (void)
|
||||||
|
{
|
||||||
|
setvar (cintern ("WHITE-MASK"), flocons (0), NIL);
|
||||||
|
setvar (cintern ("BLACK-MASK"), flocons (1), NIL);
|
||||||
|
setvar (cintern ("ALPHA-MASK"), flocons (2), NIL);
|
||||||
|
|
||||||
|
setvar (cintern ("FG-BG-RGB"), flocons (0), NIL);
|
||||||
|
setvar (cintern ("FG-BG-HSV"), flocons (1), NIL);
|
||||||
|
setvar (cintern ("FG-TRANS"), flocons (2), NIL);
|
||||||
|
setvar (cintern ("CUSTOM"), flocons (3), NIL);
|
||||||
|
|
||||||
|
setvar (cintern ("HARD"), flocons (0), NIL);
|
||||||
|
setvar (cintern ("SOFT"), flocons (1), NIL);
|
||||||
|
setvar (cintern ("PRESSURE"), flocons (2), NIL);
|
||||||
|
|
||||||
|
setvar (cintern ("FG-BUCKET-FILL"), flocons (0), NIL);
|
||||||
|
setvar (cintern ("BG-BUCKET-FILL"), flocons (1), NIL);
|
||||||
|
setvar (cintern ("PATTERN-BUCKET-FILL"), flocons (2), NIL);
|
||||||
|
|
||||||
|
setvar (cintern ("VALUE-LUT"), flocons (0), NIL);
|
||||||
|
setvar (cintern ("RED-LUT"), flocons (1), NIL);
|
||||||
|
setvar (cintern ("GREEN-LUT"), flocons (2), NIL);
|
||||||
|
setvar (cintern ("BLUE-LUT"), flocons (3), NIL);
|
||||||
|
setvar (cintern ("ALPHA-LUT"), flocons (4), NIL);
|
||||||
|
|
||||||
|
setvar (cintern ("OFFSET-BACKGROUND"), flocons (0), NIL);
|
||||||
|
setvar (cintern ("OFFSET-TRANSPARENT"), flocons (1), NIL);
|
||||||
|
|
||||||
|
setvar (cintern ("ADD"), flocons (0), NIL);
|
||||||
|
setvar (cintern ("SUB"), flocons (1), NIL);
|
||||||
|
setvar (cintern ("REPLACE"), flocons (2), NIL);
|
||||||
|
setvar (cintern ("INTERSECT"), flocons (3), NIL);
|
||||||
|
|
||||||
|
setvar (cintern ("RED-CHANNEL"), flocons (0), NIL);
|
||||||
|
setvar (cintern ("GREEN-CHANNEL"), flocons (1), NIL);
|
||||||
|
setvar (cintern ("BLUE-CHANNEL"), flocons (2), NIL);
|
||||||
|
setvar (cintern ("GRAY-CHANNEL"), flocons (3), NIL);
|
||||||
|
setvar (cintern ("INDEXED-CHANNEL"), flocons (4), NIL);
|
||||||
|
setvar (cintern ("AUXILLARY-CHANNEL"), flocons (5), NIL);
|
||||||
|
|
||||||
|
setvar (cintern ("IMAGE-CLONE"), flocons (0), NIL);
|
||||||
|
setvar (cintern ("PATTERN-CLONE"), flocons (1), NIL);
|
||||||
|
|
||||||
|
setvar (cintern ("NO-DITHER"), flocons (0), NIL);
|
||||||
|
setvar (cintern ("FS-DITHER"), flocons (1), NIL);
|
||||||
|
setvar (cintern ("FSLOWBLEED-DITHER"), flocons (2), NIL);
|
||||||
|
setvar (cintern ("FIXED-DITHER"), flocons (3), NIL);
|
||||||
|
setvar (cintern ("NODESTRUCT-DITHER"), flocons (4), NIL);
|
||||||
|
|
||||||
|
setvar (cintern ("MAKE-PALETTE"), flocons (0), NIL);
|
||||||
|
setvar (cintern ("REUSE-PALETTE"), flocons (1), NIL);
|
||||||
|
setvar (cintern ("WEB-PALETTE"), flocons (2), NIL);
|
||||||
|
setvar (cintern ("MONO-PALETTE"), flocons (3), NIL);
|
||||||
|
setvar (cintern ("CUSTOM-PALETTE"), flocons (4), NIL);
|
||||||
|
|
||||||
|
setvar (cintern ("NORMAL-CONVOL"), flocons (0), NIL);
|
||||||
|
setvar (cintern ("ABSOLUTE-CONVOL"), flocons (1), NIL);
|
||||||
|
setvar (cintern ("NEGATIVE-CONVOL"), flocons (2), NIL);
|
||||||
|
|
||||||
|
setvar (cintern ("BLUR-CONVOLVE"), flocons (0), NIL);
|
||||||
|
setvar (cintern ("SHARPEN-CONVOLVE"), flocons (1), NIL);
|
||||||
|
setvar (cintern ("CUSTOM-CONVOLVE"), flocons (2), NIL);
|
||||||
|
|
||||||
|
setvar (cintern ("DODGEBURN-HIGHLIGHTS"), flocons (0), NIL);
|
||||||
|
setvar (cintern ("DODGEBURN-MIDTONES"), flocons (1), NIL);
|
||||||
|
setvar (cintern ("DODGEBURN-SHADOWS"), flocons (2), NIL);
|
||||||
|
|
||||||
|
setvar (cintern ("DODGE"), flocons (0), NIL);
|
||||||
|
setvar (cintern ("BURN"), flocons (1), NIL);
|
||||||
|
|
||||||
|
setvar (cintern ("FG-IMAGE-FILL"), flocons (0), NIL);
|
||||||
|
setvar (cintern ("BG-IMAGE-FILL"), flocons (1), NIL);
|
||||||
|
setvar (cintern ("WHITE-IMAGE-FILL"), flocons (2), NIL);
|
||||||
|
setvar (cintern ("TRANS-IMAGE-FILL"), flocons (3), NIL);
|
||||||
|
setvar (cintern ("NO-IMAGE-FILL"), flocons (4), NIL);
|
||||||
|
|
||||||
|
setvar (cintern ("RGB"), flocons (0), NIL);
|
||||||
|
setvar (cintern ("GRAY"), flocons (1), NIL);
|
||||||
|
setvar (cintern ("INDEXED"), flocons (2), NIL);
|
||||||
|
|
||||||
|
setvar (cintern ("RGB-IMAGE"), flocons (0), NIL);
|
||||||
|
setvar (cintern ("RGBA-IMAGE"), flocons (1), NIL);
|
||||||
|
setvar (cintern ("GRAY-IMAGE"), flocons (2), NIL);
|
||||||
|
setvar (cintern ("GRAYA-IMAGE"), flocons (3), NIL);
|
||||||
|
setvar (cintern ("INDEXED-IMAGE"), flocons (4), NIL);
|
||||||
|
setvar (cintern ("INDEXEDA-IMAGE"), flocons (5), NIL);
|
||||||
|
|
||||||
|
setvar (cintern ("ONCE-FORWARD"), flocons (0), NIL);
|
||||||
|
setvar (cintern ("ONCE-BACKWARDS"), flocons (1), NIL);
|
||||||
|
setvar (cintern ("LOOP-SAWTOOTH"), flocons (2), NIL);
|
||||||
|
setvar (cintern ("LOOP-TRIANGLE"), flocons (3), NIL);
|
||||||
|
setvar (cintern ("ONCE-END-COLOR"), flocons (4), NIL);
|
||||||
|
|
||||||
|
setvar (cintern ("LINEAR"), flocons (0), NIL);
|
||||||
|
setvar (cintern ("BILINEAR"), flocons (1), NIL);
|
||||||
|
setvar (cintern ("RADIAL"), flocons (2), NIL);
|
||||||
|
setvar (cintern ("SQUARE"), flocons (3), NIL);
|
||||||
|
setvar (cintern ("CONICAL-SYMMETRIC"), flocons (4), NIL);
|
||||||
|
setvar (cintern ("CONICAL-ASYMMETRIC"), flocons (5), NIL);
|
||||||
|
setvar (cintern ("SHAPEBURST-ANGULAR"), flocons (6), NIL);
|
||||||
|
setvar (cintern ("SHAPEBURST-SPHERICAL"), flocons (7), NIL);
|
||||||
|
setvar (cintern ("SHAPEBURST-DIMPLED"), flocons (8), NIL);
|
||||||
|
setvar (cintern ("SPIRAL-CLOCKWISE"), flocons (9), NIL);
|
||||||
|
setvar (cintern ("SPIRAL-ANTICLOCKWISE"), flocons (10), NIL);
|
||||||
|
|
||||||
|
setvar (cintern ("ALL-HUES"), flocons (0), NIL);
|
||||||
|
setvar (cintern ("RED-HUES"), flocons (1), NIL);
|
||||||
|
setvar (cintern ("YELLOW-HUES"), flocons (2), NIL);
|
||||||
|
setvar (cintern ("GREEN-HUES"), flocons (3), NIL);
|
||||||
|
setvar (cintern ("CYAN-HUES"), flocons (4), NIL);
|
||||||
|
setvar (cintern ("BLUE-HUES"), flocons (5), NIL);
|
||||||
|
setvar (cintern ("MAGENTA-HUES"), flocons (6), NIL);
|
||||||
|
|
||||||
|
setvar (cintern ("LINEAR-INTERPOLATION"), flocons (0), NIL);
|
||||||
|
setvar (cintern ("CUBIC-INTERPOLATION"), flocons (1), NIL);
|
||||||
|
setvar (cintern ("NEAREST-NEIGHBOR-INTERPOLATION"), flocons (2), NIL);
|
||||||
|
|
||||||
|
setvar (cintern ("NORMAL-MODE"), flocons (0), NIL);
|
||||||
|
setvar (cintern ("DISSOLVE-MODE"), flocons (1), NIL);
|
||||||
|
setvar (cintern ("BEHIND-MODE"), flocons (2), NIL);
|
||||||
|
setvar (cintern ("MULTIPLY-MODE"), flocons (3), NIL);
|
||||||
|
setvar (cintern ("SCREEN-MODE"), flocons (4), NIL);
|
||||||
|
setvar (cintern ("OVERLAY-MODE"), flocons (5), NIL);
|
||||||
|
setvar (cintern ("DIFFERENCE-MODE"), flocons (6), NIL);
|
||||||
|
setvar (cintern ("ADDITION-MODE"), flocons (7), NIL);
|
||||||
|
setvar (cintern ("SUBTRACT-MODE"), flocons (8), NIL);
|
||||||
|
setvar (cintern ("DARKEN-ONLY-MODE"), flocons (9), NIL);
|
||||||
|
setvar (cintern ("LIGHTEN-ONLY-MODE"), flocons (10), NIL);
|
||||||
|
setvar (cintern ("HUE-MODE"), flocons (11), NIL);
|
||||||
|
setvar (cintern ("SATURATION-MODE"), flocons (12), NIL);
|
||||||
|
setvar (cintern ("COLOR-MODE"), flocons (13), NIL);
|
||||||
|
setvar (cintern ("VALUE-MODE"), flocons (14), NIL);
|
||||||
|
setvar (cintern ("DIVIDE-MODE"), flocons (15), NIL);
|
||||||
|
|
||||||
|
setvar (cintern ("APPLY"), flocons (0), NIL);
|
||||||
|
setvar (cintern ("DISCARD"), flocons (1), NIL);
|
||||||
|
|
||||||
|
setvar (cintern ("EXPAND-AS-NECESSARY"), flocons (0), NIL);
|
||||||
|
setvar (cintern ("CLIP-TO-IMAGE"), flocons (1), NIL);
|
||||||
|
setvar (cintern ("CLIP-TO-BOTTOM-LAYER"), flocons (2), NIL);
|
||||||
|
setvar (cintern ("FLATTEN-IMAGE"), flocons (3), NIL);
|
||||||
|
|
||||||
|
setvar (cintern ("MESSAGE-BOX"), flocons (0), NIL);
|
||||||
|
setvar (cintern ("CONSOLE"), flocons (1), NIL);
|
||||||
|
setvar (cintern ("ERROR-CONSOLE"), flocons (2), NIL);
|
||||||
|
|
||||||
|
setvar (cintern ("HORIZONTAL"), flocons (0), NIL);
|
||||||
|
setvar (cintern ("VERTICAL"), flocons (1), NIL);
|
||||||
|
setvar (cintern ("UNKNOWN"), flocons (2), NIL);
|
||||||
|
|
||||||
|
setvar (cintern ("PDB-INT32"), flocons (0), NIL);
|
||||||
|
setvar (cintern ("PDB-INT16"), flocons (1), NIL);
|
||||||
|
setvar (cintern ("PDB-INT8"), flocons (2), NIL);
|
||||||
|
setvar (cintern ("PDB-FLOAT"), flocons (3), NIL);
|
||||||
|
setvar (cintern ("PDB-STRING"), flocons (4), NIL);
|
||||||
|
setvar (cintern ("PDB-INT32ARRAY"), flocons (5), NIL);
|
||||||
|
setvar (cintern ("PDB-INT16ARRAY"), flocons (6), NIL);
|
||||||
|
setvar (cintern ("PDB-INT8ARRAY"), flocons (7), NIL);
|
||||||
|
setvar (cintern ("PDB-FLOATARRAY"), flocons (8), NIL);
|
||||||
|
setvar (cintern ("PDB-STRINGARRAY"), flocons (9), NIL);
|
||||||
|
setvar (cintern ("PDB-COLOR"), flocons (10), NIL);
|
||||||
|
setvar (cintern ("PDB-REGION"), flocons (11), NIL);
|
||||||
|
setvar (cintern ("PDB-DISPLAY"), flocons (12), NIL);
|
||||||
|
setvar (cintern ("PDB-IMAGE"), flocons (13), NIL);
|
||||||
|
setvar (cintern ("PDB-LAYER"), flocons (14), NIL);
|
||||||
|
setvar (cintern ("PDB-CHANNEL"), flocons (15), NIL);
|
||||||
|
setvar (cintern ("PDB-DRAWABLE"), flocons (16), NIL);
|
||||||
|
setvar (cintern ("PDB-SELECTION"), flocons (17), NIL);
|
||||||
|
setvar (cintern ("PDB-BOUNDARY"), flocons (18), NIL);
|
||||||
|
setvar (cintern ("PDB-PATH"), flocons (19), NIL);
|
||||||
|
setvar (cintern ("PDB-PARASITE"), flocons (20), NIL);
|
||||||
|
setvar (cintern ("PDB-STATUS"), flocons (21), NIL);
|
||||||
|
setvar (cintern ("PDB-END"), flocons (22), NIL);
|
||||||
|
|
||||||
|
setvar (cintern ("INTERNAL"), flocons (0), NIL);
|
||||||
|
setvar (cintern ("PLUGIN"), flocons (1), NIL);
|
||||||
|
setvar (cintern ("EXTENSION"), flocons (2), NIL);
|
||||||
|
|
||||||
|
setvar (cintern ("PDB-EXECUTION-ERROR"), flocons (0), NIL);
|
||||||
|
setvar (cintern ("PDB-CALLING-ERROR"), flocons (1), NIL);
|
||||||
|
setvar (cintern ("PDB-PASS-THROUGH"), flocons (2), NIL);
|
||||||
|
setvar (cintern ("PDB-SUCCESS"), flocons (3), NIL);
|
||||||
|
|
||||||
|
setvar (cintern ("CONTINUOUS"), flocons (0), NIL);
|
||||||
|
setvar (cintern ("INCREMENTAL"), flocons (1), NIL);
|
||||||
|
|
||||||
|
setvar (cintern ("REPEAT-NONE"), flocons (0), NIL);
|
||||||
|
setvar (cintern ("REPEAT-SAWTOOTH"), flocons (1), NIL);
|
||||||
|
setvar (cintern ("REPEAT-TRIANGULAR"), flocons (2), NIL);
|
||||||
|
|
||||||
|
setvar (cintern ("RUN-INTERACTIVE"), flocons (0), NIL);
|
||||||
|
setvar (cintern ("RUN-NONINTERACTIVE"), flocons (1), NIL);
|
||||||
|
setvar (cintern ("RUN-WITH-LAST-VALS"), flocons (2), NIL);
|
||||||
|
|
||||||
|
setvar (cintern ("PIXELS"), flocons (0), NIL);
|
||||||
|
setvar (cintern ("POINTS"), flocons (1), NIL);
|
||||||
|
|
||||||
|
setvar (cintern ("TOOL-CAN-HANDLE-CHANGING-BRUSH"), flocons (0x0001), NIL);
|
||||||
|
|
||||||
|
setvar (cintern ("SHADOWS"), flocons (0), NIL);
|
||||||
|
setvar (cintern ("MIDTONES"), flocons (1), NIL);
|
||||||
|
setvar (cintern ("HIGHLIGHTS"), flocons (2), NIL);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
/* The GIMP -- an image manipulation program
|
||||||
|
* Copyright (C) 1999 Manish Singh
|
||||||
|
*
|
||||||
|
* 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 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __SCRIPT_FU_CONSTANTS_H__
|
||||||
|
#define __SCRIPT_FU_CONSTANTS_H__
|
||||||
|
|
||||||
|
void init_generated_constants (void);
|
||||||
|
|
||||||
|
#endif /* __SCRIPT_FU_CONSTANTS_H__ */
|
|
@ -107,12 +107,12 @@ extern gint server_mode;
|
||||||
MAIN ()
|
MAIN ()
|
||||||
|
|
||||||
static void
|
static void
|
||||||
sfquit ()
|
sfquit (void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
query ()
|
query (void)
|
||||||
{
|
{
|
||||||
static GParamDef console_args[] =
|
static GParamDef console_args[] =
|
||||||
{
|
{
|
||||||
|
@ -278,14 +278,14 @@ init_interp (void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
init_gimp ()
|
init_gimp (void)
|
||||||
{
|
{
|
||||||
init_procedures ();
|
init_procedures ();
|
||||||
init_constants ();
|
init_constants ();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
init_procedures ()
|
init_procedures (void)
|
||||||
{
|
{
|
||||||
char **proc_list;
|
char **proc_list;
|
||||||
char *proc_name;
|
char *proc_name;
|
||||||
|
@ -365,7 +365,7 @@ init_procedures ()
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
init_constants ()
|
init_constants (void)
|
||||||
{
|
{
|
||||||
GParam *return_vals = NULL;
|
GParam *return_vals = NULL;
|
||||||
gint nreturn_vals;
|
gint nreturn_vals;
|
||||||
|
@ -387,6 +387,10 @@ init_constants ()
|
||||||
setvar (cintern ("gimp-plugin-dir"), strcons (-1, return_vals[1].data.d_string), NIL);
|
setvar (cintern ("gimp-plugin-dir"), strcons (-1, return_vals[1].data.d_string), NIL);
|
||||||
gimp_destroy_params (return_vals, nreturn_vals);
|
gimp_destroy_params (return_vals, nreturn_vals);
|
||||||
|
|
||||||
|
/* Generated constants */
|
||||||
|
init_generated_constants ();
|
||||||
|
|
||||||
|
/* These are for backwards compatibility; they should be removed sometime */
|
||||||
setvar (cintern ("NORMAL"), flocons (0), NIL);
|
setvar (cintern ("NORMAL"), flocons (0), NIL);
|
||||||
setvar (cintern ("DISSOLVE"), flocons (1), NIL);
|
setvar (cintern ("DISSOLVE"), flocons (1), NIL);
|
||||||
setvar (cintern ("BEHIND"), flocons (2), NIL);
|
setvar (cintern ("BEHIND"), flocons (2), NIL);
|
||||||
|
@ -404,40 +408,8 @@ init_constants ()
|
||||||
setvar (cintern ("VALUE"), flocons (14), NIL);
|
setvar (cintern ("VALUE"), flocons (14), NIL);
|
||||||
setvar (cintern ("DIVIDE"), flocons (15), NIL);
|
setvar (cintern ("DIVIDE"), flocons (15), NIL);
|
||||||
|
|
||||||
setvar (cintern ("FG-BG-RGB"), flocons (0), NIL);
|
setvar (cintern ("BLUR"), flocons (0), NIL);
|
||||||
setvar (cintern ("FG-BG-HSV"), flocons (1), NIL);
|
setvar (cintern ("SHARPEN"), flocons (1), NIL);
|
||||||
setvar (cintern ("FG-TRANS"), flocons (2), NIL);
|
|
||||||
setvar (cintern ("CUSTOM"), flocons (3), NIL);
|
|
||||||
|
|
||||||
setvar (cintern ("LINEAR"), flocons (0), NIL);
|
|
||||||
setvar (cintern ("BILINEAR"), flocons (1), NIL);
|
|
||||||
setvar (cintern ("RADIAL"), flocons (2), NIL);
|
|
||||||
setvar (cintern ("SQUARE"), flocons (3), NIL);
|
|
||||||
setvar (cintern ("CONICAL-SYMMETRIC"), flocons (4), NIL);
|
|
||||||
setvar (cintern ("CONICAL-ASYMMETRIC"), flocons (5), NIL);
|
|
||||||
setvar (cintern ("SHAPEBURST-ANGULAR"), flocons (6), NIL);
|
|
||||||
setvar (cintern ("SHAPEBURST-SPHERICAL"), flocons (7), NIL);
|
|
||||||
setvar (cintern ("SHAPEBURST-DIMPLED"), flocons (8), NIL);
|
|
||||||
setvar (cintern ("SPIRAL-CLOCKWISE"), flocons (9), NIL);
|
|
||||||
setvar (cintern ("SPIRAL-ANTICLOCKWISE"), flocons (10), NIL);
|
|
||||||
|
|
||||||
setvar (cintern ("REPEAT-NONE"), flocons(0), NIL);
|
|
||||||
setvar (cintern ("REPEAT-SAWTOOTH"), flocons(1), NIL);
|
|
||||||
setvar (cintern ("REPEAT-TRIANGULAR"), flocons(2), NIL);
|
|
||||||
|
|
||||||
setvar (cintern ("FG-BUCKET-FILL"), flocons (0), NIL);
|
|
||||||
setvar (cintern ("BG-BUCKET-FILL"), flocons (1), NIL);
|
|
||||||
setvar (cintern ("PATTERN-BUCKET-FILL"), flocons (2), NIL);
|
|
||||||
|
|
||||||
setvar (cintern ("FG-IMAGE-FILL"), flocons (FG_IMAGE_FILL), NIL);
|
|
||||||
setvar (cintern ("BG-IMAGE-FILL"), flocons (BG_IMAGE_FILL), NIL);
|
|
||||||
setvar (cintern ("WHITE-IMAGE-FILL"), flocons (WHITE_IMAGE_FILL), NIL);
|
|
||||||
setvar (cintern ("TRANS-IMAGE-FILL"), flocons (TRANS_IMAGE_FILL), NIL);
|
|
||||||
setvar (cintern ("NO-IMAGE-FILL"), flocons (NO_IMAGE_FILL), NIL);
|
|
||||||
|
|
||||||
setvar (cintern ("RGB"), flocons (0), NIL);
|
|
||||||
setvar (cintern ("GRAY"), flocons (1), NIL);
|
|
||||||
setvar (cintern ("INDEXED"), flocons (2), NIL);
|
|
||||||
|
|
||||||
setvar (cintern ("RGB_IMAGE"), flocons (0), NIL);
|
setvar (cintern ("RGB_IMAGE"), flocons (0), NIL);
|
||||||
setvar (cintern ("RGBA_IMAGE"), flocons (1), NIL);
|
setvar (cintern ("RGBA_IMAGE"), flocons (1), NIL);
|
||||||
|
@ -446,37 +418,7 @@ init_constants ()
|
||||||
setvar (cintern ("INDEXED_IMAGE"), flocons (4), NIL);
|
setvar (cintern ("INDEXED_IMAGE"), flocons (4), NIL);
|
||||||
setvar (cintern ("INDEXEDA_IMAGE"), flocons (5), NIL);
|
setvar (cintern ("INDEXEDA_IMAGE"), flocons (5), NIL);
|
||||||
|
|
||||||
setvar (cintern ("RED-CHANNEL"), flocons (0), NIL);
|
/* Useful misc stuff */
|
||||||
setvar (cintern ("GREEN-CHANNEL"), flocons (1), NIL);
|
|
||||||
setvar (cintern ("BLUE-CHANNEL"), flocons (2), NIL);
|
|
||||||
setvar (cintern ("GRAY-CHANNEL"), flocons (3), NIL);
|
|
||||||
setvar (cintern ("INDEXED-CHANNEL"), flocons (4), NIL);
|
|
||||||
|
|
||||||
setvar (cintern ("WHITE-MASK"), flocons (0), NIL);
|
|
||||||
setvar (cintern ("BLACK-MASK"), flocons (1), NIL);
|
|
||||||
setvar (cintern ("ALPHA-MASK"), flocons (2), NIL);
|
|
||||||
|
|
||||||
setvar (cintern ("APPLY"), flocons (0), NIL);
|
|
||||||
setvar (cintern ("DISCARD"), flocons (1), NIL);
|
|
||||||
|
|
||||||
setvar (cintern ("EXPAND-AS-NECESSARY"), flocons (0), NIL);
|
|
||||||
setvar (cintern ("CLIP-TO-IMAGE"), flocons (1), NIL);
|
|
||||||
setvar (cintern ("CLIP-TO-BOTTOM-LAYER"), flocons (2), NIL);
|
|
||||||
|
|
||||||
setvar (cintern ("ADD"), flocons (0), NIL);
|
|
||||||
setvar (cintern ("SUB"), flocons (1), NIL);
|
|
||||||
setvar (cintern ("REPLACE"), flocons (2), NIL);
|
|
||||||
setvar (cintern ("INTERSECT"), flocons (3), NIL);
|
|
||||||
|
|
||||||
setvar (cintern ("PIXELS"), flocons (0), NIL);
|
|
||||||
setvar (cintern ("POINTS"), flocons (1), NIL);
|
|
||||||
|
|
||||||
setvar (cintern ("IMAGE-CLONE"), flocons (0), NIL);
|
|
||||||
setvar (cintern ("PATTERN-CLONE"), flocons (1), NIL);
|
|
||||||
|
|
||||||
setvar (cintern ("BLUR"), flocons (0), NIL);
|
|
||||||
setvar (cintern ("SHARPEN"), flocons (1), NIL);
|
|
||||||
|
|
||||||
setvar (cintern ("TRUE"), flocons (1), NIL);
|
setvar (cintern ("TRUE"), flocons (1), NIL);
|
||||||
setvar (cintern ("FALSE"), flocons (0), NIL);
|
setvar (cintern ("FALSE"), flocons (0), NIL);
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
#ifndef __SIOD_H__
|
#ifndef __SIOD_H__
|
||||||
#define __SIOD_H__
|
#define __SIOD_H__
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
struct obj
|
struct obj
|
||||||
{
|
{
|
||||||
short gc_mark;
|
short gc_mark;
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
#ifndef __SIOD_H__
|
#ifndef __SIOD_H__
|
||||||
#define __SIOD_H__
|
#define __SIOD_H__
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
struct obj
|
struct obj
|
||||||
{
|
{
|
||||||
short gc_mark;
|
short gc_mark;
|
||||||
|
|
|
@ -42,6 +42,7 @@ EXTRA_DIST = \
|
||||||
lib.pl \
|
lib.pl \
|
||||||
pdb.pl \
|
pdb.pl \
|
||||||
pdbgen.pl \
|
pdbgen.pl \
|
||||||
|
script-fu.pl \
|
||||||
stddefs.pdb \
|
stddefs.pdb \
|
||||||
util.pl \
|
util.pl \
|
||||||
$(pdb_sources)
|
$(pdb_sources)
|
||||||
|
@ -111,4 +112,12 @@ stamp-app: $(srcdir)/app.pl $(pdb_scripts) $(pdb_sources)
|
||||||
$(PERL) pdbgen.pl app \
|
$(PERL) pdbgen.pl app \
|
||||||
&& echo timestamp > $$rootme/stamp-app
|
&& echo timestamp > $$rootme/stamp-app
|
||||||
|
|
||||||
all-local: stamp-app
|
stamp-script-fu: $(srcdir)/script-fu.pl enums.pl util.pl
|
||||||
|
rootme=`pwd`; \
|
||||||
|
destdir=`cd $(top_srcdir)/plug-ins/script-fu && pwd`; export destdir; \
|
||||||
|
cd $(srcdir) && \
|
||||||
|
PDBGEN_BACKUP=$(PDBGEN_BACKUP) \
|
||||||
|
$(PERL) script-fu.pl \
|
||||||
|
&& echo timestamp > $$rootme/stamp-script-fu
|
||||||
|
|
||||||
|
all-local: stamp-app stamp-script-fu
|
||||||
|
|
|
@ -73,7 +73,8 @@ my $footer = <<'FOOTER';
|
||||||
:1;
|
:1;
|
||||||
FOOTER
|
FOOTER
|
||||||
|
|
||||||
my ($enumname, $contig, $symbols, @nicks, @mapping, $before, $chop);
|
my ($enumname, $contig, $symbols, @nicks, @mapping, $before);
|
||||||
|
my ($chop, $skip, $xform);
|
||||||
|
|
||||||
# Most of this enum parsing stuff was swiped from makeenums.pl in GTK+
|
# Most of this enum parsing stuff was swiped from makeenums.pl in GTK+
|
||||||
sub parse_options {
|
sub parse_options {
|
||||||
|
@ -150,6 +151,11 @@ sub parse_entries {
|
||||||
$nick =~ s/$chop//;
|
$nick =~ s/$chop//;
|
||||||
push @nicks, $name, $nick;
|
push @nicks, $name, $nick;
|
||||||
}
|
}
|
||||||
|
elsif (defined $xform) {
|
||||||
|
my $nick = $name;
|
||||||
|
eval "\$nick =~ $xform";
|
||||||
|
push @nicks, $name, $nick;
|
||||||
|
}
|
||||||
|
|
||||||
$symbols .= $name . ' ';
|
$symbols .= $name . ' ';
|
||||||
|
|
||||||
|
@ -194,8 +200,12 @@ while (<>) {
|
||||||
if (defined $2) {
|
if (defined $2) {
|
||||||
my %options = parse_options($2);
|
my %options = parse_options($2);
|
||||||
$chop = $options{"chop"};
|
$chop = $options{"chop"};
|
||||||
|
$skip = $options{"skip"};
|
||||||
|
$xform = $options{"xform"};
|
||||||
} else {
|
} else {
|
||||||
$chop = undef;
|
$chop = undef;
|
||||||
|
$skip = undef;
|
||||||
|
$xform = undef;
|
||||||
}
|
}
|
||||||
# Didn't have trailing '{' look on next lines
|
# Didn't have trailing '{' look on next lines
|
||||||
if (!defined $1) {
|
if (!defined $1) {
|
||||||
|
@ -232,7 +242,7 @@ while (<>) {
|
||||||
|
|
||||||
$ARGV =~ m@([^/]*)$@;
|
$ARGV =~ m@([^/]*)$@;
|
||||||
|
|
||||||
$code .= <<ENTRY;
|
$code .= <<ENTRY if !$skip;
|
||||||
: $enumname =>
|
: $enumname =>
|
||||||
: { contig => $contig,
|
: { contig => $contig,
|
||||||
: header => '$1',
|
: header => '$1',
|
||||||
|
|
|
@ -283,15 +283,6 @@ package Gimp::CodeGen::enums;
|
||||||
DODGEBURN_MIDTONES => '1',
|
DODGEBURN_MIDTONES => '1',
|
||||||
DODGEBURN_SHADOWS => '2' }
|
DODGEBURN_SHADOWS => '2' }
|
||||||
},
|
},
|
||||||
InternalOrientationType =>
|
|
||||||
{ contig => 1,
|
|
||||||
header => 'gimpimage.h',
|
|
||||||
symbols => [ qw(ORIENTATION_UNKNOWN ORIENTATION_HORIZONTAL
|
|
||||||
ORIENTATION_VERTICAL) ],
|
|
||||||
mapping => { ORIENTATION_UNKNOWN => '0',
|
|
||||||
ORIENTATION_HORIZONTAL => '1',
|
|
||||||
ORIENTATION_VERTICAL => '2' }
|
|
||||||
},
|
|
||||||
OrientationType =>
|
OrientationType =>
|
||||||
{ contig => 1,
|
{ contig => 1,
|
||||||
header => 'gimpimage.h',
|
header => 'gimpimage.h',
|
||||||
|
@ -368,7 +359,8 @@ package Gimp::CodeGen::enums;
|
||||||
PDB_FLOATARRAY PDB_STRINGARRAY PDB_COLOR
|
PDB_FLOATARRAY PDB_STRINGARRAY PDB_COLOR
|
||||||
PDB_REGION PDB_DISPLAY PDB_IMAGE PDB_LAYER
|
PDB_REGION PDB_DISPLAY PDB_IMAGE PDB_LAYER
|
||||||
PDB_CHANNEL PDB_DRAWABLE PDB_SELECTION
|
PDB_CHANNEL PDB_DRAWABLE PDB_SELECTION
|
||||||
PDB_BOUNDARY PDB_PATH PDB_PARASITE PDB_STATUS) ],
|
PDB_BOUNDARY PDB_PATH PDB_PARASITE PDB_STATUS
|
||||||
|
PDB_END) ],
|
||||||
mapping => { PDB_INT32 => '0',
|
mapping => { PDB_INT32 => '0',
|
||||||
PDB_INT16 => '1',
|
PDB_INT16 => '1',
|
||||||
PDB_INT8 => '2',
|
PDB_INT8 => '2',
|
||||||
|
@ -390,7 +382,8 @@ package Gimp::CodeGen::enums;
|
||||||
PDB_BOUNDARY => '18',
|
PDB_BOUNDARY => '18',
|
||||||
PDB_PATH => '19',
|
PDB_PATH => '19',
|
||||||
PDB_PARASITE => '20',
|
PDB_PARASITE => '20',
|
||||||
PDB_STATUS => '21' }
|
PDB_STATUS => '21',
|
||||||
|
PDB_END => '22' }
|
||||||
},
|
},
|
||||||
PDBStatusType =>
|
PDBStatusType =>
|
||||||
{ contig => 1,
|
{ contig => 1,
|
||||||
|
|
|
@ -437,7 +437,7 @@ HEADER
|
||||||
}
|
}
|
||||||
|
|
||||||
my $hfile = "$destdir/gimpenums.h$FILE_EXT";
|
my $hfile = "$destdir/gimpenums.h$FILE_EXT";
|
||||||
open HFILE, "> $hfile" or die "Can't open $cfile: $!\n";
|
open HFILE, "> $hfile" or die "Can't open $hfile: $!\n";
|
||||||
print HFILE $lgpl;
|
print HFILE $lgpl;
|
||||||
my $guard = "__GIMP_ENUMS_H__";
|
my $guard = "__GIMP_ENUMS_H__";
|
||||||
print HFILE <<HEADER;
|
print HFILE <<HEADER;
|
||||||
|
@ -448,17 +448,21 @@ HEADER
|
||||||
HEADER
|
HEADER
|
||||||
|
|
||||||
foreach (sort keys %enums) {
|
foreach (sort keys %enums) {
|
||||||
print HFILE "typedef enum\n(\n";
|
print HFILE "typedef enum\n{\n";
|
||||||
|
|
||||||
my $enum = $enums{$_}; my $body = "";
|
my $enum = $enums{$_}; my $body = "";
|
||||||
foreach $symbol (@{$enum->{symbols}}) {
|
foreach $symbol (@{$enum->{symbols}}) {
|
||||||
$body .= " $symbol";
|
my $sym = $symbol;
|
||||||
|
$sym = $enum->{nicks}->{$sym} if exists $enum->{nicks}->{$sym};
|
||||||
|
$body .= " $sym";
|
||||||
$body .= " = $enum->{mapping}->{$symbol}" if !$enum->{contig};
|
$body .= " = $enum->{mapping}->{$symbol}" if !$enum->{contig};
|
||||||
$body .= ",\n";
|
$body .= ",\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$body =~ s/,\n$//s;
|
$body =~ s/,\n$//s;
|
||||||
$body .= "\n} Gimp$_;\n\n";
|
$body .= "\n} ";
|
||||||
|
$body .= "Gimp" if !/^Gimp/;
|
||||||
|
$body .= "$_;\n\n";
|
||||||
print HFILE $body
|
print HFILE $body
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ HELP
|
||||||
);
|
);
|
||||||
|
|
||||||
@outargs = (
|
@outargs = (
|
||||||
{ name => "${type}_type", type => 'enum PDBArgType',
|
{ name => "${type}_type", type => 'enum PDBArgType (no PDB_END)',
|
||||||
desc => "The type of $long_type { %%desc%% }",
|
desc => "The type of $long_type { %%desc%% }",
|
||||||
alias => "${type}->arg_type", no_declare => 1 },
|
alias => "${type}->arg_type", no_declare => 1 },
|
||||||
{ name => "${type}_name", type => 'string',
|
{ name => "${type}_name", type => 'string',
|
||||||
|
|
|
@ -0,0 +1,86 @@
|
||||||
|
#!/usr/bin/perl -w
|
||||||
|
|
||||||
|
# The GIMP -- an image manipulation program
|
||||||
|
# Copyright (C) 1999 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
# 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 2 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUTFILE ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
BEGIN {
|
||||||
|
$srcdir = $ENV{srcdir} || '.';
|
||||||
|
$destdir = $ENV{destdir} || '.';
|
||||||
|
}
|
||||||
|
|
||||||
|
use lib $srcdir;
|
||||||
|
|
||||||
|
require 'enums.pl';
|
||||||
|
require 'util.pl';
|
||||||
|
|
||||||
|
*enums = \%Gimp::CodeGen::enums::enums;
|
||||||
|
|
||||||
|
*write_file = \&Gimp::CodeGen::util::write_file;
|
||||||
|
*FILE_EXT = \$Gimp::CodeGen::util::FILE_EXT;
|
||||||
|
|
||||||
|
my $constfile = "$destdir/script-fu-constants.c$FILE_EXT";
|
||||||
|
open CONSTFILE, "> $constfile" or die "Can't open $constfile: $!\n";
|
||||||
|
|
||||||
|
print CONSTFILE <<'GPL';
|
||||||
|
/* The GIMP -- an image manipulation program
|
||||||
|
* Copyright (C) 1995-1999 Spencer Kimball and Peter Mattis
|
||||||
|
*
|
||||||
|
* 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 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* NOTE: This file is autogenerated by script-fu.pl. */
|
||||||
|
|
||||||
|
GPL
|
||||||
|
|
||||||
|
print CONSTFILE <<CODE;
|
||||||
|
#include "siod.h"
|
||||||
|
|
||||||
|
void
|
||||||
|
init_generated_constants (void)
|
||||||
|
{
|
||||||
|
CODE
|
||||||
|
|
||||||
|
foreach (sort keys %enums) {
|
||||||
|
my $enum = $enums{$_};
|
||||||
|
foreach $symbol (@{$enum->{symbols}}) {
|
||||||
|
my $sym = $symbol;
|
||||||
|
$sym = $enum->{nicks}->{$sym} if exists $enum->{nicks}->{$sym};
|
||||||
|
$sym =~ s/_/-/g;
|
||||||
|
|
||||||
|
print CONSTFILE <<CODE;
|
||||||
|
setvar (cintern ("$sym"), flocons ($enum->{mapping}->{$symbol}), NIL);
|
||||||
|
CODE
|
||||||
|
}
|
||||||
|
print CONSTFILE "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
print CONSTFILE " return;\n}\n";
|
||||||
|
|
||||||
|
close CONSTFILE;
|
||||||
|
&write_file($constfile);
|
Loading…
Reference in New Issue