summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorAdrian Lees <adrian@aemulor.com>2005-04-23 02:58:27 +0000
committerAdrian Lees <adrian@aemulor.com>2005-04-23 02:58:27 +0000
commit9c1cb7bb2d712048f18a02441068b91d727cbcad (patch)
tree7f4103399172d7865ff7cc1ed1536a14f27dece3 /utils
parent3d067e2fd635d4e92ea00f939b5ee98e59a851b8 (diff)
downloadnetsurf-9c1cb7bb2d712048f18a02441068b91d727cbcad.tar.gz
netsurf-9c1cb7bb2d712048f18a02441068b91d727cbcad.tar.bz2
[project @ 2005-04-23 02:58:27 by adrianl]
Query windows, desktop save protocol, confirm abort/quit when downloads in progress svn path=/import/netsurf/; revision=1679
Diffstat (limited to 'utils')
-rw-r--r--utils/utils.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/utils/utils.h b/utils/utils.h
index e005fcbf7..9bd43a2f3 100644
--- a/utils/utils.h
+++ b/utils/utils.h
@@ -29,6 +29,25 @@
#define max(x,y) (((x)>(y))?(x):(y))
#endif
+enum query_response {
+ QUERY_CONTINUE,
+ QUERY_YES,
+ QUERY_NO,
+ QUERY_ESCAPE
+};
+
+typedef int query_id;
+
+#define QUERY_INVALID ((query_id)-1)
+
+typedef struct
+{
+ void (*confirm)(query_id id, enum query_response res, void *pw);
+ void (*cancel)(query_id, enum query_response res, void *pw);
+ void (*escape)(query_id, enum query_response res, void *pw);
+} query_callback;
+
+
char * strip(char * const s);
int whitespace(const char * str);
char * squash_whitespace(const char * s);
@@ -45,6 +64,8 @@ char *human_friendly_bytesize(unsigned long bytesize);
/* Platform specific functions */
void die(const char * const error);
void warn_user(const char *warning, const char *detail);
+query_id query_user(const char *query, const char *detail, const query_callback *cb, void *pw);
+void query_close(query_id);
const char *local_encoding_name(void);
#endif