pebblisp/src/pebbleobject.h

31 lines
796 B
C
Raw Normal View History

#include <pebble.h>
#include "pebblisp.h"
enum PebbleType {
WINDOW,
TEXT_LAYER,
P_ERROR
};
struct PLTextLayer {
TextLayer *layer;
char *text;
};
typedef struct PebbleObject PebbleObject;
struct PebbleObject {
enum PebbleType type;
union {
Window *window;
struct PLTextLayer *textLayer;
void *ptr;
};
};
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);