Debian Codegraph @

ui/UIlib.h

raw symbols SCIP
1 /*
2 * Descent 3
3 * Copyright (C) 2024 Parallax Software
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 --- HISTORICAL COMMENTS FOLLOW ---
19
20 * $Logfile: /DescentIII/Main/ui/UIlib.h $
21 * $Revision: 14 $
22 * $Date: 2/17/99 8:32p $
23 * $Author: Samir $
24 *
25 * UI Library internal header.
26 *
27 * $Log: /DescentIII/Main/ui/UIlib.h $
28 *
29 * 14 2/17/99 8:32p Samir
30 * fixed bugs in remove gadget, added callbacks for attaching and
31 * detaching gadgets.
32 *
33 * 13 10/13/98 8:23p Samir
34 * added more keyboard input options.
35 *
36 * 12 6/05/98 5:35p Samir
37 * massive improvement in UI keyboard interface.
38 *
39 * 11 5/06/98 4:34p Samir
40 * added function to set ui screen resolution.
41 *
42 * 10 3/13/98 5:18p Jeff
43 * Added arrow character defines
44 *
45 * 9 3/05/98 6:40p Samir
46 * Implemented radio buttons.
47 *
48 * 8 2/13/98 6:35p Samir
49 * Added double click delay constant.
50 *
51 * 7 1/30/98 7:06p Samir
52 * Moved a lot of functions out to uixxx.h library files.
53 *
54 * 6 1/18/98 4:23p Samir
55 * Took out old bitmap management system for UI.
56 *
57 * 5 1/13/98 6:59p Jeff
58 * (Samir) moved defines from UIlib.h to ui.h.
59 *
60 * 4 1/13/98 4:32p Samir
61 * Made tUIInput a shared structure to be used by ui_DoFrame to return UI
62 * input values.
63 *
64 * 3 1/13/98 4:29p Samir
65 * Added some ID numbers and macros.
66 *
67 * 2 1/02/98 12:49p Samir
68 * Added ui_GetTextWidth.
69 *
70 * 1 12/30/97 4:37p Samir
71 * Initial revision
72 *
73 * $NoKeywords: $
74 */
75
76 #ifndef UILIB_H
77 #define UILIB_Hcxx . . $ `ui/UIlib.h:77:9`!
78
79 #include "ui.h"cxx . . $ `<file>/ui/ui.h`/
80 #include "ddio.h"cxx . . $ `<file>/ddio/ddio.h`/
81
82 struct tUIOutputcxx . . $ tUIOutput# {
83 int idcxx . . $ tUIOutput#id.; // return value
84 UIGadgetcxx . . $ UIGadget# *gadgetcxx . . $ tUIOutput#gadget.; // object that's linked to return value.
85 };
86
87 // ids internal to UI system
88 #define UID_UPcxx . . $ `ui/UIlib.h:88:9`! 0
89 #define UID_RIGHTcxx . . $ `ui/UIlib.h:89:9`! 1
90 #define UID_DOWNcxx . . $ `ui/UIlib.h:90:9`! 2
91 #define UID_LEFTcxx . . $ `ui/UIlib.h:91:9`! 3
92
93 // constants
94 #define UI_SCROLL_REGION_EXTENTcxx . . $ `ui/UIlib.h:94:9`! 40
95 #define UI_LEFT_ARROW_CHARcxx . . $ `ui/UIlib.h:95:9`! 24
96 #define UI_UP_ARROW_CHARcxx . . $ `ui/UIlib.h:96:9`! 25
97 #define UI_RIGHT_ARROW_CHARcxx . . $ `ui/UIlib.h:97:9`! 26
98 #define UI_DOWN_ARROW_CHARcxx . . $ `ui/UIlib.h:98:9`! 27
99 #define UI_CHECKBOX_OFF_CHARcxx . . $ `ui/UIlib.h:99:9`! 28
100 #define UI_CHECKBOX_ON_CHARcxx . . $ `ui/UIlib.h:100:9`! 29
101 #define UI_RADIO_OFF_CHARcxx . . $ `ui/UIlib.h:101:9`! 30
102 #define UI_RADIO_ON_CHARcxx . . $ `ui/UIlib.h:102:9`! 31
103
104 // user ouput structure
105 extern tUIOutputcxx . . $ tUIOutput# UI_outputcxx . . $ UI_output.;
106
107 extern float UI_aspect_xcxx . . $ UI_aspect_x.;
108 extern float UI_aspect_ycxx . . $ UI_aspect_y.;
109
110 #define UI_Xcxx . . $ `ui/UIlib.h:110:9`!(_x) ((int)(UI_aspect_x * (_x)))
111 #define UI_Ycxx . . $ `ui/UIlib.h:111:9`!(_y) ((int)(UI_aspect_y * (_y)))
112
113 // retrieves input for user interface
114 bool ui_Pollcxx . . $ ui_Poll(c9857a73d68e59ba).();
115
116 // flushes out key input info currently in ui.
117 void ui_KeyFlushcxx . . $ ui_KeyFlush(49f6e7a06ebc5aa8).();
118
119 #endif