Mercurial > dwindows
diff dw.h @ 2795:5c61aba17b69
Android: Change dw_file_browse() to return URIs or paths on Android.
Paths will be returned if either DW_DIRECTORY_OPEN or DW_FILE_PATH flags are
specified. Otherwise a URI may be returned. The double string method of
returning both path and URI has been removed. DW_FILE_PATH and DW_FILE_MASK
have been added, but are really only used on Android.
__DW_MOBILE__ will be defined on Mobile platforms such as iOS and Android.
__DW_DESKTOP__ will be defined on most other desktop operating systems.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Fri, 15 Jul 2022 11:50:09 +0000 |
parents | 20d39af27aa4 |
children | 708bcef0ce6b |
line wrap: on
line diff
--- a/dw.h Fri Jul 15 08:15:11 2022 +0000 +++ b/dw.h Fri Jul 15 11:50:09 2022 +0000 @@ -12,6 +12,13 @@ #define DW_MINOR_VERSION 3 #define DW_SUB_VERSION 0 +/* General application type defines */ +#if defined(__IOS__) || defined(__ANDROID__) +#define __DW_MOBILE__ 1 +#else +#define __DW_DESKTOP__ 1 +#endif + #define DW_HOME_URL "http://dwindows.netlabs.org" /* Support for API deprecation in supported compilers */ @@ -1701,6 +1708,12 @@ #define DW_FILE_OPEN 0 #define DW_FILE_SAVE 1 #define DW_DIRECTORY_OPEN 2 +#ifdef __ANDROID__ +#define DW_FILE_PATH (1 << 16) +#else +#define DW_FILE_PATH 0 +#endif +#define DW_FILE_MASK (0x0000FFFF) #define DW_HORZ 0 #define DW_VERT 1