Completely get rid of unused m4/ directory
[shogivar/ydirson.git] / common.h
blob60fa50426fdb494d61b7cef1fb3be8cee3d97f8e
1 #define MSG_SIZ 512
2 #define NPIECES 1000 /* FIXME: how many, really? */
3 #define NSQUARES 1000 /* FIXME: how many, really? */
4 #define NTYPES 100 /* FIXME: how many, really? */
7 #define ASSIGN(X, Y) if(X) free(X); X = strdup(Y)
9 typedef int Boolean;
10 typedef char *String;
11 typedef void (*DelayedEventCallback)(void);
12 typedef int (*FileProc)(FILE *f, int n, char *title);
14 typedef enum { Press, Release } ClickType;
16 typedef enum { CheckBox, ComboBox, TextBox, Button, Spin, ResetButton, SaveButton, ListBox, Graph, PopUp,
17 FileName, PathName, Slider, Message, Fractional, Label, Icon,
18 BoxBegin, BoxEnd, BarBegin, BarEnd, DropDown, Break, EndMark, Skip } Control;
20 typedef struct _opt { // [HGM] options: descriptor of UCI-style option
21 int value; // current setting, starts as default
22 int min; // Also used for flags
23 int max;
24 void *handle; // for use by front end
25 void *target; // for use by front end
26 char *textValue; // points to beginning of text value in name field
27 char **choice; // points to array of combo choices in cps->combo
28 Control type;
29 char *name; // holds both option name and text value (in allocated memory)
30 } Option;
32 typedef struct {
33 Boolean visible;
34 int x;
35 int y;
36 int width;
37 int height;
38 } WindowPlacement;
40 /* A point in time */
41 typedef struct {
42 long sec; /* Assuming this is >= 32 bits */
43 int ms; /* Assuming this is >= 16 bits */
44 } TimeMark;
46 extern TimeMark programStartTime;