3 * ***** BEGIN GPL LICENSE BLOCK *****
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software Foundation,
17 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
20 * All rights reserved.
22 * The Original Code is: all of this file.
24 * Contributor(s): none yet.
26 * ***** END GPL LICENSE BLOCK *****
32 * Copyright (C) 2001 NaN Technologies B.V.
33 * @author Maarten Gribnau
41 #include "GHOST_WindowCarbon.h"
42 #include "GHOST_Debug.h"
44 AGLContext GHOST_WindowCarbon::s_firstaglCtx = NULL;
45 #ifdef GHOST_DRAW_CARBON_GUTTER
46 const GHOST_TInt32 GHOST_WindowCarbon::s_sizeRectSize = 16;
47 #endif //GHOST_DRAW_CARBON_GUTTER
49 static const GLint sPreferredFormatWindow[8] = {
57 static const GLint sPreferredFormatFullScreen[9] = {
68 WindowRef ugly_hack=NULL;
70 const EventTypeSpec kWEvents[] = {
71 { kEventClassWindow, kEventWindowZoom }, /* for new zoom behaviour */
74 static OSStatus myWEventHandlerProc(EventHandlerCallRef handler, EventRef event, void* userData) {
76 GHOST_WindowCarbon *ghost_window;
80 if (::GetEventKind(event) == kEventWindowZoom) {
81 err = ::GetEventParameter (event,kEventParamDirectObject,typeWindowRef,NULL,sizeof(mywindow),NULL, &mywindow);
82 ghost_window = (GHOST_WindowCarbon *) GetWRefCon(mywindow);
83 theState = ghost_window->getMac_windowState();
85 ghost_window->setMac_windowState(2);
86 else if (theState == 2)
87 ghost_window->setMac_windowState(1);
90 return eventNotHandledErr;
93 GHOST_WindowCarbon::GHOST_WindowCarbon(
94 const STR_String& title,
99 GHOST_TWindowState state,
100 GHOST_TDrawingContextType type,
101 const bool stereoVisual
103 GHOST_Window(title, left, top, width, height, state, GHOST_kDrawingContextTypeNone),
108 m_fullScreenDirty(false)
113 //fprintf(stderr," main screen top %i left %i height %i width %i\n", top, left, height, width);
115 if (state >= GHOST_kWindowState8Normal ) {
116 if(state == GHOST_kWindowState8Normal) state= GHOST_kWindowStateNormal;
117 else if(state == GHOST_kWindowState8Maximized) state= GHOST_kWindowStateMaximized;
118 else if(state == GHOST_kWindowState8Minimized) state= GHOST_kWindowStateMinimized;
119 else if(state == GHOST_kWindowState8FullScreen) state= GHOST_kWindowStateFullScreen;
121 // state = state - 8; this was the simple version of above code, doesnt work in gcc 4.0
123 setMac_windowState(1);
125 setMac_windowState(0);
127 if (state != GHOST_kWindowStateFullScreen) {
128 Rect bnds = { top, left, top+height, left+width };
129 // Boolean visible = (state == GHOST_kWindowStateNormal) || (state == GHOST_kWindowStateMaximized); /*unused*/
130 gen2mac(title, title255);
132 err = ::CreateNewWindow( kDocumentWindowClass,
133 kWindowStandardDocumentAttributes+kWindowLiveResizeAttribute,
138 fprintf(stderr," error creating window %i \n",err);
141 ::SetWRefCon(m_windowRef,(SInt32)this);
143 err = InstallWindowEventHandler (m_windowRef, myWEventHandlerProc, GetEventTypeCount(kWEvents), kWEvents,NULL,NULL);
145 fprintf(stderr," error creating handler %i \n",err);
147 // ::TransitionWindow (m_windowRef,kWindowZoomTransitionEffect,kWindowShowTransitionAction,NULL);
148 ::ShowWindow(m_windowRef);
149 ::MoveWindow (m_windowRef, left, top,true);
154 m_grafPtr = ::GetWindowPort(m_windowRef);
155 setDrawingContextType(type);
156 updateDrawingContext();
157 activateDrawingContext();
159 if(ugly_hack==NULL) {
160 ugly_hack= m_windowRef;
161 // when started from commandline, window remains in the back... also for play anim
162 ProcessSerialNumber psn;
163 GetCurrentProcess(&psn);
164 SetFrontProcess(&psn);
169 Rect bnds = { top, left, top+height, left+width };
170 gen2mac("", title255);
171 m_windowRef = ::NewCWindow(
173 &bnds, // Bounding rectangle of the window
174 title255, // Title of the window
175 0, // Window initially visible
177 (WindowRef)-1L, // Put window before all other windows
178 0, // Window has minimize box
179 (SInt32)this); // Store a pointer to the class in the refCon
181 //GHOST_PRINT("GHOST_WindowCarbon::GHOST_WindowCarbon(): creating full-screen OpenGL context\n");
182 setDrawingContextType(GHOST_kDrawingContextTypeOpenGL);;installDrawingContext(GHOST_kDrawingContextTypeOpenGL);
183 updateDrawingContext();
184 activateDrawingContext();
191 GHOST_WindowCarbon::~GHOST_WindowCarbon()
193 if (m_customCursor) delete m_customCursor;
195 if(ugly_hack==m_windowRef) ugly_hack= NULL;
197 // printf("GHOST_WindowCarbon::~GHOST_WindowCarbon(): removing drawing context\n");
198 if(ugly_hack==NULL) setDrawingContextType(GHOST_kDrawingContextTypeNone);
200 ::DisposeWindow(m_windowRef);
205 bool GHOST_WindowCarbon::getValid() const
209 valid = (m_windowRef != 0) && (m_grafPtr != 0) && ::IsValidWindowPtr(m_windowRef);
218 void GHOST_WindowCarbon::setTitle(const STR_String& title)
220 GHOST_ASSERT(getValid(), "GHOST_WindowCarbon::setTitle(): window invalid")
222 gen2mac(title, title255);
223 ::SetWTitle(m_windowRef, title255);
227 void GHOST_WindowCarbon::getTitle(STR_String& title) const
229 GHOST_ASSERT(getValid(), "GHOST_WindowCarbon::getTitle(): window invalid")
231 ::GetWTitle(m_windowRef, title255);
232 mac2gen(title255, title);
236 void GHOST_WindowCarbon::getWindowBounds(GHOST_Rect& bounds) const
240 GHOST_ASSERT(getValid(), "GHOST_WindowCarbon::getWindowBounds(): window invalid")
241 success = ::GetWindowBounds(m_windowRef, kWindowStructureRgn, &rect);
242 bounds.m_b = rect.bottom;
243 bounds.m_l = rect.left;
244 bounds.m_r = rect.right;
245 bounds.m_t = rect.top;
249 void GHOST_WindowCarbon::getClientBounds(GHOST_Rect& bounds) const
252 GHOST_ASSERT(getValid(), "GHOST_WindowCarbon::getClientBounds(): window invalid")
253 //::GetPortBounds(m_grafPtr, &rect);
254 ::GetWindowBounds(m_windowRef, kWindowContentRgn, &rect);
256 bounds.m_b = rect.bottom;
257 bounds.m_l = rect.left;
258 bounds.m_r = rect.right;
259 bounds.m_t = rect.top;
261 // Subtract gutter height from bottom
262 #ifdef GHOST_DRAW_CARBON_GUTTER
263 if ((bounds.m_b - bounds.m_t) > s_sizeRectSize)
265 bounds.m_b -= s_sizeRectSize;
269 bounds.m_t = bounds.m_b;
271 #endif //GHOST_DRAW_CARBON_GUTTER
275 GHOST_TSuccess GHOST_WindowCarbon::setClientWidth(GHOST_TUns32 width)
277 GHOST_ASSERT(getValid(), "GHOST_WindowCarbon::setClientWidth(): window invalid")
278 GHOST_Rect cBnds, wBnds;
279 getClientBounds(cBnds);
280 if (((GHOST_TUns32)cBnds.getWidth()) != width) {
281 ::SizeWindow(m_windowRef, width, cBnds.getHeight(), true);
283 return GHOST_kSuccess;
287 GHOST_TSuccess GHOST_WindowCarbon::setClientHeight(GHOST_TUns32 height)
289 GHOST_ASSERT(getValid(), "GHOST_WindowCarbon::setClientHeight(): window invalid")
290 GHOST_Rect cBnds, wBnds;
291 getClientBounds(cBnds);
292 #ifdef GHOST_DRAW_CARBON_GUTTER
293 if (((GHOST_TUns32)cBnds.getHeight()) != height+s_sizeRectSize) {
294 ::SizeWindow(m_windowRef, cBnds.getWidth(), height+s_sizeRectSize, true);
296 #else //GHOST_DRAW_CARBON_GUTTER
297 if (((GHOST_TUns32)cBnds.getHeight()) != height) {
298 ::SizeWindow(m_windowRef, cBnds.getWidth(), height, true);
300 #endif //GHOST_DRAW_CARBON_GUTTER
301 return GHOST_kSuccess;
305 GHOST_TSuccess GHOST_WindowCarbon::setClientSize(GHOST_TUns32 width, GHOST_TUns32 height)
307 GHOST_ASSERT(getValid(), "GHOST_WindowCarbon::setClientSize(): window invalid")
308 GHOST_Rect cBnds, wBnds;
309 getClientBounds(cBnds);
310 #ifdef GHOST_DRAW_CARBON_GUTTER
311 if ((((GHOST_TUns32)cBnds.getWidth()) != width) ||
312 (((GHOST_TUns32)cBnds.getHeight()) != height+s_sizeRectSize)) {
313 ::SizeWindow(m_windowRef, width, height+s_sizeRectSize, true);
315 #else //GHOST_DRAW_CARBON_GUTTER
316 if ((((GHOST_TUns32)cBnds.getWidth()) != width) ||
317 (((GHOST_TUns32)cBnds.getHeight()) != height)) {
318 ::SizeWindow(m_windowRef, width, height, true);
320 #endif //GHOST_DRAW_CARBON_GUTTER
321 return GHOST_kSuccess;
325 GHOST_TWindowState GHOST_WindowCarbon::getState() const
327 GHOST_ASSERT(getValid(), "GHOST_WindowCarbon::getState(): window invalid")
328 GHOST_TWindowState state;
329 if (::IsWindowVisible(m_windowRef)) {
330 state = GHOST_kWindowStateMinimized;
332 else if (::IsWindowInStandardState(m_windowRef, nil, nil)) {
333 state = GHOST_kWindowStateMaximized;
336 state = GHOST_kWindowStateNormal;
342 void GHOST_WindowCarbon::screenToClient(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const
344 GHOST_ASSERT(getValid(), "GHOST_WindowCarbon::screenToClient(): window invalid")
350 ::SetPort(m_grafPtr);
351 ::GlobalToLocal(&point);
358 void GHOST_WindowCarbon::clientToScreen(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY) const
360 GHOST_ASSERT(getValid(), "GHOST_WindowCarbon::clientToScreen(): window invalid")
366 ::SetPort(m_grafPtr);
367 ::LocalToGlobal(&point);
374 GHOST_TSuccess GHOST_WindowCarbon::setState(GHOST_TWindowState state)
376 GHOST_ASSERT(getValid(), "GHOST_WindowCarbon::setState(): window invalid")
378 case GHOST_kWindowStateMinimized:
379 ::HideWindow(m_windowRef);
381 case GHOST_kWindowStateMaximized:
382 case GHOST_kWindowStateNormal:
384 ::ShowWindow(m_windowRef);
387 return GHOST_kSuccess;
391 GHOST_TSuccess GHOST_WindowCarbon::setOrder(GHOST_TWindowOrder order)
393 GHOST_ASSERT(getValid(), "GHOST_WindowCarbon::setOrder(): window invalid")
394 if (order == GHOST_kWindowOrderTop) {
395 //::BringToFront(m_windowRef); is wrong, front window should be active for input too
396 ::SelectWindow(m_windowRef);
399 /* doesnt work if you do this with a mouseclick */
400 ::SendBehind(m_windowRef, nil);
402 return GHOST_kSuccess;
405 /*#define WAIT_FOR_VSYNC 1*/
406 #ifdef WAIT_FOR_VSYNC
407 #include <OpenGL/OpenGL.h>
410 GHOST_TSuccess GHOST_WindowCarbon::swapBuffers()
412 #ifdef WAIT_FOR_VSYNC
413 /* wait for vsync, to avoid tearing artifacts */
415 CGLSetParameter(CGLGetCurrentContext(), kCGLCPSwapInterval, &VBL);
418 GHOST_TSuccess succeeded = GHOST_kSuccess;
419 if (m_drawingContextType == GHOST_kDrawingContextTypeOpenGL) {
421 ::aglSwapBuffers(m_aglCtx);
424 succeeded = GHOST_kFailure;
430 GHOST_TSuccess GHOST_WindowCarbon::updateDrawingContext()
432 GHOST_TSuccess succeeded = GHOST_kSuccess;
433 if (m_drawingContextType == GHOST_kDrawingContextTypeOpenGL) {
435 ::aglUpdateContext(m_aglCtx);
438 succeeded = GHOST_kFailure;
444 GHOST_TSuccess GHOST_WindowCarbon::activateDrawingContext()
446 GHOST_TSuccess succeeded = GHOST_kSuccess;
447 if (m_drawingContextType == GHOST_kDrawingContextTypeOpenGL) {
449 ::aglSetCurrentContext(m_aglCtx);
450 #ifdef GHOST_DRAW_CARBON_GUTTER
451 // Restrict drawing to non-gutter area
452 ::aglEnable(m_aglCtx, AGL_BUFFER_RECT);
454 getClientBounds(bnds);
458 bnds.m_t+s_sizeRectSize,
462 GLboolean result = ::aglSetInteger(m_aglCtx, AGL_BUFFER_RECT, b);
463 #endif //GHOST_DRAW_CARBON_GUTTER
466 succeeded = GHOST_kFailure;
473 GHOST_TSuccess GHOST_WindowCarbon::installDrawingContext(GHOST_TDrawingContextType type)
475 GHOST_TSuccess success = GHOST_kFailure;
477 case GHOST_kDrawingContextTypeOpenGL:
479 if (!getValid()) break;
481 AGLPixelFormat pixelFormat;
483 pixelFormat = ::aglChoosePixelFormat(0, 0, sPreferredFormatWindow);
484 m_aglCtx = ::aglCreateContext(pixelFormat, s_firstaglCtx);
485 if (!m_aglCtx) break;
486 if (!s_firstaglCtx) s_firstaglCtx = m_aglCtx;
487 success = ::aglSetDrawable(m_aglCtx, m_grafPtr) == GL_TRUE ? GHOST_kSuccess : GHOST_kFailure;
490 //GHOST_PRINT("GHOST_WindowCarbon::installDrawingContext(): init full-screen OpenGL\n");
491 GDHandle device=::GetMainDevice();pixelFormat=::aglChoosePixelFormat(&device,1,sPreferredFormatFullScreen);
492 m_aglCtx = ::aglCreateContext(pixelFormat, 0);
493 if (!m_aglCtx) break;
494 if (!s_firstaglCtx) s_firstaglCtx = m_aglCtx;
495 //GHOST_PRINT("GHOST_WindowCarbon::installDrawingContext(): created OpenGL context\n");
496 //::CGGetActiveDisplayList(0, NULL, &m_numDisplays)
497 success = ::aglSetFullScreen(m_aglCtx, m_fullScreenWidth, m_fullScreenHeight, 75, 0) == GL_TRUE ? GHOST_kSuccess : GHOST_kFailure;
499 if (success == GHOST_kSuccess) {
500 GHOST_PRINT("GHOST_WindowCarbon::installDrawingContext(): init full-screen OpenGL succeeded\n");
503 GHOST_PRINT("GHOST_WindowCarbon::installDrawingContext(): init full-screen OpenGL failed\n");
507 ::aglDestroyPixelFormat(pixelFormat);
511 case GHOST_kDrawingContextTypeNone:
512 success = GHOST_kSuccess;
522 GHOST_TSuccess GHOST_WindowCarbon::removeDrawingContext()
524 GHOST_TSuccess success = GHOST_kFailure;
525 switch (m_drawingContextType) {
526 case GHOST_kDrawingContextTypeOpenGL:
528 aglSetCurrentContext(NULL);
529 aglSetDrawable(m_aglCtx, NULL);
530 //aglDestroyContext(m_aglCtx);
531 if (s_firstaglCtx == m_aglCtx) s_firstaglCtx = NULL;
532 success = ::aglDestroyContext(m_aglCtx) == GL_TRUE ? GHOST_kSuccess : GHOST_kFailure;
536 case GHOST_kDrawingContextTypeNone:
537 success = GHOST_kSuccess;
546 GHOST_TSuccess GHOST_WindowCarbon::invalidate()
548 GHOST_ASSERT(getValid(), "GHOST_WindowCarbon::invalidate(): window invalid")
551 ::GetPortBounds(m_grafPtr, &rect);
552 ::InvalWindowRect(m_windowRef, &rect);
556 //OSStatus status = ::CreateEvent(NULL, kEventClassWindow, kEventWindowUpdate, 0, 0, &event);
557 //GHOST_PRINT("GHOST_WindowCarbon::invalidate(): created event " << status << " \n");
558 //status = ::SetEventParameter(event, kEventParamDirectObject, typeWindowRef, sizeof(WindowRef), this);
559 //GHOST_PRINT("GHOST_WindowCarbon::invalidate(): set event parameter " << status << " \n");
560 //status = ::PostEventToQueue(::GetMainEventQueue(), event, kEventPriorityStandard);
561 //status = ::SendEventToEventTarget(event, ::GetApplicationEventTarget());
562 //GHOST_PRINT("GHOST_WindowCarbon::invalidate(): added event to queue " << status << " \n");
563 m_fullScreenDirty = true;
565 return GHOST_kSuccess;
569 void GHOST_WindowCarbon::gen2mac(const STR_String& in, Str255 out) const
571 STR_String tempStr = in;
572 int num = tempStr.Length();
573 if (num > 255) num = 255;
574 ::memcpy(out+1, tempStr.Ptr(), num);
579 void GHOST_WindowCarbon::mac2gen(const Str255 in, STR_String& out) const
582 ::memcpy(tmp, in+1, in[0]);
587 void GHOST_WindowCarbon::loadCursor(bool visible, GHOST_TStandardCursor cursor) const
589 static bool systemCursorVisible = true;
591 if (visible != systemCursorVisible) {
594 systemCursorVisible = true;
598 systemCursorVisible = false;
602 if (cursor == GHOST_kStandardCursorCustom && m_customCursor) {
603 ::SetCursor( m_customCursor );
607 #define GCMAP(ghostCursor, carbonCursor) case ghostCursor: carbon_cursor = carbonCursor; break
610 GCMAP( GHOST_kStandardCursorDefault, kThemeArrowCursor);
611 GCMAP( GHOST_kStandardCursorRightArrow, kThemeAliasArrowCursor);
612 GCMAP( GHOST_kStandardCursorLeftArrow, kThemeArrowCursor);
613 GCMAP( GHOST_kStandardCursorInfo, kThemeArrowCursor);
614 GCMAP( GHOST_kStandardCursorDestroy, kThemeArrowCursor);
615 GCMAP( GHOST_kStandardCursorHelp, kThemeArrowCursor);
616 GCMAP( GHOST_kStandardCursorCycle, kThemeArrowCursor);
617 GCMAP( GHOST_kStandardCursorSpray, kThemeArrowCursor);
618 GCMAP( GHOST_kStandardCursorWait, kThemeWatchCursor);
619 GCMAP( GHOST_kStandardCursorText, kThemeIBeamCursor);
620 GCMAP( GHOST_kStandardCursorCrosshair, kThemeCrossCursor);
621 GCMAP( GHOST_kStandardCursorUpDown, kThemeClosedHandCursor);
622 GCMAP( GHOST_kStandardCursorLeftRight, kThemeClosedHandCursor);
623 GCMAP( GHOST_kStandardCursorTopSide, kThemeArrowCursor);
624 GCMAP( GHOST_kStandardCursorBottomSide, kThemeArrowCursor);
625 GCMAP( GHOST_kStandardCursorLeftSide, kThemeResizeLeftCursor);
626 GCMAP( GHOST_kStandardCursorRightSide, kThemeResizeRightCursor);
627 GCMAP( GHOST_kStandardCursorTopLeftCorner, kThemeArrowCursor);
628 GCMAP( GHOST_kStandardCursorTopRightCorner, kThemeArrowCursor);
629 GCMAP( GHOST_kStandardCursorBottomRightCorner, kThemeArrowCursor);
630 GCMAP( GHOST_kStandardCursorBottomLeftCorner, kThemeArrowCursor);
634 ::SetThemeCursor(carbon_cursor);
639 bool GHOST_WindowCarbon::getFullScreenDirty()
641 return m_fullScreen && m_fullScreenDirty;
645 GHOST_TSuccess GHOST_WindowCarbon::setWindowCursorVisibility(bool visible)
647 if (::FrontWindow() == m_windowRef) {
648 loadCursor(visible, getCursorShape());
651 return GHOST_kSuccess;
654 GHOST_TSuccess GHOST_WindowCarbon::setWindowCursorShape(GHOST_TStandardCursor shape)
656 if (m_customCursor) {
657 delete m_customCursor;
661 if (::FrontWindow() == m_windowRef) {
662 loadCursor(getCursorVisibility(), shape);
665 return GHOST_kSuccess;
669 /** Reverse the bits in a GHOST_TUns8 */
670 static GHOST_TUns8 uns8ReverseBits(GHOST_TUns8 ch)
672 ch= ((ch>>1)&0x55) | ((ch<<1)&0xAA);
673 ch= ((ch>>2)&0x33) | ((ch<<2)&0xCC);
674 ch= ((ch>>4)&0x0F) | ((ch<<4)&0xF0);
680 /** Reverse the bits in a GHOST_TUns16 */
681 static GHOST_TUns16 uns16ReverseBits(GHOST_TUns16 shrt)
683 shrt= ((shrt>>1)&0x5555) | ((shrt<<1)&0xAAAA);
684 shrt= ((shrt>>2)&0x3333) | ((shrt<<2)&0xCCCC);
685 shrt= ((shrt>>4)&0x0F0F) | ((shrt<<4)&0xF0F0);
686 shrt= ((shrt>>8)&0x00FF) | ((shrt<<8)&0xFF00);
690 GHOST_TSuccess GHOST_WindowCarbon::setWindowCustomCursorShape(GHOST_TUns8 *bitmap, GHOST_TUns8 *mask,
691 int sizex, int sizey, int hotX, int hotY, int fg_color, int bg_color)
695 if (m_customCursor) {
696 delete m_customCursor;
700 m_customCursor = new Cursor;
701 if (!m_customCursor) return GHOST_kFailure;
703 for (y=0; y<16; y++) {
704 #if !defined(__LITTLE_ENDIAN__)
705 m_customCursor->data[y] = uns16ReverseBits((bitmap[2*y]<<0) | (bitmap[2*y+1]<<8));
706 m_customCursor->mask[y] = uns16ReverseBits((mask[2*y]<<0) | (mask[2*y+1]<<8));
708 m_customCursor->data[y] = uns16ReverseBits((bitmap[2*y+1]<<0) | (bitmap[2*y]<<8));
709 m_customCursor->mask[y] = uns16ReverseBits((mask[2*y+1]<<0) | (mask[2*y]<<8));
714 m_customCursor->hotSpot.h = hotX;
715 m_customCursor->hotSpot.v = hotY;
717 if (::FrontWindow() == m_windowRef) {
718 loadCursor(getCursorVisibility(), GHOST_kStandardCursorCustom);
721 return GHOST_kSuccess;
724 GHOST_TSuccess GHOST_WindowCarbon::setWindowCustomCursorShape(GHOST_TUns8 bitmap[16][2],
725 GHOST_TUns8 mask[16][2], int hotX, int hotY)
727 return setWindowCustomCursorShape((GHOST_TUns8*)bitmap, (GHOST_TUns8*) mask, 16, 16, hotX, hotY, 0, 1);
731 void GHOST_WindowCarbon::setMac_windowState(short value)
733 mac_windowState = value;
736 short GHOST_WindowCarbon::getMac_windowState()
738 return mac_windowState;