I am studying a face study tutorial in Pebble C found here https://developer.getpebble.com/tutorials/watchface-tutorial/part1
The piece of code in question is here:
static void init() {
s_main_window = window_create();
window_set_window_handlers(s_main_window, (WindowHandlers) {
.load = main_window_load,
.unload = main_window_unload
});
window_stack_push(s_main_window, true);
}
Is window_set_window_handlers a function declaration and call? And what is the terminology for the abbreviations .load and .unload in C?
It would be very helpful if someone could explain this piece of code, thanks.
source
share