2 This file is part of fxwt, the window system toolkit of 3dengfx.
4 Copyright (c) 2004, 2005 John Tsiombikas <nuclear@siggraph.org>
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 /* main fxwt event handling and system abstraction.
23 * Author: John Tsiombikas 2004
33 #include "keysyms.hpp"
45 extern std::list<void (*)()> disp_handlers;
46 extern std::list<void (*)()> idle_handlers;
47 extern std::list<void (*)(int)> keyb_handlers;
48 extern std::list<void (*)(int, int)> motion_handlers;
49 extern std::list<void (*)(int, int, int, int)> button_handlers;
51 extern bool button_state[6];
52 extern int screenx, screeny;
56 void set_display_handler(void (*handler)());
57 void set_idle_handler(void (*handler)());
58 void set_keyboard_handler(void (*handler)(int));
59 void set_motion_handler(void (*handler)(int, int));
60 void set_button_handler(void (*handler)(int, int, int, int));
62 void remove_display_handler(void (*handler)());
63 void remove_idle_handler(void (*handler)());
64 void remove_keyboard_handler(void (*handler)(int));
65 void remove_motion_handler(void (*handler)(int, int));
66 void remove_button_handler(void (*handler)(int, int, int, int));
68 bool mouse_button_pressed(int bn);
70 Vector2 get_mouse_pos_normalized();
72 void set_window_title(const char *title);
73 void show_cursor(bool show);
79 #endif /* _FXWT_HPP_ */