我说我在c语言编程方面有中级经验,但是我从来没有见过这个语法用来创建函数.这让我想起了JQuery事件的语法.总的来说,我想详细解释这是什么以及替代语法可能是什么.我可以更好地阅读更多有关此内容的链接也很棒.
// 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
});
Run Code Online (Sandbox Code Playgroud)
这是Pebble WatchApp教程的代码片段.