2015-12-19 7 views
4

Я смотрю в циферблате учебник Pebble C нашел здесь https://developer.getpebble.com/tutorials/watchface-tutorial/part1Может кто-нибудь объяснить часть этого кода, найденную в учебнике Pebble C Watchface?

часть кода вопрос здесь:

static void init() { 
    // Create main Window element and assign to pointer 
    s_main_window = window_create(); 

    // Set handlers to manage the elements inside the Window 
    window_set_window_handlers(s_main_window, (WindowHandlers) { 
    .load = main_window_load, 
    .unload = main_window_unload 
    }); 

    // Show the Window on the watch, with animated=true 
    window_stack_push(s_main_window, true); 
} 

ли window_set_window_handlers объявление функции и позвонить? И какова терминология для сокращенной записи .load и .unload в C?

Был бы очень признателен, если бы кто-то мог объяснить этот фрагмент кода, спасибо.

ответ