00001
00002
00003
00004
00005
00006
00007 #ifndef V_VX_h
00008 #define V_VX_h 1
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #include "viaio/Vlib.h"
00026 #include "viaio/VEdges.h"
00027 #include "viaio/VImage.h"
00028
00029
00030 #include <stdio.h>
00031
00032
00033
00034 #if !defined(__STDC__) && !defined(_NO_PROTO)
00035 #define _NO_PROTO
00036 #endif
00037 #if defined(__STDC__) && defined(_NO_PROTO)
00038 #undef _NO_PROTO
00039 #endif
00040
00041
00042 #include <Xm/Xm.h>
00043
00044
00045 #include <X11/Xfuncproto.h>
00046
00047 #ifdef __cplusplus
00048 extern "C" {
00049 #endif
00050
00051
00052 #define VXNmessageAreaNLines "messageAreaNLines"
00053 #define VXCMessageAreaNLines "MessageAreaNLines"
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063 typedef enum {
00064 VXIkeyPress = 0,
00065 VXIbuttonPress = 1,
00066 VXIbuttonRelease = 2,
00067 VXIpointerMotion = 3,
00068 VXnInputTypes = 4
00069 } VXInputType;
00070
00071
00072
00073
00074 typedef enum {
00075 VXMshift = ShiftMask,
00076 VXMctrl = ControlMask,
00077 VXMbutton1 = Button1Mask,
00078 VXMbutton2 = Button2Mask,
00079 VXMbutton3 = Button3Mask,
00080 VXMbutton4 = Button4Mask,
00081 VXMbutton5 = Button5Mask,
00082 VXMmod1 = Mod1Mask,
00083 VXMmod2 = Mod2Mask,
00084 VXMmod3 = Mod3Mask,
00085 VXMmod4 = Mod4Mask,
00086 VXMmod5 = Mod5Mask
00087 } VXModifierMask;
00088
00089
00090
00091
00092 typedef struct {
00093
00094 VXInputType input_type;
00095
00096
00097
00098
00099 int value;
00100
00101
00102
00103
00104 VXModifierMask modifiers;
00105
00106
00107
00108
00109
00110
00111
00112 int row;
00113
00114
00115
00116
00117 int column;
00118
00119
00120
00121
00122 } VXInputDataRec, *VXInputData;
00123
00124
00125
00126
00127 typedef void (*VXInputCallback)(
00128 #if NeedFunctionPrototypes
00129 VXInputData ,
00130 VPointer
00131 #endif
00132 );
00133
00134
00135
00136
00137 typedef void (*VXMenuCallback)(
00138 #if NeedFunctionPrototypes
00139 VPointer
00140 #endif
00141 );
00142
00143
00144
00145
00146 typedef enum {
00147 VXAyes,
00148 VXAno,
00149 VXAcancel
00150 } VXAnswer;
00151
00152
00153
00154
00155
00156
00157 #define VXWarning VWarning
00158
00159
00160
00161
00162
00163
00164
00165
00166 extern void VXPopupMessageBox (
00167 #if NeedFunctionPrototypes
00168 VStringConst ,
00169 VStringConst
00170 #endif
00171 );
00172
00173 extern VString VXPopupInputBox (
00174 #if NeedFunctionPrototypes
00175 VStringConst ,
00176 VStringConst ,
00177 VStringConst
00178 #endif
00179 );
00180
00181 extern VXAnswer VXPopupYesNoBox (
00182 #if NeedFunctionPrototypes
00183 VStringConst ,
00184 VStringConst
00185 #endif
00186 );
00187
00188 extern void VXPopupTextBox (
00189 #if NeedFunctionPrototypes
00190 int ,
00191 int ,
00192 VStringConst ,
00193 VStringConst
00194 #endif
00195 );
00196
00197 extern VString VXPopupFileBox (
00198 #if NeedFunctionPrototypes
00199 VStringConst
00200 #endif
00201 );
00202
00203
00204
00205 extern VBoolean VXSetImage (
00206 #if NeedFunctionPrototypes
00207 VImage ,
00208 VBand ,
00209 double ,
00210 int ,
00211 int
00212 #endif
00213 );
00214
00215
00216
00217 extern void VXInit (
00218 #if NeedFunctionPrototypes
00219 VStringConst ,
00220 VStringConst * ,
00221 int * ,
00222 char **
00223 #endif
00224 );
00225
00226 extern void VXAppMainLoop (
00227 #if NeedFunctionPrototypes
00228 void
00229 #endif
00230 );
00231
00232 extern void VXReportValidOptions (
00233 #if NeedFunctionPrototypes
00234 void
00235 #endif
00236 );
00237
00238
00239
00240 extern void VXAddInputCallback (
00241 #if NeedFunctionPrototypes
00242 VXInputType ,
00243 VXInputCallback ,
00244 VPointer
00245 #endif
00246 );
00247
00248
00249
00250 extern VBoolean VXSetLineColor (
00251 #if NeedFunctionPrototypes
00252 VStringConst
00253 #endif
00254 );
00255
00256 extern void VXSetLineWidth (
00257 #if NeedFunctionPrototypes
00258 double
00259 #endif
00260 );
00261
00262 extern void VXClearLines (
00263 #if NeedFunctionPrototypes
00264 void
00265 #endif
00266 );
00267
00268 extern VBoolean VXDrawLine (
00269 #if NeedFunctionPrototypes
00270 double ,
00271 double ,
00272 double ,
00273 double
00274 #endif
00275 );
00276
00277 extern VBoolean VXDrawEdges (
00278 #if NeedFunctionPrototypes
00279 VEdges
00280 #endif
00281 );
00282
00283
00284
00285 extern void VXAddMenu (
00286 #if NeedVarargsPrototypes
00287 VStringConst ,
00288 ...
00289 #endif
00290 );
00291
00292
00293
00294 extern void VXDisplayMessage (
00295 #if NeedVarargsPrototypes
00296 VBooleanPromoted ,
00297 VStringConst ,
00298 ...
00299 #endif
00300 );
00301
00302 extern void VXShowMessageArea (
00303 #if NeedFunctionPrototypes
00304 void
00305 #endif
00306 );
00307
00308 extern void VXHideMessageArea (
00309 #if NeedFunctionPrototypes
00310 void
00311 #endif
00312 );
00313
00314 extern Widget VXGetImageViewWidget (
00315 #if NeedFunctionPrototypes
00316 void
00317 #endif
00318 );
00319
00320 extern Widget VXGetApplicationShell (
00321 #if NeedFunctionPrototypes
00322 void
00323 #endif
00324 );
00325
00326 extern VBoolean VXIsColorDisplay (
00327 #if NeedFunctionPrototypes
00328 void
00329 #endif
00330 );
00331
00332
00333
00334 extern void VXStoreOverlays (
00335 #if NeedFunctionPrototypes
00336 void
00337 #endif
00338 );
00339
00340 extern void VXRestoreOverlays (
00341 #if NeedFunctionPrototypes
00342 void
00343 #endif
00344 );
00345
00346
00347
00348 extern VBoolean VXSetTextFont (
00349 #if NeedFunctionPrototypes
00350 VStringConst
00351 #endif
00352 );
00353
00354 extern VBoolean VXSetTextColor (
00355 #if NeedFunctionPrototypes
00356 VStringConst
00357 #endif
00358 );
00359
00360 extern void VXClearTexts (
00361 #if NeedFunctionPrototypes
00362 void
00363 #endif
00364 );
00365
00366 extern VBoolean VXDrawText (
00367 #if NeedFunctionPrototypes
00368 VStringConst ,
00369 double ,
00370 double
00371 #endif
00372 );
00373
00374 #ifdef __cplusplus
00375 }
00376 #endif
00377
00378 #endif