summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2011-08-20 17:18:09 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-08-20 17:18:09 (GMT)
commit99b67598aa7400300d7e548bc5d0293f09632c25 (patch)
treeb690bb37dab412500f7118077bd179891ac4b475 /includes
parent03ee03ed1e735352082fa35a06444bbf389bf9c6 (diff)
downloadpowder-99b67598aa7400300d7e548bc5d0293f09632c25.zip
powder-99b67598aa7400300d7e548bc5d0293f09632c25.tar.gz
Changes to unify mouse and keyboard events for Lua
Diffstat (limited to 'includes')
-rw-r--r--includes/interface.h2
-rw-r--r--includes/luaconsole.h10
2 files changed, 9 insertions, 3 deletions
diff --git a/includes/interface.h b/includes/interface.h
index aff63e4..eac295d 100644
--- a/includes/interface.h
+++ b/includes/interface.h
@@ -132,7 +132,7 @@ typedef struct ui_richtext ui_richtext;
int SLALT;
extern SDLMod sdl_mod;
-extern int sdl_key, sdl_wheel, sdl_caps, sdl_ascii, sdl_zoom_trig;
+extern int sdl_key, sdl_rkey, sdl_wheel, sdl_caps, sdl_ascii, sdl_zoom_trig;
#if (defined(LIN32) || defined(LIN64)) && defined(SDL_VIDEO_DRIVER_X11)
extern SDL_SysWMinfo sdl_wminfo;
extern Atom XA_CLIPBOARD, XA_TARGETS;
diff --git a/includes/luaconsole.h b/includes/luaconsole.h
index 036327a..5a5ca2b 100644
--- a/includes/luaconsole.h
+++ b/includes/luaconsole.h
@@ -11,10 +11,16 @@
#endif
#include <defines.h>
+#define LUACON_MDOWN 1
+#define LUACON_MUP 2
+#define LUACON_MPRESS 3
+#define LUACON_KDOWN 1
+#define LUACON_KUP 2
+
void luacon_open();
int luacon_step(int mx, int my);
-int luacon_mouseclick(int mx, int my, int mb, int mbq);
-int luacon_keypress(char key, int modifier);
+int luacon_mouseevent(int mx, int my, int mb, int event);
+int luacon_keyevent(char key, int modifier, int event);
int luacon_eval(char *command);
char *luacon_geterror();
void luacon_close();