summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2004-06-02 21:23:27 +0000
committerJames Bursa <james@netsurf-browser.org>2004-06-02 21:23:27 +0000
commitcafb24a3366cc0efaffcfbe417988283e96dcda2 (patch)
tree0348f5d8b08e9fa90ae941272cfb4936d5119552
parent6d76fb8e75ec270499858fb31128d7c85694def1 (diff)
downloadnetsurf-cafb24a3366cc0efaffcfbe417988283e96dcda2.tar.gz
netsurf-cafb24a3366cc0efaffcfbe417988283e96dcda2.tar.bz2
[project @ 2004-06-02 21:23:27 by bursa]
Remove obsolete files. svn path=/import/netsurf/; revision=918
-rw-r--r--riscos/frames.c211
-rw-r--r--riscos/frames.h74
-rw-r--r--riscos/save_html.c25
-rw-r--r--riscos/save_html.h15
4 files changed, 0 insertions, 325 deletions
diff --git a/riscos/frames.c b/riscos/frames.c
deleted file mode 100644
index dc23102e5..000000000
--- a/riscos/frames.c
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * 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 John M Bell <jmb202@ecs.soton.ac.uk>
- */
-
-#include <stdbool.h>
-
-#include "netsurf/utils/config.h"
-#include "netsurf/desktop/browser.h"
-#include "netsurf/desktop/gui.h"
-#include "netsurf/riscos/frames.h"
-#include "netsurf/riscos/gui.h"
-/*#ifndef TEST
-# define NDEBUG
-#endif*/
-#include "netsurf/utils/log.h"
-#include "netsurf/utils/utils.h"
-
-#include "oslib/os.h"
-#include "oslib/wimp.h"
-
-#ifdef WITH_FRAMES
-
-void frame_add_instance_to_list(struct content *c, struct browser_window *parent, struct content *page, struct box *box, struct object_params *params, void **state, struct browser_window *bw, gui_window *g);
-void frame_remove_instance_from_list(struct content *c);
-struct frame_list *frame_get_instance_from_list(struct content *c);
-
-void frame_add_instance(struct content *c, struct browser_window *parent,
- struct content *page, struct box *box,
- struct object_params *params, void **state)
-{
-
- wimp_window w;
- struct browser_window *bw = NULL;
- os_error *e;
- gui_window *g = (gui_window*)xcalloc(1, sizeof(gui_window));
-
- bw = create_browser_window(parent->flags, (int)parent->format_width,
- (int)parent->format_height, parent);
-
- w.visible.x0 = 346;
- w.visible.x1 = 370;
- w.visible.y0 = 664;
- w.visible.y1 = 610;
- w.xscroll = w.yscroll = 0;
- w.next = wimp_TOP;
- w.flags = wimp_WINDOW_NEW_FORMAT | wimp_WINDOW_MOVEABLE;
- w.title_fg = wimp_COLOUR_TRANSPARENT;
- w.title_bg = wimp_COLOUR_WHITE;
- w.work_fg = wimp_COLOUR_VERY_LIGHT_GREY;
- w.work_bg = wimp_COLOUR_RED;
- w.scroll_outer = wimp_COLOUR_DARK_GREY;
- w.scroll_inner = wimp_COLOUR_MID_LIGHT_GREY;
- w.highlight_bg = wimp_COLOUR_CREAM;
- w.extra_flags = 0;
- w.extent.x0 = 0;
- w.extent.y0 = -8192;
- w.extent.x1 = 8192;
- w.extent.y1 = 0;
- w.title_flags = wimp_ICON_HCENTRED | wimp_ICON_VCENTRED;
- w.work_flags = wimp_BUTTON_CLICK << wimp_ICON_BUTTON_TYPE_SHIFT;
- w.xmin = 1;
- w.ymin = 0;
- w.icon_count = 0;
-
- LOG(("Creating frame"));
-
- e = xwimp_create_window(&w, &g->window);
- if (e) {
- LOG(("%s", e->errmess));
- return;
- }
-
- g->type = GUI_BROWSER_WINDOW;
- g->data.browser.bw = bw;
- g->data.browser.toolbar = 0;
- g->data.browser.reformat_pending = false;
- g->data.browser.old_width = 0;
-
- bw->current_content = c;
- bw->window = g;
-
- LOG(("Adding to list"));
-
- frame_add_instance_to_list(c, parent, page, box, params, state, bw, g);
-
- LOG(("Done"));
-}
-
-void frame_remove_instance(struct content *c, struct browser_window *bw,
- struct content *page, struct box *box,
- struct object_params *params, void **state)
-{
- struct frame_list *f;
-
- f = frame_get_instance_from_list(c);
-
- wimp_close_window(f->g->window);
- wimp_delete_window(f->g->window);
- frame_remove_instance_from_list(c);
-}
-
-void frame_reshape_instance(struct content *c, struct browser_window *bw,
- struct content *page, struct box *box,
- struct object_params *params, void **state)
-{
-
- struct frame_list *f;
- unsigned long x, y;
- int x0, y1;
- os_box b;
- wimp_window_state s;
-
- LOG(("Reshaping frame"));
-
- f = frame_get_instance_from_list(c);
- if (f == NULL) {
- LOG(("Couldn't find frame"));
- return;
- }
-
- s.w = bw->window->window;
- wimp_get_window_state(&s);
- LOG(("ParentWindow: [(%d,%d),(%d,%d)]", s.visible.x0, s.visible.y0,
- s.visible.x1, s.visible.y1));
-
- x0 = s.visible.x0 - s.xscroll;
- y1 = s.visible.y1 - s.yscroll;
-
- LOG(("%d,%d", x0, y1));
-
- box_coords(box, &x, &y);
- b.x0 = x0 + ((int)x << 1);
- b.y1 = y1 - (((int)y << 1));
- b.x1 = (b.x0 + (box->width << 1));
- b.y0 = (b.y1 - (box->height << 1));
-
- /*if(b.x1 > (s.visible.x1-s.xscroll)) {
- b.x1 -= 16;
- }*/
- s.w = f->g->window;
- s.visible = b;
-
- LOG(("Opening frame window : [(%d,%d),(%d,%d)]",b.x0,b.y0,b.x1,b.y1));
- xwimp_open_window_nested((wimp_open*)&s, bw->window->window, 0);
-}
-
-
-static struct frame_list pl = {0, 0, 0, 0, 0, 0, 0, 0, &pl, &pl};
-static struct frame_list *plist = &pl;
-
-/**
- * Adds a plugin instance to the list of plugin instances.
- */
-void frame_add_instance_to_list(struct content *c, struct browser_window *parent, struct content *page, struct box *box, struct object_params *params, void **state, struct browser_window *bw, gui_window *g) {
-
- struct frame_list *npl = xcalloc(1, sizeof(*npl));
-
- npl->c = c;
- npl->parent = parent;
- npl->page = page;
- npl->box = box;
- npl->params = params;
- npl->state = state;
- npl->bw = bw;
- npl->g = g;
- npl->prev = plist->prev;
- npl->next = plist;
- plist->prev->next = npl;
- plist->prev = npl;
-
- LOG(("Added Frame %p", npl));
-}
-
-/**
- * Removes a plugin instance from the list of plugin instances
- */
-void frame_remove_instance_from_list(struct content *c) {
-
- struct frame_list *temp =
- frame_get_instance_from_list(c);
- if(temp != NULL) {
-
- LOG(("Removed Frame %p", temp));
- temp->prev->next = temp->next;
- temp->next->prev = temp->prev;
- xfree(temp);
- }
-}
-
-/**
- * Retrieves an instance of a plugin from the list of plugin instances
- * returns NULL if no instance is found
- */
-struct frame_list *frame_get_instance_from_list(struct content *c) {
-
- struct frame_list *npl;
-
- for(npl = plist->next; (npl != plist)
- && (npl->c != c);
- npl = npl->next)
- ;
-
- if(npl != plist)
- return npl;
-
- return NULL;
-}
-#endif
diff --git a/riscos/frames.h b/riscos/frames.h
deleted file mode 100644
index eee37d107..000000000
--- a/riscos/frames.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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 John M Bell <jmb202@ecs.soton.ac.uk>
- */
-
-/*
- * Frames are represented as a tree structure. eg:
- *
- * index.html
- * |
- * --------------------
- * | |
- * nav.html main.html
- * |
- * --------------------
- * | | |
- * top.html mid.html end.html
- *
- * might represent something like:
- *
- * ------------------------
- * | nav.html | top.html |
- * | |------------|
- * | | mid.html |
- * | |------------|
- * | | end.html |
- * -------------------------
- *
- * where the left frame is main.html with three sub frames (top, mid, end)
- * and the entire page is index.html with two sub frames (nav, main)
- *
- * This is hung off the browser window structure.
- */
-
-#ifndef _NETSURF_RISCOS_FRAMES_H_
-#define _NETSURF_RISCOS_FRAMES_H_
-
-#include "netsurf/utils/config.h"
-#include "netsurf/content/content.h"
-#include "netsurf/desktop/browser.h"
-#include "netsurf/render/box.h"
-#include "netsurf/riscos/gui.h"
-
-#include "oslib/wimp.h"
-
-#ifdef WITH_FRAMES
-
-struct frame_list {
-
- struct content *c;
- struct browser_window *parent;
- struct content *page;
- struct box *box;
- struct object_params *params;
- void **state;
- struct browser_window *bw;
- gui_window *g;
- struct frame_list *next;
- struct frame_list *prev;
-};
-
-void frame_add_instance(struct content *c, struct browser_window *bw,
- struct content *page, struct box *box,
- struct object_params *params, void **state);
-void frame_remove_instance(struct content *c, struct browser_window *bw,
- struct content *page, struct box *box,
- struct object_params *params, void **state);
-void frame_reshape_instance(struct content *c, struct browser_window *bw,
- struct content *page, struct box *box,
- struct object_params *params, void **state);
-#endif
-#endif
diff --git a/riscos/save_html.c b/riscos/save_html.c
deleted file mode 100644
index 13c594db2..000000000
--- a/riscos/save_html.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * 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 John M Bell <jmb202@ecs.soton.ac.uk>
- */
-
-#include <stdbool.h>
-#include <string.h>
-
-#include "oslib/osfile.h"
-
-#include "netsurf/utils/config.h"
-#include "netsurf/content/content.h"
-#include "netsurf/riscos/save_html.h"
-
-void save_as_html(struct content *c, char *path) {
-
- if (c->type != CONTENT_HTML) {
- return;
- }
-
- xosfile_save_stamped(path, 0xfaf, (byte*)c->data.html.source,
- (byte*)c->data.html.source+c->data.html.length);
-}
diff --git a/riscos/save_html.h b/riscos/save_html.h
deleted file mode 100644
index 99f0af9bb..000000000
--- a/riscos/save_html.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
- * 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 John M Bell <jmb202@ecs.soton.ac.uk>
- */
-
-#ifndef _NETSURF_RISCOS_SAVE_HTML_H_
-#define _NETSURF_RISCOS_SAVE_HTML_H_
-
-struct content;
-
-void save_as_html(struct content *c, char *path);
-
-#endif