File: sqUnixDisplayNull.c

package info (click to toggle)
squeak-vm 1%3A4.10.2.2614-4.1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 13,284 kB
  • ctags: 15,344
  • sloc: ansic: 75,096; cs: 11,191; objc: 5,494; sh: 3,170; asm: 1,533; cpp: 449; pascal: 372; makefile: 366; awk: 103
file content (172 lines) | stat: -rw-r--r-- 5,652 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
#include "sq.h"
#include "sqaio.h"

#include "SqDisplay.h"
#include "sqUnixGlobals.h"

static char *display_winSystemName(void) { return "none"; }
static void  display_winInit(void) {}
static void  display_winOpen(void) {}
static void  display_winSetName(char *title) {}
static int   display_winImageFind(char *imageName, int size) { return 0; }
static void  display_winImageNotFound(void) {}
static void  display_winExit(void) {}


static sqInt display_ioFormPrint(sqInt b, sqInt w, sqInt h, sqInt d, double hS, double vS, sqInt ls)
{
  return 0;
}

static sqInt display_ioBeep(void) { return 0; }

static sqInt display_ioRelinquishProcessorForMicroseconds(sqInt microSeconds)
{
  aioSleep(microSeconds);
  return 0;
}

static sqInt display_ioProcessEvents(void)
{
  aioPoll(0);
  return 0;
}

static sqInt display_ioScreenDepth(void)
{
  return 1;
}

static sqInt display_ioScreenSize(void)
{
  int sws= getSavedWindowSize();
  return sws ? sws : ((64 << 16) | 64);
}

static sqInt display_ioSetCursorWithMask(sqInt bits, sqInt mask, sqInt x, sqInt y)
{
  return 0;
}

static sqInt display_ioSetCursorARGB(sqInt cursorBitsIndex, sqInt extentX, sqInt extentY, sqInt offsetX, sqInt offsetY)
{
  return 0;
}

static sqInt display_ioSetFullScreen(sqInt fullScreen)
{
  return 0;
}

static sqInt display_ioForceDisplayUpdate(void)
{
  return 0;
}

static sqInt display_ioShowDisplay(sqInt bits, sqInt w, sqInt h, sqInt d, sqInt l, sqInt r, sqInt t, sqInt b)
{
  return 0;
}

static sqInt display_ioHasDisplayDepth(sqInt i)
{
  return 1;
}

static sqInt display_ioSetDisplayMode(sqInt w, sqInt h, sqInt d, sqInt fullscreenFlag)
{
  setSavedWindowSize((w << 16) + (h & 0xFFFF));
  return 1;
}

static sqInt display_clipboardSize(void)
{
  return 0;
}

static sqInt display_clipboardWriteFromAt(sqInt count, sqInt byteArrayIndex, sqInt startIndex)
{
  return 0;
}

static sqInt display_clipboardReadIntoAt(sqInt count, sqInt byteArrayIndex, sqInt startIndex)
{
  return 0;
}

static char **display_clipboardGetTypeNames(void)
{
  return 0;
}

static sqInt display_clipboardSizeWithType(char *typeName, int nTypeName)
{
  return 0;
}

static void display_clipboardWriteWithType(char *data, size_t ndata, char *typeName, size_t nTypeName, int isDnd, int isClaiming)
{
  return;
}

static sqInt display_dndOutStart(char *types, int ntypes)	{ return 0; }
static void  display_dndOutSend (char *bytes, int nbytes)	{ return  ; }
static sqInt display_dndOutAcceptedType(char *buf, int nbuf)	{ return 0; }

static sqInt display_ioGetButtonState(void)		{ return 0; }
static sqInt display_ioPeekKeystroke(void)		{ return 0; }
static sqInt display_ioGetKeystroke(void)		{ return 0; }
static sqInt display_ioGetNextEvent(sqInputEvent *evt)	{ return 0; }
static sqInt display_ioMousePoint(void)			{ return 0; }

static void  *display_ioGetDisplay(void)									{ return 0; }
static void  *display_ioGetWindow(void)										{ return 0; }
static sqInt  display_ioGLinitialise(void)									{ return 0; }
static sqInt  display_ioGLcreateRenderer(glRenderer *r, sqInt x, sqInt y, sqInt w, sqInt h, sqInt flags)	{ return 0; }
static sqInt  display_ioGLmakeCurrentRenderer(glRenderer *r)							{ return 0; }
static void   display_ioGLdestroyRenderer(glRenderer *r)							{}
static void   display_ioGLswapBuffers(glRenderer *r)								{}
static void   display_ioGLsetBufferRect(glRenderer *r, sqInt x, sqInt y, sqInt w, sqInt h)			{}

static sqInt display_primitivePluginBrowserReady(void)		{ return primitiveFail(); }
static sqInt display_primitivePluginRequestURLStream(void)	{ return primitiveFail(); }
static sqInt display_primitivePluginRequestURL(void)		{ return primitiveFail(); }
static sqInt display_primitivePluginPostURL(void)		{ return primitiveFail(); }
static sqInt display_primitivePluginRequestFileHandle(void)	{ return primitiveFail(); }
static sqInt display_primitivePluginDestroyRequest(void)	{ return primitiveFail(); }
static sqInt display_primitivePluginRequestState(void)		{ return primitiveFail(); }

#if (SqDisplayVersionMajor >= 1 && SqDisplayVersionMinor >= 2)
static int display_hostWindowClose(int index)                                               { return 0; }
static int display_hostWindowCreate(int w, int h, int x, int y,
  char *list, int attributeListLength)                                                      { return 0; }
static int display_hostWindowShowDisplay(unsigned *dispBitsIndex, int width, int height, int depth,
  int affectedL, int affectedR, int affectedT, int affectedB, int windowIndex)              { return 0; }
static int display_hostWindowGetSize(int windowIndex)                                       { return -1; }
static int display_hostWindowSetSize(int windowIndex, int w, int h)                         { return -1; }
static int display_hostWindowGetPosition(int windowIndex)                                   { return -1; }
static int display_hostWindowSetPosition(int windowIndex, int x, int y)                     { return -1; }
static int display_hostWindowSetTitle(int windowIndex, char *newTitle, int sizeOfTitle)     { return -1; }
static int display_hostWindowCloseAll(void)                                                 { return 0; }
#endif


SqDisplayDefine(null);


#include "SqModule.h"

static void  display_parseEnvironment(void) {}

static int   display_parseArgument(int argc, char **argv)
{
  if (!strcmp(argv[0], "-nodisplay")) return 1;
  if (!strcmp(argv[0], "-headless"))  return 1;
  return 0;
}

static void  display_printUsage(void) {}
static void  display_printUsageNotes(void) {}
static void *display_makeInterface(void) { return &display_null_itf; }

SqModuleDefine(display, null);