[project @ 2004-07-18 22:21:32 by atimmins]

svn path=/import/netsurf/; revision=1097
This commit is contained in:
Andrew Timmins 2004-07-18 22:21:32 +00:00
parent 58e2d033ec
commit 86f60c4c0a
8 changed files with 107 additions and 37 deletions

View File

@ -44,7 +44,8 @@ RMEnsure MimeMap 0.10 Error NetSurf requires MimeMap 0.10 or later
RMEnsure Tinct 0.05 RMLoad <NetSurf$Dir>.Resources.Tinct RMEnsure Tinct 0.05 RMLoad <NetSurf$Dir>.Resources.Tinct
RMEnsure Tinct 0.05 Error NetSurf requires Tinct 0.05 or later RMEnsure Tinct 0.05 Error NetSurf requires Tinct 0.05 or later
Wimpslot -min 2150k -max 2150k | Wimpslot -min 2150k -max 2150k
Wimpslot -Min 8192k
Set NetSurf$Running yes Set NetSurf$Running yes
Run <NetSurf$Dir>.!RunImage 2><NetSurf$Dir>.stderr Run <NetSurf$Dir>.!RunImage 2><NetSurf$Dir>.stderr
UnSet NetSurf$Running UnSet NetSurf$Running

View File

@ -889,7 +889,7 @@ INCLUDE_FILE_PATTERNS =
# or name=definition (no spaces). If the definition and the = are # or name=definition (no spaces). If the definition and the = are
# omitted =1 is assumed. # omitted =1 is assumed.
PREDEFINED = riscos CSS_INTERNALS WITH_POST WITH_DRAW WITH_GIF WITH_JPEG WITH_PNG WITH_SPRITE WITH_PLUGIN WITH_FRAMES WITH_AUTH WITH_COOKIES WITH_ABOUT WITH_URI WITH_URL WITH_DRAW_EXPORT WITH_SAVE_COMPLETE WITH_TEXT_EXPORT PREDEFINED = riscos CSS_INTERNALS WITH_POST WITH_DRAW WITH_GIF WITH_JPEG WITH_PNG WITH_SPRITE WITH_PLUGIN WITH_FRAMES WITH_AUTH WITH_COOKIES WITH_ABOUT WITH_URI WITH_URL WITH_DRAW_EXPORT WITH_SAVE_COMPLETE WITH_TEXT_EXPORT WITH_KIOSK_BROWSING WITH_KIOSK_THEMES WITH_KEYBOARD_NAVIGATION
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
# this tag can be used to specify a list of macro names that should be expanded. # this tag can be used to specify a list of macro names that should be expanded.

View File

@ -27,9 +27,10 @@ static void netsurf_init(int argc, char** argv);
static void netsurf_poll(void); static void netsurf_poll(void);
static void netsurf_exit(void); static void netsurf_exit(void);
static void lib_init(void); static void lib_init(void);
extern void ro_gui_choose_language(void);
#ifndef curl_memdebug #ifndef curl_memdebug
extern void curl_memdebug(const char *logname); extern void curl_memdebug(const char *logname);
#endif #endif
/** /**
@ -40,6 +41,10 @@ int main(int argc, char** argv)
{ {
netsurf_init(argc, argv); netsurf_init(argc, argv);
#ifdef WITH_KIOSK_BROWSING
browser_window_create("file:/<NetSurf$Dir>/Docs/Intro_En", NULL);
#endif
while (!netsurf_quit) while (!netsurf_quit)
netsurf_poll(); netsurf_poll();
@ -77,7 +82,6 @@ void netsurf_init(int argc, char** argv)
fetchcache_init(); fetchcache_init();
} }
/** /**
* Poll components which require it. * Poll components which require it.
*/ */

View File

@ -1,2 +1,8 @@
const char * const netsurf_version = "Development Build"; /*
* 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 Andrew Timmins <atimmins@blueyonder.co.uk>
*/
const char * const netsurf_version = "Development Build";

View File

@ -6,6 +6,7 @@
* Copyright 2004 James Bursa <bursa@users.sourceforge.net> * Copyright 2004 James Bursa <bursa@users.sourceforge.net>
* Copyright 2003 John M Bell <jmb202@ecs.soton.ac.uk> * Copyright 2003 John M Bell <jmb202@ecs.soton.ac.uk>
* Copyright 2004 Richard Wilson <not_ginger_matt@users.sourceforge.net> * Copyright 2004 Richard Wilson <not_ginger_matt@users.sourceforge.net>
* Copyright 2004 Andrew Timmins <atimmins@blueyonder.co.uk>
*/ */
#include <assert.h> #include <assert.h>
@ -159,6 +160,7 @@ void gui_init(int argc, char** argv)
{ {
char path[40]; char path[40];
char theme_fname[256]; char theme_fname[256];
char url[80];
os_error *error; os_error *error;
int length; int length;
@ -166,8 +168,12 @@ void gui_init(int argc, char** argv)
save_complete_init(); save_complete_init();
/* We dont have the universal boot sequence on NCOS */
#ifndef ncos
options_read("Choices:WWW.NetSurf.Choices"); options_read("Choices:WWW.NetSurf.Choices");
#else
options_read("<User$Path>.Choices.NetSurf.Choices");
#endif
ro_gui_choose_language(); ro_gui_choose_language();
NETSURF_DIR = getenv("NetSurf$Dir"); NETSURF_DIR = getenv("NetSurf$Dir");
@ -178,17 +184,27 @@ void gui_init(int argc, char** argv)
messages_load(path); messages_load(path);
messages_load("<NetSurf$Dir>.Resources.LangNames"); messages_load("<NetSurf$Dir>.Resources.LangNames");
/* Totally pedantic But base the taskname on the buid options!
*/
#ifndef ncos
error = xwimp_initialise(wimp_VERSION_RO38, "NetSurf", error = xwimp_initialise(wimp_VERSION_RO38, "NetSurf",
(const wimp_message_list *) &task_messages, 0, (const wimp_message_list *) &task_messages, 0,
&task_handle); &task_handle);
#else
error = xwimp_initialise(wimp_VERSION_RO38, "NCNetSurf",
(const wimp_message_list *) &task_messages, 0,
&task_handle);
#endif
if (error) { if (error) {
LOG(("xwimp_initialise failed: 0x%x: %s", LOG(("xwimp_initialise failed: 0x%x: %s",
error->errnum, error->errmess)); error->errnum, error->errmess));
die(error->errmess); die(error->errmess);
} }
/* We dont need to check the fonts on NCOS */
#ifndef ncos
ro_gui_check_fonts(); ro_gui_check_fonts();
#endif
/* Issue a *Desktop to poke AcornURI into life */ /* Issue a *Desktop to poke AcornURI into life */
if (getenv("NetSurf$Start_URI_Handler")) if (getenv("NetSurf$Start_URI_Handler"))
xwimp_start_task("Desktop", 0); xwimp_start_task("Desktop", 0);
@ -227,11 +243,14 @@ void gui_init(int argc, char** argv)
wimp_close_template(); wimp_close_template();
ro_gui_pointers_init(); ro_gui_pointers_init();
ro_gui_hotlist_init(); ro_gui_hotlist_init();
/* We dont create an Iconbar icon on NCOS */
#ifndef ncos
ro_gui_icon_bar_create(); ro_gui_icon_bar_create();
#endif
ro_gui_check_resolvers(); ro_gui_check_resolvers();
} }
/** /**
* Determine the language to use. * Determine the language to use.
* *

View File

@ -5,6 +5,7 @@
* Copyright 2003 Phil Mellor <monkeyson@users.sourceforge.net> * Copyright 2003 Phil Mellor <monkeyson@users.sourceforge.net>
* Copyright 2003 James Bursa <bursa@users.sourceforge.net> * Copyright 2003 James Bursa <bursa@users.sourceforge.net>
* Copyright 2004 Richard Wilson <not_ginger_matt@users.sourceforge.net> * Copyright 2004 Richard Wilson <not_ginger_matt@users.sourceforge.net>
* Copyright 2004 Andrew Timmins <atimmins@blueyonder.co.uk>
*/ */
/** \file /** \file
@ -52,6 +53,7 @@ void ro_theme_load(char *pathname) {
os_coord dimensions; os_coord dimensions;
int size, i, n; int size, i, n;
char *filename = alloca(strlen(pathname) + 16); char *filename = alloca(strlen(pathname) + 16);
char *kioskfilename = alloca(strlen(pathname) + 16);
fileswitch_object_type obj_type; fileswitch_object_type obj_type;
/* Release previous sprite are /* Release previous sprite are
@ -70,6 +72,17 @@ void ro_theme_load(char *pathname) {
sprintf(filename, "%s.Sprites", pathname); sprintf(filename, "%s.Sprites", pathname);
xosfile_read_no_path(filename, &obj_type, 0, 0, &size, 0); xosfile_read_no_path(filename, &obj_type, 0, 0, &size, 0);
/* Load the window furniture if using Kiosk Themes
*
* Yes I know this is one serious hack!
* I'll do something a little more "realistic" when I've
* finished various other bits... Right now it works.
*/
#ifdef WITH_KIOSK_THEMES
sprintf(kioskfilename, "%s.!SetTheme", pathname);
xos_cli(kioskfilename);
#endif
/* Claim memory for a sprite file if we have one /* Claim memory for a sprite file if we have one
*/ */
if (obj_type & fileswitch_IS_FILE) theme_sprite_area = malloc(size + 16); if (obj_type & fileswitch_IS_FILE) theme_sprite_area = malloc(size + 16);
@ -113,7 +126,6 @@ void ro_theme_load(char *pathname) {
} }
} }
} }
} }

