comparison include/SDL_syswm.h @ 5063:5680976fb37a

You can't have an empty union in the structure...
author Sam Lantinga <slouken@libsdl.org>
date Thu, 20 Jan 2011 18:09:55 -0800
parents e8916fe9cfc8
children 7e4c7790700e
comparison
equal deleted inserted replaced
5062:e8916fe9cfc8 5063:5680976fb37a
123 HWND hwnd; /**< The window for the message */ 123 HWND hwnd; /**< The window for the message */
124 UINT msg; /**< The type of message */ 124 UINT msg; /**< The type of message */
125 WPARAM wParam; /**< WORD message parameter */ 125 WPARAM wParam; /**< WORD message parameter */
126 LPARAM lParam; /**< LONG message parameter */ 126 LPARAM lParam; /**< LONG message parameter */
127 } win; 127 } win;
128 #endif 128 #elif defined(SDL_VIDEO_DRIVER_X11)
129 #if defined(SDL_VIDEO_DRIVER_X11)
130 struct { 129 struct {
131 XEvent event; 130 XEvent event;
132 } x11; 131 } x11;
133 #endif 132 #elif defined(SDL_VIDEO_DRIVER_DIRECTFB)
134 #if defined(SDL_VIDEO_DRIVER_DIRECTFB)
135 struct { 133 struct {
136 DFBEvent event; 134 DFBEvent event;
137 } dfb; 135 } dfb;
138 #endif 136 #elif defined(SDL_VIDEO_DRIVER_COCOA)
139 #if defined(SDL_VIDEO_DRIVER_COCOA)
140 struct 137 struct
141 { 138 {
142 /* No Cocoa window events yet */ 139 /* No Cocoa window events yet */
143 } cocoa; 140 } cocoa;
144 #endif 141 #elif defined(SDL_VIDEO_DRIVER_UIKIT)
145 #if defined(SDL_VIDEO_DRIVER_UIKIT)
146 struct 142 struct
147 { 143 {
148 /* No UIKit window events yet */ 144 /* No UIKit window events yet */
149 } uikit; 145 } uikit;
146 else
147 /* Can't have an empty union */
148 int dummy;
150 #endif 149 #endif
151 } msg; 150 } msg;
152 }; 151 };
153 152
154 /** 153 /**
166 #if defined(SDL_VIDEO_DRIVER_WINDOWS) 165 #if defined(SDL_VIDEO_DRIVER_WINDOWS)
167 struct 166 struct
168 { 167 {
169 HWND window; /**< The window handle */ 168 HWND window; /**< The window handle */
170 } win; 169 } win;
171 #endif 170 #elif defined(SDL_VIDEO_DRIVER_X11)
172 #if defined(SDL_VIDEO_DRIVER_X11)
173 struct 171 struct
174 { 172 {
175 Display *display; /**< The X11 display */ 173 Display *display; /**< The X11 display */
176 Window window; /**< The X11 window */ 174 Window window; /**< The X11 window */
177 } x11; 175 } x11;
178 #endif 176 #elif defined(SDL_VIDEO_DRIVER_DIRECTFB)
179 #if defined(SDL_VIDEO_DRIVER_DIRECTFB)
180 struct 177 struct
181 { 178 {
182 IDirectFB *dfb; /**< The directfb main interface */ 179 IDirectFB *dfb; /**< The directfb main interface */
183 IDirectFBWindow *window; /**< The directfb window handle */ 180 IDirectFBWindow *window; /**< The directfb window handle */
184 IDirectFBSurface *surface; /**< The directfb client surface */ 181 IDirectFBSurface *surface; /**< The directfb client surface */
185 } dfb; 182 } dfb;
186 #endif 183 #elif defined(SDL_VIDEO_DRIVER_COCOA)
187 #if defined(SDL_VIDEO_DRIVER_COCOA)
188 struct 184 struct
189 { 185 {
190 NSWindow *window; /* The Cocoa window */ 186 NSWindow *window; /* The Cocoa window */
191 } cocoa; 187 } cocoa;
192 #endif 188 #elif defined(SDL_VIDEO_DRIVER_UIKIT)
193 #if defined(SDL_VIDEO_DRIVER_UIKIT)
194 struct 189 struct
195 { 190 {
196 UIWindow *window; /* The UIKit window */ 191 UIWindow *window; /* The UIKit window */
197 } uikit; 192 } uikit;
193 #else
194 /* Can't have an empty union */
195 int dummy;
198 #endif 196 #endif
199 } info; 197 } info;
200 }; 198 };
201 199
202 #endif /* SDL_PROTOTYPES_ONLY */ 200 #endif /* SDL_PROTOTYPES_ONLY */