1 /*	otherwindow.h
2 	Copyright (C) 2004-2020 Mark Tyler and Dmitry Groshev
3 
4 	This file is part of mtPaint.
5 
6 	mtPaint is free software; you can redistribute it and/or modify
7 	it under the terms of the GNU General Public License as published by
8 	the Free Software Foundation; either version 3 of the License, or
9 	(at your option) any later version.
10 
11 	mtPaint is distributed in the hope that it will be useful,
12 	but WITHOUT ANY WARRANTY; without even the implied warranty of
13 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 	GNU General Public License for more details.
15 
16 	You should have received a copy of the GNU General Public License
17 	along with mtPaint in the file COPYING.
18 */
19 
20 
21 #define COLSEL_OVERLAYS  1
22 #define COLSEL_EDIT_AB   2
23 #define COLSEL_EDIT_CSEL 3
24 #define COLSEL_GRID      4
25 #define COLSEL_EDIT_ALL  256
26 
27 #define CHOOSE_PATTERN 0
28 #define CHOOSE_BRUSH   1
29 #define CHOOSE_COLOR   2
30 
31 /// Generic V-code to handle UI needs of common image transform tasks
32 
33 typedef int (*filterwindow_fn)(void *ddata, void **wdata);
34 #define FW_FN(X) (filterwindow_fn)(X)
35 
36 typedef struct {
37 	char *name;
38 	void **code;
39 	filterwindow_fn evt;
40 } filterwindow_dd;
41 
42 extern void *filterwindow_code[];
43 
44 typedef struct {
45 	filterwindow_dd fw;
46 	int n[3];
47 } spin1_dd;
48 
49 extern void *spin1_code[];
50 
51 
52 int mem_preview, mem_preview_clip, brcosa_auto;
53 transform_state def_bcsp;
54 int sharper_reduce;
55 int spal_mode;
56 seg_state *seg_preview;
57 int xhold_preview;
58 int noise_preview;
59 
60 void generic_new_window(int type);
61 
62 void pressed_add_cols();
63 void pressed_brcosa(void **xb);
64 void pressed_bacteria();
65 void pressed_scale_size(int mode);
66 
67 void pressed_sort_pal();
68 void pressed_quantize(int palette);
69 void pressed_pick_gradient();
70 
71 void choose_pattern(int typ);				// Bring up pattern chooser
72 
73 void colour_selector( int cs_type );			// Bring up GTK+ colour wheel
74 
75 int do_new_one(int nw, int nh, int nc, png_color *pal, int bpp, int undo);
76 void do_new_chores(int undo);
77 void reset_tools();
78 
79 void memory_errors(int type);
80 
81 void gradient_setup(int mode);
82 
83 void pressed_skew();
84 
85 void bkg_setup();
86 
87 void pressed_segment();
88 
89 void pressed_xhold();
90 
91 void pressed_noise();
92