2000-04-26 04:03:38 -04:00
|
|
|
#ifndef __KEYBOARD_H
|
|
|
|
#define __KEYBOARD_H
|
|
|
|
|
|
|
|
#include "signals.h"
|
|
|
|
|
2000-07-08 17:47:05 -04:00
|
|
|
typedef struct {
|
2000-04-26 04:03:38 -04:00
|
|
|
char *id;
|
|
|
|
char *description;
|
|
|
|
|
|
|
|
GSList *keys;
|
2000-07-08 17:47:05 -04:00
|
|
|
} KEYINFO_REC;
|
2000-04-26 04:03:38 -04:00
|
|
|
|
2000-07-08 17:47:05 -04:00
|
|
|
typedef struct {
|
2000-04-26 04:03:38 -04:00
|
|
|
KEYINFO_REC *info;
|
|
|
|
|
|
|
|
char *key;
|
2000-07-08 18:31:11 -04:00
|
|
|
char *data;
|
2000-07-08 17:47:05 -04:00
|
|
|
} KEY_REC;
|
2000-04-26 04:03:38 -04:00
|
|
|
|
|
|
|
extern GSList *keyinfos;
|
|
|
|
|
2000-07-08 17:47:05 -04:00
|
|
|
void key_bind(const char *id, const char *description,
|
|
|
|
const char *key_default, const char *data, SIGNAL_FUNC func);
|
|
|
|
void key_unbind(const char *id, SIGNAL_FUNC func);
|
2000-04-26 04:03:38 -04:00
|
|
|
|
2000-07-08 17:47:05 -04:00
|
|
|
void key_configure_add(const char *id, const char *key, const char *data);
|
|
|
|
void key_configure_remove(const char *key);
|
2000-04-26 04:03:38 -04:00
|
|
|
|
2000-07-08 17:47:05 -04:00
|
|
|
KEYINFO_REC *key_info_find(const char *id);
|
|
|
|
int key_pressed(const char *key, void *data);
|
2000-04-26 04:03:38 -04:00
|
|
|
|
|
|
|
void keyboard_init(void);
|
|
|
|
void keyboard_deinit(void);
|
|
|
|
|
|
|
|
#endif
|