1
/* Host windows plugin header file
2
* tim@sumeru.stanford.edu
3
* All sizes are in pixels; convert from OS abstract units as needed
4
* windowHandles etc are expected to be SmallInteger valid values
5
* windowHandle 1 is the traditional main window */
7
/* closeWindow: arg is sqInt windowIndex. Fail (return 0) if anything goes wrong
8
* - typically the windowIndex invalid or similar */
9
extern sqInt closeWindow(sqInt index);
11
/* createWindow: takes sqInt width, height and origin x/y plus a char* list of
12
* as yet undefined attributes. Returns an sqInt window index or 0 for failure
13
* Failure may occur because of an inability to add the window, too many
14
* windows already extant (platform dependant), the specified size being
15
* unreasonable etc. */
16
extern sqInt createWindowWidthheightoriginXyattrlength(sqInt w, sqInt h, sqInt x, sqInt y,
17
char * list, sqInt attributeListLength);
19
/* ioShowDisplayOnWindow: similar to ioShowDisplay but adds the sqInt windowIndex
20
* Return true if ok, false if not, but not currently checked */
21
extern sqInt ioShowDisplayOnWindow( unsigned char* dispBitsIndex, sqInt width, sqInt
22
height, sqInt depth, sqInt affectedL, sqInt affectedR, sqInt affectedT, sqInt affectedB,
25
/* ioSizeOfWindow: arg is sqInt windowIndex. Return the size of the specified
26
* window in (width<<16 || height) format like ioScreenSize.
27
* Return -1 for failure - typically invalid windowIndex
28
* -1 is chosen since itwould correspond to a window size of 64k@64k which
29
* I hope is unlikely for some time to come */
30
extern sqInt ioSizeOfWindow(sqInt windowIndex);
32
/* ioSizeOfWindowSetxy: args are sqInt windowIndex, sqInt w & h for the
33
* width / height to make the window. Return the actual size the OS
34
* produced in (width<<16 || height) format or -1 for failure as above. */
35
extern sqInt ioSizeOfWindowSetxy(sqInt windowIndex, sqInt w, sqInt h);
37
/* ioPositionOfWindow: arg is sqInt windowIndex. Return the pos of the specified
38
* window in (left<<16 || top) format like ioScreenSize.
39
* Return -1 (as above) for failure - tpyically invalid windowIndex */
40
extern sqInt ioPositionOfWindow(sqInt windowIndex);
42
/* ioPositionOfWindowSetxy: args are sqInt windowIndex, sqInt x & y for the
43
* origin x/y for the window. Return the actual origin the OS
44
* produced in (left<<16 || top) format or -1 for failure, as above */
45
extern sqInt ioPositionOfWindowSetxy(sqInt windowIndex, sqInt x, sqInt y);
47
/* ioSetTitleOfWindow: args are sqInt windowIndex, char* newTitle and
48
* sqInt size of new title. Fail with -1 if windowIndex is invalid, string is too
49
long for platform etc. Leave previous title in place on failure */
50
sqInt ioSetTitleOfWindow(sqInt windowIndex, char * newTitle, sqInt sizeOfTitle);
52
/* ioCloseAllWindows: sqIntended for VM shutdown.
53
* Close all the windows that appear to be open.
54
* No useful return value since we're getting out of Dodge anyway.
56
extern sqInt ioCloseAllWindows(void);