• Andrew Hodgkinson's avatar
    First a minor warning - the various Res files are out of sync in this build. · 7656a1b3
    Andrew Hodgkinson authored
    Only the Browse resources are currently valid.
    
    Added Utils.Icons - has a few archives inside containing the resources
    (well, some of them) used to build various UI sprites for various builds.
    Archived because these are unlikely to change much, and putting them on
    CVS was a move to, well, archive the stuff...
    
    SaveDBox objects vanquished and requirements in !Run[D] files removed. The
    data save code fits much more neatly in amongst the data load protocol
    stuff now (with the slight exception of having to split the SaveObject
    source into SaveObject and SaveFile - the former handles multiple persistent
    dialogues for Shift+Click on links and the like, the latter handles 'one at
    a time' transient dialogues for save source and similar). Export Link is now
    supported, too, and writes a 'proper' version URI file. You'll find that
    double-clicking on old URI files will work as the URI handler picks them up,
    whilst new version ones don't; however, dragging onto the browser will only
    work with new version files. Note that support for saving and loading URL
    files (ANT suite stuff) is present too, so old URI files can be typed as URL
    files if you want to keep them working without modification - the URI
    handler itself will hopefully support the defined URI file format soon;
    double-clicking on old URI files will stop working at that point. Note
    there are *lots* of changes in every Res file to support all this. This may
    all seem a bit pointless to some, but the changes do in fact make it very
    easy to add new save dialogues all over the place. Certainly much easier
    than with the previous system, anyway. In fact, post script, image
    'save as sprite' took about half an hour, which I hope proves the worth
    of the new system.
    
    Merged in newer hotlist code with support for drag cancelling with Escape
    (all relevant Res files appropriately updated) and cancelling scrolling
    when you've reached the window scroll limit. Had to move some of the
    Wimp message handling stuff to the central Protocols source, as clashes
    were occuring, and also the hotlist routines were using independent saving
    code - a lot of duplicated effort. This was fair enough as at the time the
    Hotlist code was written, the Save code couldn't be used in the way it is
    now.
    
    New Save Source and Print buttons on the toolbar of some builds.
    
    Phoenix Sprites file made more efficient - the Acorn base section has been
    split from the animated upper region. Browse build has a new grey fade
    sprite at the back, which is less grainy than the previous one and only
    uses 16 colours (with a 16 greyscale palette).
    
    Not really a bug, bug the routine to start an image fetch for INPUT
    TYPE=IMAGE forms items only did so if the src field (or equivalent, for
    this tag type) was non-NULL. In fact, you should always call image_new_image
    and let that handle the rest, otherwise other sections of the code will fail
    as they try to obtain an image number for a given HStream and get -1 back.
    This problem only generally manifested itself when loading an HTML file to
    the browser straight from an application, as many src fields become NULL
    when the relativisation routines find nothing to relativise to...
    
    Authentication got broken somewhere along the line - this has been fixed
    (in HTMLLib and the browser).
    
    Ctrl+Click on a cross referenced image updates *all* copies, not just the
    one with the image data attached.
    
    Next big step: Rip up TBEvents.h and rebuild that whole approach somewhat.
    To all those working on the code, my apologies but this means all Res files
    will receive a very large number of alterations and there will be extensive
    code changes too (mostly naming convention stuff), in more or less all
    source files. I am endeavouring to ensure that the new numberspace
    convention does not clash with the work being done by Kevin on
    internationalisation.
    7656a1b3
Handlers 4.37 KB
/* 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   : Handlers.h                             */
/*                                                 */
/* Purpose: Event handlers for driving the browser */
/*          front-end.                             */
/*                                                 */
/* Author : A.D.Hodgkinson                         */
/*                                                 */
/* History: 07-Feb-97: Created from Main.h.        */
/***************************************************/

/* Function prototypes */

int handle_messages          (WimpMessage * m, void * handle);
int handle_ack               (int eventcode, WimpPollBlock * block, IdBlock * idb, void * handle);

int handle_keys              (int eventcode, WimpPollBlock * b, IdBlock * idb, void * handle);
int handle_keys_from_browser (int eventcode, WimpPollBlock * block, IdBlock * idb, browser_data * handle);
int handle_menus             (int eventcode, WimpPollBlock * block, IdBlock * idb, void * handle);
int handle_scroll_requests   (int eventcode, WimpPollBlock * b, IdBlock * idb, browser_data * handle);
int handle_clicks            (int eventcode, WimpPollBlock * b, IdBlock * idb, browser_data * handle);
int handle_link_clicks       (int eventcode, WimpPollBlock * b, IdBlock * idb, browser_data * handle);
int handle_drags             (int eventcode, WimpPollBlock * b, IdBlock * idb, browser_data * handle);

int handle_close_browser     (int eventcode, WimpPollBlock * b, IdBlock * idb, browser_data * handle);

int handle_home              (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle);
int handle_back              (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle);
int handle_forwards          (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle);
int handle_stop              (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle);
int handle_reload            (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle);
int handle_view_hotlist      (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle);
int handle_add_hotlist       (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle);
int handle_view_resources    (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle);
int handle_load_images       (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle);
int handle_view_source       (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle);
int handle_go_to             (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle);
int handle_go                (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle);
int handle_cancel            (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle);
int handle_bistate           (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle);
int handle_tristate          (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle);
int handle_save_src          (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle);
int handle_print             (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle);

int handle_clear_url         (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle);
int handle_show_history_menu (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle);

int handle_show_info         (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle);
int handle_quit              (int eventcode, ToolboxEvent * event, IdBlock * idb, void * handle);

int handle_lose_caret        (int eventcode, WimpPollBlock * block, IdBlock * idb, void * handle);

int handle_dialler_display   (int eventcode, WimpPollBlock * b, IdBlock * idb, browser_data * handle);
int handle_dialler_service   (WimpMessage * m, void * handle);