diff options
author | Vincent Sanders <vince@kyllikki.org> | 2014-03-08 14:13:27 +0000 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2014-03-09 15:37:40 +0000 |
commit | 87f6314dabdc2067a19e01f8b29f9ecc38ed825b (patch) | |
tree | 78f8f8395e3bf3b7ee2c18a7b5a5e6d2d5ca9ddc /riscos/gui | |
parent | fb9b171e325488dc9792ee0f3062f15d8ec597ee (diff) | |
download | netsurf-87f6314dabdc2067a19e01f8b29f9ecc38ed825b.tar.gz netsurf-87f6314dabdc2067a19e01f8b29f9ecc38ed825b.tar.bz2 |
move scheduleing into browser operation table
Diffstat (limited to 'riscos/gui')
-rw-r--r-- | riscos/gui/progress_bar.c | 23 | ||||
-rw-r--r-- | riscos/gui/status_bar.c | 5 |
2 files changed, 16 insertions, 12 deletions
diff --git a/riscos/gui/progress_bar.c b/riscos/gui/progress_bar.c index 445797611..f5b47313b 100644 --- a/riscos/gui/progress_bar.c +++ b/riscos/gui/progress_bar.c @@ -29,10 +29,11 @@ #include "oslib/osspriteop.h" #include "oslib/wimp.h" #include "oslib/wimpspriteop.h" + #include "desktop/plotters.h" #include "utils/log.h" -#include "utils/schedule.h" #include "utils/utils.h" + #include "riscos/gui.h" #include "riscos/tinct.h" #include "riscos/wimp_event.h" @@ -159,8 +160,9 @@ void ro_gui_progress_bar_destroy(struct progress_bar *pb) os_error *error; assert(pb); - if (pb->animating) - schedule_remove(ro_gui_progress_bar_animate, pb); + if (pb->animating) { + riscos_schedule(-1, ro_gui_progress_bar_animate, pb); + } ro_gui_wimp_event_finalise(pb->w); error = xwimp_delete_window(pb->w); if (error) { @@ -292,12 +294,14 @@ void ro_gui_progress_bar_update(struct progress_bar *pb, int width, int height) /* update the animation state */ if ((pb->value == 0) || (pb->value == pb->range)) { - if (pb->animating) - schedule_remove(ro_gui_progress_bar_animate, pb); + if (pb->animating) { + riscos_schedule(-1, ro_gui_progress_bar_animate, pb); + } pb->animating = false; } else { - if (!pb->animating) - schedule(20, ro_gui_progress_bar_animate, pb); + if (!pb->animating) { + riscos_schedule(200, ro_gui_progress_bar_animate, pb); + } pb->animating = true; } @@ -372,8 +376,9 @@ void ro_gui_progress_bar_animate(void *p) if (pb->offset < 0) pb->offset += progress_width * 2; - if (pb->animating) - schedule(20, ro_gui_progress_bar_animate, pb); + if (pb->animating) { + riscos_schedule(200, ro_gui_progress_bar_animate, pb); + } redraw.w = pb->w; redraw.box = pb->visible; diff --git a/riscos/gui/status_bar.c b/riscos/gui/status_bar.c index 899fe99b6..46a511f95 100644 --- a/riscos/gui/status_bar.c +++ b/riscos/gui/status_bar.c @@ -30,7 +30,6 @@ #include "oslib/wimpspriteop.h" #include "desktop/plotters.h" #include "utils/log.h" -#include "utils/schedule.h" #include "utils/utils.h" #include "riscos/gui.h" #include "riscos/wimp.h" @@ -171,7 +170,7 @@ void ro_gui_status_bar_destroy(struct status_bar *sb) ro_gui_progress_bar_destroy(sb->pb); /* Remove any scheduled redraw callbacks */ - schedule_remove(ro_gui_status_bar_redraw_callback, (void *) sb); + riscos_schedule(-1, ro_gui_status_bar_redraw_callback, (void *) sb); free(sb); } @@ -331,7 +330,7 @@ void ro_gui_status_bar_set_text(struct status_bar *sb, const char *text) * { callback, handle } pair is registered at once. */ if (sb->visible && text != NULL) { - schedule(1, ro_gui_status_bar_redraw_callback, (void *) sb); + riscos_schedule(10, ro_gui_status_bar_redraw_callback, sb); } } |