removing dependancy on mac headers from public wx headers

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13368 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2002-01-04 17:13:39 +00:00
parent fd1bc7fcb3
commit 5273bf2fd3
35 changed files with 244 additions and 236 deletions

View File

@@ -195,10 +195,10 @@ public:
void* m_devNames; void* m_devNames;
#elif defined( __WXMAC__ ) #elif defined( __WXMAC__ )
#if TARGET_CARBON #if TARGET_CARBON
PMPageFormat m_macPageFormat ; void* m_macPageFormat ;
PMPrintSettings m_macPrintSettings ; void* m_macPrintSettings ;
#else #else
THPrint m_macPrintInfo ; void* m_macPrintInfo ;
#endif #endif
#endif #endif

View File

@@ -12,6 +12,7 @@
#ifndef _UMA_AGA_H #ifndef _UMA_AGA_H
#define _UMA_AGA_H #define _UMA_AGA_H
/*
ControlHandle AGANewControl(WindowPtr owningWindow, ControlHandle AGANewControl(WindowPtr owningWindow,
const Rect * boundsRect, const Rect * boundsRect,
ConstStr255Param controlTitle, ConstStr255Param controlTitle,
@@ -85,28 +86,8 @@ void AGAApplyThemeBackground (ThemeBackgroundKind inKind,
void AGAMoveControl( ControlHandle inControl , short x , short y ) ; void AGAMoveControl( ControlHandle inControl , short x , short y ) ;
void AGASizeControl( ControlHandle inControl , short x , short y ) ; void AGASizeControl( ControlHandle inControl , short x , short y ) ;
class AGAPortHelper */
{
public :
AGAPortHelper( GrafPtr newport) ;
AGAPortHelper() ;
~AGAPortHelper() ;
void Setup( GrafPtr newport ) ;
void Clear() ;
bool IsCleared() { return m_clip == NULL ; }
GrafPtr GetCurrentPort() { return m_currentPort ; }
private :
GrafPtr m_currentPort ;
GrafPtr m_oldPort ;
RgnHandle m_clip ;
ThemeDrawingState m_drawingState ;
short m_textFont ;
short m_textSize ;
short m_textStyle ;
short m_textMode ;
} ;
#endif #endif

View File

@@ -93,8 +93,8 @@ public:
static long sm_lastMessageTime; static long sm_lastMessageTime;
static wxWindow* s_captureWindow ; static wxWindow* s_captureWindow ;
static int s_lastMouseDown ; // 0 = none , 1 = left , 2 = right static int s_lastMouseDown ; // 0 = none , 1 = left , 2 = right
static RgnHandle s_macCursorRgn ; static WXHRGN s_macCursorRgn ;
EventRecord* m_macCurrentEvent ; WXEVENTREF m_macCurrentEvent ;
int m_nCmdShow; int m_nCmdShow;
@@ -120,9 +120,9 @@ public :
static bool s_macHasDialogManager ; static bool s_macHasDialogManager ;
static long s_macDialogManagerVersion ; static long s_macDialogManagerVersion ;
RgnHandle m_macCursorRgn ; WXHRGN m_macCursorRgn ;
RgnHandle m_macSleepRgn ; WXHRGN m_macSleepRgn ;
RgnHandle m_macHelpRgn ; WXHRGN m_macHelpRgn ;
virtual void MacSuspend( bool convertClipboard ) ; virtual void MacSuspend( bool convertClipboard ) ;
virtual void MacResume( bool convertClipboard ) ; virtual void MacResume( bool convertClipboard ) ;
@@ -133,25 +133,25 @@ public :
// event main methods // event main methods
void MacDoOneEvent() ; void MacDoOneEvent() ;
void MacHandleOneEvent( EventRecord *ev ) ; void MacHandleOneEvent( WXEVENTREF ev ) ;
EventRecord* MacGetCurrentEvent() { return m_macCurrentEvent ; } WXEVENTREF MacGetCurrentEvent() { return m_macCurrentEvent ; }
// primary events // primary events
virtual void MacHandleMouseDownEvent( EventRecord *ev ) ; virtual void MacHandleMouseDownEvent( WXEVENTREF ev ) ;
virtual void MacHandleMouseUpEvent( EventRecord *ev ) ; virtual void MacHandleMouseUpEvent( WXEVENTREF ev ) ;
virtual void MacHandleActivateEvent( EventRecord *ev ) ; virtual void MacHandleActivateEvent( WXEVENTREF ev ) ;
virtual void MacHandleUpdateEvent( EventRecord *ev ) ; virtual void MacHandleUpdateEvent( WXEVENTREF ev ) ;
virtual void MacHandleKeyDownEvent( EventRecord *ev ) ; virtual void MacHandleKeyDownEvent( WXEVENTREF ev ) ;
virtual void MacHandleKeyUpEvent( EventRecord *ev ) ; virtual void MacHandleKeyUpEvent( WXEVENTREF ev ) ;
virtual void MacHandleDiskEvent( EventRecord *ev ) ; virtual void MacHandleDiskEvent( WXEVENTREF ev ) ;
virtual void MacHandleOSEvent( EventRecord *ev ) ; virtual void MacHandleOSEvent( WXEVENTREF ev ) ;
virtual void MacHandleHighLevelEvent( EventRecord *ev ) ; virtual void MacHandleHighLevelEvent( WXEVENTREF ev ) ;
virtual void MacHandleMenuSelect( int menuid , int menuitem ) ; virtual void MacHandleMenuSelect( int menuid , int menuitem ) ;
virtual OSErr MacHandleAEODoc(const AppleEvent *event , AppleEvent *reply) ; virtual short MacHandleAEODoc(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
virtual OSErr MacHandleAEPDoc(const AppleEvent *event , AppleEvent *reply) ; virtual short MacHandleAEPDoc(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
virtual OSErr MacHandleAEOApp(const AppleEvent *event , AppleEvent *reply) ; virtual short MacHandleAEOApp(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
virtual OSErr MacHandleAEQuit(const AppleEvent *event , AppleEvent *reply) ; virtual short MacHandleAEQuit(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ;
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
}; };
@@ -172,17 +172,17 @@ void wxMacConvertToPC( unsigned char *p ) ;
wxString wxMacMakePCStringFromMac( const char * p ) ; wxString wxMacMakePCStringFromMac( const char * p ) ;
// converts this string into a pascal with optional pc 2 mac encoding // converts this string into a pascal with optional pc 2 mac encoding
void wxMacStringToPascal( const char * from , StringPtr to , bool pc2macEncoding ) ; void wxMacStringToPascal( const char * from , unsigned char* to , bool pc2macEncoding ) ;
// converts this string into a pascal with pc 2 mac encoding if s_macDefaultEncodingIsPC // converts this string into a pascal with pc 2 mac encoding if s_macDefaultEncodingIsPC
inline void wxMacStringToPascal( const char * from , StringPtr to ) inline void wxMacStringToPascal( const char * from , unsigned char* to )
{ wxMacStringToPascal( from , to , wxApp::s_macDefaultEncodingIsPC ) ; } { wxMacStringToPascal( from , to , wxApp::s_macDefaultEncodingIsPC ) ; }
// converts this string into a pascal with optional mac 2 pc encoding // converts this string into a pascal with optional mac 2 pc encoding
wxString wxMacMakeStringFromPascal( StringPtr from , bool mac2pcEncoding ) ; wxString wxMacMakeStringFromPascal( unsigned char* from , bool mac2pcEncoding ) ;
// converts this pascal string into a wxString with pc 2 mac encoding if s_macDefaultEncodingIsPC // converts this pascal string into a wxString with pc 2 mac encoding if s_macDefaultEncodingIsPC
inline wxString wxMacMakeStringFromPascal( StringPtr from ) inline wxString wxMacMakeStringFromPascal( unsigned char* from )
{ return wxMacMakeStringFromPascal( from , wxApp::s_macDefaultEncodingIsPC ) ; } { return wxMacMakeStringFromPascal( from , wxApp::s_macDefaultEncodingIsPC ) ; }
// converts this c string into a wxString with optional mac 2 pc encoding // converts this c string into a wxString with optional mac 2 pc encoding

View File

@@ -27,13 +27,6 @@ class WXDLLEXPORT wxIcon;
class WXDLLEXPORT wxCursor; class WXDLLEXPORT wxCursor;
class WXDLLEXPORT wxImage; class WXDLLEXPORT wxImage;
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 ) ;
// A mask is a mono bitmap used for drawing bitmaps // A mask is a mono bitmap used for drawing bitmaps
// transparently. // transparently.
class WXDLLEXPORT wxMask: public wxObject class WXDLLEXPORT wxMask: public wxObject
@@ -88,10 +81,10 @@ public:
wxPalette m_bitmapPalette; wxPalette m_bitmapPalette;
int m_quality; int m_quality;
int m_bitmapType ; int m_bitmapType ;
PicHandle m_hPict ; WXHMETAFILE m_hPict ;
WXHBITMAP m_hBitmap; WXHBITMAP m_hBitmap;
WXHICON m_hIcon ; WXHICON m_hIcon ;
wxMask * m_bitmapMask; // Optional mask wxMask * m_bitmapMask; // Optional mask
}; };
@@ -206,7 +199,7 @@ public:
void SetHICON(WXHICON ico); void SetHICON(WXHICON ico);
inline WXHICON GetHICON() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_hIcon : 0); } inline WXHICON GetHICON() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_hIcon : 0); }
PicHandle GetPict() const; WXHMETAFILE GetPict() const;
bool FreeResource(bool force = FALSE); bool FreeResource(bool force = FALSE);
}; };

