static long gs_lastWhen = 0;
+#if TARGET_CARBON
static pascal long wxShapedMacWindowDef(short varCode, WindowRef window, SInt16 message, SInt32 param);
+#endif
// ============================================================================
// wxTopLevelWindowMac implementation
if (HasFlag(wxSTAY_ON_TOP))
wclass = kUtilityWindowClass;
+#if TARGET_CARBON
if ( HasFlag(wxFRAME_SHAPED) )
{
WindowDefSpec customWindowDefSpec;
(WindowRef*) &m_macWindow);
}
else
+#endif
{
::CreateNewWindow( wclass , attr , &theBoundsRect , (WindowRef*)&m_macWindow ) ;
}
m_macFocus = NULL ;
+#if TARGET_CARBON
if ( HasFlag(wxFRAME_SHAPED) )
{
// default shape matches the window size
wxRegion rgn(0, 0, m_width, m_height);
SetShape(rgn);
}
+#endif
}
void wxTopLevelWindowMac::MacGetPortParams(WXPOINTPTR localOrigin, WXRECTPTR clipRect, WXHWND *window , wxWindowMac** rootwin)
wxCHECK_MSG( HasFlag(wxFRAME_SHAPED), FALSE,
_T("Shaped windows must be created with the wxFRAME_SHAPED style."));
+#if TARGET_CARBON
// The empty region signifies that the shape should be removed from the
// window.
if ( region.IsEmpty() )
// Tell the window manager that the window has changed shape
ReshapeCustomWindow((WindowRef)MacGetWindowRef());
return TRUE;
+#else
+ return FALSE;
+#endif
}
// http://developer.apple.com/samplecode/Sample_Code/Human_Interface_Toolbox/Mac_OS_High_Level_Toolbox/CustomWindow.htm
// ---------------------------------------------------------------------------
-
+#if TARGET_CARBON
static void wxShapedMacWindowGetPos(WindowRef window, Rect* inRect)
{
GetWindowPortBounds(window, inRect);
return 0;
}
-
+#endif
// ---------------------------------------------------------------------------
static long gs_lastWhen = 0;
+#if TARGET_CARBON
static pascal long wxShapedMacWindowDef(short varCode, WindowRef window, SInt16 message, SInt32 param);
+#endif
// ============================================================================
// wxTopLevelWindowMac implementation
if (HasFlag(wxSTAY_ON_TOP))
wclass = kUtilityWindowClass;
+#if TARGET_CARBON
if ( HasFlag(wxFRAME_SHAPED) )
{
WindowDefSpec customWindowDefSpec;
(WindowRef*) &m_macWindow);
}
else
+#endif
{
::CreateNewWindow( wclass , attr , &theBoundsRect , (WindowRef*)&m_macWindow ) ;
}
m_macFocus = NULL ;
+#if TARGET_CARBON
if ( HasFlag(wxFRAME_SHAPED) )
{
// default shape matches the window size
wxRegion rgn(0, 0, m_width, m_height);
SetShape(rgn);
}
+#endif
}
void wxTopLevelWindowMac::MacGetPortParams(WXPOINTPTR localOrigin, WXRECTPTR clipRect, WXHWND *window , wxWindowMac** rootwin)
wxCHECK_MSG( HasFlag(wxFRAME_SHAPED), FALSE,
_T("Shaped windows must be created with the wxFRAME_SHAPED style."));
+#if TARGET_CARBON
// The empty region signifies that the shape should be removed from the
// window.
if ( region.IsEmpty() )
// Tell the window manager that the window has changed shape
ReshapeCustomWindow((WindowRef)MacGetWindowRef());
return TRUE;
+#else
+ return FALSE;
+#endif
}
// http://developer.apple.com/samplecode/Sample_Code/Human_Interface_Toolbox/Mac_OS_High_Level_Toolbox/CustomWindow.htm
// ---------------------------------------------------------------------------
-
+#if TARGET_CARBON
static void wxShapedMacWindowGetPos(WindowRef window, Rect* inRect)
{
GetWindowPortBounds(window, inRect);
return 0;
}
-
+#endif
// ---------------------------------------------------------------------------