From 5273bf2fd3292ec3ab3da4f0c197b2f0e93df32e Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Fri, 4 Jan 2002 17:13:39 +0000 Subject: [PATCH] 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 --- include/wx/cmndata.h | 6 +-- include/wx/mac/aga.h | 23 +-------- include/wx/mac/app.h | 48 +++++++++--------- include/wx/mac/bitmap.h | 17 ++----- include/wx/mac/brush.h | 40 ++++----------- include/wx/mac/button.h | 2 +- include/wx/mac/checkbox.h | 2 +- include/wx/mac/choice.h | 6 +-- include/wx/mac/colour.h | 2 +- include/wx/mac/combobox.h | 4 +- include/wx/mac/control.h | 16 +++--- include/wx/mac/dataform.h | 2 +- include/wx/mac/dc.h | 33 +++++------- include/wx/mac/dcprint.h | 8 +-- include/wx/mac/dnd.h | 12 ++--- include/wx/mac/font.h | 2 +- include/wx/mac/icon.h | 6 +-- include/wx/mac/listbox.h | 4 +- include/wx/mac/menuitem.h | 2 +- include/wx/mac/metafile.h | 6 +-- include/wx/mac/notebook.h | 2 +- include/wx/mac/private.h | 102 ++++++++++++++++++++++++++++++++++++-- include/wx/mac/radiobut.h | 2 +- include/wx/mac/scrolbar.h | 2 +- include/wx/mac/slider.h | 2 +- include/wx/mac/spinbutt.h | 2 +- include/wx/mac/timer.h | 9 +--- include/wx/mac/toolbar.h | 2 +- include/wx/mac/tooltip.h | 2 +- include/wx/mac/toplevel.h | 38 +++++++------- include/wx/mac/uma.h | 32 ++++++------ include/wx/mac/wave.h | 4 +- include/wx/mac/window.h | 24 ++------- include/wx/utils.h | 6 --- include/wx/wx_cw_cm.h | 10 ++-- 35 files changed, 244 insertions(+), 236 deletions(-) diff --git a/include/wx/cmndata.h b/include/wx/cmndata.h index 2b4063f317..4bc6a83a39 100644 --- a/include/wx/cmndata.h +++ b/include/wx/cmndata.h @@ -195,10 +195,10 @@ public: void* m_devNames; #elif defined( __WXMAC__ ) #if TARGET_CARBON - PMPageFormat m_macPageFormat ; - PMPrintSettings m_macPrintSettings ; + void* m_macPageFormat ; + void* m_macPrintSettings ; #else - THPrint m_macPrintInfo ; + void* m_macPrintInfo ; #endif #endif diff --git a/include/wx/mac/aga.h b/include/wx/mac/aga.h index c251146d8b..652736f27a 100644 --- a/include/wx/mac/aga.h +++ b/include/wx/mac/aga.h @@ -12,6 +12,7 @@ #ifndef _UMA_AGA_H #define _UMA_AGA_H +/* ControlHandle AGANewControl(WindowPtr owningWindow, const Rect * boundsRect, ConstStr255Param controlTitle, @@ -85,28 +86,8 @@ void AGAApplyThemeBackground (ThemeBackgroundKind inKind, void AGAMoveControl( 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 \ No newline at end of file diff --git a/include/wx/mac/app.h b/include/wx/mac/app.h index 50c0d60f83..dff98e0bd5 100644 --- a/include/wx/mac/app.h +++ b/include/wx/mac/app.h @@ -93,8 +93,8 @@ public: static long sm_lastMessageTime; static wxWindow* s_captureWindow ; static int s_lastMouseDown ; // 0 = none , 1 = left , 2 = right - static RgnHandle s_macCursorRgn ; - EventRecord* m_macCurrentEvent ; + static WXHRGN s_macCursorRgn ; + WXEVENTREF m_macCurrentEvent ; int m_nCmdShow; @@ -120,9 +120,9 @@ public : static bool s_macHasDialogManager ; static long s_macDialogManagerVersion ; - RgnHandle m_macCursorRgn ; - RgnHandle m_macSleepRgn ; - RgnHandle m_macHelpRgn ; + WXHRGN m_macCursorRgn ; + WXHRGN m_macSleepRgn ; + WXHRGN m_macHelpRgn ; virtual void MacSuspend( bool convertClipboard ) ; virtual void MacResume( bool convertClipboard ) ; @@ -133,25 +133,25 @@ public : // event main methods void MacDoOneEvent() ; - void MacHandleOneEvent( EventRecord *ev ) ; - EventRecord* MacGetCurrentEvent() { return m_macCurrentEvent ; } + void MacHandleOneEvent( WXEVENTREF ev ) ; + WXEVENTREF MacGetCurrentEvent() { return m_macCurrentEvent ; } // primary events - virtual void MacHandleMouseDownEvent( EventRecord *ev ) ; - virtual void MacHandleMouseUpEvent( EventRecord *ev ) ; - virtual void MacHandleActivateEvent( EventRecord *ev ) ; - virtual void MacHandleUpdateEvent( EventRecord *ev ) ; - virtual void MacHandleKeyDownEvent( EventRecord *ev ) ; - virtual void MacHandleKeyUpEvent( EventRecord *ev ) ; - virtual void MacHandleDiskEvent( EventRecord *ev ) ; - virtual void MacHandleOSEvent( EventRecord *ev ) ; - virtual void MacHandleHighLevelEvent( EventRecord *ev ) ; + virtual void MacHandleMouseDownEvent( WXEVENTREF ev ) ; + virtual void MacHandleMouseUpEvent( WXEVENTREF ev ) ; + virtual void MacHandleActivateEvent( WXEVENTREF ev ) ; + virtual void MacHandleUpdateEvent( WXEVENTREF ev ) ; + virtual void MacHandleKeyDownEvent( WXEVENTREF ev ) ; + virtual void MacHandleKeyUpEvent( WXEVENTREF ev ) ; + virtual void MacHandleDiskEvent( WXEVENTREF ev ) ; + virtual void MacHandleOSEvent( WXEVENTREF ev ) ; + virtual void MacHandleHighLevelEvent( WXEVENTREF ev ) ; virtual void MacHandleMenuSelect( int menuid , int menuitem ) ; - virtual OSErr MacHandleAEODoc(const AppleEvent *event , AppleEvent *reply) ; - virtual OSErr MacHandleAEPDoc(const AppleEvent *event , AppleEvent *reply) ; - virtual OSErr MacHandleAEOApp(const AppleEvent *event , AppleEvent *reply) ; - virtual OSErr MacHandleAEQuit(const AppleEvent *event , AppleEvent *reply) ; + virtual short MacHandleAEODoc(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ; + virtual short MacHandleAEPDoc(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ; + virtual short MacHandleAEOApp(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ; + virtual short MacHandleAEQuit(const WXAPPLEEVENTREF event , WXAPPLEEVENTREF reply) ; DECLARE_EVENT_TABLE() }; @@ -172,17 +172,17 @@ void wxMacConvertToPC( unsigned char *p ) ; wxString wxMacMakePCStringFromMac( const char * p ) ; // 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 -inline void wxMacStringToPascal( const char * from , StringPtr to ) +inline void wxMacStringToPascal( const char * from , unsigned char* to ) { wxMacStringToPascal( from , to , wxApp::s_macDefaultEncodingIsPC ) ; } // 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 -inline wxString wxMacMakeStringFromPascal( StringPtr from ) +inline wxString wxMacMakeStringFromPascal( unsigned char* from ) { return wxMacMakeStringFromPascal( from , wxApp::s_macDefaultEncodingIsPC ) ; } // converts this c string into a wxString with optional mac 2 pc encoding diff --git a/include/wx/mac/bitmap.h b/include/wx/mac/bitmap.h index 47ff793ac0..1760cca7b8 100644 --- a/include/wx/mac/bitmap.h +++ b/include/wx/mac/bitmap.h @@ -27,13 +27,6 @@ class WXDLLEXPORT wxIcon; class WXDLLEXPORT wxCursor; 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 // transparently. class WXDLLEXPORT wxMask: public wxObject @@ -88,10 +81,10 @@ public: wxPalette m_bitmapPalette; int m_quality; - int m_bitmapType ; - PicHandle m_hPict ; - WXHBITMAP m_hBitmap; - WXHICON m_hIcon ; + int m_bitmapType ; + WXHMETAFILE m_hPict ; + WXHBITMAP m_hBitmap; + WXHICON m_hIcon ; wxMask * m_bitmapMask; // Optional mask }; @@ -206,7 +199,7 @@ public: void SetHICON(WXHICON ico); inline WXHICON GetHICON() const { return (M_BITMAPDATA ? M_BITMAPDATA->m_hIcon : 0); } - PicHandle GetPict() const; + WXHMETAFILE GetPict() const; bool FreeResource(bool force = FALSE); }; diff --git a/include/wx/mac/brush.h b/include/wx/mac/brush.h index fa36e7f184..0fbf591753 100644 --- a/include/wx/mac/brush.h +++ b/include/wx/mac/brush.h @@ -29,28 +29,6 @@ typedef enum kwxMacBrushThemeBackground } 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 class WXDLLEXPORT wxBrush: public wxGDIObject { @@ -58,7 +36,7 @@ class WXDLLEXPORT wxBrush: public wxGDIObject public: wxBrush(); - wxBrush(ThemeBrush macThemeBrush ) ; + wxBrush(short macThemeBrush ) ; wxBrush(const wxColour& col, int style); wxBrush(const wxBitmap& stipple); 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 SetStyle(int style) ; virtual void SetStipple(const wxBitmap& stipple) ; - virtual void SetMacTheme(ThemeBrush macThemeBrush) ; - virtual void SetMacThemeBackground(ThemeBackgroundKind macThemeBackground , const Rect &extent) ; + virtual void SetMacTheme(short macThemeBrush) ; + virtual void SetMacThemeBackground(unsigned long macThemeBackground , WXRECTPTR extent) ; 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 wxMacBrushKind MacGetBrushKind() const { return (M_BRUSHDATA ? M_BRUSHDATA->m_macBrushKind : kwxMacBrushColour); }; + wxMacBrushKind MacGetBrushKind() const ; - ThemeBackgroundKind GetMacThemeBackground(Rect *extent) const ; - inline ThemeBrush GetMacTheme() const { return (M_BRUSHDATA ? ( M_BRUSHDATA->m_macBrushKind == kwxMacBrushTheme ? M_BRUSHDATA->m_macThemeBrush : kThemeBrushBlack) : kThemeBrushBlack); }; - inline wxColour& GetColour() const { return (M_BRUSHDATA ? M_BRUSHDATA->m_colour : wxNullColour); }; - inline int GetStyle() const { return (M_BRUSHDATA ? M_BRUSHDATA->m_style : 0); }; - inline wxBitmap *GetStipple() const { return (M_BRUSHDATA ? & M_BRUSHDATA->m_stipple : 0); }; + unsigned long GetMacThemeBackground(WXRECTPTR extent) const ; + short GetMacTheme() const ; + wxColour& GetColour() const ; + int GetStyle() const ; + wxBitmap *GetStipple() const ; virtual bool Ok() const { return (m_refData != NULL) ; } diff --git a/include/wx/mac/button.h b/include/wx/mac/button.h index 680652b3e7..12faee340c 100644 --- a/include/wx/mac/button.h +++ b/include/wx/mac/button.h @@ -42,7 +42,7 @@ class WXDLLEXPORT wxButton: public wxButtonBase const wxValidator& validator = wxDefaultValidator, const wxString& name = wxButtonNameStr); - virtual void MacHandleControlClick( ControlHandle control , SInt16 controlpart ) ; + virtual void MacHandleControlClick( WXWidget control , short controlpart ) ; static wxSize GetDefaultSize(); virtual void SetDefault(); diff --git a/include/wx/mac/checkbox.h b/include/wx/mac/checkbox.h index 94a2fdceeb..d23f724525 100644 --- a/include/wx/mac/checkbox.h +++ b/include/wx/mac/checkbox.h @@ -44,7 +44,7 @@ class WXDLLEXPORT wxCheckBox: public wxControl const wxString& name = wxCheckBoxNameStr); virtual void SetValue(bool); virtual bool GetValue() const ; - virtual void MacHandleControlClick( ControlHandle control , SInt16 controlpart ) ; + virtual void MacHandleControlClick( WXWidget control , wxInt16 controlpart ) ; virtual void Command(wxCommandEvent& event); }; diff --git a/include/wx/mac/choice.h b/include/wx/mac/choice.h index 3f796ac070..998f06d203 100644 --- a/include/wx/mac/choice.h +++ b/include/wx/mac/choice.h @@ -64,7 +64,7 @@ class WXDLLEXPORT wxChoice: public wxChoiceBase virtual int FindString(const wxString& s) const; virtual wxString GetString(int n) const ; 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); @@ -78,7 +78,7 @@ class WXDLLEXPORT wxChoice: public wxChoiceBase // Mac specific virtual void Command(wxCommandEvent& event); - void MacHandleControlClick( ControlHandle control , SInt16 controlpart ) ; + void MacHandleControlClick( WXWidget control , wxInt16 controlpart ) ; virtual inline int GetColumns() const { return 1 ; }; */ @@ -94,7 +94,7 @@ protected: wxArrayString m_strings; wxChoiceDataArray m_datas ; - MenuHandle m_macPopUpMenuHandle ; + WXHMENU m_macPopUpMenuHandle ; }; #endif diff --git a/include/wx/mac/colour.h b/include/wx/mac/colour.h index 3369e9006b..c290cbefd6 100644 --- a/include/wx/mac/colour.h +++ b/include/wx/mac/colour.h @@ -86,7 +86,7 @@ private: public: 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: DECLARE_DYNAMIC_CLASS(wxColour) diff --git a/include/wx/mac/combobox.h b/include/wx/mac/combobox.h index 6fda37448e..c8d91061cf 100644 --- a/include/wx/mac/combobox.h +++ b/include/wx/mac/combobox.h @@ -78,10 +78,10 @@ class WXDLLEXPORT wxComboBox: public wxChoice virtual void Remove(long from, long to); virtual void SetSelection(long from, long to); virtual void SetEditable(bool editable); - void MacHandleControlClick( ControlHandle control , SInt16 controlpart ) ; + void MacHandleControlClick( WXWidget control , wxInt16 controlpart ) ; protected: int m_noStrings; - MenuHandle m_macPopUpMenuHandle ; + WXHMENU m_macPopUpMenuHandle ; }; #endif diff --git a/include/wx/mac/control.h b/include/wx/mac/control.h index b7e84398be..02f59ad05e 100644 --- a/include/wx/mac/control.h +++ b/include/wx/mac/control.h @@ -59,17 +59,17 @@ public: virtual bool Show(bool show = TRUE) ; 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 , const wxPoint& pos, const wxSize& size, long style, const wxValidator& validator, const wxString& name , - Rect *outBounds , - StringPtr maclabel ) ; + WXRECTPTR outBounds , + unsigned char* maclabel ) ; virtual void MacPostControlCreate() ; virtual void MacAdjustControlRect() ; - virtual ControlHandle MacGetContainerForEmbedding() ; + virtual WXWidget MacGetContainerForEmbedding() ; virtual void MacSuperChangedPosition() ; virtual void MacSuperEnabled( bool enabled ) ; virtual void MacSuperShown( bool show ) ; @@ -80,7 +80,7 @@ public: virtual void OnMouseEvent( wxMouseEvent &event ) ; virtual void OnPaint(wxPaintEvent& event) ; virtual void Refresh(bool eraseBack = TRUE, const wxRect *rect = NULL) ; - ControlHandle GetMacControl() { return m_macControl ;} + WXWidget GetMacControl() { return m_macControl ;} #if WXWIN_COMPATIBILITY virtual void SetButtonColour(const wxColour& WXUNUSED(col)) { } @@ -102,7 +102,7 @@ protected: protected: // For controls like radiobuttons which are really composite - ControlHandle m_macControl ; + WXWidget m_macControl ; bool m_macControlIsShown ; wxList m_subControls; int m_macHorizontalBorder ; @@ -123,8 +123,8 @@ private: inline void wxControl::SetButtonFont(const wxFont& font) { SetFont(font); } #endif // WXWIN_COMPATIBILITY -wxControl *wxFindControlFromMacControl(ControlHandle inControl ) ; -void wxAssociateControlWithMacControl(ControlHandle inControl, wxControl *control) ; +wxControl *wxFindControlFromMacControl(WXWidget inControl ) ; +void wxAssociateControlWithMacControl(WXWidget inControl, wxControl *control) ; void wxRemoveMacControlAssociation(wxControl *control) ; #endif diff --git a/include/wx/mac/dataform.h b/include/wx/mac/dataform.h index 3492479d26..d9267a9981 100644 --- a/include/wx/mac/dataform.h +++ b/include/wx/mac/dataform.h @@ -15,7 +15,7 @@ class wxDataFormat { public: - typedef OSType NativeFormat; + typedef unsigned long NativeFormat; wxDataFormat(); wxDataFormat(wxDataFormatId vType); diff --git a/include/wx/mac/dc.h b/include/wx/mac/dc.h index 06bf7595ba..115742d796 100644 --- a/include/wx/mac/dc.h +++ b/include/wx/mac/dc.h @@ -21,7 +21,6 @@ #include "wx/icon.h" #include "wx/font.h" #include "wx/gdicmn.h" -#include "wx/mac/aga.h" //----------------------------------------------------------------------------- // constants @@ -44,19 +43,11 @@ extern int wxPageNumber; +class wxMacPortStateHelper ; //----------------------------------------------------------------------------- // wxDC //----------------------------------------------------------------------------- -class WXDLLEXPORT wxMacPortSetter -{ -public : - wxMacPortSetter( const wxDC* dc ) ; - ~wxMacPortSetter() ; -private : - AGAPortHelper m_ph ; -} ; - class WXDLLEXPORT wxDC: public wxDCBase { DECLARE_DYNAMIC_CLASS(wxDC) @@ -180,20 +171,20 @@ class WXDLLEXPORT wxDC: public wxDCBase { long new_x = x - m_logicalOriginX; 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 - 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 { long new_y = y - m_logicalOriginY ; 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 - 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 ) ; // @@ -269,8 +260,8 @@ protected: // Begin implementation for Mac public: - GrafPtr m_macPort ; - GWorldPtr m_macMask ; + WXHDC m_macPort ; + WXHBITMAP m_macMask ; // in order to preserve the const inheritance of the virtual functions, we have to // use mutable variables starting from CWPro 5 @@ -283,10 +274,10 @@ protected: mutable bool m_macPenInstalled ; mutable bool m_macBrushInstalled ; - RgnHandle m_macBoundaryClipRgn ; - RgnHandle m_macCurrentClipRgn ; - Point m_macLocalOrigin ; - void MacSetupPort( AGAPortHelper* ph ) const ; + WXHRGN m_macBoundaryClipRgn ; + WXHRGN m_macCurrentClipRgn ; + wxPoint m_macLocalOrigin ; + void MacSetupPort( wxMacPortStateHelper* ph ) const ; }; #endif diff --git a/include/wx/mac/dcprint.h b/include/wx/mac/dcprint.h index b06714920c..05d8d6ac91 100644 --- a/include/wx/mac/dcprint.h +++ b/include/wx/mac/dcprint.h @@ -36,14 +36,14 @@ class WXDLLEXPORT wxPrinterDC: public wxDC protected : #if TARGET_CARBON #if PM_USE_SESSION_APIS - PMPrintSession m_macPrintSession; + void* m_macPrintSession; #else - PMPrintContext m_macPrintPort ; + void* m_macPrintPort ; #endif #else - TPPrPort m_macPrintPort ; + void* m_macPrintPort ; #endif - wxPrintData m_printData ; + wxPrintData m_printData ; #endif // wxUSE_PRINTING_ARCHITECTURE }; diff --git a/include/wx/mac/dnd.h b/include/wx/mac/dnd.h index 746dc91a25..ee95777c01 100644 --- a/include/wx/mac/dnd.h +++ b/include/wx/mac/dnd.h @@ -61,10 +61,10 @@ class WXDLLEXPORT wxDropTarget: public wxDropTargetBase virtual bool GetData(); bool CurrentDragHasSupportedFormat() ; - void SetCurrentDrag( DragReference drag ) { m_currentDrag = drag ; } - DragReference GetCurrentDrag() { return m_currentDrag ; } + void SetCurrentDrag( void* drag ) { m_currentDrag = drag ; } + void* GetCurrentDrag() { return m_currentDrag ; } protected : - DragReference m_currentDrag ; + void* m_currentDrag ; }; //------------------------------------------------------------------------- @@ -94,11 +94,11 @@ public: virtual wxDragResult DoDragDrop( bool bAllowMove = FALSE ); wxWindow* GetWindow() { return m_window ; } - void SetCurrentDrag( DragReference drag ) { m_currentDrag = drag ; } - DragReference GetCurrentDrag() { return m_currentDrag ; } + void SetCurrentDrag( void* drag ) { m_currentDrag = drag ; } + void* GetCurrentDrag() { return m_currentDrag ; } protected : wxWindow *m_window; - DragReference m_currentDrag ; + void* m_currentDrag ; }; #endif diff --git a/include/wx/mac/font.h b/include/wx/mac/font.h index e65149037e..220900327a 100644 --- a/include/wx/mac/font.h +++ b/include/wx/mac/font.h @@ -72,7 +72,7 @@ protected: public : short m_macFontNum ; short m_macFontSize ; - Style m_macFontStyle ; + unsigned char m_macFontStyle ; public : void MacFindFont() ; }; diff --git a/include/wx/mac/icon.h b/include/wx/mac/icon.h index e24b58316e..c128f242aa 100644 --- a/include/wx/mac/icon.h +++ b/include/wx/mac/icon.h @@ -32,13 +32,13 @@ public: wxIcon(const char **data); wxIcon(char **data); 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); ~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); - 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 ) ; } inline wxIcon& operator = (const wxIcon& icon) { if (*this == icon) return (*this); Ref(icon); return *this; } diff --git a/include/wx/mac/listbox.h b/include/wx/mac/listbox.h index 18b4149d88..0d1f1f7ad5 100644 --- a/include/wx/mac/listbox.h +++ b/include/wx/mac/listbox.h @@ -109,9 +109,9 @@ public: // Windows callbacks 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 ; wxListDataArray m_dataArray ; wxArrayInt m_selectionPreImage ; diff --git a/include/wx/mac/menuitem.h b/include/wx/mac/menuitem.h index cf7a2c57f2..e6478ebe7d 100644 --- a/include/wx/mac/menuitem.h +++ b/include/wx/mac/menuitem.h @@ -72,7 +72,7 @@ public: // menu handle depending on what we're 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: wxBitmap m_bitmap; // Bitmap for menuitem, if any diff --git a/include/wx/mac/metafile.h b/include/wx/mac/metafile.h index 17ffbc0866..393cca992e 100644 --- a/include/wx/mac/metafile.h +++ b/include/wx/mac/metafile.h @@ -41,7 +41,7 @@ public: ~wxMetafileRefData(void); public: - PicHandle m_metafile; + WXHMETAFILE m_metafile; }; #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)); }; // Implementation - inline PicHandle GetHMETAFILE(void) { return M_METAFILEDATA->m_metafile; } - void SetHMETAFILE(PicHandle mf) ; + inline WXHMETAFILE GetHMETAFILE(void) { return M_METAFILEDATA->m_metafile; } + void SetHMETAFILE(WXHMETAFILE mf) ; // Operators inline wxMetafile& operator = (const wxMetafile& metafile) { if (*this == metafile) return (*this); Ref(metafile); return *this; } diff --git a/include/wx/mac/notebook.h b/include/wx/mac/notebook.h index ca4338f619..188bde8cfb 100644 --- a/include/wx/mac/notebook.h +++ b/include/wx/mac/notebook.h @@ -132,7 +132,7 @@ public: virtual void Command(wxCommandEvent& event); protected: virtual wxNotebookPage *DoRemovePage(int page) ; - virtual void MacHandleControlClick( ControlHandle control , SInt16 controlpart ) ; + virtual void MacHandleControlClick( WXWidget control , wxInt16 controlpart ) ; // common part of all ctors void Init(); diff --git a/include/wx/mac/private.h b/include/wx/mac/private.h index 922c172436..c7d5bedf72 100644 --- a/include/wx/mac/private.h +++ b/include/wx/mac/private.h @@ -1,11 +1,13 @@ ///////////////////////////////////////////////////////////////////////////// // Name: private.h -// Purpose: Private declarations -// Author: AUTHOR +// Purpose: Private declarations: as this header is only included by +// wxWindows itself, it may contain identifiers which don't start +// with "wx". +// Author: Stefan Csomor // Modified by: // Created: ??/??/98 // RCS-ID: $Id$ -// Copyright: (c) AUTHOR +// Copyright: (c) Stefan Csomor // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -14,8 +16,98 @@ #include "wx/defs.h" -/* TODO: put any private declarations here. - */ +#if defined(__POWERPC__) && defined(__DARWIN__) + #include +#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 // _WX_PRIVATE_H_ diff --git a/include/wx/mac/radiobut.h b/include/wx/mac/radiobut.h index eb92a10614..752fa59b46 100644 --- a/include/wx/mac/radiobut.h +++ b/include/wx/mac/radiobut.h @@ -44,7 +44,7 @@ public: // implementation - virtual void MacHandleControlClick( ControlHandle control , SInt16 controlpart ); + virtual void MacHandleControlClick( WXWidget control , wxInt16 controlpart ); void Command(wxCommandEvent& event); wxRadioButton *AddInCycle(wxRadioButton *cycle); inline wxRadioButton *NextInCycle() {return m_cycle;} diff --git a/include/wx/mac/scrolbar.h b/include/wx/mac/scrolbar.h index 62f85a3437..9efad2dfd0 100644 --- a/include/wx/mac/scrolbar.h +++ b/include/wx/mac/scrolbar.h @@ -57,7 +57,7 @@ public: bool refresh = TRUE); void Command(wxCommandEvent& event); - virtual void MacHandleControlClick( ControlHandle control , SInt16 controlpart ) ; + virtual void MacHandleControlClick( WXWidget control , wxInt16 controlpart ) ; protected: int m_pageSize; diff --git a/include/wx/mac/slider.h b/include/wx/mac/slider.h index b5dd7e48e7..44f8719b05 100644 --- a/include/wx/mac/slider.h +++ b/include/wx/mac/slider.h @@ -87,7 +87,7 @@ public: virtual void DoMoveWindow(int x, int y, int w, int h); void Command(wxCommandEvent& event); - void MacHandleControlClick( ControlHandle control , SInt16 controlpart ) ; + void MacHandleControlClick( WXWidget control , wxInt16 controlpart ) ; wxStaticText* m_macMinimumStatic ; wxStaticText* m_macMaximumStatic ; diff --git a/include/wx/mac/spinbutt.h b/include/wx/mac/spinbutt.h index 934888ee06..c55b84a0b2 100644 --- a/include/wx/mac/spinbutt.h +++ b/include/wx/mac/spinbutt.h @@ -64,7 +64,7 @@ public: // implementation - virtual void MacHandleControlClick( ControlHandle control , SInt16 controlpart ) ; + virtual void MacHandleControlClick( WXWidget control , wxInt16 controlpart ) ; protected: virtual wxSize DoGetBestSize() const; diff --git a/include/wx/mac/timer.h b/include/wx/mac/timer.h index 1c4469e9a5..a050d3a1c3 100644 --- a/include/wx/mac/timer.h +++ b/include/wx/mac/timer.h @@ -21,12 +21,7 @@ class wxTimer ; -typedef struct MacTimerInfo -{ - TMTask m_task; - wxMacNotifierTableRef m_table ; - wxTimer* m_timer ; -} ; +struct MacTimerInfo ; class WXDLLEXPORT wxTimer: public wxTimerBase { @@ -41,7 +36,7 @@ public: virtual bool IsRunning() const ; - MacTimerInfo m_info; + MacTimerInfo* m_info; protected : void Init(); private: diff --git a/include/wx/mac/toolbar.h b/include/wx/mac/toolbar.h index 7b7c38456f..f624258df9 100644 --- a/include/wx/mac/toolbar.h +++ b/include/wx/mac/toolbar.h @@ -59,7 +59,7 @@ class WXDLLEXPORT wxToolBar: public wxToolBarBase // Add all the buttons - virtual void MacHandleControlClick( ControlHandle control , SInt16 controlpart ) ; + virtual void MacHandleControlClick( WXWidget control , short controlpart ) ; virtual wxString MacGetToolTipString( wxPoint &where ) ; void OnPaint(wxPaintEvent& event) ; void OnMouse(wxMouseEvent& event) ; diff --git a/include/wx/mac/tooltip.h b/include/wx/mac/tooltip.h index 240ad50356..7398a01e4b 100644 --- a/include/wx/mac/tooltip.h +++ b/include/wx/mac/tooltip.h @@ -31,7 +31,7 @@ public: static void Enable(bool flag); // set the delay after which the tooltip appears static void SetDelay(long milliseconds); - static void NotifyWindowDelete( WindowRef win ) ; + static void NotifyWindowDelete( WXHWND win ) ; // implementation only from now on // ------------------------------- diff --git a/include/wx/mac/toplevel.h b/include/wx/mac/toplevel.h index c005292f65..06b677c50a 100644 --- a/include/wx/mac/toplevel.h +++ b/include/wx/mac/toplevel.h @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////// // Name: wx/mac/toplevel.h -// Purpose: wxTopLevelWindowMac is the MSW implementation of wxTLW +// Purpose: wxTopLevelWindowMac is the Mac implementation of wxTLW // Author: Vadim Zeitlin // Modified by: // Created: 20.09.01 @@ -68,24 +68,24 @@ public: const wxSize& size, long style, const wxString& name ) ; - static WindowRef MacGetWindowInUpdate() { return s_macWindowInUpdate ; } - virtual void MacGetPortParams(Point* localOrigin, Rect* clipRect, WindowRef *window , wxWindowMac** rootwin ) ; + static WXWindow MacGetWindowInUpdate() { return s_macWindowInUpdate ; } + virtual void MacGetPortParams(WXPOINTPTR localOrigin, WXRECTPTR clipRect, WXWindow *window , wxWindowMac** rootwin ) ; virtual void Clear() ; - virtual ControlHandle MacGetContainerForEmbedding() ; - WindowRef MacGetWindowRef() { return m_macWindow ; } - virtual void MacActivate( EventRecord *ev , bool inIsActivating ) ; + virtual WXWidget MacGetContainerForEmbedding() ; + WXWindow MacGetWindowRef() { return m_macWindow ; } + virtual void MacActivate( WXEVENTREF ev , bool inIsActivating ) ; virtual void MacUpdate( long timestamp ) ; - virtual void MacMouseDown( EventRecord *ev , short windowPart ) ; - virtual void MacMouseUp( EventRecord *ev , short windowPart ) ; - virtual void MacMouseMoved( EventRecord *ev , short windowPart ) ; - virtual void MacKeyDown( EventRecord *ev ) ; - virtual void MacFireMouseEvent( EventRecord *ev ) ; + virtual void MacMouseDown( WXEVENTREF ev , short windowPart ) ; + virtual void MacMouseUp( WXEVENTREF ev , short windowPart ) ; + virtual void MacMouseMoved( WXEVENTREF ev , short windowPart ) ; + virtual void MacKeyDown( WXEVENTREF ev ) ; + virtual void MacFireMouseEvent( WXEVENTREF ev ) ; virtual void Raise(); virtual void Lower(); virtual void SetTitle( const wxString& title); virtual bool Show( bool show = TRUE ); 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: // common part of all ctors void Init(); @@ -97,14 +97,14 @@ protected: // when it is called while the frame is hidden bool m_maximizeOnShow; - SInt16 m_macWindowBackgroundTheme ; - WindowRef m_macWindow ; - ControlHandle m_macRootControl ; + short m_macWindowBackgroundTheme ; + WXWindow m_macWindow ; + WXWidget m_macRootControl ; wxWindowMac* m_macFocus ; - RgnHandle m_macNoEraseUpdateRgn ; + WXHRGN m_macNoEraseUpdateRgn ; bool m_macNeedsErasing ; - static WindowRef s_macWindowInUpdate ; + static WXWindow s_macWindowInUpdate ; }; // list of all frames and modeless dialogs @@ -112,8 +112,8 @@ extern WXDLLEXPORT_DATA(wxWindowList) wxModelessWindows; // associate mac windows with wx counterparts -wxTopLevelWindowMac* wxFindWinFromMacWindow( WindowRef inWindow ) ; -void wxAssociateWinWithMacWindow(WindowRef inWindow, wxTopLevelWindowMac *win) ; +wxTopLevelWindowMac* wxFindWinFromMacWindow( WXWindow inWindow ) ; +void wxAssociateWinWithMacWindow(WXWindow inWindow, wxTopLevelWindowMac *win) ; void wxRemoveMacWindowAssociation(wxTopLevelWindowMac *win) ; diff --git a/include/wx/mac/uma.h b/include/wx/mac/uma.h index 11e9cb7c5d..6a7de05e46 100644 --- a/include/wx/mac/uma.h +++ b/include/wx/mac/uma.h @@ -12,16 +12,7 @@ #ifndef H_UMA #define H_UMA -#if defined(__POWERPC__) - #if defined(__DARWIN__) - #include - #endif -#endif - -#if !TARGET_CARBON -// this is now defined in the latest headers -// typedef short MenuItemIndex ; -#endif +#include "wx/mac/private.h" void UMAInitToolbox( UInt16 inMoreMastersCalls) ; void UMACleanupToolbox() ; @@ -222,7 +213,15 @@ OSStatus UMAGetHelpMenu( MenuRef * outHelpMenu, MenuItemIndex * outFirstCustomItemIndex); /* can be NULL */ +// Appearance Drawing + +OSStatus UMADrawThemePlacard( const Rect *inRect , ThemeDrawState inState ) ; + +// accessor helpers + #if !TARGET_CARBON +#define ClearCurrentScrap() ZeroScrap() ; +/* #define GetPortTextFont( p) ((p)->txFont ) #define GetPortTextSize( p) ((p)->txSize ) #define GetPortTextFace( p) ((p)->txFace ) @@ -238,10 +237,9 @@ OSStatus UMAGetHelpMenu( #define GetControlBounds( c , b ) &((*b) = (**c).contrlRect ) #define GetPortBitMapForCopyBits( p ) ((BitMap*) &(((CGrafPtr)p)->portPixMap )) #define GetControlOwner( control ) ((**control).contrlOwner) -#define InvalWindowRgn( window , rgn ) InvalRgn( rgn ) + #define GetPortPenMode( p ) (p->pnMode) #define SetPortPenMode( p , mode ) (p->pnMode = mode ) -#define ClearCurrentScrap() ZeroScrap() ; // control manager #define GetControlReference( control ) ((**control).contrlRfCon) @@ -250,13 +248,13 @@ OSStatus UMAGetHelpMenu( #define SetListSelectionFlags( list , options ) (**list).selFlags = options #define GetListRefCon( list ) (**list).refCon +*/ +#else + +// calls not in carbon + #endif -#if TARGET_CARBON #define GetWindowUpdateRgn( inWindow , updateRgn ) GetWindowRegion( inWindow , kWindowUpdateRgn, updateRgn ) -#endif -// Appearance Drawing - -OSStatus UMADrawThemePlacard( const Rect *inRect , ThemeDrawState inState ) ; #endif diff --git a/include/wx/mac/wave.h b/include/wx/mac/wave.h index e4934dedf8..4dee426300 100644 --- a/include/wx/mac/wave.h +++ b/include/wx/mac/wave.h @@ -35,10 +35,10 @@ protected: bool Free(); private: - SndChannelPtr m_sndChan; + void* m_sndChan; wxString m_sndname; - SndListHandle m_hSnd; + void* m_hSnd; int m_waveLength; bool m_isResource; }; diff --git a/include/wx/mac/window.h b/include/wx/mac/window.h index 8c226ac79d..513d01e734 100644 --- a/include/wx/mac/window.h +++ b/include/wx/mac/window.h @@ -215,16 +215,16 @@ public: public : static bool MacGetWindowFromPoint( 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 MacDispatchMouseEvent(wxMouseEvent& event ) ; virtual void MacPaintBorders( int left , int top ) ; - WindowRef MacGetRootWindow() const ; + WXWindow MacGetRootWindow() const ; wxTopLevelWindowMac* MacGetTopLevelWindow() const ; - virtual ControlHandle MacGetContainerForEmbedding() ; + virtual WXWidget MacGetContainerForEmbedding() ; virtual long MacGetLeftBorderSize() const ; virtual long MacGetRightBorderSize() const ; @@ -308,23 +308,5 @@ private: 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 // _WX_WINDOW_H_ diff --git a/include/wx/utils.h b/include/wx/utils.h index 9a0bc84d80..c572db72a1 100644 --- a/include/wx/utils.h +++ b/include/wx/utils.h @@ -272,12 +272,6 @@ WXDLLEXPORT const wxMB2WXbuf wxGetUserHome(const wxString& user = wxEmptyString) WXDLLEXPORT wxChar* wxGetUserHome(const wxString& user = wxEmptyString); #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 WXDLLEXPORT bool wxGetDiskSpace(const wxString& path, wxLongLong *pTotal = NULL, diff --git a/include/wx/wx_cw_cm.h b/include/wx/wx_cw_cm.h index 6221f0e57b..4143e251c9 100644 --- a/include/wx/wx_cw_cm.h +++ b/include/wx/wx_cw_cm.h @@ -1,4 +1,4 @@ -#define MSL_USE_PRECOMPILED_HEADERS 1 +#define MSL_USE_PRECOMPILED_HEADERS 0 #if !defined( __MWERKS__ ) #error "this file is only for builds with Metrowerks CodeWarrior" @@ -38,11 +38,15 @@ #endif #elif defined( __WXMAC__) #define USE_PRECOMPILED_MAC_HEADERS 0 /*Set to 0 if you don't want to use precompiled MacHeaders*/ - #include "MacHeaders.c" - #include + #define ACCESSOR_CALLS_ARE_FUNCTIONS 1 + #define OPAQUE_TOOLBOX_STRUCTS 1 + #include + /* + #include #if UNIVERSAL_INTERFACES_VERSION < 0x0340 #error "please update to Apple's lastest universal headers from http://developer.apple.com/sdk/" #endif + */ #endif #define USE_DEFINE -- 2.47.2