View File

@@ -29,28 +29,6 @@ typedef enum
kwxMacBrushThemeBackground kwxMacBrushThemeBackground
} wxMacBrushKind ; } wxMacBrushKind ;
class WXDLLEXPORT wxBrushRefData: public wxGDIRefData
{
friend class WXDLLEXPORT wxBrush;
public:
wxBrushRefData();
wxBrushRefData(const wxBrushRefData& data);
~wxBrushRefData();
protected:
wxMacBrushKind m_macBrushKind ;
int m_style;
wxBitmap m_stipple ;
wxColour m_colour;
ThemeBrush m_macThemeBrush ;
ThemeBackgroundKind m_macThemeBackground ;
Rect m_macThemeBackgroundExtent ;
};
#define M_BRUSHDATA ((wxBrushRefData *)m_refData)
// Brush // Brush
class WXDLLEXPORT wxBrush: public wxGDIObject class WXDLLEXPORT wxBrush: public wxGDIObject
{ {
@@ -58,7 +36,7 @@ class WXDLLEXPORT wxBrush: public wxGDIObject
public: public:
wxBrush(); wxBrush();
wxBrush(ThemeBrush macThemeBrush ) ; wxBrush(short macThemeBrush ) ;
wxBrush(const wxColour& col, int style); wxBrush(const wxColour& col, int style);
wxBrush(const wxBitmap& stipple); wxBrush(const wxBitmap& stipple);
inline wxBrush(const wxBrush& brush) { Ref(brush); } inline wxBrush(const wxBrush& brush) { Ref(brush); }
@@ -68,20 +46,20 @@ public:
virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) ; virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
virtual void SetStyle(int style) ; virtual void SetStyle(int style) ;
virtual void SetStipple(const wxBitmap& stipple) ; virtual void SetStipple(const wxBitmap& stipple) ;
virtual void SetMacTheme(ThemeBrush macThemeBrush) ; virtual void SetMacTheme(short macThemeBrush) ;
virtual void SetMacThemeBackground(ThemeBackgroundKind macThemeBackground , const Rect &extent) ; virtual void SetMacThemeBackground(unsigned long macThemeBackground , WXRECTPTR extent) ;
inline wxBrush& operator = (const wxBrush& brush) { if (*this == brush) return (*this); Ref(brush); return *this; } inline wxBrush& operator = (const wxBrush& brush) { if (*this == brush) return (*this); Ref(brush); return *this; }
inline bool operator == (const wxBrush& brush) { return m_refData == brush.m_refData; } inline bool operator == (const wxBrush& brush) { return m_refData == brush.m_refData; }
inline bool operator != (const wxBrush& brush) { return m_refData != brush.m_refData; } inline bool operator != (const wxBrush& brush) { return m_refData != brush.m_refData; }
inline wxMacBrushKind MacGetBrushKind() const { return (M_BRUSHDATA ? M_BRUSHDATA->m_macBrushKind : kwxMacBrushColour); }; wxMacBrushKind MacGetBrushKind() const ;
ThemeBackgroundKind GetMacThemeBackground(Rect *extent) const ; unsigned long GetMacThemeBackground(WXRECTPTR extent) const ;
inline ThemeBrush GetMacTheme() const { return (M_BRUSHDATA ? ( M_BRUSHDATA->m_macBrushKind == kwxMacBrushTheme ? M_BRUSHDATA->m_macThemeBrush : kThemeBrushBlack) : kThemeBrushBlack); }; short GetMacTheme() const ;
inline wxColour& GetColour() const { return (M_BRUSHDATA ? M_BRUSHDATA->m_colour : wxNullColour); }; wxColour& GetColour() const ;
inline int GetStyle() const { return (M_BRUSHDATA ? M_BRUSHDATA->m_style : 0); }; int GetStyle() const ;
inline wxBitmap *GetStipple() const { return (M_BRUSHDATA ? & M_BRUSHDATA->m_stipple : 0); }; wxBitmap *GetStipple() const ;
virtual bool Ok() const { return (m_refData != NULL) ; } virtual bool Ok() const { return (m_refData != NULL) ; }

View File

@@ -42,7 +42,7 @@ class WXDLLEXPORT wxButton: public wxButtonBase
const wxValidator& validator = wxDefaultValidator, const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr); const wxString& name = wxButtonNameStr);
virtual void MacHandleControlClick( ControlHandle control , SInt16 controlpart ) ; virtual void MacHandleControlClick( WXWidget control , short controlpart ) ;
static wxSize GetDefaultSize(); static wxSize GetDefaultSize();
virtual void SetDefault(); virtual void SetDefault();

View File

@@ -44,7 +44,7 @@ class WXDLLEXPORT wxCheckBox: public wxControl
const wxString& name = wxCheckBoxNameStr); const wxString& name = wxCheckBoxNameStr);
virtual void SetValue(bool); virtual void SetValue(bool);
virtual bool GetValue() const ; virtual bool GetValue() const ;
virtual void MacHandleControlClick( ControlHandle control , SInt16 controlpart ) ; virtual void MacHandleControlClick( WXWidget control , wxInt16 controlpart ) ;
virtual void Command(wxCommandEvent& event); virtual void Command(wxCommandEvent& event);
}; };

View File

@@ -64,7 +64,7 @@ class WXDLLEXPORT wxChoice: public wxChoiceBase
virtual int FindString(const wxString& s) const; virtual int FindString(const wxString& s) const;
virtual wxString GetString(int n) const ; virtual wxString GetString(int n) const ;
virtual void SetString( int , const wxString& s ) ; virtual void SetString( int , const wxString& s ) ;
void MacHandleControlClick( ControlHandle control , SInt16 controlpart ) ; void MacHandleControlClick( WXWidget control , wxInt16 controlpart ) ;
/* /*
virtual void Append(const wxString& item); virtual void Append(const wxString& item);
@@ -78,7 +78,7 @@ class WXDLLEXPORT wxChoice: public wxChoiceBase
// Mac specific // Mac specific
virtual void Command(wxCommandEvent& event); virtual void Command(wxCommandEvent& event);
void MacHandleControlClick( ControlHandle control , SInt16 controlpart ) ; void MacHandleControlClick( WXWidget control , wxInt16 controlpart ) ;
virtual inline int GetColumns() const { return 1 ; }; virtual inline int GetColumns() const { return 1 ; };
*/ */
@@ -94,7 +94,7 @@ protected:
wxArrayString m_strings; wxArrayString m_strings;
wxChoiceDataArray m_datas ; wxChoiceDataArray m_datas ;
MenuHandle m_macPopUpMenuHandle ; WXHMENU m_macPopUpMenuHandle ;
}; };
#endif #endif

View File

@@ -86,7 +86,7 @@ private:
public: public:
WXCOLORREF m_pixel ; WXCOLORREF m_pixel ;
void Set( WXCOLORREF color ) { m_pixel = color ; m_red = m_pixel.red>>8 ;m_blue = m_pixel.blue>>8 ;m_green = m_pixel.green>>8 ;} void Set( const WXCOLORREF* color ) ;
private: private:
DECLARE_DYNAMIC_CLASS(wxColour) DECLARE_DYNAMIC_CLASS(wxColour)

View File

@@ -78,10 +78,10 @@ class WXDLLEXPORT wxComboBox: public wxChoice
virtual void Remove(long from, long to); virtual void Remove(long from, long to);
virtual void SetSelection(long from, long to); virtual void SetSelection(long from, long to);
virtual void SetEditable(bool editable); virtual void SetEditable(bool editable);
void MacHandleControlClick( ControlHandle control , SInt16 controlpart ) ; void MacHandleControlClick( WXWidget control , wxInt16 controlpart ) ;
protected: protected:
int m_noStrings; int m_noStrings;
MenuHandle m_macPopUpMenuHandle ; WXHMENU m_macPopUpMenuHandle ;
}; };
#endif #endif

View File

@@ -59,17 +59,17 @@ public:
virtual bool Show(bool show = TRUE) ; virtual bool Show(bool show = TRUE) ;
virtual void MacRedrawControl () ; virtual void MacRedrawControl () ;
virtual void MacHandleControlClick( ControlHandle control , SInt16 controlpart ) ; virtual void MacHandleControlClick( WXWidget control , short controlpart ) ;
virtual void MacPreControlCreate( wxWindow *parent, wxWindowID id, wxString label , virtual void MacPreControlCreate( wxWindow *parent, wxWindowID id, wxString label ,
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, long style, const wxSize& size, long style,
const wxValidator& validator, const wxValidator& validator,
const wxString& name , const wxString& name ,
Rect *outBounds , WXRECTPTR outBounds ,
StringPtr maclabel ) ; unsigned char* maclabel ) ;
virtual void MacPostControlCreate() ; virtual void MacPostControlCreate() ;
virtual void MacAdjustControlRect() ; virtual void MacAdjustControlRect() ;
virtual ControlHandle MacGetContainerForEmbedding() ; virtual WXWidget MacGetContainerForEmbedding() ;
virtual void MacSuperChangedPosition() ; virtual void MacSuperChangedPosition() ;
virtual void MacSuperEnabled( bool enabled ) ; virtual void MacSuperEnabled( bool enabled ) ;
virtual void MacSuperShown( bool show ) ; virtual void MacSuperShown( bool show ) ;
@@ -80,7 +80,7 @@ public:
virtual void OnMouseEvent( wxMouseEvent &event ) ; virtual void OnMouseEvent( wxMouseEvent &event ) ;
virtual void OnPaint(wxPaintEvent& event) ; virtual void OnPaint(wxPaintEvent& event) ;
virtual void Refresh(bool eraseBack = TRUE, const wxRect *rect = NULL) ; virtual void Refresh(bool eraseBack = TRUE, const wxRect *rect = NULL) ;
ControlHandle GetMacControl() { return m_macControl ;} WXWidget GetMacControl() { return m_macControl ;}
#if WXWIN_COMPATIBILITY #if WXWIN_COMPATIBILITY
virtual void SetButtonColour(const wxColour& WXUNUSED(col)) { } virtual void SetButtonColour(const wxColour& WXUNUSED(col)) { }
@@ -102,7 +102,7 @@ protected:
protected: protected:
// For controls like radiobuttons which are really composite // For controls like radiobuttons which are really composite
ControlHandle m_macControl ; WXWidget m_macControl ;
bool m_macControlIsShown ; bool m_macControlIsShown ;
wxList m_subControls; wxList m_subControls;
int m_macHorizontalBorder ; int m_macHorizontalBorder ;
@@ -123,8 +123,8 @@ private:
inline void wxControl::SetButtonFont(const wxFont& font) { SetFont(font); } inline void wxControl::SetButtonFont(const wxFont& font) { SetFont(font); }
#endif // WXWIN_COMPATIBILITY #endif // WXWIN_COMPATIBILITY
wxControl *wxFindControlFromMacControl(ControlHandle inControl ) ; wxControl *wxFindControlFromMacControl(WXWidget inControl ) ;
void wxAssociateControlWithMacControl(ControlHandle inControl, wxControl *control) ; void wxAssociateControlWithMacControl(WXWidget inControl, wxControl *control) ;
void wxRemoveMacControlAssociation(wxControl *control) ; void wxRemoveMacControlAssociation(wxControl *control) ;
#endif #endif

