Mercurial > sdl-ios-xcode
comparison src/events/SDL_windowevents.c @ 1724:6c63fc2bd986 SDL-1.3
Proof of concept done - Win32 GDI implementation mostly complete.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 06 Jul 2006 07:17:11 +0000 |
parents | 5daa04d862f1 |
children | 875c3cf1a12c |
comparison
equal
deleted
inserted
replaced
1723:4bdbb9b2bd0a | 1724:6c63fc2bd986 |
---|---|
26 #include "SDL_events.h" | 26 #include "SDL_events.h" |
27 #include "SDL_events_c.h" | 27 #include "SDL_events_c.h" |
28 #include "../video/SDL_sysvideo.h" | 28 #include "../video/SDL_sysvideo.h" |
29 | 29 |
30 int | 30 int |
31 SDL_PrivateWindowEvent(SDL_WindowID windowID, Uint8 windowevent, int data1, | 31 SDL_SendWindowEvent(SDL_WindowID windowID, Uint8 windowevent, int data1, |
32 int data2) | 32 int data2) |
33 { | 33 { |
34 int posted; | 34 int posted; |
35 SDL_Window *window; | 35 SDL_Window *window; |
36 | 36 |
37 window = SDL_GetWindowFromID(windowID); | 37 window = SDL_GetWindowFromID(windowID); |
48 case SDL_WINDOWEVENT_HIDDEN: | 48 case SDL_WINDOWEVENT_HIDDEN: |
49 if (!(window->flags & SDL_WINDOW_SHOWN)) { | 49 if (!(window->flags & SDL_WINDOW_SHOWN)) { |
50 return 0; | 50 return 0; |
51 } | 51 } |
52 window->flags &= ~SDL_WINDOW_SHOWN; | 52 window->flags &= ~SDL_WINDOW_SHOWN; |
53 break; | |
54 case SDL_WINDOWEVENT_MOVED: | |
55 if (data1 == window->x && data2 == window->y) { | |
56 return 0; | |
57 } | |
58 break; | |
59 case SDL_WINDOWEVENT_RESIZED: | |
60 if (data1 == window->w && data2 == window->h) { | |
61 return 0; | |
62 } | |
53 break; | 63 break; |
54 case SDL_WINDOWEVENT_MINIMIZED: | 64 case SDL_WINDOWEVENT_MINIMIZED: |
55 if (window->flags & SDL_WINDOW_MINIMIZED) { | 65 if (window->flags & SDL_WINDOW_MINIMIZED) { |
56 return 0; | 66 return 0; |
57 } | 67 } |