From 1930cbd7689455bff05dc62438b7d49fec6ad04c Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Mon, 26 Apr 2010 20:50:57 +0000 Subject: [PATCH] Make wxLoadUserResource() declaration available to wxBase too. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64151 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/utils.h | 60 ++++++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 28 deletions(-) diff --git a/include/wx/utils.h b/include/wx/utils.h index 61520916af..18fb415640 100644 --- a/include/wx/utils.h +++ b/include/wx/utils.h @@ -675,34 +675,6 @@ public: void WXDLLIMPEXP_CORE wxGetMousePosition( int* x, int* y ); -// MSW only: get user-defined resource from the .res file. -#ifdef __WXMSW__ - // default resource type for wxLoadUserResource() - extern WXDLLIMPEXP_DATA_BASE(const wxChar*) wxUserResourceStr; - - // Return the pointer to the resource data. This pointer is read-only, use - // the overload below if you need to modify the data. - // - // Returns true on success, false on failure. Doesn't log an error message - // if the resource is not found (because this could be expected) but does - // log one if any other error occurs. - WXDLLIMPEXP_BASE bool - wxLoadUserResource(const void **outData, - size_t *outLen, - const wxString& resourceName, - const wxString& resourceType = wxUserResourceStr); - - // This function allocates a new buffer and makes a copy of the resource - // data, remember to delete[] the buffer. And avoid using it entirely if - // the overload above can be used. - // - // Returns NULL on failure. - WXDLLIMPEXP_BASE char* - wxLoadUserResource(const wxString& resourceName, - const wxString& resourceType = wxUserResourceStr, - int* pLen = NULL); -#endif // MSW - // ---------------------------------------------------------------------------- // X11 Display access // ---------------------------------------------------------------------------- @@ -746,5 +718,37 @@ WXDLLIMPEXP_CORE bool wxYield(); // Like wxYield, but fails silently if the yield is recursive. WXDLLIMPEXP_CORE bool wxYieldIfNeeded(); +// ---------------------------------------------------------------------------- +// Windows resources access +// ---------------------------------------------------------------------------- + +// MSW only: get user-defined resource from the .res file. +#ifdef __WXMSW__ + // default resource type for wxLoadUserResource() + extern WXDLLIMPEXP_DATA_BASE(const wxChar*) wxUserResourceStr; + + // Return the pointer to the resource data. This pointer is read-only, use + // the overload below if you need to modify the data. + // + // Returns true on success, false on failure. Doesn't log an error message + // if the resource is not found (because this could be expected) but does + // log one if any other error occurs. + WXDLLIMPEXP_BASE bool + wxLoadUserResource(const void **outData, + size_t *outLen, + const wxString& resourceName, + const wxString& resourceType = wxUserResourceStr); + + // This function allocates a new buffer and makes a copy of the resource + // data, remember to delete[] the buffer. And avoid using it entirely if + // the overload above can be used. + // + // Returns NULL on failure. + WXDLLIMPEXP_BASE char* + wxLoadUserResource(const wxString& resourceName, + const wxString& resourceType = wxUserResourceStr, + int* pLen = NULL); +#endif // MSW + #endif // _WX_UTILSH__ -- 2.47.2