View File

@@ -15,7 +15,7 @@
class wxDataFormat class wxDataFormat
{ {
public: public:
typedef OSType NativeFormat; typedef unsigned long NativeFormat;
wxDataFormat(); wxDataFormat();
wxDataFormat(wxDataFormatId vType); wxDataFormat(wxDataFormatId vType);

View File

@@ -21,7 +21,6 @@
#include "wx/icon.h" #include "wx/icon.h"
#include "wx/font.h" #include "wx/font.h"
#include "wx/gdicmn.h" #include "wx/gdicmn.h"
#include "wx/mac/aga.h"
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// constants // constants
@@ -44,19 +43,11 @@
extern int wxPageNumber; extern int wxPageNumber;
class wxMacPortStateHelper ;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// wxDC // wxDC
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
class WXDLLEXPORT wxMacPortSetter
{
public :
wxMacPortSetter( const wxDC* dc ) ;
~wxMacPortSetter() ;
private :
AGAPortHelper m_ph ;
} ;
class WXDLLEXPORT wxDC: public wxDCBase class WXDLLEXPORT wxDC: public wxDCBase
{ {
DECLARE_DYNAMIC_CLASS(wxDC) DECLARE_DYNAMIC_CLASS(wxDC)
@@ -180,20 +171,20 @@ class WXDLLEXPORT wxDC: public wxDCBase
{ {
long new_x = x - m_logicalOriginX; long new_x = x - m_logicalOriginX;
if (new_x > 0) if (new_x > 0)
return (wxCoord)((double)(new_x) * m_scaleX + 0.5) * m_signX + m_deviceOriginX + m_macLocalOrigin.h ; return (wxCoord)((double)(new_x) * m_scaleX + 0.5) * m_signX + m_deviceOriginX + m_macLocalOrigin.x ;
else else
return (wxCoord)((double)(new_x) * m_scaleX - 0.5) * m_signX + m_deviceOriginX + m_macLocalOrigin.h ; return (wxCoord)((double)(new_x) * m_scaleX - 0.5) * m_signX + m_deviceOriginX + m_macLocalOrigin.x ;
} }
wxCoord YLOG2DEVMAC(wxCoord y) const wxCoord YLOG2DEVMAC(wxCoord y) const
{ {
long new_y = y - m_logicalOriginY ; long new_y = y - m_logicalOriginY ;
if (new_y > 0) if (new_y > 0)
return (wxCoord)((double)(new_y) * m_scaleY + 0.5) * m_signY + m_deviceOriginY + m_macLocalOrigin.v ; return (wxCoord)((double)(new_y) * m_scaleY + 0.5) * m_signY + m_deviceOriginY + m_macLocalOrigin.y ;
else else
return (wxCoord)((double)(new_y) * m_scaleY - 0.5) * m_signY + m_deviceOriginY + m_macLocalOrigin.v ; return (wxCoord)((double)(new_y) * m_scaleY - 0.5) * m_signY + m_deviceOriginY + m_macLocalOrigin.y ;
} }
RgnHandle MacGetCurrentClipRgn() { return m_macCurrentClipRgn ; } WXHRGN MacGetCurrentClipRgn() { return m_macCurrentClipRgn ; }
static void MacSetupBackgroundForCurrentPort(const wxBrush& background ) ; static void MacSetupBackgroundForCurrentPort(const wxBrush& background ) ;
// //
@@ -269,8 +260,8 @@ protected:
// Begin implementation for Mac // Begin implementation for Mac
public: public:
GrafPtr m_macPort ; WXHDC m_macPort ;
GWorldPtr m_macMask ; WXHBITMAP m_macMask ;
// in order to preserve the const inheritance of the virtual functions, we have to // in order to preserve the const inheritance of the virtual functions, we have to
// use mutable variables starting from CWPro 5 // use mutable variables starting from CWPro 5
@@ -283,10 +274,10 @@ protected:
mutable bool m_macPenInstalled ; mutable bool m_macPenInstalled ;
mutable bool m_macBrushInstalled ; mutable bool m_macBrushInstalled ;
RgnHandle m_macBoundaryClipRgn ; WXHRGN m_macBoundaryClipRgn ;
RgnHandle m_macCurrentClipRgn ; WXHRGN m_macCurrentClipRgn ;
Point m_macLocalOrigin ; wxPoint m_macLocalOrigin ;
void MacSetupPort( AGAPortHelper* ph ) const ; void MacSetupPort( wxMacPortStateHelper* ph ) const ;
}; };
#endif #endif

View File

@@ -36,14 +36,14 @@ class WXDLLEXPORT wxPrinterDC: public wxDC
protected : protected :
#if TARGET_CARBON #if TARGET_CARBON
#if PM_USE_SESSION_APIS #if PM_USE_SESSION_APIS
PMPrintSession m_macPrintSession; void* m_macPrintSession;
#else #else
PMPrintContext m_macPrintPort ; void* m_macPrintPort ;
#endif #endif
#else #else
TPPrPort m_macPrintPort ; void* m_macPrintPort ;
#endif #endif
wxPrintData m_printData ; wxPrintData m_printData ;
#endif // wxUSE_PRINTING_ARCHITECTURE #endif // wxUSE_PRINTING_ARCHITECTURE
}; };

View File

