diff options
| author | maxim nikonov <maxim.nikonov@hqo.co> | 2026-02-06 18:12:40 +0500 |
|---|---|---|
| committer | maxim nikonov <maxim.nikonov@hqo.co> | 2026-02-06 18:12:40 +0500 |
| commit | b4995f979d127cea667b4e2b71c91e9db4ab52ef (patch) | |
| tree | fbebc775e10932bace8d6a7c3481b1ba200c64db /src/Fl.cxx | |
| parent | 9575eb0a1ffa8150f70f88b5f6b55f342c3c0088 (diff) | |
wip
Diffstat (limited to 'src/Fl.cxx')
| -rw-r--r-- | src/Fl.cxx | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx index 45509a0f6..2a110d935 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -510,7 +510,8 @@ void Fl::add_check(Fl_Timeout_Handler cb, void *argp) { callback that no longer exists. */ void Fl::remove_check(Fl_Timeout_Handler cb, void *argp) { - for (Check** p = &first_check; *p;) { + Check **p; + for (p = &first_check; *p;) { Check* t = *p; if (t->cb == cb && t->arg == argp) { if (next_check == t) next_check = t->next; @@ -527,7 +528,8 @@ void Fl::remove_check(Fl_Timeout_Handler cb, void *argp) { Returns 1 if the check exists and has not been called yet, 0 otherwise. */ int Fl::has_check(Fl_Timeout_Handler cb, void *argp) { - for (Check** p = &first_check; *p;) { + Check **p; + for (p = &first_check; *p;) { Check* t = *p; if (t->cb == cb && t->arg == argp) { return 1; @@ -869,7 +871,8 @@ void Fl::first_window(Fl_Window* window) { Redraws all widgets. */ void Fl::redraw() { - for (Fl_X* i = Fl_X::first; i; i = i->next) i->w->redraw(); + Fl_X *i; + for (i = Fl_X::first; i; i = i->next) i->w->redraw(); } /** @@ -886,7 +889,8 @@ void Fl::redraw() { void Fl::flush() { if (damage()) { damage_ = 0; - for (Fl_X* i = Fl_X::first; i; i = i->next) { + Fl_X *i; + for (i = Fl_X::first; i; i = i->next) { Fl_Window* wi = i->w; if (Fl_Window_Driver::driver(wi)->wait_for_expose_value) {damage_ = 1; continue;} if (!wi->visible_r()) continue; @@ -1006,7 +1010,8 @@ void Fl::remove_handler(Fl_Event_Handler ha) { int (*fl_local_grab)(int); // used by fl_dnd.cxx static int send_handlers(int e) { - for (const handler_link *hl = handlers; hl; hl = hl->next) + const handler_link *hl; + for (hl = handlers; hl; hl = hl->next) if (hl->handle(e)) return 1; return 0; } @@ -1082,7 +1087,8 @@ void Fl::remove_system_handler(Fl_System_Handler ha) { } int fl_send_system_handlers(void *e) { - for (const system_handler_link *hl = sys_handlers; hl; hl = hl->next) { + const system_handler_link *hl; + for (hl = sys_handlers; hl; hl = hl->next) { if (hl->handle(e, hl->data)) return 1; } @@ -1337,7 +1343,8 @@ static int send_event(int event, Fl_Widget* to, Fl_Window* window) { } else { dx = dy = 0; } - for (const Fl_Widget* w = to; w; w = w->parent()) { + const Fl_Widget *w; + for (w = to; w; w = w->parent()) { if (w->type() >= FL_WINDOW) { dx -= w->x(); dy -= w->y(); @@ -1903,7 +1910,8 @@ void Fl::delete_widget(Fl_Widget *wi) { if (win && win->shown()) win->hide(); // case of iconified window // don't add the same widget twice to the widget delete list - for (int i = 0; i < num_dwidgets; i++) { + int i; + for (i = 0; i < num_dwidgets; i++) { if (dwidgets[i]==wi) return; } @@ -1939,7 +1947,8 @@ void Fl::delete_widget(Fl_Widget *wi) { void Fl::do_widget_deletion() { if (!num_dwidgets) return; - for (int i = 0; i < num_dwidgets; i ++) + int i; + for (i = 0; i < num_dwidgets; i ++) delete dwidgets[i]; num_dwidgets = 0; @@ -2509,7 +2518,8 @@ void Fl::screen_scale(int n, float factor) { Fl_Screen_Driver::APP_SCALING_CAPABILITY capability = Fl::screen_driver()->rescalable(); if (!capability || n < 0 || n >= Fl::screen_count()) return; if (capability == Fl_Screen_Driver::SYSTEMWIDE_APP_SCALING) { - for (int s = 0; s < Fl::screen_count(); s++) { + int s; + for (s = 0; s < Fl::screen_count(); s++) { Fl::screen_driver()->rescale_all_windows_from_screen(s, factor, factor); } } else |
