summaryrefslogtreecommitdiff
path: root/Source/DirectFB/inputdrivers/gunze
diff options
context:
space:
mode:
Diffstat (limited to 'Source/DirectFB/inputdrivers/gunze')
-rwxr-xr-xSource/DirectFB/inputdrivers/gunze/Makefile.am30
-rwxr-xr-xSource/DirectFB/inputdrivers/gunze/Makefile.in592
-rwxr-xr-xSource/DirectFB/inputdrivers/gunze/gunze.c576
3 files changed, 1198 insertions, 0 deletions
diff --git a/Source/DirectFB/inputdrivers/gunze/Makefile.am b/Source/DirectFB/inputdrivers/gunze/Makefile.am
new file mode 100755
index 0000000..ef0b9e6
--- /dev/null
+++ b/Source/DirectFB/inputdrivers/gunze/Makefile.am
@@ -0,0 +1,30 @@
+## Makefile.am for DirectFB/inputdrivers/gunze
+
+INCLUDES = \
+ -I$(top_srcdir)/include \
+ -I$(top_builddir)/lib \
+ -I$(top_srcdir)/lib \
+ -I$(top_srcdir)/src
+
+input_LTLIBRARIES = libdirectfb_gunze.la
+
+if BUILD_STATIC
+input_DATA = $(input_LTLIBRARIES:.la=.o)
+endif
+
+inputdir = $(MODULEDIR)/inputdrivers
+
+libdirectfb_gunze_la_SOURCES = \
+ gunze.c
+
+libdirectfb_gunze_la_LDFLAGS = \
+ -module \
+ -avoid-version \
+ $(DFB_LDFLAGS)
+
+libdirectfb_gunze_la_LIBADD = \
+ $(top_builddir)/lib/direct/libdirect.la \
+ $(top_builddir)/src/libdirectfb.la
+
+include $(top_srcdir)/rules/libobject.make
+
diff --git a/Source/DirectFB/inputdrivers/gunze/Makefile.in b/Source/DirectFB/inputdrivers/gunze/Makefile.in
new file mode 100755
index 0000000..ceef162
--- /dev/null
+++ b/Source/DirectFB/inputdrivers/gunze/Makefile.in
@@ -0,0 +1,592 @@
+# 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@
+target_triplet = @target@
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(top_srcdir)/rules/libobject.make
+subdir = inputdrivers/gunze
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/as-ac-expand.m4 \
+ $(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__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(inputdir)" "$(DESTDIR)$(inputdir)"
+inputLTLIBRARIES_INSTALL = $(INSTALL)
+LTLIBRARIES = $(input_LTLIBRARIES)
+libdirectfb_gunze_la_DEPENDENCIES = \
+ $(top_builddir)/lib/direct/libdirect.la \
+ $(top_builddir)/src/libdirectfb.la
+am_libdirectfb_gunze_la_OBJECTS = gunze.lo
+libdirectfb_gunze_la_OBJECTS = $(am_libdirectfb_gunze_la_OBJECTS)
+libdirectfb_gunze_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(libdirectfb_gunze_la_LDFLAGS) $(LDFLAGS) -o $@
+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 = $(libdirectfb_gunze_la_SOURCES)
+DIST_SOURCES = $(libdirectfb_gunze_la_SOURCES)
+inputDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(input_DATA)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+ASFLAGS = @ASFLAGS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIR = @DATADIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@
+DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@
+DFB_LDFLAGS = @DFB_LDFLAGS@
+DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@
+DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@
+DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@
+DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@
+DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@
+DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@
+DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@
+DIRECTFB_VERSION = @DIRECTFB_VERSION@
+DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@
+DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@
+DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@
+DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@
+DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@
+DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@
+DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@
+DSYMUTIL = @DSYMUTIL@
+DYNLIB = @DYNLIB@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
+FREETYPE_LIBS = @FREETYPE_LIBS@
+FREETYPE_PROVIDER = @FREETYPE_PROVIDER@
+FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@
+FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@
+FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@
+GIF_PROVIDER = @GIF_PROVIDER@
+GREP = @GREP@
+HAVE_LINUX = @HAVE_LINUX@
+INCLUDEDIR = @INCLUDEDIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@
+JPEG_PROVIDER = @JPEG_PROVIDER@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBJPEG = @LIBJPEG@
+LIBOBJS = @LIBOBJS@
+LIBPNG = @LIBPNG@
+LIBPNG_CONFIG = @LIBPNG_CONFIG@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_AGE = @LT_AGE@
+LT_BINARY = @LT_BINARY@
+LT_CURRENT = @LT_CURRENT@
+LT_RELEASE = @LT_RELEASE@
+LT_REVISION = @LT_REVISION@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MAN2HTML = @MAN2HTML@
+MKDIR_P = @MKDIR_P@
+MODULEDIR = @MODULEDIR@
+MODULEDIRNAME = @MODULEDIRNAME@
+NMEDIT = @NMEDIT@
+OBJEXT = @OBJEXT@
+OSX_LIBS = @OSX_LIBS@
+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@
+PERL = @PERL@
+PKG_CONFIG = @PKG_CONFIG@
+PNG_PROVIDER = @PNG_PROVIDER@
+RANLIB = @RANLIB@
+RUNTIME_SYSROOT = @RUNTIME_SYSROOT@
+SDL_CFLAGS = @SDL_CFLAGS@
+SDL_LIBS = @SDL_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SOPATH = @SOPATH@
+STRIP = @STRIP@
+SYSCONFDIR = @SYSCONFDIR@
+SYSFS_LIBS = @SYSFS_LIBS@
+THREADFLAGS = @THREADFLAGS@
+THREADLIB = @THREADLIB@
+TSLIB_CFLAGS = @TSLIB_CFLAGS@
+TSLIB_LIBS = @TSLIB_LIBS@
+VERSION = @VERSION@
+VNC_CFLAGS = @VNC_CFLAGS@
+VNC_CONFIG = @VNC_CONFIG@
+VNC_LIBS = @VNC_LIBS@
+X11_CFLAGS = @X11_CFLAGS@
+X11_LIBS = @X11_LIBS@
+ZLIB_LIBS = @ZLIB_LIBS@
+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 = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+INCLUDES = \
+ -I$(top_srcdir)/include \
+ -I$(top_builddir)/lib \
+ -I$(top_srcdir)/lib \
+ -I$(top_srcdir)/src
+
+input_LTLIBRARIES = libdirectfb_gunze.la
+@BUILD_STATIC_TRUE@input_DATA = $(input_LTLIBRARIES:.la=.o)
+inputdir = $(MODULEDIR)/inputdrivers
+libdirectfb_gunze_la_SOURCES = \
+ gunze.c
+
+libdirectfb_gunze_la_LDFLAGS = \
+ -module \
+ -avoid-version \
+ $(DFB_LDFLAGS)
+
+libdirectfb_gunze_la_LIBADD = \
+ $(top_builddir)/lib/direct/libdirect.la \
+ $(top_builddir)/src/libdirectfb.la
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/rules/libobject.make $(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 inputdrivers/gunze/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu inputdrivers/gunze/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-inputLTLIBRARIES: $(input_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(inputdir)" || $(MKDIR_P) "$(DESTDIR)$(inputdir)"
+ @list='$(input_LTLIBRARIES)'; for p in $$list; do \
+ if test -f $$p; then \
+ f=$(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(inputLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(inputdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(inputLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(inputdir)/$$f"; \
+ else :; fi; \
+ done
+
+uninstall-inputLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(input_LTLIBRARIES)'; for p in $$list; do \
+ p=$(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(inputdir)/$$p'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(inputdir)/$$p"; \
+ done
+
+clean-inputLTLIBRARIES:
+ -test -z "$(input_LTLIBRARIES)" || rm -f $(input_LTLIBRARIES)
+ @list='$(input_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+libdirectfb_gunze.la: $(libdirectfb_gunze_la_OBJECTS) $(libdirectfb_gunze_la_DEPENDENCIES)
+ $(libdirectfb_gunze_la_LINK) -rpath $(inputdir) $(libdirectfb_gunze_la_OBJECTS) $(libdirectfb_gunze_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gunze.Plo@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
+install-inputDATA: $(input_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(inputdir)" || $(MKDIR_P) "$(DESTDIR)$(inputdir)"
+ @list='$(input_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(inputDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(inputdir)/$$f'"; \
+ $(inputDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(inputdir)/$$f"; \
+ done
+
+uninstall-inputDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(input_DATA)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(inputdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(inputdir)/$$f"; \
+ done
+
+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 $(LTLIBRARIES) $(DATA)
+installdirs:
+ for dir in "$(DESTDIR)$(inputdir)" "$(DESTDIR)$(inputdir)"; 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-generic clean-inputLTLIBRARIES clean-libtool \
+ 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-inputDATA install-inputLTLIBRARIES
+
+install-dvi: install-dvi-am
+
+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
+
+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-inputDATA uninstall-inputLTLIBRARIES
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-inputLTLIBRARIES clean-libtool ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am 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-inputDATA \
+ install-inputLTLIBRARIES 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-inputDATA \
+ uninstall-inputLTLIBRARIES
+
+%.o: .libs/%.a %.la
+ rm -f $<.tmp/*.o
+ if test -d $<.tmp; then rmdir $<.tmp; fi
+ mkdir $<.tmp
+ (cd $<.tmp && $(AR) x ../../$<)
+ $(LD) -o $@ -r $<.tmp/*.o
+ rm -f $<.tmp/*.o && rmdir $<.tmp
+
+.PHONY: $(LTLIBRARIES:%.la=.libs/%.a)
+# 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/DirectFB/inputdrivers/gunze/gunze.c b/Source/DirectFB/inputdrivers/gunze/gunze.c
new file mode 100755
index 0000000..840cd33
--- /dev/null
+++ b/Source/DirectFB/inputdrivers/gunze/gunze.c
@@ -0,0 +1,576 @@
+/*
+ (c) Copyright 2005 Gnat Solutions, Inc.
+
+ All rights reserved.
+
+ Written by Nathanael D. Noblet <nathanael@gnat.ca>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the
+ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA.
+
+ This driver is a re-write from the gunze driver provided in XFree86.
+ Using the MuTouch driver as a skeleton.
+
+ */
+
+#include <config.h>
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+#include <fcntl.h>
+
+#include <termios.h>
+
+#include <sys/ioctl.h>
+#include <sys/types.h>
+
+#include <linux/serial.h>
+
+#include <directfb.h>
+
+#include <core/coredefs.h>
+#include <core/coretypes.h>
+
+#include <core/input.h>
+#include <core/system.h>
+
+#include <misc/conf.h>
+
+#include <direct/debug.h>
+#include <direct/mem.h>
+#include <direct/messages.h>
+#include <direct/memcpy.h>
+#include <direct/thread.h>
+
+#include <core/input_driver.h>
+
+DFB_INPUT_DRIVER( gunze )
+
+#define BUFFER_SIZE 64 /* size of reception buffer */
+#define GUNZE_MAXPHYSCOORD 1023
+#define GUNZE_MAXCOORD (64*1024-1) /* oversampled, synthetic value */
+#define FLAG_TAPPING 1
+#define FLAG_WAS_UP 2
+#define BAUDRATE B9600
+
+#define GunzeT_PACKET_SIZE 10
+#define GunzeT_SCREENWIDTH 1024
+#define GunzeT_SCREENHEIGHT 768
+#define GunzeT_MINX 0
+#define GunzeT_MINY 0
+#define GunzeT_DEFAULT_DEVICE "/dev/ttyS0"
+
+#define GUNZE_PANEL_TOUCH T
+#define GUNZE_PANEL_UNTOUCH R
+
+#define GUNZE_SERIAL_DLEN 11
+#define GUNZE_PS2_DLEN 3
+
+#define GUNZE_SECTION_NAME "gunze"
+#define GUNZE_DEFAULT_CFGFILE "/etc/gunzets.calib"
+
+#define SYSCALL(call) while(((call) == -1) && (errno == EINTR))
+
+/*
+* Serial protocol (11 b): <T-or-R> <4-bytes-for-X> , <4-bytes-for-Y> 0x0d
+*/
+typedef struct __GunzeTData__
+{
+ const char *gunDevice; /* device file name */
+ DirectThread *thread;
+ CoreInputDevice *device;
+ unsigned int x;
+ unsigned int y;
+ unsigned int screen_width;
+ unsigned int screen_height;
+ int flags; /* various flags */
+ int gunType; /* TYPE_SERIAL, etc */
+ int gunBaud; /* 9600 or 19200 */
+ int gunDlen; /* data length (3 or 11) */
+ int gunPrevX; /* previous X position */
+ int gunPrevY; /* previous Y position */
+ int gunSmooth; /* how smooth the motion is */
+ int gunTapping; /* move-and-tap (or press-only) not implemented */
+ int gunPrevButtonState; /* previous button state */
+ int gunBytes; /* number of bytes read */
+ unsigned char gunData[16]; /* data read on the device */
+ int gunCalib[4]; /* calibration data */
+ char *gunConfig; /* filename for configuration */
+ int fd;
+} GunzeTData;
+
+enum devicetypeitems {
+ TYPE_UNKNOWN = 0,
+ TYPE_SERIAL = 1,
+ TYPE_PS2,
+ TYPE_USB
+};
+
+static int GunzeReadCalib(GunzeTData *priv)
+{
+ int i=1;
+ int err = 1;
+ FILE *f;
+ priv->gunCalib[0]=priv->gunCalib[1]=priv->gunCalib[2]=priv->gunCalib[3]=0;
+ f = fopen(priv->gunConfig, "r");
+ if (f)
+ {
+ char s[80];
+ fgets(s, 80, f); /* discard the comment */
+ if (fscanf(f, "%d %d %d %d", priv->gunCalib, priv->gunCalib+1, priv->gunCalib+2, priv->gunCalib+3) == 4)
+ {
+ D_PERROR("DirectFB/gunze: Calibration invalid 0 i:%d gunCalib[0]:%d \n",i,priv->gunCalib[0]);
+ err = 0;
+ }
+
+ for (i=0; i<4; i++)
+ {
+ if (priv->gunCalib[i] & ~1023)
+ {
+ D_PERROR("DirectFB/gunze: Calibration invalid 0 i:%d gunCalib[i]:%d \n",i,priv->gunCalib[i]);
+ err++;
+ }
+ if (abs(priv->gunCalib[0] - priv->gunCalib[2]) < 100)
+ {
+ D_PERROR("DirectFB/gunze: Calibration invalid 1 0:%d 2:%d abs(%d)\n",priv->gunCalib[0],priv->gunCalib[2],abs(priv->gunCalib[0] - priv->gunCalib[2]));
+ err++;
+ }
+ if (abs(priv->gunCalib[1] - priv->gunCalib[3]) < 100)
+ {
+ D_PERROR("DirectFB/gunze: Calibration invalid 2 1:%d 3:%d abs(%d)\n",priv->gunCalib[1],priv->gunCalib[3],abs(priv->gunCalib[1] - priv->gunCalib[3]));
+ err++;
+ }
+ fclose(f);
+ }
+ }
+ if (err)
+ {
+ D_PERROR("DirectFB/gunze: Calibration data absent or invalid, using defaults\n");
+ priv->gunCalib[0] = priv->gunCalib[1] = 128; /* 1/8 */
+ priv->gunCalib[2] = priv->gunCalib[3] = 896; /* 7/8 */
+ }
+ return 0;
+}
+
+static int GunzeSetToOptimalCTRL(int file)
+{
+ struct termios newtio;
+ int err;
+
+ SYSCALL(err = tcgetattr(file, &newtio));
+
+ if (err == -1) {
+ D_PERROR("DirectFB/gunze: Gunze touch screen tcgetattr failed\n");
+ return 0;
+ }
+
+ memset(&newtio,0, sizeof(newtio)); /* clear struct for new port settings */
+/*
+ BAUDRATE: Set bps rate. You could also use cfsetispeed and cfsetospeed.
+ CRTSCTS : output hardware flow control (only used if the cable has
+ all necessary lines. See sect. 7 of Serial-HOWTO)
+ CS8 : 8n1 (8bit,no parity,1 stopbit)
+ CLOCAL : local connection, no modem contol
+ CREAD : enable receiving characters
+*/
+ newtio.c_cflag = BAUDRATE | CRTSCTS | CS8 | CLOCAL | CREAD;
+/*
+ IGNPAR : ignore bytes with parity errors
+ ICRNL : map CR to NL (otherwise a CR input on the other computer will not terminate input)
+ otherwise make device raw (no other input processing)
+*/
+ newtio.c_iflag = IGNPAR | ICRNL;
+/* Raw output */
+ newtio.c_oflag = 0;
+/*
+ ICANON : enable canonical input
+ disable all echo functionality, and don't send signals to calling program
+*/
+ newtio.c_lflag = ICANON;
+
+/*
+ initialize all control characters
+ default values can be found in /usr/include/termios.h, and are given
+ in the comments, but we don't need them here
+*/
+ newtio.c_cc[VINTR] = 0; /* Ctrl-c */
+ newtio.c_cc[VQUIT] = 0; /* Ctrl-\ */
+ newtio.c_cc[VERASE] = 0; /* del */
+ newtio.c_cc[VKILL] = 0; /* @ */
+ newtio.c_cc[VEOF] = 4; /* Ctrl-d */
+ newtio.c_cc[VTIME] = 0; /* inter-character timer unused */
+ newtio.c_cc[VMIN] = 1; /* blocking read until 1 character arrives */
+ newtio.c_cc[VSWTC] = 0; /* '\0' */
+ newtio.c_cc[VSTART] = 0; /* Ctrl-q */
+ newtio.c_cc[VSTOP] = 0; /* Ctrl-s */
+ newtio.c_cc[VSUSP] = 0; /* Ctrl-z */
+ newtio.c_cc[VEOL] = 0; /* '\0' */
+ newtio.c_cc[VREPRINT] = 0; /* Ctrl-r */
+ newtio.c_cc[VDISCARD] = 0; /* Ctrl-u */
+ newtio.c_cc[VWERASE] = 0; /* Ctrl-w */
+ newtio.c_cc[VLNEXT] = 0; /* Ctrl-v */
+ newtio.c_cc[VEOL2] = 0; /* '\0' */
+
+ /* now clean the modem line and activate the settings for the port */
+
+ tcflush(file, TCIFLUSH);
+ err = tcsetattr(file, TCSANOW, &newtio);
+ if (err == -1) {
+ D_PERROR("DirectFB/gunze: Gunze touch screen tcsetattr TCSANOW failed\n");
+ return 0;
+ }
+
+ return 1;
+}
+
+static int GunzeOpenDevice(const char *device)
+{
+ int fd;
+ int res;
+
+ /* opens device */
+ SYSCALL(fd = open(device, O_RDWR | O_NOCTTY));
+ if (fd == -1)
+ {
+ D_PERROR("DirectFB/gunze: Error opening device %s\n",device);
+ return fd;
+ }
+
+ /* setup termios settings for communication */
+ if((res = GunzeSetToOptimalCTRL(fd)) == 0)
+ {
+ close(fd);
+ return res;
+ }
+
+ return fd;
+}
+
+/* The main routine for GunzeTouch */
+static void *GunzeTouchEventThread(DirectThread *thread, void *driver_data)
+{
+ GunzeTData *priv = (GunzeTData *) driver_data;
+ unsigned char *pkt = priv->gunData;
+ int len, loop;
+ int x =0;
+ int y =0;
+ int button =0;
+ int *calib = priv->gunCalib;
+ unsigned char buffer[BUFFER_SIZE];
+
+ while ((len = read( priv->fd, buffer, BUFFER_SIZE)) >= 0 || errno == EINTR)
+ {
+
+ if (len <= 0)
+ {
+ D_PERROR("DirectFB/gunze: error reading Gunze touch screen device %d %d\n",errno,priv->fd);
+ perror(NULL);
+ return NULL;
+ }
+
+ for(loop=0; loop<len; loop++)
+ {
+ /* if first byte, ensure that the packet is syncronized */
+ if (priv->gunBytes == 0)
+ {
+ int error = 0;
+ if (priv->gunDlen == GUNZE_SERIAL_DLEN)
+ {
+ /* First byte is 'R' (0x52) or 'T' (0x54) */
+ if ((buffer[loop] != 'R') && (buffer[loop] != 'T'))
+ error = 1;
+ }
+ /* PS/2 / USB Unsupported for now (basically I don't have one, and didn't test adding support will be trivial
+ else
+ {
+ if ( !(buffer[loop] & 0x80) || (len > loop+1 && !(buffer[loop+1] & 0x80)) || (len > loop+2 && (buffer[loop+2] & 0x80)))
+ error = 1;
+ }
+ */
+ if (error)
+ {
+ D_PERROR("DirectFB/gunze: GunzeReadInput: bad first byte 0x%x %c\n",buffer[loop],buffer[loop]);
+ continue;
+ }
+ }
+
+ pkt[priv->gunBytes++] = buffer[loop];
+
+ /* Hack: sometimes a serial packet gets corrupted. If so, drop it */
+ if (buffer[loop] == 0x0d && priv->gunBytes != priv->gunDlen && priv->gunDlen == GUNZE_SERIAL_DLEN)
+ {
+ pkt[priv->gunBytes-1] = '\0';
+ D_PERROR("DirectFB/gunze: Bad packet \"%s\" dropping it\n", pkt);
+ priv->gunBytes = 0;
+ continue;
+ }
+
+ /* if whole packet collected, decode it */
+ if (priv->gunBytes == priv->gunDlen)
+ {
+ DFBInputEvent evt;
+
+ priv->gunBytes = 0;
+ if (priv->gunDlen == GUNZE_SERIAL_DLEN)
+ {
+ /* if T button == true */
+ button = (pkt[0] == 'T');
+ x = atoi((char *)pkt+1);
+ y = atoi((char *)pkt+6);
+ }
+ /* USB version which I haven't added support for
+ else
+ {
+ button = (pkt[2] & 0x40);
+ x = ((pkt[0] & 0x7f) << 3) | ((pkt[1] & 0x70) >> 4);
+ y = ((pkt[1] & 0x0f) << 6) | ((pkt[2] & 0x3f));
+ }
+ */
+
+ if (x>1023 || x<0 || y>1023 || y<0)
+ {
+ D_PERROR("DirectFB/gunze: Bad packet \"%s\" -> %i,%i\n", pkt, x, y);
+
+ priv->gunBytes = 0;
+ continue;
+ }
+
+ /*
+ Ok, now that we have raw data, turn it to real data
+ according to calibration, smoothness, tapping and debouncing
+ calibrate and rescale (by multiplying by 64)
+
+ I don't fully understand this, came from xf86Gunze.c
+ x = 64*128 + 64*768 * (x - calib[0])/(calib[2]-calib[0]);
+ y = 64*128 + 64*768 * (y - calib[1])/(calib[3]-calib[1]);
+ */
+
+ x = 8192 + 49152 * (x - calib[0])/(calib[2]-calib[0]);
+ y = 8192 + 49152 * (y - calib[1])/(calib[3]-calib[1]);
+ y = GUNZE_MAXCOORD - y;
+ /* smooth it down, unless first touch */
+ if (!(priv->flags & FLAG_WAS_UP))
+ {
+ x = (priv->gunPrevX * priv->gunSmooth + x)/(priv->gunSmooth+1);
+ y = (priv->gunPrevY * priv->gunSmooth + y)/(priv->gunSmooth+1);
+ }
+
+ /* convert gunze x/y to screen dimensions */
+ x = x * priv->screen_width / (GUNZE_MAXCOORD);
+ y = y * priv->screen_height / (GUNZE_MAXCOORD);
+ if (x < 0) x = 0;
+ if (y < 0) y = 0;
+ if (x > priv->screen_width) x = priv->screen_width;
+ if (y > priv->screen_height) y = priv->screen_height;
+
+ if (!button)
+ priv->flags |= FLAG_WAS_UP;
+ else
+ priv->flags &= ~FLAG_WAS_UP;
+
+ /* Now send events */
+
+ /* only post new x/y if different from previous tap */
+ if ( (priv->gunPrevX != x) || (priv->gunPrevY != y) )
+ {
+ direct_thread_testcancel (thread);
+ /* Dispatch axis */
+ evt.type = DIET_AXISMOTION;
+ evt.flags = DIEF_AXISABS;
+ evt.axis = DIAI_X;
+ evt.axisabs = x;
+ dfb_input_dispatch (priv->device, &evt);
+
+ evt.type = DIET_AXISMOTION;
+ evt.flags = DIEF_AXISABS;
+ evt.axis = DIAI_Y;
+ evt.axisabs = y;
+ dfb_input_dispatch (priv->device, &evt);
+ direct_thread_testcancel (thread);
+ /*printf("dispatched motion x %d y %d\n",x,y);*/
+ }
+ /* post button state change at x/y */
+ if (priv->gunPrevButtonState != button)
+ {
+ direct_thread_testcancel (thread);
+
+ /* Dispatch axis */
+ evt.type = DIET_AXISMOTION;
+ evt.flags = DIEF_AXISABS;
+ evt.axis = DIAI_X;
+ evt.axisabs = x;
+ dfb_input_dispatch (priv->device, &evt);
+
+ evt.type = DIET_AXISMOTION;
+ evt.flags = DIEF_AXISABS;
+ evt.axis = DIAI_Y;
+ evt.axisabs = y;
+ dfb_input_dispatch (priv->device, &evt);
+
+ /* Dispatch touch event */
+ evt.type = (button) ? DIET_BUTTONPRESS:DIET_BUTTONRELEASE;
+ evt.flags = DIEF_NONE;
+ evt.button = DIBI_LEFT;
+
+ dfb_input_dispatch (priv->device, &evt);
+ direct_thread_testcancel (thread);
+ /* printf("dispatched button x %d y %d\n",x,y); */
+ }
+
+ /* remember data */
+ priv->gunPrevButtonState = button;
+ priv->gunPrevX = x;
+ priv->gunPrevY = y;
+
+ }
+ }
+ }
+
+ return NULL;
+}
+
+/* exported symbols */
+
+static int driver_get_available( void )
+{
+ int fd;
+ /*
+ if (!dfb_config->gunze_device){
+ D_PERROR("DirectFB/GunzeTouch: Missing Gunze device file using default %s!\n",GunzeT_DEFAULT_DEVICE);
+ fflush(NULL);
+ }*/
+
+/*
+ if (!dfb_config->gunze_device)
+ return 0;
+ */
+ /* TODO gotta clean this up... seems odd to open & close it like this... */
+ //fd = GunzeOpenDevice (dfb_config->gunze_device);
+ fd = GunzeOpenDevice(GunzeT_DEFAULT_DEVICE);
+ if (fd < 0)
+ return 0;
+
+ close(fd);
+
+ return 1;
+}
+
+static void driver_get_info( InputDriverInfo *info )
+{
+ /* fill driver info structure */
+ snprintf(info->name, DFB_INPUT_DRIVER_INFO_NAME_LENGTH,"gunze" );
+ snprintf(info->vendor, DFB_INPUT_DRIVER_INFO_VENDOR_LENGTH,"Gunze" );
+
+ info->version.major = 0;
+ info->version.minor = 1;
+}
+
+static DFBResult driver_open_device(CoreInputDevice *device,
+ unsigned int number,
+ InputDeviceInfo *info,
+ void **driver_data)
+{
+ int fd;
+ GunzeTData *data = NULL;
+ const char *devname = GunzeT_DEFAULT_DEVICE;
+
+
+// if (!dfb_config->gunze_device)
+// D_PERROR("DirectFB/GunzeTouch: Missing Gunze device file using default %s!\n",GunzeT_DEFAULT_DEVICE);
+
+
+ /* open device */
+ fd = GunzeOpenDevice (devname);
+
+ if (fd < 0) {
+ D_PERROR("DirectFB/GunzeTouch: Error opening '%s'!\n", devname);
+ return DFB_INIT;
+ }
+
+ data = D_CALLOC (1, sizeof(GunzeTData));
+ if (!data) {
+ close (fd);
+ return D_OOM ();
+ }
+
+ data->fd = fd;
+ data->device = device;
+ data->gunDevice= devname;
+ /* hard coded... */
+ data->gunType = TYPE_SERIAL;
+ data->gunDlen = GUNZE_SERIAL_DLEN;
+ /* Must define the correct resolution of screen */
+ data->screen_width = GunzeT_SCREENWIDTH;
+ data->screen_height = GunzeT_SCREENHEIGHT;
+ data->gunConfig = GUNZE_DEFAULT_CFGFILE;//(!dfb_config->gunze_calibration_file)?GUNZE_DEFAULT_CFGFILE:dfb_config->gunze_calibration_file;
+
+ /* The following variable are defined to adjust the orientation of
+ * the touchscreen. Variables are either max screen height/width or 0.
+ * don't know how to use this as it was taken from mutouch likely not needed...
+
+ data->min_x = GunzeT_MINX;
+ data->min_y = GunzeT_MINY;
+*/
+ /* grab calibration data */
+ GunzeReadCalib(data);
+
+ /* fill device info structure */
+ snprintf(info->desc.name, DFB_INPUT_DEVICE_DESC_NAME_LENGTH,"gunze");
+ snprintf(info->desc.vendor, DFB_INPUT_DEVICE_DESC_VENDOR_LENGTH,"Gunze");
+
+ info->prefered_id = DIDID_MOUSE;
+ info->desc.type = DIDTF_MOUSE;
+ info->desc.caps = DICAPS_AXES | DICAPS_BUTTONS;
+ info->desc.max_axis = DIAI_Y;
+ info->desc.max_button = DIBI_LEFT;
+
+ /* start input thread */
+ data->thread = direct_thread_create (DTT_INPUT, GunzeTouchEventThread, data, "GunzeTouch Input");
+
+ /* set private data pointer */
+ *driver_data = data;
+
+ return DFB_OK;
+}
+
+/*
+ * Fetch one entry from the device's keymap if supported.
+ */
+static DFBResult driver_get_keymap_entry(CoreInputDevice *device,
+ void *driver_data,
+ DFBInputDeviceKeymapEntry *entry)
+{
+ return DFB_UNSUPPORTED;
+}
+
+static void driver_close_device(void *driver_data)
+{
+ GunzeTData *data = (GunzeTData *)driver_data;
+
+ /* stop input thread */
+ direct_thread_cancel (data->thread);
+ direct_thread_join (data->thread);
+ direct_thread_destroy (data->thread);
+
+ /* close device */
+ close (data->fd);
+
+ /* free private data */
+ D_FREE (data);
+}
+