~ubuntu-branches/ubuntu/jaunty/gimp/jaunty-security

« back to all changes in this revision

Viewing changes to plug-ins/FractalExplorer/FractalExplorer.h

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2008-10-06 13:30:41 UTC
  • mto: This revision was merged to the branch mainline in revision 35.
  • Revision ID: james.westby@ubuntu.com-20081006133041-3panbkcanaymfsmp
Tags: upstream-2.6.0
ImportĀ upstreamĀ versionĀ 2.6.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef __FRACTALEXPLORER_H__
2
 
#define __FRACTALEXPLORER_H__
3
 
 
4
 
 
5
 
/**********************************************************************
6
 
 Magic numbers
7
 
 *********************************************************************/
8
 
 
9
 
#define PREVIEW_SIZE 256
10
 
#define SCALE_WIDTH  200
11
 
#define ENTRY_WIDTH  60
12
 
#define MAX_LOAD_LINE 256
13
 
#define GR_WIDTH 325
14
 
 
15
 
#define MAXNCOLORS 8192
16
 
#define MAXSTRLEN 256
17
 
 
18
 
#define HELP_ID "plug-in-fractalexplorer"
19
 
 
20
 
#define FRACTAL_HEADER "Fractal Explorer Plug-In Version 2 - (c) 1997 <cotting@mygale.org>\n"
21
 
#define fractalexplorer_HEADER "Fractal Explorer Plug-In Version 2 - (c) 1997 <cotting@mygale.org>\n"
22
 
 
23
 
enum
24
 
{
25
 
  SINUS,
26
 
  COSINUS,
27
 
  NONE
28
 
};
29
 
 
30
 
enum
31
 
{
32
 
  TYPE_MANDELBROT,
33
 
  TYPE_JULIA,
34
 
  TYPE_BARNSLEY_1,
35
 
  TYPE_BARNSLEY_2,
36
 
  TYPE_BARNSLEY_3,
37
 
  TYPE_SPIDER,
38
 
  TYPE_MAN_O_WAR,
39
 
  TYPE_LAMBDA,
40
 
  TYPE_SIERPINSKI,
41
 
  NUM_TYPES
42
 
};
43
 
 
44
 
/**********************************************************************
45
 
 Types
46
 
 *********************************************************************/
47
 
 
48
 
typedef struct
49
 
{
50
 
  gint     fractaltype;
51
 
  gdouble  xmin;
52
 
  gdouble  xmax;
53
 
  gdouble  ymin;
54
 
  gdouble  ymax;
55
 
  gdouble  iter;
56
 
  gdouble  cx;
57
 
  gdouble  cy;
58
 
  gint     colormode;
59
 
  gdouble  redstretch;
60
 
  gdouble  greenstretch;
61
 
  gdouble  bluestretch;
62
 
  gint     redmode;
63
 
  gint     greenmode;
64
 
  gint     bluemode;
65
 
  gboolean redinvert;
66
 
  gboolean greeninvert;
67
 
  gboolean blueinvert;
68
 
  gboolean alwayspreview;
69
 
  gint     ncolors;
70
 
  gboolean gradinvert;
71
 
  gboolean useloglog;
72
 
} explorer_vals_t;
73
 
 
74
 
typedef struct
75
 
{
76
 
  GtkWidget *preview;
77
 
  guchar    *wimage;
78
 
  gint       run;
79
 
} explorer_interface_t;
80
 
 
81
 
/* typedef gint       colorvalue[3]; */
82
 
typedef struct
83
 
  {
84
 
    guchar r, g, b;
85
 
  } gucharRGB;
86
 
 
87
 
typedef gucharRGB  clrmap[MAXNCOLORS];
88
 
 
89
 
typedef guchar     vlumap[MAXNCOLORS];
90
 
 
91
 
typedef struct
92
 
{
93
 
  GtkWidget     *text;
94
 
  GtkAdjustment *data;
95
 
} scaledata;
96
 
 
97
 
typedef struct _DialogElements DialogElements;
98
 
 
99
 
struct _DialogElements
100
 
