include/SDL_system.h
changeset 8420 99dc85ad173c
parent 8405 fe893b2d6f4d
child 8439 14d94a8a9fb6
     1.1 --- a/include/SDL_system.h	Sat Feb 09 20:30:53 2013 -0500
     1.2 +++ b/include/SDL_system.h	Sat Feb 09 22:48:19 2013 -0500
     1.3 @@ -96,44 +96,46 @@
     1.4  /* Platform specific functions for Windows RT */
     1.5  #if defined(__WINRT__) && __WINRT__
     1.6  
     1.7 -/* Gets the path to the installed app's root directory.
     1.8 -
     1.9 -   This function may be used safely on Windows Phone 8.
    1.10 -*/
    1.11 -extern DECLSPEC const wchar_t * SDLCALL SDL_WinRTGetInstalledLocationPath();
    1.12 +/**
    1.13 + *  \brief Windows RT / Windows Phone path types
    1.14 + */
    1.15 +typedef enum
    1.16 +{
    1.17 +    /** \brief The installed app's root directory.
    1.18 +        Files here are likely to be read-only. */
    1.19 +    SDL_WINRT_PATH_INSTALLED_LOCATION,
    1.20  
    1.21 -/* Gets the path to the local app data store.
    1.22 -   Files and directories that should be limited to the local device can be
    1.23 -   created in this path.
    1.24 +    /** \brief The app's local data store.  Files may be written here */
    1.25 +    SDL_WINRT_PATH_LOCAL_FOLDER,
    1.26  
    1.27 -   This function may be used safely on Windows Phone 8, as opposed to
    1.28 -   SDL_WinRTGetRoamingFolderPath() and SDL_WinRTGetTemporaryFolderPath(),
    1.29 -   which do not work on Windows Phone 8 (and will return NULL if called
    1.30 -   from this platform).
    1.31 - */
    1.32 -extern DECLSPEC const wchar_t * SDLCALL SDL_WinRTGetLocalFolderPath();
    1.33 +    /** \brief The app's roaming data store.  Unsupported on Windows Phone.
    1.34 +        Files written here may be copied to other machines via a network
    1.35 +        connection.
    1.36 +    */
    1.37 +    SDL_WINRT_PATH_ROAMING_FOLDER,
    1.38  
    1.39 -/* Gets the path to the roaming app data store.
    1.40 -   Files and directories that should roam to different devices can be
    1.41 -   created in this path.  Be sure to read Microsoft's documentation on
    1.42 -   roaming files for more information on how this works, as restrictions
    1.43 -   do apply.
    1.44 +    /** \brief The app's temporary data store.  Unsupported on Windows Phone.
    1.45 +        Files written here may be deleted at any time. */
    1.46 +    SDL_WINRT_PATH_TEMP_FOLDER
    1.47 +} SDL_WinRT_Path;
    1.48 +
    1.49  
    1.50 -   Please note that on Windows Phone 8, this function will return NULL,
    1.51 -   as Windows Phone 8 apps do not have an accessible roaming app data
    1.52 -   store.
    1.53 +/**
    1.54 + *  \brief Retrieves a Windows RT defined path on the local file system
    1.55 + *
    1.56 + *  \note Documentation on most app-specific path types on Windows RT
    1.57 + *      can be found on MSDN, at the URL:
    1.58 + *      http://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx
    1.59 + *
    1.60 + *  \param pathType The type of path to retrieve.
    1.61 + *  \ret A UCS-2 string (16-bit, wide-char) containing the path, or NULL
    1.62 + *      if the path is not available for any reason.  Not all paths are
    1.63 + *      available on all versions of Windows.  This is especially true on
    1.64 + *      Windows Phone.  Check the documentation for the given
    1.65 + *      SDL_WinRT_Path for more information on which path types are
    1.66 + *      supported where.
    1.67   */
    1.68 -extern DECLSPEC const wchar_t * SDLCALL SDL_WinRTGetRoamingFolderPath();
    1.69 -
    1.70 -/* Gets the path to the temporary app data store.
    1.71 -   Files and directories may be written here, however they may be deleted
    1.72 -   by Windows at a future date.
    1.73 -
    1.74 -   Please note that on Windows Phone 8, this function will return NULL,
    1.75 -   as Windows Phone 8 apps do not have an accessible temporary app data
    1.76 -   store.
    1.77 -*/
    1.78 -extern DECLSPEC const wchar_t * SDLCALL SDL_WinRTGetTemporaryFolderPath();
    1.79 +extern DECLSPEC const wchar_t * SDLCALL SDL_WinRTGetFileSystemPath(SDL_WinRT_Path pathType);
    1.80  
    1.81  #endif /* __WINRT__ */
    1.82