X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/90a77e64841dfcaf37103b6411987402739baa0b..52170c5b4419c63d6e0083df411aad420395ec98:/include/wx/utils.h diff --git a/include/wx/utils.h b/include/wx/utils.h index a50c70ad8a..6fe0851075 100644 --- a/include/wx/utils.h +++ b/include/wx/utils.h @@ -23,8 +23,8 @@ #include "wx/gdicmn.h" #endif -class WXDLLIMPEXP_BASE wxArrayString; -class WXDLLIMPEXP_BASE wxArrayInt; +class WXDLLIMPEXP_FWD_BASE wxArrayString; +class WXDLLIMPEXP_FWD_BASE wxArrayInt; // need this for wxGetDiskSpace() as we can't, unfortunately, forward declare // wxLongLong @@ -46,10 +46,10 @@ class WXDLLIMPEXP_BASE wxArrayInt; // Forward declaration // ---------------------------------------------------------------------------- -class WXDLLIMPEXP_CORE wxProcess; -class WXDLLIMPEXP_CORE wxFrame; -class WXDLLIMPEXP_CORE wxWindow; -class WXDLLIMPEXP_CORE wxWindowList; +class WXDLLIMPEXP_FWD_CORE wxProcess; +class WXDLLIMPEXP_FWD_CORE wxFrame; +class WXDLLIMPEXP_FWD_CORE wxWindow; +class WXDLLIMPEXP_FWD_CORE wxWindowList; // ---------------------------------------------------------------------------- // Macros @@ -212,6 +212,7 @@ public: wxMouseState() : m_x(0), m_y(0), m_leftDown(false), m_middleDown(false), m_rightDown(false), + m_aux1Down(false), m_aux2Down(false), m_controlDown(false), m_shiftDown(false), m_altDown(false), m_metaDown(false) {} @@ -222,6 +223,8 @@ public: bool LeftDown() { return m_leftDown; } bool MiddleDown() { return m_middleDown; } bool RightDown() { return m_rightDown; } + bool Aux1Down() { return m_aux1Down; } + bool Aux2Down() { return m_aux2Down; } bool ControlDown() { return m_controlDown; } bool ShiftDown() { return m_shiftDown; } @@ -242,6 +245,8 @@ public: void SetLeftDown(bool down) { m_leftDown = down; } void SetMiddleDown(bool down) { m_middleDown = down; } void SetRightDown(bool down) { m_rightDown = down; } + void SetAux1Down(bool down) { m_aux1Down = down; } + void SetAux2Down(bool down) { m_aux2Down = down; } void SetControlDown(bool down) { m_controlDown = down; } void SetShiftDown(bool down) { m_shiftDown = down; } @@ -255,6 +260,8 @@ private: bool m_leftDown : 1; bool m_middleDown : 1; bool m_rightDown : 1; + bool m_aux1Down : 1; + bool m_aux2Down : 1; bool m_controlDown : 1; bool m_shiftDown : 1; @@ -478,6 +485,9 @@ wxDEPRECATED( inline bool wxSetEnv(const wxString& var, int value) ); inline bool wxSetEnv(const wxString& var, int value) { wxASSERT_MSG( value == 0, "using non-NULL integer as string?" ); + + wxUnusedVar(value); // fix unused parameter warning in release build + return wxUnsetEnv(var); } #endif // WXWIN_COMPATIBILITY_2_8 @@ -512,13 +522,10 @@ WXDLLIMPEXP_BASE wxString wxGetUserName(); WXDLLIMPEXP_BASE wxString wxGetHomeDir(); WXDLLIMPEXP_BASE const wxChar* wxGetHomeDir(wxString *pstr); -// Get the user's home dir (caller must copy --- volatile) -// returns NULL is no HOME dir is known -#if defined(__UNIX__) && wxUSE_UNICODE && !defined(__WINE__) -WXDLLIMPEXP_BASE const wxMB2WXbuf wxGetUserHome(const wxString& user = wxEmptyString); -#else -WXDLLIMPEXP_BASE wxChar* wxGetUserHome(const wxString& user = wxEmptyString); -#endif +// Get the user's (by default use the current user name) home dir, +// return empty string on error +WXDLLIMPEXP_BASE wxString wxGetUserHome(const wxString& user = wxEmptyString); + #if wxUSE_LONGLONG typedef wxLongLong wxDiskspaceSize_t; @@ -531,6 +538,18 @@ WXDLLIMPEXP_BASE bool wxGetDiskSpace(const wxString& path, wxDiskspaceSize_t *pTotal = NULL, wxDiskspaceSize_t *pFree = NULL); + + +extern "C" +{ +typedef int (wxCMPFUNC_CONV *CMPFUNCDATA)(const void* pItem1, const void* pItem2, const void* user_data); +} + + +WXDLLIMPEXP_BASE void wxQsort(void *const pbase, size_t total_elems, + size_t size, CMPFUNCDATA cmp, const void* user_data); + + #if wxUSE_GUI // GUI only things from now on // ---------------------------------------------------------------------------- @@ -574,7 +593,7 @@ wxDEPRECATED( ); #if wxUSE_ACCEL -class WXDLLEXPORT wxAcceleratorEntry; +class WXDLLIMPEXP_FWD_CORE wxAcceleratorEntry; // use wxAcceleratorEntry::Create() or FromString() methods instead wxDEPRECATED( @@ -686,7 +705,7 @@ void WXDLLEXPORT wxGetMousePosition( int* x, int* y ); #if defined(__X__) || defined(__WXGTK__) #ifdef __WXGTK__ - void *wxGetDisplay(); + WXDLLIMPEXP_CORE void *wxGetDisplay(); #endif #ifdef __X__