]> git.saurik.com Git - wxWidgets.git/commitdiff
removing dependancy on mac headers from public wx headers
authorStefan Csomor <csomor@advancedconcepts.ch>
Fri, 4 Jan 2002 17:13:39 +0000 (17:13 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Fri, 4 Jan 2002 17:13:39 +0000 (17:13 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13368 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

35 files changed:
include/wx/cmndata.h
include/wx/mac/aga.h
include/wx/mac/app.h
include/wx/mac/bitmap.h
include/wx/mac/brush.h
include/wx/mac/button.h
include/wx/mac/checkbox.h
include/wx/mac/choice.h
include/wx/mac/colour.h
include/wx/mac/combobox.h
include/wx/mac/control.h
include/wx/mac/dataform.h
include/wx/mac/dc.h
include/wx/mac/dcprint.h
include/wx/mac/dnd.h
include/wx/mac/font.h
include/wx/mac/icon.h
include/wx/mac/listbox.h
include/wx/mac/menuitem.h
include/wx/mac/metafile.h
include/wx/mac/notebook.h
include/wx/mac/private.h
include/wx/mac/radiobut.h
include/wx/mac/scrolbar.h
include/wx/mac/slider.h
include/wx/mac/spinbutt.h
include/wx/mac/timer.h
include/wx/mac/toolbar.h
include/wx/mac/tooltip.h
include/wx/mac/toplevel.h
include/wx/mac/uma.h
include/wx/mac/wave.h
include/wx/mac/window.h
include/wx/utils.h
include/wx/wx_cw_cm.h

index 2b4063f3179aa213b10faee87d8837a35449a6fd..4bc6a83a3958af45d9b9ae927bd47098edaf6a74 100644 (file)
@@ -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
 
index c251146d8ba1db02ff70b7e51cfb55298515840f..652736f27add1cf94ab9883d5da856def4a561b7 100644 (file)
@@ -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
index 50c0d60f835e1d42bba677b6f7524dbe0638779f..dff98e0bd5d2dce24578f99dc0e4001bd78f115c 100644 (file)
@@ -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
index 47ff793ac0781f095be5ffe0eeb2861686b39757..1760cca7b8b7412ed0a557e1691bec4c5398bbea 100644 (file)
@@ -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);
 };
index fa36e7f184eafded42443c28b714a44595b04ccb..0fbf59175300e11bde00bc54879aba0a1312b22e 100644 (file)
@@ -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) ; }
 
index 680652b3e75550bd474e17db0c0b8a774f30a25b..12faee340c3c4403710773d9529a7ef10be9c12b 100644 (file)
@@ -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();
index 94a2fdceebf6b4245ac90c67acf2fa4a07cf565e..d23f724525842be616af5a75442d7361c02a52d2 100644 (file)
@@ -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);
 };
 
index 3f796ac07066411ce41b9a0c2db490533658fd8d..998f06d20329dce6c9bdfb0b63650b3294a7c47a 100644 (file)
@@ -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
index 3369e9006b172238032d01916696009fceabf955..c290cbefd61c943ca31a652edceabadc9e19fe37 100644 (file)
@@ -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)
index 6fda37448e5c5a472171bc40a4d3e907f5b714b9..c8d91061cf685388a79a72b247d2abb3d736a552 100644 (file)
@@ -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
index b7e84398be47e1d2df98e14136a4adf175fe3bc5..02f59ad05e409305c0a23dbf155b6f8a480c4344 100644 (file)
@@ -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
index 3492479d268ea3efc3368e400150aedffdf98cbf..d9267a9981fb0e6bbd9c70f874a0e99d79f1b9bc 100644 (file)
@@ -15,7 +15,7 @@
 class wxDataFormat
 {
 public:
-    typedef OSType NativeFormat;
+    typedef unsigned long NativeFormat;
 
     wxDataFormat();
     wxDataFormat(wxDataFormatId vType);
index 06bf7595ba9550ece2932e6475af8d3b06ebdc3a..115742d7966534ebeac7a09ec38cf431d4ede458 100644 (file)
@@ -21,7 +21,6 @@
 #include "wx/icon.h"
 #include "wx/font.h"
 #include "wx/gdicmn.h"
-#include "wx/mac/aga.h"
 
 //-----------------------------------------------------------------------------
 // constants
 
 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
index b06714920c6be97b881eae41a04cfabb05d2a6b3..05d8d6ac9128b6aef45c16001ca62891240fbca7 100644 (file)
@@ -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
 };
 
