Mercurial > sdl-ios-xcode
comparison src/video/dga/SDL_dgaevents.c @ 292:eadc0746dfaf
Added SDL_LockRect() and SDL_UnlockRect()
Incorporated XFree86 extension libraries into the source
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 05 Mar 2002 19:55:32 +0000 |
parents | e8157fcb3114 |
children | f6ffac90895c |
comparison
equal
deleted
inserted
replaced
291:68a8a8237c09 | 292:eadc0746dfaf |
---|---|
27 | 27 |
28 /* Handle the event stream, converting DGA events into SDL events */ | 28 /* Handle the event stream, converting DGA events into SDL events */ |
29 | 29 |
30 #include <stdio.h> | 30 #include <stdio.h> |
31 #include <X11/Xlib.h> | 31 #include <X11/Xlib.h> |
32 #include <X11/extensions/xf86dga.h> | 32 #include <XFree86/extensions/xf86dga.h> |
33 | 33 |
34 #include "SDL_sysvideo.h" | 34 #include "SDL_sysvideo.h" |
35 #include "SDL_events_c.h" | 35 #include "SDL_events_c.h" |
36 #include "SDL_dgavideo.h" | 36 #include "SDL_dgavideo.h" |
37 #include "SDL_dgaevents_c.h" | 37 #include "SDL_dgaevents_c.h" |
43 KeyCode kc, SDL_keysym *keysym); | 43 KeyCode kc, SDL_keysym *keysym); |
44 | 44 |
45 static int DGA_DispatchEvent(_THIS) | 45 static int DGA_DispatchEvent(_THIS) |
46 { | 46 { |
47 int posted; | 47 int posted; |
48 XDGAEvent xevent; | 48 SDL_NAME(XDGAEvent) xevent; |
49 | 49 |
50 XNextEvent(DGA_Display, (XEvent *)&xevent); | 50 XNextEvent(DGA_Display, (XEvent *)&xevent); |
51 | 51 |
52 posted = 0; | 52 posted = 0; |
53 xevent.type -= DGA_event_base; | 53 xevent.type -= DGA_event_base; |
80 case KeyPress: | 80 case KeyPress: |
81 case KeyRelease: { | 81 case KeyRelease: { |
82 SDL_keysym keysym; | 82 SDL_keysym keysym; |
83 XKeyEvent xkey; | 83 XKeyEvent xkey; |
84 | 84 |
85 XDGAKeyEventToXKeyEvent(&xevent.xkey, &xkey); | 85 SDL_NAME(XDGAKeyEventToXKeyEvent)(&xevent.xkey, &xkey); |
86 posted = SDL_PrivateKeyboard((xevent.type == KeyPress), | 86 posted = SDL_PrivateKeyboard((xevent.type == KeyPress), |
87 X11_TranslateKey(DGA_Display, | 87 X11_TranslateKey(DGA_Display, |
88 &xkey, xkey.keycode, | 88 &xkey, xkey.keycode, |
89 &keysym)); | 89 &keysym)); |
90 } | 90 } |