al_wait_for_event
void al_wait_for_event(ALLEGRO_EVENT_QUEUE *queue, ALLEGRO_EVENT *ret_event)
Introduced in 5.0.0
Wait until the event queue specified is non-empty. If ret_event
is not NULL, the first event in the queue will be copied into ret_event
and removed from the queue. If ret_event
is NULL the first event is left at the head of the queue.
See also: ALLEGRO_EVENT, al_wait_for_event_timed, al_wait_for_event_until, al_get_next_event
Examples: ex_audio_simple, ex_bitmap, ex_bitmap_flip, ex_blend, ex_blend_test, ex_blit, ex_clip, ex_curl, ex_disable_screensaver, ex_display_options, ex_draw, ex_draw_bitmap, ex_expose, ex_filter, ex_font, ex_fs_resize, ex_gldepth, ex_glext, ex_haiku, ex_icon, ex_iphone, ex_joystick_events, ex_joystick_hotplugging, ex_keyboard_events, ex_lines, ex_lockbitmap, ex_logo, ex_mouse_cursor, ex_mouse_events, ex_multisample, ex_native_filechooser, ex_noframe, ex_ogre3d, ex_physfs, ex_premulalpha, ex_resize, ex_resize2, ex_saw, ex_stream_file, ex_stream_seek, ex_subbitmap, ex_threads, ex_threads2, ex_timedwait, ex_timer, ex_transform, ex_ttf, ex_user_events, ex_vsync, ex_warp_mouse
Most helpful discussions:
- Porting from Allegro 4.4 to 5.0 (1)
- [A5] event queue & timing problems (1)
- Key-presses speed-up program
- ALLEGRO_EVENT_DISPLAY_SWITCH_OUT
- Mysterious text input issues
- Math question (2d trig)
- Keyboard Modifiers flag on Windows?
- Multiple threads/displays, Event handling question
- I am looking for correct detailed instructions how to build Allegro....
- Delay on event queue while on thread
Other recent discussions:
- why is my code failing
- Lag when holding down key.
- Difficulty compiling on Windows
- How do I return a boolean instead of locking up the process?
- Screen is cleared and a new one appears Allegro5 in C?
- Same code - slow on Windows, fast on Linux - timer fires too slow?
- Builtin font doesn't work in resizeable display on windows
- How do I completely skip Mouse Axes events?
- KrampusHack 2020: Odd Results With Color Mapping Functions
- Problem solved: memory bitmaps not being converted