summaryrefslogtreecommitdiff
path: root/atari/treeview.h
diff options
context:
space:
mode:
authorOle Loots <ole@monochrom.net>2013-09-26 01:24:49 +0200
committerOle Loots <ole@monochrom.net>2013-09-26 01:24:49 +0200
commit10e3ad358248595ca1289eeff597351c283f6b45 (patch)
tree4eac88d96e8244cec4e638362a5240a0cd7c59ee /atari/treeview.h
parentdacd02e955d398e2556ae7f70de37b611d383c24 (diff)
downloadnetsurf-10e3ad358248595ca1289eeff597351c283f6b45.tar.gz
netsurf-10e3ad358248595ca1289eeff597351c283f6b45.tar.bz2
Added about dialog, fixed scrolled treeview redraw.
Diffstat (limited to 'atari/treeview.h')
-rw-r--r--atari/treeview.h59
1 files changed, 57 insertions, 2 deletions
diff --git a/atari/treeview.h b/atari/treeview.h
index fb4e659a0..4412b1dfc 100644
--- a/atari/treeview.h
+++ b/atari/treeview.h
@@ -23,6 +23,11 @@
#include "atari/gui.h"
#include "atari/gemtk/gemtk.h"
+/**
+ * Default AES Window widgets for a treeview window, can be passed to
+ * atari_treeview_create as the flags parameter to have an standardized treeview
+ * window.
+ */
#define ATARI_TREEVIEW_WIDGETS (CLOSER | MOVER | SIZER| NAME | FULLER | \
SMALLER | VSLIDE | HSLIDE | UPARROW | DNARROW \
| LFARROW | RTARROW)
@@ -36,9 +41,14 @@ enum treeview_area_e {
struct core_window;
struct atari_treeview_window;
-typedef struct atari_treeview_window *ATARI_TREEVIEW_PTR;
+/**
+ * The atari treeview implementation wraps the core_window callbacks
+ * So that it can process parameters and then it passes the event further
+ * To the specific implementation window.
+ * These callbacks must be implemented by any atari treeview window.
+ */
-// TODO: add drag_status callback!!
+// TODO: add drag_status callback
typedef nserror (*atari_treeview_init2_callback)(struct core_window *cw,
struct core_window_callback_table * default_callbacks);
typedef void (*atari_treeview_finish_callback)(struct core_window *cw);
@@ -60,20 +70,65 @@ struct atari_treeview_callbacks {
gemtk_wm_event_handler_f gemtk_user_func;
};
+/**
+ * Initalize an window to be an treeview window.
+ *
+*/
struct core_window *atari_treeview_create(GUIWIN *win,
struct atari_treeview_callbacks * callbacks,
void * user_data, uint32_t flags);
+/**
+ * Free the Treeview, but not the gemtk window used for the treeview.
+*/
void atari_treeview_delete(struct core_window *cw);
+
+/**
+ * Open the treeview window.
+ */
void atari_treeview_open(struct core_window *cw, GRECT *pos);
+
+/**
+ * Returns the window "open" state.
+*/
bool atari_treeview_is_open(struct core_window *cw);
+
+/**
+ * Closes (hides) the treeview window.
+*/
void atari_treeview_close(struct core_window *cw);
+
+/**
+ * Get the window manager window handle
+ */
+
GUIWIN * atari_treeview_get_gemtk_window(struct core_window *cw);
+
+/**
+ * Get an specific area inside the window.
+*/
void atari_treeview_get_grect(struct core_window *cw, enum treeview_area_e mode,
GRECT *dest);
+
+/**
+ * Process all pending redraw requests for a single treeview
+ */
void atari_treeview_redraw(struct core_window *cw);
+
+/**
+ * Attach arbitary user data to the treeview.
+*/
void atari_treeview_set_user_data(struct core_window *cw,
void *user_data_ptr);
+
+/**
+ * Return the arbitary user data set by atari_treeview_set_user_data()
+ */
void *atari_treeview_get_user_data(struct core_window *cw);
+
+/**
+ * Process all redraw request of all open Treeview windows
+*/
void atari_treeview_flush_redraws(void);
+
#endif //NSATARI_TREEVIEW_H