BRL-CAD
events.h
Go to the documentation of this file.
1 /* E V E N T S . H
2  * BRL-CAD
3  *
4  * Copyright (c) 2021-2024 United States Government as represented by
5  * the U.S. Army Research Laboratory.
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public License
9  * version 2.1 as published by the Free Software Foundation.
10  *
11  * This library is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this file; see the file named COPYING for more
18  * information.
19  */
20 /** @file events.h
21  *
22  * View objects may define their behaviors in response to events (key
23  * presses, mouse movements, etc.). Because such events are defined
24  * on a per-environment basis, we need to define a common language to
25  * express responses to those events in order to avoid dependence on
26  * that environment.
27  *
28  * The calling code is responsible for translating the environment
29  * specific events into bv events.
30  *
31  * TODO - eventually these should probably be augmented by common purpose
32  * specific options (i.e. define a BV_X_CONSTRAIN so the calling application
33  * can map either x or X to the enabling of that particular motion constraint
34  * during editing, for example...) However, I think we'll also need to pass
35  * the lower level info as there are too many purpose specific possibilities
36  * to encode them all up front.
37  */
38 
39 #define BV_KEY_PRESS 0x001
40 #define BV_KEY_RELEASE 0x002
41 #define BV_LEFT_MOUSE_PRESS 0x004
42 #define BV_LEFT_MOUSE_RELEASE 0x008
43 #define BV_RIGHT_MOUSE_PRESS 0x010
44 #define BV_RIGHT_MOUSE_RELEASE 0x020
45 #define BV_MIDDLE_MOUSE_PRESS 0x040
46 #define BV_MIDDLE_MOUSE_RELEASE 0x080
47 #define BV_CTRL_MOD 0x100
48 #define BV_SHIFT_MOD 0x200
49 #define BV_ALT_MOD 0x400
50 
51 /*
52  * Local Variables:
53  * tab-width: 8
54  * mode: C
55  * indent-tabs-mode: t
56  * c-file-style: "stroustrup"
57  * End:
58  * ex: shiftwidth=4 tabstop=8
59  */