@@ -61,10 +61,10 @@ class WXDLLEXPORT wxDropTarget: public wxDropTargetBase
virtual bool GetData(); virtual bool GetData();
bool CurrentDragHasSupportedFormat() ; bool CurrentDragHasSupportedFormat() ;
void SetCurrentDrag( DragReference drag ) { m_currentDrag = drag ; } void SetCurrentDrag( void* drag ) { m_currentDrag = drag ; }
DragReference GetCurrentDrag() { return m_currentDrag ; } void* GetCurrentDrag() { return m_currentDrag ; }
protected : protected :
DragReference m_currentDrag ; void* m_currentDrag ;
}; };
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
@@ -94,11 +94,11 @@ public:
virtual wxDragResult DoDragDrop( bool bAllowMove = FALSE ); virtual wxDragResult DoDragDrop( bool bAllowMove = FALSE );
wxWindow* GetWindow() { return m_window ; } wxWindow* GetWindow() { return m_window ; }
void SetCurrentDrag( DragReference drag ) { m_currentDrag = drag ; } void SetCurrentDrag( void* drag ) { m_currentDrag = drag ; }
DragReference GetCurrentDrag() { return m_currentDrag ; } void* GetCurrentDrag() { return m_currentDrag ; }
protected : protected :
wxWindow *m_window; wxWindow *m_window;
DragReference m_currentDrag ; void* m_currentDrag ;
}; };
#endif #endif

View File

@@ -72,7 +72,7 @@ protected:
public : public :
short m_macFontNum ; short m_macFontNum ;
short m_macFontSize ; short m_macFontSize ;
Style m_macFontStyle ; unsigned char m_macFontStyle ;
public : public :
void MacFindFont() ; void MacFindFont() ;
}; };

View File

@@ -32,13 +32,13 @@ public:
wxIcon(const char **data); wxIcon(const char **data);
wxIcon(char **data); wxIcon(char **data);
wxIcon(const char bits[], int width , int height ); wxIcon(const char bits[], int width , int height );
wxIcon(const wxString& name, long flags = wxBITMAP_TYPE_ICON_RESOURCE, wxIcon(const wxString& name, int flags = wxBITMAP_TYPE_ICON_RESOURCE,
int desiredWidth = -1, int desiredHeight = -1); int desiredWidth = -1, int desiredHeight = -1);
~wxIcon(); ~wxIcon();
bool LoadFile(const wxString& name, long flags /* = wxBITMAP_TYPE_ICON_RESOURCE */ , bool LoadFile(const wxString& name, wxBitmapType flags /* = wxBITMAP_TYPE_ICON_RESOURCE */ ,
int desiredWidth /* = -1 */ , int desiredHeight = -1); int desiredWidth /* = -1 */ , int desiredHeight = -1);
bool LoadFile(const wxString& name ,long flags = wxBITMAP_TYPE_ICON_RESOURCE ) bool LoadFile(const wxString& name ,wxBitmapType flags = wxBITMAP_TYPE_ICON_RESOURCE )
{ return LoadFile( name , flags , -1 , -1 ) ; } { return LoadFile( name , flags , -1 , -1 ) ; }
inline wxIcon& operator = (const wxIcon& icon) { if (*this == icon) return (*this); Ref(icon); return *this; } inline wxIcon& operator = (const wxIcon& icon) { if (*this == icon) return (*this); Ref(icon); return *this; }

View File

@@ -109,9 +109,9 @@ public:
// Windows callbacks // Windows callbacks
virtual void SetupColours(); virtual void SetupColours();
virtual void MacHandleControlClick( ControlHandle control , SInt16 controlpart ) ; virtual void MacHandleControlClick( WXWidget control , wxInt16 controlpart ) ;
ListHandle m_macList ; void* m_macList ;
wxArrayString m_stringArray ; wxArrayString m_stringArray ;
wxListDataArray m_dataArray ; wxListDataArray m_dataArray ;
wxArrayInt m_selectionPreImage ; wxArrayInt m_selectionPreImage ;

View File

@@ -72,7 +72,7 @@ public:
// menu handle depending on what we're // menu handle depending on what we're
int GetRealId() const; int GetRealId() const;
static int MacBuildMenuString(StringPtr outMacItemText, SInt16 *outMacShortcutChar , UInt8 *outMacModifiers , const char *inItemName , bool useShortcuts ) ; static int MacBuildMenuString(unsigned char* outMacItemText, wxInt16 *outMacShortcutChar , wxUint8 *outMacModifiers , const char *inItemName , bool useShortcuts ) ;
private: private:
wxBitmap m_bitmap; // Bitmap for menuitem, if any wxBitmap m_bitmap; // Bitmap for menuitem, if any

View File

@@ -41,7 +41,7 @@ public:
~wxMetafileRefData(void); ~wxMetafileRefData(void);
public: public:
PicHandle m_metafile; WXHMETAFILE m_metafile;
}; };
#define M_METAFILEDATA ((wxMetafileRefData *)m_refData) #define M_METAFILEDATA ((wxMetafileRefData *)m_refData)
@@ -65,8 +65,8 @@ class WXDLLEXPORT wxMetafile: public wxGDIObject
inline bool Ok(void) const { return (M_METAFILEDATA && (M_METAFILEDATA->m_metafile != 0)); }; inline bool Ok(void) const { return (M_METAFILEDATA && (M_METAFILEDATA->m_metafile != 0)); };
// Implementation // Implementation
inline PicHandle GetHMETAFILE(void) { return M_METAFILEDATA->m_metafile; } inline WXHMETAFILE GetHMETAFILE(void) { return M_METAFILEDATA->m_metafile; }
void SetHMETAFILE(PicHandle mf) ; void SetHMETAFILE(WXHMETAFILE mf) ;
// Operators // Operators
inline wxMetafile& operator = (const wxMetafile& metafile) { if (*this == metafile) return (*this); Ref(metafile); return *this; } inline wxMetafile& operator = (const wxMetafile& metafile) { if (*this == metafile) return (*this); Ref(metafile); return *this; }

View File

@@ -132,7 +132,7 @@ public:
virtual void Command(wxCommandEvent& event); virtual void Command(wxCommandEvent& event);
protected: protected:
virtual wxNotebookPage *DoRemovePage(int page) ; virtual wxNotebookPage *DoRemovePage(int page) ;
virtual void MacHandleControlClick( ControlHandle control , SInt16 controlpart ) ; virtual void MacHandleControlClick( WXWidget control , wxInt16 controlpart ) ;
// common part of all ctors // common part of all ctors
void Init(); void Init();

View File

