libfakekey 0.1
|
00001 #ifndef _HAVE_LIBFAKEKEY_H 00002 #define _HAVE_LIBFAKEKEY_H 00003 00004 #include <stdio.h> 00005 #include <stdlib.h> 00006 #include <X11/X.h> 00007 #include <X11/Xlib.h> 00008 #include <X11/Xlibint.h> 00009 #include <X11/Xutil.h> 00010 #include <X11/cursorfont.h> 00011 #include <X11/keysymdef.h> 00012 #include <X11/keysym.h> 00013 #include <X11/extensions/XTest.h> 00014 #include <X11/Xos.h> 00015 #include <X11/Xproto.h> 00016 00017 #ifdef __cplusplus 00018 extern "C" { 00019 #endif 00020 00035 typedef struct FakeKey FakeKey; 00036 00042 typedef enum 00043 { 00044 FAKEKEYMOD_SHIFT = (1<<1), 00045 FAKEKEYMOD_CONTROL = (1<<2), 00046 FAKEKEYMOD_ALT = (1<<3), 00047 FAKEKEYMOD_META = (1<<4) 00048 00049 } FakeKeyModifier; 00050 00058 FakeKey* 00059 fakekey_init(Display *xdpy); 00060 00061 00074 int 00075 fakekey_press(FakeKey *fk, 00076 const unsigned char *utf8_char_in, 00077 int len_bytes, 00078 int modifiers); 00079 00085 void 00086 fakekey_repeat(FakeKey *fk); 00087 00088 00094 void 00095 fakekey_release(FakeKey *fk); 00096 00105 int 00106 fakekey_reload_keysyms(FakeKey *fk); 00107 00117 int 00118 fakekey_press_keysym(FakeKey *fk, 00119 KeySym keysym, 00120 int flags); 00121 00131 int 00132 fakekey_send_keyevent(FakeKey *fk, 00133 KeyCode keycode, 00134 Bool is_press, 00135 int modifiers); 00136 00139 #ifdef __cplusplus 00140 } 00141 #endif 00142 00143 #endif /* _HAVE_LIBFAKEKEY_H */