Lines Matching refs:splash

54 static void SplashCenter(Splash * splash)
58 splash->x = (screenFrame.size.width - splash->width) / 2;
59 splash->y = (screenFrame.size.height - splash->height) / 2 + screenFrame.origin.y;
130 SplashInitPlatform(Splash * splash) {
131 pthread_mutex_init(&splash->lock, NULL);
133 splash->maskRequired = 0;
139 splash->byteAlignment = 1;
140 initFormat(&splash->screenFormat, 0xff << 8,
142 splash->screenFormat.byteOrder = 1 ? BYTE_ORDER_LSBFIRST : BYTE_ORDER_MSBFIRST;
143 splash->screenFormat.depthBytes = 4;
152 SplashCleanupPlatform(Splash * splash) {
153 splash->maskRequired = 0;
157 SplashDonePlatform(Splash * splash) {
160 pthread_mutex_destroy(&splash->lock);
162 if (splash->window) {
163 [splash->window orderOut:nil];
164 [splash->window release];
171 SplashLock(Splash * splash) {
172 pthread_mutex_lock(&splash->lock);
176 SplashUnlock(Splash * splash) {
177 pthread_mutex_unlock(&splash->lock);
181 SplashInitFrameShape(Splash * splash, int imageIndex) {
187 SplashCreateThread(Splash * splash) {
193 rc = pthread_create(&thr, &attr, SplashScreenThread, (void *) splash);
197 SplashRedrawWindow(Splash * splash) {
200 SplashUpdateScreenData(splash);
205 initWithBitmapDataPlanes: (unsigned char**)&splash->screenData
206 pixelsWide: splash->width
207 pixelsHigh: splash->height
214 bytesPerRow: splash->width * 4
218 initWithSize: NSMakeSize(splash->width, splash->height)];
234 // Loos like the splash->screenData contains inappropriate data
240 [splash->window setContentView: view];
241 [splash->window orderFrontRegardless];
247 void SplashReconfigureNow(Splash * splash) {
251 SplashCenter(splash);
253 if (!splash->window) {
257 [splash->window orderOut:nil];
258 [splash->window setFrame: NSMakeRect(splash->x, splash->y, splash->width, splash->height)
264 SplashRedrawWindow(splash);
268 SplashEventLoop(Splash * splash) {
270 /* we should have splash _locked_ on entry!!! */
275 int ctl = splash->controlpipe[0];
283 if (splash->isVisible>0 && SplashIsStillLooping(splash)) {
284 timeout = splash->time + splash->frames[splash->currentFrame].delay
290 SplashUnlock(splash);
292 SplashLock(splash);
293 if (splash->isVisible>0 && SplashTime() >= splash->time +
294 splash->frames[splash->currentFrame].delay) {
295 SplashNextFrame(splash);
296 SplashRedrawWindow(splash);
311 if (splash->isVisible>0) {
312 SplashRedrawWindow(splash);
316 if (splash->isVisible>0) {
317 SplashReconfigureNow(splash);
333 Splash *splash = (Splash *) param;
335 SplashLock(splash);
336 pipe(splash->controlpipe);
337 fcntl(splash->controlpipe[0], F_SETFL,
338 fcntl(splash->controlpipe[0], F_GETFL, 0) | O_NONBLOCK);
339 splash->time = SplashTime();
340 splash->currentFrame = 0;
342 SplashCenter(splash);
344 splash->window = (void*) [[NSWindow alloc]
345 initWithContentRect: NSMakeRect(splash->x, splash->y, splash->width, splash->height)
351 [splash->window setOpaque: NO];
352 [splash->window setBackgroundColor: [NSColor clearColor]];
355 if (splash->window) {
357 [splash->window orderFrontRegardless];
359 SplashRedrawWindow(splash);
360 SplashEventLoop(splash);
362 SplashUnlock(splash);
363 SplashDone(splash);
365 splash->isVisible=-1;
373 sendctl(Splash * splash, char code) {
374 if (splash && splash->controlpipe[1]) {
375 write(splash->controlpipe[1], &code, 1);
380 SplashClosePlatform(Splash * splash) {
381 sendctl(splash, SPLASHCTL_QUIT);
385 SplashUpdate(Splash * splash) {
386 sendctl(splash, SPLASHCTL_UPDATE);
390 SplashReconfigure(Splash * splash) {
391 sendctl(splash, SPLASHCTL_RECONFIGURE);