Marcus von Appen avatar Marcus von Appen committed 15ee052

- added new events types and new SDL_OSEvent struct in sdl2.events

Comments (0)

Files changed (1)

 from .touch import SDL_FingerID, SDL_TouchID
 from .gesture import SDL_GestureID
 
-__all__ = ["SDL_FIRSTEVENT", "SDL_QUIT", "SDL_WINDOWEVENT", "SDL_SYSWMEVENT",
+__all__ = ["SDL_FIRSTEVENT", "SDL_QUIT", "SDL_APP_TERMINATING",
+           "SDL_APP_LOWMEMORY", "SDL_APP_WILLENTERBACKGROUND",
+           "SDL_APP_DIDENTERBACKGROUND", "SDL_APP_WILLENTERFOREGROUND",
+           "SDL_APP_DIDENTERFOREGROUND", "SDL_WINDOWEVENT", "SDL_SYSWMEVENT",
            "SDL_KEYDOWN", "SDL_KEYUP", "SDL_TEXTEDITING", "SDL_TEXTINPUT",
            "SDL_MOUSEMOTION", "SDL_MOUSEBUTTONDOWN", "SDL_MOUSEBUTTONUP",
            "SDL_MOUSEWHEEL", "SDL_JOYAXISMOTION", "SDL_JOYBALLMOTION",
 
 SDL_FIRSTEVENT = 0
 SDL_QUIT = 0x100
+SDL_APP_TERMINATING = 0x101
+SDL_APP_LOWMEMORY = 0x102
+SDL_APP_WILLENTERBACKGROUND = 0x103
+SDL_APP_DIDENTERBACKGROUND = 0x104
+SDL_APP_WILLENTERFOREGROUND = 0x105
+SDL_APP_DIDENTERFOREGROUND = 0x106
 SDL_WINDOWEVENT = 0x200
 SDL_SYSWMEVENT = 0x201
 SDL_KEYDOWN = 0x300
                 ("timestamp", Uint32)
                 ]
 
+class SDL_OSEvent(Structure):
+    _fields_ = [("type", Uint32),
+                ("timestamp", Uint32)
+                ]
+
 class SDL_UserEvent(Structure):
     _fields_ = [("type", Uint32),
                 ("timestamp", Uint32),
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.