Added more sample programs from Maciek
git-svn-id: svn://svn.cc65.org/cc65/trunk@155 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
32
samples/geos/dialog.c
Normal file
32
samples/geos/dialog.c
Normal file
@@ -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 <geos.h>
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
26
samples/geos/grphstr.c
Normal file
26
samples/geos/grphstr.c
Normal file
@@ -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 <geos.h>
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
22
samples/geos/inittab.c
Normal file
22
samples/geos/inittab.c
Normal file
@@ -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 <geos.h>
|
||||||
|
|
||||||
|
|
||||||
|
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)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
30
samples/geos/menu.c
Normal file
30
samples/geos/menu.c
Normal file
@@ -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 <geos.h>
|
||||||
|
|
||||||
|
|
||||||
|
/* 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);
|
||||||
|
}
|
||||||
36
samples/geos/sampleresource.res
Normal file
36
samples/geos/sampleresource.res
Normal file
@@ -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
|
||||||
Reference in New Issue
Block a user