File: patch.h

package info (click to toggle)
komposter 0%2Bgit20201216%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,760 kB
  • sloc: ansic: 15,581; sh: 4,176; asm: 642; makefile: 74
file content (46 lines) | stat: -rw-r--r-- 1,245 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
 * Komposter
 *
 * Copyright (c) 2010 Noora Halme et al. (see AUTHORS)
 *
 * This code is licensed under the GNU General Public
 * License version 2. See LICENSE for full text.
 *
 * Patch editor page 
 *
 */

#ifndef __PATCH_H__
#define __PATCH_H__

#include <stdio.h>
#include "arch.h"
#include "constants.h"
#include "font.h"
#include "modules.h"
#include "synthesizer.h"
#include "widgets.h"

void patch_init(void);

// pattern mouse functions
void patch_mouse_hover(int x, int y);
void patch_mouse_drag(int x, int y);
void patch_mouse_click(int button, int state, int x, int y);
void patch_keyboard(unsigned char key, int x, int y);
void patch_keyboardup(unsigned char key, int x, int y);
void patch_specialkey(unsigned char key, int x, int y);
void patch_draw(void);

// dialog callbacks for the modulator edit box
void patch_draw_modulator(void);
void patch_modulator_hover(int x, int y);
void patch_modulator_click(int button, int state, int x, int y);
void patch_modulator_keyboard(unsigned char key, int x, int y);
void patch_modulator_special(int key, int x, int y);

// conversions to/from scale values 
float knob_scale2float(int scale, float value);
float knob_float2scale(int scale, float value);
                      
#endif