From 74fa727509874983884a35b44b646be034b1fd69 Mon Sep 17 00:00:00 2001 From: Richard Wilson Date: Sat, 2 Sep 2006 15:52:41 +0000 Subject: Experimental new frames code. svn path=/trunk/netsurf/; revision=2906 --- render/html.h | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 62 insertions(+), 4 deletions(-) (limited to 'render/html.h') diff --git a/render/html.h b/render/html.h index 8ad0a7742..4e19364e3 100644 --- a/render/html.h +++ b/render/html.h @@ -37,6 +37,22 @@ struct plotters; extern char *default_stylesheet_url; extern char *adblock_stylesheet_url; +struct frame_dimension { + float value; + enum { + FRAME_DIMENSION_PIXELS, /* '100', '200' */ + FRAME_DIMENSION_PERCENT, /* '5%', '20%' */ + FRAME_DIMENSION_RELATIVE /* '*', '2*' */ + } unit; +}; + +typedef enum { + SCROLLING_AUTO, + SCROLLING_YES, + SCROLLING_NO +} frame_scrolling; + + /** An object (, , etc.) in a CONTENT_HTML document. */ struct content_html_object { char *url; /**< URL of this object. */ @@ -46,7 +62,44 @@ struct content_html_object { * CONTENT_UNKNOWN, or 0 if any type is acceptable. */ const content_type *permitted_types; bool background; /**< This object is a background image. */ - char *frame; /**< Name of frame, or 0 if not a frame. */ +}; + +/** Frame tree (, ) */ +struct content_html_frames { + int cols; /** number of columns in frameset */ + int rows; /** number of rows in frameset */ + + struct frame_dimension width; /** frame width */ + struct frame_dimension height; /** frame width */ + int margin_width; /** frame margin width */ + int margin_height; /** frame margin height */ + + char *name; /** frame name (for targetting) */ + char *url; /** frame url */ + + bool no_resize; /** frame is not resizable */ + frame_scrolling scrolling; /** scrolling characteristics */ + bool border; /** frame has a border */ + colour border_colour; /** frame border colour */ + + struct content_html_frames *children; /** [cols * rows] children */ +}; + +/** Inline frame list (