This repository was archived by the owner on Apr 23, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsketchup.h
More file actions
53 lines (41 loc) · 1.42 KB
/
sketchup.h
File metadata and controls
53 lines (41 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef SKETCHUP_H
#define SKETCHUP_H
#include <stdbool.h>
#include <stdlib.h>
typedef struct sketchup_town_s {
void *ptr;
} sketchup_town;
typedef struct sketchup_room_s {
void *ptr;
} sketchup_room;
enum sketchup_val_type {
SKETCHUP_VAL_UNSUPPORTED = 0,
SKETCHUP_VAL_UNDEF,
SKETCHUP_VAL_NULL,
SKETCHUP_VAL_FALSE,
SKETCHUP_VAL_TRUE,
SKETCHUP_VAL_LONG,
SKETCHUP_VAL_DOUBLE,
SKETCHUP_VAL_STRING,
SKETCHUP_VAL_ARRAY,
SKETCHUP_VAL_OBJECT,
SKETCHUP_VAL_RESOURCE,
SKETCHUP_VAL_REFERENCE,
};
typedef struct sketchup_val_s {
enum sketchup_val_type type;
void *ptr;
} sketchup_val;
void sketchup_startup(void);
void sketchup_shutdown(void);
// sketchup_startup() must have been called before calling any of the functions below
bool sketchup_town_ctor(sketchup_town *town);
bool sketchup_town_append_room(sketchup_town town, const char *name, size_t room_index, size_t visit_index);
bool sketchup_town_save(sketchup_town town, const char *file);
bool sketchup_town_dtor(sketchup_town town);
bool sketchup_room_append_variable(sketchup_town town, size_t room_index, size_t visit_index, size_t var_index, const char *name, sketchup_val val);
void sketchup_sdk_version(size_t bufsiz, char *version);
#define SKETCHUP_NULL {0}
// Arbitrary limit - not sure if this is necessary, but seems like we should have some kind of upper bounds limit
#define SUP_MAX_ROOMS 5000
#endif /* SKETCHUP_H */