-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest_editor.c
More file actions
39 lines (33 loc) · 871 Bytes
/
test_editor.c
File metadata and controls
39 lines (33 loc) · 871 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
//-------------------------------------------------------------------
//
// Simple Editor Example:
//
// FILE:
// test_editor.c
//
// COMPILE:
// gcc test_editor.c -o test_editor libapp.a -lSDL -Wall
//
//-------------------------------------------------------------------
//
#include "src/app.h"
#define ID_EDITOR 1000
OBJECT *zero = NULL;
OBJECT *ed = NULL;
void CreateInterface (void) {
zero = app_GetRoot ();
if (zero) {
ed = app_NewEditor (zero, ID_EDITOR, 150, 150, "\nint a = 100, b = 250;\n\n a + b;\n\n // To Run Script: CTRL + R ...\n", 1000);
if (ed) {
app_SetSize (ed, 600, 400);
// app_SetFocus (ed);
}
}
}
int main (int argc, char **argv) {
if (app_Init(argc,argv)) {
CreateInterface ();
app_Run (NULL);
}
return 0;
}