diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2003-11-12 22:22:45 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2003-11-12 22:22:45 +0000 |
commit | 01d735dab846c9df1ec40dcc2b0fb7f3d10b84b2 (patch) | |
tree | 84799f646ff0b3756bbcc17a9cb1d5c2dc5939b9 /riscos/frames.h | |
parent | bf202492f94f0db33e35ead79b897e6cc9ad8817 (diff) | |
download | netsurf-01d735dab846c9df1ec40dcc2b0fb7f3d10b84b2.tar.gz netsurf-01d735dab846c9df1ec40dcc2b0fb7f3d10b84b2.tar.bz2 |
[project @ 2003-11-12 22:22:45 by jmb]
Begin frames support. Just data structure handling for now. None of this
code is called atm.
svn path=/import/netsurf/; revision=416
Diffstat (limited to 'riscos/frames.h')
-rw-r--r-- | riscos/frames.h | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/riscos/frames.h b/riscos/frames.h new file mode 100644 index 000000000..b83cf8e1a --- /dev/null +++ b/riscos/frames.h @@ -0,0 +1,75 @@ +/* + * 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) + */ + +#ifndef _NETSURF_RISCOS_FRAMES_H_ +#define _NETSURF_RISCOS_FRAMES_H_ + +#include "netsurf/content/content.h" +#include "netsurf/desktop/browser.h" +#include "netsurf/render/box.h" +#include "netsurf/riscos/gui.h" + +struct frame_list { + + struct frame *frame; /**< top most frame (ie root of tree) */ + struct browser_window *bw; /**< main window */ + struct frame_list *next; /**< next in list */ + struct frame_list *prev; /**< previous in list */ +}; + +struct frame { + + struct browser_window *win; /**< window in which this frame appears */ + struct box *box; /**< box in parent window containing this frame */ + struct content *c; /**< content of this frame */ + char *name; /**< name of this frame */ + struct frame *parent; /**< parent frame */ + unsigned int no_children; /**< number of children this frame has */ + struct frame **children; /**< child frames */ +}; + +void frameset_add_to_list(struct browser_window *bw, struct frame *frame); +void frameset_remove_from_list(struct browser_window *bw); +struct frame_list *frameset_get_from_list(struct browser_window *bw); +struct frame *frame_get_from_list(struct browser_window *bw, struct box *b, + bool strict); + +void add_frame_to_tree (struct browser_window *pbw, struct box *box, + struct browser_window *bw, struct content *c, + char *name); +struct frame *get_frame_from_tree(struct frame *root, + struct browser_window *bw, + struct box *b, bool strict); +void delete_tree(struct frame *root); +#endif |