|
libxputty
0.1
A damn tiny abstraction Layer to create X11 window/widgets with cairo surfaces
|
|
Go to the source code of this file.
◆ XMIDI_KEYBOARD_H_
#define XMIDI_KEYBOARD_H_ |
◆ midikeyfunc
typedef void(* midikeyfunc) (Widget_t *w, int *key, bool on_off) |
◆ midiwheelfunc
typedef void(* midiwheelfunc) (Widget_t *w, int *value) |
◆ clear_key_matrix()
void clear_key_matrix |
( |
unsigned long * |
key_matrix | ) |
|
◆ have_key_in_matrix()
bool have_key_in_matrix |
( |
unsigned long * |
key_matrix | ) |
|
◆ is_key_in_matrix()
bool is_key_in_matrix |
( |
unsigned long * |
key_matrix, |
|
|
int |
key |
|
) |
| |
Definition at line 183 of file xmidi_keyboard.c.
184 unsigned long *use_matrix = &key_matrix[0];
188 use_matrix = &key_matrix[3];
191 use_matrix = &key_matrix[2];
194 use_matrix = &key_matrix[1];
198 if((*use_matrix) & (1<<key)) {
◆ keysym_azerty_to_midi_key()
void keysym_azerty_to_midi_key |
( |
long |
inkey, |
|
|
float * |
midi_key |
|
) |
| |
Definition at line 24 of file xmidi_keyboard.c.
26 case(XK_w) : (*midi_key) = 12.0;
28 case(XK_s) : (*midi_key) = 13.0;
30 case(XK_x) : (*midi_key) = 14.0;
32 case(XK_d) : (*midi_key) = 15.0;
34 case(XK_c) : (*midi_key) = 16.0;
36 case(XK_v) : (*midi_key) = 17.0;
38 case(XK_g) : (*midi_key) = 18.0;
40 case(XK_b) : (*midi_key) = 19.0;
42 case(XK_h) : (*midi_key) = 20.0;
44 case(XK_n) : (*midi_key) = 21.0;
46 case(XK_j) : (*midi_key) = 22.0;
48 case(XK_comma) : (*midi_key) = 23.0;
50 case(XK_a) : (*midi_key) = 24.0;
52 case(XK_eacute) : (*midi_key) = 25.0;
54 case(XK_z) : (*midi_key) = 26.0;
56 case(XK_quotedbl) : (*midi_key) = 27.0;
58 case(XK_e) : (*midi_key) = 28.0;
60 case(XK_r) : (*midi_key) = 29.0;
62 case(XK_parenleft) : (*midi_key) = 30.0;
64 case(XK_t) : (*midi_key) = 31.0;
66 case(XK_minus) : (*midi_key) = 32.0;
68 case(XK_y) : (*midi_key) = 33.0;
70 case(XK_egrave) : (*midi_key) = 34.0;
72 case(XK_u) : (*midi_key) = 35.0;
74 case(XK_i) : (*midi_key) = 36.0;
76 case(XK_ccedilla) : (*midi_key) = 37.0;
78 case(XK_o) : (*midi_key) = 38.0;
80 case(XK_agrave) : (*midi_key) = 39.0;
82 case(XK_p) : (*midi_key) = 40.0;
84 case(XK_dead_diaeresis) :
85 case(XK_dead_circumflex) : (*midi_key) = 41.0;
◆ keysym_qwerty_to_midi_key()
void keysym_qwerty_to_midi_key |
( |
unsigned int |
inkey, |
|
|
float * |
midi_key |
|
) |
| |
◆ keysym_qwertz_to_midi_key()
void keysym_qwertz_to_midi_key |
( |
long |
inkey, |
|
|
float * |
midi_key |
|
) |
| |
Definition at line 90 of file xmidi_keyboard.c.
92 case(XK_y) : (*midi_key) = 12.0;
94 case(XK_s) : (*midi_key) = 13.0;
96 case(XK_x) : (*midi_key) = 14.0;
98 case(XK_d) : (*midi_key) = 15.0;
100 case(XK_c) : (*midi_key) = 16.0;
102 case(XK_v) : (*midi_key) = 17.0;
104 case(XK_g) : (*midi_key) = 18.0;
106 case(XK_b) : (*midi_key) = 19.0;
108 case(XK_h) : (*midi_key) = 20.0;
110 case(XK_n) : (*midi_key) = 21.0;
112 case(XK_j) : (*midi_key) = 22.0;
114 case(XK_m) : (*midi_key) = 23.0;
116 case(XK_q) : (*midi_key) = 24.0;
118 case(XK_2) : (*midi_key) = 25.0;
120 case(XK_w) : (*midi_key) = 26.0;
122 case(XK_3) : (*midi_key) = 27.0;
124 case(XK_e) : (*midi_key) = 28.0;
126 case(XK_r) : (*midi_key) = 29.0;
128 case(XK_5) : (*midi_key) = 30.0;
130 case(XK_t) : (*midi_key) = 31.0;
132 case(XK_6) : (*midi_key) = 32.0;
134 case(XK_z) : (*midi_key) = 33.0;
136 case(XK_7) : (*midi_key) = 34.0;
138 case(XK_u) : (*midi_key) = 35.0;
140 case(XK_i) : (*midi_key) = 36.0;
142 case(XK_9) : (*midi_key) = 37.0;
144 case(XK_o) : (*midi_key) = 38.0;
146 case(XK_0) : (*midi_key) = 39.0;
148 case(XK_p) : (*midi_key) = 40.0;
150 case(XK_udiaeresis) : (*midi_key) = 41.0;
152 case(XK_plus) : (*midi_key) = 42.0;
◆ open_midi_keyboard()
Definition at line 793 of file xmidi_keyboard.c.
795 XSelectInput(wid->
app->
dpy, wid->
widget,StructureNotifyMask|ExposureMask|KeyPressMask
796 |EnterWindowMask|LeaveWindowMask|ButtonReleaseMask|KeyReleaseMask
797 |ButtonPressMask|Button1MotionMask|PointerMotionMask);
References MidiKeyboard::active_key, Widget_t::app, create_window(), Xputty::dpy, Func_t::expose_callback, Widget_t::flags, Widget_t::func, HAS_MEM, MidiKeyboard::icon, MidiKeyboard::key_matrix, MidiKeyboard::layout, NO_AUTOREPEAT, MidiKeyboard::octave, Widget_t::parent, Widget_t::parent_struct, MidiKeyboard::prelight_key, MidiKeyboard::send_key, and Widget_t::widget.
midiwheelfunc mk_send_volume
midiwheelfunc mk_send_detune
midiwheelfunc mk_send_velocity
Widget_t * combobox_add_entry(Widget_t *wid, const char *label)
combobox_add_entry - add a entry to the combobox
Widget_t * add_hslider(Widget_t *parent, const char *label, int x, int y, int width, int height)
add_hslider - add a horizontal slider to a Widget_t connect to func.value_changed_callback to impleme...
evfunc key_release_callback
float adj_get_value(Adjustment_t *adj)
adj_get_value - get the current value of the Adjustment_t
midiwheelfunc mk_send_all_sound_off
void keysym_qwertz_to_midi_key(long inkey, float *midi_key)
void adj_set_scale(Adjustment_t *adj, float value)
adj_set_scale - internal use to scale the pointer movement (0.1 -1.0)
midiwheelfunc mk_send_release
evfunc key_press_callback
midiwheelfunc mk_send_mod
unsigned long key_matrix[4]
midiwheelfunc mk_send_attack
evfunc button_press_callback
Widget_t * add_keyboard_knob(Widget_t *parent, const char *label, int x, int y, int width, int height)
void combobox_set_active_entry(Widget_t *w, int active)
combobox_set_active_entry - set the active combobox entry
xevfunc map_notify_callback
midiwheelfunc mk_send_pitchsensity
xevfunc mem_free_callback
evfunc button_release_callback
void set_adjustment(Adjustment_t *adj, float std_value, float value, float min_value, float max_value, float step, CL_type type)
*set_adjustment - set a new range to a existing Adjustment_t it will be created if it not exsits yet
midiwheelfunc mk_send_sustain
midiwheelfunc mk_send_pitch
void widget_set_icon_from_png(Widget_t *w, Pixmap *icon_, const unsigned char *name)
widget_set_icon_from_png - set icon image from png binary to Widget_t those icon will be used in the ...
Widget_t * add_combobox(Widget_t *parent, const char *label, int x, int y, int width, int height)
add_combobox - add a combobox
xevfunc value_changed_callback