feat(windows): empty main window
This commit is contained in:
parent
408ea69de8
commit
6ad5c8b7d6
5 changed files with 47 additions and 1 deletions
|
|
@ -4,4 +4,5 @@ IndentWidth: 2
|
||||||
UseTab: Never
|
UseTab: Never
|
||||||
PointerAlignment: Right
|
PointerAlignment: Right
|
||||||
ColumnLimit: 100
|
ColumnLimit: 100
|
||||||
|
AllowShortFunctionsOnASingleLine: None
|
||||||
---
|
---
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
"emery"
|
"emery"
|
||||||
],
|
],
|
||||||
"watchapp": {
|
"watchapp": {
|
||||||
"watchface": false
|
"watchface": true
|
||||||
},
|
},
|
||||||
"messageKeys": [
|
"messageKeys": [
|
||||||
"dummy"
|
"dummy"
|
||||||
|
|
|
||||||
11
src/c/main.c
11
src/c/main.c
|
|
@ -1,5 +1,16 @@
|
||||||
#include <pebble.h>
|
#include <pebble.h>
|
||||||
|
#include "main_window.h"
|
||||||
|
|
||||||
|
inline void init(void) {
|
||||||
|
main_window_init();
|
||||||
|
}
|
||||||
|
|
||||||
|
inline void deinit(void) {
|
||||||
|
main_window_deinit();
|
||||||
|
}
|
||||||
|
|
||||||
int main(void) {
|
int main(void) {
|
||||||
|
init();
|
||||||
app_event_loop();
|
app_event_loop();
|
||||||
|
deinit();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
25
src/c/main_window.c
Normal file
25
src/c/main_window.c
Normal 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
9
src/c/main_window.h
Normal 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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue