summaryrefslogtreecommitdiff
path: root/Source/FusionDale/include
diff options
context:
space:
mode:
Diffstat (limited to 'Source/FusionDale/include')
-rwxr-xr-xSource/FusionDale/include/Makefile.am8
-rwxr-xr-xSource/FusionDale/include/Makefile.in425
-rwxr-xr-xSource/FusionDale/include/fusiondale.h568
-rwxr-xr-xSource/FusionDale/include/fusiondale_util.h184
-rwxr-xr-xSource/FusionDale/include/fusiondale_version.h11
-rwxr-xr-xSource/FusionDale/include/fusiondale_version.h.in33
6 files changed, 1229 insertions, 0 deletions
diff --git a/Source/FusionDale/include/Makefile.am b/Source/FusionDale/include/Makefile.am
new file mode 100755
index 0000000..56024c4
--- /dev/null
+++ b/Source/FusionDale/include/Makefile.am
@@ -0,0 +1,8 @@
+## Makefile.am for FusionDale/include
+
+includedir = @INCLUDEDIR@
+
+include_HEADERS = \
+ fusiondale.h \
+ fusiondale_util.h \
+ fusiondale_version.h
diff --git a/Source/FusionDale/include/Makefile.in b/Source/FusionDale/include/Makefile.in
new file mode 100755
index 0000000..75043a6
--- /dev/null
+++ b/Source/FusionDale/include/Makefile.in
@@ -0,0 +1,425 @@
+# Makefile.in generated by automake 1.10.2 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@
+subdir = include
+DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in $(srcdir)/fusiondale_version.h.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 = fusiondale_version.h
+SOURCES =
+DIST_SOURCES =
+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)$(includedir)"
+includeHEADERS_INSTALL = $(INSTALL_HEADER)
+HEADERS = $(include_HEADERS)
+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@
+CYGPATH_W = @CYGPATH_W@
+DATADIR = @DATADIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FUSIONDALE_BINARY_AGE = @FUSIONDALE_BINARY_AGE@
+FUSIONDALE_INTERFACE_AGE = @FUSIONDALE_INTERFACE_AGE@
+FUSIONDALE_MAJOR_VERSION = @FUSIONDALE_MAJOR_VERSION@
+FUSIONDALE_MICRO_VERSION = @FUSIONDALE_MICRO_VERSION@
+FUSIONDALE_MINOR_VERSION = @FUSIONDALE_MINOR_VERSION@
+FUSIONDALE_VERSION = @FUSIONDALE_VERSION@
+FUSION_CFLAGS = @FUSION_CFLAGS@
+FUSION_LIBS = @FUSION_LIBS@
+GREP = @GREP@
+INCLUDEDIR = @INCLUDEDIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+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@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+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_DUMPBIN = @ac_ct_DUMPBIN@
+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@
+lt_ECHO = @lt_ECHO@
+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_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+include_HEADERS = \
+ fusiondale.h \
+ fusiondale_util.h \
+ fusiondale_version.h
+
+all: all-am
+
+.SUFFIXES:
+$(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 ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu include/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
+fusiondale_version.h: $(top_builddir)/config.status $(srcdir)/fusiondale_version.h.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-includeHEADERS: $(include_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
+ @list='$(include_HEADERS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
+ $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
+ done
+
+uninstall-includeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(include_HEADERS)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
+ rm -f "$(DESTDIR)$(includedir)/$$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; nonempty = 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 $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(includedir)"; 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-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+info: info-am
+
+info-am:
+
+install-data-am: install-includeHEADERS
+
+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 -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-includeHEADERS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool ctags distclean 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-includeHEADERS 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-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am tags uninstall uninstall-am uninstall-includeHEADERS
+
+# 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/FusionDale/include/fusiondale.h b/Source/FusionDale/include/fusiondale.h
new file mode 100755
index 0000000..6f8d93b
--- /dev/null
+++ b/Source/FusionDale/include/fusiondale.h
@@ -0,0 +1,568 @@
+/*
+ (c) Copyright 2006-2007 directfb.org
+
+ All rights reserved.
+
+ Written by Denis Oliver Kropp <dok@directfb.org>.
+
+ 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.
+*/
+
+#ifndef __FUSIONDALE_H__
+#define __FUSIONDALE_H__
+
+#include <direct/interface.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/*
+ * Version handling.
+ */
+extern const unsigned int fusiondale_major_version;
+extern const unsigned int fusiondale_minor_version;
+extern const unsigned int fusiondale_micro_version;
+extern const unsigned int fusiondale_binary_age;
+extern const unsigned int fusiondale_interface_age;
+
+/*
+ * Check for a certain FusionDale version.
+ * In case of an error a message is returned describing the mismatch.
+ */
+const char * FusionDaleCheckVersion( unsigned int required_major,
+ unsigned int required_minor,
+ unsigned int required_micro );
+
+/*
+ * Main FusionDale interface.
+ */
+DECLARE_INTERFACE( IFusionDale )
+
+/*
+ * Event manager.
+ */
+DECLARE_INTERFACE( IFusionDaleMessenger )
+
+/*
+ * Component manager.
+ */
+DECLARE_INTERFACE( IComa )
+
+/*
+ * Component.
+ */
+DECLARE_INTERFACE( IComaComponent )
+
+/*
+ * Parses the command-line and initializes some variables. You absolutely need to
+ * call this before doing anything else. Removes all options used by FusionDale from argv.
+ */
+DirectResult FusionDaleInit(
+ int *argc, /* pointer to main()'s argc */
+ char *(*argv[]) /* pointer to main()'s argv */
+ );
+
+/*
+ * Sets configuration parameters supported on command line and in config file.
+ * Can only be called before FusionDaleCreate but after FusionDaleInit.
+ */
+DirectResult FusionDaleSetOption(
+ const char *name,
+ const char *value
+ );
+
+/*
+ * Creates the super interface.
+ */
+DirectResult FusionDaleCreate(
+ IFusionDale **ret_interface /* pointer to the created interface */
+ );
+
+/*
+ * Print a description of the result code along with an
+ * optional message that is put in front with a colon.
+ */
+DirectResult FusionDaleError(
+ const char *msg, /* optional message */
+ DirectResult result /* result code to interpret */
+ );
+
+/*
+ * Behaves like FusionDaleError, but shuts down the calling application.
+ */
+DirectResult FusionDaleErrorFatal(
+ const char *msg, /* optional message */
+ DirectResult result /* result code to interpret */
+ );
+
+/*
+ * Returns a string describing 'result'.
+ */
+const char *FusionDaleErrorString(
+ DirectResult result
+ );
+
+/*
+ * Retrieves information about supported command-line flags in the
+ * form of a user-readable string formatted suitable to be printed
+ * as usage information.
+ */
+const char *FusionDaleUsageString( void );
+
+
+/*
+ * <i><b>IFusionDale</b></i> is the main FusionDale interface.
+ */
+DEFINE_INTERFACE( IFusionDale,
+
+ /** Events **/
+
+ /*
+ * Create a new event manager.
+ */
+ DirectResult (*CreateMessenger) (
+ IFusionDale *thiz,
+ IFusionDaleMessenger **ret_messenger
+ );
+
+ /*
+ * Get an interface to an existing event manager.
+ */
+ DirectResult (*GetMessenger) (
+ IFusionDale *thiz,
+ IFusionDaleMessenger **ret_messenger
+ );
+
+
+ /** Component Manager **/
+
+ /*
+ * Get an interface to a component manager.
+ *
+ * The <b>name</b> is a unique identifier.
+ * The component manager will be created if it doesn't exist.
+ */
+ DirectResult (*EnterComa) (
+ IFusionDale *thiz,
+ const char *name,
+ IComa **ret_coma
+ );
+)
+
+
+
+typedef unsigned long FDMessengerEventID;
+typedef unsigned long FDMessengerListenerID;
+
+#define FDM_EVENT_ID_NONE ((unsigned long)0)
+#define FDM_LISTENER_ID_NONE ((unsigned long)0)
+
+
+typedef void (*FDMessengerEventCallback)( FDMessengerEventID event_id,
+ int param,
+ void *data,
+ int data_size,
+ void *context );
+
+
+/*
+ * <i><b>IFusionDaleMessenger</b></i> is an event manager.
+ */
+DEFINE_INTERFACE( IFusionDaleMessenger,
+
+ /** Events **/
+
+ DirectResult (*RegisterEvent) (
+ IFusionDaleMessenger *thiz,
+ const char *name,
+ FDMessengerEventID *ret_id
+ );
+
+ DirectResult (*UnregisterEvent) (
+ IFusionDaleMessenger *thiz,
+ FDMessengerEventID event_id
+ );
+
+ DirectResult (*IsEventRegistered) (
+ IFusionDaleMessenger *thiz,
+ const char *name
+ );
+
+
+ /** Listeners **/
+
+ DirectResult (*RegisterListener) (
+ IFusionDaleMessenger *thiz,
+ FDMessengerEventID event_id,
+ FDMessengerEventCallback listener,
+ void *context,
+ FDMessengerListenerID *ret_id
+ );
+
+ DirectResult (*UnregisterListener) (
+ IFusionDaleMessenger *thiz,
+ FDMessengerListenerID listener_id
+ );
+
+
+ /** Dispatch **/
+
+ DirectResult (*SendSimpleEvent) (
+ IFusionDaleMessenger *thiz,
+ FDMessengerEventID event_id,
+ int param
+ );
+
+ DirectResult (*SendEvent) (
+ IFusionDaleMessenger *thiz,
+ FDMessengerEventID event_id,
+ int param,
+ void *data,
+ unsigned int data_size
+ );
+
+
+ /** Message data **/
+
+ DirectResult (*AllocateData) (
+ IFusionDaleMessenger *thiz,
+ unsigned int data_size,
+ void **ret_data
+ );
+)
+
+
+/*
+ * Method ID
+ */
+typedef unsigned long ComaMethodID;
+
+/*
+ * Notification ID
+ */
+typedef unsigned long ComaNotificationID;
+
+
+/*
+ * 'Method Invocation' Callback
+ *
+ * Called at the component owner upon invocation of a method using IComaComponent::Call().
+ *
+ * See also IComa::CreateComponent().
+ */
+typedef void (*ComaMethodFunc) (
+ void *ctx,
+ ComaMethodID method,
+ void *arg,
+ unsigned int magic
+ );
+
+/*
+ * 'Notification Received' Callback
+ *
+ * Called at each listener of the notification when IComaComponent::Notify() is used.
+ *
+ * See also IComaComponent::Listen() and IComaComponent::InitListeners().
+ */
+typedef void (*ComaListenerFunc)(
+ void *ctx,
+ void *arg
+ );
+
+/*
+ * 'Notification Dispatched' Callback
+ *
+ * Called at the component owner when a notification has been processed by all recipients.
+ *
+ * See also IComaComponent::InitNotification() and IComaComponent::InitNotifications().
+ */
+typedef void (*ComaNotifyFunc) (
+ void *ctx,
+ ComaNotificationID notification,
+ void *arg
+ );
+
+/*
+ * Notification flags
+ *
+ * See also IComaComponent::InitNotification() and IComaComponent::InitNotifications().
+ */
+typedef enum {
+ CNF_NONE = 0x00000000, /* None of these */
+
+ CNF_DEALLOC_ARG = 0x00000001, /* Deallocate 'arg' after notification is dispatched */
+
+ CNF_ALL = 0x00000001, /* All of these */
+} ComaNotificationFlags;
+
+/*
+ * Notification setup (batch)
+ *
+ * See also IComaComponent::InitNotifications().
+ */
+typedef struct {
+ ComaNotificationID id; /* Notification ID */
+
+ ComaNotifyFunc func; /* Optional 'Notification Dispatched' callback */
+ void *ctx; /* Optional context pointer for callback */
+
+ ComaNotificationFlags flags; /* Notification flags */
+} ComaNotificationInit;
+
+/*
+ * Listener setup (batch)
+ *
+ * See also IComaComponent::InitListeners().
+ */
+typedef struct {
+ ComaNotificationID id; /* Notification ID */
+
+ ComaListenerFunc func; /* 'Notification Received' callback */
+ void *ctx; /* Optional context pointer for callback */
+} ComaListenerInit;
+
+
+/*
+ * <i><b>IComa</b></i> is a component manager with its own name space created/joined by IFusionDale::EnterComa().
+ */
+DEFINE_INTERFACE( IComa,
+
+ /** Components **/
+
+ /*
+ * Create a new component
+ *
+ * The component still needs to be activated after notification setup etc. using IComaComponent::Activate().
+ *
+ * Corresponding calls to IComa::GetComponent() will block until the component has been activated!
+ */
+ DirectResult (*CreateComponent) (
+ IComa *thiz,
+ const char *name,
+ ComaMethodFunc func,
+ int num_notifications,
+ void *ctx,
+ IComaComponent **ret_component
+ );
+
+ /*
+ * Request a component
+ *
+ * This blocks until the component has been created and activated or a <b>timeout</b> occurrs.
+ *
+ * See also IComa::CreateComponent() and IComaComponent::Activate().
+ */
+ DirectResult (*GetComponent) (
+ IComa *thiz,
+ const char *name,
+ unsigned int timeout,
+ IComaComponent **ret_component
+ );
+
+
+ /** Shared memory **/
+
+ /*
+ * Allocate anonymous block of shared memory
+ *
+ * Each allocated block must be deallocated, e.g. in a 'notification dispatched' callback,
+ * when it has been used as data for a notification (asynchronous).
+ *
+ * See also IComa::Deallocate().
+ */
+ DirectResult (*Allocate) (
+ IComa *thiz,
+ unsigned int bytes,
+ void **ret_ptr
+ );
+
+ /*
+ * Deallocate anonymous block of shared memory
+ *
+ * See also IComa::Allocate().
+ */
+ DirectResult (*Deallocate) (
+ IComa *thiz,
+ void *ptr
+ );
+
+
+ /** Thread local SHM **/
+
+ /*
+ * Get the thread local shared memory block
+ *
+ * The shared memory block belonging to the calling thread will be allocated or reallocated,
+ * if the required amount of <b>bytes</b> is not satisfied, yet.
+ *
+ * The memory should not be used for asynchronous notifications (queued), but for synchronous method invocations.
+ *
+ * See also IComa::FreeLocal().
+ */
+ DirectResult (*GetLocal) (
+ IComa *thiz,
+ unsigned int bytes,
+ void **ret_ptr
+ );
+
+ /*
+ * Free the thread local shared memory
+ *
+ * This should be called after huge allocations using
+ *
+ * Do NOT use this after each call to IComa::GetLocal().
+ * It is wise to call when the block is not going to be used at all (or its last size) in the short term.
+ *
+ * See also IComa::GetLocal().
+ */
+ DirectResult (*FreeLocal) (
+ IComa *thiz
+ );
+)
+
+/*
+ * <i><b>IComaComponent</b></i> is a component created by IComa::CreateComponent() or returned by IComa::GetComponent().
+ */
+DEFINE_INTERFACE( IComaComponent,
+
+ /** Initialization **/
+
+ /*
+ * Setup a notification
+ *
+ * See also IComaComponent::Notify().
+ */
+ DirectResult (*InitNotification) (
+ IComaComponent *thiz,
+ ComaNotificationID id,
+ ComaNotifyFunc func,
+ void *ctx,
+ ComaNotificationFlags flags
+ );
+
+ /*
+ * Batched notification setup
+ *
+ * See also IComaComponent::Notify().
+ */
+ DirectResult (*InitNotifications) (
+ IComaComponent *thiz,
+ const ComaNotificationInit *inits,
+ int num_inits,
+ void *ctx
+ );
+
+
+ /** Methods **/
+
+ /*
+ * Perform method invocation
+ *
+ * This blocks until the owner has returned from invocation or an error occurred.
+ *
+ * See also IComaComponent::Return().
+ */
+ DirectResult (*Call) (
+ IComaComponent *thiz,
+ ComaMethodID method,
+ void *arg,
+ int *ret_val
+ );
+
+ /*
+ * Return from method invocation
+ *
+ * This can be called outside of the method callback and does not need to follow the call order.
+ *
+ * See also IComaComponent::Call().
+ */
+ DirectResult (*Return) (
+ IComaComponent *thiz,
+ int val,
+ unsigned int magic
+ );
+
+
+ /** Notifications **/
+
+ /*
+ * Send a notification to all listeners
+ *
+ * This returns immediately after posting the asynchronous notification.
+ *
+ * See also IComaComponent::Listen() and IComaComponent::InitListeners().
+ */
+ DirectResult (*Notify) (
+ IComaComponent *thiz,
+ ComaNotificationID id,
+ void *arg
+ );
+
+ /*
+ * Setup a listener for one notification
+ *
+ * See also IComaComponent::Notify().
+ */
+ DirectResult (*Listen) (
+ IComaComponent *thiz,
+ ComaNotificationID id,
+ ComaListenerFunc func,
+ void *ctx
+ );
+
+ /*
+ * Batched listener setup
+ *
+ * See also IComaComponent::Notify().
+ */
+ DirectResult (*InitListeners) (
+ IComaComponent *thiz,
+ const ComaListenerInit *inits,
+ int num_inits,
+ void *ctx
+ );
+
+ /*
+ * Stop listening
+ *
+ * See also IComaComponent::Listen() and IComaComponent::InitListeners().
+ */
+ DirectResult (*Unlisten) (
+ IComaComponent *thiz,
+ ComaNotificationID id
+ );
+
+
+ /** Activation **/
+
+ /*
+ * Activate the component
+ *
+ * This is required after creation and setup, to unblock waiting IComa::GetComponent() calls.
+ */
+ DirectResult (*Activate) (
+ IComaComponent *thiz
+ );
+)
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/Source/FusionDale/include/fusiondale_util.h b/Source/FusionDale/include/fusiondale_util.h
new file mode 100755
index 0000000..51539dd
--- /dev/null
+++ b/Source/FusionDale/include/fusiondale_util.h
@@ -0,0 +1,184 @@
+/*
+ (c) Copyright 2006-2007 directfb.org
+
+ All rights reserved.
+
+ Written by Denis Oliver Kropp <dok@directfb.org>.
+
+ 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.
+*/
+
+#ifndef __FUSIONDALE_UTIL_H__
+#define __FUSIONDALE_UTIL_H__
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+#include <fusiondale.h>
+
+#include <direct/debug.h>
+#include <direct/memcpy.h>
+#include <direct/messages.h>
+
+
+#define COMA_GENCALL_PREPARE( coma, length ) \
+ do { \
+ DirectResult ret; \
+ \
+ D_ASSERT( coma != NULL ); \
+ D_ASSERT( length > 0 ); \
+ \
+ ret = coma->GetLocal( coma, length, &ptr ); \
+ if (ret) { \
+ D_DERROR( ret, "IComa::GetLocal( %zu ) failed!\n", length ); \
+ return ret; \
+ } \
+ } while (0)
+
+#define COMA_GENCALL_PREPARE_FROM( coma, from ) \
+ do { \
+ DirectResult ret; \
+ \
+ D_ASSERT( coma != NULL ); \
+ D_ASSERT( from != NULL ); \
+ \
+ ret = coma->GetLocal( coma, sizeof(*from), &ptr ); \
+ if (ret) { \
+ D_DERROR( ret, "IComa::GetLocal( %zu ) failed!\n", sizeof(*from) ); \
+ return ret; \
+ } \
+ \
+ direct_memcpy( ptr, from, sizeof(*from) ); \
+ } while (0)
+
+#define COMA_GENCALL_EXECUTE( component, methodid ) \
+ do { \
+ DirectResult ret; \
+ \
+ D_ASSERT( component != NULL ); \
+ \
+ ret = component->Call( component, methodid, ptr, &result ); \
+ if (ret) { \
+ D_DERROR( ret, "IComaComponent::Call( %lu, %p ) failed!\n", \
+ (ComaMethodID) methodid, ptr ); \
+ return ret; \
+ } \
+ } while (0)
+
+#define COMA_GENCALL_EXECUTE_TO( component, methodid, to ) \
+ do { \
+ DirectResult ret; \
+ \
+ D_ASSERT( component != NULL ); \
+ D_ASSERT( to != NULL ); \
+ \
+ ret = component->Call( component, methodid, ptr, &result ); \
+ if (ret) { \
+ D_DERROR( ret, "IComaComponent::Call( %lu, %p ) failed!\n", \
+ (ComaMethodID) methodid, ptr ); \
+ return ret; \
+ } \
+ \
+ direct_memcpy( to, ptr, sizeof(*to) ); \
+ } while (0)
+
+/**********************************************************************************************************************/
+
+#define COMA_GENCALL_DEFINE___( NAME, METHOD, METHOD_ID ) \
+ static inline DirectResult \
+ NAME ## _GenCall_ ## METHOD( IComa *coma, \
+ IComaComponent *component ) \
+ { \
+ void *ptr = NULL; \
+ int result; \
+ \
+ D_ASSERT( coma != NULL ); \
+ D_ASSERT( component != NULL ); \
+ \
+ COMA_GENCALL_EXECUTE( component, METHOD_ID ); \
+ \
+ return (DirectResult)result; \
+ }
+
+#define COMA_GENCALL_DEFINE_I_( NAME, METHOD, METHOD_ID ) \
+ static inline DirectResult \
+ NAME ## _GenCall_ ## METHOD( IComa *coma, \
+ IComaComponent *component, \
+ NAME ## Call ## METHOD *data ) \
+ { \
+ void *ptr; \
+ int result; \
+ \
+ D_ASSERT( coma != NULL ); \
+ D_ASSERT( component != NULL ); \
+ D_ASSERT( data != NULL ); \
+ \
+ COMA_GENCALL_PREPARE_FROM( coma, data ); \
+ \
+ COMA_GENCALL_EXECUTE( component, METHOD_ID ); \
+ \
+ return (DirectResult)result; \
+ }
+
+#define COMA_GENCALL_DEFINE__O( NAME, METHOD, METHOD_ID ) \
+ static inline DirectResult \
+ NAME ## _GenCall_ ## METHOD( IComa *coma, \
+ IComaComponent *component, \
+ NAME ## Call ## METHOD *data ) \
+ { \
+ void *ptr; \
+ int result; \
+ \
+ D_ASSERT( coma != NULL ); \
+ D_ASSERT( component != NULL ); \
+ D_ASSERT( data != NULL ); \
+ \
+ COMA_GENCALL_PREPARE( coma, sizeof(*data) ); \
+ \
+ COMA_GENCALL_EXECUTE_TO( component, METHOD_ID, data ); \
+ \
+ return (DirectResult)result; \
+ }
+
+#define COMA_GENCALL_DEFINE_IO( NAME, METHOD, METHOD_ID ) \
+ static inline DirectResult \
+ NAME ## _GenCall_ ## METHOD( IComa *coma, \
+ IComaComponent *component, \
+ NAME ## Call ## METHOD *data ) \
+ { \
+ void *ptr; \
+ int result; \
+ \
+ D_ASSERT( coma != NULL ); \
+ D_ASSERT( component != NULL ); \
+ D_ASSERT( data != NULL ); \
+ \
+ COMA_GENCALL_PREPARE_FROM( coma, data ); \
+ \
+ COMA_GENCALL_EXECUTE_TO( component, METHOD_ID, data ); \
+ \
+ return (DirectResult)result; \
+ }
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+
diff --git a/Source/FusionDale/include/fusiondale_version.h b/Source/FusionDale/include/fusiondale_version.h
new file mode 100755
index 0000000..ad96adb
--- /dev/null
+++ b/Source/FusionDale/include/fusiondale_version.h
@@ -0,0 +1,11 @@
+#ifndef __FUSIONDALE_VERSION_H__
+#define __FUSIONDALE_VERSION_H__
+
+#define FUSIONDALE_MAJOR_VERSION ( 0 )
+#define FUSIONDALE_MINOR_VERSION ( 1 )
+#define FUSIONDALE_MICRO_VERSION ( 1 )
+#define FUSIONDALE_BINARY_AGE (0)
+#define FUSIONDALE_INTERFACE_AGE (0)
+
+
+#endif
diff --git a/Source/FusionDale/include/fusiondale_version.h.in b/Source/FusionDale/include/fusiondale_version.h.in
new file mode 100755
index 0000000..d19697e
--- /dev/null
+++ b/Source/FusionDale/include/fusiondale_version.h.in
@@ -0,0 +1,33 @@
+/*
+ (c) Copyright 2006-2007 directfb.org
+
+ All rights reserved.
+
+ Written by Denis Oliver Kropp <dok@directfb.org>.
+
+ 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.
+*/
+
+#ifndef __FUSIONDALE_VERSION_H__
+#define __FUSIONDALE_VERSION_H__
+
+#define FUSIONDALE_MAJOR_VERSION (@FUSIONDALE_MAJOR_VERSION@)
+#define FUSIONDALE_MINOR_VERSION (@FUSIONDALE_MINOR_VERSION@)
+#define FUSIONDALE_MICRO_VERSION (@FUSIONDALE_MICRO_VERSION@)
+#define FUSIONDALE_BINARY_AGE (@FUSIONDALE_BINARY_AGE@)
+#define FUSIONDALE_INTERFACE_AGE (@FUSIONDALE_INTERFACE_AGE@)
+
+#endif /* __FUSIONDALE_VERSION_H__ */