]> git.sur5r.net Git - cc65/commitdiff
Added more sample programs from Maciek
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 16 Jul 2000 17:36:41 +0000 (17:36 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 16 Jul 2000 17:36:41 +0000 (17:36 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@155 b7a2c559-68d2-44c3-8de9-860c34a00d81

samples/geos/dialog.c [new file with mode: 0644]
samples/geos/grphstr.c [new file with mode: 0644]
samples/geos/inittab.c [new file with mode: 0644]
samples/geos/menu.c [new file with mode: 0644]
samples/geos/sampleresource.res [new file with mode: 0644]

diff --git a/samples/geos/dialog.c b/samples/geos/dialog.c
new file mode 100644 (file)
index 0000000..4f4fc55
--- /dev/null
@@ -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);
+    }
diff --git a/samples/geos/grphstr.c b/samples/geos/grphstr.c
new file mode 100644 (file)
index 0000000..38c9f83
--- /dev/null
@@ -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);
+}
+
diff --git a/samples/geos/inittab.c b/samples/geos/inittab.c
new file mode 100644 (file)
index 0000000..c0ed7d4
--- /dev/null
@@ -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)
+{
+
+}
+
diff --git a/samples/geos/menu.c b/samples/geos/menu.c
new file mode 100644 (file)
index 0000000..a6a6efd
--- /dev/null
@@ -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);
+    }
diff --git a/samples/geos/sampleresource.res b/samples/geos/sampleresource.res
new file mode 100644 (file)
index 0000000..4cea9b4
--- /dev/null
@@ -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