Rationalise gui_globals a bit
This commit is contained in:
parent
fcde28d97f
commit
0bbb4f5a2a
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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__
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue