annotate src/video/picogui/SDL_pgevents.c @ 1944:91f41fc124a7

The AAlib driver is fun, but not worth rewriting for SDL 1.3
author Sam Lantinga <slouken@libsdl.org>
date Wed, 26 Jul 2006 03:24:27 +0000
parents c121d94672cb
children
rev   line source
433
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
1 /*
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
2 SDL - Simple DirectMedia Layer
1312
c9b51268668f Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents: 769
diff changeset
3 Copyright (C) 1997-2006 Sam Lantinga
433
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
4
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
5 This library is free software; you can redistribute it and/or
1312
c9b51268668f Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents: 769
diff changeset
6 modify it under the terms of the GNU Lesser General Public
433
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
7 License as published by the Free Software Foundation; either
1312
c9b51268668f Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents: 769
diff changeset
8 version 2.1 of the License, or (at your option) any later version.
433
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
9
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
10 This library is distributed in the hope that it will be useful,
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1312
c9b51268668f Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents: 769
diff changeset
13 Lesser General Public License for more details.
433
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
14
1312
c9b51268668f Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents: 769
diff changeset
15 You should have received a copy of the GNU Lesser General Public
c9b51268668f Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents: 769
diff changeset
16 License along with this library; if not, write to the Free Software
c9b51268668f Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents: 769
diff changeset
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
433
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
18
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
19 Sam Lantinga
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
20 slouken@libsdl.org
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
21
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
22 Micah Dowty
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
23 micahjd@users.sourceforge.net
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
24 */
1402
d910939febfa Use consistent identifiers for the various platforms we support.
Sam Lantinga <slouken@libsdl.org>
parents: 1361
diff changeset
25 #include "SDL_config.h"
433
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
26
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
27 #include "SDL.h"
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1336
diff changeset
28 #include "../../events/SDL_sysevents.h"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1336
diff changeset
29 #include "../../events/SDL_events_c.h"
433
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
30 #include "SDL_pgvideo.h"
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
31 #include "SDL_pgevents_c.h"
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
32
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
33 int
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
34 PG_HandleClose(struct pgEvent *evt)
433
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
35 {
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
36 SDL_PrivateQuit();
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
37 return 1; /* Intercept the event's normal quit handling */
433
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
38 }
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
39
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
40 int
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
41 PG_HandleResize(struct pgEvent *evt)
433
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
42 {
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
43 SDL_PrivateResize(evt->e.size.w, evt->e.size.h);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
44 return 0;
433
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
45 }
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
46
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
47 int
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
48 PG_HandleKey(struct pgEvent *evt)
433
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
49 {
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
50 SDL_keysym sym;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
51 SDL_memset(&sym, 0, sizeof(sym));
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
52 sym.sym = evt->e.kbd.key;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
53 sym.mod = evt->e.kbd.mods;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
54 SDL_PrivateKeyboard(evt->type == PG_WE_KBD_KEYDOWN, &sym);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
55 return 0;
433
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
56 }
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
57
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
58 int
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
59 PG_HandleChar(struct pgEvent *evt)
433
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
60 {
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
61 SDL_keysym sym;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
62 SDL_memset(&sym, 0, sizeof(sym));
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
63 sym.unicode = evt->e.kbd.key;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
64 sym.mod = evt->e.kbd.mods;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
65 SDL_PrivateKeyboard(evt->type == PG_WE_KBD_KEYDOWN, &sym);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
66 return 0;
433
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
67 }
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
68
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
69 int
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
70 PG_HandleMouseButton(struct pgEvent *evt)
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
71 {
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
72 /* We need to focus the canvas when it's clicked */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
73 if (evt->extra) {
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
74 SDL_VideoDevice *this = (SDL_VideoDevice *) evt->extra;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
75 pgFocus(this->hidden->wCanvas);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
76 }
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
77 SDL_PrivateMouseButton(evt->type == PG_WE_PNTR_DOWN, evt->e.pntr.chbtn,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
78 evt->e.pntr.x, evt->e.pntr.y);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
79 return 0;
433
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
80 }
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
81
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
82 int
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
83 PG_HandleMouseMotion(struct pgEvent *evt)
433
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
84 {
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
85 SDL_PrivateMouseMotion(evt->e.pntr.btn, 0, evt->e.pntr.x, evt->e.pntr.y);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
86 return 0;
433
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
87 }
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
88
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
89 void
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
90 PG_PumpEvents(_THIS)
433
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
91 {
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
92 /* Process all pending events */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
93 pgEventPoll();
433
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
94 }
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
95
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
96 void
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
97 PG_InitOSKeymap(_THIS)
433
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
98 {
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
99 /* We need no keymap */
433
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
100 }
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
101
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
102 void
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
103 PG_InitEvents(_THIS)
433
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
104 {
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
105 /* Turn on all the mouse and keyboard triggers for our canvas, normally less important
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
106 * events like mouse movement are ignored to save bandwidth. */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
107 pgSetWidget(this->hidden->wCanvas, PG_WP_TRIGGERMASK,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
108 pgGetWidget(this->hidden->wCanvas, PG_WP_TRIGGERMASK) |
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
109 PG_TRIGGER_UP | PG_TRIGGER_DOWN | PG_TRIGGER_MOVE |
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
110 PG_TRIGGER_KEYUP | PG_TRIGGER_KEYDOWN | PG_TRIGGER_CHAR, 0);
433
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
111
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
112 /* Start our canvas out focused, so we get keyboard input */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
113 pgFocus(this->hidden->wCanvas);
433
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
114
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
115 /* Set up bindings for all the above event handlers */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
116 pgBind(this->hidden->wApp, PG_WE_CLOSE, &PG_HandleClose, NULL);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
117 pgBind(this->hidden->wCanvas, PG_WE_BUILD, &PG_HandleResize, NULL);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
118 pgBind(this->hidden->wCanvas, PG_WE_KBD_CHAR, &PG_HandleChar, NULL);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
119 pgBind(this->hidden->wCanvas, PG_WE_KBD_KEYUP, &PG_HandleKey, NULL);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
120 pgBind(this->hidden->wCanvas, PG_WE_KBD_KEYDOWN, &PG_HandleKey, NULL);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
121 pgBind(this->hidden->wCanvas, PG_WE_PNTR_MOVE, &PG_HandleMouseMotion,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
122 NULL);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
123 pgBind(this->hidden->wCanvas, PG_WE_PNTR_UP, &PG_HandleMouseButton, NULL);
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
124 pgBind(this->hidden->wCanvas, PG_WE_PNTR_DOWN, &PG_HandleMouseButton,
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
125 this);
433
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
126 }
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
127
706de3956894 Added initial support for PicoGUI (thanks Micah!)
Sam Lantinga <slouken@libsdl.org>
parents:
diff changeset
128 /* end of SDL_pgevents.c ... */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
129 /* vi: set ts=4 sw=4 expandtab: */