gokernel
(usa Linux Mint)
Enviado em 05/12/2013 - 20:12h
Olá !!!
Hoje disponibilizei o CS(Compiled Script) para download ...
Para quem não conhece o CS, é um compilador ( x86 32 bits ) que executa como um script ...
Aqui:
http://code.google.com/p/microasm/downloads/list
WORDS:
static char *words [] = {
"float",
"for",
"function",
"if",
"import",
"int",
"library",
"pchar",
"pvoid",
"while",
NULL
};
Para compilar leia o arquivo ( README.txt ) .
Para testar:
cs script/file.cs
E somente para windows coloquei o modulo ( campus.dll ) da Campus Framework Native for Windows... para testar:
cs campus.cs
[code]
/*
**-------------------------------------------------------------------
**
** Example using the CAMPUS FRAMEWORK(native) for windows.
**
** BY: gokernel - gokernel@hotmail.com
**
**-------------------------------------------------------------------
*/
library campus; // file: campus.dll
import
camInit,
camRun,
camNewWindow,
camNewContainer,
camNewTab,
camNewButton,
camNewEdit,
campusTabNewPage
;
library user32; // file: user32.dll
import
ShowWindow,
GetWindowTextA
;
int count;
pchar string;
pvoid win, tab, container, edit;
string = malloc (100); // <<<<<<<<<< alloc memory to buffer
function call_button1 (o, ev, c)
{
printf("ID: %d - count: %d", c, count);
count++;
}
function call_button2 (o, ev, c)
{
func();
}
function call_edit (o, ev, c)
{
GetWindowTextA (o, string, 99);
printf("Edit Text: '%s'", string);
}
//-----------------------------------------------
camInit();
win = camNewWindow (
300,200,500,400, // x, y, w, h
0, // id
13565952, // flags: WS_OVERLAPPEDWINDOW
0, // parent
"MainWindow", // text
0 // call
);
tab = camNewTab (
10,10,400,300, // x, y, w, h
0, // id
0, // flags:
win, // parent
"SECOND WINDOW", // text
0 // call
);
campusTabNewPage (tab, "Page Zero");
campusTabNewPage (tab, "Page 01");
campusTabNewPage (tab, "Page 02");
camNewButton (
100,100,150,30, // x, y, w, h
100, // id
1342177280, // flags: WS_VISIBLE | WS_CHILD
tab, // parent
"Button 01", // text
call_button1 // call
);
camNewButton (
100,150,150,30, // x, y, w, h
200, // id
1342177280, // flags: WS_VISIBLE | WS_CHILD
tab, // parent
"List func()", // text
call_button2 // call
);
container = camNewContainer (
10,25,250,250, // x, y, w, h
200, // id
0, // flags:
tab, // parent
0, // text
0 // call
);
camNewButton (
50,50,150,30, // x, y, w, h
200, // id
1342177280, // flags: WS_VISIBLE | WS_CHILD
container, // parent
"Get Text", // text
0 // call
);
edit = camNewEdit (
50,100,150,22, // x, y, w, h
200, // id
1350566016, // flags: WS_VISIBLE | WS_CHILD | WS_BORDER | ES_AUTOHSCROLL
container, // parent
"Edit Text", // text
call_edit // call
);
ShowWindow (win,1);
camRun (); // main loop
//-----------------------------------------------
[code]
Abraço !