Subversion Repositories HelenOS-historic

Rev

Rev 1476 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1476 Rev 1560
Line 33... Line 33...
33
 
33
 
34
/** Size of buffer for pressed keys */
34
/** Size of buffer for pressed keys */
35
#define KEYBUFFER_SIZE 128 
35
#define KEYBUFFER_SIZE 128 
36
 
36
 
37
typedef struct {
37
typedef struct {
38
    char fifo[KEYBUFFER_SIZE];
38
    int fifo[KEYBUFFER_SIZE];
39
    unsigned long head;
39
    unsigned long head;
40
    unsigned long tail;
40
    unsigned long tail;
41
    unsigned long items;
41
    unsigned long items;
42
} keybuffer_t;
42
} keybuffer_t;
43
 
43
 
44
void keybuffer_free(keybuffer_t *keybuffer);
44
void keybuffer_free(keybuffer_t *keybuffer);
45
void keybuffer_init(keybuffer_t *keybuffer);
45
void keybuffer_init(keybuffer_t *keybuffer);
46
int keybuffer_available(keybuffer_t *keybuffer);
46
int keybuffer_available(keybuffer_t *keybuffer);
47
int keybuffer_empty(keybuffer_t *keybuffer);
47
int keybuffer_empty(keybuffer_t *keybuffer);
48
void keybuffer_push(keybuffer_t *keybuffer, char key);
48
void keybuffer_push(keybuffer_t *keybuffer, int key);
49
int keybuffer_pop(keybuffer_t *keybuffer, char *c);
49
int keybuffer_pop(keybuffer_t *keybuffer, int *c);
50
 
50
 
51
#endif
51
#endif
52
 
52