comparison src/video/directfb/SDL_DirectFB_events.c @ 3011:8f4ed5ec2b06

I ran a global "make indent" it modified the following files.
author Bob Pendleton <bob@pendleton.com>
date Fri, 09 Jan 2009 20:43:30 +0000
parents d364ee9b9c15
children 8cc00819c8d6
comparison
equal deleted inserted replaced
3010:a6694a812119 3011:8f4ed5ec2b06
58 SDL_VideoDisplay *display = SDL_GetDisplayFromWindow(window); 58 SDL_VideoDisplay *display = SDL_GetDisplayFromWindow(window);
59 DFB_DisplayData *dispdata = (DFB_DisplayData *) display->driverdata; 59 DFB_DisplayData *dispdata = (DFB_DisplayData *) display->driverdata;
60 int ret; 60 int ret;
61 61
62 if (dispdata->vidIDinuse) 62 if (dispdata->vidIDinuse)
63 SDL_DFB_CHECKERR(dispdata->vidlayer-> 63 SDL_DFB_CHECKERR(dispdata->
64 SwitchContext(dispdata->vidlayer, DFB_TRUE)); 64 vidlayer->SwitchContext(dispdata->vidlayer,
65 DFB_TRUE));
65 66
66 error: 67 error:
67 return; 68 return;
68 #endif 69 #endif
69 70
146 case DWET_BUTTONDOWN: 147 case DWET_BUTTONDOWN:
147 if (!devdata->use_linux_input) { 148 if (!devdata->use_linux_input) {
148 SDL_SendMouseMotion(devdata->mouse_id[0], 0, evt.cx, 149 SDL_SendMouseMotion(devdata->mouse_id[0], 0, evt.cx,
149 evt.cy, 0); 150 evt.cy, 0);
150 SDL_SendMouseButton(devdata->mouse_id[0], SDL_PRESSED, 151 SDL_SendMouseButton(devdata->mouse_id[0], SDL_PRESSED,
151 DirectFB_TranslateButton(evt. 152 DirectFB_TranslateButton
152 button)); 153 (evt.button));
153 } else { 154 } else {
154 MotionAllMice(_this, evt.x, evt.y); 155 MotionAllMice(_this, evt.x, evt.y);
155 } 156 }
156 break; 157 break;
157 case DWET_BUTTONUP: 158 case DWET_BUTTONUP:
158 if (!devdata->use_linux_input) { 159 if (!devdata->use_linux_input) {
159 SDL_SendMouseMotion(devdata->mouse_id[0], 0, evt.cx, 160 SDL_SendMouseMotion(devdata->mouse_id[0], 0, evt.cx,
160 evt.cy, 0); 161 evt.cy, 0);
161 SDL_SendMouseButton(devdata->mouse_id[0], 162 SDL_SendMouseButton(devdata->mouse_id[0],
162 SDL_RELEASED, 163 SDL_RELEASED,
163 DirectFB_TranslateButton(evt. 164 DirectFB_TranslateButton
164 button)); 165 (evt.button));
165 } else { 166 } else {
166 MotionAllMice(_this, evt.x, evt.y); 167 MotionAllMice(_this, evt.x, evt.y);
167 } 168 }
168 break; 169 break;
169 case DWET_MOTION: 170 case DWET_MOTION:
519 && (evt->key_symbol > 0 && evt->key_symbol < 255)) 520 && (evt->key_symbol > 0 && evt->key_symbol < 255))
520 keysym->unicode = evt->key_symbol; 521 keysym->unicode = evt->key_symbol;
521 522
522 return keysym; 523 return keysym;
523 } 524 }
525
524 static int 526 static int
525 DirectFB_TranslateButton(DFBInputDeviceButtonIdentifier button) 527 DirectFB_TranslateButton(DFBInputDeviceButtonIdentifier button)
526 { 528 {
527 switch (button) { 529 switch (button) {
528 case DIBI_LEFT: 530 case DIBI_LEFT:
600 DirectFB_InitOSKeymap(_this, &oskeymap[0], SDL_arraysize(oskeymap)); 602 DirectFB_InitOSKeymap(_this, &oskeymap[0], SDL_arraysize(oskeymap));
601 603
602 devdata->num_keyboard = 0; 604 devdata->num_keyboard = 0;
603 if (devdata->use_linux_input) { 605 if (devdata->use_linux_input) {
604 sys_ids = 0; 606 sys_ids = 0;
605 SDL_DFB_CHECK(devdata->dfb-> 607 SDL_DFB_CHECK(devdata->
606 EnumInputDevices(devdata->dfb, EnumKeyboards, devdata)); 608 dfb->EnumInputDevices(devdata->dfb, EnumKeyboards,
609 devdata));
607 if (devdata->num_keyboard == 0) { 610 if (devdata->num_keyboard == 0) {
608 sys_ids = 1; 611 sys_ids = 1;
609 SDL_DFB_CHECK(devdata->dfb-> 612 SDL_DFB_CHECK(devdata->
610 EnumInputDevices(devdata->dfb, EnumKeyboards, 613 dfb->EnumInputDevices(devdata->dfb, EnumKeyboards,
611 devdata)); 614 devdata));
612 } 615 }
613 } else { 616 } else {
614 SDL_DFB_CHECK(devdata->dfb-> 617 SDL_DFB_CHECK(devdata->
615 EnumInputDevices(devdata->dfb, input_device_cb, 618 dfb->EnumInputDevices(devdata->dfb, input_device_cb,
616 devdata)); 619 devdata));
617 } 620 }
618 } 621 }
619 622
620 void 623 void
621 DirectFB_QuitKeyboard(_THIS) 624 DirectFB_QuitKeyboard(_THIS)
648 mod = 0; 651 mod = 0;
649 652
650 switch (evt.type) { 653 switch (evt.type) {
651 case DIET_BUTTONPRESS: 654 case DIET_BUTTONPRESS:
652 posted += SDL_PrivateMouseButton(SDL_PRESSED, 655 posted += SDL_PrivateMouseButton(SDL_PRESSED,
653 DirectFB_TranslateButton(evt. 656 DirectFB_TranslateButton
654 button), 657 (evt.button), 0, 0);
655 0, 0);
656 break; 658 break;
657 case DIET_BUTTONRELEASE: 659 case DIET_BUTTONRELEASE:
658 posted += SDL_PrivateMouseButton(SDL_RELEASED, 660 posted += SDL_PrivateMouseButton(SDL_RELEASED,
659 DirectFB_TranslateButton(evt. 661 DirectFB_TranslateButton
660 button), 662 (evt.button), 0, 0);
661 0, 0);
662 break; 663 break;
663 case DIET_KEYPRESS: 664 case DIET_KEYPRESS:
664 posted += SDL_PrivateKeyboard(SDL_PRESSED, 665 posted += SDL_PrivateKeyboard(SDL_PRESSED,
665 DirectFB_TranslateKey(evt. 666 DirectFB_TranslateKey
666 key_id, 667 (evt.key_id, evt.key_symbol,
667 evt. 668 mod, &keysym));
668 key_symbol,
669 mod,
670 &keysym));
671 break; 669 break;
672 case DIET_KEYRELEASE: 670 case DIET_KEYRELEASE:
673 posted += SDL_PrivateKeyboard(SDL_RELEASED, 671 posted += SDL_PrivateKeyboard(SDL_RELEASED,
674 DirectFB_TranslateKey(evt. 672 DirectFB_TranslateKey
675 key_id, 673 (evt.key_id, evt.key_symbol,
676 evt. 674 mod, &keysym));
677 key_symbol,
678 mod,
679 &keysym));
680 break; 675 break;
681 case DIET_AXISMOTION: 676 case DIET_AXISMOTION:
682 if (evt.flags & DIEF_AXISREL) { 677 if (evt.flags & DIEF_AXISREL) {
683 if (evt.axis == DIAI_X) 678 if (evt.axis == DIAI_X)
684 posted += 679 posted +=