-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfcode_object.h
More file actions
46 lines (33 loc) · 807 Bytes
/
fcode_object.h
File metadata and controls
46 lines (33 loc) · 807 Bytes
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
#include <stdbool.h>
#include <gtk/gtk.h>
#include "fcode_list.h"
#ifndef FCODE_OBJECT_H
#define FCODE_OBJECT_H
#define MAXNAME 512
typedef enum obj_type {
FCODE_ROOT = 0,
FCODE_DIR,
FCODE_FILE
} fcode_objtype;
typedef struct object {
fcode_objtype type;
char name[MAXNAME];
struct object *parent;
node *children;
/* drawing */
float sx;
float sy;
float dx;
float dy;
bool exp; /* horizontal/vertical expansion */
} fcode_object;
typedef struct project {
fcode_object *objects;
/* zoom-in/zoom-out feature */
float scale;
/* needed for redrawing inside a click */
GtkWidget *drawing_area;
} fcode_project;
void print_object(fcode_object *obj);
void print_project(fcode_project *proj);
#endif /* FCODE_OBJECT_H */