vdk 2.4.0
vdktypes.h
1 /*
2  * ===========================
3  * VDK Visual Development Kit
4  * Version 0.4
5  * October 1998
6  * ===========================
7  *
8  * Copyright (C) 1998, Mario Motta
9  * Developed by Mario Motta <mmotta@guest.net>
10  *
11  * This library is free software; you can redistribute it and/or
12  * modify it under the terms of the GNU Library General Public
13  * License as published by the Free Software Foundation; either
14  * version 2 of the License, or (at your option) any later version.
15  *
16  * This library is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  * Library General Public License for more details.
20  *
21  * You should have received a copy of the GNU Library General Public
22  * License along with this library; if not, write to the Free Software
23  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
24  * 02111-130
25  */
26 
27 
28 #ifndef VDKTYPES_H
29 #define VDKTYPES_H
30 #include <gdk/gdkcursor.h>
31 #include <gdk/gdkevents.h>
32 #include <gtk/gtkenums.h>
33 
34 #ifdef NULL
35 #undef NULL
36 #define NULL 0x0000
37 #endif
38 
39 enum VDKCursorType
40 {
41 curDefault = -1,
42 curLeftPtr = GDK_LEFT_PTR,
43 curWatch = GDK_WATCH,
44 curCrossHair = GDK_CROSSHAIR,
45 curHandPtr = GDK_HAND2,
46 curPencil = GDK_PENCIL
47 };
48 
49 enum VDKSignal
50 {
51  no_signal = -1,
52  clicked_signal,
53  pressed_signal,
54  released_signal,
55  enter_signal,
56  leave_signal,
57  activate_signal,
58  select_row_signal,
59  unselect_row_signal,
60  click_column_signal,
61  changed_signal,
62  focus_out_signal,
63  focus_in_signal,
64  timer_tick_signal,
65  realize_signal,
66  switch_page_signal,
67  toggled_signal,
68  event_browser_signal,
69  value_changed_signal,
70  child_attached_signal,
71  child_detached_signal,
72  selection_changed_signal, // used in VDKCombo
73  text_changed_signal, // used in VDKtext
74  select_node_signal,
75  unselect_node_signal,
76  databox_zoomed_signal, // used in VDKDataBox
77  databox_marked_signal,
78  databox_selection_started_signal,
79  databox_selection_changed_signal,
80  databox_selection_stopped_signal,
81  databox_selection_canceled_signal,
82 #if HAVE_GNOME
83  // gnome widget signals
84  date_changed_signal = 1024, // VDKGnomeDateEdit
85  time_changed_signal,
86 #endif
87  row_activated_signal = 1512,
88  user_signal = 4096
89 };
90 
91 enum VDKEvent
92 {
93  no_event = GDK_NOTHING,
94  delete_event = GDK_DELETE,
95  destroy_event = GDK_DESTROY,
96  expose_event = GDK_EXPOSE,
97  motion_notify_event = GDK_MOTION_NOTIFY,
98  button_press_event = GDK_BUTTON_PRESS,
99  double_click_event = GDK_2BUTTON_PRESS,
100  triple_click_event = GDK_3BUTTON_PRESS,
101  button_release_event = GDK_BUTTON_RELEASE,
102  key_press_event = GDK_KEY_PRESS,
103  key_release_event = GDK_KEY_RELEASE,
104  enter_notify_event = GDK_ENTER_NOTIFY,
105  leave_notify_event = GDK_LEAVE_NOTIFY,
106  focus_change_event = GDK_FOCUS_CHANGE,
107  configure_event = GDK_CONFIGURE,
108  map_event = GDK_MAP,
109  unmap_event = GDK_UNMAP,
110  property_notify_event = GDK_PROPERTY_NOTIFY,
111  selection_clear_event = GDK_SELECTION_CLEAR,
112  selection_request_event = GDK_SELECTION_REQUEST,
113  selection_notify_event = GDK_SELECTION_NOTIFY,
114  proximity_in_event = GDK_PROXIMITY_IN,
115  proximity_ou_event = GDK_PROXIMITY_OUT,
116  client_event = GDK_CLIENT_EVENT,
117  visibility_notify_event = GDK_VISIBILITY_NOTIFY,
118  no_expose_event = GDK_NO_EXPOSE,
119  drag_start_event = GDK_DRAG_ENTER,
120  drag_stop_event = GDK_DRAG_LEAVE,
121  dragging_event = GDK_DRAG_MOTION
122 };
123 
124 enum { v_box, h_box, table_box };
125 enum { l_justify, c_justify, r_justify , pos_justify = 100};
126 enum { h_separator, v_separator };
127 enum { shadow_none, shadow_in, shadow_out,
128  shadow_etched_in, shadow_etched_out };
129 enum { Class_level = 8192, Parent_level };
130 
131 enum VDKUpdateType
132 {
133  update_continuos = GTK_UPDATE_CONTINUOUS,
134  update_discontinuos = GTK_UPDATE_DISCONTINUOUS,
135  update_delayed = GTK_UPDATE_DELAYED
136 };
137 
138 /* custom button toggled or not */
139 #define VDK_CBUTTON_UNTOGGLED 0x0010
140 #define VDK_CBUTTON_TOGGLED 0x0020
141 #define VDK_CBUTTON_TOGGLEMASK 0x00F0
142 /* custom button type */
143 #define VDK_CBUTTON_NORMAL 0x0000
144 #define VDK_CBUTTON_COMBO 0x0004
145 #define VDK_CBUTTON_TYPEMASK 0x000F
146 /* MessageBox icon types */
147 #ifndef VDK_ICONSTOP
148 #define VDK_ICONSTOP 0x0010
149 #define VDK_ICONWARNING VDK_ICONSTOP
150 #define VDK_ICONQUESTION 0x0020
151 #define VDK_ICONINFORMATION 0x0040
152 #define VDK_ICONERROR 0x0080
153 #define VDK_ICONMASK 0x00F0
154 #endif
155 /* MessageBox type */
156 #define VDK_OK 0x0000
157 #define VDK_YESNO 0x0004
158 #define VDK_OKCANCEL 0x0008
159 #define VDK_TYPEMASK 0x000F
160 /* MessageBox answers */
161 #define VDK_IDYES 0x0001
162 #define VDK_IDNO 0x0002
163 #define VDK_IDOK 0x0003
164 #define VDK_IDCANCEL 0x0004 /* (not yet implemented) */
165 
166 /* some useful colors */
167 #define clWhite VDKRgb(255,255,255)
168 #define clBlack VDKRgb(0,0,0)
169 #define clYellow VDKRgb(255,255,0)
170 #define clRed VDKRgb(255,0,0)
171 #define clGreen VDKRgb(0,255,0)
172 #define clBlue VDKRgb(0,0,255)
173 #define clNavyBlue VDKRgb(0,0,130)
174 #define clMaroon VDKRgb(146,89,28)
175 #define clSiena VDKRgb(178,32,32)
176 #define clIvory VDKRgb(255,255,223)
177 #define clAirBlue VDKRgb(89,186,231)
178 #define clLightBlue clAirBlue
179 #define clDodgerBlue VDKRgb(101,191,212)
180 
181 /* some useful fonts */
182 #define fnFixed14 "fixed Medium 14"
183 #define fnCourier12 "courier Medium 12"
184 #define fnCourier14 "courier Medium 12"
185 #define fnFixed12 "fixed Medium 12"
186 #define fnLucida12 "lucida Medium 12"
187 #define fnLucidaBold12 "lucida Bold 12"
188 #define fnTimesBold12 "times Bold 12"
189 #define fnTimesBold14 "times Bold 14"
190 #define fnTimes24 "times Medium 24"
191 #define fnTimesBold24 "times Bold 24"
192 
193 #endif
194 
195 
196 
197 
198