template<> inline EventParamType wxMacGetEventParamType<Point>() { return typeQDPoint ; }
template<> inline EventParamType wxMacGetEventParamType<Rect>() { return typeQDRectangle ; }
template<> inline EventParamType wxMacGetEventParamType<Boolean>() { return typeBoolean ; }
+template<> inline EventParamType wxMacGetEventParamType<SInt16>() { return typeSInt16 ; }
+template<> inline EventParamType wxMacGetEventParamType<SInt32>() { return typeSInt32 ; }
+template<> inline EventParamType wxMacGetEventParamType<UInt32>() { return typeUInt32 ; }
+template<> inline EventParamType wxMacGetEventParamType<RGBColor>() { return typeRGBColor ; }
#if TARGET_API_MAC_OSX
template<> inline EventParamType wxMacGetEventParamType<HICommand>() { return typeHICommand ; }
template<> inline EventParamType wxMacGetEventParamType<HIPoint>() { return typeHIPoint ; }
template<> inline EventParamType wxMacGetEventParamType<HIRect>() { return typeHIRect ; }
template<> inline EventParamType wxMacGetEventParamType<void*>() { return typeVoidPtr ; }
#endif
+template<> inline EventParamType wxMacGetEventParamType<CFDictionaryRef>() { return typeCFDictionaryRef ; }
template<> inline EventParamType wxMacGetEventParamType<Collection>() { return typeCollection ; }
template<> inline EventParamType wxMacGetEventParamType<CGContextRef>() { return typeCGContextRef ; }
/*
wxTopLevelWindowMac* wxFindWinFromMacWindow( WindowRef inWindow ) ;
wxMenu* wxFindMenuFromMacMenu(MenuRef inMenuRef) ;
+int wxMacCommandToId( UInt32 macCommandId ) ;
+UInt32 wxIdToMacCommand( int wxId ) ;
+wxMenu* wxFindMenuFromMacCommand( const HICommand &macCommandId , wxMenuItem* &item ) ;
+
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 ) ;
{
return SetData( inPartCode , inTag , sizeof( T ) , &data ) ;
}
+ template <typename T> OSStatus SetData( ResType inTag , const T *data )
+ {
+ return SetData( kControlEntireControl , inTag , sizeof( T ) , data ) ;
+ }
+ template <typename T> OSStatus SetData( ResType inTag , const T& data )
+ {
+ return SetData( kControlEntireControl , inTag , sizeof( T ) , &data ) ;
+ }
template <typename T> OSStatus GetData( ControlPartCode inPartCode , ResType inTag , T *data ) const
{
Size dummy ;
verify_noerr( GetData<T>( inPartCode , inTag , &value ) ) ;
return value ;
}
-
+ template <typename T> OSStatus GetData( ResType inTag , T *data ) const
+ {
+ Size dummy ;
+ return GetData( kControlEntireControl , inTag , sizeof( T ) , data , &dummy ) ;
+ }
+ template <typename T> T GetData( ResType inTag ) const
+ {
+ T value ;
+ verify_noerr( GetData<T>( kControlEntireControl , inTag , &value ) ) ;
+ return value ;
+ }
+
// Flash the control for the specified amount of time
virtual void Flash( ControlPartCode part , UInt32 ticks = 8 ) ;
ControlRef wxMacFindControlUnderMouse( wxTopLevelWindowMac* toplevelWindow, const Point& location , WindowRef window , ControlPartCode *outPart ) ;
+#if WORDS_BIGENDIAN
+ inline Rect* wxMacGetPictureBounds( PicHandle pict , Rect* rect )
+ {
+ *rect = (**pict).picFrame ;
+ return rect ;
+ }
+#else
+ inline Rect* wxMacGetPictureBounds( PicHandle pict , Rect* rect )
+ {
+ return QDGetPictureBounds( pict , rect ) ;
+ }
+#endif
+
#endif // wxUSE_GUI
#define wxMAC_DEFINE_PROC_GETTER( UPP , x ) \