SDL Event: Unterschied zwischen den Versionen
Aus DGL Wiki
Flash (Diskussion | Beiträge) K |
(→Parameter) |
||
| Zeile 33: | Zeile 33: | ||
|- | |- | ||
!''active'' | !''active'' | ||
| − | | | + | |Aktivierungs-Ereignis (siehe [[SDL_ActiveEvent]]) |
|- | |- | ||
!''key'' | !''key'' | ||
| − | |Keyboard Ereignis (siehe [[SDL_KeyboardEvent]]) | + | |Keyboard-Ereignis (siehe [[SDL_KeyboardEvent]]) |
|- | |- | ||
!''motion'' | !''motion'' | ||
| − | |Mausbewegung Ereignis (siehe [[SDL_MouseMotionEvent]]) | + | |Mausbewegung-Ereignis (siehe [[SDL_MouseMotionEvent]]) |
|- | |- | ||
!''button'' | !''button'' | ||
| − | |Mausknopf Ereignis (siehe [[SDL_MouseButtonEvent]]) | + | |Mausknopf-Ereignis (siehe [[SDL_MouseButtonEvent]]) |
|- | |- | ||
!''jaxis'' | !''jaxis'' | ||
| − | |Joystick | + | |Joystick-Achsenbewegungs-Ereignis (siehe [[SDL_JoyAxisEvent]]) |
|- | |- | ||
!''jball'' | !''jball'' | ||
| − | |Joystick | + | |Joystick-Trackballbewegungs-Ereignis (siehe [[SDL_JoyBallEvent]]) |
|- | |- | ||
!''jhat'' | !''jhat'' | ||
| − | |Joystick | + | |Joystick-Hatbewegungs-Ereignis (siehe [[SDL_JoyHatEvent]]) |
|- | |- | ||
!''jbutton'' | !''jbutton'' | ||
| − | |Joystick Knopf Ereignis (siehe [[SDL_JoyButtonEvent]]) | + | |Joystick-Knopf-Ereignis (siehe [[SDL_JoyButtonEvent]]) |
|- | |- | ||
!''resize'' | !''resize'' | ||
| − | |Anwendungsfenster | + | |Anwendungsfenster-Grössenänderungs-Ereignis (siehe [[SDL_ResizeEvent]]) |
|- | |- | ||
!''expose'' | !''expose'' | ||
| − | |Externe | + | |Externe-Auflösungsänderungs-Ereignis (siehe [[SDL_ExposeEvent]]) |
|- | |- | ||
!''quit'' | !''quit'' | ||
| − | | | + | |Anwendungs-Schliessen-Nachfrage-Ereignis (siehe [[SDL_QuitEvent]]) |
|- | |- | ||
!''user'' | !''user'' | ||
| − | | | + | |Benutzerdefiniertes-Ereignis (siehe[[SDL_UserEvent]]) |
|- | |- | ||
!''syswm'' | !''syswm'' | ||
| − | |Undefiniertes Fenstermanager Ereignis (siehe[[SDL_SysWMEvent]]) | + | |Undefiniertes Fenstermanager-Ereignis (siehe[[SDL_SysWMEvent]]) |
|- | |- | ||
|} | |} | ||
Version vom 1. September 2005, 13:54 Uhr
Inhaltsverzeichnis
SDL_Event
Name
SDL_Event - Generelle Event Struktur
Delphi-Spezifikation
type SDL_Event = record
type : Uint8;
active : SDL_ActiveEvent;
key : SDL_KeyboardEvent;
motion : SDL_MouseMotionEvent;
button : SDL_MouseButtonEvent;
jaxis : SDL_JoyAxisEvent;
jball : SDL_JoyBallEvent;
jhat : SDL_JoyHatEvent;
jbutton : SDL_JoyButtonEvent;
resize : SDL_ResizeEvent;
expose : SDL_ExposeEvent;
quit : SDL_QuitEvent;
user : SDL_UserEvent;
syswm : SDL_SysWMEvent;
end;
Parameter
| type | Die Art des Ereignisses |
|---|---|
| active | Aktivierungs-Ereignis (siehe SDL_ActiveEvent) |
| key | Keyboard-Ereignis (siehe SDL_KeyboardEvent) |
| motion | Mausbewegung-Ereignis (siehe SDL_MouseMotionEvent) |
| button | Mausknopf-Ereignis (siehe SDL_MouseButtonEvent) |
| jaxis | Joystick-Achsenbewegungs-Ereignis (siehe SDL_JoyAxisEvent) |
| jball | Joystick-Trackballbewegungs-Ereignis (siehe SDL_JoyBallEvent) |
| jhat | Joystick-Hatbewegungs-Ereignis (siehe SDL_JoyHatEvent) |
| jbutton | Joystick-Knopf-Ereignis (siehe SDL_JoyButtonEvent) |
| resize | Anwendungsfenster-Grössenänderungs-Ereignis (siehe SDL_ResizeEvent) |
| expose | Externe-Auflösungsänderungs-Ereignis (siehe SDL_ExposeEvent) |
| quit | Anwendungs-Schliessen-Nachfrage-Ereignis (siehe SDL_QuitEvent) |
| user | Benutzerdefiniertes-Ereignis (sieheSDL_UserEvent) |
| syswm | Undefiniertes Fenstermanager-Ereignis (sieheSDL_SysWMEvent) |
Beschreibung
SDL_Event ist der Kern von aller Ereignisbehandlung in SDL und somit für Nutzer von OpenGL unter SDL die wichtigste Struktur in SDL.
SDL_Event wird benutzt um:
- Ereignisse auszulesen
- Ereignisse geschehen zu lassen
Um ein Ereignis zu lesen benutzt man SDL_PollEvent oder SDL_PeepEvent.
Für type existieren folgende symbolische Werte:
| SDL_ACTIVEEVENT | SDL_ActiveEvent |
|---|---|
| SDL_KEYDOWN/UP | SDL_KeyboardEvent |
| SDL_MOUSEMOTION | SDL_MouseMotionEvent |
| SDL_MOUSEBUTTONDOWN/UP | SDL_MouseButtonEvent |
| SDL_JOYAXISMOTION | SDL_JoyAxisEvent |
| SDL_JOYBALLMOTION | SDL_JoyBallEvent |
| SDL_JOYHATMOTION | SDL_JoyHatEvent |
| SDL_JOYBUTTONDOWN/UP | SDL_JoyButtonEvent |
| SDL_QUIT | SDL_QuitEvent |
| SDL_SYSWMEVENT | SDL_SysWMEvent |
| SDL_VIDEORESIZE | SDL_ResizeEvent |
| SDL_VIDEOEXPOSE | SDL_ExposeEvent |
| SDL_USEREVENT | SDL_UserEvent |
Beispiel
Siehe SDL_PollEvent Beispiel.