feat(windows): empty main window

This commit is contained in:
mikhail "synzr" 2025-10-11 19:40:53 +05:00
parent 408ea69de8
commit 6ad5c8b7d6
5 changed files with 47 additions and 1 deletions

View file

@ -4,4 +4,5 @@ IndentWidth: 2
UseTab: Never
PointerAlignment: Right
ColumnLimit: 100
AllowShortFunctionsOnASingleLine: None
---

View file

@ -18,7 +18,7 @@
"emery"
],
"watchapp": {
"watchface": false
"watchface": true
},
"messageKeys": [
"dummy"

View file

@ -1,5 +1,16 @@
#include <pebble.h>
#include "main_window.h"
inline void init(void) {
main_window_init();
}
inline void deinit(void) {
main_window_deinit();
}
int main(void) {
init();
app_event_loop();
deinit();
}

25
src/c/main_window.c Normal file
View file

@ -0,0 +1,25 @@
#include "main_window.h"
static Window *s_main_window;
static void main_window_load(Window *window) {
}
static void main_window_unload(Window *window) {
}
void main_window_init(void) {
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);
}
void main_window_deinit(void) {
window_stack_remove(s_main_window, true);
window_destroy(s_main_window);
}

9
src/c/main_window.h Normal file
View file

@ -0,0 +1,9 @@
#ifndef MAIN_WINDOW_H_
#define MAIN_WINDOW_H_
#include <pebble.h>
void main_window_init(void);
void main_window_deinit(void);
#endif