From 5e41fb8a121c441a8765a1962a892e93906cde83 Mon Sep 17 00:00:00 2001 From: Richard Wilson Date: Sun, 7 Nov 2004 19:19:11 +0000 Subject: [project @ 2004-11-07 19:19:11 by rjw] Initial import. svn path=/import/nstheme/; revision=2436 --- riscos/gui.h | 97 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 riscos/gui.h (limited to 'riscos/gui.h') diff --git a/riscos/gui.h b/riscos/gui.h new file mode 100644 index 0000000..54b312c --- /dev/null +++ b/riscos/gui.h @@ -0,0 +1,97 @@ +/* + * 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 2003 Phil Mellor + * Copyright 2004 James Bursa + * Copyright 2004 Andrew Timmins + */ + +#ifndef _NETSURF_RISCOS_GUI_H_ +#define _NETSURF_RISCOS_GUI_H_ + +#include +#include +#include "oslib/osspriteop.h" +#include "oslib/wimp.h" +#include "nstheme/desktop/nstheme.h" +#include "nstheme/desktop/gui.h" +#include "nstheme/desktop/options.h" + +#define THEMES_DIR ".Themes" + +extern char *theme_filename; +extern char *sprite_filename; +extern osspriteop_area *theme_sprites; +extern wimp_w dialog_info, dialog_main, dialog_saveas, dialog_warning; +extern wimp_menu *iconbar_menu, *main_menu, *colour_menu; +extern int iconbar_menu_height; +extern wimp_menu *current_menu; + +struct theme_file_header { + unsigned int magic_value; + unsigned int parser_version; + char name[32]; + char author[64]; + char browser_bg; + char hotlist_bg; + char status_bg; + char status_fg; + char throbber_left; + char future_expansion_1; + char future_expansion_2; + char future_expansion_3; + unsigned int compressed_sprite_size; + unsigned int decompressed_sprite_size; +}; + +/* in gui.c */ +void ro_gui_screen_size(int *width, int *height); +//void ro_gui_drag_box_start(wimp_pointer *pointer); + +/* in menus.c */ +void ro_gui_menus_init(void); +void ro_gui_create_menu(wimp_menu* menu, int x, int y); +void ro_gui_popup_menu(wimp_menu *menu, wimp_w w, wimp_i i); +void ro_gui_menu_selection(wimp_selection* selection); +void ro_gui_menu_warning(wimp_message_menu_warning *warning); + +/* in dialog.c */ +void ro_gui_dialog_init(void); +void ro_gui_dialog_open(wimp_w w); +void ro_gui_dialog_close(wimp_w close); +void ro_gui_dialog_click(wimp_pointer *pointer); +bool ro_gui_dialog_keypress(wimp_key *key); +void ro_gui_dialog_prepare_main(void); + +/* in save.c */ +void ro_gui_save_open(int save_type, int x, int y); +void ro_gui_save_click(wimp_pointer *pointer); +void ro_gui_save_drag_end(wimp_dragged *drag); +void ro_gui_save_datasave_ack(wimp_message *message); +bool ro_gui_load_theme(char *path); + +#define ICON_WARNING_MESSAGE 0 +#define ICON_WARNING_CONTINUE 1 +#define ICON_WARNING_HELP 2 + +#define ICON_MAIN_NAME 3 +#define ICON_MAIN_AUTHOR 5 +#define ICON_MAIN_THROBBER_LEFT 8 +#define ICON_MAIN_REPORT 11 +#define ICON_MAIN_REMOVE 12 +#define ICON_MAIN_BROWSER_COLOUR 16 +#define ICON_MAIN_BROWSER_MENU 17 +#define ICON_MAIN_HOTLIST_COLOUR 19 +#define ICON_MAIN_HOTLIST_MENU 20 +#define ICON_MAIN_STATUSBG_COLOUR 22 +#define ICON_MAIN_STATUSBG_MENU 23 +#define ICON_MAIN_STATUSFG_COLOUR 25 +#define ICON_MAIN_STATUSFG_MENU 26 + +#define ICON_SAVE_ICON 0 +#define ICON_SAVE_PATH 1 +#define ICON_SAVE_OK 2 +#define ICON_SAVE_CANCEL 3 + +#endif -- cgit v1.2.3