Mercurial > dwindows
comparison dw.h @ 2790:20d39af27aa4
Android: Add a new function for Android dw_file_open() which will open the
URI that dw_file_browse() now saves at the end of the returned path.
This is a hacky method of letting things function on Android... since
Android seems to not let you open files with a pure path. Even if the file
exists it will fail to open, you need to use the ugly Android URIs.
Not sure if I will keep this solution or not, but committing it so Dynamic
Windows Interface Builder will function on Android in the meantime.
dw_file_open() just calls the system open() on non-Android platforms.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Wed, 13 Jul 2022 14:57:38 +0000 |
parents | 9a3024fe719c |
children | 5c61aba17b69 |
comparison
equal
deleted
inserted
replaced
2789:025b4e3e7e75 | 2790:20d39af27aa4 |
---|---|
2161 void API dw_debug(const char *format, ...); | 2161 void API dw_debug(const char *format, ...); |
2162 int API dw_messagebox(const char *title, int flags, const char *format, ...); | 2162 int API dw_messagebox(const char *title, int flags, const char *format, ...); |
2163 void API dw_environment_query(DWEnv *env); | 2163 void API dw_environment_query(DWEnv *env); |
2164 int API dw_exec(const char *program, int type, char **params); | 2164 int API dw_exec(const char *program, int type, char **params); |
2165 int API dw_browse(const char *url); | 2165 int API dw_browse(const char *url); |
2166 #if defined(__ANDROID__) | |
2167 int API dw_file_open(const char *path, int mode); | |
2168 #else | |
2169 #define dw_file_open(a, b) open(a, b) | |
2170 #endif | |
2166 char * API dw_file_browse(const char *title, const char *defpath, const char *ext, int flags); | 2171 char * API dw_file_browse(const char *title, const char *defpath, const char *ext, int flags); |
2167 char * API dw_user_dir(void); | 2172 char * API dw_user_dir(void); |
2168 char * API dw_app_dir(void); | 2173 char * API dw_app_dir(void); |
2169 int API dw_app_id_set(const char *appid, const char *appname); | 2174 int API dw_app_id_set(const char *appid, const char *appname); |
2170 DWDialog * API dw_dialog_new(void *data); | 2175 DWDialog * API dw_dialog_new(void *data); |