Lines Matching refs:window

27     ( (ContextInfo *) GetWRefCon( ((w)->nativeWindow ? (w)->nativeWindow : (w)->window) ) )
32 ( (ContextInfo *) GetWRefCon( ((w)->nativeWindow ? (w)->nativeWindow : (w)->window) ) )
68 static void renderspu_SystemWindowApplyVisibleRegion(WindowInfo *window);
73 * application window. This is done here when called from the event handler
74 * which monitor bounding changes of the main window. */
77 /* The window with id zero is the base window, which isn't displayed at
81 /* Fetch the actually window info & the user data */
83 /* We need to assign the context with this window */
110 WindowRef window = NULL;
122 NULL, sizeof(WindowRef), NULL, &window);
181 /* Update the root window clip region */
332 renderspuFullscreen(WindowInfo *window, GLboolean fullscreen)
338 renderspuWindowAttachContext(WindowInfo *wi, WindowRef window,
349 if (context->currentWindow->window != window)
351 /* If the window buffer name is uninitialized we have to create a new
375 drawable = (AGLDrawable) GetWindowPort(window);
383 /* Assign the dummy context to the window */
395 newDrawable = (AGLDrawable) GetWindowPort(window);
415 renderspuSetWindowContext(window, context);
428 WindowInfo *window)
439 renderspu_SystemDestroyWindow(WindowInfo *window)
441 CRASSERT(window);
442 CRASSERT(window->visual);
444 if(!window->nativeWindow)
449 status = SetEventParameter(evt, kEventParamWindowRef, typeWindowRef, sizeof (window->window), &window->window);
456 if(window->dummyContext)
458 render_spu.ws.aglSetDrawable(window->dummyContext, NULL);
459 render_spu.ws.aglDestroyContext(window->dummyContext);
460 window->dummyContext = NULL;
464 window->bufferName = -1;
465 window->visual = NULL;
466 window->window = NULL;
468 if (window->hVisibleRegion)
470 DisposeRgn(window->hVisibleRegion);
471 window->hVisibleRegion = 0;
476 renderspu_SystemWindowPosition(WindowInfo *window,
479 CRASSERT(window);
480 CRASSERT(window->window);
488 status = SetEventParameter(evt, kEventParamWindowRef, typeWindowRef, sizeof(window->window), &window->window);
493 status = SetEventParameter(evt, kEventParamUserData, typeVoidPtr, sizeof (window), &window);
499 window->x = x;
500 window->y = y;
504 renderspu_SystemWindowSize(WindowInfo *window, GLint w, GLint h)
506 CRASSERT(window);
507 CRASSERT(window->window);
515 status = SetEventParameter(evt, kEventParamWindowRef, typeWindowRef, sizeof(window->window), &window->window);
520 status = SetEventParameter(evt, kEventParamUserData, typeVoidPtr, sizeof (window), &window);
525 DEBUG_MSG_POETZSCH (("Size %d visible %d\n", window->BltInfo.Base.id, IsWindowVisible (window->window)));
527 window->BltInfo.width = w;
528 window->BltInfo.height = h;
532 renderspu_SystemGetWindowGeometry(WindowInfo *window,
536 CRASSERT(window);
537 CRASSERT(window->window);
541 status = GetWindowBounds(window->window, kWindowStructureRgn, &r);
551 renderspu_SystemGetMaxWindowSize(WindowInfo *window,
554 CRASSERT(window);
555 CRASSERT(window->window);
562 status = GetWindowResizeLimits (window->window, NULL, &s);
570 /* Either show or hide the render SPU's window. */
572 renderspu_SystemShowWindow(WindowInfo *window, GLboolean showIt)
574 CRASSERT(window);
575 CRASSERT(window->window);
577 if (!IsValidWindowPtr(window->window))
583 renderspu_SystemWindowPosition (window, window->x, window->y);
590 status = SetEventParameter(evt, kEventParamWindowRef, typeWindowRef, sizeof (window->window), &window->window);
592 status = SetEventParameter(evt, kEventParamUserData, typeVoidPtr, sizeof (window), &window);
603 status = SetEventParameter(evt, kEventParamWindowRef, typeWindowRef, sizeof (window->window), &window->window);
610 void renderspu_SystemVBoxPresentComposition( WindowInfo *window, const struct VBOXVR_SCR_COMPOSITOR * pCompositor, const struct VBOXVR_SCR_COMPOSITOR_ENTRY *pChangedEntry )
612 renderspuVBoxPresentCompositionGeneric(window, pCompositor, pChangedEntry, 0, false);
616 renderspu_SystemMakeCurrent(WindowInfo *window, GLint nativeWindow,
620 /* DEBUG_MSG_POETZSCH (("makecurrent %d: \n", window->BltInfo.Base.id));*/
623 //crDebug( "renderspu_SystemMakeCurrent( %x, %i, %x )", window, nativeWindow, context );
627 if(window && context)
629 CRASSERT(window->window);
632 if(window->visual != context->visual)
634 crDebug("Render SPU (renderspu_SystemMakeCurrent): MakeCurrent visual mismatch (0x%x != 0x%x); remaking window.",
635 (uint)window->visual->visAttribs, (uint)context->visual->visAttribs);
639 * But for now we destroy the current window
642 renderspu_SystemDestroyWindow(window);
643 renderspu_SystemCreateWindow(context->visual, window->visible,
644 window);
647 /* This is the normal case: rendering to the render SPU's own window */
648 result = renderspuWindowAttachContext(window, window->window,
655 if (!window->everCurrent || f[1] < 0.0)
662 renderspu_SystemWindowApplyVisibleRegion(window);
669 renderspu_SystemSwapBuffers(WindowInfo *window, GLint flags)
671 CRASSERT(window);
672 CRASSERT(window->window);
674 ContextInfo *context = renderspuGetWindowContext(window);
677 crError("Render SPU (renderspu_SystemSwapBuffers): SwapBuffers got a null context from the window");
680 // DEBUG_MSG_POETZSCH (("Swapped %d context %x visible: %d\n", window->BltInfo.Base.id, context->context, IsWindowVisible (window->window)));
706 GLboolean renderspu_SystemWindowNeedEmptyPresent(WindowInfo *window)
711 void renderspu_SystemWindowVisibleRegion(WindowInfo *window, GLint cRects, const GLint* pRects)
713 CRASSERT(window);
714 CRASSERT(window->window);
717 if (window->hVisibleRegion)
719 DisposeRgn(window->hVisibleRegion);
720 window->hVisibleRegion = 0;
740 window->hVisibleRegion = rgn;
743 renderspu_SystemWindowApplyVisibleRegion(window);
748 /* Remember the visible region of the root window if there is one */
773 static void renderspu_SystemWindowApplyVisibleRegion(WindowInfo *window)
775 ContextInfo *c = renderspuGetWindowContext(window);
779 DEBUG_MSG_POETZSCH (("ApplyVisibleRegion %x\n", window));
789 * window. We intersect it with the rect of the OpenGL window we
792 window->x, window->y,
793 window->x + window->BltInfo.width,
794 window->y + window->BltInfo.height);
797 * window we have to remove the x/y position from the newly created
799 OffsetRgn (rgn, -window->x, -window->y);
804 * region with the size of the target window. This covers all
806 SetRectRgn(rgn, 0, 0, window->BltInfo.width, window->BltInfo.height);
809 /* Now intersect the window clipping region with a additional region e.g.
811 if (window->hVisibleRegion)
812 SectRgn(rgn, window->hVisibleRegion, rgn);
828 WindowInfo *window)
831 CRASSERT(window);
838 window->visual = visual;
839 window->nativeWindow = NULL;
841 if(window->window && IsValidWindowPtr(window->window))
846 status = SetEventParameter(evt, kEventParamWindowRef, typeWindowRef, sizeof (window->window), &window->window);
852 windowRect.left = window->x;
853 windowRect.top = window->y;
854 windowRect.right = window->x + window->BltInfo.width;
855 windowRect.bottom = window->y + window->BltInfo.height;
857 status = CreateNewWindow(winClass, winAttr, &windowRect, &window->window);
862 title_string = CFStringCreateWithCStringNoCopy(NULL, window->title,
864 SetWindowTitleWithCFString(window->BltInfo.window, title_string);
876 /* Add the new window to the master group */
877 SetWindowGroup(window->window, render_spu.pMasterGroup);
880 * context to this new window */
881 window->bufferName = -1;
882 window->dummyContext = NULL;
883 window->hVisibleRegion = 0;
886 renderspu_SystemShowWindow(window, GL_TRUE);
888 crDebug("Render SPU (renderspu_SystemVBoxCreateWindow): actual window (x, y, width, height): %d, %d, %d, %d",
889 window->x, window->y, window->BltInfo.width, window->BltInfo.height);