@@ -1,11 +1,13 @@
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: private.h // Name: private.h
// Purpose: Private declarations // Purpose: Private declarations: as this header is only included by
// Author: AUTHOR // wxWindows itself, it may contain identifiers which don't start
// with "wx".
// Author: Stefan Csomor
// Modified by: // Modified by:
// Created: ??/??/98 // Created: ??/??/98
// RCS-ID: $Id$ // RCS-ID: $Id$
// Copyright: (c) AUTHOR // Copyright: (c) Stefan Csomor
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
@@ -14,8 +16,98 @@
#include "wx/defs.h" #include "wx/defs.h"
/* TODO: put any private declarations here. #if defined(__POWERPC__) && defined(__DARWIN__)
*/ #include <Carbon/Carbon.h>
#else
#include "MacHeaders.c"
#endif
#if UNIVERSAL_INTERFACES_VERSION < 0x0340
#error "please update to Apple's lastest universal headers from http://developer.apple.com/sdk/"
#endif
class wxMacPortStateHelper
{
public :
wxMacPortStateHelper( GrafPtr newport) ;
wxMacPortStateHelper() ;
~wxMacPortStateHelper() ;
void Setup( GrafPtr newport ) ;
void Clear() ;
bool IsCleared() { return m_clip == NULL ; }
GrafPtr GetCurrentPort() { return m_currentPort ; }
private :
GrafPtr m_currentPort ;
GrafPtr m_oldPort ;
RgnHandle m_clip ;
ThemeDrawingState m_drawingState ;
short m_textFont ;
short m_textSize ;
short m_textStyle ;
short m_textMode ;
} ;
class WXDLLEXPORT wxMacPortSetter
{
public :
wxMacPortSetter( const wxDC* dc ) ;
~wxMacPortSetter() ;
private :
wxMacPortStateHelper m_ph ;
} ;
class wxMacDrawingHelper
{
public :
wxMacDrawingHelper( wxWindowMac * theWindow , bool clientArea = false ) ;
~wxMacDrawingHelper() ;
bool Ok() { return m_ok ; }
void LocalToWindow( Rect *rect) { OffsetRect( rect , m_origin.h , m_origin.v ) ; }
void LocalToWindow( Point *pt ) { AddPt( m_origin , pt ) ; }
void LocalToWindow( RgnHandle rgn ) { OffsetRgn( rgn , m_origin.h , m_origin.v ) ; }
const Point& GetOrigin() { return m_origin ; }
private :
Point m_origin ;
GrafPtr m_formerPort ;
GrafPtr m_currentPort ;
PenState m_savedPenState ;
bool m_ok ;
} ;
// filefn.h
WXDLLEXPORT wxString wxMacFSSpec2MacFilename( const FSSpec *spec ) ;
WXDLLEXPORT void wxMacFilename2FSSpec( const char *path , FSSpec *spec ) ;
# ifndef __DARWIN__
// Mac file names are POSIX (Unix style) under Darwin, so these are not needed
WXDLLEXPORT wxString wxMacFSSpec2UnixFilename( const FSSpec *spec ) ;
WXDLLEXPORT void wxUnixFilename2FSSpec( const char *path , FSSpec *spec ) ;
WXDLLEXPORT wxString wxMac2UnixFilename( const char *s) ;
WXDLLEXPORT wxString wxUnix2MacFilename( const char *s);
# endif
// utils.h
WXDLLEXPORT wxString wxMacFindFolder(short vRefNum,
OSType folderType,
Boolean createFolder);
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 ) ;
#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)
#endif #endif
// _WX_PRIVATE_H_ // _WX_PRIVATE_H_

View File

@@ -44,7 +44,7 @@ public:
// implementation // implementation
virtual void MacHandleControlClick( ControlHandle control , SInt16 controlpart ); virtual void MacHandleControlClick( WXWidget control , wxInt16 controlpart );
void Command(wxCommandEvent& event); void Command(wxCommandEvent& event);
wxRadioButton *AddInCycle(wxRadioButton *cycle); wxRadioButton *AddInCycle(wxRadioButton *cycle);
inline wxRadioButton *NextInCycle() {return m_cycle;} inline wxRadioButton *NextInCycle() {return m_cycle;}

View File

@@ -57,7 +57,7 @@ public:
bool refresh = TRUE); bool refresh = TRUE);
void Command(wxCommandEvent& event); void Command(wxCommandEvent& event);
virtual void MacHandleControlClick( ControlHandle control , SInt16 controlpart ) ; virtual void MacHandleControlClick( WXWidget control , wxInt16 controlpart ) ;
protected: protected:
int m_pageSize; int m_pageSize;

View File

@@ -87,7 +87,7 @@ public:
virtual void DoMoveWindow(int x, int y, int w, int h); virtual void DoMoveWindow(int x, int y, int w, int h);
void Command(wxCommandEvent& event); void Command(wxCommandEvent& event);
void MacHandleControlClick( ControlHandle control , SInt16 controlpart ) ; void MacHandleControlClick( WXWidget control , wxInt16 controlpart ) ;
wxStaticText* m_macMinimumStatic ; wxStaticText* m_macMinimumStatic ;
wxStaticText* m_macMaximumStatic ; wxStaticText* m_macMaximumStatic ;

View File

@@ -64,7 +64,7 @@ public:
// implementation // implementation
virtual void MacHandleControlClick( ControlHandle control , SInt16 controlpart ) ; virtual void MacHandleControlClick( WXWidget control , wxInt16 controlpart ) ;
protected: protected:
virtual wxSize DoGetBestSize() const; virtual wxSize DoGetBestSize() const;

View File

