Advertisement
Guest User

main code

a guest
Nov 16th, 2017
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. #include <pebble.h>
  2.  
  3. static Window *s_main_window;
  4.  
  5. static void main_window_load(Window *window) {
  6. }
  7.  
  8. static void main_window_unload(Window *window) {
  9. }
  10.  
  11. static void init() {
  12. // Create main Window element and assign to pointer
  13. s_main_window = window_create();
  14.  
  15. // Set handlers to manage the elements inside the Window
  16. window_set_window_handlers(s_main_window, (WindowHandlers) {
  17. .load = main_window_load,
  18. .unload = main_window_unload
  19. });
  20.  
  21. // Show the Window on the watch, with animated=true
  22. window_stack_push(s_main_window, true);
  23. }
  24.  
  25. static void deinit() {
  26. // Destroy Window
  27. window_destroy(s_main_window);
  28. }
  29.  
  30. int main(void) {
  31. init();
  32. app_event_loop();
  33. deinit();
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement