GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
include
widgets
gp_widget_keys.h
Go to the documentation of this file.
1
//SPDX-License-Identifier: LGPL-2.0-or-later
2
3
/*
4
5
Copyright (c) 2014-2024 Cyril Hrubis <metan@ucw.cz>
6
7
*/
8
14
#ifndef GP_WIDGET_KEYS
15
#define GP_WIDGET_KEYS
16
17
#include <
input/gp_event.h
>
18
25
static
inline
int
gp_widget_key_mod_pressed
(
gp_event
*ev)
26
{
27
return
gp_ev_any_key_pressed
(ev,
GP_KEY_LEFT_ALT
,
GP_KEY_RIGHT_ALT
,
28
GP_KEY_LEFT_CTRL
,
GP_KEY_RIGHT_CTRL
,
29
GP_KEY_LEFT_META
,
GP_KEY_RIGHT_META
);
30
}
31
36
#define GP_WIDGET_KEYS_MOD_FOCUS GP_KEY_LEFT_CTRL, GP_KEY_RIGHT_CTRL
38
#define GP_WIDGET_KEY_FOCUS_LEFT GP_KEY_LEFT
40
#define GP_WIDGET_KEY_FOCUS_RIGHT GP_KEY_RIGHT
42
#define GP_WIDGET_KEY_FOCUS_UP GP_KEY_UP
44
#define GP_WIDGET_KEY_FOCUS_DOWN GP_KEY_DOWN
45
47
#define GP_WIDGET_KEY_FOCUS_NEXT GP_KEY_TAB
49
#define GP_WIDGET_KEYS_MOD_FOCUS_PREV GP_KEY_LEFT_SHIFT, GP_KEY_RIGHT_SHIFT
50
52
#define GP_WIDGET_KEYS_MOD_COLOR_SCHEME GP_KEY_LEFT_CTRL, GP_KEY_RIGHT_CTRL
54
#define GP_WIDGET_KEY_COLOR_SCHEME GP_KEY_SPACE
55
57
#define GP_WIDGET_KEYS_MOD_ABOUT GP_KEY_LEFT_CTRL, GP_KEY_RIGHT_CTRL
59
#define GP_WIDGET_KEY_ABOUT GP_KEY_I
60
61
/* Keys to increase/decrease text size */
62
#define GP_WIDGET_KEYS_MOD_ZOOM GP_KEY_LEFT_CTRL, GP_KEY_RIGHT_CTRL
63
#define GP_WIDGET_KEY_ZOOM_IN GP_KEY_EQUAL
64
#define GP_WIDGET_KEY_ZOOM_OUT GP_KEY_MINUS
65
67
#define GP_WIDGET_KEYS_MOD_QUIT GP_KEY_LEFT_ALT, GP_KEY_RIGHT_ALT
69
#define GP_WIDGET_KEY_QUIT GP_KEY_F4
70
71
#endif
/* GP_WIDGET_KEYS */
gp_event.h
An (input) event layer.
gp_ev_any_key_pressed
#define gp_ev_any_key_pressed(ev,...)
Checks for any key from a set to be pressed.
Definition
gp_event.h:272
GP_KEY_LEFT_META
@ GP_KEY_LEFT_META
Key Left Meta.
Definition
gp_event_keys.h:250
GP_KEY_LEFT_CTRL
@ GP_KEY_LEFT_CTRL
Key Left Ctrl.
Definition
gp_event_keys.h:79
GP_KEY_RIGHT_META
@ GP_KEY_RIGHT_META
Key Right Meta.
Definition
gp_event_keys.h:252
GP_KEY_RIGHT_CTRL
@ GP_KEY_RIGHT_CTRL
Key Right Ctrl.
Definition
gp_event_keys.h:204
GP_KEY_LEFT_ALT
@ GP_KEY_LEFT_ALT
Key Left Alt.
Definition
gp_event_keys.h:133
GP_KEY_RIGHT_ALT
@ GP_KEY_RIGHT_ALT
Key Right Alt.
Definition
gp_event_keys.h:210
gp_widget_key_mod_pressed
static int gp_widget_key_mod_pressed(gp_event *ev)
Utility function to check for modifier keys.
Definition
gp_widget_keys.h:25
gp_event
An input event.
Definition
gp_event.h:153
Generated by
1.9.8