~ubuntu-branches/ubuntu/trusty/xbindkeys/trusty-proposed

« back to all changes in this revision

Viewing changes to keys.h

  • Committer: Bazaar Package Importer
  • Author(s): Joerg Jaspert
  • Date: 2007-09-15 00:29:59 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070915002959-4jh4wh93ge15ktzq
Tags: 1.8.2-1
* New upstream version (Closes: #346423, #388690)
  - Enable a full access to the xbindkeys internal from the guile
    scheme configuration file. A grabbed key can start a shell command
    or run a scheme function. This enable to do more powerfull things
    inside xbindkeys whitout the need of an external shell script
    (like double click, timed double click or keys combinations).
  - Configuration files are reloaded on the fly when they have
    changed so there is no more need to send a HUP signal to reload
    them
        - Changes to grab keys in all display screens and not only in the
    default root window (Xinerama suport).
* ACK 1.7.1-1.1 NMU, thanks to Steinar H. Gunderson (Closes: #349111).
* Bug fix: "xbindkeys: It's not to be called "X Windows"
  ;-)", thanks to Jan Minar (Closes: #270207).
* Bug fix from upstream: "xbindkeys doesn't work", thanks to BaBL
  (Closes: #405015).
* Update description with the new guile stuff.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
#define __KEYS_H
20
20
 
21
21
#include <X11/Xlib.h>
 
22
#ifdef GUILE_FLAG
 
23
#include <libguile.h>
 
24
#endif
22
25
 
23
26
typedef enum
24
27
  { SYM, CODE, BUTTON }
28
31
  { PRESS, RELEASE}
29
32
EventType_t;
30
33
 
 
34
#ifndef GUILE_FLAG
 
35
typedef int SCM;
 
36
#endif
 
37
 
31
38
typedef struct
32
39
{
33
40
  KeyType_t type;
44
51
 
45
52
  unsigned int modifier;
46
53
  char *command;
 
54
  SCM function;    // This is to call a scheme function instead of a shell command
 
55
                   // when command == NULL (not used when guile is not used).
47
56
}
48
57
Keys_t;
49
58
 
53
62
 
54
63
extern int add_key (KeyType_t type, EventType_t event_type, KeySym keysym, KeyCode keycode,
55
64
                    unsigned int button, unsigned int modifier,
56
 
                    char *command);
 
65
                    char *command, SCM function);
 
66
 
 
67
extern int remove_key (KeyType_t type, EventType_t event_type, KeySym keysym, KeyCode keycode,
 
68
                       unsigned int button, unsigned int modifier);
 
69
 
57
70
 
58
71
extern void show_key_binding (Display * d);
59
72
 
60
73
extern void print_key (Display * d, Keys_t * key);
61
74
 
62
75
extern void set_keysym (Keys_t * key, EventType_t event_type, KeySym keysym,
63
 
                        unsigned int modifier, char *command);
64
 
extern void set_keycode (Keys_t * key, EventType_t event_type, KeySym keycode,
65
 
                         unsigned int modifier, char *command);
 
76
                        unsigned int modifier, char *command, SCM function);
 
77
extern void set_keycode (Keys_t * key, EventType_t event_type, KeyCode keycode,
 
78
                         unsigned int modifier, char *command, SCM function);
66
79
extern void set_button (Keys_t * key, EventType_t event_type, unsigned int button,
67
 
                        unsigned int modifier, char *command);
 
80
                        unsigned int modifier, char *command, SCM function);
68
81
 
69
82
extern void free_key (Keys_t * key);
70
83
 
72
85
 
73
86
extern void modifier_to_string (unsigned int modifier, char *str);
74
87
 
 
88
extern void run_command (char * command);
 
89
 
75
90
 
76
91
extern int nb_keys;
77
92
extern Keys_t *keys;