summaryrefslogtreecommitdiff
path: root/desktop/browser.c
diff options
context:
space:
mode:
authorPhil Mellor <phil@monkeyson.info>2003-01-11 17:33:31 +0000
committerPhil Mellor <phil@monkeyson.info>2003-01-11 17:33:31 +0000
commit6f67739fa76911f7649ff2917ad319fce7b32dcd (patch)
tree4eea19d885c6329e468b9e536087068988ab4c94 /desktop/browser.c
parent48e4666fee8e1f1f2c213217ac1a93050a4421bd (diff)
downloadnetsurf-6f67739fa76911f7649ff2917ad319fce7b32dcd.tar.gz
netsurf-6f67739fa76911f7649ff2917ad319fce7b32dcd.tar.bz2
[project @ 2003-01-11 17:33:31 by monkeyson]
Mouse gestures. Recognises the same gestures as Opera, although only back, forward and reload actually do anything yet. svn path=/import/netsurf/; revision=91
Diffstat (limited to 'desktop/browser.c')
-rw-r--r--desktop/browser.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/desktop/browser.c b/desktop/browser.c
index 8edf77e9f..63418051f 100644
--- a/desktop/browser.c
+++ b/desktop/browser.c
@@ -1,5 +1,5 @@
/**
- * $Id: browser.c,v 1.20 2003/01/06 23:53:39 bursa Exp $
+ * $Id: browser.c,v 1.21 2003/01/11 17:33:31 monkeyson Exp $
*/
#include "netsurf/riscos/font.h"
@@ -113,29 +113,34 @@ void set_content_html(struct content* c)
return;
}
-void content_html_reformat(struct content* c, int width)
+
+char* content_html_reformat(struct content* c, int width)
{
char* file;
+ char* title = NULL;
struct css_selector* selector = xcalloc(1, sizeof(struct css_selector));
LOG(("Starting stuff"));
+
+ /* need to find title of page */
+
if (c->data.html.layout != NULL)
{
/* TODO: skip if width is unchanged */
layout_document(c->data.html.layout->children, (unsigned long)width);
- return;
+ return title;
}
LOG(("Setting document to myDoc"));
c->data.html.document = c->data.html.parser->myDoc;
- xmlDebugDumpDocument(stderr, c->data.html.parser->myDoc);
+ //xmlDebugDumpDocument(stderr, c->data.html.parser->myDoc);
/* skip to start of html */
LOG(("Skipping to html"));
if (c->data.html.document == NULL)
{
LOG(("There is no document!"));
- return;
+ return title;
}
for (c->data.html.markup = c->data.html.document->children;
c->data.html.markup != 0 &&
@@ -146,12 +151,12 @@ void content_html_reformat(struct content* c, int width)
if (c->data.html.markup == 0)
{
LOG(("No markup"));
- return;
+ return title;
}
if (strcmp((const char *) c->data.html.markup->name, "html"))
{
LOG(("Not html"));
- return;
+ return title;
}
// xfree(c->data.html.stylesheet);
@@ -183,7 +188,7 @@ void content_html_reformat(struct content* c, int width)
/* can tidy up memory here? */
- return;
+ return title;
}
void browser_window_reformat(struct browser_window* bw)
@@ -203,7 +208,7 @@ void browser_window_reformat(struct browser_window* bw)
LOG(("HTML content."));
browser_window_set_status(bw, "Formatting page...");
time0 = clock();
- content_html_reformat(bw->current_content, gui_window_get_width(bw->window));
+ gui_window_set_title(bw->window, content_html_reformat(bw->current_content, gui_window_get_width(bw->window)));
time1 = clock();
LOG(("Content reformatted"));
if (bw->current_content->data.html.layout != NULL)