comparison src/video/SDL_shape.c @ 4847:4201864f77e7

Fixing variable naming style.
author egottlieb
date Tue, 10 Aug 2010 16:30:53 -0400
parents 4f1573996a65
children b67815cf9f25
comparison
equal deleted inserted replaced
4846:4f1573996a65 4847:4201864f77e7
224 SDL_free(*shapeTree); 224 SDL_free(*shapeTree);
225 *shapeTree = NULL; 225 *shapeTree = NULL;
226 } 226 }
227 227
228 int 228 int
229 SDL_SetWindowShape(SDL_Window *window,SDL_Surface *shape,SDL_WindowShapeMode *shapeMode) { 229 SDL_SetWindowShape(SDL_Window *window,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode) {
230 int result; 230 int result;
231 if(window == NULL || !SDL_IsShapedWindow(window)) 231 if(window == NULL || !SDL_IsShapedWindow(window))
232 //The window given was not a shapeable window. 232 //The window given was not a shapeable window.
233 return SDL_NONSHAPEABLE_WINDOW; 233 return SDL_NONSHAPEABLE_WINDOW;
234 if(shape == NULL) 234 if(shape == NULL)
235 //Invalid shape argument. 235 //Invalid shape argument.
236 return SDL_INVALID_SHAPE_ARGUMENT; 236 return SDL_INVALID_SHAPE_ARGUMENT;
237 237
238 if(shapeMode != NULL) 238 if(shape_mode != NULL)
239 window->shaper->mode = *shapeMode; 239 window->shaper->mode = *shape_mode;
240 result = window->display->device->shape_driver.SetWindowShape(window->shaper,shape,shapeMode); 240 result = window->display->device->shape_driver.SetWindowShape(window->shaper,shape,shape_mode);
241 window->shaper->hasshape = SDL_TRUE; 241 window->shaper->hasshape = SDL_TRUE;
242 if((window->shaper->usershownflag & SDL_WINDOW_SHOWN) == SDL_WINDOW_SHOWN) { 242 if((window->shaper->usershownflag & SDL_WINDOW_SHOWN) == SDL_WINDOW_SHOWN) {
243 SDL_ShowWindow(window); 243 SDL_ShowWindow(window);
244 window->shaper->usershownflag &= !SDL_WINDOW_SHOWN; 244 window->shaper->usershownflag &= !SDL_WINDOW_SHOWN;
245 } 245 }
252 return SDL_FALSE; 252 return SDL_FALSE;
253 return window->shaper->hasshape; 253 return window->shaper->hasshape;
254 } 254 }
255 255
256 int 256 int
257 SDL_GetShapedWindowMode(SDL_Window *window,SDL_WindowShapeMode *shapeMode) { 257 SDL_GetShapedWindowMode(SDL_Window *window,SDL_WindowShapeMode *shape_mode) {
258 if(window != NULL && SDL_IsShapedWindow(window)) { 258 if(window != NULL && SDL_IsShapedWindow(window)) {
259 if(shapeMode == NULL) { 259 if(shape_mode == NULL) {
260 if(SDL_WindowHasAShape(window)) 260 if(SDL_WindowHasAShape(window))
261 //The window given has a shape. 261 //The window given has a shape.
262 return 0; 262 return 0;
263 else 263 else
264 //The window given is shapeable but lacks a shape. 264 //The window given is shapeable but lacks a shape.
265 return SDL_WINDOW_LACKS_SHAPE; 265 return SDL_WINDOW_LACKS_SHAPE;
266 } 266 }
267 else { 267 else {
268 *shapeMode = window->shaper->mode; 268 *shape_mode = window->shaper->mode;
269 return 0; 269 return 0;
270 } 270 }
271 } 271 }
272 else 272 else
273 //The window given is not a valid shapeable window. 273 //The window given is not a valid shapeable window.