1 /*
2  * Komposter
3  *
4  * Copyright (c) 2010 Noora Halme et al. (see AUTHORS)
5  *
6  * This code is licensed under the GNU General Public
7  * License version 2. See LICENSE for full text.
8  *
9  * Patch editor page
10  *
11  */
12 
13 #ifndef __PATCH_H__
14 #define __PATCH_H__
15 
16 #include <stdio.h>
17 #include "arch.h"
18 #include "constants.h"
19 #include "font.h"
20 #include "modules.h"
21 #include "synthesizer.h"
22 #include "widgets.h"
23 
24 void patch_init(void);
25 
26 // pattern mouse functions
27 void patch_mouse_hover(int x, int y);
28 void patch_mouse_drag(int x, int y);
29 void patch_mouse_click(int button, int state, int x, int y);
30 void patch_keyboard(unsigned char key, int x, int y);
31 void patch_keyboardup(unsigned char key, int x, int y);
32 void patch_specialkey(unsigned char key, int x, int y);
33 void patch_draw(void);
34 
35 // dialog callbacks for the modulator edit box
36 void patch_draw_modulator(void);
37 void patch_modulator_hover(int x, int y);
38 void patch_modulator_click(int button, int state, int x, int y);
39 void patch_modulator_keyboard(unsigned char key, int x, int y);
40 void patch_modulator_special(int key, int x, int y);
41 
42 // conversions to/from scale values
43 float knob_scale2float(int scale, float value);
44 float knob_float2scale(int scale, float value);
45 
46 #endif
47