Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/0bbb4f5a2a9d4fa3f29bcd9fc041646fc68a54be
...commit
http://git.netsurf-browser.org/netsurf.git/commit/0bbb4f5a2a9d4fa3f29bcd9fc041646fc68a54be
...tree
http://git.netsurf-browser.org/netsurf.git/tree/0bbb4f5a2a9d4fa3f29bcd9fc041646fc68a54be
The branch, master has been updated
via 0bbb4f5a2a9d4fa3f29bcd9fc041646fc68a54be (commit)
from fcde28d97f3863d8be4f6245e20f6471c9bfacb6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=0bbb4f5a2a9d4fa3f29bcd9fc041646fc68a54be
commit 0bbb4f5a2a9d4fa3f29bcd9fc041646fc68a54be
Author: Chris Young <[email protected]>
Commit: Chris Young <[email protected]>
Rationalise gui_globals a bit
diff --git a/frontends/amiga/font_diskfont.c b/frontends/amiga/font_diskfont.c
index a64674b..313e992 100644
--- a/frontends/amiga/font_diskfont.c
+++ b/frontends/amiga/font_diskfont.c
@@ -34,6 +34,7 @@
#include "amiga/font.h"
#include "amiga/font_diskfont.h"
#include "amiga/gui.h"
+#include "amiga/plotters.h"
#include "amiga/utf8.h"
#define MAX_FONT_NAME_SIZE 33
diff --git a/frontends/amiga/gui.h b/frontends/amiga/gui.h
index 12f25d9..8289a5c 100644
--- a/frontends/amiga/gui.h
+++ b/frontends/amiga/gui.h
@@ -31,7 +31,6 @@
#include "amiga/menu.h"
#include "amiga/object.h"
#include "amiga/os3support.h"
-#include "amiga/plotters.h"
#ifdef __amigaos4__
#define HOOKF(ret,func,type,ptr,msgtype) static ret func(struct Hook *hook,
type ptr, msgtype msg)
@@ -175,7 +174,6 @@ struct MinList *window_list;
struct Screen *scrn;
struct MsgPort *sport;
struct gui_window *cur_gw;
-struct gui_globals browserglob;
BOOL ami_autoscroll;
void ami_get_msg(void);
diff --git a/frontends/amiga/gui_options.c b/frontends/amiga/gui_options.c
index d700eaf..f8be3bc 100755
--- a/frontends/amiga/gui_options.c
+++ b/frontends/amiga/gui_options.c
@@ -20,6 +20,7 @@
#include <string.h>
#include <stdlib.h>
#include <proto/exec.h>
+#include <proto/graphics.h>
#include <proto/intuition.h>
#include <proto/utility.h>
#ifdef __amigaos4__
diff --git a/frontends/amiga/history_local.c b/frontends/amiga/history_local.c
index 3a6cbe4..e7171e2 100755
--- a/frontends/amiga/history_local.c
+++ b/frontends/amiga/history_local.c
@@ -53,6 +53,7 @@
#include "amiga/libs.h"
#include "amiga/misc.h"
#include "amiga/object.h"
+#include "amiga/plotters.h"
#include "amiga/gui.h"
#include "amiga/history_local.h"
@@ -80,7 +81,7 @@ static void ami_history_redraw(struct history_window *hw)
return;
}
- glob = &hw->gg;
+ glob = hw->gg;
SetRPAttrs(glob->rp, RPTAG_APenColor, 0xffffffff, TAG_DONE);
RectFill(glob->rp, 0, 0, bbox->Width - 1, bbox->Height - 1);
@@ -90,10 +91,10 @@ static void ami_history_redraw(struct history_window *hw)
glob = &browserglob;
- ami_clearclipreg(&hw->gg);
+ ami_clearclipreg(hw->gg);
ami_history_update_extent(hw);
- BltBitMapRastPort(hw->gg.bm, 0, 0, hw->win->RPort,
+ BltBitMapRastPort(hw->gg->bm, 0, 0, hw->win->RPort,
bbox->Left, bbox->Top, bbox->Width,
bbox->Height, 0x0C0);
ami_gui_free_space_box(bbox);
@@ -116,8 +117,9 @@ void ami_history_open(struct gui_window *gw)
if(!gw->hw)
{
gw->hw = ami_misc_allocvec_clear(sizeof(struct history_window),
0);
+ gw->hw->gg = ami_misc_allocvec_clear(sizeof(struct
gui_globals), 0);
- ami_init_layers(&gw->hw->gg, scrn->Width, scrn->Height, false);
+ ami_init_layers(gw->hw->gg, scrn->Width, scrn->Height, false);
gw->hw->gw = gw;
browser_window_history_size(gw->bw, &width, &height);
@@ -223,7 +225,8 @@ static bool ami_history_click(struct history_window *hw,
uint16 code)
void ami_history_close(struct history_window *hw)
{
- ami_free_layers(&hw->gg);
+ ami_free_layers(hw->gg);
+ FreeVec(hw->gg);
hw->gw->hw = NULL;
DisposeObject(hw->objects[OID_MAIN]);
DelObject(hw->node);
diff --git a/frontends/amiga/history_local.h b/frontends/amiga/history_local.h
index f748821..284da34 100755
--- a/frontends/amiga/history_local.h
+++ b/frontends/amiga/history_local.h
@@ -23,6 +23,7 @@
#include <intuition/classusr.h>
struct gui_window;
+struct gui_globals;
struct history_window {
struct nsObject *node;
@@ -30,7 +31,7 @@ struct history_window {
Object *objects[GID_LAST];
struct gui_window *gw;
struct Hook scrollerhook;
- struct gui_globals gg;
+ struct gui_globals *gg;
};
/**
diff --git a/frontends/amiga/plotters.c b/frontends/amiga/plotters.c
index fee3e7b..7e19db7 100644
--- a/frontends/amiga/plotters.c
+++ b/frontends/amiga/plotters.c
@@ -72,6 +72,9 @@ struct bez_point {
float y;
};
+struct gui_globals browserglob;
+struct gui_globals *glob;
+
static int init_layers_count = 0;
static APTR pool_pens = NULL;
diff --git a/frontends/amiga/plotters.h b/frontends/amiga/plotters.h
index 45ebbd0..e027189 100644
--- a/frontends/amiga/plotters.h
+++ b/frontends/amiga/plotters.h
@@ -45,7 +45,8 @@ struct gui_globals
extern const struct plotter_table amiplot;
-struct gui_globals *glob;
+extern struct gui_globals *glob;
+extern struct gui_globals browserglob;
void ami_init_layers(struct gui_globals *gg, ULONG width, ULONG height, bool
force32bit);
void ami_free_layers(struct gui_globals *gg);
diff --git a/frontends/amiga/tree.c b/frontends/amiga/tree.c
index 52d5899..7f7140c 100644
--- a/frontends/amiga/tree.c
+++ b/frontends/amiga/tree.c
@@ -73,6 +73,7 @@
#include "amiga/theme.h" /* pointers */
#include "amiga/filetype.h"
#include "amiga/schedule.h"
+#include "amiga/plotters.h"
#define AMI_TREE_MENU_ITEMS 26
#define AMI_TREE_MENU_NEWDIR FULLMENUNUM(1,0,0)
-----------------------------------------------------------------------
Summary of changes:
frontends/amiga/font_diskfont.c | 1 +
frontends/amiga/gui.h | 2 --
frontends/amiga/gui_options.c | 1 +
frontends/amiga/history_local.c | 13 ++++++++-----
frontends/amiga/history_local.h | 3 ++-
frontends/amiga/plotters.c | 3 +++
frontends/amiga/plotters.h | 3 ++-
frontends/amiga/tree.c | 1 +
8 files changed, 18 insertions(+), 9 deletions(-)
diff --git a/frontends/amiga/font_diskfont.c b/frontends/amiga/font_diskfont.c
index a64674b..313e992 100644
--- a/frontends/amiga/font_diskfont.c
+++ b/frontends/amiga/font_diskfont.c
@@ -34,6 +34,7 @@
#include "amiga/font.h"
#include "amiga/font_diskfont.h"
#include "amiga/gui.h"
+#include "amiga/plotters.h"
#include "amiga/utf8.h"
#define MAX_FONT_NAME_SIZE 33
diff --git a/frontends/amiga/gui.h b/frontends/amiga/gui.h
index 12f25d9..8289a5c 100644
--- a/frontends/amiga/gui.h
+++ b/frontends/amiga/gui.h
@@ -31,7 +31,6 @@
#include "amiga/menu.h"
#include "amiga/object.h"
#include "amiga/os3support.h"
-#include "amiga/plotters.h"
#ifdef __amigaos4__
#define HOOKF(ret,func,type,ptr,msgtype) static ret func(struct Hook *hook,
type ptr, msgtype msg)
@@ -175,7 +174,6 @@ struct MinList *window_list;
struct Screen *scrn;
struct MsgPort *sport;
struct gui_window *cur_gw;
-struct gui_globals browserglob;
BOOL ami_autoscroll;
void ami_get_msg(void);
diff --git a/frontends/amiga/gui_options.c b/frontends/amiga/gui_options.c
index d700eaf..f8be3bc 100755
--- a/frontends/amiga/gui_options.c
+++ b/frontends/amiga/gui_options.c
@@ -20,6 +20,7 @@
#include <string.h>
#include <stdlib.h>
#include <proto/exec.h>
+#include <proto/graphics.h>
#include <proto/intuition.h>
#include <proto/utility.h>
#ifdef __amigaos4__
diff --git a/frontends/amiga/history_local.c b/frontends/amiga/history_local.c
index 3a6cbe4..e7171e2 100755
--- a/frontends/amiga/history_local.c
+++ b/frontends/amiga/history_local.c
@@ -53,6 +53,7 @@
#include "amiga/libs.h"
#include "amiga/misc.h"
#include "amiga/object.h"
+#include "amiga/plotters.h"
#include "amiga/gui.h"
#include "amiga/history_local.h"
@@ -80,7 +81,7 @@ static void ami_history_redraw(struct history_window *hw)
return;
}
- glob = &hw->gg;
+ glob = hw->gg;
SetRPAttrs(glob->rp, RPTAG_APenColor, 0xffffffff, TAG_DONE);
RectFill(glob->rp, 0, 0, bbox->Width - 1, bbox->Height - 1);
@@ -90,10 +91,10 @@ static void ami_history_redraw(struct history_window *hw)
glob = &browserglob;
- ami_clearclipreg(&hw->gg);
+ ami_clearclipreg(hw->gg);
ami_history_update_extent(hw);
- BltBitMapRastPort(hw->gg.bm, 0, 0, hw->win->RPort,
+ BltBitMapRastPort(hw->gg->bm, 0, 0, hw->win->RPort,
bbox->Left, bbox->Top, bbox->Width,
bbox->Height, 0x0C0);
ami_gui_free_space_box(bbox);
@@ -116,8 +117,9 @@ void ami_history_open(struct gui_window *gw)
if(!gw->hw)
{
gw->hw = ami_misc_allocvec_clear(sizeof(struct history_window),
0);
+ gw->hw->gg = ami_misc_allocvec_clear(sizeof(struct
gui_globals), 0);
- ami_init_layers(&gw->hw->gg, scrn->Width, scrn->Height, false);
+ ami_init_layers(gw->hw->gg, scrn->Width, scrn->Height, false);
gw->hw->gw = gw;
browser_window_history_size(gw->bw, &width, &height);
@@ -223,7 +225,8 @@ static bool ami_history_click(struct history_window *hw,
uint16 code)
void ami_history_close(struct history_window *hw)
{
- ami_free_layers(&hw->gg);
+ ami_free_layers(hw->gg);
+ FreeVec(hw->gg);
hw->gw->hw = NULL;
DisposeObject(hw->objects[OID_MAIN]);
DelObject(hw->node);
diff --git a/frontends/amiga/history_local.h b/frontends/amiga/history_local.h
index f748821..284da34 100755
--- a/frontends/amiga/history_local.h
+++ b/frontends/amiga/history_local.h
@@ -23,6 +23,7 @@
#include <intuition/classusr.h>
struct gui_window;
+struct gui_globals;
struct history_window {
struct nsObject *node;
@@ -30,7 +31,7 @@ struct history_window {
Object *objects[GID_LAST];
struct gui_window *gw;
struct Hook scrollerhook;
- struct gui_globals gg;
+ struct gui_globals *gg;
};
/**
diff --git a/frontends/amiga/plotters.c b/frontends/amiga/plotters.c
index fee3e7b..7e19db7 100644
--- a/frontends/amiga/plotters.c
+++ b/frontends/amiga/plotters.c
@@ -72,6 +72,9 @@ struct bez_point {
float y;
};
+struct gui_globals browserglob;
+struct gui_globals *glob;
+
static int init_layers_count = 0;
static APTR pool_pens = NULL;
diff --git a/frontends/amiga/plotters.h b/frontends/amiga/plotters.h
index 45ebbd0..e027189 100644
--- a/frontends/amiga/plotters.h
+++ b/frontends/amiga/plotters.h
@@ -45,7 +45,8 @@ struct gui_globals
extern const struct plotter_table amiplot;
-struct gui_globals *glob;
+extern struct gui_globals *glob;
+extern struct gui_globals browserglob;
void ami_init_layers(struct gui_globals *gg, ULONG width, ULONG height, bool
force32bit);
void ami_free_layers(struct gui_globals *gg);
diff --git a/frontends/amiga/tree.c b/frontends/amiga/tree.c
index 52d5899..7f7140c 100644
--- a/frontends/amiga/tree.c
+++ b/frontends/amiga/tree.c
@@ -73,6 +73,7 @@
#include "amiga/theme.h" /* pointers */
#include "amiga/filetype.h"
#include "amiga/schedule.h"
+#include "amiga/plotters.h"
#define AMI_TREE_MENU_ITEMS 26
#define AMI_TREE_MENU_NEWDIR FULLMENUNUM(1,0,0)
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org