Lines Matching refs:splash

95 SplashInitFrameShape(Splash * splash, int imageIndex)
101 if (!splash->maskRequired)
105 if (!IS_SAFE_SIZE_MUL(splash->width / 2 + 1, splash->height)) {
109 sizeof(RECT), (splash->width / 2 + 1) * splash->height);
114 initRect(&maskRect, 0, 0, splash->width, splash->height, 1,
115 splash->width * splash->imageFormat.depthBytes,
116 splash->frames[imageIndex].bitmapBits, &splash->imageFormat);
123 pRgnHdr->rcBound.bottom = splash->height;
124 pRgnHdr->rcBound.right = splash->width;
129 splash->frames[imageIndex].hRgn = ExtCreateRegion(NULL,
135 /* paint current splash screen frame to hdc
139 SplashPaint(Splash * splash, HDC hdc)
141 unsigned numColors = splash->screenFormat.colorMap ?
142 splash->screenFormat.numColors : 0;
146 if (!splash->frames)
148 if (splash->currentFrame < 0 || splash->currentFrame >= splash->frameCount)
156 if (splash->screenFormat.colorMap)
158 splash->screenFormat.colorMap, sizeof(RGBQUAD) * numColors);
161 pBmi->bV4Width = splash->width;
162 pBmi->bV4Height = -splash->height;
164 pBmi->bV4BitCount = (WORD) (splash->screenFormat.depthBytes * 8);
169 pBmi->bV4AlphaMask = splash->screenFormat.mask[3];
170 pBmi->bV4RedMask = splash->screenFormat.mask[2];
171 pBmi->bV4GreenMask = splash->screenFormat.mask[1];
172 pBmi->bV4BlueMask = splash->screenFormat.mask[0];
176 if (!splash->hPalette) {
188 QUAD_RED(splash->colorMap[i]);
190 QUAD_GREEN(splash->colorMap[i]);
192 QUAD_BLUE(splash->colorMap[i]);
195 splash->hPalette = CreatePalette(pLogPal);
198 if (splash->hPalette) {
199 hOldPal = SelectPalette(hdc, splash->hPalette, FALSE);
203 StretchDIBits(hdc, 0, 0, splash->width, splash->height, 0, 0,
204 splash->width, splash->height, splash->screenData,
214 SplashRedrawWindow(Splash * splash)
216 SplashUpdateScreenData(splash);
217 if (splash->isLayered) {
236 bmi.biWidth = splash->width;
237 bmi.biHeight = -splash->height;
248 memcpy(bitmapBits, splash->screenData,
249 splash->screenStride * splash->height);
251 hdcDst = GetDC(splash->hWnd);
253 GetWindowRect(splash->hWnd, &rect);
258 size.cx = splash->width;
259 size.cy = splash->height;
261 UpdateLayeredWindow(splash->hWnd, hdcDst, &ptDst, &size,
264 ReleaseDC(splash->hWnd, hdcDst);
270 InvalidateRect(splash->hWnd, NULL, FALSE);
271 if (splash->maskRequired) {
274 CombineRgn(hRgn, splash->frames[splash->currentFrame].hRgn,
275 splash->frames[splash->currentFrame].hRgn, RGN_COPY);
276 SetWindowRgn(splash->hWnd, hRgn, TRUE);
278 SetWindowRgn(splash->hWnd, NULL, TRUE);
280 UpdateWindow(splash->hWnd);
282 if (!IsWindowVisible(splash->hWnd)) {
284 ShowWindow(splash->hWnd, SW_SHOW);
288 if (WindowFromPoint(cursorPos) == splash->hWnd) {
298 if (SplashIsStillLooping(splash)) {
299 int time = splash->time +
300 splash->frames[splash->currentFrame].delay - SplashTime();
304 SetTimer(splash->hWnd, 0, time, NULL);
307 KillTimer(splash->hWnd, 0);
311 void SplashReconfigureNow(Splash * splash) {
312 splash->x = (GetSystemMetrics(SM_CXSCREEN) - splash->width) / 2;
313 splash->y = (GetSystemMetrics(SM_CYSCREEN) - splash->height) / 2;
314 if (splash->hWnd) {
315 //Fixed 6474657: splash screen image jumps towards left while
317 // We may safely hide the splash window because SplashRedrawWindow()
319 ShowWindow(splash->hWnd, SW_HIDE);
320 MoveWindow(splash->hWnd, splash->x, splash->y, splash->width, splash->height, FALSE);
322 SplashRedrawWindow(splash);
352 Splash *splash = (Splash *) GetWindowLongPtr(hWnd, GWLP_USERDATA);
354 SplashLock(splash);
355 if (splash->isVisible>0) {
358 SplashNextFrame(splash);
359 SplashRedrawWindow(splash);
362 SplashRedrawWindow(splash);
366 SplashPaint(splash, hdc);
370 SplashReconfigureNow(splash);
374 SplashUnlock(splash);
388 SplashCreateWindow(Splash * splash)
409 splash->x = (GetSystemMetrics(SM_CXSCREEN) - splash->width) / 2;
410 splash->y = (GetSystemMetrics(SM_CYSCREEN) - splash->height) / 2;
411 exStyle = splash->isLayered ? WS_EX_LAYERED : 0;
415 splash->x, splash->y, splash->width, splash->height, NULL, NULL,
417 SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR) splash);
422 SplashLock(Splash * splash)
424 EnterCriticalSection(&splash->lock);
428 SplashUnlock(Splash * splash)
430 LeaveCriticalSection(&splash->lock);
434 SplashInitPlatform(Splash * splash)
439 InitializeCriticalSection(&splash->lock);
440 splash->isLayered = FALSE;
444 splash->isLayered = TRUE;
446 splash->byteAlignment = 4;
447 if (splash->isLayered) {
448 initFormat(&splash->screenFormat,
450 splash->screenFormat.premultiplied = 1;
451 splash->maskRequired = 0;
454 splash->maskRequired = 1;
461 initFormat(&splash->screenFormat, 0, 0, 0, 0);
464 splash->colorIndex[i] = i;
467 initColorCube(numComponents, splash->colorMap, splash->dithers,
468 splash->colorIndex);
469 splash->screenFormat.colorIndex = splash->colorIndex;
470 splash->screenFormat.depthBytes = 1;
471 splash->screenFormat.colorMap = splash->colorMap;
472 splash->screenFormat.dithers = splash->dithers;
473 splash->screenFormat.numColors = numColors;
474 splash->hPalette = NULL;
477 initFormat(&splash->screenFormat,
485 SplashCleanupPlatform(Splash * splash)
489 if (splash->frames) {
490 for (i = 0; i < splash->frameCount; i++) {
491 if (splash->frames[i].hRgn) {
492 DeleteObject(splash->frames[i].hRgn);
493 splash->frames[i].hRgn = NULL;
497 if (splash->hPalette)
498 DeleteObject(splash->hPalette);
499 splash->maskRequired = !splash->isLayered;
503 SplashDonePlatform(Splash * splash)
505 if (splash->hWnd)
506 DestroyWindow(splash->hWnd);
523 Splash *splash = (Splash *) param;
525 splash->currentFrame = 0;
526 SplashLock(splash);
527 splash->time = SplashTime();
528 splash->hWnd = SplashCreateWindow(splash);
529 if (splash->hWnd) {
530 SplashRedrawWindow(splash);
531 SplashUnlock(splash);
533 SplashLock(splash);
535 SplashDone(splash);
536 splash->isVisible = -1;
537 SplashUnlock(splash);
542 SplashCreateThread(Splash * splash)
546 CreateThread(NULL, 0, SplashScreenThread, (LPVOID) splash, 0, &threadId);
550 SplashClosePlatform(Splash * splash)
552 PostMessage(splash->hWnd, WM_QUIT, 0, 0);
556 SplashUpdate(Splash * splash)
558 PostMessage(splash->hWnd, WM_SPLASHUPDATE, 0, 0);
562 SplashReconfigure(Splash * splash)
564 PostMessage(splash->hWnd, WM_SPLASHRECONFIGURE, 0, 0);