Ejemplo n.º 1
0
GHOST_IWindow *GHOST_SystemCarbon::createWindow(
		const STR_String& title,
		GHOST_TInt32 left,
		GHOST_TInt32 top,
		GHOST_TUns32 width,
		GHOST_TUns32 height,
		GHOST_TWindowState state,
		GHOST_TDrawingContextType type,
		bool stereoVisual,
		const GHOST_TUns16 numOfAASamples,
		const GHOST_TEmbedderWindowID parentWindow)
{
	GHOST_IWindow *window = 0;

	window = new GHOST_WindowCarbon(title, left, top, width, height, state, type);

	if (window) {
		if (window->getValid()) {
			// Store the pointer to the window
			GHOST_ASSERT(m_windowManager, "m_windowManager not initialized");
			m_windowManager->addWindow(window);
			m_windowManager->setActiveWindow(window);
			pushEvent(new GHOST_Event(getMilliSeconds(), GHOST_kEventWindowSize, window));
		}
		else {
			GHOST_PRINT("GHOST_SystemCarbon::createWindow(): window invalid\n");
			delete window;
			window = 0;
		}
	}
	else {
		GHOST_PRINT("GHOST_SystemCarbon::createWindow(): could not create window\n");
	}
	return window;
}
Ejemplo n.º 2
0
int GHOST_GetValid(GHOST_WindowHandle windowhandle) 
{
	GHOST_IWindow *window = (GHOST_IWindow *) windowhandle;

	return (int) window->getValid();
}