Schedule redraws from local history too, hide ami_do_redraw and friends as only gui.c needs to call those directly now

This commit is contained in:
Chris Young 2013-04-04 19:46:33 +01:00
parent c297f45bb9
commit 6686d9dad8
4 changed files with 9 additions and 10 deletions

View File

@ -190,7 +190,7 @@ static uint32 ami_set_throbber_render_hook(struct Hook *hook, APTR space,
bool ami_gui_map_filename(char **remapped, const char *path, const char *file,
const char *map);
static void ami_gui_window_update_box_deferred(struct gui_window *g, bool draw);
static void ami_schedule_redraw(struct gui_window_2 *gwin, bool full_redraw);
static void ami_do_redraw(struct gui_window_2 *g);
STRPTR ami_locale_langs(void)
{
@ -2119,11 +2119,10 @@ void ami_handle_msg(void)
if(node->Type == AMINS_WINDOW)
{
/* Catch any reformats tagged by the core - not sure this is required
/* Catch any reformats tagged by the core - only used by scale? */
if(gwin->bw->reformat_pending) {
ami_do_redraw(gwin);
}
*/
if(gwin->bw->window->throbbing)
ami_update_throbber(gwin,false);
@ -3887,13 +3886,13 @@ static void ami_redraw_callback(struct gui_window_2 *gwin)
}
}
static void ami_schedule_redraw(struct gui_window_2 *gwin, bool full_redraw)
void ami_schedule_redraw(struct gui_window_2 *gwin, bool full_redraw)
{
schedule(0, ami_redraw_callback, gwin);
if(full_redraw) gwin->redraw_required = true;
}
void ami_do_redraw_tiled(struct gui_window_2 *gwin, bool busy,
static void ami_do_redraw_tiled(struct gui_window_2 *gwin, bool busy,
int left, int top, int width, int height,
int sx, int sy, struct IBox *bbox, struct redraw_context *ctx)
{
@ -3985,7 +3984,7 @@ void ami_do_redraw_tiled(struct gui_window_2 *gwin, bool busy,
* \param y1 bottom-right co-ordinate (in document co-ordinates)
*/
void ami_do_redraw_limits(struct gui_window *g, struct browser_window *bw, bool busy,
static void ami_do_redraw_limits(struct gui_window *g, struct browser_window *bw, bool busy,
int x0, int y0, int x1, int y1)
{
ULONG xoffset,yoffset,width=800,height=600;
@ -4116,7 +4115,7 @@ void gui_window_update_box(struct gui_window *g, const struct rect *rect)
ami_schedule_redraw(g->shared, false);
}
void ami_do_redraw(struct gui_window_2 *gwin)
static void ami_do_redraw(struct gui_window_2 *gwin)
{
struct Region *reg = NULL;
struct Rectangle rect;

View File

@ -148,7 +148,7 @@ struct gui_window
void ami_get_msg(void);
void ami_close_all_tabs(struct gui_window_2 *gwin);
void ami_quit_netsurf(void);
void ami_do_redraw(struct gui_window_2 *g);
void ami_schedule_redraw(struct gui_window_2 *gwin, bool full_redraw);
STRPTR ami_locale_langs(void);
int ami_key_to_nskey(ULONG keycode, struct InputEvent *ie);
bool ami_text_box_at_point(struct gui_window_2 *gwin, ULONG *x, ULONG *y);

View File

@ -212,7 +212,7 @@ bool ami_history_click(struct history_window *hw,uint16 code)
case SELECTUP:
history_click(hw->bw,history_current,x,y,false);
ami_history_redraw(hw);
ami_do_redraw(hw->bw->window->shared);
ami_schedule_redraw(hw->bw->window->shared, true);
break;
case MIDDLEUP:

View File

@ -1005,7 +1005,7 @@ static void ami_menu_item_browser_redraw(struct Hook *hook, APTR window, struct
struct gui_window_2 *gwin;
GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin);
gwin->redraw_required = true;
ami_schedule_redraw(gwin, true);
gwin->new_content = true;
}