From: Stefan Csomor Date: Fri, 16 Nov 2007 20:52:54 +0000 (+0000) Subject: cleanup X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/623633eea9e42ac539aa68af2b20785dbdd16db2 cleanup git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49999 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/defs.h b/include/wx/defs.h index 11c305c7a3..1546679918 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -2513,42 +2513,23 @@ typedef unsigned short WXWORD; typedef WX_OPAQUE_TYPE(CIconHandle ) * WXHICON ; typedef WX_OPAQUE_TYPE(PicHandle ) * WXHMETAFILE ; - - -/* typedef void* WXWidget; */ -/* typedef void* WXWindow; */ typedef WX_OPAQUE_TYPE(ControlRef ) * WXWidget ; typedef WX_OPAQUE_TYPE(WindowRef) * WXWindow ; + typedef void* WXDisplay; -/* typedef WindowPtr WXHWND; */ -/* typedef Handle WXHANDLE; */ -/* typedef CIconHandle WXHICON; */ -/* typedef unsigned long WXHFONT; */ -/* typedef MenuHandle WXHMENU; */ -/* typedef unsigned long WXHPEN; */ -/* typedef unsigned long WXHBRUSH; */ -/* typedef unsigned long WXHPALETTE; */ -/* typedef CursHandle WXHCURSOR; */ -/* typedef RgnHandle WXHRGN; */ -/* typedef unsigned long WXHACCEL; */ -/* typedef unsigned long WXHINSTANCE; */ -/* typedef unsigned long WXHIMAGELIST; */ -/* typedef unsigned long WXHGLOBAL; */ -/* typedef GrafPtr WXHDC; */ -/* typedef unsigned int WXWPARAM; */ -/* typedef long WXLPARAM; */ -/* typedef void * WXRGNDATA; */ -/* typedef void * WXMSG; */ -/* typedef unsigned long WXHCONV; */ -/* typedef unsigned long WXHKEY; */ -/* typedef void * WXDRAWITEMSTRUCT; */ -/* typedef void * WXMEASUREITEMSTRUCT; */ -/* typedef void * WXLPCREATESTRUCT; */ -/* typedef int (*WXFARPROC)(); */ - -/* typedef WindowPtr WXWindow; */ -/* typedef ControlHandle WXWidget; */ +// a few native types + +typedef const void * CFTypeRef; + +typedef const struct __CFString * CFStringRef; +typedef struct __CFString * CFMutableStringRef; + +typedef struct __CFRunLoopSource * CFRunLoopSourceRef; + +#define DECLARE_WXMAC_OPAQUE_REF( name ) typedef struct Opaque##name* name; + +DECLARE_WXMAC_OPAQUE_REF( PasteboardRef ); #endif diff --git a/include/wx/fontdlg.h b/include/wx/fontdlg.h index 43dfd3d764..00f2d19f01 100644 --- a/include/wx/fontdlg.h +++ b/include/wx/fontdlg.h @@ -74,7 +74,7 @@ inline bool wxFontDialogBase::Create(wxWindow *parent, const wxFontData *data) // platform-specific wxFontDialog implementation // ---------------------------------------------------------------------------- -#if defined( __WXMAC_OSX__ ) && ( MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2 ) +#if defined( __WXMAC_OSX__ ) //set to 1 to use native mac font and color dialogs #define USE_NATIVE_FONT_DIALOG_FOR_MACOSX 1 #else diff --git a/include/wx/gsocket.h b/include/wx/gsocket.h index ade7734433..46af715357 100644 --- a/include/wx/gsocket.h +++ b/include/wx/gsocket.h @@ -174,8 +174,6 @@ GSocketError GAddress_UNIX_GetPath(GAddress *address, char *path, size_t sbuf); # if defined(__WINDOWS__) # include "wx/msw/gsockmsw.h" -# elif defined(__WXMAC__) && !defined(__DARWIN__) -# include "wx/mac/gsockmac.h" # else # include "wx/unix/gsockunx.h" # endif diff --git a/include/wx/imaglist.h b/include/wx/imaglist.h index 9c76fdc2e6..f4468e216f 100644 --- a/include/wx/imaglist.h +++ b/include/wx/imaglist.h @@ -40,7 +40,7 @@ enum #define wxIMAGELIST_DRAW_SELECTED 0x0004 #define wxIMAGELIST_DRAW_FOCUSED 0x0008 -#if defined(__WXMSW__) || defined(__WXMAC_CARBON__) +#if defined(__WXMSW__) || defined(__WXMAC__) #define wxHAS_NATIVE_IMAGELIST #endif @@ -48,7 +48,7 @@ enum #include "wx/generic/imaglist.h" #elif defined(__WXMSW__) #include "wx/msw/imaglist.h" -#elif defined(__WXMAC_CARBON__) +#elif defined(__WXMAC__) #include "wx/mac/imaglist.h" #endif diff --git a/include/wx/platform.h b/include/wx/platform.h index b11bad042a..f57d0d8820 100644 --- a/include/wx/platform.h +++ b/include/wx/platform.h @@ -32,7 +32,7 @@ #ifdef __WXMAC__ # if defined(__MACH__) # define __WXMAC_OSX__ -# define __WXMAC_CARBON__ +# define __WXMAC_CARBON__ /* for backwards compat in user code still defined */ # include # ifndef MAC_OS_X_VERSION_10_4 # define MAC_OS_X_VERSION_10_4 1040 @@ -45,11 +45,7 @@ # include "wx/mac/carbon/config_xcode.h" # endif # else -# if TARGET_CARBON -# define __WXMAC_CARBON__ -# else -# define __WXMAC_CLASSIC__ -# endif +# error "only mach-o configurations are supported" # endif #endif diff --git a/include/wx/srchctrl.h b/include/wx/srchctrl.h index 2fd1170180..e57078cc7f 100644 --- a/include/wx/srchctrl.h +++ b/include/wx/srchctrl.h @@ -17,8 +17,7 @@ #include "wx/textctrl.h" -#if !defined(__WXUNIVERSAL__) && defined(__WXMAC__) && defined(__WXMAC_OSX__) \ - && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_3) +#if !defined(__WXUNIVERSAL__) && defined(__WXMAC__) // search control was introduced in Mac OS X 10.3 Panther #define wxUSE_NATIVE_SEARCH_CONTROL 1 diff --git a/include/wx/string.h b/include/wx/string.h index b70306b886..2d79486f83 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -934,7 +934,7 @@ public: wxString(const wxString& stringSrc) : m_impl(stringSrc.m_impl) { } // string containing nRepeat copies of ch - wxString(wxUniChar ch, size_t nRepeat = 1) + wxString(wxUniChar ch, size_t nRepeat = 1 ) { assign(nRepeat, ch); } wxString(size_t nRepeat, wxUniChar ch) { assign(nRepeat, ch); } @@ -1372,11 +1372,7 @@ public: #if wxUSE_WCHAR_T const wxWCharBuffer wc_str(const wxMBConv& conv = wxConvLibc) const; #endif // wxUSE_WCHAR_T -#ifdef __WXOSX__ const wxCharBuffer fn_str() const { return wxConvFile.cWC2WX( wc_str( wxConvLocal ) ); } -#else - const wxChar* fn_str() const { return c_str(); } -#endif #endif // Unicode/ANSI // overloaded assignment diff --git a/include/wx/taskbar.h b/include/wx/taskbar.h index 6925331730..37af90055a 100644 --- a/include/wx/taskbar.h +++ b/include/wx/taskbar.h @@ -61,7 +61,7 @@ private: #include "wx/msw/taskbar.h" #elif defined(__WXGTK__) || defined(__WXX11__) || defined(__WXMOTIF__) #include "wx/unix/taskbarx11.h" -#elif defined (__WXMAC__) && defined(__WXMAC_OSX__) +#elif defined (__WXMAC__) #include "wx/mac/taskbarosx.h" #elif defined (__WXCOCOA__) #include "wx/cocoa/taskbar.h"