summaryrefslogtreecommitdiff
path: root/riscos/toolbar.h
diff options
context:
space:
mode:
authorRichard Wilson <rjw@netsurf-browser.org>2004-05-04 22:23:44 +0000
committerRichard Wilson <rjw@netsurf-browser.org>2004-05-04 22:23:44 +0000
commite7da747f5f51a71254113552087e07d67efe0851 (patch)
treea031b0e1683678fc4c6f4c95bc181a8b8429cb1f /riscos/toolbar.h
parent1692e9c33d59ba8794d134d5f40cdad9c1572522 (diff)
downloadnetsurf-e7da747f5f51a71254113552087e07d67efe0851.tar.gz
netsurf-e7da747f5f51a71254113552087e07d67efe0851.tar.bz2
[project @ 2004-05-04 22:21:37 by rjw]
Revised GUI. svn path=/import/netsurf/; revision=823
Diffstat (limited to 'riscos/toolbar.h')
-rw-r--r--riscos/toolbar.h84
1 files changed, 84 insertions, 0 deletions
diff --git a/riscos/toolbar.h b/riscos/toolbar.h
new file mode 100644
index 000000000..f54bde320
--- /dev/null
+++ b/riscos/toolbar.h
@@ -0,0 +1,84 @@
+/*
+ * This file is part of NetSurf, http://netsurf.sourceforge.net/
+ * Licensed under the GNU General Public License,
+ * http://www.opensource.org/licenses/gpl-license
+ * Copyright 2004 Richard Wilson <not_ginger_matt@users.sourceforge.net>
+ */
+
+/** \file
+ * Toolbar creation (interface).
+ */
+
+#ifndef _NETSURF_RISCOS_TOOLBAR_H_
+#define _NETSURF_RISCOS_TOOLBAR_H_
+
+#include "oslib/wimp.h"
+
+
+struct toolbar_icon {
+ /* The desired WIMP icon number (-1 for separator)
+ */
+ int icon_number;
+
+ /* Set to non-zero to display the icon
+ */
+ unsigned int available;
+
+ /* Icon dimensions (OS units)
+ */
+ unsigned int width;
+ unsigned int height;
+
+ /* Icon validation, or NULL if this icon is unavailable
+ */
+ unsigned char* validation;
+
+ /* The next icon (linked list)
+ */
+ struct toolbar_icon *next_icon; // Next toolbar icon
+};
+
+
+struct toolbar {
+
+ /* Internal variables
+ */
+ unsigned int resize_status; // Update status width on next reformat?
+ unsigned int update_pending; // Update icons on next reformat?
+ unsigned int icon_width; // Current width of icons
+ int width_internal; // Width actually used on last reformat
+ int status_height; // Status bar height
+ int status_old_width; // Old status width
+ int width; // Toolbar width on last reformat
+ unsigned int height; // Toolbar height on last reformat
+
+ /* General options
+ */
+ unsigned int throbber_width; // Throbber width (0 = unavaiable)
+ unsigned int throbber_height; // Throbber height (0 = unavaiable)
+ unsigned int status_window; // Show status window?
+ unsigned int standard_buttons; // Show standard buttons?
+ unsigned int url_bar; // Show URL bar?
+ unsigned int throbber; // Show Throbber?
+ unsigned int status_width; // Width of status window
+
+ /* The first toolbar icon
+ */
+ struct toolbar_icon *icon;
+
+ /* Window handles
+ */
+ wimp_w toolbar_handle;
+ wimp_w status_handle;
+};
+
+
+struct toolbar *ro_toolbar_create(osspriteop_area *sprite_area, char *url_buffer,
+ char *status_buffer, char *throbber_buffer);
+void ro_toolbar_destroy(struct toolbar *toolbar);
+void ro_toolbar_resize_status(struct toolbar *toolbar, int height);
+int ro_toolbar_reformat(struct toolbar *toolbar, int width);
+void ro_toolbar_status_reformat(struct toolbar *toolbar, int width);
+int ro_toolbar_update(struct toolbar *toolbar);
+
+#endif