00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00031 #ifndef __MLV__MLV_EVENT_H__
00032 #define __MLV__MLV_EVENT_H__
00033
00034 #include "MLV_device_with_buttons.h"
00035 #include "MLV_keyboard.h"
00036 #include "MLV_mouse.h"
00037 #include "MLV_input_box.h"
00038
00039 #ifdef __cplusplus
00040 extern "C" {
00041 #endif
00042
00046 typedef enum {
00047 MLV_NONE = 0,
00048 MLV_KEY = 1,
00049 MLV_INPUT_BOX = 2,
00051 MLV_MOUSE_BUTTON = 3,
00052 MLV_MOUSE_MOTION = 4
00053 } MLV_Event;
00054
00055
00137 MLV_Event MLV_get_event(
00138 MLV_Keyboard_button* key_sym, MLV_Keyboard_modifier* key_mod, int* unicode,
00139 char** texte, MLV_Input_box** input_box,
00140 int* mouse_x, int* mouse_y, MLV_Mouse_button* mouse_button,
00141 MLV_Button_state* state
00142 );
00143
00144
00145
00187 MLV_Event MLV_wait_event(
00188 MLV_Keyboard_button* key_sym, MLV_Keyboard_modifier* key_mod, int* unicode,
00189 char** texte, MLV_Input_box** input_box,
00190 int* mouse_x, int* mouse_y, MLV_Mouse_button* mouse_button,
00191 MLV_Button_state* state
00192 );
00193
00194
00240 MLV_Event MLV_wait_event_or_seconds(
00241 MLV_Keyboard_button* key_sym, MLV_Keyboard_modifier* key_mod, int* unicode,
00242 char** texte, MLV_Input_box** input_box,
00243 int* mouse_x, int* mouse_y, MLV_Mouse_button* mouse_button,
00244 MLV_Button_state* state, int seconds
00245 );
00246
00247
00248
00253 void MLV_flush_event_queue();
00254
00286 MLV_Event MLV_wait_keyboard_or_mouse(
00287 MLV_Keyboard_button* sym, MLV_Keyboard_modifier* mod, int* unicode,
00288 int* mouse_x, int* mouse_y
00289 );
00290
00291
00318 MLV_Event MLV_wait_keyboard_or_mouse_or_seconds(
00319 MLV_Keyboard_button* sym, MLV_Keyboard_modifier* mod, int* unicode,
00320 int* mouse_x, int* mouse_y,
00321 int seconds
00322 );
00323
00330 const char* MLV_convert_event_to_string( MLV_Event event_code );
00331
00338 MLV_Event MLV_convert_string_to_event( const char* event_string );
00339
00346 const char* MLV_convert_button_state_to_string( MLV_Button_state state_code );
00347
00354 MLV_Button_state MLV_convert_string_to_button_state( const char* state_string );
00355
00356 #ifdef __cplusplus
00357 }
00358 #endif
00359
00360 #endif
00361