8#ifndef GWINDOWEVENTS_H_
9#define GWINDOWEVENTS_H_
73 cursormode(cursormode) {}
75 float getX()
const {
return mousex; }
76 float getY()
const {
return mousey; }
136 : width(width), height(height) {}
150 : width(width), height(height), scalex(scalex), scaley(scaley) {}
161 float scalex, scaley;
199 : joystickid(joystickId), isgamepad(isgamepad) {}
214 : joystickid(joystickId) {}
224#if GLIST_ANDROID || GLIST_IOS
226 INPUTTYPE_UNKNOWN = 0,
227 INPUTTYPE_FINGER = 1,
228 INPUTTYPE_STYLUS = 2,
236 ACTIONTYPE_CANCEL = 3,
237 ACTIONTYPE_OUTSIDE = 4,
238 ACTIONTYPE_POINTER_DOWN = 5,
239 ACTIONTYPE_POINTER_UP = 6,
240 ACTIONTYPE_HOVER_MOVE = 7,
241 ACTIONTYPE_SCROLL = 8,
242 ACTIONTYPE_HOVER_ENTER = 9,
243 ACTIONTYPE_HOVER_EXIT = 10
253class gTouchEvent :
public gEvent {
255 gTouchEvent(
int inputCount, TouchInput* inputs,
int actionIndex, ActionType action) : inputs(inputs), inputcount(inputCount), action(action), actionindex(actionIndex) {}
257 int getInputCount()
const {
return inputcount; }
258 TouchInput* getInputs()
const {
return inputs; }
259 int getActionIndex()
const {
return actionindex; }
260 ActionType getAction()
const {
return action; }
271enum DeviceOrientation {
272 DEVICEORIENTATION_UNSPECIFIED = -1,
273 DEVICEORIENTATION_LANDSCAPE = 0,
274 DEVICEORIENTATION_PORTRAIT = 1,
275 DEVICEORIENTATION_REVERSE_LANDSCAPE = 8,
276 DEVICEORIENTATION_REVERSE_PORTRAIT = 9
279class gDeviceOrientationChangedEvent :
public gEvent {
281 gDeviceOrientationChangedEvent(DeviceOrientation orientation) : orientation(orientation) {}
283 DeviceOrientation getOrientation()
const {
return orientation; }
288 DeviceOrientation orientation;
Definition gWindowEvents.h:293
gAppPauseEvent()
Definition gWindowEvents.h:295
Definition gWindowEvents.h:302
gAppResumeEvent()
Definition gWindowEvents.h:304
Definition gWindowEvents.h:33
unsigned int getCharacter() const
Definition gWindowEvents.h:38
gCharTypedEvent(const unsigned int keycode)
Definition gWindowEvents.h:35
Definition gWindowEvents.h:196
bool isGamepad() const
Definition gWindowEvents.h:202
int getJoystickId() const
Definition gWindowEvents.h:201
gJoystickConnectEvent(int joystickId, bool isgamepad)
Definition gWindowEvents.h:198
Definition gWindowEvents.h:211
int getJoystickId() const
Definition gWindowEvents.h:216
gJoystickDisconnectEvent(int joystickId)
Definition gWindowEvents.h:213
Definition gWindowEvents.h:21
gKeyEvent(const int keycode)
Definition gWindowEvents.h:27
int getKeyCode() const
Definition gWindowEvents.h:23
int keycode
Definition gWindowEvents.h:30
Definition gWindowEvents.h:46
bool isRepeat() const
Definition gWindowEvents.h:52
gKeyPressedEvent(const int keycode, bool isrepeat=false)
Definition gWindowEvents.h:48
Definition gWindowEvents.h:59
gKeyReleasedEvent(const int keycode)
Definition gWindowEvents.h:61
Definition gWindowEvents.h:68
gMouseMovedEvent(float x, float y, gCursorMode cursormode)
Definition gWindowEvents.h:70
gCursorMode getCursorMode() const
Definition gWindowEvents.h:77
float getX() const
Definition gWindowEvents.h:75
float getY() const
Definition gWindowEvents.h:76
Definition gWindowEvents.h:164
gWindowFocusEvent()
Definition gWindowEvents.h:166
Definition gWindowEvents.h:172
gWindowLoseFocusEvent()
Definition gWindowEvents.h:174
Definition gWindowEvents.h:180
gWindowMouseEnterEvent()
Definition gWindowEvents.h:182
Definition gWindowEvents.h:188
gWindowMouseExitEvent()
Definition gWindowEvents.h:190
Definition gWindowEvents.h:133
int getHeight() const
Definition gWindowEvents.h:139
int getWidth() const
Definition gWindowEvents.h:138
gWindowResizeEvent(int width, int height)
Definition gWindowEvents.h:135
Definition gWindowEvents.h:147
int getHeight() const
Definition gWindowEvents.h:153
gWindowScaleChangedEvent(int width, int height, float scalex, float scaley)
Definition gWindowEvents.h:149
float getScaleY() const
Definition gWindowEvents.h:155
int getWidth() const
Definition gWindowEvents.h:152
float getScaleX() const
Definition gWindowEvents.h:154
#define G_EVENT_CLASS_CATEGORY(category)
Definition gEvent.h:91
@ EVENTCATEGORY_KEYBOARD
Definition gEvent.h:17
@ EVENTCATEGORY_JOYSTICK
Definition gEvent.h:20
@ EVENTCATEGORY_TOUCHSCREEN
Definition gEvent.h:21
@ EVENTCATEGORY_APP
Definition gEvent.h:15
@ EVENTCATEGORY_MOUSE
Definition gEvent.h:18
@ EVENTCATEGORY_MOUSE_BUTTON
Definition gEvent.h:19
@ EVENTCATEGORY_INPUT
Definition gEvent.h:16
#define G_EVENT_CLASS_TYPE(type)
Definition gEvent.h:86
gCursorMode
Definition gWindowEvents.h:14
@ CURSORMODE_NORMAL
Definition gWindowEvents.h:15
@ CURSORMODE_HIDDEN
Definition gWindowEvents.h:16
@ CURSORMODE_DISABLED
Definition gWindowEvents.h:17
@ CURSORMODE_RELATIVE
Definition gWindowEvents.h:18