]> git.decadent.org.uk Git - ion3.git/blob - ioncore/pointer.h
7b73cdb411f9fd2f8948ff1a06488889f5b602f2
[ion3.git] / ioncore / pointer.h
1 /*
2  * ion/ioncore/pointer.h
3  *
4  * Copyright (c) Tuomo Valkonen 1999-2007. 
5  *
6  * Ion is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation; either version 2.1 of the License, or
9  * (at your option) any later version.
10  */
11
12 #ifndef ION_IONCORE_POINTER_H
13 #define ION_IONCORE_POINTER_H
14
15 #include "common.h"
16 #include "region.h"
17 #include "grab.h"
18
19 typedef void WButtonHandler(WRegion *reg, XButtonEvent *ev);
20 typedef void WMotionHandler(WRegion *reg, XMotionEvent *ev, int dx, int dy);
21
22 extern bool ioncore_do_handle_buttonpress(XButtonEvent *ev);
23 extern bool ioncore_do_handle_buttonrelease(XButtonEvent *ev);
24 extern void ioncore_do_handle_motionnotify(XMotionEvent *ev);
25
26 extern XEvent *ioncore_current_pointer_event();
27 extern WRegion *ioncore_pointer_grab_region();
28
29 extern bool ioncore_set_drag_handlers(WRegion *reg, 
30                                       WMotionHandler *begin,
31                                       WMotionHandler *motion, 
32                                       WButtonHandler *end,
33                                       GrabHandler *handler,
34                                       GrabKilledHandler *killhandler);
35
36 #endif /* ION_IONCORE_POINTER_H */