/* Copyright 1997 Acorn Computers Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /***************************************************/ /* File : Toolbars.h */ /* */ /* Purpose: Toolbar-related functions for the */ /* browser. */ /* */ /* Author : A.D.Hodgkinson */ /* */ /* History: 21-Nov-96: Created. */ /***************************************************/ /* Magic number definitions */ #define InternalBottomLeft 1 #define InternalTopLeft 2 #define ExternalBottomLeft 4 #define ExternalTopLeft 8 /* The range of messages that can be in the status bar. */ /* These are defined in order of priority, the first */ /* having the lowest. Items which decay are not worked */ /* out by toolbars_update_status, and must be set */ /* explicitly with toolbars_update_specific_status. */ typedef enum status_type { Toolbars_Status_NoType = -1, /* To indicate no current status at all */ Toolbars_Status_Ready, /* Just 'ready', no other info */ Toolbars_Status_Viewing, /* Viewing '(URL / title)' */ Toolbars_Status_Formatting, /* Formatting '(URL)' */ Toolbars_Status_Processing, /* Processing '(URL)' */ Toolbars_Status_GetPics, /* Number of images being fetched */ Toolbars_Status_Fetching, /* Fetching '(URL)' */ Toolbars_Status_LinkTo, /* Showing a link to something (decays) */ Toolbars_Status_Help /* Showing interactive help (decays) */ } status_type; /* Function prototypes */ ObjectId toolbars_get_upper (browser_data * b); ObjectId toolbars_get_lower (browser_data * b); void toolbars_set_presence (browser_data * b, unsigned int flags); void toolbars_move_gadgets (browser_data * p); int toolbars_animation (int eventcode, WimpPollBlock * b, IdBlock * idb, browser_data * handle); int toolbars_animation_drift (int eventcode, WimpPollBlock * b, IdBlock * idb, browser_data * handle); int toolbars_animate_slow (int eventcode, WimpPollBlock * b, IdBlock * idb, void * handle); void toolbars_hide_cgi (char * url); void toolbars_hide_internal (char * iurl); _kernel_oserror * toolbars_update_status (browser_data * b, status_type type); _kernel_oserror * toolbars_cancel_status (browser_data * b, status_type type); int toolbars_timeout_status (int eventcode, WimpPollBlock * b, IdBlock * idb, browser_data * handle); _kernel_oserror * toolbars_remove_status_item (browser_data * b, browser_data * ancestor); void toolbars_update_progress (browser_data * b); void toolbars_update_url (browser_data * b); _kernel_oserror * toolbars_update_dialler_time (browser_data * b); _kernel_oserror * toolbars_update_dialler_status (browser_data * b); int toolbars_button_height (browser_data * b); int toolbars_url_height (browser_data * b); int toolbars_status_height (browser_data * b); _kernel_oserror * toolbars_set_button_states (browser_data * b); _kernel_oserror * toolbars_set_all_button_states (void); void toolbars_merged_to_status (browser_data * b, ObjectId t); void toolbars_merged_to_url (browser_data * b, ObjectId t); void toolbars_set_bistate_state (browser_data * b, ObjectId t, int state); void toolbars_set_tristate_state (browser_data * b, ObjectId t, int state);