gimp/plug-ins/gimpressionist/gimpressionist.h

178 lines
4.2 KiB
C
Raw Normal View History

#ifndef __GIMPRESSIONIST_H
#define __GIMPRESSIONIST_H
/* Includes necessary for the correct processing of this file. */
#include <libgimp/gimp.h>
#include <libgimp/gimpui.h>
#include "ppmtool.h"
/* Defines */
#define PLUG_IN_NAME "plug_in_gimpressionist"
#define PLUG_IN_VERSION "v1.0, November 2003"
#define HELP_ID "plug-in-gimppressionist"
1999-08-26 22:29:37 +00:00
#define PREVIEWSIZE 150
#define MAXORIENTVECT 50
#define MAXSIZEVECT 50
1999-08-26 22:29:37 +00:00
#define NUMORIENTRADIO 8
#define NUMSIZERADIO 8
1999-08-26 22:29:37 +00:00
/* Type declaration and definitions */
typedef struct vector
{
1999-08-26 22:29:37 +00:00
double x, y;
double dir;
double dx, dy;
double str;
int type;
} vector_t;
1999-08-26 22:29:37 +00:00
typedef struct smvector
{
1999-08-26 22:29:37 +00:00
double x, y;
double siz;
double str;
} smvector_t;
1999-08-26 22:29:37 +00:00
typedef struct
{
int orientnum;
double orientfirst;
double orientlast;
int orienttype;
double brushrelief;
double brushscale;
double brushdensity;
double brushgamma;
int generalbgtype;
double generaldarkedge;
double paperrelief;
double paperscale;
int paperinvert;
int run;
char selectedbrush[200];
char selectedpaper[200];
GimpRGB color;
int generalpaintedges;
int placetype;
vector_t orientvector[MAXORIENTVECT];
int numorientvector;
int placecenter;
double brushaspect;
double orientangoff;
double orientstrexp;
int generaltileable;
int paperoverlay;
int orientvoronoi;
int colorbrushes;
int generaldropshadow;
double generalshadowdarkness;
int sizenum;
double sizefirst;
double sizelast;
int sizetype;
double devthresh;
1999-08-26 22:29:37 +00:00
smvector_t sizevector[MAXSIZEVECT];
int numsizevector;
double sizestrexp;
int sizevoronoi;
1999-08-26 22:29:37 +00:00
int generalshadowdepth;
int generalshadowblur;
1999-08-29 21:06:26 +00:00
int colortype;
double colornoise;
1999-08-26 22:29:37 +00:00
} gimpressionist_vals_t;
/* Enumerations */
enum GENERAL_BG_TYPE_ENUM
{
BG_TYPE_SOLID = 0,
BG_TYPE_KEEP_ORIGINAL = 1,
BG_TYPE_FROM_PAPER = 2,
BG_TYPE_TRANSPARENT = 3,
};
enum ORIENTATION_ENUM
{
ORIENTATION_VALUE = 0,
ORIENTATION_RADIUS = 1,
ORIENTATION_RANDOM = 2,
ORIENTATION_RADIAL = 3,
ORIENTATION_FLOWING = 4,
ORIENTATION_HUE = 5,
ORIENTATION_ADAPTIVE = 6,
ORIENTATION_MANUAL = 7,
};
enum PRESETS_LIST_COLUMN_ENUM
{
PRESETS_LIST_COLUMN_FILENAME = 0,
PRESETS_LIST_COLUMN_OBJECT_NAME = 1,
};
1999-08-26 22:29:37 +00:00
/* Globals */
extern gimpressionist_vals_t pcvals;
1999-08-26 22:29:37 +00:00
/* Prototypes */
GList *parsepath(void);
void free_parsepath_cache(void);
1999-08-26 22:29:37 +00:00
void create_orientationpage(GtkNotebook *);
void grabarea(void);
void storevals(void);
void restorevals(void);
gchar *findfile(const gchar *);
1999-08-26 22:29:37 +00:00
void unselectall(GtkWidget *list);
void reselect(GtkWidget *list, char *fname);
void readdirintolist(char *subdir, GtkWidget *view, char *selected);
void readdirintolist_extended(char *subdir, GtkWidget *view, char *selected,
gboolean with_filename_column,
gchar *(*get_object_name_cb)
(gchar *dir, gchar *filename, void *context),
void * context);
void orientation_restore(void);
1999-08-26 22:29:37 +00:00
GtkWidget *createonecolumnlist(GtkWidget *parent,
void (*changed_cb)
(GtkTreeSelection *selection, gpointer data));
void brush_reload(const gchar *fn, struct ppm *p);
1999-08-26 22:29:37 +00:00
void create_orientmap_dialog(void);
void update_orientmap_dialog(void);
double getdir(double x, double y, int from);
void create_sizemap_dialog(void);
double getsiz_proto (double x, double y, int n, smvector_t *vec,
double smstrexp, int voronoi);
void set_colorbrushes (const gchar *fn);
int create_gimpressionist (void);
double dist(double x, double y, double dx, double dy);
void restore_default_values(void);
GtkWidget *create_radio_button (GtkWidget *box, int orienttype,
void (*callback)(GtkWidget *wg, void *d),
gchar *label, gchar *help_string,
GSList **radio_group,
GtkWidget **buttons_array
);
#endif /* #ifndef __GIMPRESSIONIST_H */