문명이란 개인과 개인을 결합시키고, 그 다음에 가족과 가족, 인종과 인종, 국민과 국민, 국가와 국가를 결합시켜 하나의 커다란 통일체로, 즉 인류의 통일체를 형성하는 과정이다. ―지그문트 프로이드
개요 #
Event handling allows your application to receive input from the user. Event handling is initalised (along with video) with a call to:
SDL_Init(SDL_INIT_VIDEO);
Internally, SDL stores all the events waiting to be handled in an event queue. Using functions like SDL_PollEvent and SDL_PeepEvents you can observe and handle waiting input events.
The key to event handling in SDL is the SDL_Event union. The event queue itself is composed of a series of SDL_Event unions, one for each waiting event. SDL_Event unions are read from the queue with the SDL_PollEvent function and it is then up to the application to process the information stored with them.
이벤트구조체 목록 #
- SDL_Event — General event structure
- SDL_ActiveEvent — Application visibility event structure
- SDL_KeyboardEvent — Keyboard event structure
- SDL_MouseMotionEvent — Mouse motion event structure
- SDL_MouseButtonEvent — Mouse button event structure
- SDL_JoyAxisEvent — Joystick axis motion event structure
- SDL_JoyButtonEvent — Joystick button event structure
- SDL_JoyHatEvent — Joystick hat position change event structure
- SDL_JoyBallEvent — Joystick trackball motion event structure
- SDL_ResizeEvent — Window resize event structure
- SDL_ExposeEvent — Quit requested event
- SDL_SysWMEvent — Platform-dependent window manager event.
- SDL_UserEvent — A user-defined event type
- SDL_QuitEvent — Quit requested event
- SDL_keysym — Keysym structure
- SDLKey — Keysym definitions.
이벤트 함수들 #
- SDL_PumpEvents — Pumps the event loop, gathering events from the input devices.
- SDL_PeepEvents — Checks the event queue for messages and optionally returns them.
- SDL_PollEvent — Polls for currently pending events.
- SDL_WaitEvent — Waits indefinitely for the next available event.
- SDL_PushEvent — Pushes an event onto the event queue
- SDL_SetEventFilter — Sets up a filter to process all events before they are posted to the event queue.
- SDL_GetEventFilter — Retrieves a pointer to he event filter
- SDL_EventState — This function allows you to set the state of processing certain events.
- SDL_GetKeyState — Get a snapshot of the current keyboard state
- SDL_GetModState — Get the state of modifier keys.
- SDL_SetModState — Set the current key modifier state
- SDL_GetKeyName — Get the name of an SDL virtual keysym
- SDL_EnableUNICODE — Enable UNICODE translation
- SDL_EnableKeyRepeat — Set keyboard repeat rate.
- SDL_GetMouseState — Retrieve the current state of the mouse
- SDL_GetRelativeMouseState — Retrieve the current state of the mouse
- SDL_GetAppState — Get the state of the application
- SDL_JoystickEventState — Enable/disable joystick event polling









![[http]](/wiki/imgs/http.png)