index 746dc91a259e0500096af2521bfddb6e2f3b65b8..ee95777c01ce6bee929f7258e7a710504a6a6d2b 100644 (file)
@@ -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
index e65149037e90a6ac88b85ed0d2402464ea824aa8..220900327af64810b51b27b000d42a007d21c6d3 100644 (file)
@@ -72,7 +72,7 @@ protected:
 public :
        short           m_macFontNum ;
        short           m_macFontSize ;
-       Style           m_macFontStyle ;
+       unsigned char m_macFontStyle ;
 public :
        void            MacFindFont() ;
 };
index e24b58316e8c01daf4fc3c6a0f03ac17e7ba88f7..c128f242aa3d0c730b26011fbf8319b21b10b34f 100644 (file)
@@ -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; }
index 18b4149d8879b62fbc29cf847c7341cefb28dd8a..0d1f1f7ad5f36ce327b1185db5b5343dec9d5539 100644 (file)
@@ -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 ;
index cf7a2c57f26d8401ddcfab5ee4922cfab81b7e16..e6478ebe7df0df7e76e1039084700bfe079205e3 100644 (file)
@@ -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
index 17ffbc08664305e538c59b135c3ca2baf5793a83..393cca992e695bd781878258d135a3416c4d400f 100644 (file)
@@ -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; }
index ca4338f6194ebb2109b81d46e39cb0db56de0608..188bde8cfb1be9ec4c7b635397ab4c1746a9fc0a 100644 (file)
@@ -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();
 
index 922c17243634bf2f773376532864ad283f6340ff..c7d5bedf729c230445dcb517f90444496180163e 100644 (file)
@@ -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
 /////////////////////////////////////////////////////////////////////////////
 
 
 #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
     // _WX_PRIVATE_H_
index eb92a106145a35c850c696a2cf214f37853f3718..752fa59b46afab06baffa43166d614bf297bb8e1 100644 (file)
@@ -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;}
index 62f85a3437312111751626edfdcdee13d8c3f7da..9efad2dfd0ec0b649afb04e3dc720eb43c0238fd 100644 (file)
@@ -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;
index b5dd7e48e76300579c98fb73f511636d8aa9419b..44f8719b0501665e1edb4c1b1e5e9d6438f48e76 100644 (file)
@@ -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 ;
index 934888ee06c5ccf352e322f483be20035bea11fb..c55b84a0b2351ff4402049257d9642b0eaf35483 100644 (file)
@@ -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;
index 1c4469e9a55b759ab98c5d1e21a5f54d4753b800..a050d3a1c30717894bacad4d55415f904a24a6dc 100644 (file)
 
 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:
index 7b7c38456fa7ae02dfec2b16e5b43cb3eb7085f5..f624258df98852e3e4561b2a281213cf2a5a28a1 100644 (file)
@@ -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) ;
index 240ad50356fc51e06d81b6d25a11bb57467dab79..7398a01e4b694062b4d92c1c555b290da19c335c 100644 (file)
@@ -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
     // -------------------------------
index c005292f65c0c02688ed527663af0031790e201a..06b677c50a27c09bfe732d4935b024ba89c9cd67 100644 (file)
@@ -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) ;
 
 
index 11e9cb7c5d9c1120e06f9fc0c8b09b413f2e21b5..6a7de05e46ba586e5d21f379833824ce3f16e9da 100644 (file)
 #ifndef H_UMA
 #define H_UMA
 
-#if defined(__POWERPC__)
-    #if defined(__DARWIN__)
-        #include <Carbon/Carbon.h>
-    #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
index e4934dedf802d0b4a91d755de568ce947f20a926..4dee42630097771740c973cd2e38f6024f572837 100644 (file)
@@ -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;
 };
index 8c226ac79d185785ab33e3c1b51cb91ede490b43..513d01e7347c814f015aec90aaadad6f2676fcd6 100644 (file)
@@ -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_
index 9a0bc84d80bc6e0996c5d1878e2c9ba1e0b14744..c572db72a145def0e83cb9b7cc5c1cd53ad244e2 100644 (file)
@@ -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,
index 6221f0e57b1e6da0abd1932b835512b141d609fb..4143e251c9f263b77a8ee62a3a8fbd4b74ca0a4a 100644 (file)
@@ -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"
     #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 <ansi_prefix.mac.h>
+         #define ACCESSOR_CALLS_ARE_FUNCTIONS 1
+    #define OPAQUE_TOOLBOX_STRUCTS 1
+      #include <ansi_prefix.mac.h>
+      /*
+      #include <MacTypes.h>
                #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