diff options
Diffstat (limited to 'Source/DiVine/examples')
-rwxr-xr-x | Source/DiVine/examples/Makefile.am | 26 | ||||
-rwxr-xr-x | Source/DiVine/examples/Makefile.in | 506 | ||||
-rwxr-xr-x | Source/DiVine/examples/divine-test.c | 38 | ||||
-rwxr-xr-x | Source/DiVine/examples/scroll_circle.spooky | 7 | ||||
-rwxr-xr-x | Source/DiVine/examples/scroll_diagonal.spooky | 12 | ||||
-rwxr-xr-x | Source/DiVine/examples/scroll_vertical.spooky | 10 | ||||
-rwxr-xr-x | Source/DiVine/examples/spooky.c | 386 |
7 files changed, 985 insertions, 0 deletions
diff --git a/Source/DiVine/examples/Makefile.am b/Source/DiVine/examples/Makefile.am new file mode 100755 index 0000000..7c6ce41 --- /dev/null +++ b/Source/DiVine/examples/Makefile.am @@ -0,0 +1,26 @@ +INCLUDES = \ + -I$(top_srcdir)/include \ + @DIRECTFB_CFLAGS@ + +bin_PROGRAMS = spooky + +noinst_PROGRAMS = divine-test + + +spooky_SOURCES = spooky.c + +spooky_LDADD = \ + $(top_builddir)/lib/libdivine.la \ + -lm + + +divine_test_SOURCES = divine-test.c + +divine_test_LDADD = \ + $(top_builddir)/lib/libdivine.la + +EXTRA_DIST = \ + scroll_circle.spooky \ + scroll_diagonal.spooky \ + scroll_vertical.spooky + diff --git a/Source/DiVine/examples/Makefile.in b/Source/DiVine/examples/Makefile.in new file mode 100755 index 0000000..254e238 --- /dev/null +++ b/Source/DiVine/examples/Makefile.in @@ -0,0 +1,506 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = spooky$(EXEEXT) +noinst_PROGRAMS = divine-test$(EXEEXT) +subdir = examples +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) +am_divine_test_OBJECTS = divine-test.$(OBJEXT) +divine_test_OBJECTS = $(am_divine_test_OBJECTS) +divine_test_DEPENDENCIES = $(top_builddir)/lib/libdivine.la +am_spooky_OBJECTS = spooky.$(OBJEXT) +spooky_OBJECTS = $(am_spooky_OBJECTS) +spooky_DEPENDENCIES = $(top_builddir)/lib/libdivine.la +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(divine_test_SOURCES) $(spooky_SOURCES) +DIST_SOURCES = $(divine_test_SOURCES) $(spooky_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DIRECTFB_CFLAGS = @DIRECTFB_CFLAGS@ +DIRECTFB_INTERNAL_CFLAGS = @DIRECTFB_INTERNAL_CFLAGS@ +DIRECTFB_LIBS = @DIRECTFB_LIBS@ +DIVINE_BINARY_AGE = @DIVINE_BINARY_AGE@ +DIVINE_INTERFACE_AGE = @DIVINE_INTERFACE_AGE@ +DIVINE_MAJOR_VERSION = @DIVINE_MAJOR_VERSION@ +DIVINE_MICRO_VERSION = @DIVINE_MICRO_VERSION@ +DIVINE_MINOR_VERSION = @DIVINE_MINOR_VERSION@ +DIVINE_VERSION = @DIVINE_VERSION@ +DSYMUTIL = @DSYMUTIL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_AGE = @LT_AGE@ +LT_CURRENT = @LT_CURRENT@ +LT_RELEASE = @LT_RELEASE@ +LT_REVISION = @LT_REVISION@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULEDIR = @MODULEDIR@ +NMEDIT = @NMEDIT@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +INCLUDES = \ + -I$(top_srcdir)/include \ + @DIRECTFB_CFLAGS@ + +spooky_SOURCES = spooky.c +spooky_LDADD = \ + $(top_builddir)/lib/libdivine.la \ + -lm + +divine_test_SOURCES = divine-test.c +divine_test_LDADD = \ + $(top_builddir)/lib/libdivine.la + +EXTRA_DIST = \ + scroll_circle.spooky \ + scroll_diagonal.spooky \ + scroll_vertical.spooky + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu examples/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done + +clean-noinstPROGRAMS: + @list='$(noinst_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +divine-test$(EXEEXT): $(divine_test_OBJECTS) $(divine_test_DEPENDENCIES) + @rm -f divine-test$(EXEEXT) + $(LINK) $(divine_test_OBJECTS) $(divine_test_LDADD) $(LIBS) +spooky$(EXEEXT): $(spooky_OBJECTS) $(spooky_DEPENDENCIES) + @rm -f spooky$(EXEEXT) + $(LINK) $(spooky_OBJECTS) $(spooky_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/divine-test.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spooky.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic clean-libtool \ + clean-noinstPROGRAMS mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool clean-noinstPROGRAMS ctags \ + distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-binPROGRAMS \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-binPROGRAMS + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/Source/DiVine/examples/divine-test.c b/Source/DiVine/examples/divine-test.c new file mode 100755 index 0000000..dcad89e --- /dev/null +++ b/Source/DiVine/examples/divine-test.c @@ -0,0 +1,38 @@ +#include <unistd.h> +#include <string.h> + +#include <divine.h> + +int +main( int argc, char *argv[] ) +{ + int i; + DiVine *divine; + const char *msg = "DiVine Test!"; + int len = strlen( msg ); + + /* open the connection to the input driver */ + divine = divine_open( "/tmp/divine" ); + if (!divine) + return -1; + + /* wait a bit */ + sleep( 3 ); + + /* write a string */ + for (i=0; i<len; i++) { + /* simulate typing each character */ + divine_send_symbol( divine, msg[i] ); + + /* wait a second */ + sleep( 1 ); + } + + /* simulate a press/release of escape */ + divine_send_symbol( divine, DIKS_ESCAPE ); + + /* close the connection */ + divine_close( divine ); + + return 0; +} diff --git a/Source/DiVine/examples/scroll_circle.spooky b/Source/DiVine/examples/scroll_circle.spooky new file mode 100755 index 0000000..efb1678 --- /dev/null +++ b/Source/DiVine/examples/scroll_circle.spooky @@ -0,0 +1,7 @@ +mx140 my230 p4000 + +b+0 + +M10c1000s10o10 + +b-0 diff --git a/Source/DiVine/examples/scroll_diagonal.spooky b/Source/DiVine/examples/scroll_diagonal.spooky new file mode 100755 index 0000000..8c39a59 --- /dev/null +++ b/Source/DiVine/examples/scroll_diagonal.spooky @@ -0,0 +1,12 @@ +mx100 my200 p3000 + + +b+0 + +M30c10l-4,-4 + +p1000 + +M30c10l4,4 + +b-0 diff --git a/Source/DiVine/examples/scroll_vertical.spooky b/Source/DiVine/examples/scroll_vertical.spooky new file mode 100755 index 0000000..99d6585 --- /dev/null +++ b/Source/DiVine/examples/scroll_vertical.spooky @@ -0,0 +1,10 @@ +mx200 my30 + +p3000 + + +b+0 + +M40c10l-5,0 + +b-0 diff --git a/Source/DiVine/examples/spooky.c b/Source/DiVine/examples/spooky.c new file mode 100755 index 0000000..62a417f --- /dev/null +++ b/Source/DiVine/examples/spooky.c @@ -0,0 +1,386 @@ +#include <stdio.h> +#include <string.h> +#include <unistd.h> +#include <errno.h> + +#include <math.h> + +#include <directfb.h> +#include <directfb_keynames.h> + +#include <divine.h> + + +static const DirectFBKeySymbolNames(m_symbols); + + +static IDiVine *m_divine; +static int m_x; +static int m_y; + +static int m_sin16_16[360 * 16]; + + +static inline int +sin_16_16( int deg16_16 ) +{ + return m_sin16_16[ (deg16_16 >> 12) % (360 * 16) ]; +} + +static inline int +cos_16_16( int deg16_16 ) +{ + return m_sin16_16[ ((deg16_16 + 90 * 65536) >> 12) % (360 * 16) ]; +} + + +typedef void (*HandlerProcess)( FILE *stream ); + +typedef struct { + HandlerProcess process; +} Handler; + + +static void +process_button( FILE *stream ) +{ + DFBInputEvent event; + + event.flags = DIEF_NONE; + + if (fgetc(stream) == '+') + event.type = DIET_BUTTONPRESS; + else + event.type = DIET_BUTTONRELEASE; + + event.button = fgetc(stream) - '0'; + + m_divine->SendEvent( m_divine, &event ); +} + +static Handler m_button = { + .process = process_button +}; + + +static void +process_motion( FILE *stream ) +{ + DFBInputEvent event; + + event.flags = DIEF_AXISABS; + event.type = DIET_AXISMOTION; + event.axis = fgetc(stream) - 'x'; + + if (fscanf( stream, "%d", &event.axisabs ) != 1) + return; + + switch (event.axis) { + case DIAI_X: + m_x = event.axisabs; + break; + + case DIAI_Y: + m_y = event.axisabs; + break; + + default: + break; + } + + m_divine->SendEvent( m_divine, &event ); +} + +static Handler m_motion = { + .process = process_motion +}; + + +static void +process_motion_special( FILE *stream ) +{ + int i, ms, ex, ey, _x = m_x, _y = m_y; + int count = 1; + int step = 36; + DFBInputEvent event; + + if (fscanf( stream, "%d", &ms ) != 1) + return; + + while (!feof(stream)) { + switch (fgetc(stream)) { + case 'c': + if (fscanf( stream, "%d", &count ) != 1) + return; + break; + + case 's': + if (fscanf( stream, "%d", &step ) != 1) + return; + break; + + case 'o': + if (fscanf( stream, "%d", &ex ) != 1) + return; + + for (i=0; i<=360*count; i+=step) { + event.flags = DIEF_AXISABS | DIEF_FOLLOW; + event.type = DIET_AXISMOTION; + event.axis = DIAI_X; + + event.axisabs = _x = m_x + ((ex * cos_16_16( (i % 360) << 16 )) >> 16) - ex; + + m_divine->SendEvent( m_divine, &event ); + + + event.flags = DIEF_AXISABS; + event.type = DIET_AXISMOTION; + event.axis = DIAI_Y; + + event.axisabs = _y = m_y + ((ex * sin_16_16( (i % 360) << 16 )) >> 16); + + m_divine->SendEvent( m_divine, &event ); + + + usleep( ms * 1000 ); + } + + m_x = _x; + m_y = _y; + break; + + case 'l': + if (fscanf( stream, "%d,%d", &ex, &ey ) != 2) + return; + + for (i=0; i<count; i++) { + event.flags = DIEF_AXISABS | DIEF_FOLLOW; + event.type = DIET_AXISMOTION; + event.axis = DIAI_X; + + event.axisabs = _x = m_x + ex * i; + + m_divine->SendEvent( m_divine, &event ); + + + event.flags = DIEF_AXISABS; + event.type = DIET_AXISMOTION; + event.axis = DIAI_Y; + + event.axisabs = _y = m_y + ey * i; + + m_divine->SendEvent( m_divine, &event ); + + + usleep( ms * 1000 ); + } + + m_x = _x; + m_y = _y; + break; + + default: + return; + } + } +} + +static Handler m_motion_special = { + .process = process_motion_special +}; + + +static void +process_pause( FILE *stream ) +{ + int ms = 0; + + fscanf( stream, "%d", &ms ); + + usleep( ms * 1000 ); +} + +static Handler m_pause = { + .process = process_pause +}; + + +static void +process_text( FILE *stream ) +{ + int ms = 0; + bool leading = true; + + fscanf( stream, "%d", &ms ); + + while (!feof( stream )) { + int c = fgetc( stream ); + + if (c == ' ' && leading) + continue; + + if (c == '\n') + break; + + m_divine->SendSymbol( m_divine, c ); + + leading = false; + + usleep( ms * 1000 ); + } +} + +static Handler m_text = { + .process = process_text +}; + + +static void +process_text_special( FILE *stream ) +{ + int i, ms = 0; + char buf[31]; + + fscanf( stream, "%d", &ms ); + + while (!feof( stream )) { + switch (fgetc( stream )) { + case '\n': + return; + + case 'b': + m_divine->SendSymbol( m_divine, DIKS_BACKSPACE ); + break; + + case 'd': + m_divine->SendSymbol( m_divine, DIKS_DELETE ); + break; + + case 'r': + m_divine->SendSymbol( m_divine, DIKS_RETURN ); + break; + + case 'C': + switch (fgetc( stream )) { + case 'l': + m_divine->SendSymbol( m_divine, DIKS_CURSOR_LEFT ); + break; + + case 'r': + m_divine->SendSymbol( m_divine, DIKS_CURSOR_RIGHT ); + break; + + case 'u': + m_divine->SendSymbol( m_divine, DIKS_CURSOR_UP ); + break; + + case 'd': + m_divine->SendSymbol( m_divine, DIKS_CURSOR_DOWN ); + break; + } + break; + + case 'S': + fscanf( stream, "%30s", buf ); + + for (i=0; m_symbols[i].symbol != DIKS_NULL; i++) { + if (!strcasecmp( buf, m_symbols[i].name )) { + m_divine->SendSymbol( m_divine, m_symbols[i].symbol ); + break; + } + } + break; + } + + usleep( ms * 1000 ); + } +} + +static Handler m_text_special = { + .process = process_text_special +}; + + +static Handler *m_handlers[] = { + ['b'] = &m_button, + ['m'] = &m_motion, + ['M'] = &m_motion_special, + ['p'] = &m_pause, + ['t'] = &m_text, + ['T'] = &m_text_special +}; + + +int +main( int argc, char *argv[] ) +{ + DFBResult ret; + int c; + FILE *stream; + + DiVineInit( &argc, &argv ); + + if (argc > 1) { + if (!strcmp( argv[1], "--help" ) || argc > 2) { + fprintf( stderr, "Spooky - DiVine event generator\n" + "\n" + " Usage: spooky [filename]\n" + "\n" + "Reads from stdin unless filename is given." + "\n" + "Commands in stream:\n" + " Code Description Arguments & Options Examples\n" + " b Press/release button +/- <button> b+0 b-0\n" + " m Motion event (absolute) <axis> <value> mx23 my42\n" + " p Pause spooky <milliseconds> p20 p1000\n" + " M Special motion generator <ms-between-events> {o|l} M20o50\n" + " c <count> M20c1000o50\n" + " (linear) l <x,y> M20c1000l10,20\n" + " (circular) o <radius> M20c1000o100\n" + " s <step> M20c1000s30o50\n" + " t Entering text <ms> <Text to enter> t0 directfb.org\n" + " T Special characters/keys <ms> {b|d|r|Cx|S<symbol>} T3 CuClbbr Sprint Sf11\n" + " a e e Cl (left)\n" + " c l t Cr (right)\n" + " k Cu (up)\n" + " Cd (down)\n" + "\n" ); + + return -1; + } + + stream = fopen( argv[1], "r" ); + if (!stream) { + fprintf( stderr, "Spooky: Could not open '%s' for reading! (%s)\n", argv[1], strerror(errno) ); + return -2; + } + } + else + stream = stdin; + + /* open the connection to the input driver */ + ret = DiVineCreate( &m_divine ); + if (ret) { + D_DERROR( ret, "DiVineCreate() failed!\n" ); + return ret; + } + + /* Init 1/16th step sin table */ + for (c=0; c<360 * 16; c++) + m_sin16_16[c] = (int)(sin( (double) c / 16.0 * M_PI / 180.0 ) * 65536.0); + + /* Main loop */ + while (!feof(stream) && (c = fgetc(stream)) != '$') { + if (c < sizeof(m_handlers)/sizeof(m_handlers[0]) && m_handlers[c]) + m_handlers[c]->process( stream ); + } + + /* close the connection */ + m_divine->Release( m_divine ); + + if (stream != stdin) + fclose( stream ); + + return 0; +} + |