{
101
 
  GtkWidget  *type[NUM_TYPES];
102
 
  GtkObject  *xmin;
103
 
  GtkObject  *xmax;
104
 
  GtkObject  *ymin;
105
 
  GtkObject  *ymax;
106
 
  GtkObject  *iter;
107
 
  GtkObject  *cx;
108
 
  GtkObject  *cy;
109
 
 
110
 
  GtkObject  *ncol;
111
 
  GtkWidget  *useloglog;
112
 
 
113
 
  GtkObject  *red;
114
 
  GtkObject  *green;
115
 
  GtkObject  *blue;
116
 
 
117
 
  GtkWidget  *redmode[3];
118
 
  GtkWidget  *redinvert;
119
 
 
120
 
  GtkWidget  *greenmode[3];
121
 
  GtkWidget  *greeninvert;
122
 
 
123
 
  GtkWidget  *bluemode[3];
124
 
  GtkWidget  *blueinvert;
125
 
 
126
 
  GtkWidget  *colormode[2];
127
 
};
128
 
 
129
 
 
130
 
typedef struct DFigObj
131
 
{
132
 
  gchar           *name;      /* Trailing name of file  */
133
 
  gchar           *filename;  /* Filename itself */
134
 
  gchar           *draw_name; /* Name of the drawing */
135
 
  explorer_vals_t  opts;      /* Options enforced when fig saved */
136
 
  GtkWidget       *list_item;
137
 
  GtkWidget       *label_widget;
138
 
  GtkWidget       *pixmap_widget;
139
 
  gint             obj_status;
140
 
} fractalexplorerOBJ;
141
 
 
142
 
 
143
 
typedef struct GigObj
144
 
{
145
 
  gchar     *name;      /* Trailing name of file  */
146
 
  gchar     *filename;  /* Filename itself */
147
 
  gchar     *draw_name; /* Name of the drawing */
148
 
  gint       typus;
149
 
  GtkWidget *list_item;
150
 
  GtkWidget *label_widget;
151
 
  GtkWidget *pixmap_widget;
152
 
  gint       obj_status;
153
 
} gradientOBJ;
154
 
 
155
 
typedef struct _fractalexplorerListOptions
156
 
{
157
 
  GtkWidget          *query_box;
158
 
  GtkWidget          *name_entry;
159
 
  GtkWidget          *list_entry;
160
 
  fractalexplorerOBJ *obj;
161
 
  gint                created;
162
 
} fractalexplorerListOptions;
163
 
 
164
 
/* States of the object */
165
 
#define fractalexplorer_OK       0x0
166
 
#define fractalexplorer_MODIFIED 0x1
167
 
 
168
 
#define gradient_GRADIENTEDITOR  0x2
169
 
 
170
 
extern fractalexplorerOBJ *current_obj;
171
 
 
172
 
GtkWidget * add_objects_list (void);
173
 
 
174
 
/**********************************************************************
175
 
  Global variables
176
 
 *********************************************************************/
177
 
 
178
 
extern gdouble      xmin;
179
 
extern gdouble      xmax;
180
 
extern gdouble      ymin;
181
 
extern gdouble      ymax;
182
 
extern gdouble      xbild;
183
 
extern gdouble      ybild;
184
 
extern gdouble      xdiff;
185
 
extern gdouble      ydiff;
186
 
extern gint         sel_x1,
187
 
                    sel_y1,
188
 
                    sel_x2,
189
 
                    sel_y2;
190
 
extern gint         preview_width,
191
 
                    preview_height;
192
 
extern gdouble     *gg;
193
 
extern int          line_no;
194
 
extern gchar       *filename;
195
 
extern clrmap       colormap;
196
 
extern gchar       *fractalexplorer_path;
197
 
 
198
 
 
199
 
extern explorer_interface_t wint;
200
 
 
201
 
extern explorer_vals_t wvals;
202
 
extern GimpDrawable   *drawable;
203
 
 
204
 
 
205
 
/**********************************************************************
206
 
  Global functions
207
 
 *********************************************************************/
208
 
 
209
 
void explorer_render_row (const guchar *src_row,
210
 
                          guchar       *dest_row,
211
 
                          gint          row,
212
 
                          gint          row_width,
213
 
                          gint          bpp);
214
 
#endif