summaryrefslogtreecommitdiff
path: root/atari/treeview.h
diff options
context:
space:
mode:
Diffstat (limited to 'atari/treeview.h')
-rw-r--r--atari/treeview.h78
1 files changed, 34 insertions, 44 deletions
diff --git a/atari/treeview.h b/atari/treeview.h
index 4412b1dfc..a6b4a62e9 100644
--- a/atari/treeview.h
+++ b/atari/treeview.h
@@ -1,19 +1,19 @@
-/*
- * Copyright 2013 Ole Loots <ole@monochrom.net>
- *
- * This file is part of NetSurf, http://www.netsurf-browser.org/
- *
- * NetSurf is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * NetSurf is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
+/*
+ * Copyright 2013 Ole Loots <ole@monochrom.net>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef NSATARI_TREEVIEW_H
@@ -28,9 +28,9 @@
* 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)
+#define ATARI_TREEVIEW_WIDGETS (CLOSER | MOVER | SIZER| NAME | FULLER | \
+ SMALLER | VSLIDE | HSLIDE | UPARROW | DNARROW | \
+ LFARROW | RTARROW)
enum treeview_area_e {
TREEVIEW_AREA_WORK = 0,
@@ -48,18 +48,12 @@ struct atari_treeview_window;
* These callbacks must be implemented by any atari treeview window.
*/
-// TODO: add drag_status callback
-typedef nserror (*atari_treeview_init2_callback)(struct core_window *cw,
- struct core_window_callback_table * default_callbacks);
+/** \todo atari 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);
-typedef void (*atari_treeview_keypress_callback)(struct core_window *cw,
- uint32_t ucs4);
-typedef void (*atari_treeview_mouse_action_callback)(struct core_window *cw,
- browser_mouse_state mouse,
- int x, int y);
-typedef void (*atari_treeview_draw_callback)(struct core_window *cw, int x,
- int y, struct rect *clip,
- const struct redraw_context *ctx);
+typedef void (*atari_treeview_keypress_callback)(struct core_window *cw, uint32_t ucs4);
+typedef void (*atari_treeview_mouse_action_callback)(struct core_window *cw, browser_mouse_state mouse, int x, int y);
+typedef void (*atari_treeview_draw_callback)(struct core_window *cw, int x, int y, struct rect *clip, const struct redraw_context *ctx);
struct atari_treeview_callbacks {
atari_treeview_init2_callback init_phase2;
@@ -74,12 +68,11 @@ struct atari_treeview_callbacks {
* 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);
+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);
/**
@@ -89,12 +82,12 @@ 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);
/**
@@ -105,9 +98,8 @@ 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);
+ */
+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
@@ -116,9 +108,8 @@ 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);
+ */
+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()
@@ -127,8 +118,7 @@ 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
-