moving Carbon Event Class out of USE_GUI

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31100 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2004-12-21 13:50:28 +00:00
parent 689b42ee55
commit 885fb02fa1

View File

@@ -166,43 +166,6 @@ WXDLLEXPORT wxString wxMacFindFolder(short vRefNum,
OSType folderType,
Boolean createFolder);
#if wxUSE_GUI
GWorldPtr wxMacCreateGWorld( int width , int height , int depth ) ;
void wxMacDestroyGWorld( GWorldPtr gw ) ;
PicHandle wxMacCreatePict( GWorldPtr gw , GWorldPtr mask = NULL ) ;
CIconHandle wxMacCreateCIcon(GWorldPtr image , GWorldPtr mask , short dstDepth , short iconSize ) ;
void wxMacSetColorTableEntry( CTabHandle newColors , int index , int red , int green , int blue ) ;
CTabHandle wxMacCreateColorTable( int numColors ) ;
void wxMacCreateBitmapButton( ControlButtonContentInfo*info , const wxBitmap& bitmap , int forceType = 0 ) ;
#define MAC_WXCOLORREF(a) (*((RGBColor*)&(a)))
#define MAC_WXHBITMAP(a) (GWorldPtr(a))
#define MAC_WXHMETAFILE(a) (PicHandle(a))
#define MAC_WXHICON(a) (CIconHandle(a))
#define MAC_WXHCURSOR(a) (CursHandle(a))
#define MAC_WXHRGN(a) (RgnHandle(a))
#define MAC_WXHWND(a) (WindowPtr(a))
#define MAC_WXRECPTR(a) ((Rect*)a)
#define MAC_WXPOINTPTR(a) ((Point*)a)
#define MAC_WXHMENU(a) ((MenuHandle)a)
struct wxOpaqueWindowRef
{
wxOpaqueWindowRef( WindowRef ref ) { m_data = ref ; }
operator WindowRef() { return m_data ; }
private :
WindowRef m_data ;
} ;
wxWindow * wxFindControlFromMacControl(ControlRef inControl ) ;
wxTopLevelWindowMac* wxFindWinFromMacWindow( WindowRef inWindow ) ;
wxMenu* wxFindMenuFromMacMenu(MenuRef inMenuRef) ;
extern wxWindow* g_MacLastWindow ;
pascal OSStatus wxMacTopLevelMouseEventHandler( EventHandlerCallRef handler , EventRef event , void *data ) ;
Rect wxMacGetBoundsForControl( wxWindow* window , const wxPoint& pos , const wxSize &size , bool adjustForOrigin = true ) ;
template<typename T> EventParamType wxMacGetEventParamType() { wxFAIL_MSG( wxT("Unknown Param Type") ) ; return 0 ; }
template<> inline EventParamType wxMacGetEventParamType<RgnHandle>() { return typeQDRgnHandle ; }
template<> inline EventParamType wxMacGetEventParamType<ControlRef>() { return typeControlRef ; }
@@ -222,12 +185,12 @@ template<> inline EventParamType wxMacGetEventParamType<void*>() { return typeVo
template<> inline EventParamType wxMacGetEventParamType<Collection>() { return typeCollection ; }
template<> inline EventParamType wxMacGetEventParamType<CGContextRef>() { return typeCGContextRef ; }
/*
These are ambiguous
template<> EventParamType wxMacGetEventParamType<GrafPtr>() { return typeGrafPtr ; }
template<> EventParamType wxMacGetEventParamType<OSStatus>() { return typeOSStatus ; }
template<> EventParamType wxMacGetEventParamType<CFIndex>() { return typeCFIndex ; }
template<> EventParamType wxMacGetEventParamType<GWorldPtr>() { return typeGWorldPtr ; }
*/
These are ambiguous
template<> EventParamType wxMacGetEventParamType<GrafPtr>() { return typeGrafPtr ; }
template<> EventParamType wxMacGetEventParamType<OSStatus>() { return typeOSStatus ; }
template<> EventParamType wxMacGetEventParamType<CFIndex>() { return typeCFIndex ; }
template<> EventParamType wxMacGetEventParamType<GWorldPtr>() { return typeGWorldPtr ; }
*/
class wxMacCarbonEvent
{
@@ -343,6 +306,43 @@ protected :
bool m_release ;
} ;
#if wxUSE_GUI
GWorldPtr wxMacCreateGWorld( int width , int height , int depth ) ;
void wxMacDestroyGWorld( GWorldPtr gw ) ;
PicHandle wxMacCreatePict( GWorldPtr gw , GWorldPtr mask = NULL ) ;
CIconHandle wxMacCreateCIcon(GWorldPtr image , GWorldPtr mask , short dstDepth , short iconSize ) ;
void wxMacSetColorTableEntry( CTabHandle newColors , int index , int red , int green , int blue ) ;
CTabHandle wxMacCreateColorTable( int numColors ) ;
void wxMacCreateBitmapButton( ControlButtonContentInfo*info , const wxBitmap& bitmap , int forceType = 0 ) ;
#define MAC_WXCOLORREF(a) (*((RGBColor*)&(a)))
#define MAC_WXHBITMAP(a) (GWorldPtr(a))
#define MAC_WXHMETAFILE(a) (PicHandle(a))
#define MAC_WXHICON(a) (CIconHandle(a))
#define MAC_WXHCURSOR(a) (CursHandle(a))
#define MAC_WXHRGN(a) (RgnHandle(a))
#define MAC_WXHWND(a) (WindowPtr(a))
#define MAC_WXRECPTR(a) ((Rect*)a)
#define MAC_WXPOINTPTR(a) ((Point*)a)
#define MAC_WXHMENU(a) ((MenuHandle)a)
struct wxOpaqueWindowRef
{
wxOpaqueWindowRef( WindowRef ref ) { m_data = ref ; }
operator WindowRef() { return m_data ; }
private :
WindowRef m_data ;
} ;
wxWindow * wxFindControlFromMacControl(ControlRef inControl ) ;
wxTopLevelWindowMac* wxFindWinFromMacWindow( WindowRef inWindow ) ;
wxMenu* wxFindMenuFromMacMenu(MenuRef inMenuRef) ;
extern wxWindow* g_MacLastWindow ;
pascal OSStatus wxMacTopLevelMouseEventHandler( EventHandlerCallRef handler , EventRef event , void *data ) ;
Rect wxMacGetBoundsForControl( wxWindow* window , const wxPoint& pos , const wxSize &size , bool adjustForOrigin = true ) ;
class wxMacControl
{
public :