From: cuz Date: Sun, 16 Jul 2000 17:36:41 +0000 (+0000) Subject: Added more sample programs from Maciek X-Git-Tag: V2.12.0~3359 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c8215a37dfeb222e6bc409d6114cd0febeb2c8a0;p=cc65 Added more sample programs from Maciek git-svn-id: svn://svn.cc65.org/cc65/trunk@155 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/samples/geos/dialog.c b/samples/geos/dialog.c new file mode 100644 index 000000000..4f4fc55c6 --- /dev/null +++ b/samples/geos/dialog.c @@ -0,0 +1,32 @@ +/* Note: + * This is just a sample piece of code that shows how to use some structs - + * it may not even run. + */ + + +#include + +void sysopvfunc (void); +void opvecfunc (void); +void usrfunc (void); + +static const dlgBoxStr myDialog = { + DB_SETPOS (1, 0,150,0,319), + DB_TXTSTR (10,20,"test"), + DB_VARSTR (10,20,&r0L), + DB_GETSTR (10,20,&r0L,9), + DB_SYSOPV (sysopvfunc), + DB_GRPHSTR (&r0L), + DB_GETFILES (10,10), + DB_OPVEC (opvecfunc), + DB_USRICON (0,0,&r0L), + DB_USRROUT (usrfunc), + DB_ICON (OK, DBI_X_0, DBI_Y_0 ), + DB_ICON (CANCEL, DBI_X_1, DBI_Y_1), + DB_END + }; + +void main (void) +{ + DoDlgBox (&myDialog); + } diff --git a/samples/geos/grphstr.c b/samples/geos/grphstr.c new file mode 100644 index 000000000..38c9f8382 --- /dev/null +++ b/samples/geos/grphstr.c @@ -0,0 +1,26 @@ +/* Note: + * This is just a sample piece of code that shows how to use some structs - + * it may not even run. + */ + + +#include + +static const graphicStr myString = { + MOVEPENTO (0,0), + LINETO(100,100), + RECTANGLETO(50,50), + NEWPATTERN(3), + FRAME_RECTO(50,50), + PEN_X_DELTA(10), + PEN_Y_DELTA(10), + PEN_XY_DELTA(10,10), + GSTR_END + }; + +int main (void) +{ + + GraphicsString(&myString); +} + diff --git a/samples/geos/inittab.c b/samples/geos/inittab.c new file mode 100644 index 000000000..c0ed7d496 --- /dev/null +++ b/samples/geos/inittab.c @@ -0,0 +1,22 @@ +/* Note: + * This is just a sample piece of code that shows how to use some structs - + * it may not even run. + */ + + +#include + + +static const void myTab = { + 0xd020, (char)2, + (char)0, (char)2, + 0x4000, (char)5, + (char)0, (char)1, (char)2, (char)3, (char)4, + 0x0000 + }; + +int main (void) +{ + +} + diff --git a/samples/geos/menu.c b/samples/geos/menu.c new file mode 100644 index 000000000..a6a6efd44 --- /dev/null +++ b/samples/geos/menu.c @@ -0,0 +1,30 @@ +/* Note: + * This is just a sample piece of code that shows how to use some structs - + * it may not even run. + */ + + +#include + + +/* prototypes are necessary */ + +void smenu1 (void); +void smenu2 (void); +void smenu3 (void); + +typedef void menuString; + +static const menuString subMenu1 = { + (char)0, (char)(3*15), + (unsigned)0, (unsigned)50, + (char)(3 | VERTICAL), + "subitem1", (char)MENU_ACTION, (unsigned)smenu1, + "subitem2", (char)MENU_ACTION, (unsigned)smenu2, + "subitem3", (char)MENU_ACTION, (unsigned)smenu3 + }; + +void main (void) +{ + DoMenu(&subMenu1); + } diff --git a/samples/geos/sampleresource.res b/samples/geos/sampleresource.res new file mode 100644 index 000000000..4cea9b40a --- /dev/null +++ b/samples/geos/sampleresource.res @@ -0,0 +1,36 @@ + +# +# This is an example of application resource file +# +# + +# C= DOS name of the program +dosname="TestApp" + +# C= DOS type, USR is preferred, but PRG/SEQ might be used here +dostype=USR + +# GEOS file type, currently only APPLICATION +progtype=APPLICATION + +# GEOS Class field +class="Class" + +# GEOS Author field +author="Maciej Witkowiak" + +# GEOS Note field +note="This is C prog compiled with cc65 and GEOSLib." + +# GEOS version field +version="V1.0" + +# GEOS screenmode - for 40/80 columns for GEOS 64/128 +#screenmode=0 + +# if date is commented-out - current will be used +#day=9 +#month=3 +#year=0 +#hour=5 +#minute=55