gimp/plug-ins/gimpressionist/gimpressionist.h

202 lines
4.8 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>
/* 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 char *standalone;
extern gimpressionist_vals_t pcvals;
extern char *path;
extern struct ppm infile;
extern struct ppm inalpha;
extern GtkWidget *window;
extern int brushfile;
extern struct ppm brushppm;
extern GtkObject *devthreshadjust;
extern GtkWidget *colortype;
extern GtkObject *colornoiseadjust;
1999-08-26 22:29:37 +00:00
extern GtkWidget *previewbutton;
extern gboolean img_has_alpha;
1999-08-26 22:29:37 +00:00
configure.in app/core/gimpbrushpipe.c app/gui/about-dialog.c 2002-11-20 Dave Neary <bolsh@gimp.org> * configure.in * app/core/gimpbrushpipe.c * app/gui/about-dialog.c * app/paint-funcs/paint-funcs-generic.h * app/paint-funcs/paint-funcs.c * libgimpmath/gimpmath.h * libgimpwidgets/gimpwidgets.c * plug-ins/common/CML_explorer.c * plug-ins/common/blur.c * plug-ins/common/cubism.c * plug-ins/common/gee.c * plug-ins/common/gee_zoom.c * plug-ins/common/gqbist.c * plug-ins/common/jigsaw.c * plug-ins/common/lic.c * plug-ins/common/noisify.c * plug-ins/common/nova.c * plug-ins/common/papertile.c * plug-ins/common/plasma.c * plug-ins/common/randomize.c * plug-ins/common/sample_colorize.c * plug-ins/common/scatter_hsv.c * plug-ins/common/shift.c * plug-ins/common/sinus.c * plug-ins/common/smooth_palette.c * plug-ins/common/snoise.c * plug-ins/common/sparkle.c * plug-ins/common/spheredesigner.c * plug-ins/common/spread.c * plug-ins/common/warp.c * plug-ins/common/wind.c * plug-ins/flame/cmap.c * plug-ins/flame/flame.c * plug-ins/flame/libifs.c * plug-ins/gflare/gflare.c * plug-ins/gimpressionist/gimpressionist.c * plug-ins/gimpressionist/gimpressionist.h * plug-ins/gimpressionist/plasma.c * plug-ins/gimpressionist/repaint.c * plug-ins/ifscompose/ifscompose_utils.c * plug-ins/maze/algorithms.c * plug-ins/maze/maze.c * plug-ins/maze/maze.h * plug-ins/mosaic/mosaic.c: Change all occurrences of RAND_MAX, G_MAXRAND, rand(), srand(), lrand48(), srand48(), random(), srandom(), RAND_FUNC and SRAND_FUNC to the appropriate g_rand* equivalent. Programs which require seed setting for reproducible results, and anything in the core, gets a dedicated GRand * for the lifetime required. Programs which only ever used random numbers for tossing a coin, rolling a dice, etc use g_random functions. For the rest, judgement was used. Where it was easy, a GRand * object was used and g_rand_* functions were preferred. This fixes bug #67386 in HEAD.
2002-11-20 09:27:48 +00:00
extern GRand *gr;
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_paperpage(GtkNotebook *);
void create_brushpage(GtkNotebook *);
void create_orientationpage(GtkNotebook *);
void create_generalpage(GtkNotebook *);
void create_placementpage(GtkNotebook *);
void create_colorpage(GtkNotebook *);
1999-08-26 22:29:37 +00:00
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);
void paper_store(void);
void paper_restore(void);
1999-08-26 22:29:37 +00:00
GtkWidget *createonecolumnlist(GtkWidget *parent,
void (*changed_cb)
(GtkTreeSelection *selection, gpointer data));
void reloadbrush(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 */