summaryrefslogtreecommitdiff
path: root/textscreen/txt_window.h
diff options
context:
space:
mode:
authorSimon Howard2015-04-04 21:29:33 -0400
committerSimon Howard2015-04-04 21:29:33 -0400
commit356554c22998264769a5c516697cbfbd43847ce4 (patch)
tree69e510a287f629685eaa543fbd2677dd165e628a /textscreen/txt_window.h
parent535b4edd143ceeae870e9c13cdac65ce17e2be48 (diff)
downloadchocolate-doom-356554c22998264769a5c516697cbfbd43847ce4.tar.gz
chocolate-doom-356554c22998264769a5c516697cbfbd43847ce4.tar.bz2
chocolate-doom-356554c22998264769a5c516697cbfbd43847ce4.zip
textscreen: Add help URL functionality for windows.
This adds the ability to associate a URL with a window that gives some extra information about it and the configuration options found in it.
Diffstat (limited to 'textscreen/txt_window.h')
-rw-r--r--textscreen/txt_window.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/textscreen/txt_window.h b/textscreen/txt_window.h
index 4d1ec991..412bad4f 100644
--- a/textscreen/txt_window.h
+++ b/textscreen/txt_window.h
@@ -85,6 +85,10 @@ struct txt_window_s
int window_x, window_y;
unsigned int window_w, window_h;
+
+ // URL of a webpage with help about this window. If set, a help key
+ // indicator is shown while this window is active.
+ char *help_url;
};
/**
@@ -194,5 +198,23 @@ void TXT_SetMouseListener(txt_window_t *window,
txt_window_t *TXT_MessageBox(char *title, char *message, ...);
+/**
+ * Set the help URL for the given window.
+ *
+ * @param window The window.
+ * @param help_url String containing URL of the help page for this
+ * window, or NULL to set no help for this window.
+ */
+
+void TXT_SetWindowHelpURL(txt_window_t *window, char *help_url);
+
+/**
+ * Open the help URL for the given window, if one is set.
+ *
+ * @param window The window.
+ */
+
+void TXT_OpenWindowHelpURL(txt_window_t *window);
+
#endif /* #ifndef TXT_WINDOW_H */