Sat, 11 Nov 2017 12:22:16 +0100
UiInteger uses int64 now
application/main.c | file | annotate | diff | comparison | revisions | |
ui/gtk/button.c | file | annotate | diff | comparison | revisions | |
ui/gtk/button.h | file | annotate | diff | comparison | revisions | |
ui/ui/toolkit.h | file | annotate | diff | comparison | revisions |
--- a/application/main.c Sat Nov 11 11:59:06 2017 +0100 +++ b/application/main.c Sat Nov 11 12:22:16 2017 +0100 @@ -1,7 +1,7 @@ /* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * - * Copyright 2012 Olaf Wintermann. All rights reserved. + * Copyright 2017 Olaf Wintermann. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met:
--- a/ui/gtk/button.c Sat Nov 11 11:59:06 2017 +0100 +++ b/ui/gtk/button.c Sat Nov 11 12:22:16 2017 +0100 @@ -84,13 +84,13 @@ event->callback(&e, event->userdata); } -int ui_toggle_button_get(UiInteger *integer) { +int64_t ui_toggle_button_get(UiInteger *integer) { GtkToggleButton *button = integer->obj; integer->value = (int)gtk_toggle_button_get_active(button); return integer->value; } -void ui_toggle_button_set(UiInteger *integer, int value) { +void ui_toggle_button_set(UiInteger *integer, int64_t value) { GtkToggleButton *button = integer->obj; integer->value = value; gtk_toggle_button_set_active(button, value != 0 ? TRUE : FALSE); @@ -226,7 +226,7 @@ ui_notify_evt(i->observers, &e); } -int ui_radiobutton_get(UiInteger *value) { +int64_t ui_radiobutton_get(UiInteger *value) { int selection = 0; GSList *ls = value->obj; int i = 0; @@ -244,7 +244,7 @@ return selection; } -void ui_radiobutton_set(UiInteger *value, int i) { +void ui_radiobutton_set(UiInteger *value, int64_t i) { GSList *ls = value->obj; int s = g_slist_length(ls) - 1 - i; int j = 0;
--- a/ui/gtk/button.h Sat Nov 11 11:59:06 2017 +0100 +++ b/ui/gtk/button.h Sat Nov 11 12:22:16 2017 +0100 @@ -50,8 +50,8 @@ void ui_radio_obs(GtkToggleToolButton *widget, UiVarEventData *event); -int ui_radiobutton_get(UiInteger *value); -void ui_radiobutton_set(UiInteger *value, int i); +int64_t ui_radiobutton_get(UiInteger *value); +void ui_radiobutton_set(UiInteger *value, int64_t i); #ifdef __cplusplus }
--- a/ui/ui/toolkit.h Sat Nov 11 11:59:06 2017 +0100 +++ b/ui/ui/toolkit.h Sat Nov 11 12:22:16 2017 +0100 @@ -29,6 +29,8 @@ #ifndef UI_TOOLKIT_H #define UI_TOOLKIT_H +#include <inttypes.h> + #ifdef UI_COCOA #ifdef __OBJC__ @@ -189,11 +191,11 @@ }; struct UiInteger { - int (*get)(UiInteger*); - void (*set)(UiInteger*, int); + int64_t (*get)(UiInteger*); + void (*set)(UiInteger*, int64_t); void *obj; - int value; + int64_t value; UiObserver *observers; };