@@ -21,12 +21,7 @@
class wxTimer ; class wxTimer ;
typedef struct MacTimerInfo struct MacTimerInfo ;
{
TMTask m_task;
wxMacNotifierTableRef m_table ;
wxTimer* m_timer ;
} ;
class WXDLLEXPORT wxTimer: public wxTimerBase class WXDLLEXPORT wxTimer: public wxTimerBase
{ {
@@ -41,7 +36,7 @@ public:
virtual bool IsRunning() const ; virtual bool IsRunning() const ;
MacTimerInfo m_info; MacTimerInfo* m_info;
protected : protected :
void Init(); void Init();
private: private:

View File

@@ -59,7 +59,7 @@ class WXDLLEXPORT wxToolBar: public wxToolBarBase
// Add all the buttons // Add all the buttons
virtual void MacHandleControlClick( ControlHandle control , SInt16 controlpart ) ; virtual void MacHandleControlClick( WXWidget control , short controlpart ) ;
virtual wxString MacGetToolTipString( wxPoint &where ) ; virtual wxString MacGetToolTipString( wxPoint &where ) ;
void OnPaint(wxPaintEvent& event) ; void OnPaint(wxPaintEvent& event) ;
void OnMouse(wxMouseEvent& event) ; void OnMouse(wxMouseEvent& event) ;

View File

@@ -31,7 +31,7 @@ public:
static void Enable(bool flag); static void Enable(bool flag);
// set the delay after which the tooltip appears // set the delay after which the tooltip appears
static void SetDelay(long milliseconds); static void SetDelay(long milliseconds);
static void NotifyWindowDelete( WindowRef win ) ; static void NotifyWindowDelete( WXHWND win ) ;
// implementation only from now on // implementation only from now on
// ------------------------------- // -------------------------------

View File

@@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Name: wx/mac/toplevel.h // Name: wx/mac/toplevel.h
// Purpose: wxTopLevelWindowMac is the MSW implementation of wxTLW // Purpose: wxTopLevelWindowMac is the Mac implementation of wxTLW
// Author: Vadim Zeitlin // Author: Vadim Zeitlin
// Modified by: // Modified by:
// Created: 20.09.01 // Created: 20.09.01
@@ -68,24 +68,24 @@ public:
const wxSize& size, const wxSize& size,
long style, long style,
const wxString& name ) ; const wxString& name ) ;
static WindowRef MacGetWindowInUpdate() { return s_macWindowInUpdate ; } static WXWindow MacGetWindowInUpdate() { return s_macWindowInUpdate ; }
virtual void MacGetPortParams(Point* localOrigin, Rect* clipRect, WindowRef *window , wxWindowMac** rootwin ) ; virtual void MacGetPortParams(WXPOINTPTR localOrigin, WXRECTPTR clipRect, WXWindow *window , wxWindowMac** rootwin ) ;
virtual void Clear() ; virtual void Clear() ;
virtual ControlHandle MacGetContainerForEmbedding() ; virtual WXWidget MacGetContainerForEmbedding() ;
WindowRef MacGetWindowRef() { return m_macWindow ; } WXWindow MacGetWindowRef() { return m_macWindow ; }
virtual void MacActivate( EventRecord *ev , bool inIsActivating ) ; virtual void MacActivate( WXEVENTREF ev , bool inIsActivating ) ;
virtual void MacUpdate( long timestamp ) ; virtual void MacUpdate( long timestamp ) ;
virtual void MacMouseDown( EventRecord *ev , short windowPart ) ; virtual void MacMouseDown( WXEVENTREF ev , short windowPart ) ;
virtual void MacMouseUp( EventRecord *ev , short windowPart ) ; virtual void MacMouseUp( WXEVENTREF ev , short windowPart ) ;
virtual void MacMouseMoved( EventRecord *ev , short windowPart ) ; virtual void MacMouseMoved( WXEVENTREF ev , short windowPart ) ;
virtual void MacKeyDown( EventRecord *ev ) ; virtual void MacKeyDown( WXEVENTREF ev ) ;
virtual void MacFireMouseEvent( EventRecord *ev ) ; virtual void MacFireMouseEvent( WXEVENTREF ev ) ;
virtual void Raise(); virtual void Raise();
virtual void Lower(); virtual void Lower();
virtual void SetTitle( const wxString& title); virtual void SetTitle( const wxString& title);
virtual bool Show( bool show = TRUE ); virtual bool Show( bool show = TRUE );
virtual void DoMoveWindow(int x, int y, int width, int height); virtual void DoMoveWindow(int x, int y, int width, int height);
void MacInvalidate( const Rect * rect, bool eraseBackground ) ; void MacInvalidate( const WXRECTPTR rect, bool eraseBackground ) ;
protected: protected:
// common part of all ctors // common part of all ctors
void Init(); void Init();
@@ -97,14 +97,14 @@ protected:
// when it is called while the frame is hidden // when it is called while the frame is hidden
bool m_maximizeOnShow; bool m_maximizeOnShow;
SInt16 m_macWindowBackgroundTheme ; short m_macWindowBackgroundTheme ;
WindowRef m_macWindow ; WXWindow m_macWindow ;
ControlHandle m_macRootControl ; WXWidget m_macRootControl ;
wxWindowMac* m_macFocus ; wxWindowMac* m_macFocus ;
RgnHandle m_macNoEraseUpdateRgn ; WXHRGN m_macNoEraseUpdateRgn ;
bool m_macNeedsErasing ; bool m_macNeedsErasing ;
static WindowRef s_macWindowInUpdate ; static WXWindow s_macWindowInUpdate ;
}; };
// list of all frames and modeless dialogs // list of all frames and modeless dialogs
@@ -112,8 +112,8 @@ extern WXDLLEXPORT_DATA(wxWindowList) wxModelessWindows;
// associate mac windows with wx counterparts // associate mac windows with wx counterparts
wxTopLevelWindowMac* wxFindWinFromMacWindow( WindowRef inWindow ) ; wxTopLevelWindowMac* wxFindWinFromMacWindow( WXWindow inWindow ) ;
void wxAssociateWinWithMacWindow(WindowRef inWindow, wxTopLevelWindowMac *win) ; void wxAssociateWinWithMacWindow(WXWindow inWindow, wxTopLevelWindowMac *win) ;
void wxRemoveMacWindowAssociation(wxTopLevelWindowMac *win) ; void wxRemoveMacWindowAssociation(wxTopLevelWindowMac *win) ;

View File

@@ -12,16 +12,7 @@
#ifndef H_UMA #ifndef H_UMA
#define H_UMA #define H_UMA
#if defined(__POWERPC__) #include "wx/mac/private.h"
#if defined(__DARWIN__)
#include <Carbon/Carbon.h>
#endif
#endif
#if !TARGET_CARBON
// this is now defined in the latest headers
// typedef short MenuItemIndex ;
#endif
void UMAInitToolbox( UInt16 inMoreMastersCalls) ; void UMAInitToolbox( UInt16 inMoreMastersCalls) ;
void UMACleanupToolbox() ; void UMACleanupToolbox() ;
@@ -222,7 +213,15 @@ OSStatus UMAGetHelpMenu(
MenuRef * outHelpMenu, MenuRef * outHelpMenu,
MenuItemIndex * outFirstCustomItemIndex); /* can be NULL */ MenuItemIndex * outFirstCustomItemIndex); /* can be NULL */
// Appearance Drawing
OSStatus UMADrawThemePlacard( const Rect *inRect , ThemeDrawState inState ) ;
// accessor helpers
#if !TARGET_CARBON #if !TARGET_CARBON
#define ClearCurrentScrap() ZeroScrap() ;
/*
#define GetPortTextFont( p) ((p)->txFont ) #define GetPortTextFont( p) ((p)->txFont )
#define GetPortTextSize( p) ((p)->txSize ) #define GetPortTextSize( p) ((p)->txSize )
#define GetPortTextFace( p) ((p)->txFace ) #define GetPortTextFace( p) ((p)->txFace )
@@ -238,10 +237,9 @@ OSStatus UMAGetHelpMenu(
#define GetControlBounds( c , b ) &((*b) = (**c).contrlRect ) #define GetControlBounds( c , b ) &((*b) = (**c).contrlRect )
#define GetPortBitMapForCopyBits( p ) ((BitMap*) &(((CGrafPtr)p)->portPixMap )) #define GetPortBitMapForCopyBits( p ) ((BitMap*) &(((CGrafPtr)p)->portPixMap ))
#define GetControlOwner( control ) ((**control).contrlOwner) #define GetControlOwner( control ) ((**control).contrlOwner)
#define InvalWindowRgn( window , rgn ) InvalRgn( rgn )
#define GetPortPenMode( p ) (p->pnMode) #define GetPortPenMode( p ) (p->pnMode)
#define SetPortPenMode( p , mode ) (p->pnMode = mode ) #define SetPortPenMode( p , mode ) (p->pnMode = mode )
#define ClearCurrentScrap() ZeroScrap() ;
// control manager // control manager
#define GetControlReference( control ) ((**control).contrlRfCon) #define GetControlReference( control ) ((**control).contrlRfCon)
@@ -250,13 +248,13 @@ OSStatus UMAGetHelpMenu(
#define SetListSelectionFlags( list , options ) (**list).selFlags = options #define SetListSelectionFlags( list , options ) (**list).selFlags = options
#define GetListRefCon( list ) (**list).refCon #define GetListRefCon( list ) (**list).refCon
*/
#else
// calls not in carbon
#endif #endif
#if TARGET_CARBON
#define GetWindowUpdateRgn( inWindow , updateRgn ) GetWindowRegion( inWindow , kWindowUpdateRgn, updateRgn ) #define GetWindowUpdateRgn( inWindow , updateRgn ) GetWindowRegion( inWindow , kWindowUpdateRgn, updateRgn )
#endif
// Appearance Drawing
OSStatus UMADrawThemePlacard( const Rect *inRect , ThemeDrawState inState ) ;
#endif #endif

