2020-08-09 15:03:02 -04:00
|
|
|
#include <pebble.h>
|
2022-01-07 16:55:03 -05:00
|
|
|
|
2020-08-09 15:03:02 -04:00
|
|
|
#include "pebblisp.h"
|
|
|
|
|
|
|
|
enum PebbleType {
|
2022-01-07 16:55:03 -05:00
|
|
|
WINDOW, TEXT_LAYER, P_ERROR
|
2020-08-09 15:03:02 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
struct PLTextLayer {
|
2022-01-07 16:55:03 -05:00
|
|
|
TextLayer* layer;
|
|
|
|
char* text;
|
2020-08-09 15:03:02 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct PebbleObject PebbleObject;
|
|
|
|
struct PebbleObject {
|
|
|
|
enum PebbleType type;
|
|
|
|
union {
|
2022-01-07 16:55:03 -05:00
|
|
|
Window* window;
|
|
|
|
struct PLTextLayer* textLayer;
|
|
|
|
void* ptr;
|
2020-08-09 15:03:02 -04:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-01-07 16:55:03 -05:00
|
|
|
Object createWindow(Object o1, Object o2, struct Environment* env);
|
|
|
|
|
|
|
|
Object deleteWindow(Object window, Object o2, struct Environment* env);
|
|
|
|
|
|
|
|
Object pushWindow(Object o1, Object o2, struct Environment* env);
|
|
|
|
|
|
|
|
Object addTextLayer(Object window, Object text, struct Environment* env);
|
|
|
|
|
|
|
|
Object updateTextLayer(Object textLayer, Object text, struct Environment* env);
|
|
|
|
|
|
|
|
Object subscribe(Object function, Object time, struct Environment* env);
|