mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-23 04:26:50 +03:00
[project @ 2004-07-18 22:21:32 by atimmins]
svn path=/import/netsurf/; revision=1097
This commit is contained in:
parent
58e2d033ec
commit
86f60c4c0a
@ -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 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
|
||||
Run <NetSurf$Dir>.!RunImage 2><NetSurf$Dir>.stderr
|
||||
UnSet NetSurf$Running
|
@ -889,7 +889,7 @@ INCLUDE_FILE_PATTERNS =
|
||||
# or name=definition (no spaces). If the definition and the = are
|
||||
# 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
|
||||
# this tag can be used to specify a list of macro names that should be expanded.
|
||||
|
@ -27,9 +27,10 @@ static void netsurf_init(int argc, char** argv);
|
||||
static void netsurf_poll(void);
|
||||
static void netsurf_exit(void);
|
||||
static void lib_init(void);
|
||||
extern void ro_gui_choose_language(void);
|
||||
|
||||
#ifndef curl_memdebug
|
||||
extern void curl_memdebug(const char *logname);
|
||||
extern void curl_memdebug(const char *logname);
|
||||
#endif
|
||||
|
||||
/**
|
||||
@ -38,7 +39,11 @@ extern void curl_memdebug(const char *logname);
|
||||
|
||||
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)
|
||||
netsurf_poll();
|
||||
@ -77,7 +82,6 @@ void netsurf_init(int argc, char** argv)
|
||||
fetchcache_init();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Poll components which require it.
|
||||
*/
|
||||
|
@ -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";
|
||||
|
25
riscos/gui.c
25
riscos/gui.c
@ -6,6 +6,7 @@
|
||||
* Copyright 2004 James Bursa <bursa@users.sourceforge.net>
|
||||
* Copyright 2003 John M Bell <jmb202@ecs.soton.ac.uk>
|
||||
* Copyright 2004 Richard Wilson <not_ginger_matt@users.sourceforge.net>
|
||||
* Copyright 2004 Andrew Timmins <atimmins@blueyonder.co.uk>
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
@ -159,6 +160,7 @@ void gui_init(int argc, char** argv)
|
||||
{
|
||||
char path[40];
|
||||
char theme_fname[256];
|
||||
char url[80];
|
||||
os_error *error;
|
||||
int length;
|
||||
|
||||
@ -166,8 +168,12 @@ void gui_init(int argc, char** argv)
|
||||
|
||||
save_complete_init();
|
||||
|
||||
/* We dont have the universal boot sequence on NCOS */
|
||||
#ifndef ncos
|
||||
options_read("Choices:WWW.NetSurf.Choices");
|
||||
|
||||
#else
|
||||
options_read("<User$Path>.Choices.NetSurf.Choices");
|
||||
#endif
|
||||
ro_gui_choose_language();
|
||||
|
||||
NETSURF_DIR = getenv("NetSurf$Dir");
|
||||
@ -178,17 +184,27 @@ void gui_init(int argc, char** argv)
|
||||
messages_load(path);
|
||||
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",
|
||||
(const wimp_message_list *) &task_messages, 0,
|
||||
&task_handle);
|
||||
#else
|
||||
error = xwimp_initialise(wimp_VERSION_RO38, "NCNetSurf",
|
||||
(const wimp_message_list *) &task_messages, 0,
|
||||
&task_handle);
|
||||
#endif
|
||||
if (error) {
|
||||
LOG(("xwimp_initialise failed: 0x%x: %s",
|
||||
error->errnum, error->errmess));
|
||||
die(error->errmess);
|
||||
}
|
||||
|
||||
/* We dont need to check the fonts on NCOS */
|
||||
#ifndef ncos
|
||||
ro_gui_check_fonts();
|
||||
|
||||
#endif
|
||||
/* Issue a *Desktop to poke AcornURI into life */
|
||||
if (getenv("NetSurf$Start_URI_Handler"))
|
||||
xwimp_start_task("Desktop", 0);
|
||||
@ -227,11 +243,14 @@ void gui_init(int argc, char** argv)
|
||||
wimp_close_template();
|
||||
ro_gui_pointers_init();
|
||||
ro_gui_hotlist_init();
|
||||
|
||||
/* We dont create an Iconbar icon on NCOS */
|
||||
#ifndef ncos
|
||||
ro_gui_icon_bar_create();
|
||||
#endif
|
||||
ro_gui_check_resolvers();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Determine the language to use.
|
||||
*
|
||||
|
@ -5,6 +5,7 @@
|
||||
* Copyright 2003 Phil Mellor <monkeyson@users.sourceforge.net>
|
||||
* Copyright 2003 James Bursa <bursa@users.sourceforge.net>
|
||||
* Copyright 2004 Richard Wilson <not_ginger_matt@users.sourceforge.net>
|
||||
* Copyright 2004 Andrew Timmins <atimmins@blueyonder.co.uk>
|
||||
*/
|
||||
|
||||
/** \file
|
||||
@ -52,6 +53,7 @@ void ro_theme_load(char *pathname) {
|
||||
os_coord dimensions;
|
||||
int size, i, n;
|
||||
char *filename = alloca(strlen(pathname) + 16);
|
||||
char *kioskfilename = alloca(strlen(pathname) + 16);
|
||||
fileswitch_object_type obj_type;
|
||||
|
||||
/* Release previous sprite are
|
||||
@ -70,6 +72,17 @@ void ro_theme_load(char *pathname) {
|
||||
sprintf(filename, "%s.Sprites", pathname);
|
||||
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
|
||||
*/
|
||||
if (obj_type & fileswitch_IS_FILE) theme_sprite_area = malloc(size + 16);
|
||||
@ -113,7 +126,6 @@ void ro_theme_load(char *pathname) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
* Copyright 2004 James Bursa <bursa@users.sourceforge.net>
|
||||
* Copyright 2003 John M Bell <jmb202@ecs.soton.ac.uk>
|
||||
* Copyright 2004 Richard Wilson <not_ginger_matt@users.sourceforge.net>
|
||||
* Copyright 2004 Andrew Timmins <atimmins@blueyonder.co.uk>
|
||||
*/
|
||||
|
||||
/** \file
|
||||
@ -121,10 +122,19 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
|
||||
if (win_height < 100)
|
||||
win_height = 100;
|
||||
} 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;
|
||||
if (1600 < win_width)
|
||||
win_width = 1600;
|
||||
win_height = win_width * 3 / 4;
|
||||
#endif
|
||||
|
||||
window.visible.x0 = (screen_width - win_width) / 2;
|
||||
window.visible.y0 = ((screen_height - win_height) / 2) +
|
||||
@ -139,7 +149,18 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
|
||||
window.xscroll = 0;
|
||||
window.yscroll = 0;
|
||||
window.next = wimp_TOP;
|
||||
window.flags = wimp_WINDOW_MOVEABLE |
|
||||
|
||||
/* 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 |
|
||||
wimp_WINDOW_NEW_FORMAT |
|
||||
wimp_WINDOW_BACK_ICON |
|
||||
wimp_WINDOW_CLOSE_ICON |
|
||||
@ -151,6 +172,8 @@ struct gui_window *gui_create_browser_window(struct browser_window *bw,
|
||||
wimp_WINDOW_IGNORE_XEXTENT |
|
||||
wimp_WINDOW_IGNORE_YEXTENT |
|
||||
wimp_WINDOW_SCROLL_REPEAT;
|
||||
#endif
|
||||
|
||||
window.title_fg = wimp_COLOUR_BLACK;
|
||||
window.title_bg = wimp_COLOUR_LIGHT_GREY;
|
||||
window.work_fg = wimp_COLOUR_LIGHT_GREY;
|
||||
|
@ -3,6 +3,7 @@
|
||||
* Licensed under the GNU General Public License,
|
||||
* http://www.opensource.org/licenses/gpl-license
|
||||
* Copyright 2003,4 John M Bell <jmb202@ecs.soton.ac.uk>
|
||||
* Copyright 2004 Andrew Timmins <atimmins@blueyonder.co.uk>
|
||||
*/
|
||||
|
||||
#ifndef _NETSURF_UTILS_CONFIG_H_
|
||||
@ -16,42 +17,46 @@
|
||||
|
||||
/* HTTP POST support */
|
||||
#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 */
|
||||
#define WITH_AUTH
|
||||
|
||||
/* 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
|
||||
/* Plugin module */
|
||||
#define WITH_PLUGIN
|
||||
|
||||
/* Acorn URI protocol support */
|
||||
#define WITH_URI
|
||||
|
||||
/* ANT URL protocol support */
|
||||
#define WITH_URL
|
||||
#define WITH_DRAW
|
||||
#define WITH_SPRITE
|
||||
#endif
|
||||
|
||||
/* 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
|
||||
|
||||
#if defined(riscos) || defined(debug)
|
||||
/* Export modules */
|
||||
#define WITH_SAVE_COMPLETE
|
||||
#define WITH_DRAW_EXPORT
|
||||
#define WITH_TEXT_EXPORT
|
||||
/* Export modules */
|
||||
#define WITH_SAVE_COMPLETE
|
||||
#define WITH_DRAW_EXPORT
|
||||
#define WITH_TEXT_EXPORT
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user