View File

@ -6,6 +6,7 @@
* Copyright 2004 James Bursa <bursa@users.sourceforge.net> * Copyright 2004 James Bursa <bursa@users.sourceforge.net>
* Copyright 2003 John M Bell <jmb202@ecs.soton.ac.uk> * Copyright 2003 John M Bell <jmb202@ecs.soton.ac.uk>
* Copyright 2004 Richard Wilson <not_ginger_matt@users.sourceforge.net> * Copyright 2004 Richard Wilson <not_ginger_matt@users.sourceforge.net>
* Copyright 2004 Andrew Timmins <atimmins@blueyonder.co.uk>
*/ */
/** \file /** \file
@ -121,10 +122,19 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
if (win_height < 100) if (win_height < 100)
win_height = 100; win_height = 100;
} else { } else {
/* Base how we define the window height/width
on the compile time options set */
#ifdef WITH_KIOSK_BROWSING
/* We're going fullscreen, forget the iconbar! */
win_width = screen_width;
win_height = screen_height;
#else
win_width = screen_width * 3 / 4; win_width = screen_width * 3 / 4;
if (1600 < win_width) if (1600 < win_width)
win_width = 1600; win_width = 1600;
win_height = win_width * 3 / 4; win_height = win_width * 3 / 4;
#endif
window.visible.x0 = (screen_width - win_width) / 2; window.visible.x0 = (screen_width - win_width) / 2;
window.visible.y0 = ((screen_height - win_height) / 2) + window.visible.y0 = ((screen_height - win_height) / 2) +
@ -139,6 +149,17 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
window.xscroll = 0; window.xscroll = 0;
window.yscroll = 0; window.yscroll = 0;
window.next = wimp_TOP; window.next = wimp_TOP;
/* Base how we define the window characteristics
on the compile time options set */
#ifdef WITH_KIOSK_BROWSING
window.flags = wimp_WINDOW_NEW_FORMAT |
wimp_WINDOW_VSCROLL |
wimp_WINDOW_HSCROLL |
wimp_WINDOW_IGNORE_XEXTENT |
wimp_WINDOW_IGNORE_YEXTENT |
wimp_WINDOW_SCROLL_REPEAT;
#else
window.flags = wimp_WINDOW_MOVEABLE | window.flags = wimp_WINDOW_MOVEABLE |
wimp_WINDOW_NEW_FORMAT | wimp_WINDOW_NEW_FORMAT |
wimp_WINDOW_BACK_ICON | wimp_WINDOW_BACK_ICON |
@ -151,6 +172,8 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
wimp_WINDOW_IGNORE_XEXTENT | wimp_WINDOW_IGNORE_XEXTENT |
wimp_WINDOW_IGNORE_YEXTENT | wimp_WINDOW_IGNORE_YEXTENT |
wimp_WINDOW_SCROLL_REPEAT; wimp_WINDOW_SCROLL_REPEAT;
#endif
window.title_fg = wimp_COLOUR_BLACK; window.title_fg = wimp_COLOUR_BLACK;
window.title_bg = wimp_COLOUR_LIGHT_GREY; window.title_bg = wimp_COLOUR_LIGHT_GREY;
window.work_fg = wimp_COLOUR_LIGHT_GREY; window.work_fg = wimp_COLOUR_LIGHT_GREY;

View File

@ -3,6 +3,7 @@
* Licensed under the GNU General Public License, * Licensed under the GNU General Public License,
* http://www.opensource.org/licenses/gpl-license * http://www.opensource.org/licenses/gpl-license
* Copyright 2003,4 John M Bell <jmb202@ecs.soton.ac.uk> * Copyright 2003,4 John M Bell <jmb202@ecs.soton.ac.uk>
* Copyright 2004 Andrew Timmins <atimmins@blueyonder.co.uk>
*/ */
#ifndef _NETSURF_UTILS_CONFIG_H_ #ifndef _NETSURF_UTILS_CONFIG_H_
@ -16,42 +17,46 @@
/* HTTP POST support */ /* HTTP POST support */
#define WITH_POST #define WITH_POST
/* Image renderering modules */
#if defined(riscos) || defined(debug)
#define WITH_GIF
#define WITH_JPEG
#define WITH_PNG
#define WITH_MNG
#endif
#ifdef riscos
#define WITH_DRAW
#define WITH_SPRITE
#endif
/* HTTP Auth */ /* HTTP Auth */
#define WITH_AUTH #define WITH_AUTH
/* Cookies */ /* Cookies */
#define WITH_COOKIES #define WITH_COOKIES
/* Image renderering modules */
#if defined(riscos) || defined(debug)
#define WITH_GIF
#define WITH_JPEG
#define WITH_PNG
#define WITH_MNG
#endif
#ifdef riscos #ifdef riscos
/* Plugin module */ #define WITH_DRAW
#define WITH_PLUGIN #define WITH_SPRITE
#endif
/* Acorn URI protocol support */
#define WITH_URI
/* ANT URL protocol support */
#define WITH_URL
/* Platform specific features */
#ifdef riscos
/* Plugin module */
#define WITH_PLUGIN
/* Acorn URI protocol support */
#define WITH_URI
/* ANT URL protocol support */
#define WITH_URL
#endif
#ifdef ncos
/* Kiosk style browsing support */
#define WITH_KIOSK_BROWSING
/* Kiosk style browsing themes support */
#define WITH_KIOSK_THEMES
/* Keyboard navigation support */
#define WITH_KEYBOARD_NAVIGATION
#endif #endif
#if defined(riscos) || defined(debug) #if defined(riscos) || defined(debug)
/* Export modules */ /* Export modules */
#define WITH_SAVE_COMPLETE #define WITH_SAVE_COMPLETE
#define WITH_DRAW_EXPORT #define WITH_DRAW_EXPORT
#define WITH_TEXT_EXPORT #define WITH_TEXT_EXPORT
#endif #endif
#endif #endif