X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c5ba48512424b7e543cadfccef304fe170bdf910..ba5619e07600355a9823f9d2dcfab56cdcbbfb07:/include/wx/utils.h diff --git a/include/wx/utils.h b/include/wx/utils.h index 61520916af..533e8a489e 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,39 @@ 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, + WXHINSTANCE module = 0); + + // 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, + WXHINSTANCE module = 0); +#endif // MSW + #endif // _WX_UTILSH__