Mercurial > audlegacy-plugins
annotate src/hotkey/plugin.h @ 2499:4d6045c20cc5
Include cleanups, part #4.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 31 Mar 2008 15:18:05 +0300 |
parents | ad45d65e9ae7 |
children |
rev | line source |
---|---|
2330
0be42d832217
Splitted core/gui/grabbing sources; Fixed memory leak when closing configuration dialog.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
diff
changeset
|
1 #ifndef _PLUGIN_H_INCLUDED_ |
0be42d832217
Splitted core/gui/grabbing sources; Fixed memory leak when closing configuration dialog.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
diff
changeset
|
2 #define _PLUGIN_H_INCLUDED_ |
0be42d832217
Splitted core/gui/grabbing sources; Fixed memory leak when closing configuration dialog.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
diff
changeset
|
3 |
0be42d832217
Splitted core/gui/grabbing sources; Fixed memory leak when closing configuration dialog.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
diff
changeset
|
4 #include <glib.h> |
0be42d832217
Splitted core/gui/grabbing sources; Fixed memory leak when closing configuration dialog.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
diff
changeset
|
5 |
0be42d832217
Splitted core/gui/grabbing sources; Fixed memory leak when closing configuration dialog.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
diff
changeset
|
6 #define TYPE_KEY 0 |
0be42d832217
Splitted core/gui/grabbing sources; Fixed memory leak when closing configuration dialog.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
diff
changeset
|
7 #define TYPE_MOUSE 1 |
0be42d832217
Splitted core/gui/grabbing sources; Fixed memory leak when closing configuration dialog.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
diff
changeset
|
8 |
2336
ad45d65e9ae7
Hotkey Plugin: Complete GUI rework. Ability to use more than one binding for the same action.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
2330
diff
changeset
|
9 typedef enum { |
ad45d65e9ae7
Hotkey Plugin: Complete GUI rework. Ability to use more than one binding for the same action.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
2330
diff
changeset
|
10 EVENT_PREV_TRACK = 0, |
ad45d65e9ae7
Hotkey Plugin: Complete GUI rework. Ability to use more than one binding for the same action.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
2330
diff
changeset
|
11 EVENT_PLAY, |
ad45d65e9ae7
Hotkey Plugin: Complete GUI rework. Ability to use more than one binding for the same action.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
2330
diff
changeset
|
12 EVENT_PAUSE, |
ad45d65e9ae7
Hotkey Plugin: Complete GUI rework. Ability to use more than one binding for the same action.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
2330
diff
changeset
|
13 EVENT_STOP, |
ad45d65e9ae7
Hotkey Plugin: Complete GUI rework. Ability to use more than one binding for the same action.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
2330
diff
changeset
|
14 EVENT_NEXT_TRACK, |
ad45d65e9ae7
Hotkey Plugin: Complete GUI rework. Ability to use more than one binding for the same action.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
2330
diff
changeset
|
15 |
ad45d65e9ae7
Hotkey Plugin: Complete GUI rework. Ability to use more than one binding for the same action.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
2330
diff
changeset
|
16 EVENT_FORWARD, |
ad45d65e9ae7
Hotkey Plugin: Complete GUI rework. Ability to use more than one binding for the same action.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
2330
diff
changeset
|
17 EVENT_BACKWARD, |
ad45d65e9ae7
Hotkey Plugin: Complete GUI rework. Ability to use more than one binding for the same action.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
2330
diff
changeset
|
18 EVENT_MUTE, |
ad45d65e9ae7
Hotkey Plugin: Complete GUI rework. Ability to use more than one binding for the same action.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
2330
diff
changeset
|
19 EVENT_VOL_UP, |
ad45d65e9ae7
Hotkey Plugin: Complete GUI rework. Ability to use more than one binding for the same action.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
2330
diff
changeset
|
20 EVENT_VOL_DOWN, |
ad45d65e9ae7
Hotkey Plugin: Complete GUI rework. Ability to use more than one binding for the same action.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
2330
diff
changeset
|
21 EVENT_JUMP_TO_FILE, |
ad45d65e9ae7
Hotkey Plugin: Complete GUI rework. Ability to use more than one binding for the same action.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
2330
diff
changeset
|
22 EVENT_TOGGLE_WIN, |
ad45d65e9ae7
Hotkey Plugin: Complete GUI rework. Ability to use more than one binding for the same action.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
2330
diff
changeset
|
23 EVENT_SHOW_AOSD, |
ad45d65e9ae7
Hotkey Plugin: Complete GUI rework. Ability to use more than one binding for the same action.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
2330
diff
changeset
|
24 |
ad45d65e9ae7
Hotkey Plugin: Complete GUI rework. Ability to use more than one binding for the same action.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
2330
diff
changeset
|
25 EVENT_MAX |
ad45d65e9ae7
Hotkey Plugin: Complete GUI rework. Ability to use more than one binding for the same action.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
2330
diff
changeset
|
26 } EVENT; |
ad45d65e9ae7
Hotkey Plugin: Complete GUI rework. Ability to use more than one binding for the same action.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
2330
diff
changeset
|
27 |
ad45d65e9ae7
Hotkey Plugin: Complete GUI rework. Ability to use more than one binding for the same action.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
2330
diff
changeset
|
28 |
ad45d65e9ae7
Hotkey Plugin: Complete GUI rework. Ability to use more than one binding for the same action.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
2330
diff
changeset
|
29 typedef struct _HotkeyConfiguration { |
2330
0be42d832217
Splitted core/gui/grabbing sources; Fixed memory leak when closing configuration dialog.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
diff
changeset
|
30 gint key, mask; |
0be42d832217
Splitted core/gui/grabbing sources; Fixed memory leak when closing configuration dialog.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
diff
changeset
|
31 gint type; |
2336
ad45d65e9ae7
Hotkey Plugin: Complete GUI rework. Ability to use more than one binding for the same action.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
2330
diff
changeset
|
32 EVENT event; |
ad45d65e9ae7
Hotkey Plugin: Complete GUI rework. Ability to use more than one binding for the same action.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
2330
diff
changeset
|
33 struct _HotkeyConfiguration *next; |
2330
0be42d832217
Splitted core/gui/grabbing sources; Fixed memory leak when closing configuration dialog.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
diff
changeset
|
34 } HotkeyConfiguration; |
0be42d832217
Splitted core/gui/grabbing sources; Fixed memory leak when closing configuration dialog.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
diff
changeset
|
35 |
0be42d832217
Splitted core/gui/grabbing sources; Fixed memory leak when closing configuration dialog.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
diff
changeset
|
36 typedef struct { |
0be42d832217
Splitted core/gui/grabbing sources; Fixed memory leak when closing configuration dialog.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
diff
changeset
|
37 gint vol_increment; |
0be42d832217
Splitted core/gui/grabbing sources; Fixed memory leak when closing configuration dialog.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
diff
changeset
|
38 gint vol_decrement; |
0be42d832217
Splitted core/gui/grabbing sources; Fixed memory leak when closing configuration dialog.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
diff
changeset
|
39 |
0be42d832217
Splitted core/gui/grabbing sources; Fixed memory leak when closing configuration dialog.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
diff
changeset
|
40 /* keyboard */ |
2336
ad45d65e9ae7
Hotkey Plugin: Complete GUI rework. Ability to use more than one binding for the same action.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
2330
diff
changeset
|
41 HotkeyConfiguration first; |
2330
0be42d832217
Splitted core/gui/grabbing sources; Fixed memory leak when closing configuration dialog.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
diff
changeset
|
42 } PluginConfig; |
0be42d832217
Splitted core/gui/grabbing sources; Fixed memory leak when closing configuration dialog.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
diff
changeset
|
43 |
2336
ad45d65e9ae7
Hotkey Plugin: Complete GUI rework. Ability to use more than one binding for the same action.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
2330
diff
changeset
|
44 |
ad45d65e9ae7
Hotkey Plugin: Complete GUI rework. Ability to use more than one binding for the same action.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
2330
diff
changeset
|
45 |
2330
0be42d832217
Splitted core/gui/grabbing sources; Fixed memory leak when closing configuration dialog.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
diff
changeset
|
46 void load_config (void); |
0be42d832217
Splitted core/gui/grabbing sources; Fixed memory leak when closing configuration dialog.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
diff
changeset
|
47 void save_config (void); |
0be42d832217
Splitted core/gui/grabbing sources; Fixed memory leak when closing configuration dialog.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
diff
changeset
|
48 PluginConfig* get_config(void); |
0be42d832217
Splitted core/gui/grabbing sources; Fixed memory leak when closing configuration dialog.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
diff
changeset
|
49 gboolean is_loaded (void); |
2336
ad45d65e9ae7
Hotkey Plugin: Complete GUI rework. Ability to use more than one binding for the same action.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
2330
diff
changeset
|
50 gboolean handle_keyevent(EVENT event); |
2330
0be42d832217
Splitted core/gui/grabbing sources; Fixed memory leak when closing configuration dialog.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
diff
changeset
|
51 |
0be42d832217
Splitted core/gui/grabbing sources; Fixed memory leak when closing configuration dialog.
Sascha Hlusiak <contact@saschahlusiak.de>
parents:
diff
changeset
|
52 #endif |