comparison libvo/vo_quartz.c @ 13719:43ecd6a73ec0

move variable declaration at beginning of block
author nplourde
date Thu, 21 Oct 2004 11:36:20 +0000
parents f6ef5a0ad7e4
children 1bd6bd13193d
comparison
equal deleted inserted replaced
13718:4896e688aa31 13719:43ecd6a73ec0
248 switch (kind) 248 switch (kind)
249 { 249 {
250 case kEventMouseDown: 250 case kEventMouseDown:
251 { 251 {
252 EventMouseButton button; 252 EventMouseButton button;
253 short part;
254
253 GetEventParameter(event, kEventParamMouseButton, typeMouseButton, 0, sizeof(EventMouseButton), 0, &button); 255 GetEventParameter(event, kEventParamMouseButton, typeMouseButton, 0, sizeof(EventMouseButton), 0, &button);
254 256
255 short part = FindWindow(mousePos,&tmpWin); 257 part = FindWindow(mousePos,&tmpWin);
256 258
257 if(part == inMenuBar) 259 if(part == inMenuBar)
258 { 260 {
259 MenuSelect(mousePos); 261 MenuSelect(mousePos);
260 HiliteMenu(0); 262 HiliteMenu(0);
274 break; 276 break;
275 277
276 case kEventMouseWheelMoved: 278 case kEventMouseWheelMoved:
277 { 279 {
278 int wheel; 280 int wheel;
281 short part;
282
279 GetEventParameter(event, kEventParamMouseWheelDelta, typeSInt32, 0, sizeof(int), 0, &wheel); 283 GetEventParameter(event, kEventParamMouseWheelDelta, typeSInt32, 0, sizeof(int), 0, &wheel);
280 284
281 short part = FindWindow(mousePos,&tmpWin); 285 part = FindWindow(mousePos,&tmpWin);
282 286
283 if(part == inContent) 287 if(part == inContent)
284 { 288 {
285 if(wheel > 0) 289 if(wheel > 0)
286 mplayer_put_key(MOUSE_BTN3); 290 mplayer_put_key(MOUSE_BTN3);
299 303
300 //default window command handler 304 //default window command handler
301 static OSStatus MainWindowCommandHandler(EventHandlerCallRef nextHandler, EventRef event, void *userData) 305 static OSStatus MainWindowCommandHandler(EventHandlerCallRef nextHandler, EventRef event, void *userData)
302 { 306 {
303 OSStatus result = noErr; 307 OSStatus result = noErr;
308 UInt32_t d_width;
309 UInt32_t d_height;
304 UInt32 class = GetEventClass (event); 310 UInt32 class = GetEventClass (event);
305 UInt32 kind = GetEventKind (event); 311 UInt32 kind = GetEventKind (event);
306 312
307 result = CallNextEventHandler(nextHandler, event); 313 result = CallNextEventHandler(nextHandler, event);
308 314
309 uint32_t d_width;
310 uint32_t d_height;
311 aspect(&d_width,&d_height,A_NOZOOM); 315 aspect(&d_width,&d_height,A_NOZOOM);
312 316
313 if(class == kEventClassCommand) 317 if(class == kEventClassCommand)
314 { 318 {
315 HICommand theHICommand; 319 HICommand theHICommand;
460 static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t flags, char *title, uint32_t format) 464 static uint32_t config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uint32_t flags, char *title, uint32_t format)
461 { 465 {
462 WindowAttributes windowAttrs; 466 WindowAttributes windowAttrs;
463 GDHandle deviceHdl; 467 GDHandle deviceHdl;
464 OSErr qterr; 468 OSErr qterr;
465 469 int i;
470
466 //Get Main device info/////////////////////////////////////////////////// 471 //Get Main device info///////////////////////////////////////////////////
467 int i; 472
468 473
469 deviceHdl = GetMainDevice(); 474 deviceHdl = GetMainDevice();
470 475
471 for(i=0; i<device_id; i++) 476 for(i=0; i<device_id; i++)
472 { 477 {
473 deviceHdl = GetNextDevice(deviceHdl); 478 deviceHdl = GetNextDevice(deviceHdl);