git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20542
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
static long gs_lastWhen = 0;
static long gs_lastWhen = 0;
static pascal long wxShapedMacWindowDef(short varCode, WindowRef window, SInt16 message, SInt32 param);
static pascal long wxShapedMacWindowDef(short varCode, WindowRef window, SInt16 message, SInt32 param);
// ============================================================================
// wxTopLevelWindowMac implementation
// ============================================================================
// wxTopLevelWindowMac implementation
if (HasFlag(wxSTAY_ON_TOP))
wclass = kUtilityWindowClass;
if (HasFlag(wxSTAY_ON_TOP))
wclass = kUtilityWindowClass;
if ( HasFlag(wxFRAME_SHAPED) )
{
WindowDefSpec customWindowDefSpec;
if ( HasFlag(wxFRAME_SHAPED) )
{
WindowDefSpec customWindowDefSpec;
(WindowRef*) &m_macWindow);
}
else
(WindowRef*) &m_macWindow);
}
else
{
::CreateNewWindow( wclass , attr , &theBoundsRect , (WindowRef*)&m_macWindow ) ;
}
{
::CreateNewWindow( wclass , attr , &theBoundsRect , (WindowRef*)&m_macWindow ) ;
}
if ( HasFlag(wxFRAME_SHAPED) )
{
// default shape matches the window size
wxRegion rgn(0, 0, m_width, m_height);
SetShape(rgn);
}
if ( HasFlag(wxFRAME_SHAPED) )
{
// default shape matches the window size
wxRegion rgn(0, 0, m_width, m_height);
SetShape(rgn);
}
}
void wxTopLevelWindowMac::MacGetPortParams(WXPOINTPTR localOrigin, WXRECTPTR clipRect, WXHWND *window , wxWindowMac** rootwin)
}
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."));
wxCHECK_MSG( HasFlag(wxFRAME_SHAPED), FALSE,
_T("Shaped windows must be created with the wxFRAME_SHAPED style."));
// The empty region signifies that the shape should be removed from the
// window.
if ( region.IsEmpty() )
// 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;
// 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
// ---------------------------------------------------------------------------
// http://developer.apple.com/samplecode/Sample_Code/Human_Interface_Toolbox/Mac_OS_High_Level_Toolbox/CustomWindow.htm
// ---------------------------------------------------------------------------
static void wxShapedMacWindowGetPos(WindowRef window, Rect* inRect)
{
GetWindowPortBounds(window, inRect);
static void wxShapedMacWindowGetPos(WindowRef window, Rect* inRect)
{
GetWindowPortBounds(window, inRect);
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
static long gs_lastWhen = 0;
static long gs_lastWhen = 0;
static pascal long wxShapedMacWindowDef(short varCode, WindowRef window, SInt16 message, SInt32 param);
static pascal long wxShapedMacWindowDef(short varCode, WindowRef window, SInt16 message, SInt32 param);
// ============================================================================
// wxTopLevelWindowMac implementation
// ============================================================================
// wxTopLevelWindowMac implementation
if (HasFlag(wxSTAY_ON_TOP))
wclass = kUtilityWindowClass;
if (HasFlag(wxSTAY_ON_TOP))
wclass = kUtilityWindowClass;
if ( HasFlag(wxFRAME_SHAPED) )
{
WindowDefSpec customWindowDefSpec;
if ( HasFlag(wxFRAME_SHAPED) )
{
WindowDefSpec customWindowDefSpec;
(WindowRef*) &m_macWindow);
}
else
(WindowRef*) &m_macWindow);
}
else
{
::CreateNewWindow( wclass , attr , &theBoundsRect , (WindowRef*)&m_macWindow ) ;
}
{
::CreateNewWindow( wclass , attr , &theBoundsRect , (WindowRef*)&m_macWindow ) ;
}
if ( HasFlag(wxFRAME_SHAPED) )
{
// default shape matches the window size
wxRegion rgn(0, 0, m_width, m_height);
SetShape(rgn);
}
if ( HasFlag(wxFRAME_SHAPED) )
{
// default shape matches the window size
wxRegion rgn(0, 0, m_width, m_height);
SetShape(rgn);
}
}
void wxTopLevelWindowMac::MacGetPortParams(WXPOINTPTR localOrigin, WXRECTPTR clipRect, WXHWND *window , wxWindowMac** rootwin)
}
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."));
wxCHECK_MSG( HasFlag(wxFRAME_SHAPED), FALSE,
_T("Shaped windows must be created with the wxFRAME_SHAPED style."));
// The empty region signifies that the shape should be removed from the
// window.
if ( region.IsEmpty() )
// 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;
// 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
// ---------------------------------------------------------------------------
// http://developer.apple.com/samplecode/Sample_Code/Human_Interface_Toolbox/Mac_OS_High_Level_Toolbox/CustomWindow.htm
// ---------------------------------------------------------------------------
static void wxShapedMacWindowGetPos(WindowRef window, Rect* inRect)
{
GetWindowPortBounds(window, inRect);
static void wxShapedMacWindowGetPos(WindowRef window, Rect* inRect)
{
GetWindowPortBounds(window, inRect);
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------