View File

@@ -35,10 +35,10 @@ protected:
bool Free(); bool Free();
private: private:
SndChannelPtr m_sndChan; void* m_sndChan;
wxString m_sndname; wxString m_sndname;
SndListHandle m_hSnd; void* m_hSnd;
int m_waveLength; int m_waveLength;
bool m_isResource; bool m_isResource;
}; };

View File

@@ -215,16 +215,16 @@ public:
public : public :
static bool MacGetWindowFromPoint( const wxPoint &point , wxWindowMac** outWin ) ; static bool MacGetWindowFromPoint( const wxPoint &point , wxWindowMac** outWin ) ;
virtual bool MacGetWindowFromPointSub( const wxPoint &point , wxWindowMac** outWin ) ; virtual bool MacGetWindowFromPointSub( const wxPoint &point , wxWindowMac** outWin ) ;
virtual void MacRedraw( RgnHandle updatergn , long time , bool erase) ; virtual void MacRedraw( WXHRGN updatergn , long time , bool erase) ;
virtual bool MacCanFocus() const { return true ; } virtual bool MacCanFocus() const { return true ; }
virtual bool MacDispatchMouseEvent(wxMouseEvent& event ) ; virtual bool MacDispatchMouseEvent(wxMouseEvent& event ) ;
virtual void MacPaintBorders( int left , int top ) ; virtual void MacPaintBorders( int left , int top ) ;
WindowRef MacGetRootWindow() const ; WXWindow MacGetRootWindow() const ;
wxTopLevelWindowMac* MacGetTopLevelWindow() const ; wxTopLevelWindowMac* MacGetTopLevelWindow() const ;
virtual ControlHandle MacGetContainerForEmbedding() ; virtual WXWidget MacGetContainerForEmbedding() ;
virtual long MacGetLeftBorderSize() const ; virtual long MacGetLeftBorderSize() const ;
virtual long MacGetRightBorderSize() const ; virtual long MacGetRightBorderSize() const ;
@@ -308,23 +308,5 @@ private:
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()
}; };
class wxMacDrawingHelper
{
public :
wxMacDrawingHelper( wxWindowMac * theWindow , bool clientArea = false ) ;
~wxMacDrawingHelper() ;
bool Ok() { return m_ok ; }
void LocalToWindow( Rect *rect) { OffsetRect( rect , m_origin.h , m_origin.v ) ; }
void LocalToWindow( Point *pt ) { AddPt( m_origin , pt ) ; }
void LocalToWindow( RgnHandle rgn ) { OffsetRgn( rgn , m_origin.h , m_origin.v ) ; }
const Point& GetOrigin() { return m_origin ; }
private :
Point m_origin ;
GrafPtr m_formerPort ;
GrafPtr m_currentPort ;
PenState m_savedPenState ;
bool m_ok ;
} ;
#endif #endif
// _WX_WINDOW_H_ // _WX_WINDOW_H_

View File

@@ -272,12 +272,6 @@ WXDLLEXPORT const wxMB2WXbuf wxGetUserHome(const wxString& user = wxEmptyString)
WXDLLEXPORT wxChar* wxGetUserHome(const wxString& user = wxEmptyString); WXDLLEXPORT wxChar* wxGetUserHome(const wxString& user = wxEmptyString);
#endif #endif
#ifdef __WXMAC__
WXDLLEXPORT wxString wxMacFindFolder(short vRefNum,
OSType folderType,
Boolean createFolder);
#endif
// get number of total/free bytes on the disk where path belongs // get number of total/free bytes on the disk where path belongs
WXDLLEXPORT bool wxGetDiskSpace(const wxString& path, WXDLLEXPORT bool wxGetDiskSpace(const wxString& path,
wxLongLong *pTotal = NULL, wxLongLong *pTotal = NULL,

View File

@@ -1,4 +1,4 @@
#define MSL_USE_PRECOMPILED_HEADERS 1 #define MSL_USE_PRECOMPILED_HEADERS 0
#if !defined( __MWERKS__ ) #if !defined( __MWERKS__ )
#error "this file is only for builds with Metrowerks CodeWarrior" #error "this file is only for builds with Metrowerks CodeWarrior"
@@ -38,11 +38,15 @@
#endif #endif
#elif defined( __WXMAC__) #elif defined( __WXMAC__)
#define USE_PRECOMPILED_MAC_HEADERS 0 /*Set to 0 if you don't want to use precompiled MacHeaders*/ #define USE_PRECOMPILED_MAC_HEADERS 0 /*Set to 0 if you don't want to use precompiled MacHeaders*/
#include "MacHeaders.c" #define ACCESSOR_CALLS_ARE_FUNCTIONS 1
#include <ansi_prefix.mac.h> #define OPAQUE_TOOLBOX_STRUCTS 1
#include <ansi_prefix.mac.h>
/*
#include <MacTypes.h>
#if UNIVERSAL_INTERFACES_VERSION < 0x0340 #if UNIVERSAL_INTERFACES_VERSION < 0x0340
#error "please update to Apple's lastest universal headers from http://developer.apple.com/sdk/" #error "please update to Apple's lastest universal headers from http://developer.apple.com/sdk/"
#endif #endif
*/
#endif #endif
#define USE_DEFINE #define USE_DEFINE