tomwalters@0
|
1 /*
|
tomwalters@0
|
2 Copyright (c) Applied Psychology Unit, Medical Research Council. 1993
|
tomwalters@0
|
3 ===========================================================================
|
tomwalters@0
|
4
|
tomwalters@0
|
5 Permission to use, copy, modify, and distribute this software without fee
|
tomwalters@0
|
6 is hereby granted for research purposes, provided that this copyright
|
tomwalters@0
|
7 notice appears in all copies and in all supporting documentation, and that
|
tomwalters@0
|
8 the software is not redistributed for any fee (except for a nominal
|
tomwalters@0
|
9 shipping charge). Anyone wanting to incorporate all or part of this
|
tomwalters@0
|
10 software in a commercial product must obtain a license from the Medical
|
tomwalters@0
|
11 Research Council.
|
tomwalters@0
|
12
|
tomwalters@0
|
13 The MRC makes no representations about the suitability of this
|
tomwalters@0
|
14 software for any purpose. It is provided "as is" without express or
|
tomwalters@0
|
15 implied warranty.
|
tomwalters@0
|
16
|
tomwalters@0
|
17 THE MRC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
|
tomwalters@0
|
18 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
tomwalters@0
|
19 THE A.P.U. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES
|
tomwalters@0
|
20 OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
tomwalters@0
|
21 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
tomwalters@0
|
22 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
tomwalters@0
|
23 SOFTWARE.
|
tomwalters@0
|
24 */
|
tomwalters@0
|
25
|
tomwalters@0
|
26 /*
|
tomwalters@0
|
27 * xreview.h
|
tomwalters@0
|
28 * ---------
|
tomwalters@0
|
29 *
|
tomwalters@0
|
30 *
|
tomwalters@0
|
31 * M. Akeroyd. July 1993. version 1.00
|
tomwalters@0
|
32 *
|
tomwalters@0
|
33 */
|
tomwalters@0
|
34
|
tomwalters@0
|
35
|
tomwalters@0
|
36
|
tomwalters@0
|
37 #include <X11/Xlib.h>
|
tomwalters@0
|
38 #include <X11/Xutil.h>
|
tomwalters@0
|
39 #include <X11/Xos.h>
|
tomwalters@0
|
40 #include <X11/Xatom.h>
|
tomwalters@0
|
41 #include <X11/Xmu/Xmu.h>
|
tomwalters@0
|
42 #include <X11/keysym.h>
|
tomwalters@0
|
43
|
tomwalters@0
|
44 #define BITMAPDEPTH 1
|
tomwalters@0
|
45 #define TOO_SMALL_X 0
|
tomwalters@0
|
46 #define BIG_ENOUGH_X 1
|
tomwalters@0
|
47 #define TOO_BIG_X 2
|
tomwalters@0
|
48 #define MIN_WIDTH_XWINDOW 200 /* in pixels */
|
tomwalters@0
|
49 #define MIN_HEIGHT_XWINDOW 200 /* in pixels */
|
tomwalters@0
|
50
|
tomwalters@0
|
51 #define LINE_WIDTH_X 0
|
tomwalters@0
|
52 #define LINE_STYLE_X LineSolid
|
tomwalters@0
|
53 #define CAP_STYLE_X CapButt
|
tomwalters@0
|
54 #define JOIN_STYLE_X JoinRound
|
tomwalters@0
|
55
|
tomwalters@0
|
56 #define DEFAULT_POINTSIZE 18 /* of the font */
|
tomwalters@0
|
57
|
tomwalters@0
|
58 #define BYTES_PER_LINE 64
|
tomwalters@0
|
59 #define BITMAP_PAD 8
|
tomwalters@0
|
60
|
tomwalters@0
|
61 #define CONTROL_WIDTH 610 /* pixels */
|
tomwalters@0
|
62 #define CONTROL_HEIGHT 210 /* pixels */
|
tomwalters@0
|
63 #define CONTROL_X 100 /* pixels */
|
tomwalters@0
|
64 #define CONTROL_Y 600 /* pixels */
|
tomwalters@0
|
65
|
tomwalters@0
|
66
|
tomwalters@0
|
67 #define MAX_LINES_HEADER 100 /* 69 is what .ctns are */
|
tomwalters@0
|
68 #define MAX_LINE_LENGTH 80 /* of a header : width of an xterm */
|
tomwalters@0
|
69 #define MAX_FRAMES 1000
|
tomwalters@0
|
70
|
tomwalters@0
|
71 #define MAX_STRING_LENGTH 255 /* of a filename, etc */
|
tomwalters@0
|
72 #define NULL_STRING ""
|
tomwalters@0
|
73
|
tomwalters@0
|
74 #define OFF 0
|
tomwalters@0
|
75 #define ON 1
|
tomwalters@0
|
76
|
tomwalters@0
|
77 #define READ 31 /* used in fopen as "rb" */
|
tomwalters@0
|
78 #define WRITE 32 /* used in fopen as "wb" */
|
tomwalters@0
|
79
|
tomwalters@0
|
80 #define INPUT_EXT ".ctn"
|
tomwalters@0
|
81
|
tomwalters@0
|
82 #define MONO 10
|
tomwalters@0
|
83 #define COLOUR 11
|
tomwalters@0
|
84 #define SERVER 12
|
tomwalters@0
|
85 #define DEC 13
|
tomwalters@0
|
86 #define SUN 14
|
tomwalters@0
|
87
|
tomwalters@0
|
88 /* WARNING: fonts are left out */
|
tomwalters@0
|
89
|
tomwalters@0
|
90 typedef struct top_level_Window {
|
tomwalters@0
|
91 Window win;
|
tomwalters@0
|
92 unsigned int width;
|
tomwalters@0
|
93 unsigned int height;
|
tomwalters@0
|
94 int x;
|
tomwalters@0
|
95 int y;
|
tomwalters@0
|
96 unsigned int border_width;
|
tomwalters@0
|
97 int window_size;
|
tomwalters@0
|
98 char *window_name;
|
tomwalters@0
|
99 char *icon_name;
|
tomwalters@0
|
100 Pixmap icon_pixmap;
|
tomwalters@0
|
101 XSizeHints size_hints;
|
tomwalters@0
|
102 XEvent report;
|
tomwalters@0
|
103 GC gc;
|
tomwalters@0
|
104 XWMHints wm_hints;
|
tomwalters@0
|
105 XClassHint class_hints;
|
tomwalters@0
|
106 XTextProperty windowName;
|
tomwalters@0
|
107 XTextProperty iconName;
|
tomwalters@0
|
108 unsigned long valuemask;
|
tomwalters@0
|
109 XGCValues values;
|
tomwalters@0
|
110 unsigned int line_width;
|
tomwalters@0
|
111 unsigned int line_style;
|
tomwalters@0
|
112 unsigned int cap_style;
|
tomwalters@0
|
113 unsigned int join_style;
|
tomwalters@0
|
114 unsigned int foreground;
|
tomwalters@0
|
115 } toplevelWindow;
|
tomwalters@0
|
116
|
tomwalters@0
|
117
|
tomwalters@0
|
118 typedef struct button_window {
|
tomwalters@0
|
119 Window win;
|
tomwalters@0
|
120 unsigned int width;
|
tomwalters@0
|
121 unsigned int height;
|
tomwalters@0
|
122 int x;
|
tomwalters@0
|
123 int y;
|
tomwalters@0
|
124 } buttonWindow;
|
tomwalters@0
|
125
|
tomwalters@0
|
126
|
tomwalters@0
|
127
|