summaryrefslogtreecommitdiff
path: root/src/fe-common/core/keyboard.h
blob: a6278adc823226f29d51aeee6c52a1ec14bf80e3 (plain)
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
#ifndef __KEYBOARD_H
#define __KEYBOARD_H

#include "signals.h"

typedef struct
{
	char *id;
	char *description;

	GSList *keys;
}
KEYINFO_REC;

typedef struct
{
	KEYINFO_REC *info;

	char *key;
	void *data;
}
KEY_REC;

extern GSList *keyinfos;

void key_bind(gchar *id, gchar *data, gchar *description, gchar *key_default, SIGNAL_FUNC func);
void key_unbind(gchar *id, SIGNAL_FUNC func);

void key_configure_add(gchar *id, gchar *data, gchar *key);
void key_configure_remove(gchar *key);

KEYINFO_REC *key_info_find(gchar *id);
gboolean key_pressed(gchar *key, gpointer data);

void keyboard_save(void);

void keyboard_init(void);
void keyboard_deinit(void);

#endif