From 7fe60435bce6595a9c58a9bfd8244d74b5320e96 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Tue, 15 Jan 2013 08:46:13 +0100 Subject: Import DirectFB141_2k11R3_beta5 --- Source/DirectFB/proxy/Makefile.am | 3 + Source/DirectFB/proxy/Makefile.in | 556 +++++ Source/DirectFB/proxy/dispatcher/Makefile.am | 124 ++ Source/DirectFB/proxy/dispatcher/Makefile.in | 1402 +++++++++++++ .../proxy/dispatcher/idirectfb_dispatcher.c | 1305 ++++++++++++ .../proxy/dispatcher/idirectfb_dispatcher.h | 110 + .../dispatcher/idirectfbdatabuffer_dispatcher.c | 673 ++++++ .../dispatcher/idirectfbdatabuffer_dispatcher.h | 47 + .../dispatcher/idirectfbdisplaylayer_dispatcher.c | 900 ++++++++ .../dispatcher/idirectfbdisplaylayer_dispatcher.h | 79 + .../dispatcher/idirectfbeventbuffer_dispatcher.c | 272 +++ .../dispatcher/idirectfbeventbuffer_dispatcher.h | 63 + .../proxy/dispatcher/idirectfbfont_dispatcher.c | 532 +++++ .../proxy/dispatcher/idirectfbfont_dispatcher.h | 43 + .../proxy/dispatcher/idirectfbfoo_dispatcher.c | 194 ++ .../proxy/dispatcher/idirectfbfoo_dispatcher.h | 48 + .../dispatcher/idirectfbimageprovider_dispatcher.c | 296 +++ .../dispatcher/idirectfbimageprovider_dispatcher.h | 39 + .../dispatcher/idirectfbinputdevice_dispatcher.c | 635 ++++++ .../dispatcher/idirectfbinputdevice_dispatcher.h | 60 + .../proxy/dispatcher/idirectfbpalette_dispatcher.c | 408 ++++ .../proxy/dispatcher/idirectfbpalette_dispatcher.h | 41 + .../proxy/dispatcher/idirectfbscreen_dispatcher.c | 572 ++++++ .../proxy/dispatcher/idirectfbscreen_dispatcher.h | 58 + .../proxy/dispatcher/idirectfbsurface_dispatcher.c | 2149 ++++++++++++++++++++ .../proxy/dispatcher/idirectfbsurface_dispatcher.h | 93 + .../proxy/dispatcher/idirectfbwindow_dispatcher.c | 1391 +++++++++++++ .../proxy/dispatcher/idirectfbwindow_dispatcher.h | 104 + Source/DirectFB/proxy/requestor/Makefile.am | 125 ++ Source/DirectFB/proxy/requestor/Makefile.in | 1401 +++++++++++++ .../DirectFB/proxy/requestor/idirectfb_requestor.c | 1045 ++++++++++ .../requestor/idirectfbdatabuffer_requestor.c | 484 +++++ .../requestor/idirectfbdisplaylayer_requestor.c | 721 +++++++ .../requestor/idirectfbdisplaylayer_requestor.h | 47 + .../requestor/idirectfbeventbuffer_requestor.c | 300 +++ .../requestor/idirectfbeventbuffer_requestor.h | 54 + .../proxy/requestor/idirectfbfont_requestor.c | 530 +++++ .../proxy/requestor/idirectfbfont_requestor.h | 47 + .../proxy/requestor/idirectfbfoo_requestor.c | 135 ++ .../proxy/requestor/idirectfbfoo_requestor.h | 45 + .../requestor/idirectfbimageprovider_requestor.c | 264 +++ .../requestor/idirectfbinputdevice_requestor.c | 469 +++++ .../requestor/idirectfbinputdevice_requestor.h | 45 + .../proxy/requestor/idirectfbpalette_requestor.c | 335 +++ .../proxy/requestor/idirectfbpalette_requestor.h | 45 + .../proxy/requestor/idirectfbscreen_requestor.c | 524 +++++ .../proxy/requestor/idirectfbsurface_requestor.c | 1852 +++++++++++++++++ .../proxy/requestor/idirectfbsurface_requestor.h | 80 + .../proxy/requestor/idirectfbwindow_requestor.c | 1120 ++++++++++ .../proxy/requestor/idirectfbwindow_requestor.h | 47 + 50 files changed, 21912 insertions(+) create mode 100755 Source/DirectFB/proxy/Makefile.am create mode 100755 Source/DirectFB/proxy/Makefile.in create mode 100755 Source/DirectFB/proxy/dispatcher/Makefile.am create mode 100755 Source/DirectFB/proxy/dispatcher/Makefile.in create mode 100755 Source/DirectFB/proxy/dispatcher/idirectfb_dispatcher.c create mode 100755 Source/DirectFB/proxy/dispatcher/idirectfb_dispatcher.h create mode 100755 Source/DirectFB/proxy/dispatcher/idirectfbdatabuffer_dispatcher.c create mode 100755 Source/DirectFB/proxy/dispatcher/idirectfbdatabuffer_dispatcher.h create mode 100755 Source/DirectFB/proxy/dispatcher/idirectfbdisplaylayer_dispatcher.c create mode 100755 Source/DirectFB/proxy/dispatcher/idirectfbdisplaylayer_dispatcher.h create mode 100755 Source/DirectFB/proxy/dispatcher/idirectfbeventbuffer_dispatcher.c create mode 100755 Source/DirectFB/proxy/dispatcher/idirectfbeventbuffer_dispatcher.h create mode 100755 Source/DirectFB/proxy/dispatcher/idirectfbfont_dispatcher.c create mode 100755 Source/DirectFB/proxy/dispatcher/idirectfbfont_dispatcher.h create mode 100755 Source/DirectFB/proxy/dispatcher/idirectfbfoo_dispatcher.c create mode 100755 Source/DirectFB/proxy/dispatcher/idirectfbfoo_dispatcher.h create mode 100755 Source/DirectFB/proxy/dispatcher/idirectfbimageprovider_dispatcher.c create mode 100755 Source/DirectFB/proxy/dispatcher/idirectfbimageprovider_dispatcher.h create mode 100755 Source/DirectFB/proxy/dispatcher/idirectfbinputdevice_dispatcher.c create mode 100755 Source/DirectFB/proxy/dispatcher/idirectfbinputdevice_dispatcher.h create mode 100755 Source/DirectFB/proxy/dispatcher/idirectfbpalette_dispatcher.c create mode 100755 Source/DirectFB/proxy/dispatcher/idirectfbpalette_dispatcher.h create mode 100755 Source/DirectFB/proxy/dispatcher/idirectfbscreen_dispatcher.c create mode 100755 Source/DirectFB/proxy/dispatcher/idirectfbscreen_dispatcher.h create mode 100755 Source/DirectFB/proxy/dispatcher/idirectfbsurface_dispatcher.c create mode 100755 Source/DirectFB/proxy/dispatcher/idirectfbsurface_dispatcher.h create mode 100755 Source/DirectFB/proxy/dispatcher/idirectfbwindow_dispatcher.c create mode 100755 Source/DirectFB/proxy/dispatcher/idirectfbwindow_dispatcher.h create mode 100755 Source/DirectFB/proxy/requestor/Makefile.am create mode 100755 Source/DirectFB/proxy/requestor/Makefile.in create mode 100755 Source/DirectFB/proxy/requestor/idirectfb_requestor.c create mode 100755 Source/DirectFB/proxy/requestor/idirectfbdatabuffer_requestor.c create mode 100755 Source/DirectFB/proxy/requestor/idirectfbdisplaylayer_requestor.c create mode 100755 Source/DirectFB/proxy/requestor/idirectfbdisplaylayer_requestor.h create mode 100755 Source/DirectFB/proxy/requestor/idirectfbeventbuffer_requestor.c create mode 100755 Source/DirectFB/proxy/requestor/idirectfbeventbuffer_requestor.h create mode 100755 Source/DirectFB/proxy/requestor/idirectfbfont_requestor.c create mode 100755 Source/DirectFB/proxy/requestor/idirectfbfont_requestor.h create mode 100755 Source/DirectFB/proxy/requestor/idirectfbfoo_requestor.c create mode 100755 Source/DirectFB/proxy/requestor/idirectfbfoo_requestor.h create mode 100755 Source/DirectFB/proxy/requestor/idirectfbimageprovider_requestor.c create mode 100755 Source/DirectFB/proxy/requestor/idirectfbinputdevice_requestor.c create mode 100755 Source/DirectFB/proxy/requestor/idirectfbinputdevice_requestor.h create mode 100755 Source/DirectFB/proxy/requestor/idirectfbpalette_requestor.c create mode 100755 Source/DirectFB/proxy/requestor/idirectfbpalette_requestor.h create mode 100755 Source/DirectFB/proxy/requestor/idirectfbscreen_requestor.c create mode 100755 Source/DirectFB/proxy/requestor/idirectfbsurface_requestor.c create mode 100755 Source/DirectFB/proxy/requestor/idirectfbsurface_requestor.h create mode 100755 Source/DirectFB/proxy/requestor/idirectfbwindow_requestor.c create mode 100755 Source/DirectFB/proxy/requestor/idirectfbwindow_requestor.h (limited to 'Source/DirectFB/proxy') diff --git a/Source/DirectFB/proxy/Makefile.am b/Source/DirectFB/proxy/Makefile.am new file mode 100755 index 0000000..01c978b --- /dev/null +++ b/Source/DirectFB/proxy/Makefile.am @@ -0,0 +1,3 @@ +## Makefile.am for DirectFB/proxy + +SUBDIRS = dispatcher requestor diff --git a/Source/DirectFB/proxy/Makefile.in b/Source/DirectFB/proxy/Makefile.in new file mode 100755 index 0000000..039e0d7 --- /dev/null +++ b/Source/DirectFB/proxy/Makefile.in @@ -0,0 +1,556 @@ +# 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@ +subdir = proxy +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +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 = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +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@ +SUBDIRS = dispatcher requestor +all: all-recursive + +.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 \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu proxy/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu proxy/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 + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + 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: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + 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: ctags-recursive $(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 + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +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-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-exec-am: + +install-html: install-html-recursive + +install-info: install-info-recursive + +install-man: + +install-pdf: install-pdf-recursive + +install-ps: install-ps-recursive + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ + install-strip + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive 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-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + +# 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/proxy/dispatcher/Makefile.am b/Source/DirectFB/proxy/dispatcher/Makefile.am new file mode 100755 index 0000000..cd50dc8 --- /dev/null +++ b/Source/DirectFB/proxy/dispatcher/Makefile.am @@ -0,0 +1,124 @@ +## Makefile.am for DirectFB/proxy/dispatcher + +INTERFACES_DIR = $(MODULEDIR)/interfaces + +idirectfbdir = $(INTERFACES_DIR)/IDirectFB +idirectfbdatabufferdir = $(INTERFACES_DIR)/IDirectFBDataBuffer +idirectfbdisplaylayerdir = $(INTERFACES_DIR)/IDirectFBDisplayLayer +idirectfbeventbufferdir = $(INTERFACES_DIR)/IDirectFBEventBuffer +idirectfbfontdir = $(INTERFACES_DIR)/IDirectFBFont +idirectfbimageproviderdir = $(INTERFACES_DIR)/IDirectFBImageProvider +idirectfbinputdevicedir = $(INTERFACES_DIR)/IDirectFBInputDevice +idirectfbpalettedir = $(INTERFACES_DIR)/IDirectFBPalette +idirectfbscreendir = $(INTERFACES_DIR)/IDirectFBScreen +idirectfbsurfacedir = $(INTERFACES_DIR)/IDirectFBSurface +idirectfbwindowdir = $(INTERFACES_DIR)/IDirectFBWindow +idirectfbvideoproviderdir = $(INTERFACES_DIR)/IDirectFBVideoProvider + +INCLUDES = \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include \ + -I$(top_srcdir)/lib \ + -I$(top_builddir)/lib \ + -I$(top_srcdir)/src \ + -I$(top_srcdir)/proxy/requestor \ + -DDATADIR=\"${RUNTIME_SYSROOT}@DATADIR@\" + +LIBS = \ + $(top_builddir)/lib/voodoo/libvoodoo.la \ + $(top_builddir)/lib/direct/libdirect.la + + +idirectfb_LTLIBRARIES = \ + libidirectfb_dispatcher.la + +idirectfbdatabuffer_LTLIBRARIES = \ + libidirectfbdatabuffer_dispatcher.la + +idirectfbdisplaylayer_LTLIBRARIES = \ + libidirectfbdisplaylayer_dispatcher.la + +idirectfbeventbuffer_LTLIBRARIES = \ + libidirectfbeventbuffer_dispatcher.la + +idirectfbfont_LTLIBRARIES = \ + libidirectfbfont_dispatcher.la + +idirectfbimageprovider_LTLIBRARIES = \ + libidirectfbimageprovider_dispatcher.la + +idirectfbinputdevice_LTLIBRARIES = \ + libidirectfbinputdevice_dispatcher.la + +idirectfbpalette_LTLIBRARIES = \ + libidirectfbpalette_dispatcher.la + +idirectfbscreen_LTLIBRARIES = \ + libidirectfbscreen_dispatcher.la + +idirectfbsurface_LTLIBRARIES = \ + libidirectfbsurface_dispatcher.la + +idirectfbwindow_LTLIBRARIES = \ + libidirectfbwindow_dispatcher.la + +if BUILD_STATIC +idirectfb_DATA = libidirectfb_dispatcher.o +idirectfbdatabuffer_DATA = libidirectfbdatabuffer_dispatcher.o +idirectfbdisplaylayer_DATA = libidirectfbdisplaylayer_dispatcher.o +idirectfbeventbuffer_DATA = libidirectfbeventbuffer_dispatcher.o +idirectfbfont_DATA = libidirectfbfont_dispatcher.o +idirectfbimageprovider_DATA = libidirectfbimageprovider_dispatcher.o +idirectfbinputdevice_DATA = libidirectfbinputdevice_dispatcher.o +idirectfbpalette_DATA = libidirectfbpalette_dispatcher.o +idirectfbscreen_DATA = libidirectfbscreen_dispatcher.o +idirectfbsurface_DATA = libidirectfbsurface_dispatcher.o +idirectfbwindow_DATA = libidirectfbwindow_dispatcher.o +endif + +libidirectfb_dispatcher_la_SOURCES = idirectfb_dispatcher.c idirectfb_dispatcher.h +libidirectfb_dispatcher_la_LDFLAGS = -avoid-version -module +libidirectfb_dispatcher_la_LIBADDD = $(LIBS) + +libidirectfbdatabuffer_dispatcher_la_SOURCES = idirectfbdatabuffer_dispatcher.c idirectfbdatabuffer_dispatcher.h +libidirectfbdatabuffer_dispatcher_la_LDFLAGS = -avoid-version -module +libidirectfbdatabuffer_dispatcher_la_LIBADDD = $(LIBS) + +libidirectfbdisplaylayer_dispatcher_la_SOURCES = idirectfbdisplaylayer_dispatcher.c idirectfbdisplaylayer_dispatcher.h +libidirectfbdisplaylayer_dispatcher_la_LDFLAGS = -avoid-version -module +libidirectfbdisplaylayer_dispatcher_la_LIBADDD = $(LIBS) + +libidirectfbeventbuffer_dispatcher_la_SOURCES = idirectfbeventbuffer_dispatcher.c idirectfbeventbuffer_dispatcher.h +libidirectfbeventbuffer_dispatcher_la_LDFLAGS = -avoid-version -module +libidirectfbeventbuffer_dispatcher_la_LIBADDD = $(LIBS) + +libidirectfbfont_dispatcher_la_SOURCES = idirectfbfont_dispatcher.c idirectfbfont_dispatcher.h +libidirectfbfont_dispatcher_la_LDFLAGS = -avoid-version -module +libidirectfbfont_dispatcher_la_LIBADDD = $(LIBS) + +libidirectfbimageprovider_dispatcher_la_SOURCES = idirectfbimageprovider_dispatcher.c idirectfbimageprovider_dispatcher.h +libidirectfbimageprovider_dispatcher_la_LDFLAGS = -avoid-version -module +libidirectfbimageprovider_dispatcher_la_LIBADDD = $(LIBS) + +libidirectfbinputdevice_dispatcher_la_SOURCES = idirectfbinputdevice_dispatcher.c idirectfbinputdevice_dispatcher.h +libidirectfbinputdevice_dispatcher_la_LDFLAGS = -avoid-version -module +libidirectfbinputdevice_dispatcher_la_LIBADDD = $(LIBS) + +libidirectfbpalette_dispatcher_la_SOURCES = idirectfbpalette_dispatcher.c idirectfbpalette_dispatcher.h +libidirectfbpalette_dispatcher_la_LDFLAGS = -avoid-version -module +libidirectfbpalette_dispatcher_la_LIBADDD = $(LIBS) + +libidirectfbscreen_dispatcher_la_SOURCES = idirectfbscreen_dispatcher.c idirectfbscreen_dispatcher.h +libidirectfbscreen_dispatcher_la_LDFLAGS = -avoid-version -module +libidirectfbscreen_dispatcher_la_LIBADDD = $(LIBS) + +libidirectfbsurface_dispatcher_la_SOURCES = idirectfbsurface_dispatcher.c idirectfbsurface_dispatcher.h +libidirectfbsurface_dispatcher_la_LDFLAGS = -avoid-version -module +libidirectfbsurface_dispatcher_la_LIBADDD = $(LIBS) + +libidirectfbwindow_dispatcher_la_SOURCES = idirectfbwindow_dispatcher.c idirectfbwindow_dispatcher.h +libidirectfbwindow_dispatcher_la_LDFLAGS = -avoid-version -module +libidirectfbwindow_dispatcher_la_LIBADDD = $(LIBS) + + +include $(top_srcdir)/rules/libobject.make diff --git a/Source/DirectFB/proxy/dispatcher/Makefile.in b/Source/DirectFB/proxy/dispatcher/Makefile.in new file mode 100755 index 0000000..f06094e --- /dev/null +++ b/Source/DirectFB/proxy/dispatcher/Makefile.in @@ -0,0 +1,1402 @@ +# 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 = proxy/dispatcher +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)$(idirectfbdir)" \ + "$(DESTDIR)$(idirectfbdatabufferdir)" \ + "$(DESTDIR)$(idirectfbdisplaylayerdir)" \ + "$(DESTDIR)$(idirectfbeventbufferdir)" \ + "$(DESTDIR)$(idirectfbfontdir)" \ + "$(DESTDIR)$(idirectfbimageproviderdir)" \ + "$(DESTDIR)$(idirectfbinputdevicedir)" \ + "$(DESTDIR)$(idirectfbpalettedir)" \ + "$(DESTDIR)$(idirectfbscreendir)" \ + "$(DESTDIR)$(idirectfbsurfacedir)" \ + "$(DESTDIR)$(idirectfbwindowdir)" "$(DESTDIR)$(idirectfbdir)" \ + "$(DESTDIR)$(idirectfbdatabufferdir)" \ + "$(DESTDIR)$(idirectfbdisplaylayerdir)" \ + "$(DESTDIR)$(idirectfbeventbufferdir)" \ + "$(DESTDIR)$(idirectfbfontdir)" \ + "$(DESTDIR)$(idirectfbimageproviderdir)" \ + "$(DESTDIR)$(idirectfbinputdevicedir)" \ + "$(DESTDIR)$(idirectfbpalettedir)" \ + "$(DESTDIR)$(idirectfbscreendir)" \ + "$(DESTDIR)$(idirectfbsurfacedir)" \ + "$(DESTDIR)$(idirectfbwindowdir)" +idirectfbLTLIBRARIES_INSTALL = $(INSTALL) +idirectfbdatabufferLTLIBRARIES_INSTALL = $(INSTALL) +idirectfbdisplaylayerLTLIBRARIES_INSTALL = $(INSTALL) +idirectfbeventbufferLTLIBRARIES_INSTALL = $(INSTALL) +idirectfbfontLTLIBRARIES_INSTALL = $(INSTALL) +idirectfbimageproviderLTLIBRARIES_INSTALL = $(INSTALL) +idirectfbinputdeviceLTLIBRARIES_INSTALL = $(INSTALL) +idirectfbpaletteLTLIBRARIES_INSTALL = $(INSTALL) +idirectfbscreenLTLIBRARIES_INSTALL = $(INSTALL) +idirectfbsurfaceLTLIBRARIES_INSTALL = $(INSTALL) +idirectfbwindowLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(idirectfb_LTLIBRARIES) \ + $(idirectfbdatabuffer_LTLIBRARIES) \ + $(idirectfbdisplaylayer_LTLIBRARIES) \ + $(idirectfbeventbuffer_LTLIBRARIES) \ + $(idirectfbfont_LTLIBRARIES) \ + $(idirectfbimageprovider_LTLIBRARIES) \ + $(idirectfbinputdevice_LTLIBRARIES) \ + $(idirectfbpalette_LTLIBRARIES) $(idirectfbscreen_LTLIBRARIES) \ + $(idirectfbsurface_LTLIBRARIES) $(idirectfbwindow_LTLIBRARIES) +libidirectfb_dispatcher_la_LIBADD = +am_libidirectfb_dispatcher_la_OBJECTS = idirectfb_dispatcher.lo +libidirectfb_dispatcher_la_OBJECTS = \ + $(am_libidirectfb_dispatcher_la_OBJECTS) +libidirectfb_dispatcher_la_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(libidirectfb_dispatcher_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +libidirectfbdatabuffer_dispatcher_la_LIBADD = +am_libidirectfbdatabuffer_dispatcher_la_OBJECTS = \ + idirectfbdatabuffer_dispatcher.lo +libidirectfbdatabuffer_dispatcher_la_OBJECTS = \ + $(am_libidirectfbdatabuffer_dispatcher_la_OBJECTS) +libidirectfbdatabuffer_dispatcher_la_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) \ + $(libidirectfbdatabuffer_dispatcher_la_LDFLAGS) $(LDFLAGS) -o \ + $@ +libidirectfbdisplaylayer_dispatcher_la_LIBADD = +am_libidirectfbdisplaylayer_dispatcher_la_OBJECTS = \ + idirectfbdisplaylayer_dispatcher.lo +libidirectfbdisplaylayer_dispatcher_la_OBJECTS = \ + $(am_libidirectfbdisplaylayer_dispatcher_la_OBJECTS) +libidirectfbdisplaylayer_dispatcher_la_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) \ + $(libidirectfbdisplaylayer_dispatcher_la_LDFLAGS) $(LDFLAGS) \ + -o $@ +libidirectfbeventbuffer_dispatcher_la_LIBADD = +am_libidirectfbeventbuffer_dispatcher_la_OBJECTS = \ + idirectfbeventbuffer_dispatcher.lo +libidirectfbeventbuffer_dispatcher_la_OBJECTS = \ + $(am_libidirectfbeventbuffer_dispatcher_la_OBJECTS) +libidirectfbeventbuffer_dispatcher_la_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) \ + $(libidirectfbeventbuffer_dispatcher_la_LDFLAGS) $(LDFLAGS) -o \ + $@ +libidirectfbfont_dispatcher_la_LIBADD = +am_libidirectfbfont_dispatcher_la_OBJECTS = \ + idirectfbfont_dispatcher.lo +libidirectfbfont_dispatcher_la_OBJECTS = \ + $(am_libidirectfbfont_dispatcher_la_OBJECTS) +libidirectfbfont_dispatcher_la_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) \ + $(libidirectfbfont_dispatcher_la_LDFLAGS) $(LDFLAGS) -o $@ +libidirectfbimageprovider_dispatcher_la_LIBADD = +am_libidirectfbimageprovider_dispatcher_la_OBJECTS = \ + idirectfbimageprovider_dispatcher.lo +libidirectfbimageprovider_dispatcher_la_OBJECTS = \ + $(am_libidirectfbimageprovider_dispatcher_la_OBJECTS) +libidirectfbimageprovider_dispatcher_la_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) \ + $(libidirectfbimageprovider_dispatcher_la_LDFLAGS) $(LDFLAGS) \ + -o $@ +libidirectfbinputdevice_dispatcher_la_LIBADD = +am_libidirectfbinputdevice_dispatcher_la_OBJECTS = \ + idirectfbinputdevice_dispatcher.lo +libidirectfbinputdevice_dispatcher_la_OBJECTS = \ + $(am_libidirectfbinputdevice_dispatcher_la_OBJECTS) +libidirectfbinputdevice_dispatcher_la_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) \ + $(libidirectfbinputdevice_dispatcher_la_LDFLAGS) $(LDFLAGS) -o \ + $@ +libidirectfbpalette_dispatcher_la_LIBADD = +am_libidirectfbpalette_dispatcher_la_OBJECTS = \ + idirectfbpalette_dispatcher.lo +libidirectfbpalette_dispatcher_la_OBJECTS = \ + $(am_libidirectfbpalette_dispatcher_la_OBJECTS) +libidirectfbpalette_dispatcher_la_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) \ + $(libidirectfbpalette_dispatcher_la_LDFLAGS) $(LDFLAGS) -o $@ +libidirectfbscreen_dispatcher_la_LIBADD = +am_libidirectfbscreen_dispatcher_la_OBJECTS = \ + idirectfbscreen_dispatcher.lo +libidirectfbscreen_dispatcher_la_OBJECTS = \ + $(am_libidirectfbscreen_dispatcher_la_OBJECTS) +libidirectfbscreen_dispatcher_la_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) \ + $(libidirectfbscreen_dispatcher_la_LDFLAGS) $(LDFLAGS) -o $@ +libidirectfbsurface_dispatcher_la_LIBADD = +am_libidirectfbsurface_dispatcher_la_OBJECTS = \ + idirectfbsurface_dispatcher.lo +libidirectfbsurface_dispatcher_la_OBJECTS = \ + $(am_libidirectfbsurface_dispatcher_la_OBJECTS) +libidirectfbsurface_dispatcher_la_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) \ + $(libidirectfbsurface_dispatcher_la_LDFLAGS) $(LDFLAGS) -o $@ +libidirectfbwindow_dispatcher_la_LIBADD = +am_libidirectfbwindow_dispatcher_la_OBJECTS = \ + idirectfbwindow_dispatcher.lo +libidirectfbwindow_dispatcher_la_OBJECTS = \ + $(am_libidirectfbwindow_dispatcher_la_OBJECTS) +libidirectfbwindow_dispatcher_la_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) \ + $(libidirectfbwindow_dispatcher_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 = $(libidirectfb_dispatcher_la_SOURCES) \ + $(libidirectfbdatabuffer_dispatcher_la_SOURCES) \ + $(libidirectfbdisplaylayer_dispatcher_la_SOURCES) \ + $(libidirectfbeventbuffer_dispatcher_la_SOURCES) \ + $(libidirectfbfont_dispatcher_la_SOURCES) \ + $(libidirectfbimageprovider_dispatcher_la_SOURCES) \ + $(libidirectfbinputdevice_dispatcher_la_SOURCES) \ + $(libidirectfbpalette_dispatcher_la_SOURCES) \ + $(libidirectfbscreen_dispatcher_la_SOURCES) \ + $(libidirectfbsurface_dispatcher_la_SOURCES) \ + $(libidirectfbwindow_dispatcher_la_SOURCES) +DIST_SOURCES = $(libidirectfb_dispatcher_la_SOURCES) \ + $(libidirectfbdatabuffer_dispatcher_la_SOURCES) \ + $(libidirectfbdisplaylayer_dispatcher_la_SOURCES) \ + $(libidirectfbeventbuffer_dispatcher_la_SOURCES) \ + $(libidirectfbfont_dispatcher_la_SOURCES) \ + $(libidirectfbimageprovider_dispatcher_la_SOURCES) \ + $(libidirectfbinputdevice_dispatcher_la_SOURCES) \ + $(libidirectfbpalette_dispatcher_la_SOURCES) \ + $(libidirectfbscreen_dispatcher_la_SOURCES) \ + $(libidirectfbsurface_dispatcher_la_SOURCES) \ + $(libidirectfbwindow_dispatcher_la_SOURCES) +idirectfbDATA_INSTALL = $(INSTALL_DATA) +idirectfbdatabufferDATA_INSTALL = $(INSTALL_DATA) +idirectfbdisplaylayerDATA_INSTALL = $(INSTALL_DATA) +idirectfbeventbufferDATA_INSTALL = $(INSTALL_DATA) +idirectfbfontDATA_INSTALL = $(INSTALL_DATA) +idirectfbimageproviderDATA_INSTALL = $(INSTALL_DATA) +idirectfbinputdeviceDATA_INSTALL = $(INSTALL_DATA) +idirectfbpaletteDATA_INSTALL = $(INSTALL_DATA) +idirectfbscreenDATA_INSTALL = $(INSTALL_DATA) +idirectfbsurfaceDATA_INSTALL = $(INSTALL_DATA) +idirectfbwindowDATA_INSTALL = $(INSTALL_DATA) +DATA = $(idirectfb_DATA) $(idirectfbdatabuffer_DATA) \ + $(idirectfbdisplaylayer_DATA) $(idirectfbeventbuffer_DATA) \ + $(idirectfbfont_DATA) $(idirectfbimageprovider_DATA) \ + $(idirectfbinputdevice_DATA) $(idirectfbpalette_DATA) \ + $(idirectfbscreen_DATA) $(idirectfbsurface_DATA) \ + $(idirectfbwindow_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 = \ + $(top_builddir)/lib/voodoo/libvoodoo.la \ + $(top_builddir)/lib/direct/libdirect.la + +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@ +INTERFACES_DIR = $(MODULEDIR)/interfaces +idirectfbdir = $(INTERFACES_DIR)/IDirectFB +idirectfbdatabufferdir = $(INTERFACES_DIR)/IDirectFBDataBuffer +idirectfbdisplaylayerdir = $(INTERFACES_DIR)/IDirectFBDisplayLayer +idirectfbeventbufferdir = $(INTERFACES_DIR)/IDirectFBEventBuffer +idirectfbfontdir = $(INTERFACES_DIR)/IDirectFBFont +idirectfbimageproviderdir = $(INTERFACES_DIR)/IDirectFBImageProvider +idirectfbinputdevicedir = $(INTERFACES_DIR)/IDirectFBInputDevice +idirectfbpalettedir = $(INTERFACES_DIR)/IDirectFBPalette +idirectfbscreendir = $(INTERFACES_DIR)/IDirectFBScreen +idirectfbsurfacedir = $(INTERFACES_DIR)/IDirectFBSurface +idirectfbwindowdir = $(INTERFACES_DIR)/IDirectFBWindow +idirectfbvideoproviderdir = $(INTERFACES_DIR)/IDirectFBVideoProvider +INCLUDES = \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include \ + -I$(top_srcdir)/lib \ + -I$(top_builddir)/lib \ + -I$(top_srcdir)/src \ + -I$(top_srcdir)/proxy/requestor \ + -DDATADIR=\"${RUNTIME_SYSROOT}@DATADIR@\" + +idirectfb_LTLIBRARIES = \ + libidirectfb_dispatcher.la + +idirectfbdatabuffer_LTLIBRARIES = \ + libidirectfbdatabuffer_dispatcher.la + +idirectfbdisplaylayer_LTLIBRARIES = \ + libidirectfbdisplaylayer_dispatcher.la + +idirectfbeventbuffer_LTLIBRARIES = \ + libidirectfbeventbuffer_dispatcher.la + +idirectfbfont_LTLIBRARIES = \ + libidirectfbfont_dispatcher.la + +idirectfbimageprovider_LTLIBRARIES = \ + libidirectfbimageprovider_dispatcher.la + +idirectfbinputdevice_LTLIBRARIES = \ + libidirectfbinputdevice_dispatcher.la + +idirectfbpalette_LTLIBRARIES = \ + libidirectfbpalette_dispatcher.la + +idirectfbscreen_LTLIBRARIES = \ + libidirectfbscreen_dispatcher.la + +idirectfbsurface_LTLIBRARIES = \ + libidirectfbsurface_dispatcher.la + +idirectfbwindow_LTLIBRARIES = \ + libidirectfbwindow_dispatcher.la + +@BUILD_STATIC_TRUE@idirectfb_DATA = libidirectfb_dispatcher.o +@BUILD_STATIC_TRUE@idirectfbdatabuffer_DATA = libidirectfbdatabuffer_dispatcher.o +@BUILD_STATIC_TRUE@idirectfbdisplaylayer_DATA = libidirectfbdisplaylayer_dispatcher.o +@BUILD_STATIC_TRUE@idirectfbeventbuffer_DATA = libidirectfbeventbuffer_dispatcher.o +@BUILD_STATIC_TRUE@idirectfbfont_DATA = libidirectfbfont_dispatcher.o +@BUILD_STATIC_TRUE@idirectfbimageprovider_DATA = libidirectfbimageprovider_dispatcher.o +@BUILD_STATIC_TRUE@idirectfbinputdevice_DATA = libidirectfbinputdevice_dispatcher.o +@BUILD_STATIC_TRUE@idirectfbpalette_DATA = libidirectfbpalette_dispatcher.o +@BUILD_STATIC_TRUE@idirectfbscreen_DATA = libidirectfbscreen_dispatcher.o +@BUILD_STATIC_TRUE@idirectfbsurface_DATA = libidirectfbsurface_dispatcher.o +@BUILD_STATIC_TRUE@idirectfbwindow_DATA = libidirectfbwindow_dispatcher.o +libidirectfb_dispatcher_la_SOURCES = idirectfb_dispatcher.c idirectfb_dispatcher.h +libidirectfb_dispatcher_la_LDFLAGS = -avoid-version -module +libidirectfb_dispatcher_la_LIBADDD = $(LIBS) +libidirectfbdatabuffer_dispatcher_la_SOURCES = idirectfbdatabuffer_dispatcher.c idirectfbdatabuffer_dispatcher.h +libidirectfbdatabuffer_dispatcher_la_LDFLAGS = -avoid-version -module +libidirectfbdatabuffer_dispatcher_la_LIBADDD = $(LIBS) +libidirectfbdisplaylayer_dispatcher_la_SOURCES = idirectfbdisplaylayer_dispatcher.c idirectfbdisplaylayer_dispatcher.h +libidirectfbdisplaylayer_dispatcher_la_LDFLAGS = -avoid-version -module +libidirectfbdisplaylayer_dispatcher_la_LIBADDD = $(LIBS) +libidirectfbeventbuffer_dispatcher_la_SOURCES = idirectfbeventbuffer_dispatcher.c idirectfbeventbuffer_dispatcher.h +libidirectfbeventbuffer_dispatcher_la_LDFLAGS = -avoid-version -module +libidirectfbeventbuffer_dispatcher_la_LIBADDD = $(LIBS) +libidirectfbfont_dispatcher_la_SOURCES = idirectfbfont_dispatcher.c idirectfbfont_dispatcher.h +libidirectfbfont_dispatcher_la_LDFLAGS = -avoid-version -module +libidirectfbfont_dispatcher_la_LIBADDD = $(LIBS) +libidirectfbimageprovider_dispatcher_la_SOURCES = idirectfbimageprovider_dispatcher.c idirectfbimageprovider_dispatcher.h +libidirectfbimageprovider_dispatcher_la_LDFLAGS = -avoid-version -module +libidirectfbimageprovider_dispatcher_la_LIBADDD = $(LIBS) +libidirectfbinputdevice_dispatcher_la_SOURCES = idirectfbinputdevice_dispatcher.c idirectfbinputdevice_dispatcher.h +libidirectfbinputdevice_dispatcher_la_LDFLAGS = -avoid-version -module +libidirectfbinputdevice_dispatcher_la_LIBADDD = $(LIBS) +libidirectfbpalette_dispatcher_la_SOURCES = idirectfbpalette_dispatcher.c idirectfbpalette_dispatcher.h +libidirectfbpalette_dispatcher_la_LDFLAGS = -avoid-version -module +libidirectfbpalette_dispatcher_la_LIBADDD = $(LIBS) +libidirectfbscreen_dispatcher_la_SOURCES = idirectfbscreen_dispatcher.c idirectfbscreen_dispatcher.h +libidirectfbscreen_dispatcher_la_LDFLAGS = -avoid-version -module +libidirectfbscreen_dispatcher_la_LIBADDD = $(LIBS) +libidirectfbsurface_dispatcher_la_SOURCES = idirectfbsurface_dispatcher.c idirectfbsurface_dispatcher.h +libidirectfbsurface_dispatcher_la_LDFLAGS = -avoid-version -module +libidirectfbsurface_dispatcher_la_LIBADDD = $(LIBS) +libidirectfbwindow_dispatcher_la_SOURCES = idirectfbwindow_dispatcher.c idirectfbwindow_dispatcher.h +libidirectfbwindow_dispatcher_la_LDFLAGS = -avoid-version -module +libidirectfbwindow_dispatcher_la_LIBADDD = $(LIBS) +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 proxy/dispatcher/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu proxy/dispatcher/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-idirectfbLTLIBRARIES: $(idirectfb_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(idirectfbdir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbdir)" + @list='$(idirectfb_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(idirectfbdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(idirectfbdir)/$$f"; \ + else :; fi; \ + done + +uninstall-idirectfbLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(idirectfb_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(idirectfbdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(idirectfbdir)/$$p"; \ + done + +clean-idirectfbLTLIBRARIES: + -test -z "$(idirectfb_LTLIBRARIES)" || rm -f $(idirectfb_LTLIBRARIES) + @list='$(idirectfb_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 +install-idirectfbdatabufferLTLIBRARIES: $(idirectfbdatabuffer_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(idirectfbdatabufferdir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbdatabufferdir)" + @list='$(idirectfbdatabuffer_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbdatabufferLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(idirectfbdatabufferdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbdatabufferLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(idirectfbdatabufferdir)/$$f"; \ + else :; fi; \ + done + +uninstall-idirectfbdatabufferLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbdatabuffer_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(idirectfbdatabufferdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(idirectfbdatabufferdir)/$$p"; \ + done + +clean-idirectfbdatabufferLTLIBRARIES: + -test -z "$(idirectfbdatabuffer_LTLIBRARIES)" || rm -f $(idirectfbdatabuffer_LTLIBRARIES) + @list='$(idirectfbdatabuffer_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 +install-idirectfbdisplaylayerLTLIBRARIES: $(idirectfbdisplaylayer_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(idirectfbdisplaylayerdir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbdisplaylayerdir)" + @list='$(idirectfbdisplaylayer_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbdisplaylayerLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(idirectfbdisplaylayerdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbdisplaylayerLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(idirectfbdisplaylayerdir)/$$f"; \ + else :; fi; \ + done + +uninstall-idirectfbdisplaylayerLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbdisplaylayer_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(idirectfbdisplaylayerdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(idirectfbdisplaylayerdir)/$$p"; \ + done + +clean-idirectfbdisplaylayerLTLIBRARIES: + -test -z "$(idirectfbdisplaylayer_LTLIBRARIES)" || rm -f $(idirectfbdisplaylayer_LTLIBRARIES) + @list='$(idirectfbdisplaylayer_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 +install-idirectfbeventbufferLTLIBRARIES: $(idirectfbeventbuffer_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(idirectfbeventbufferdir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbeventbufferdir)" + @list='$(idirectfbeventbuffer_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbeventbufferLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(idirectfbeventbufferdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbeventbufferLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(idirectfbeventbufferdir)/$$f"; \ + else :; fi; \ + done + +uninstall-idirectfbeventbufferLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbeventbuffer_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(idirectfbeventbufferdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(idirectfbeventbufferdir)/$$p"; \ + done + +clean-idirectfbeventbufferLTLIBRARIES: + -test -z "$(idirectfbeventbuffer_LTLIBRARIES)" || rm -f $(idirectfbeventbuffer_LTLIBRARIES) + @list='$(idirectfbeventbuffer_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 +install-idirectfbfontLTLIBRARIES: $(idirectfbfont_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(idirectfbfontdir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbfontdir)" + @list='$(idirectfbfont_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbfontLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(idirectfbfontdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbfontLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(idirectfbfontdir)/$$f"; \ + else :; fi; \ + done + +uninstall-idirectfbfontLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbfont_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(idirectfbfontdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(idirectfbfontdir)/$$p"; \ + done + +clean-idirectfbfontLTLIBRARIES: + -test -z "$(idirectfbfont_LTLIBRARIES)" || rm -f $(idirectfbfont_LTLIBRARIES) + @list='$(idirectfbfont_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 +install-idirectfbimageproviderLTLIBRARIES: $(idirectfbimageprovider_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(idirectfbimageproviderdir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbimageproviderdir)" + @list='$(idirectfbimageprovider_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbimageproviderLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(idirectfbimageproviderdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbimageproviderLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(idirectfbimageproviderdir)/$$f"; \ + else :; fi; \ + done + +uninstall-idirectfbimageproviderLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbimageprovider_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(idirectfbimageproviderdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(idirectfbimageproviderdir)/$$p"; \ + done + +clean-idirectfbimageproviderLTLIBRARIES: + -test -z "$(idirectfbimageprovider_LTLIBRARIES)" || rm -f $(idirectfbimageprovider_LTLIBRARIES) + @list='$(idirectfbimageprovider_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 +install-idirectfbinputdeviceLTLIBRARIES: $(idirectfbinputdevice_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(idirectfbinputdevicedir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbinputdevicedir)" + @list='$(idirectfbinputdevice_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbinputdeviceLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(idirectfbinputdevicedir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbinputdeviceLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(idirectfbinputdevicedir)/$$f"; \ + else :; fi; \ + done + +uninstall-idirectfbinputdeviceLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbinputdevice_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(idirectfbinputdevicedir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(idirectfbinputdevicedir)/$$p"; \ + done + +clean-idirectfbinputdeviceLTLIBRARIES: + -test -z "$(idirectfbinputdevice_LTLIBRARIES)" || rm -f $(idirectfbinputdevice_LTLIBRARIES) + @list='$(idirectfbinputdevice_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 +install-idirectfbpaletteLTLIBRARIES: $(idirectfbpalette_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(idirectfbpalettedir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbpalettedir)" + @list='$(idirectfbpalette_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbpaletteLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(idirectfbpalettedir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbpaletteLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(idirectfbpalettedir)/$$f"; \ + else :; fi; \ + done + +uninstall-idirectfbpaletteLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbpalette_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(idirectfbpalettedir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(idirectfbpalettedir)/$$p"; \ + done + +clean-idirectfbpaletteLTLIBRARIES: + -test -z "$(idirectfbpalette_LTLIBRARIES)" || rm -f $(idirectfbpalette_LTLIBRARIES) + @list='$(idirectfbpalette_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 +install-idirectfbscreenLTLIBRARIES: $(idirectfbscreen_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(idirectfbscreendir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbscreendir)" + @list='$(idirectfbscreen_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbscreenLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(idirectfbscreendir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbscreenLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(idirectfbscreendir)/$$f"; \ + else :; fi; \ + done + +uninstall-idirectfbscreenLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbscreen_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(idirectfbscreendir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(idirectfbscreendir)/$$p"; \ + done + +clean-idirectfbscreenLTLIBRARIES: + -test -z "$(idirectfbscreen_LTLIBRARIES)" || rm -f $(idirectfbscreen_LTLIBRARIES) + @list='$(idirectfbscreen_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 +install-idirectfbsurfaceLTLIBRARIES: $(idirectfbsurface_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(idirectfbsurfacedir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbsurfacedir)" + @list='$(idirectfbsurface_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbsurfaceLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(idirectfbsurfacedir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbsurfaceLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(idirectfbsurfacedir)/$$f"; \ + else :; fi; \ + done + +uninstall-idirectfbsurfaceLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbsurface_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(idirectfbsurfacedir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(idirectfbsurfacedir)/$$p"; \ + done + +clean-idirectfbsurfaceLTLIBRARIES: + -test -z "$(idirectfbsurface_LTLIBRARIES)" || rm -f $(idirectfbsurface_LTLIBRARIES) + @list='$(idirectfbsurface_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 +install-idirectfbwindowLTLIBRARIES: $(idirectfbwindow_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(idirectfbwindowdir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbwindowdir)" + @list='$(idirectfbwindow_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbwindowLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(idirectfbwindowdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbwindowLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(idirectfbwindowdir)/$$f"; \ + else :; fi; \ + done + +uninstall-idirectfbwindowLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbwindow_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(idirectfbwindowdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(idirectfbwindowdir)/$$p"; \ + done + +clean-idirectfbwindowLTLIBRARIES: + -test -z "$(idirectfbwindow_LTLIBRARIES)" || rm -f $(idirectfbwindow_LTLIBRARIES) + @list='$(idirectfbwindow_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 +libidirectfb_dispatcher.la: $(libidirectfb_dispatcher_la_OBJECTS) $(libidirectfb_dispatcher_la_DEPENDENCIES) + $(libidirectfb_dispatcher_la_LINK) -rpath $(idirectfbdir) $(libidirectfb_dispatcher_la_OBJECTS) $(libidirectfb_dispatcher_la_LIBADD) $(LIBS) +libidirectfbdatabuffer_dispatcher.la: $(libidirectfbdatabuffer_dispatcher_la_OBJECTS) $(libidirectfbdatabuffer_dispatcher_la_DEPENDENCIES) + $(libidirectfbdatabuffer_dispatcher_la_LINK) -rpath $(idirectfbdatabufferdir) $(libidirectfbdatabuffer_dispatcher_la_OBJECTS) $(libidirectfbdatabuffer_dispatcher_la_LIBADD) $(LIBS) +libidirectfbdisplaylayer_dispatcher.la: $(libidirectfbdisplaylayer_dispatcher_la_OBJECTS) $(libidirectfbdisplaylayer_dispatcher_la_DEPENDENCIES) + $(libidirectfbdisplaylayer_dispatcher_la_LINK) -rpath $(idirectfbdisplaylayerdir) $(libidirectfbdisplaylayer_dispatcher_la_OBJECTS) $(libidirectfbdisplaylayer_dispatcher_la_LIBADD) $(LIBS) +libidirectfbeventbuffer_dispatcher.la: $(libidirectfbeventbuffer_dispatcher_la_OBJECTS) $(libidirectfbeventbuffer_dispatcher_la_DEPENDENCIES) + $(libidirectfbeventbuffer_dispatcher_la_LINK) -rpath $(idirectfbeventbufferdir) $(libidirectfbeventbuffer_dispatcher_la_OBJECTS) $(libidirectfbeventbuffer_dispatcher_la_LIBADD) $(LIBS) +libidirectfbfont_dispatcher.la: $(libidirectfbfont_dispatcher_la_OBJECTS) $(libidirectfbfont_dispatcher_la_DEPENDENCIES) + $(libidirectfbfont_dispatcher_la_LINK) -rpath $(idirectfbfontdir) $(libidirectfbfont_dispatcher_la_OBJECTS) $(libidirectfbfont_dispatcher_la_LIBADD) $(LIBS) +libidirectfbimageprovider_dispatcher.la: $(libidirectfbimageprovider_dispatcher_la_OBJECTS) $(libidirectfbimageprovider_dispatcher_la_DEPENDENCIES) + $(libidirectfbimageprovider_dispatcher_la_LINK) -rpath $(idirectfbimageproviderdir) $(libidirectfbimageprovider_dispatcher_la_OBJECTS) $(libidirectfbimageprovider_dispatcher_la_LIBADD) $(LIBS) +libidirectfbinputdevice_dispatcher.la: $(libidirectfbinputdevice_dispatcher_la_OBJECTS) $(libidirectfbinputdevice_dispatcher_la_DEPENDENCIES) + $(libidirectfbinputdevice_dispatcher_la_LINK) -rpath $(idirectfbinputdevicedir) $(libidirectfbinputdevice_dispatcher_la_OBJECTS) $(libidirectfbinputdevice_dispatcher_la_LIBADD) $(LIBS) +libidirectfbpalette_dispatcher.la: $(libidirectfbpalette_dispatcher_la_OBJECTS) $(libidirectfbpalette_dispatcher_la_DEPENDENCIES) + $(libidirectfbpalette_dispatcher_la_LINK) -rpath $(idirectfbpalettedir) $(libidirectfbpalette_dispatcher_la_OBJECTS) $(libidirectfbpalette_dispatcher_la_LIBADD) $(LIBS) +libidirectfbscreen_dispatcher.la: $(libidirectfbscreen_dispatcher_la_OBJECTS) $(libidirectfbscreen_dispatcher_la_DEPENDENCIES) + $(libidirectfbscreen_dispatcher_la_LINK) -rpath $(idirectfbscreendir) $(libidirectfbscreen_dispatcher_la_OBJECTS) $(libidirectfbscreen_dispatcher_la_LIBADD) $(LIBS) +libidirectfbsurface_dispatcher.la: $(libidirectfbsurface_dispatcher_la_OBJECTS) $(libidirectfbsurface_dispatcher_la_DEPENDENCIES) + $(libidirectfbsurface_dispatcher_la_LINK) -rpath $(idirectfbsurfacedir) $(libidirectfbsurface_dispatcher_la_OBJECTS) $(libidirectfbsurface_dispatcher_la_LIBADD) $(LIBS) +libidirectfbwindow_dispatcher.la: $(libidirectfbwindow_dispatcher_la_OBJECTS) $(libidirectfbwindow_dispatcher_la_DEPENDENCIES) + $(libidirectfbwindow_dispatcher_la_LINK) -rpath $(idirectfbwindowdir) $(libidirectfbwindow_dispatcher_la_OBJECTS) $(libidirectfbwindow_dispatcher_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idirectfb_dispatcher.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idirectfbdatabuffer_dispatcher.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idirectfbdisplaylayer_dispatcher.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idirectfbeventbuffer_dispatcher.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idirectfbfont_dispatcher.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idirectfbimageprovider_dispatcher.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idirectfbinputdevice_dispatcher.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idirectfbpalette_dispatcher.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idirectfbscreen_dispatcher.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idirectfbsurface_dispatcher.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idirectfbwindow_dispatcher.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-idirectfbDATA: $(idirectfb_DATA) + @$(NORMAL_INSTALL) + test -z "$(idirectfbdir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbdir)" + @list='$(idirectfb_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(idirectfbDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(idirectfbdir)/$$f'"; \ + $(idirectfbDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(idirectfbdir)/$$f"; \ + done + +uninstall-idirectfbDATA: + @$(NORMAL_UNINSTALL) + @list='$(idirectfb_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(idirectfbdir)/$$f'"; \ + rm -f "$(DESTDIR)$(idirectfbdir)/$$f"; \ + done +install-idirectfbdatabufferDATA: $(idirectfbdatabuffer_DATA) + @$(NORMAL_INSTALL) + test -z "$(idirectfbdatabufferdir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbdatabufferdir)" + @list='$(idirectfbdatabuffer_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(idirectfbdatabufferDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(idirectfbdatabufferdir)/$$f'"; \ + $(idirectfbdatabufferDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(idirectfbdatabufferdir)/$$f"; \ + done + +uninstall-idirectfbdatabufferDATA: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbdatabuffer_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(idirectfbdatabufferdir)/$$f'"; \ + rm -f "$(DESTDIR)$(idirectfbdatabufferdir)/$$f"; \ + done +install-idirectfbdisplaylayerDATA: $(idirectfbdisplaylayer_DATA) + @$(NORMAL_INSTALL) + test -z "$(idirectfbdisplaylayerdir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbdisplaylayerdir)" + @list='$(idirectfbdisplaylayer_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(idirectfbdisplaylayerDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(idirectfbdisplaylayerdir)/$$f'"; \ + $(idirectfbdisplaylayerDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(idirectfbdisplaylayerdir)/$$f"; \ + done + +uninstall-idirectfbdisplaylayerDATA: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbdisplaylayer_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(idirectfbdisplaylayerdir)/$$f'"; \ + rm -f "$(DESTDIR)$(idirectfbdisplaylayerdir)/$$f"; \ + done +install-idirectfbeventbufferDATA: $(idirectfbeventbuffer_DATA) + @$(NORMAL_INSTALL) + test -z "$(idirectfbeventbufferdir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbeventbufferdir)" + @list='$(idirectfbeventbuffer_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(idirectfbeventbufferDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(idirectfbeventbufferdir)/$$f'"; \ + $(idirectfbeventbufferDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(idirectfbeventbufferdir)/$$f"; \ + done + +uninstall-idirectfbeventbufferDATA: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbeventbuffer_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(idirectfbeventbufferdir)/$$f'"; \ + rm -f "$(DESTDIR)$(idirectfbeventbufferdir)/$$f"; \ + done +install-idirectfbfontDATA: $(idirectfbfont_DATA) + @$(NORMAL_INSTALL) + test -z "$(idirectfbfontdir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbfontdir)" + @list='$(idirectfbfont_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(idirectfbfontDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(idirectfbfontdir)/$$f'"; \ + $(idirectfbfontDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(idirectfbfontdir)/$$f"; \ + done + +uninstall-idirectfbfontDATA: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbfont_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(idirectfbfontdir)/$$f'"; \ + rm -f "$(DESTDIR)$(idirectfbfontdir)/$$f"; \ + done +install-idirectfbimageproviderDATA: $(idirectfbimageprovider_DATA) + @$(NORMAL_INSTALL) + test -z "$(idirectfbimageproviderdir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbimageproviderdir)" + @list='$(idirectfbimageprovider_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(idirectfbimageproviderDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(idirectfbimageproviderdir)/$$f'"; \ + $(idirectfbimageproviderDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(idirectfbimageproviderdir)/$$f"; \ + done + +uninstall-idirectfbimageproviderDATA: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbimageprovider_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(idirectfbimageproviderdir)/$$f'"; \ + rm -f "$(DESTDIR)$(idirectfbimageproviderdir)/$$f"; \ + done +install-idirectfbinputdeviceDATA: $(idirectfbinputdevice_DATA) + @$(NORMAL_INSTALL) + test -z "$(idirectfbinputdevicedir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbinputdevicedir)" + @list='$(idirectfbinputdevice_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(idirectfbinputdeviceDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(idirectfbinputdevicedir)/$$f'"; \ + $(idirectfbinputdeviceDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(idirectfbinputdevicedir)/$$f"; \ + done + +uninstall-idirectfbinputdeviceDATA: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbinputdevice_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(idirectfbinputdevicedir)/$$f'"; \ + rm -f "$(DESTDIR)$(idirectfbinputdevicedir)/$$f"; \ + done +install-idirectfbpaletteDATA: $(idirectfbpalette_DATA) + @$(NORMAL_INSTALL) + test -z "$(idirectfbpalettedir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbpalettedir)" + @list='$(idirectfbpalette_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(idirectfbpaletteDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(idirectfbpalettedir)/$$f'"; \ + $(idirectfbpaletteDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(idirectfbpalettedir)/$$f"; \ + done + +uninstall-idirectfbpaletteDATA: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbpalette_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(idirectfbpalettedir)/$$f'"; \ + rm -f "$(DESTDIR)$(idirectfbpalettedir)/$$f"; \ + done +install-idirectfbscreenDATA: $(idirectfbscreen_DATA) + @$(NORMAL_INSTALL) + test -z "$(idirectfbscreendir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbscreendir)" + @list='$(idirectfbscreen_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(idirectfbscreenDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(idirectfbscreendir)/$$f'"; \ + $(idirectfbscreenDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(idirectfbscreendir)/$$f"; \ + done + +uninstall-idirectfbscreenDATA: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbscreen_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(idirectfbscreendir)/$$f'"; \ + rm -f "$(DESTDIR)$(idirectfbscreendir)/$$f"; \ + done +install-idirectfbsurfaceDATA: $(idirectfbsurface_DATA) + @$(NORMAL_INSTALL) + test -z "$(idirectfbsurfacedir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbsurfacedir)" + @list='$(idirectfbsurface_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(idirectfbsurfaceDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(idirectfbsurfacedir)/$$f'"; \ + $(idirectfbsurfaceDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(idirectfbsurfacedir)/$$f"; \ + done + +uninstall-idirectfbsurfaceDATA: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbsurface_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(idirectfbsurfacedir)/$$f'"; \ + rm -f "$(DESTDIR)$(idirectfbsurfacedir)/$$f"; \ + done +install-idirectfbwindowDATA: $(idirectfbwindow_DATA) + @$(NORMAL_INSTALL) + test -z "$(idirectfbwindowdir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbwindowdir)" + @list='$(idirectfbwindow_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(idirectfbwindowDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(idirectfbwindowdir)/$$f'"; \ + $(idirectfbwindowDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(idirectfbwindowdir)/$$f"; \ + done + +uninstall-idirectfbwindowDATA: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbwindow_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(idirectfbwindowdir)/$$f'"; \ + rm -f "$(DESTDIR)$(idirectfbwindowdir)/$$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)$(idirectfbdir)" "$(DESTDIR)$(idirectfbdatabufferdir)" "$(DESTDIR)$(idirectfbdisplaylayerdir)" "$(DESTDIR)$(idirectfbeventbufferdir)" "$(DESTDIR)$(idirectfbfontdir)" "$(DESTDIR)$(idirectfbimageproviderdir)" "$(DESTDIR)$(idirectfbinputdevicedir)" "$(DESTDIR)$(idirectfbpalettedir)" "$(DESTDIR)$(idirectfbscreendir)" "$(DESTDIR)$(idirectfbsurfacedir)" "$(DESTDIR)$(idirectfbwindowdir)" "$(DESTDIR)$(idirectfbdir)" "$(DESTDIR)$(idirectfbdatabufferdir)" "$(DESTDIR)$(idirectfbdisplaylayerdir)" "$(DESTDIR)$(idirectfbeventbufferdir)" "$(DESTDIR)$(idirectfbfontdir)" "$(DESTDIR)$(idirectfbimageproviderdir)" "$(DESTDIR)$(idirectfbinputdevicedir)" "$(DESTDIR)$(idirectfbpalettedir)" "$(DESTDIR)$(idirectfbscreendir)" "$(DESTDIR)$(idirectfbsurfacedir)" "$(DESTDIR)$(idirectfbwindowdir)"; 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-idirectfbLTLIBRARIES \ + clean-idirectfbdatabufferLTLIBRARIES \ + clean-idirectfbdisplaylayerLTLIBRARIES \ + clean-idirectfbeventbufferLTLIBRARIES \ + clean-idirectfbfontLTLIBRARIES \ + clean-idirectfbimageproviderLTLIBRARIES \ + clean-idirectfbinputdeviceLTLIBRARIES \ + clean-idirectfbpaletteLTLIBRARIES \ + clean-idirectfbscreenLTLIBRARIES \ + clean-idirectfbsurfaceLTLIBRARIES \ + clean-idirectfbwindowLTLIBRARIES 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-idirectfbDATA install-idirectfbLTLIBRARIES \ + install-idirectfbdatabufferDATA \ + install-idirectfbdatabufferLTLIBRARIES \ + install-idirectfbdisplaylayerDATA \ + install-idirectfbdisplaylayerLTLIBRARIES \ + install-idirectfbeventbufferDATA \ + install-idirectfbeventbufferLTLIBRARIES \ + install-idirectfbfontDATA install-idirectfbfontLTLIBRARIES \ + install-idirectfbimageproviderDATA \ + install-idirectfbimageproviderLTLIBRARIES \ + install-idirectfbinputdeviceDATA \ + install-idirectfbinputdeviceLTLIBRARIES \ + install-idirectfbpaletteDATA \ + install-idirectfbpaletteLTLIBRARIES \ + install-idirectfbscreenDATA install-idirectfbscreenLTLIBRARIES \ + install-idirectfbsurfaceDATA \ + install-idirectfbsurfaceLTLIBRARIES \ + install-idirectfbwindowDATA install-idirectfbwindowLTLIBRARIES + +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-idirectfbDATA uninstall-idirectfbLTLIBRARIES \ + uninstall-idirectfbdatabufferDATA \ + uninstall-idirectfbdatabufferLTLIBRARIES \ + uninstall-idirectfbdisplaylayerDATA \ + uninstall-idirectfbdisplaylayerLTLIBRARIES \ + uninstall-idirectfbeventbufferDATA \ + uninstall-idirectfbeventbufferLTLIBRARIES \ + uninstall-idirectfbfontDATA uninstall-idirectfbfontLTLIBRARIES \ + uninstall-idirectfbimageproviderDATA \ + uninstall-idirectfbimageproviderLTLIBRARIES \ + uninstall-idirectfbinputdeviceDATA \ + uninstall-idirectfbinputdeviceLTLIBRARIES \ + uninstall-idirectfbpaletteDATA \ + uninstall-idirectfbpaletteLTLIBRARIES \ + uninstall-idirectfbscreenDATA \ + uninstall-idirectfbscreenLTLIBRARIES \ + uninstall-idirectfbsurfaceDATA \ + uninstall-idirectfbsurfaceLTLIBRARIES \ + uninstall-idirectfbwindowDATA \ + uninstall-idirectfbwindowLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-idirectfbLTLIBRARIES \ + clean-idirectfbdatabufferLTLIBRARIES \ + clean-idirectfbdisplaylayerLTLIBRARIES \ + clean-idirectfbeventbufferLTLIBRARIES \ + clean-idirectfbfontLTLIBRARIES \ + clean-idirectfbimageproviderLTLIBRARIES \ + clean-idirectfbinputdeviceLTLIBRARIES \ + clean-idirectfbpaletteLTLIBRARIES \ + clean-idirectfbscreenLTLIBRARIES \ + clean-idirectfbsurfaceLTLIBRARIES \ + clean-idirectfbwindowLTLIBRARIES 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-idirectfbDATA \ + install-idirectfbLTLIBRARIES install-idirectfbdatabufferDATA \ + install-idirectfbdatabufferLTLIBRARIES \ + install-idirectfbdisplaylayerDATA \ + install-idirectfbdisplaylayerLTLIBRARIES \ + install-idirectfbeventbufferDATA \ + install-idirectfbeventbufferLTLIBRARIES \ + install-idirectfbfontDATA install-idirectfbfontLTLIBRARIES \ + install-idirectfbimageproviderDATA \ + install-idirectfbimageproviderLTLIBRARIES \ + install-idirectfbinputdeviceDATA \ + install-idirectfbinputdeviceLTLIBRARIES \ + install-idirectfbpaletteDATA \ + install-idirectfbpaletteLTLIBRARIES \ + install-idirectfbscreenDATA install-idirectfbscreenLTLIBRARIES \ + install-idirectfbsurfaceDATA \ + install-idirectfbsurfaceLTLIBRARIES \ + install-idirectfbwindowDATA install-idirectfbwindowLTLIBRARIES \ + 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-idirectfbDATA \ + uninstall-idirectfbLTLIBRARIES \ + uninstall-idirectfbdatabufferDATA \ + uninstall-idirectfbdatabufferLTLIBRARIES \ + uninstall-idirectfbdisplaylayerDATA \ + uninstall-idirectfbdisplaylayerLTLIBRARIES \ + uninstall-idirectfbeventbufferDATA \ + uninstall-idirectfbeventbufferLTLIBRARIES \ + uninstall-idirectfbfontDATA uninstall-idirectfbfontLTLIBRARIES \ + uninstall-idirectfbimageproviderDATA \ + uninstall-idirectfbimageproviderLTLIBRARIES \ + uninstall-idirectfbinputdeviceDATA \ + uninstall-idirectfbinputdeviceLTLIBRARIES \ + uninstall-idirectfbpaletteDATA \ + uninstall-idirectfbpaletteLTLIBRARIES \ + uninstall-idirectfbscreenDATA \ + uninstall-idirectfbscreenLTLIBRARIES \ + uninstall-idirectfbsurfaceDATA \ + uninstall-idirectfbsurfaceLTLIBRARIES \ + uninstall-idirectfbwindowDATA \ + uninstall-idirectfbwindowLTLIBRARIES + +%.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/proxy/dispatcher/idirectfb_dispatcher.c b/Source/DirectFB/proxy/dispatcher/idirectfb_dispatcher.c new file mode 100755 index 0000000..e42fb72 --- /dev/null +++ b/Source/DirectFB/proxy/dispatcher/idirectfb_dispatcher.c @@ -0,0 +1,1305 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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. +*/ + +#include + +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +#include "idirectfb_dispatcher.h" + +static DFBResult Probe( void ); +static DFBResult Construct( IDirectFB *thiz, + VoodooManager *manager, + VoodooInstanceID *ret_instance ); + +#include + +DIRECT_INTERFACE_IMPLEMENTATION( IDirectFB, Dispatcher ) + + +/**************************************************************************************************/ + +typedef struct { + DirectLink link; + + VoodooInstanceID instance; + IDirectFBDataBuffer *requestor; +} DataBufferEntry; + +/* + * private data struct of IDirectFB_Dispatcher + */ +typedef struct { + int ref; /* reference counter */ + + IDirectFB *real; + + CoreDFB *core; + + VoodooInstanceID self; /* The instance of this dispatcher itself. */ + + DirectLink *data_buffers; /* list of known data buffers */ +} IDirectFB_Dispatcher_data; + +/**************************************************************************************************/ + +static void +IDirectFB_Dispatcher_Destruct( IDirectFB *thiz ) +{ + DirectLink *l, *n; + IDirectFB_Dispatcher_data *data = thiz->priv; + + D_DEBUG( "%s (%p)\n", __FUNCTION__, thiz ); + + direct_list_foreach_safe (l, n, data->data_buffers) { + DataBufferEntry *entry = (DataBufferEntry*) l; + + entry->requestor->Release( entry->requestor ); + + D_FREE( entry ); + } + + data->real->Release( data->real ); + + DIRECT_DEALLOCATE_INTERFACE( thiz ); +} + +/**************************************************************************************************/ + +static DirectResult +IDirectFB_Dispatcher_AddRef( IDirectFB *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + data->ref++; + + return DFB_OK; +} + +static DirectResult +IDirectFB_Dispatcher_Release( IDirectFB *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + if (--data->ref == 0) + IDirectFB_Dispatcher_Destruct( thiz ); + + return DFB_OK; +} + +static DFBResult +IDirectFB_Dispatcher_SetCooperativeLevel( IDirectFB *thiz, + DFBCooperativeLevel level ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFB_Dispatcher_GetDeviceDescription( IDirectFB *thiz, + DFBGraphicsDeviceDescription *ret_desc ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + if (!ret_desc) + return DFB_INVARG; + + + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFB_Dispatcher_EnumVideoModes( IDirectFB *thiz, + DFBVideoModeCallback callbackfunc, + void *callbackdata ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + if (!callbackfunc) + return DFB_INVARG; + + + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFB_Dispatcher_SetVideoMode( IDirectFB *thiz, + int width, + int height, + int bpp ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFB_Dispatcher_CreateSurface( IDirectFB *thiz, + const DFBSurfaceDescription *desc, + IDirectFBSurface **interface_ptr ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + if (!desc || !interface_ptr) + return DFB_INVARG; + + + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFB_Dispatcher_CreatePalette( IDirectFB *thiz, + const DFBPaletteDescription *desc, + IDirectFBPalette **interface_ptr ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + if (!interface_ptr) + return DFB_INVARG; + + + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFB_Dispatcher_EnumScreens( IDirectFB *thiz, + DFBScreenCallback callbackfunc, + void *callbackdata ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + if (!callbackfunc) + return DFB_INVARG; + + + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFB_Dispatcher_GetScreen( IDirectFB *thiz, + DFBScreenID id, + IDirectFBScreen **interface_ptr ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + if (!interface_ptr) + return DFB_INVARG; + + + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFB_Dispatcher_EnumDisplayLayers( IDirectFB *thiz, + DFBDisplayLayerCallback callbackfunc, + void *callbackdata ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + if (!callbackfunc) + return DFB_INVARG; + + + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFB_Dispatcher_GetDisplayLayer( IDirectFB *thiz, + DFBDisplayLayerID id, + IDirectFBDisplayLayer **interface_ptr ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + if (!interface_ptr) + return DFB_INVARG; + + + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFB_Dispatcher_EnumInputDevices( IDirectFB *thiz, + DFBInputDeviceCallback callbackfunc, + void *callbackdata ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + if (!callbackfunc) + return DFB_INVARG; + + + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFB_Dispatcher_GetInputDevice( IDirectFB *thiz, + DFBInputDeviceID id, + IDirectFBInputDevice **interface_ptr ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + if (!interface_ptr) + return DFB_INVARG; + + + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFB_Dispatcher_CreateEventBuffer( IDirectFB *thiz, + IDirectFBEventBuffer **interface_ptr) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + if (!interface_ptr) + return DFB_INVARG; + + + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFB_Dispatcher_CreateInputEventBuffer( IDirectFB *thiz, + DFBInputDeviceCapabilities caps, + DFBBoolean global, + IDirectFBEventBuffer **interface_ptr) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + if (!interface_ptr) + return DFB_INVARG; + + + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFB_Dispatcher_CreateImageProvider( IDirectFB *thiz, + const char *filename, + IDirectFBImageProvider **interface_ptr ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + /* Check arguments */ + if (!filename || !interface_ptr) + return DFB_INVARG; + + + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFB_Dispatcher_CreateVideoProvider( IDirectFB *thiz, + const char *filename, + IDirectFBVideoProvider **interface_ptr ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + /* Check arguments */ + if (!interface_ptr || !filename) + return DFB_INVARG; + + + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFB_Dispatcher_CreateFont( IDirectFB *thiz, + const char *filename, + const DFBFontDescription *desc, + IDirectFBFont **interface_ptr ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + /* Check arguments */ + if (!interface_ptr) + return DFB_INVARG; + + + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFB_Dispatcher_CreateDataBuffer( IDirectFB *thiz, + const DFBDataBufferDescription *desc, + IDirectFBDataBuffer **interface_ptr ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + if (!interface_ptr) + return DFB_INVARG; + + + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFB_Dispatcher_SetClipboardData( IDirectFB *thiz, + const char *mime_type, + const void *data, + unsigned int size, + struct timeval *timestamp ) +{ + if (!mime_type || !data || !size) + return DFB_INVARG; + + + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFB_Dispatcher_GetClipboardData( IDirectFB *thiz, + char **mime_type, + void **clip_data, + unsigned int *size ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + if (!mime_type && !clip_data && !size) + return DFB_INVARG; + + + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFB_Dispatcher_GetClipboardTimeStamp( IDirectFB *thiz, + struct timeval *timestamp ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + if (!timestamp) + return DFB_INVARG; + + + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFB_Dispatcher_Suspend( IDirectFB *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFB_Dispatcher_Resume( IDirectFB *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFB_Dispatcher_WaitIdle( IDirectFB *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFB_Dispatcher_WaitForSync( IDirectFB *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFB_Dispatcher_GetInterface( IDirectFB *thiz, + const char *type, + const char *implementation, + void *arg, + void **interface_ptr ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + + + return DFB_UNIMPLEMENTED; +} + +/**************************************************************************************************/ + +static DirectResult +Dispatch_Release( IDirectFB *thiz, IDirectFB *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + return voodoo_manager_unregister_local( manager, data->self ); +} + +static DirectResult +Dispatch_SetCooperativeLevel( IDirectFB *thiz, IDirectFB *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + DFBCooperativeLevel level; + VoodooMessageParser parser; + + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_INT( parser, level ); + VOODOO_PARSER_END( parser ); + + ret = real->SetCooperativeLevel( real, level ); + + return voodoo_manager_respond( manager, true, msg->header.serial, + ret, VOODOO_INSTANCE_NONE, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetDeviceDescription( IDirectFB *thiz, IDirectFB *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + DFBGraphicsDeviceDescription desc; + + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + ret = real->GetDeviceDescription( real, &desc ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_DATA, sizeof(DFBGraphicsDeviceDescription), &desc, + VMBT_NONE ); +} + +static DirectResult +Dispatch_SetVideoMode( IDirectFB *thiz, IDirectFB *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + VoodooMessageParser parser; + int width; + int height; + int bpp; + + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_INT( parser, width ); + VOODOO_PARSER_GET_INT( parser, height ); + VOODOO_PARSER_GET_INT( parser, bpp ); + VOODOO_PARSER_END( parser ); + + ret = real->SetVideoMode( real, width, height, bpp ); + + return voodoo_manager_respond( manager, true, msg->header.serial, + ret, VOODOO_INSTANCE_NONE, + VMBT_NONE ); +} + +#define MAX_MODES 128 + +typedef struct { + int num; + IDirectFB_Dispatcher_EnumVideoModes_Item items[MAX_MODES]; +} EnumVideoModes_Context; + +static DFBEnumerationResult +EnumVideoModes_Callback( int width, + int height, + int bpp, + void *callbackdata ) +{ + int index; + EnumVideoModes_Context *context = callbackdata; + + if (context->num == MAX_MODES) { + D_WARN( "maximum number of %d modes reached", MAX_MODES ); + return DFENUM_CANCEL; + } + + index = context->num++; + + context->items[index].width = width; + context->items[index].height = height; + context->items[index].bpp = bpp; + + return DFENUM_OK; +} + +static DirectResult +Dispatch_EnumVideoModes( IDirectFB *thiz, IDirectFB *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + EnumVideoModes_Context context = { 0 }; + + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + ret = real->EnumVideoModes( real, EnumVideoModes_Callback, &context ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_INT, context.num, + VMBT_DATA, context.num * sizeof(IDirectFB_Dispatcher_EnumVideoModes_Item), context.items, + VMBT_NONE ); +} + +static DirectResult +Dispatch_CreateEventBuffer( IDirectFB *thiz, IDirectFB *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + IDirectFBEventBuffer *buffer; + VoodooInstanceID instance; + VoodooMessageParser parser; + void *requestor; + + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_ID( parser, instance ); + VOODOO_PARSER_END( parser ); + + ret = real->CreateEventBuffer( real, &buffer ); + if (ret) + return ret; + + ret = voodoo_construct_requestor( manager, "IDirectFBEventBuffer", + instance, buffer, &requestor ); + + buffer->Release( buffer ); + + return ret; +} + +static DirectResult +Dispatch_CreateInputEventBuffer( IDirectFB *thiz, IDirectFB *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + IDirectFBEventBuffer *buffer; + VoodooInstanceID instance; + DFBInputDeviceCapabilities caps; + DFBBoolean global; + VoodooMessageParser parser; + void *requestor; + + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_ID( parser, instance ); + VOODOO_PARSER_GET_INT( parser, caps ); + VOODOO_PARSER_GET_INT( parser, global ); + VOODOO_PARSER_END( parser ); + + ret = real->CreateInputEventBuffer( real, caps, global, &buffer ); + if (ret) + return ret; + + ret = voodoo_construct_requestor( manager, "IDirectFBEventBuffer", + instance, buffer, &requestor ); + + buffer->Release( buffer ); + + return ret; +} + +static DirectResult +Dispatch_CreateImageProvider( IDirectFB *thiz, IDirectFB *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + DirectLink *l; + VoodooMessageParser parser; + VoodooInstanceID instance; + IDirectFBImageProvider *provider; + IDirectFBDataBuffer *buffer = NULL; + + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_ID( parser, instance ); + VOODOO_PARSER_END( parser ); + + if (1) { + ret = voodoo_manager_check_allocation( manager, 0x100000 /*FIXME*/ ); + if (ret) { + D_ERROR( "Allocation not permitted!\n" ); + return ret; + } + } + + direct_list_foreach (l, data->data_buffers) { + DataBufferEntry *entry = (DataBufferEntry*) l; + + if (entry->instance == instance) { + buffer = entry->requestor; + break; + } + } + + ret = buffer->CreateImageProvider( buffer, &provider ); + if (ret) + return ret; + + ret = voodoo_construct_dispatcher( manager, "IDirectFBImageProvider", + provider, data->self, NULL, &instance, NULL ); + if (ret) { + provider->Release( provider ); + return ret; + } + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, instance, + VMBT_NONE ); +} + +static DirectResult +Dispatch_CreateSurface( IDirectFB *thiz, IDirectFB *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + DFBSurfaceDescription desc; + IDirectFBSurface *surface; + VoodooInstanceID instance; + VoodooMessageParser parser; + bool force_system = (voodoo_config->resource_id != 0); + + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_READ_DFBSurfaceDescription( parser, desc ); + VOODOO_PARSER_END( parser ); + + if (1) { + unsigned int w = 256, h = 256, b = 2, size; + + if (desc.flags & DSDESC_WIDTH) + w = desc.width; + + if (desc.flags & DSDESC_HEIGHT) + h = desc.height; + + if (desc.flags & DSDESC_PIXELFORMAT) + b = DFB_BYTES_PER_PIXEL( desc.pixelformat ) ? DFB_BYTES_PER_PIXEL( desc.pixelformat ) : 2; + + size = w * h * b; + + D_INFO( "Checking creation of %u kB surface\n", size / 1024 ); + + if (voodoo_config->surface_max && voodoo_config->surface_max < size) { + D_ERROR( "Allocation of %u kB surface not permitted (limit %u kB)\n", + size / 1024, voodoo_config->surface_max / 1024 ); + return DR_LIMITEXCEEDED; + } + + ret = voodoo_manager_check_allocation( manager, size ); + if (ret) { + D_ERROR( "Allocation not permitted!\n" ); + return ret; + } + } + + if (voodoo_config->resource_id) { + if (desc.flags & DSDESC_RESOURCE_ID) { + if (desc.resource_id == voodoo_config->resource_id) { + force_system = false; + } + } + } + + if (force_system) { + DFBSurfaceDescription sd = desc; + + if (sd.flags & DSDESC_CAPS) { + sd.caps &= ~DSCAPS_VIDEOONLY; + sd.caps |= DSCAPS_SYSTEMONLY; + } + else { + sd.flags |= DSDESC_CAPS; + sd.caps = DSCAPS_SYSTEMONLY; + } + + ret = real->CreateSurface( real, &sd, &surface ); + } + else if (desc.flags & (DSDESC_PALETTE | DSDESC_PREALLOCATED)) { + DFBSurfaceDescription sd = desc; + sd.flags &= ~(DSDESC_PALETTE | DSDESC_PREALLOCATED); + + ret = real->CreateSurface( real, &sd, &surface ); + } + else { + ret = real->CreateSurface( real, &desc, &surface ); + } + if (ret) + return ret; + + ret = voodoo_construct_dispatcher( manager, "IDirectFBSurface", + surface, data->self, NULL, &instance, NULL ); + if (ret) { + surface->Release( surface ); + return ret; + } + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, instance, + VMBT_NONE ); +} + +typedef struct { + int num; + IDirectFB_Dispatcher_EnumScreens_Item items[MAX_SCREENS]; +} EnumScreens_Context; + +static DFBEnumerationResult +EnumScreens_Callback( DFBScreenID screen_id, + DFBScreenDescription desc, + void *callbackdata ) +{ + int index; + EnumScreens_Context *context = callbackdata; + + if (context->num == MAX_SCREENS) { + D_WARN( "maximum number of %d screens reached", MAX_SCREENS ); + return DFENUM_CANCEL; + } + + index = context->num++; + + context->items[index].screen_id = screen_id; + context->items[index].desc = desc; + + return DFENUM_OK; +} + +static DirectResult +Dispatch_EnumScreens( IDirectFB *thiz, IDirectFB *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + EnumScreens_Context context = { 0 }; + + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + ret = real->EnumScreens( real, EnumScreens_Callback, &context ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_INT, context.num, + VMBT_DATA, context.num * sizeof(IDirectFB_Dispatcher_EnumScreens_Item), context.items, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetDisplayLayer( IDirectFB *thiz, IDirectFB *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + DFBDisplayLayerID id; + IDirectFBDisplayLayer *layer; + VoodooInstanceID instance; + VoodooMessageParser parser; + + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_ID( parser, id ); + VOODOO_PARSER_END( parser ); + + if (voodoo_config->layer_mask && !(voodoo_config->layer_mask & (1 << id))) { + D_ERROR( "Layer with id %u not allowed!\n", id ); + return DR_ACCESSDENIED; + } + + ret = real->GetDisplayLayer( real, id, &layer ); + if (ret) + return ret; + + ret = voodoo_construct_dispatcher( manager, "IDirectFBDisplayLayer", + layer, data->self, NULL, &instance, NULL ); + if (ret) { + layer->Release( layer ); + return ret; + } + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, instance, + VMBT_NONE ); +} + +#define MAX_INPUT_DEVICES 64 + +typedef struct { + int num; + IDirectFB_Dispatcher_EnumInputDevices_Item items[MAX_INPUT_DEVICES]; +} EnumInputDevices_Context; + +static DFBEnumerationResult +EnumInputDevices_Callback( DFBInputDeviceID device_id, + DFBInputDeviceDescription desc, + void *callbackdata ) +{ + int index; + EnumInputDevices_Context *context = callbackdata; + + if (context->num == MAX_INPUT_DEVICES) { + D_WARN( "maximum number of %d input devices reached", MAX_INPUT_DEVICES ); + return DFENUM_CANCEL; + } + + index = context->num++; + + context->items[index].device_id = device_id; + context->items[index].desc = desc; + + return DFENUM_OK; +} + +static DirectResult +Dispatch_EnumInputDevices( IDirectFB *thiz, IDirectFB *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + EnumInputDevices_Context context = { 0 }; + + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + ret = real->EnumInputDevices( real, EnumInputDevices_Callback, &context ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_INT, context.num, + VMBT_DATA, context.num * sizeof(IDirectFB_Dispatcher_EnumInputDevices_Item), context.items, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetInputDevice( IDirectFB *thiz, IDirectFB *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + DFBScreenID device_id; + IDirectFBInputDevice *device; + VoodooInstanceID instance; + VoodooMessageParser parser; + + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_ID( parser, device_id ); + VOODOO_PARSER_END( parser ); + + ret = real->GetInputDevice( real, device_id, &device ); + if (ret) + return ret; + + ret = voodoo_construct_dispatcher( manager, "IDirectFBInputDevice", + device, data->self, NULL, &instance, NULL ); + if (ret) { + device->Release( device ); + return ret; + } + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, instance, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetScreen( IDirectFB *thiz, IDirectFB *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + DFBScreenID screen_id; + IDirectFBScreen *screen; + VoodooInstanceID instance; + VoodooMessageParser parser; + + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_ID( parser, screen_id ); + VOODOO_PARSER_END( parser ); + + ret = real->GetScreen( real, screen_id, &screen ); + if (ret) + return ret; + + ret = voodoo_construct_dispatcher( manager, "IDirectFBScreen", + screen, data->self, NULL, &instance, NULL ); + if (ret) { + screen->Release( screen ); + return ret; + } + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, instance, + VMBT_NONE ); +} + +static DirectResult +Dispatch_CreateFont( IDirectFB *thiz, IDirectFB *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + DirectLink *l; + VoodooMessageParser parser; + VoodooInstanceID instance; + IDirectFBFont *font; + IDirectFBDataBuffer *buffer = NULL; + const DFBFontDescription *desc; + + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_ID( parser, instance ); + VOODOO_PARSER_GET_DATA( parser, desc ); + VOODOO_PARSER_END( parser ); + + direct_list_foreach (l, data->data_buffers) { + DataBufferEntry *entry = (DataBufferEntry*) l; + + if (entry->instance == instance) { + buffer = entry->requestor; + break; + } + } + + if (1) { + unsigned int size; + + buffer->GetLength( buffer, &size ); + + ret = voodoo_manager_check_allocation( manager, size ); + if (ret) { + D_ERROR( "Allocation not permitted!\n" ); + return ret; + } + } + + ret = buffer->CreateFont( buffer, desc, &font ); + if (ret) + return ret; + + ret = voodoo_construct_dispatcher( manager, "IDirectFBFont", + font, data->self, NULL, &instance, NULL ); + if (ret) { + font->Release( font ); + return ret; + } + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, instance, + VMBT_NONE ); +} + +static DirectResult +Dispatch_CreateDataBuffer( IDirectFB *thiz, IDirectFB *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + IDirectFBDataBuffer *requestor; + VoodooMessageParser parser; + VoodooInstanceID instance; + DataBufferEntry *entry; + void *ptr; + + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_ID( parser, instance ); + VOODOO_PARSER_END( parser ); + + ret = voodoo_construct_requestor( manager, "IDirectFBDataBuffer", + instance, data->real, &ptr ); + if (ret) + return ret; + + requestor = ptr; + + entry = D_CALLOC( 1, sizeof(DataBufferEntry) ); + if (!entry) { + D_WARN( "out of memory" ); + requestor->Release( requestor ); + return DFB_NOSYSTEMMEMORY; + } + + entry->instance = instance; + entry->requestor = requestor; + + entry->requestor->AddRef( entry->requestor ); + + direct_list_prepend( &data->data_buffers, &entry->link ); + + return DFB_OK; +} + +static DirectResult +Dispatch_WaitIdle( IDirectFB *thiz, IDirectFB *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + ret = real->WaitIdle( real ); + + return voodoo_manager_respond( manager, true, msg->header.serial, + ret, VOODOO_INSTANCE_NONE, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetInterface( IDirectFB *thiz, IDirectFB *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + VoodooMessageParser parser; + const char *type; + IAny *interface_ptr; + VoodooInstanceID instance; + + DIRECT_INTERFACE_GET_DATA(IDirectFB_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_STRING( parser, type ); + VOODOO_PARSER_END( parser ); + + ret = real->GetInterface( real, type, NULL, NULL, (void**) &interface_ptr ); + if (ret) + return ret; + + ret = voodoo_construct_dispatcher( manager, type, interface_ptr, data->self, NULL, &instance, NULL ); + if (ret) { + interface_ptr->Release( interface_ptr ); + return ret; + } + + return voodoo_manager_respond( manager, true, msg->header.serial, + ret, instance, + VMBT_NONE ); +} + +static DirectResult +Dispatch( void *dispatcher, void *real, VoodooManager *manager, VoodooRequestMessage *msg ) +{ + D_DEBUG( "IDirectFB/Dispatcher: " + "Handling request for instance %u with method %u...\n", msg->instance, msg->method ); + + switch (msg->method) { + case IDIRECTFB_METHOD_ID_Release: + return Dispatch_Release( dispatcher, real, manager, msg ); + + case IDIRECTFB_METHOD_ID_SetCooperativeLevel: + return Dispatch_SetCooperativeLevel( dispatcher, real, manager, msg ); + + case IDIRECTFB_METHOD_ID_GetDeviceDescription: + return Dispatch_GetDeviceDescription( dispatcher, real, manager, msg ); + + case IDIRECTFB_METHOD_ID_SetVideoMode: + return Dispatch_SetVideoMode( dispatcher, real, manager, msg ); + + case IDIRECTFB_METHOD_ID_EnumVideoModes: + return Dispatch_EnumVideoModes( dispatcher, real, manager, msg ); + + case IDIRECTFB_METHOD_ID_CreateSurface: + return Dispatch_CreateSurface( dispatcher, real, manager, msg ); + + case IDIRECTFB_METHOD_ID_EnumScreens: + return Dispatch_EnumScreens( dispatcher, real, manager, msg ); + + case IDIRECTFB_METHOD_ID_GetScreen: + return Dispatch_GetScreen( dispatcher, real, manager, msg ); + + case IDIRECTFB_METHOD_ID_GetDisplayLayer: + return Dispatch_GetDisplayLayer( dispatcher, real, manager, msg ); + + case IDIRECTFB_METHOD_ID_EnumInputDevices: + return Dispatch_EnumInputDevices( dispatcher, real, manager, msg ); + + case IDIRECTFB_METHOD_ID_GetInputDevice: + return Dispatch_GetInputDevice( dispatcher, real, manager, msg ); + + case IDIRECTFB_METHOD_ID_CreateEventBuffer: + return Dispatch_CreateEventBuffer( dispatcher, real, manager, msg ); + + case IDIRECTFB_METHOD_ID_CreateInputEventBuffer: + return Dispatch_CreateInputEventBuffer( dispatcher, real, manager, msg ); + + case IDIRECTFB_METHOD_ID_CreateImageProvider: + return Dispatch_CreateImageProvider( dispatcher, real, manager, msg ); + + case IDIRECTFB_METHOD_ID_CreateFont: + return Dispatch_CreateFont( dispatcher, real, manager, msg ); + + case IDIRECTFB_METHOD_ID_CreateDataBuffer: + return Dispatch_CreateDataBuffer( dispatcher, real, manager, msg ); + + case IDIRECTFB_METHOD_ID_WaitIdle: + return Dispatch_WaitIdle( dispatcher, real, manager, msg ); + + case IDIRECTFB_METHOD_ID_GetInterface: + return Dispatch_GetInterface( dispatcher, real, manager, msg ); + } + + return DFB_NOSUCHMETHOD; +} + +/**************************************************************************************************/ + +static DFBResult +Probe() +{ + /* This implementation has to be loaded explicitly. */ + return DFB_UNSUPPORTED; +} + +/* + * Constructor + * + * Fills in function pointers and intializes data structure. + */ +static DFBResult +Construct( IDirectFB *thiz, VoodooManager *manager, VoodooInstanceID *ret_instance ) +{ + DFBResult ret; + IDirectFB *real; + VoodooInstanceID instance; + + DIRECT_ALLOCATE_INTERFACE_DATA(thiz, IDirectFB_Dispatcher) + + ret = DirectFBCreate( &real ); + if (ret) { + DIRECT_DEALLOCATE_INTERFACE( thiz ); + return ret; + } + + ret = voodoo_manager_register_local( manager, VOODOO_INSTANCE_NONE, thiz, real, Dispatch, &instance ); + if (ret) { + real->Release( real ); + DIRECT_DEALLOCATE_INTERFACE( thiz ); + return ret; + } + + *ret_instance = instance; + + data->ref = 1; + data->real = real; + data->core = ((IDirectFB_data*)(real->priv))->core; + data->self = instance; + + thiz->AddRef = IDirectFB_Dispatcher_AddRef; + thiz->Release = IDirectFB_Dispatcher_Release; + thiz->SetCooperativeLevel = IDirectFB_Dispatcher_SetCooperativeLevel; + thiz->GetDeviceDescription = IDirectFB_Dispatcher_GetDeviceDescription; + thiz->EnumVideoModes = IDirectFB_Dispatcher_EnumVideoModes; + thiz->SetVideoMode = IDirectFB_Dispatcher_SetVideoMode; + thiz->CreateSurface = IDirectFB_Dispatcher_CreateSurface; + thiz->CreatePalette = IDirectFB_Dispatcher_CreatePalette; + thiz->EnumScreens = IDirectFB_Dispatcher_EnumScreens; + thiz->GetScreen = IDirectFB_Dispatcher_GetScreen; + thiz->EnumDisplayLayers = IDirectFB_Dispatcher_EnumDisplayLayers; + thiz->GetDisplayLayer = IDirectFB_Dispatcher_GetDisplayLayer; + thiz->EnumInputDevices = IDirectFB_Dispatcher_EnumInputDevices; + thiz->GetInputDevice = IDirectFB_Dispatcher_GetInputDevice; + thiz->CreateEventBuffer = IDirectFB_Dispatcher_CreateEventBuffer; + thiz->CreateInputEventBuffer = IDirectFB_Dispatcher_CreateInputEventBuffer; + thiz->CreateImageProvider = IDirectFB_Dispatcher_CreateImageProvider; + thiz->CreateVideoProvider = IDirectFB_Dispatcher_CreateVideoProvider; + thiz->CreateFont = IDirectFB_Dispatcher_CreateFont; + thiz->CreateDataBuffer = IDirectFB_Dispatcher_CreateDataBuffer; + thiz->SetClipboardData = IDirectFB_Dispatcher_SetClipboardData; + thiz->GetClipboardData = IDirectFB_Dispatcher_GetClipboardData; + thiz->GetClipboardTimeStamp = IDirectFB_Dispatcher_GetClipboardTimeStamp; + thiz->Suspend = IDirectFB_Dispatcher_Suspend; + thiz->Resume = IDirectFB_Dispatcher_Resume; + thiz->WaitIdle = IDirectFB_Dispatcher_WaitIdle; + thiz->WaitForSync = IDirectFB_Dispatcher_WaitForSync; + thiz->GetInterface = IDirectFB_Dispatcher_GetInterface; + + return DFB_OK; +} + diff --git a/Source/DirectFB/proxy/dispatcher/idirectfb_dispatcher.h b/Source/DirectFB/proxy/dispatcher/idirectfb_dispatcher.h new file mode 100755 index 0000000..419f6cb --- /dev/null +++ b/Source/DirectFB/proxy/dispatcher/idirectfb_dispatcher.h @@ -0,0 +1,110 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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 __IDIRECTFB_DISPATCHER_H__ +#define __IDIRECTFB_DISPATCHER_H__ + +#include + +#define IDIRECTFB_METHOD_ID_AddRef 1 +#define IDIRECTFB_METHOD_ID_Release 2 +#define IDIRECTFB_METHOD_ID_SetCooperativeLevel 3 +#define IDIRECTFB_METHOD_ID_GetDeviceDescription 4 +#define IDIRECTFB_METHOD_ID_EnumVideoModes 5 +#define IDIRECTFB_METHOD_ID_SetVideoMode 6 +#define IDIRECTFB_METHOD_ID_CreateSurface 7 +#define IDIRECTFB_METHOD_ID_CreatePalette 8 +#define IDIRECTFB_METHOD_ID_EnumScreens 9 +#define IDIRECTFB_METHOD_ID_GetScreen 10 +#define IDIRECTFB_METHOD_ID_EnumDisplayLayers 11 +#define IDIRECTFB_METHOD_ID_GetDisplayLayer 12 +#define IDIRECTFB_METHOD_ID_EnumInputDevices 13 +#define IDIRECTFB_METHOD_ID_GetInputDevice 14 +#define IDIRECTFB_METHOD_ID_CreateEventBuffer 15 +#define IDIRECTFB_METHOD_ID_CreateInputEventBuffer 16 +#define IDIRECTFB_METHOD_ID_CreateImageProvider 17 +#define IDIRECTFB_METHOD_ID_CreateVideoProvider 18 +#define IDIRECTFB_METHOD_ID_CreateFont 19 +#define IDIRECTFB_METHOD_ID_CreateDataBuffer 20 +#define IDIRECTFB_METHOD_ID_SetClipboardData 21 +#define IDIRECTFB_METHOD_ID_GetClipboardData 22 +#define IDIRECTFB_METHOD_ID_GetClipboardTimeStamp 23 +#define IDIRECTFB_METHOD_ID_Suspend 24 +#define IDIRECTFB_METHOD_ID_Resume 25 +#define IDIRECTFB_METHOD_ID_WaitIdle 26 +#define IDIRECTFB_METHOD_ID_WaitForSync 27 +#define IDIRECTFB_METHOD_ID_GetInterface 28 + +typedef struct { + int width; + int height; + int bpp; +} IDirectFB_Dispatcher_EnumVideoModes_Item; + +typedef struct { + DFBScreenID screen_id; + DFBScreenDescription desc; +} IDirectFB_Dispatcher_EnumScreens_Item; + +typedef struct { + DFBInputDeviceID device_id; + DFBInputDeviceDescription desc; +} IDirectFB_Dispatcher_EnumInputDevices_Item; + + +#if 0 +#define VOODOO_PARSER_READ_DFBSurfaceDescription( p, desc ) \ + do { \ + VOODOO_PARSER_GET_INT( p, (desc).flags ); \ + VOODOO_PARSER_GET_INT( p, (desc).caps ); \ + VOODOO_PARSER_GET_INT( p, (desc).width ); \ + VOODOO_PARSER_GET_INT( p, (desc).height ); \ + VOODOO_PARSER_GET_INT( p, (desc).pixelformat ); \ + VOODOO_PARSER_GET_UINT( p, (desc).resource_id ); \ + VOODOO_PARSER_GET_INT( p, (desc).hints ); \ + } while (0) + +#define VMBT_DFBSurfaceDescription( desc ) \ + VMBT_INT, (desc).flags, \ + VMBT_INT, (desc).caps, \ + VMBT_INT, (desc).width, \ + VMBT_INT, (desc).height, \ + VMBT_INT, (desc).pixelformat, \ + VMBT_UINT, (desc).resource_id, \ + VMBT_INT, (desc).hints +#else +#define VOODOO_PARSER_READ_DFBSurfaceDescription( p, desc ) \ + do { \ + VOODOO_PARSER_READ_DATA( p, &(desc), sizeof(DFBSurfaceDescription) ); \ + } while (0) + +#define VMBT_DFBSurfaceDescription( desc ) \ + VMBT_DATA, sizeof(DFBSurfaceDescription), &(desc) +#endif + +#endif diff --git a/Source/DirectFB/proxy/dispatcher/idirectfbdatabuffer_dispatcher.c b/Source/DirectFB/proxy/dispatcher/idirectfbdatabuffer_dispatcher.c new file mode 100755 index 0000000..b4c376a --- /dev/null +++ b/Source/DirectFB/proxy/dispatcher/idirectfbdatabuffer_dispatcher.c @@ -0,0 +1,673 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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. +*/ + +#include + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include "idirectfb_dispatcher.h" +#include "idirectfbdatabuffer_dispatcher.h" + + +static DFBResult Probe( void ); +static DFBResult Construct( IDirectFBDataBuffer *thiz, + IDirectFBDataBuffer *real, + VoodooManager *manager, + VoodooInstanceID super, + void *arg, + VoodooInstanceID *ret_instance ); + +#include + +DIRECT_INTERFACE_IMPLEMENTATION( IDirectFBDataBuffer, Dispatcher ) + + +/**************************************************************************************************/ + +/* + * private data struct of IDirectFBDataBuffer_Dispatcher + */ +typedef struct { + IDirectFBDataBuffer_data base; + + IDirectFBDataBuffer *real; + + VoodooInstanceID self; /* The instance of this dispatcher itself. */ + VoodooInstanceID super; /* The instance of the super interface. */ + + VoodooManager *manager; + + IDirectFB *idirectfb; +} IDirectFBDataBuffer_Dispatcher_data; + +/**************************************************************************************************/ + +static void +IDirectFBDataBuffer_Dispatcher_Destruct( IDirectFBDataBuffer *thiz ) +{ + IDirectFBDataBuffer_Dispatcher_data *data = thiz->priv; + + D_DEBUG( "%s (%p)\n", __FUNCTION__, thiz ); + + data->real->Release( data->real ); + + IDirectFBDataBuffer_Destruct( thiz ); +} + +/**************************************************************************************************/ + +static DirectResult +IDirectFBDataBuffer_Dispatcher_AddRef( IDirectFBDataBuffer *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Dispatcher) + + data->base.ref++; + + return DFB_OK; +} + +static DirectResult +IDirectFBDataBuffer_Dispatcher_Release( IDirectFBDataBuffer *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Dispatcher) + + if (--data->base.ref == 0) + IDirectFBDataBuffer_Dispatcher_Destruct( thiz ); + + return DFB_OK; +} + +static DFBResult +IDirectFBDataBuffer_Dispatcher_Flush( IDirectFBDataBuffer *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Dispatcher) + + return data->real->Flush( data->real ); +} + +static DFBResult +IDirectFBDataBuffer_Dispatcher_Finish( IDirectFBDataBuffer *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Dispatcher) + + return data->real->Finish( data->real ); +} + +static DFBResult +IDirectFBDataBuffer_Dispatcher_SeekTo( IDirectFBDataBuffer *thiz, + unsigned int offset ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Dispatcher) + + return data->real->SeekTo( data->real, offset ); +} + +static DFBResult +IDirectFBDataBuffer_Dispatcher_GetPosition( IDirectFBDataBuffer *thiz, + unsigned int *offset ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Dispatcher) + + return data->real->GetPosition( data->real, offset ); +} + +static DFBResult +IDirectFBDataBuffer_Dispatcher_GetLength( IDirectFBDataBuffer *thiz, + unsigned int *length ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Dispatcher) + + return data->real->GetLength( data->real, length ); +} + +static DFBResult +IDirectFBDataBuffer_Dispatcher_WaitForData( IDirectFBDataBuffer *thiz, + unsigned int length ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Dispatcher) + + return data->real->WaitForData( data->real, length ); +} + +static DFBResult +IDirectFBDataBuffer_Dispatcher_WaitForDataWithTimeout( IDirectFBDataBuffer *thiz, + unsigned int length, + unsigned int seconds, + unsigned int milli_seconds ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Dispatcher) + + return data->real->WaitForDataWithTimeout( data->real, length, seconds, milli_seconds ); +} + +static DFBResult +IDirectFBDataBuffer_Dispatcher_GetData( IDirectFBDataBuffer *thiz, + unsigned int length, + void *dest, + unsigned int *read ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Dispatcher) + + return data->real->GetData( data->real, length, dest, read ); +} + +static DFBResult +IDirectFBDataBuffer_Dispatcher_PeekData( IDirectFBDataBuffer *thiz, + unsigned int length, + int offset, + void *dest, + unsigned int *read ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Dispatcher) + + return data->real->PeekData( data->real, length, offset, dest, read ); +} + +static DFBResult +IDirectFBDataBuffer_Dispatcher_HasData( IDirectFBDataBuffer *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Dispatcher) + + return data->real->HasData( data->real ); +} + +static DFBResult +IDirectFBDataBuffer_Dispatcher_PutData( IDirectFBDataBuffer *thiz, + const void *source, + unsigned int length ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Dispatcher) + + return data->real->PutData( data->real, source, length ); +} + +static DFBResult +IDirectFBDataBuffer_Dispatcher_CreateImageProvider( IDirectFBDataBuffer *thiz, + IDirectFBImageProvider **ret_interface ) +{ + DirectResult ret; + VoodooResponseMessage *response; + void *interface_ptr = NULL; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Dispatcher) + + if (!ret_interface) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->super, + IDIRECTFB_METHOD_ID_CreateImageProvider, + VREQ_RESPOND | VREQ_ASYNC, &response, + VMBT_ID, data->self, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret == DR_OK) + ret = voodoo_construct_requestor( data->manager, "IDirectFBImageProvider", + response->instance, thiz, &interface_ptr ); + + voodoo_manager_finish_request( data->manager, response ); + + *ret_interface = interface_ptr; + + return ret; +} + +static DFBResult +IDirectFBDataBuffer_Dispatcher_CreateVideoProvider( IDirectFBDataBuffer *thiz, + IDirectFBVideoProvider **ret_interface ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Dispatcher) + + if (!ret_interface) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDataBuffer_Dispatcher_CreateFont( IDirectFBDataBuffer *thiz, + const DFBFontDescription *desc, + IDirectFBFont **ret_interface ) +{ + DirectResult ret; + VoodooResponseMessage *response; + void *interface_ptr = NULL; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Dispatcher) + + if (!ret_interface) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->super, + IDIRECTFB_METHOD_ID_CreateFont, + VREQ_RESPOND | VREQ_ASYNC, &response, + VMBT_ID, data->self, + VMBT_DATA, sizeof(DFBFontDescription), desc, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret == DR_OK) + ret = voodoo_construct_requestor( data->manager, "IDirectFBFont", + response->instance, thiz, &interface_ptr ); + + voodoo_manager_finish_request( data->manager, response ); + + *ret_interface = interface_ptr; + + return ret; +} + +/**************************************************************************************************/ + +static DirectResult +Dispatch_Release( IDirectFBDataBuffer *thiz, IDirectFBDataBuffer *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Dispatcher) + + return voodoo_manager_unregister_local( manager, data->self ); +} + +static DirectResult +Dispatch_Flush( IDirectFBDataBuffer *thiz, IDirectFBDataBuffer *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Dispatcher) + + ret = real->Flush( real ); + + return voodoo_manager_respond( manager, true, msg->header.serial, + ret, VOODOO_INSTANCE_NONE, + VMBT_NONE ); +} + +static DirectResult +Dispatch_Finish( IDirectFBDataBuffer *thiz, IDirectFBDataBuffer *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Dispatcher) + + ret = real->Finish( real ); + + return voodoo_manager_respond( manager, true, msg->header.serial, + ret, VOODOO_INSTANCE_NONE, + VMBT_NONE ); +} + +static DirectResult +Dispatch_SeekTo( IDirectFBDataBuffer *thiz, IDirectFBDataBuffer *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + VoodooMessageParser parser; + unsigned int offset; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_UINT( parser, offset ); + VOODOO_PARSER_END( parser ); + + ret = real->SeekTo( real, offset ); + + return voodoo_manager_respond( manager, true, msg->header.serial, + ret, VOODOO_INSTANCE_NONE, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetPosition( IDirectFBDataBuffer *thiz, IDirectFBDataBuffer *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + unsigned int offset; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Dispatcher) + + ret = real->GetPosition( real, &offset ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_UINT, offset, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetLength( IDirectFBDataBuffer *thiz, IDirectFBDataBuffer *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + unsigned int length; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Dispatcher) + + ret = real->GetLength( real, &length ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_UINT, length, + VMBT_NONE ); +} + +static DirectResult +Dispatch_WaitForData( IDirectFBDataBuffer *thiz, IDirectFBDataBuffer *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + VoodooMessageParser parser; + unsigned int length; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_UINT( parser, length ); + VOODOO_PARSER_END( parser ); + + ret = real->WaitForData( real, length ); + + return voodoo_manager_respond( manager, true, msg->header.serial, + ret, VOODOO_INSTANCE_NONE, + VMBT_NONE ); +} + +static DirectResult +Dispatch_WaitForDataWithTimeout( IDirectFBDataBuffer *thiz, IDirectFBDataBuffer *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + VoodooMessageParser parser; + unsigned int length; + unsigned int seconds; + unsigned int milli_seconds; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_UINT( parser, length ); + VOODOO_PARSER_GET_UINT( parser, seconds ); + VOODOO_PARSER_GET_UINT( parser, milli_seconds ); + VOODOO_PARSER_END( parser ); + + ret = real->WaitForDataWithTimeout( real, length, seconds, milli_seconds ); + + return voodoo_manager_respond( manager, true, msg->header.serial, + ret, VOODOO_INSTANCE_NONE, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetData( IDirectFBDataBuffer *thiz, IDirectFBDataBuffer *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + VoodooMessageParser parser; + unsigned int length; + unsigned int read; + void *tmp; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_UINT( parser, length ); + VOODOO_PARSER_END( parser ); + + if (length > 16384) + length = 16384; + + tmp = D_MALLOC( length ); + if (!tmp) + return D_OOM(); + + ret = real->GetData( real, length, tmp, &read ); + if (ret) { + D_FREE( tmp ); + return ret; + } + + ret = voodoo_manager_respond( manager, true, msg->header.serial, + ret, VOODOO_INSTANCE_NONE, + VMBT_UINT, read, + VMBT_DATA, read, tmp, + VMBT_NONE ); + + D_FREE( tmp ); + + return ret; +} + +static DirectResult +Dispatch_PeekData( IDirectFBDataBuffer *thiz, IDirectFBDataBuffer *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + VoodooMessageParser parser; + unsigned int length; + int offset; + unsigned int read; + void *tmp; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_UINT( parser, length ); + VOODOO_PARSER_GET_INT( parser, offset ); + VOODOO_PARSER_END( parser ); + + if (length > 16384) + length = 16384; + + tmp = D_MALLOC( length ); + if (!tmp) + return D_OOM(); + + ret = real->PeekData( real, length, offset, tmp, &read ); + if (ret) { + D_FREE( tmp ); + return ret; + } + + ret = voodoo_manager_respond( manager, true, msg->header.serial, + ret, VOODOO_INSTANCE_NONE, + VMBT_UINT, read, + VMBT_DATA, read, tmp, + VMBT_NONE ); + + D_FREE( tmp ); + + return ret; +} + +static DirectResult +Dispatch_HasData( IDirectFBDataBuffer *thiz, IDirectFBDataBuffer *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Dispatcher) + + ret = real->HasData( real ); + + return voodoo_manager_respond( manager, true, msg->header.serial, + ret, VOODOO_INSTANCE_NONE, + VMBT_NONE ); +} + +static DirectResult +Dispatch_PutData( IDirectFBDataBuffer *thiz, IDirectFBDataBuffer *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + VoodooMessageParser parser; + unsigned int length; + const void *source; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_UINT( parser, length ); + VOODOO_PARSER_GET_DATA( parser, source ); + VOODOO_PARSER_END( parser ); + + ret = real->PutData( real, source, length ); + + return voodoo_manager_respond( manager, true, msg->header.serial, + ret, VOODOO_INSTANCE_NONE, + VMBT_NONE ); +} + +static DirectResult +Dispatch( void *dispatcher, void *real, VoodooManager *manager, VoodooRequestMessage *msg ) +{ + D_DEBUG( "IDirectFBDataBuffer/Dispatcher: " + "Handling request for instance %u with method %u...\n", msg->instance, msg->method ); + + switch (msg->method) { + case IDIRECTFBDATABUFFER_METHOD_ID_Release: + return Dispatch_Release( dispatcher, real, manager, msg ); + + case IDIRECTFBDATABUFFER_METHOD_ID_Flush: + return Dispatch_Flush( dispatcher, real, manager, msg ); + + case IDIRECTFBDATABUFFER_METHOD_ID_Finish: + return Dispatch_Finish( dispatcher, real, manager, msg ); + + case IDIRECTFBDATABUFFER_METHOD_ID_SeekTo: + return Dispatch_SeekTo( dispatcher, real, manager, msg ); + + case IDIRECTFBDATABUFFER_METHOD_ID_GetPosition: + return Dispatch_GetPosition( dispatcher, real, manager, msg ); + + case IDIRECTFBDATABUFFER_METHOD_ID_GetLength: + return Dispatch_GetLength( dispatcher, real, manager, msg ); + + case IDIRECTFBDATABUFFER_METHOD_ID_WaitForData: + return Dispatch_WaitForData( dispatcher, real, manager, msg ); + + case IDIRECTFBDATABUFFER_METHOD_ID_WaitForDataWithTimeout: + return Dispatch_WaitForDataWithTimeout( dispatcher, real, manager, msg ); + + case IDIRECTFBDATABUFFER_METHOD_ID_GetData: + return Dispatch_GetData( dispatcher, real, manager, msg ); + + case IDIRECTFBDATABUFFER_METHOD_ID_PeekData: + return Dispatch_PeekData( dispatcher, real, manager, msg ); + + case IDIRECTFBDATABUFFER_METHOD_ID_HasData: + return Dispatch_HasData( dispatcher, real, manager, msg ); + + case IDIRECTFBDATABUFFER_METHOD_ID_PutData: + return Dispatch_PutData( dispatcher, real, manager, msg ); + } + + return DFB_NOSUCHMETHOD; +} + +/**************************************************************************************************/ + +static DFBResult +Probe() +{ + /* This implementation has to be loaded explicitly. */ + return DFB_UNSUPPORTED; +} + +static DFBResult +Construct( IDirectFBDataBuffer *thiz, + IDirectFBDataBuffer *real, + VoodooManager *manager, + VoodooInstanceID super, + void *arg, + VoodooInstanceID *ret_instance ) +{ + DFBResult ret; + VoodooInstanceID instance; + + DIRECT_ALLOCATE_INTERFACE_DATA(thiz, IDirectFBDataBuffer_Dispatcher) + + ret = IDirectFBDataBuffer_Construct( thiz, NULL, NULL ); + if (ret) + return ret; + + ret = voodoo_manager_register_local( manager, VOODOO_INSTANCE_NONE, thiz, real, Dispatch, &instance ); + if (ret) { + IDirectFBDataBuffer_Destruct( thiz ); + return ret; + } + + *ret_instance = instance; + + data->real = real; + data->self = instance; + data->super = super; + data->manager = manager; + data->idirectfb = arg; + + thiz->AddRef = IDirectFBDataBuffer_Dispatcher_AddRef; + thiz->Release = IDirectFBDataBuffer_Dispatcher_Release; + thiz->Flush = IDirectFBDataBuffer_Dispatcher_Flush; + thiz->Finish = IDirectFBDataBuffer_Dispatcher_Finish; + thiz->SeekTo = IDirectFBDataBuffer_Dispatcher_SeekTo; + thiz->GetPosition = IDirectFBDataBuffer_Dispatcher_GetPosition; + thiz->GetLength = IDirectFBDataBuffer_Dispatcher_GetLength; + thiz->WaitForData = IDirectFBDataBuffer_Dispatcher_WaitForData; + thiz->WaitForDataWithTimeout = IDirectFBDataBuffer_Dispatcher_WaitForDataWithTimeout; + thiz->GetData = IDirectFBDataBuffer_Dispatcher_GetData; + thiz->PeekData = IDirectFBDataBuffer_Dispatcher_PeekData; + thiz->HasData = IDirectFBDataBuffer_Dispatcher_HasData; + thiz->PutData = IDirectFBDataBuffer_Dispatcher_PutData; + thiz->CreateImageProvider = IDirectFBDataBuffer_Dispatcher_CreateImageProvider; + thiz->CreateVideoProvider = IDirectFBDataBuffer_Dispatcher_CreateVideoProvider; + thiz->CreateFont = IDirectFBDataBuffer_Dispatcher_CreateFont; + + return DFB_OK; +} + diff --git a/Source/DirectFB/proxy/dispatcher/idirectfbdatabuffer_dispatcher.h b/Source/DirectFB/proxy/dispatcher/idirectfbdatabuffer_dispatcher.h new file mode 100755 index 0000000..c9b8c24 --- /dev/null +++ b/Source/DirectFB/proxy/dispatcher/idirectfbdatabuffer_dispatcher.h @@ -0,0 +1,47 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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 __IDIRECTFBDATABUFFER_DISPATCHER_H__ +#define __IDIRECTFBDATABUFFER_DISPATCHER_H__ + +#define IDIRECTFBDATABUFFER_METHOD_ID_AddRef 1 +#define IDIRECTFBDATABUFFER_METHOD_ID_Release 2 +#define IDIRECTFBDATABUFFER_METHOD_ID_Flush 3 +#define IDIRECTFBDATABUFFER_METHOD_ID_Finish 4 +#define IDIRECTFBDATABUFFER_METHOD_ID_SeekTo 5 +#define IDIRECTFBDATABUFFER_METHOD_ID_GetPosition 6 +#define IDIRECTFBDATABUFFER_METHOD_ID_GetLength 7 +#define IDIRECTFBDATABUFFER_METHOD_ID_WaitForData 8 +#define IDIRECTFBDATABUFFER_METHOD_ID_WaitForDataWithTimeout 9 +#define IDIRECTFBDATABUFFER_METHOD_ID_GetData 10 +#define IDIRECTFBDATABUFFER_METHOD_ID_PeekData 11 +#define IDIRECTFBDATABUFFER_METHOD_ID_HasData 12 +#define IDIRECTFBDATABUFFER_METHOD_ID_PutData 13 +#define IDIRECTFBDATABUFFER_METHOD_ID_CreateImageProvider 14 + +#endif diff --git a/Source/DirectFB/proxy/dispatcher/idirectfbdisplaylayer_dispatcher.c b/Source/DirectFB/proxy/dispatcher/idirectfbdisplaylayer_dispatcher.c new file mode 100755 index 0000000..16c41d4 --- /dev/null +++ b/Source/DirectFB/proxy/dispatcher/idirectfbdisplaylayer_dispatcher.c @@ -0,0 +1,900 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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. +*/ + +#include + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "idirectfbdisplaylayer_dispatcher.h" + + +static DFBResult Probe( void ); +static DFBResult Construct( IDirectFBDisplayLayer *thiz, + IDirectFBDisplayLayer *real, + VoodooManager *manager, + VoodooInstanceID super, + void *arg, + VoodooInstanceID *ret_instance ); + +#include + +DIRECT_INTERFACE_IMPLEMENTATION( IDirectFBDisplayLayer, Dispatcher ) + + +/**************************************************************************************************/ + +static void +IDirectFBDisplayLayer_Dispatcher_Destruct( IDirectFBDisplayLayer *thiz ) +{ + IDirectFBDisplayLayer_Dispatcher_data *data = thiz->priv; + + D_DEBUG( "%s (%p)\n", __FUNCTION__, thiz ); + + data->real->Release( data->real ); + + DIRECT_DEALLOCATE_INTERFACE( thiz ); +} + +/**************************************************************************************************/ + +static DirectResult +IDirectFBDisplayLayer_Dispatcher_AddRef( IDirectFBDisplayLayer *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + data->ref++; + + return DFB_OK; +} + +static DirectResult +IDirectFBDisplayLayer_Dispatcher_Release( IDirectFBDisplayLayer *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + if (--data->ref == 0) + IDirectFBDisplayLayer_Dispatcher_Destruct( thiz ); + + return DFB_OK; +} + +static DFBResult +IDirectFBDisplayLayer_Dispatcher_GetID( IDirectFBDisplayLayer *thiz, + DFBDisplayLayerID *id ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Dispatcher_GetDescription( IDirectFBDisplayLayer *thiz, + DFBDisplayLayerDescription *desc ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Dispatcher_GetSurface( IDirectFBDisplayLayer *thiz, + IDirectFBSurface **interface_ptr ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Dispatcher_GetScreen( IDirectFBDisplayLayer *thiz, + IDirectFBScreen **interface_ptr ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Dispatcher_SetCooperativeLevel( IDirectFBDisplayLayer *thiz, + DFBDisplayLayerCooperativeLevel level ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Dispatcher_SetOpacity( IDirectFBDisplayLayer *thiz, + u8 opacity ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Dispatcher_GetCurrentOutputField( IDirectFBDisplayLayer *thiz, int *field ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Dispatcher_SetFieldParity( IDirectFBDisplayLayer *thiz, int field ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Dispatcher_SetScreenLocation( IDirectFBDisplayLayer *thiz, + float x, + float y, + float width, + float height ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Dispatcher_SetSrcColorKey( IDirectFBDisplayLayer *thiz, + u8 r, + u8 g, + u8 b ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Dispatcher_SetDstColorKey( IDirectFBDisplayLayer *thiz, + u8 r, + u8 g, + u8 b ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Dispatcher_GetLevel( IDirectFBDisplayLayer *thiz, + int *level ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Dispatcher_SetLevel( IDirectFBDisplayLayer *thiz, + int level ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Dispatcher_GetConfiguration( IDirectFBDisplayLayer *thiz, + DFBDisplayLayerConfig *config ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Dispatcher_TestConfiguration( IDirectFBDisplayLayer *thiz, + const DFBDisplayLayerConfig *config, + DFBDisplayLayerConfigFlags *failed ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Dispatcher_SetConfiguration( IDirectFBDisplayLayer *thiz, + const DFBDisplayLayerConfig *config ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Dispatcher_SetBackgroundMode( IDirectFBDisplayLayer *thiz, + DFBDisplayLayerBackgroundMode background_mode ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Dispatcher_SetBackgroundImage( IDirectFBDisplayLayer *thiz, + IDirectFBSurface *surface ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Dispatcher_SetBackgroundColor( IDirectFBDisplayLayer *thiz, + u8 r, u8 g, u8 b, u8 a ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Dispatcher_CreateWindow( IDirectFBDisplayLayer *thiz, + const DFBWindowDescription *desc, + IDirectFBWindow **window ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Dispatcher_GetWindow( IDirectFBDisplayLayer *thiz, + DFBWindowID id, + IDirectFBWindow **window ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Dispatcher_EnableCursor( IDirectFBDisplayLayer *thiz, int enable ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Dispatcher_GetCursorPosition( IDirectFBDisplayLayer *thiz, + int *x, int *y ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Dispatcher_WarpCursor( IDirectFBDisplayLayer *thiz, int x, int y ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Dispatcher_SetCursorAcceleration( IDirectFBDisplayLayer *thiz, + int numerator, + int denominator, + int threshold ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Dispatcher_SetCursorShape( IDirectFBDisplayLayer *thiz, + IDirectFBSurface *shape, + int hot_x, + int hot_y ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Dispatcher_SetCursorOpacity( IDirectFBDisplayLayer *thiz, + u8 opacity ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Dispatcher_GetColorAdjustment( IDirectFBDisplayLayer *thiz, + DFBColorAdjustment *adj ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Dispatcher_SetColorAdjustment( IDirectFBDisplayLayer *thiz, + const DFBColorAdjustment *adj ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Dispatcher_WaitForSync( IDirectFBDisplayLayer *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +/**************************************************************************************************/ + +static DirectResult +Dispatch_Release( IDirectFBDisplayLayer *thiz, IDirectFBDisplayLayer *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + return voodoo_manager_unregister_local( manager, data->self ); +} + +static DirectResult +Dispatch_GetID( IDirectFBDisplayLayer *thiz, IDirectFBDisplayLayer *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + DFBDisplayLayerID id; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + ret = real->GetID( real, &id ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_ID, id, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetScreen( IDirectFBDisplayLayer *thiz, IDirectFBDisplayLayer *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + IDirectFBScreen *screen; + VoodooInstanceID instance; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + ret = real->GetScreen( real, &screen ); + if (ret) + return ret; + + ret = voodoo_construct_dispatcher( manager, "IDirectFBScreen", + screen, data->super, NULL, &instance, NULL ); + if (ret) { + screen->Release( screen ); + return ret; + } + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, instance, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetConfiguration( IDirectFBDisplayLayer *thiz, IDirectFBDisplayLayer *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + DFBDisplayLayerConfig config; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + ret = real->GetConfiguration( real, &config ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_DATA, sizeof(DFBDisplayLayerConfig), &config, + VMBT_NONE ); +} + +static DirectResult +Dispatch_TestConfiguration( IDirectFBDisplayLayer *thiz, IDirectFBDisplayLayer *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + const DFBDisplayLayerConfig *config; + VoodooMessageParser parser; + DFBDisplayLayerConfigFlags failed; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_DATA( parser, config ); + VOODOO_PARSER_END( parser ); + + ret = real->TestConfiguration( real, config, &failed ); + + return voodoo_manager_respond( manager, true, msg->header.serial, + ret, VOODOO_INSTANCE_NONE, + VMBT_UINT, failed, + VMBT_NONE ); +} + +static DirectResult +Dispatch_SetCooperativeLevel( IDirectFBDisplayLayer *thiz, IDirectFBDisplayLayer *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + VoodooMessageParser parser; + DFBDisplayLayerCooperativeLevel level; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_UINT( parser, level ); + VOODOO_PARSER_END( parser ); + + ret = real->SetCooperativeLevel( real, level ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_NONE ); +} + +static DirectResult +Dispatch_CreateWindow( IDirectFBDisplayLayer *thiz, IDirectFBDisplayLayer *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + const DFBWindowDescription *desc; + IDirectFBWindow *window; + VoodooInstanceID instance; + VoodooMessageParser parser; + bool force_system = (voodoo_config->resource_id != 0); + + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_DATA( parser, desc ); + VOODOO_PARSER_END( parser ); + + if (1) { + unsigned int w = 256, h = 256, b = 2, size; + + if (desc->flags & DWDESC_WIDTH) + w = desc->width; + + if (desc->flags & DWDESC_HEIGHT) + h = desc->height; + + if (desc->flags & DWDESC_PIXELFORMAT) + b = DFB_BYTES_PER_PIXEL( desc->pixelformat ) ? DFB_BYTES_PER_PIXEL( desc->pixelformat ) : 2; + + size = w * h * b; + + D_INFO( "Checking creation of %u kB window\n", size / 1024 ); + + if (voodoo_config->surface_max && voodoo_config->surface_max < size) { + D_ERROR( "Allocation of %u kB window not permitted (limit %u kB)\n", + size / 1024, voodoo_config->surface_max / 1024 ); + return DR_LIMITEXCEEDED; + } + + ret = voodoo_manager_check_allocation( manager, size ); + if (ret) { + D_ERROR( "Allocation not permitted!\n" ); + return ret; + } + } + + if (voodoo_config->resource_id) { + if (desc->flags & DWDESC_RESOURCE_ID) { + if (desc->resource_id == voodoo_config->resource_id) { + force_system = false; + } + } + } + + if (force_system) { + DFBWindowDescription wd = *desc; + + if (wd.flags & DWDESC_SURFACE_CAPS) { + wd.surface_caps &= ~DSCAPS_VIDEOONLY; + wd.surface_caps |= DSCAPS_SYSTEMONLY; + } + else { + wd.flags |= DWDESC_SURFACE_CAPS; + wd.surface_caps = DSCAPS_SYSTEMONLY; + } + + if (wd.flags & DWDESC_STACKING) { + if (voodoo_config->stacking_mask && !(voodoo_config->stacking_mask & (1 << wd.stacking))) { + D_ERROR( "Stacking class not permitted!\n" ); + return DR_ACCESSDENIED; + } + } + + ret = real->CreateWindow( real, &wd, &window ); + } + else { + ret = real->CreateWindow( real, desc, &window ); + } + if (ret) + return ret; + + ret = voodoo_construct_dispatcher( manager, "IDirectFBWindow", + window, data->super, NULL, &instance, NULL ); + if (ret) { + window->Release( window ); + return ret; + } + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, instance, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetWindow( IDirectFBDisplayLayer *thiz, IDirectFBDisplayLayer *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + DFBWindowID id; + IDirectFBWindow *window; + VoodooInstanceID instance; + VoodooMessageParser parser; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_ID( parser, id ); + VOODOO_PARSER_END( parser ); + + ret = real->GetWindow( real, id, &window ); + if (ret) + return ret; + + ret = voodoo_construct_dispatcher( manager, "IDirectFBWindow", + window, data->super, NULL, &instance, NULL ); + if (ret) { + window->Release( window ); + return ret; + } + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, instance, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetWindowByResourceID( IDirectFBDisplayLayer *thiz, IDirectFBDisplayLayer *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + DFBWindowID id; + IDirectFBWindow *window; + VoodooInstanceID instance; + VoodooMessageParser parser; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_ID( parser, id ); + VOODOO_PARSER_END( parser ); + + ret = real->GetWindowByResourceID( real, id, &window ); + if (ret) + return ret; + + ret = voodoo_construct_dispatcher( manager, "IDirectFBWindow", + window, data->super, NULL, &instance, NULL ); + if (ret) { + window->Release( window ); + return ret; + } + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, instance, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetRotation( IDirectFBDisplayLayer *thiz, IDirectFBDisplayLayer *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + int rotation; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + ret = real->GetRotation( real, &rotation ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DR_OK, VOODOO_INSTANCE_NONE, + VMBT_INT, rotation, + VMBT_NONE ); +} + +static DirectResult +Dispatch_SetBackgroundMode( IDirectFBDisplayLayer *thiz, IDirectFBDisplayLayer *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + VoodooMessageParser parser; + DFBDisplayLayerBackgroundMode background_mode; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_INT( parser, background_mode ); + VOODOO_PARSER_END( parser ); + + real->SetBackgroundMode( real, background_mode ); + + return DFB_OK; +} + +static DirectResult +Dispatch_SetBackgroundImage( IDirectFBDisplayLayer *thiz, IDirectFBDisplayLayer *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + VoodooMessageParser parser; + VoodooInstanceID instance; + void *surface; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_ID( parser, instance ); + VOODOO_PARSER_END( parser ); + + ret = voodoo_manager_lookup_local( manager, instance, NULL, &surface ); + if (ret) + return ret; + + real->SetBackgroundImage( real, surface ); + + return DFB_OK; +} + +static DirectResult +Dispatch( void *dispatcher, void *real, VoodooManager *manager, VoodooRequestMessage *msg ) +{ + D_DEBUG( "IDirectFBDisplayLayer/Dispatcher: " + "Handling request for instance %u with method %u...\n", msg->instance, msg->method ); + + switch (msg->method) { + case IDIRECTFBDISPLAYLAYER_METHOD_ID_Release: + return Dispatch_Release( dispatcher, real, manager, msg ); + + case IDIRECTFBDISPLAYLAYER_METHOD_ID_GetID: + return Dispatch_GetID( dispatcher, real, manager, msg ); + + case IDIRECTFBDISPLAYLAYER_METHOD_ID_GetScreen: + return Dispatch_GetScreen( dispatcher, real, manager, msg ); + + case IDIRECTFBDISPLAYLAYER_METHOD_ID_SetCooperativeLevel: + return Dispatch_SetCooperativeLevel( dispatcher, real, manager, msg ); + + case IDIRECTFBDISPLAYLAYER_METHOD_ID_GetConfiguration: + return Dispatch_GetConfiguration( dispatcher, real, manager, msg ); + + case IDIRECTFBDISPLAYLAYER_METHOD_ID_TestConfiguration: + return Dispatch_TestConfiguration( dispatcher, real, manager, msg ); + + case IDIRECTFBDISPLAYLAYER_METHOD_ID_CreateWindow: + return Dispatch_CreateWindow( dispatcher, real, manager, msg ); + + case IDIRECTFBDISPLAYLAYER_METHOD_ID_GetWindow: + return Dispatch_GetWindow( dispatcher, real, manager, msg ); + + case IDIRECTFBDISPLAYLAYER_METHOD_ID_GetWindowByResourceID: + return Dispatch_GetWindowByResourceID( dispatcher, real, manager, msg ); + + case IDIRECTFBDISPLAYLAYER_METHOD_ID_GetRotation: + return Dispatch_GetRotation( dispatcher, real, manager, msg ); + + case IDIRECTFBDISPLAYLAYER_METHOD_ID_SetBackgroundMode: + return Dispatch_SetBackgroundMode( dispatcher, real, manager, msg ); + + case IDIRECTFBDISPLAYLAYER_METHOD_ID_SetBackgroundImage: + return Dispatch_SetBackgroundImage( dispatcher, real, manager, msg ); + } + + return DFB_NOSUCHMETHOD; +} + +/**************************************************************************************************/ + +static DFBResult +Probe() +{ + /* This implementation has to be loaded explicitly. */ + return DFB_UNSUPPORTED; +} + +static DFBResult +Construct( IDirectFBDisplayLayer *thiz, /* Dispatcher interface */ + IDirectFBDisplayLayer *real, /* Real interface implementation */ + VoodooManager *manager, /* Manager of the Voodoo framework */ + VoodooInstanceID super, /* Instance ID of the super interface */ + void *arg, /* Optional arguments to constructor */ + VoodooInstanceID *ret_instance ) +{ + DFBResult ret; + VoodooInstanceID instance; + + DIRECT_ALLOCATE_INTERFACE_DATA(thiz, IDirectFBDisplayLayer_Dispatcher) + + D_ASSERT( real != NULL ); + D_ASSERT( manager != NULL ); + D_ASSERT( super != VOODOO_INSTANCE_NONE ); + D_ASSERT( ret_instance != NULL ); + + /* Register the dispatcher, getting a new instance ID that refers to it. */ + ret = voodoo_manager_register_local( manager, super, thiz, real, Dispatch, &instance ); + if (ret) { + DIRECT_DEALLOCATE_INTERFACE( thiz ); + return ret; + } + + /* Return the new instance. */ + *ret_instance = instance; + + /* Initialize interface data. */ + data->ref = 1; + data->real = real; + data->self = instance; + data->super = super; + + /* Initialize interface methods. */ + thiz->AddRef = IDirectFBDisplayLayer_Dispatcher_AddRef; + thiz->Release = IDirectFBDisplayLayer_Dispatcher_Release; + thiz->GetID = IDirectFBDisplayLayer_Dispatcher_GetID; + thiz->GetDescription = IDirectFBDisplayLayer_Dispatcher_GetDescription; + thiz->GetSurface = IDirectFBDisplayLayer_Dispatcher_GetSurface; + thiz->GetScreen = IDirectFBDisplayLayer_Dispatcher_GetScreen; + thiz->SetCooperativeLevel = IDirectFBDisplayLayer_Dispatcher_SetCooperativeLevel; + thiz->SetOpacity = IDirectFBDisplayLayer_Dispatcher_SetOpacity; + thiz->GetCurrentOutputField = IDirectFBDisplayLayer_Dispatcher_GetCurrentOutputField; + thiz->SetScreenLocation = IDirectFBDisplayLayer_Dispatcher_SetScreenLocation; + thiz->SetSrcColorKey = IDirectFBDisplayLayer_Dispatcher_SetSrcColorKey; + thiz->SetDstColorKey = IDirectFBDisplayLayer_Dispatcher_SetDstColorKey; + thiz->GetLevel = IDirectFBDisplayLayer_Dispatcher_GetLevel; + thiz->SetLevel = IDirectFBDisplayLayer_Dispatcher_SetLevel; + thiz->GetConfiguration = IDirectFBDisplayLayer_Dispatcher_GetConfiguration; + thiz->TestConfiguration = IDirectFBDisplayLayer_Dispatcher_TestConfiguration; + thiz->SetConfiguration = IDirectFBDisplayLayer_Dispatcher_SetConfiguration; + thiz->SetBackgroundMode = IDirectFBDisplayLayer_Dispatcher_SetBackgroundMode; + thiz->SetBackgroundColor = IDirectFBDisplayLayer_Dispatcher_SetBackgroundColor; + thiz->SetBackgroundImage = IDirectFBDisplayLayer_Dispatcher_SetBackgroundImage; + thiz->GetColorAdjustment = IDirectFBDisplayLayer_Dispatcher_GetColorAdjustment; + thiz->SetColorAdjustment = IDirectFBDisplayLayer_Dispatcher_SetColorAdjustment; + thiz->CreateWindow = IDirectFBDisplayLayer_Dispatcher_CreateWindow; + thiz->GetWindow = IDirectFBDisplayLayer_Dispatcher_GetWindow; + thiz->WarpCursor = IDirectFBDisplayLayer_Dispatcher_WarpCursor; + thiz->SetCursorAcceleration = IDirectFBDisplayLayer_Dispatcher_SetCursorAcceleration; + thiz->EnableCursor = IDirectFBDisplayLayer_Dispatcher_EnableCursor; + thiz->GetCursorPosition = IDirectFBDisplayLayer_Dispatcher_GetCursorPosition; + thiz->SetCursorShape = IDirectFBDisplayLayer_Dispatcher_SetCursorShape; + thiz->SetCursorOpacity = IDirectFBDisplayLayer_Dispatcher_SetCursorOpacity; + thiz->SetFieldParity = IDirectFBDisplayLayer_Dispatcher_SetFieldParity; + thiz->WaitForSync = IDirectFBDisplayLayer_Dispatcher_WaitForSync; + + return DFB_OK; +} + diff --git a/Source/DirectFB/proxy/dispatcher/idirectfbdisplaylayer_dispatcher.h b/Source/DirectFB/proxy/dispatcher/idirectfbdisplaylayer_dispatcher.h new file mode 100755 index 0000000..6808a14 --- /dev/null +++ b/Source/DirectFB/proxy/dispatcher/idirectfbdisplaylayer_dispatcher.h @@ -0,0 +1,79 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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 __IDIRECTFBDISPLAYLAYER_DISPATCHER_H__ +#define __IDIRECTFBDISPLAYLAYER_DISPATCHER_H__ + +#define IDIRECTFBDISPLAYLAYER_METHOD_ID_AddRef 1 +#define IDIRECTFBDISPLAYLAYER_METHOD_ID_Release 2 +#define IDIRECTFBDISPLAYLAYER_METHOD_ID_GetID 3 +#define IDIRECTFBDISPLAYLAYER_METHOD_ID_GetDescription 4 +#define IDIRECTFBDISPLAYLAYER_METHOD_ID_GetSurface 5 +#define IDIRECTFBDISPLAYLAYER_METHOD_ID_GetScreen 6 +#define IDIRECTFBDISPLAYLAYER_METHOD_ID_SetCooperativeLevel 7 +#define IDIRECTFBDISPLAYLAYER_METHOD_ID_SetOpacity 8 +#define IDIRECTFBDISPLAYLAYER_METHOD_ID_GetCurrentOutputField 9 +#define IDIRECTFBDISPLAYLAYER_METHOD_ID_SetScreenLocation 10 +#define IDIRECTFBDISPLAYLAYER_METHOD_ID_SetSrcColorKey 11 +#define IDIRECTFBDISPLAYLAYER_METHOD_ID_SetDstColorKey 12 +#define IDIRECTFBDISPLAYLAYER_METHOD_ID_GetLevel 13 +#define IDIRECTFBDISPLAYLAYER_METHOD_ID_SetLevel 14 +#define IDIRECTFBDISPLAYLAYER_METHOD_ID_GetConfiguration 15 +#define IDIRECTFBDISPLAYLAYER_METHOD_ID_TestConfiguration 16 +#define IDIRECTFBDISPLAYLAYER_METHOD_ID_SetConfiguration 17 +#define IDIRECTFBDISPLAYLAYER_METHOD_ID_SetBackgroundMode 18 +#define IDIRECTFBDISPLAYLAYER_METHOD_ID_SetBackgroundColor 19 +#define IDIRECTFBDISPLAYLAYER_METHOD_ID_SetBackgroundImage 20 +#define IDIRECTFBDISPLAYLAYER_METHOD_ID_GetColorAdjustment 21 +#define IDIRECTFBDISPLAYLAYER_METHOD_ID_SetColorAdjustment 22 +#define IDIRECTFBDISPLAYLAYER_METHOD_ID_CreateWindow 23 +#define IDIRECTFBDISPLAYLAYER_METHOD_ID_GetWindow 24 +#define IDIRECTFBDISPLAYLAYER_METHOD_ID_WarpCursor 25 +#define IDIRECTFBDISPLAYLAYER_METHOD_ID_SetCursorAcceleration 26 +#define IDIRECTFBDISPLAYLAYER_METHOD_ID_EnableCursor 27 +#define IDIRECTFBDISPLAYLAYER_METHOD_ID_GetCursorPosition 28 +#define IDIRECTFBDISPLAYLAYER_METHOD_ID_SetCursorShape 29 +#define IDIRECTFBDISPLAYLAYER_METHOD_ID_SetCursorOpacity 30 +#define IDIRECTFBDISPLAYLAYER_METHOD_ID_SetFieldParity 31 +#define IDIRECTFBDISPLAYLAYER_METHOD_ID_WaitForSync 32 +#define IDIRECTFBDISPLAYLAYER_METHOD_ID_GetWindowByResourceID 33 +#define IDIRECTFBDISPLAYLAYER_METHOD_ID_GetRotation 34 + +/* + * private data struct of IDirectFBDisplayLayer_Dispatcher + */ +typedef struct { + int ref; /* reference counter */ + + IDirectFBDisplayLayer *real; + + VoodooInstanceID self; + VoodooInstanceID super; +} IDirectFBDisplayLayer_Dispatcher_data; + +#endif diff --git a/Source/DirectFB/proxy/dispatcher/idirectfbeventbuffer_dispatcher.c b/Source/DirectFB/proxy/dispatcher/idirectfbeventbuffer_dispatcher.c new file mode 100755 index 0000000..6a406aa --- /dev/null +++ b/Source/DirectFB/proxy/dispatcher/idirectfbeventbuffer_dispatcher.c @@ -0,0 +1,272 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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. +*/ + +#include + +#include +#include + +#include +#include + +#include + +#include +#include +#include +#include + +#include +#include + +#include "idirectfbeventbuffer_dispatcher.h" + +static DFBResult Probe( void ); +static DFBResult Construct( IDirectFBEventBuffer *thiz, + IDirectFBEventBuffer *real, + VoodooManager *manager, + VoodooInstanceID super, + void *arg, + VoodooInstanceID *ret_instance ); + +#include + +DIRECT_INTERFACE_IMPLEMENTATION( IDirectFBEventBuffer, Dispatcher ) + + +/**************************************************************************************************/ + +static void +IDirectFBEventBuffer_Dispatcher_Destruct( IDirectFBEventBuffer *thiz ) +{ + IDirectFBEventBuffer_Dispatcher_data *data = thiz->priv; + + D_DEBUG( "%s (%p)\n", __FUNCTION__, thiz ); + + data->real->Release( data->real ); + + DIRECT_DEALLOCATE_INTERFACE( thiz ); +} + +/**************************************************************************************************/ + +static DirectResult +IDirectFBEventBuffer_Dispatcher_AddRef( IDirectFBEventBuffer *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBEventBuffer_Dispatcher) + + data->ref++; + + return DFB_OK; +} + +static DirectResult +IDirectFBEventBuffer_Dispatcher_Release( IDirectFBEventBuffer *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBEventBuffer_Dispatcher) + + if (--data->ref == 0) + IDirectFBEventBuffer_Dispatcher_Destruct( thiz ); + + return DFB_OK; +} + +static DFBResult +IDirectFBEventBuffer_Dispatcher_Reset( IDirectFBEventBuffer *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBEventBuffer_Dispatcher) + + return data->real->Reset( data->real ); +} + +static DFBResult +IDirectFBEventBuffer_Dispatcher_WaitForEvent( IDirectFBEventBuffer *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBEventBuffer_Dispatcher) + + return data->real->WaitForEvent( data->real ); +} + +static DFBResult +IDirectFBEventBuffer_Dispatcher_WaitForEventWithTimeout( IDirectFBEventBuffer *thiz, + unsigned int seconds, + unsigned int milli_seconds ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBEventBuffer_Dispatcher) + + return data->real->WaitForEventWithTimeout( data->real, seconds, milli_seconds ); +} + +static DFBResult +IDirectFBEventBuffer_Dispatcher_WakeUp( IDirectFBEventBuffer *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBEventBuffer_Dispatcher) + + return data->real->WakeUp( data->real ); +} + +static DFBResult +IDirectFBEventBuffer_Dispatcher_GetEvent( IDirectFBEventBuffer *thiz, + DFBEvent *event ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBEventBuffer_Dispatcher) + + return data->real->GetEvent( data->real, event ); +} + +static DFBResult +IDirectFBEventBuffer_Dispatcher_PeekEvent( IDirectFBEventBuffer *thiz, + DFBEvent *event ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBEventBuffer_Dispatcher) + + return data->real->PeekEvent( data->real, event ); +} + +static DFBResult +IDirectFBEventBuffer_Dispatcher_HasEvent( IDirectFBEventBuffer *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBEventBuffer_Dispatcher) + + return data->real->HasEvent( data->real ); +} + +static DFBResult +IDirectFBEventBuffer_Dispatcher_PostEvent( IDirectFBEventBuffer *thiz, + const DFBEvent *event ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBEventBuffer_Dispatcher) + + return data->real->PostEvent( data->real, event ); +} + +static DFBResult +IDirectFBEventBuffer_Dispatcher_CreateFileDescriptor( IDirectFBEventBuffer *thiz, + int *fd ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBEventBuffer_Dispatcher) + + return data->real->CreateFileDescriptor( data->real, fd ); +} + +/**************************************************************************************************/ + +static DirectResult +Dispatch_Release( IDirectFBEventBuffer *thiz, IDirectFBEventBuffer *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBEventBuffer_Dispatcher) + + return voodoo_manager_unregister_local( manager, data->self ); +} + +static DirectResult +Dispatch_PostEvent( IDirectFBEventBuffer *thiz, IDirectFBEventBuffer *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + const DFBEvent *event; + VoodooMessageParser parser; + + DIRECT_INTERFACE_GET_DATA(IDirectFBEventBuffer_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_DATA( parser, event ); + VOODOO_PARSER_END( parser ); + + real->PostEvent( real, event ); + + return DFB_OK; +} + +static DirectResult +Dispatch( void *dispatcher, void *real, VoodooManager *manager, VoodooRequestMessage *msg ) +{ + D_DEBUG( "IDirectFBEventBuffer/Dispatcher: " + "Handling request for instance %u with method %u...\n", msg->instance, msg->method ); + + switch (msg->method) { + case IDIRECTFBEVENTBUFFER_METHOD_ID_Release: + return Dispatch_Release( dispatcher, real, manager, msg ); + + case IDIRECTFBEVENTBUFFER_METHOD_ID_PostEvent: + return Dispatch_PostEvent( dispatcher, real, manager, msg ); + } + + return DFB_NOSUCHMETHOD; +} + +/**************************************************************************************************/ + +static DFBResult +Probe() +{ + /* This implementation has to be loaded explicitly. */ + return DFB_UNSUPPORTED; +} + +static DFBResult +Construct( IDirectFBEventBuffer *thiz, + IDirectFBEventBuffer *real, + VoodooManager *manager, + VoodooInstanceID super, + void *arg, /* Optional arguments to constructor */ + VoodooInstanceID *ret_instance ) +{ + DFBResult ret; + VoodooInstanceID instance; + + DIRECT_ALLOCATE_INTERFACE_DATA(thiz, IDirectFBEventBuffer_Dispatcher) + + ret = voodoo_manager_register_local( manager, VOODOO_INSTANCE_NONE, thiz, real, Dispatch, &instance ); + if (ret) { + DIRECT_DEALLOCATE_INTERFACE( thiz ); + return ret; + } + + *ret_instance = instance; + + data->real = real; + data->self = instance; + data->super = super; + data->manager = manager; + + thiz->AddRef = IDirectFBEventBuffer_Dispatcher_AddRef; + thiz->Release = IDirectFBEventBuffer_Dispatcher_Release; + thiz->Reset = IDirectFBEventBuffer_Dispatcher_Reset; + thiz->WaitForEvent = IDirectFBEventBuffer_Dispatcher_WaitForEvent; + thiz->WaitForEventWithTimeout = IDirectFBEventBuffer_Dispatcher_WaitForEventWithTimeout; + thiz->GetEvent = IDirectFBEventBuffer_Dispatcher_GetEvent; + thiz->PeekEvent = IDirectFBEventBuffer_Dispatcher_PeekEvent; + thiz->HasEvent = IDirectFBEventBuffer_Dispatcher_HasEvent; + thiz->PostEvent = IDirectFBEventBuffer_Dispatcher_PostEvent; + thiz->WakeUp = IDirectFBEventBuffer_Dispatcher_WakeUp; + thiz->CreateFileDescriptor = IDirectFBEventBuffer_Dispatcher_CreateFileDescriptor; + + return DFB_OK; +} + diff --git a/Source/DirectFB/proxy/dispatcher/idirectfbeventbuffer_dispatcher.h b/Source/DirectFB/proxy/dispatcher/idirectfbeventbuffer_dispatcher.h new file mode 100755 index 0000000..b4aab95 --- /dev/null +++ b/Source/DirectFB/proxy/dispatcher/idirectfbeventbuffer_dispatcher.h @@ -0,0 +1,63 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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 __IDIRECTFBEVENTBUFFER_DISPATCHER_H__ +#define __IDIRECTFBEVENTBUFFER_DISPATCHER_H__ + +#include + +#include + +#define IDIRECTFBEVENTBUFFER_METHOD_ID_AddRef 1 +#define IDIRECTFBEVENTBUFFER_METHOD_ID_Release 2 +#define IDIRECTFBEVENTBUFFER_METHOD_ID_Reset 3 +#define IDIRECTFBEVENTBUFFER_METHOD_ID_WaitForEvent 4 +#define IDIRECTFBEVENTBUFFER_METHOD_ID_WaitForEventWithTimeout 5 +#define IDIRECTFBEVENTBUFFER_METHOD_ID_GetEvent 6 +#define IDIRECTFBEVENTBUFFER_METHOD_ID_PeekEvent 7 +#define IDIRECTFBEVENTBUFFER_METHOD_ID_HasEvent 8 +#define IDIRECTFBEVENTBUFFER_METHOD_ID_PostEvent 9 +#define IDIRECTFBEVENTBUFFER_METHOD_ID_WakeUp 10 +#define IDIRECTFBEVENTBUFFER_METHOD_ID_CreateFileDescriptor 11 + +/* + * private data struct of IDirectFBEventBuffer_Dispatcher + */ +typedef struct { + int ref; /* reference counter */ + + IDirectFBEventBuffer *real; + + VoodooInstanceID self; /* The instance of this dispatcher itself. */ + VoodooInstanceID super; /* The instance of the super interface. */ + + VoodooManager *manager; +} IDirectFBEventBuffer_Dispatcher_data; + + +#endif diff --git a/Source/DirectFB/proxy/dispatcher/idirectfbfont_dispatcher.c b/Source/DirectFB/proxy/dispatcher/idirectfbfont_dispatcher.c new file mode 100755 index 0000000..bdb2045 --- /dev/null +++ b/Source/DirectFB/proxy/dispatcher/idirectfbfont_dispatcher.c @@ -0,0 +1,532 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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. +*/ + +#include + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "idirectfbfont_dispatcher.h" + + +static DFBResult Probe( void ); +static DFBResult Construct( IDirectFBFont *thiz, + IDirectFBFont *real, + VoodooManager *manager, + VoodooInstanceID super, + void *arg, + VoodooInstanceID *ret_instance ); + +#include + +DIRECT_INTERFACE_IMPLEMENTATION( IDirectFBFont, Dispatcher ) + + +/**************************************************************************************************/ + +/* + * private data struct of IDirectFBFont_Dispatcher + */ +typedef struct { + int ref; /* reference counter */ + + IDirectFBFont *real; + + VoodooInstanceID self; +} IDirectFBFont_Dispatcher_data; + +/**************************************************************************************************/ + +static void +IDirectFBFont_Dispatcher_Destruct( IDirectFBFont *thiz ) +{ + IDirectFBFont_Dispatcher_data *data = thiz->priv; + + D_DEBUG( "%s (%p)\n", __FUNCTION__, thiz ); + + data->real->Release( data->real ); + + DIRECT_DEALLOCATE_INTERFACE( thiz ); +} + +/**************************************************************************************************/ + +static DirectResult +IDirectFBFont_Dispatcher_AddRef( IDirectFBFont *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Dispatcher) + + data->ref++; + + return DFB_OK; +} + +static DirectResult +IDirectFBFont_Dispatcher_Release( IDirectFBFont *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Dispatcher) + + if (--data->ref == 0) + IDirectFBFont_Dispatcher_Destruct( thiz ); + + return DFB_OK; +} + +static DFBResult +IDirectFBFont_Dispatcher_GetAscender( IDirectFBFont *thiz, int *ascender ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Dispatcher) + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBFont_Dispatcher_GetDescender( IDirectFBFont *thiz, int *descender ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Dispatcher) + + if (!descender) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBFont_Dispatcher_GetHeight( IDirectFBFont *thiz, int *height ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Dispatcher) + + if (!height) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBFont_Dispatcher_GetMaxAdvance( IDirectFBFont *thiz, int *maxadvance ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Dispatcher) + + if (!maxadvance) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBFont_Dispatcher_GetKerning( IDirectFBFont *thiz, + unsigned int prev_index, unsigned int current_index, + int *kern_x, int *kern_y) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Dispatcher) + + if (!kern_x && !kern_y) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBFont_Dispatcher_GetStringExtents( IDirectFBFont *thiz, + const char *text, int bytes, + DFBRectangle *logical_rect, + DFBRectangle *ink_rect ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Dispatcher) + + if (!text || (!logical_rect && !ink_rect)) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBFont_Dispatcher_GetStringWidth( IDirectFBFont *thiz, + const char *text, int bytes, + int *width ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Dispatcher) + + if (!text || !width) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBFont_Dispatcher_GetGlyphExtents( IDirectFBFont *thiz, + unsigned int index, + DFBRectangle *rect, + int *advance ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Dispatcher) + + if (!rect && !advance) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBFont_Dispatcher_GetStringBreak( IDirectFBFont *thiz, + const char *text, + int bytes, + int max_width, + int *ret_width, + int *ret_str_length, + const char **ret_next_line ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Dispatcher) + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBFont_Dispatcher_SetEncoding( IDirectFBFont *thiz, + DFBTextEncodingID encoding ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Dispatcher) + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBFont_Dispatcher_EnumEncodings( IDirectFBFont *thiz, + DFBTextEncodingCallback callback, + void *ctx ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Dispatcher) + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBFont_Dispatcher_FindEncoding( IDirectFBFont *thiz, + const char *name, + DFBTextEncodingID *encoding ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Dispatcher) + + return DFB_UNIMPLEMENTED; +} + +/**************************************************************************************************/ + +static DirectResult +Dispatch_Release( IDirectFBFont *thiz, IDirectFBFont *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Dispatcher) + + return voodoo_manager_unregister_local( manager, data->self ); +} + +static DirectResult +Dispatch_GetAscender( IDirectFBFont *thiz, IDirectFBFont *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + int ascender; + + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Dispatcher) + + ret = real->GetAscender( real, &ascender ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_INT, ascender, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetDescender( IDirectFBFont *thiz, IDirectFBFont *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + int descender; + + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Dispatcher) + + ret = real->GetDescender( real, &descender ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_INT, descender, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetHeight( IDirectFBFont *thiz, IDirectFBFont *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + int height; + + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Dispatcher) + + ret = real->GetHeight( real, &height ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_INT, height, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetMaxAdvance( IDirectFBFont *thiz, IDirectFBFont *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + int max_advance; + + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Dispatcher) + + ret = real->GetMaxAdvance( real, &max_advance ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_INT, max_advance, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetKerning( IDirectFBFont *thiz, IDirectFBFont *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + VoodooMessageParser parser; + unsigned int prev; + unsigned int next; + int kern_x; + int kern_y; + + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_UINT( parser, prev ); + VOODOO_PARSER_GET_UINT( parser, next ); + VOODOO_PARSER_END( parser ); + + ret = real->GetKerning( real, prev, next, &kern_x, &kern_y ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_INT, kern_x, + VMBT_INT, kern_y, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetStringWidth( IDirectFBFont *thiz, IDirectFBFont *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + VoodooMessageParser parser; + const char *text; + int bytes; + int width; + + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_DATA( parser, text ); + VOODOO_PARSER_GET_INT( parser, bytes ); + VOODOO_PARSER_END( parser ); + + ret = real->GetStringWidth( real, text, bytes, &width ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_INT, width, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetStringExtents( IDirectFBFont *thiz, IDirectFBFont *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + VoodooMessageParser parser; + const char *text; + int bytes; + DFBRectangle logical; + DFBRectangle ink; + + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_DATA( parser, text ); + VOODOO_PARSER_GET_INT( parser, bytes ); + VOODOO_PARSER_END( parser ); + + ret = real->GetStringExtents( real, text, bytes, &logical, &ink ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_DATA, sizeof(DFBRectangle), &logical, + VMBT_DATA, sizeof(DFBRectangle), &ink, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetGlyphExtents( IDirectFBFont *thiz, IDirectFBFont *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + VoodooMessageParser parser; + unsigned int index; + DFBRectangle extents; + int advance; + + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_UINT( parser, index ); + VOODOO_PARSER_END( parser ); + + ret = real->GetGlyphExtents( real, index, &extents, &advance ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_DATA, sizeof(extents), &extents, + VMBT_INT, advance, + VMBT_NONE ); +} + +static DirectResult +Dispatch( void *dispatcher, void *real, VoodooManager *manager, VoodooRequestMessage *msg ) +{ + D_DEBUG( "IDirectFBFont/Dispatcher: " + "Handling request for instance %u with method %u...\n", msg->instance, msg->method ); + + switch (msg->method) { + case IDIRECTFBFONT_METHOD_ID_Release: + return Dispatch_Release( dispatcher, real, manager, msg ); + + case IDIRECTFBFONT_METHOD_ID_GetAscender: + return Dispatch_GetAscender( dispatcher, real, manager, msg ); + + case IDIRECTFBFONT_METHOD_ID_GetDescender: + return Dispatch_GetDescender( dispatcher, real, manager, msg ); + + case IDIRECTFBFONT_METHOD_ID_GetHeight: + return Dispatch_GetHeight( dispatcher, real, manager, msg ); + + case IDIRECTFBFONT_METHOD_ID_GetMaxAdvance: + return Dispatch_GetMaxAdvance( dispatcher, real, manager, msg ); + + case IDIRECTFBFONT_METHOD_ID_GetKerning: + return Dispatch_GetKerning( dispatcher, real, manager, msg ); + + case IDIRECTFBFONT_METHOD_ID_GetStringWidth: + return Dispatch_GetStringWidth( dispatcher, real, manager, msg ); + + case IDIRECTFBFONT_METHOD_ID_GetStringExtents: + return Dispatch_GetStringExtents( dispatcher, real, manager, msg ); + + case IDIRECTFBFONT_METHOD_ID_GetGlyphExtents: + return Dispatch_GetGlyphExtents( dispatcher, real, manager, msg ); + } + + return DFB_NOSUCHMETHOD; +} + +/**************************************************************************************************/ + +static DFBResult +Probe() +{ + /* This implementation has to be loaded explicitly. */ + return DFB_UNSUPPORTED; +} + +static DFBResult +Construct( IDirectFBFont *thiz, + IDirectFBFont *real, + VoodooManager *manager, + VoodooInstanceID super, + void *arg, /* Optional arguments to constructor */ + VoodooInstanceID *ret_instance ) +{ + DFBResult ret; + + DIRECT_ALLOCATE_INTERFACE_DATA(thiz, IDirectFBFont_Dispatcher) + + ret = voodoo_manager_register_local( manager, super, thiz, real, Dispatch, ret_instance ); + if (ret) { + DIRECT_DEALLOCATE_INTERFACE( thiz ); + return ret; + } + + data->ref = 1; + data->real = real; + data->self = *ret_instance; + + thiz->AddRef = IDirectFBFont_Dispatcher_AddRef; + thiz->Release = IDirectFBFont_Dispatcher_Release; + thiz->GetAscender = IDirectFBFont_Dispatcher_GetAscender; + thiz->GetDescender = IDirectFBFont_Dispatcher_GetDescender; + thiz->GetHeight = IDirectFBFont_Dispatcher_GetHeight; + thiz->GetMaxAdvance = IDirectFBFont_Dispatcher_GetMaxAdvance; + thiz->GetKerning = IDirectFBFont_Dispatcher_GetKerning; + thiz->GetStringWidth = IDirectFBFont_Dispatcher_GetStringWidth; + thiz->GetStringExtents = IDirectFBFont_Dispatcher_GetStringExtents; + thiz->GetGlyphExtents = IDirectFBFont_Dispatcher_GetGlyphExtents; + thiz->GetStringBreak = IDirectFBFont_Dispatcher_GetStringBreak; + thiz->SetEncoding = IDirectFBFont_Dispatcher_SetEncoding; + thiz->EnumEncodings = IDirectFBFont_Dispatcher_EnumEncodings; + thiz->FindEncoding = IDirectFBFont_Dispatcher_FindEncoding; + + return DFB_OK; +} + diff --git a/Source/DirectFB/proxy/dispatcher/idirectfbfont_dispatcher.h b/Source/DirectFB/proxy/dispatcher/idirectfbfont_dispatcher.h new file mode 100755 index 0000000..253ab3f --- /dev/null +++ b/Source/DirectFB/proxy/dispatcher/idirectfbfont_dispatcher.h @@ -0,0 +1,43 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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 __IDIRECTFBFONT_DISPATCHER_H__ +#define __IDIRECTFBFONT_DISPATCHER_H__ + +#define IDIRECTFBFONT_METHOD_ID_AddRef 1 +#define IDIRECTFBFONT_METHOD_ID_Release 2 +#define IDIRECTFBFONT_METHOD_ID_GetAscender 3 +#define IDIRECTFBFONT_METHOD_ID_GetDescender 4 +#define IDIRECTFBFONT_METHOD_ID_GetHeight 5 +#define IDIRECTFBFONT_METHOD_ID_GetMaxAdvance 6 +#define IDIRECTFBFONT_METHOD_ID_GetKerning 7 +#define IDIRECTFBFONT_METHOD_ID_GetStringWidth 8 +#define IDIRECTFBFONT_METHOD_ID_GetStringExtents 9 +#define IDIRECTFBFONT_METHOD_ID_GetGlyphExtents 10 + +#endif diff --git a/Source/DirectFB/proxy/dispatcher/idirectfbfoo_dispatcher.c b/Source/DirectFB/proxy/dispatcher/idirectfbfoo_dispatcher.c new file mode 100755 index 0000000..2d86627 --- /dev/null +++ b/Source/DirectFB/proxy/dispatcher/idirectfbfoo_dispatcher.c @@ -0,0 +1,194 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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. +*/ + +#include + +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include "idirectfbfoo_dispatcher.h" + + +static DFBResult Probe(); +static DFBResult Construct( IDirectFBFoo *thiz, + IDirectFBFoo *real, + VoodooManager *manager, + VoodooInstanceID super, + void *arg, + VoodooInstanceID *ret_instance ); + +#include + +DIRECT_INTERFACE_IMPLEMENTATION( IDirectFBFoo, Dispatcher ) + + +/**************************************************************************************************/ + +static void +IDirectFBFoo_Dispatcher_Destruct( IDirectFBFoo *thiz ) +{ + IDirectFBFoo_Dispatcher_data *data = thiz->priv; + + D_DEBUG( "%s (%p)\n", __FUNCTION__, thiz ); + + data->real->Release( data->real ); + + DIRECT_DEALLOCATE_INTERFACE( thiz ); +} + +/**************************************************************************************************/ + +static DFBResult +IDirectFBFoo_Dispatcher_AddRef( IDirectFBFoo *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBFoo_Dispatcher) + + data->ref++; + + return DFB_OK; +} + +static DFBResult +IDirectFBFoo_Dispatcher_Release( IDirectFBFoo *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBFoo_Dispatcher) + + if (--data->ref == 0) + IDirectFBFoo_Dispatcher_Destruct( thiz ); + + return DFB_OK; +} + +static DFBResult +IDirectFBFoo_Dispatcher_Bar( IDirectFBFoo *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBFoo_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +/**************************************************************************************************/ + +static DirectResult +Dispatch_Release( IDirectFBFoo *thiz, IDirectFBFoo *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBFoo_Dispatcher) + + return voodoo_manager_unregister_local( manager, data->self ); +} + +static DirectResult +Dispatch_Bar( IDirectFBFoo *thiz, IDirectFBFoo *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBFoo_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DirectResult +Dispatch( void *dispatcher, void *real, VoodooManager *manager, VoodooRequestMessage *msg ) +{ + D_DEBUG( "IDirectFBFoo/Dispatcher: " + "Handling request for instance %u with method %u...\n", msg->instance, msg->method ); + + switch (msg->method) { + case IDIRECTFBFOO_METHOD_ID_Release: + return Dispatch_Release( dispatcher, real, manager, msg ); + + case IDIRECTFBFOO_METHOD_ID_Bar: + return Dispatch_Bar( dispatcher, real, manager, msg ); + } + + return DFB_NOSUCHMETHOD; +} + +/**************************************************************************************************/ + +static DFBResult +Probe() +{ + /* This implementation has to be loaded explicitly. */ + return DFB_UNSUPPORTED; +} + +static DFBResult +Construct( IDirectFBFoo *thiz, /* Dispatcher interface */ + IDirectFBFoo *real, /* Real interface implementation */ + VoodooManager *manager, /* Manager of the Voodoo framework */ + VoodooInstanceID super, /* Instance ID of the super interface */ + void *arg, /* Optional arguments to constructor */ + VoodooInstanceID *ret_instance ) +{ + DFBResult ret; + VoodooInstanceID instance; + + DIRECT_ALLOCATE_INTERFACE_DATA(thiz, IDirectFBFoo_Dispatcher) + + D_ASSERT( real != NULL ); + D_ASSERT( manager != NULL ); + D_ASSERT( super != VOODOO_INSTANCE_NONE ); + D_ASSERT( ret_instance != NULL ); + + /* Register the dispatcher, getting a new instance ID that refers to it. */ + ret = voodoo_manager_register_local( manager, super, thiz, real, Dispatch, &instance ); + if (ret) { + DIRECT_DEALLOCATE_INTERFACE( thiz ); + return ret; + } + + /* Return the new instance. */ + *ret_instance = instance; + + /* Initialize interface data. */ + data->ref = 1; + data->real = real; + data->self = instance; + data->super = super; + + /* Initialize interface methods. */ + thiz->AddRef = IDirectFBFoo_Dispatcher_AddRef; + thiz->Release = IDirectFBFoo_Dispatcher_Release; + thiz->Bar = IDirectFBFoo_Dispatcher_Bar; + + return DFB_OK; +} + diff --git a/Source/DirectFB/proxy/dispatcher/idirectfbfoo_dispatcher.h b/Source/DirectFB/proxy/dispatcher/idirectfbfoo_dispatcher.h new file mode 100755 index 0000000..4f9e062 --- /dev/null +++ b/Source/DirectFB/proxy/dispatcher/idirectfbfoo_dispatcher.h @@ -0,0 +1,48 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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 __IDIRECTFBFOO_DISPATCHER_H__ +#define __IDIRECTFBFOO_DISPATCHER_H__ + +#define IDIRECTFBFOO_METHOD_ID_AddRef 1 +#define IDIRECTFBFOO_METHOD_ID_Release 2 +#define IDIRECTFBFOO_METHOD_ID_Bar 3 + +/* + * private data struct of IDirectFBFoo_Dispatcher + */ +typedef struct { + int ref; /* reference counter */ + + IDirectFBFoo *real; + + VoodooInstanceID self; + VoodooInstanceID super; +} IDirectFBFoo_Dispatcher_data; + +#endif diff --git a/Source/DirectFB/proxy/dispatcher/idirectfbimageprovider_dispatcher.c b/Source/DirectFB/proxy/dispatcher/idirectfbimageprovider_dispatcher.c new file mode 100755 index 0000000..b18079b --- /dev/null +++ b/Source/DirectFB/proxy/dispatcher/idirectfbimageprovider_dispatcher.c @@ -0,0 +1,296 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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. +*/ + +#include + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include "idirectfbimageprovider_dispatcher.h" + + +static DFBResult Probe( void ); +static DFBResult Construct( IDirectFBImageProvider *thiz, + IDirectFBImageProvider *real, + VoodooManager *manager, + VoodooInstanceID super, + void *arg, + VoodooInstanceID *ret_instance ); + +#include + +DIRECT_INTERFACE_IMPLEMENTATION( IDirectFBImageProvider, Dispatcher ) + + +/**************************************************************************************************/ + +/* + * private data struct of IDirectFBImageProvider_Dispatcher + */ +typedef struct { + int ref; /* reference counter */ + + IDirectFBImageProvider *real; + VoodooInstanceID self; +} IDirectFBImageProvider_Dispatcher_data; + +/**************************************************************************************************/ + +static void +IDirectFBImageProvider_Dispatcher_Destruct( IDirectFBImageProvider *thiz ) +{ + IDirectFBImageProvider_Dispatcher_data *data = thiz->priv; + + D_DEBUG( "%s (%p)\n", __FUNCTION__, thiz ); + + data->real->Release( data->real ); + + DIRECT_DEALLOCATE_INTERFACE( thiz ); +} + +/**************************************************************************************************/ + +static DirectResult +IDirectFBImageProvider_Dispatcher_AddRef( IDirectFBImageProvider *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBImageProvider_Dispatcher) + + data->ref++; + + return DFB_OK; +} + +static DirectResult +IDirectFBImageProvider_Dispatcher_Release( IDirectFBImageProvider *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBImageProvider_Dispatcher) + + if (--data->ref == 0) + IDirectFBImageProvider_Dispatcher_Destruct( thiz ); + + return DFB_OK; +} + +static DFBResult +IDirectFBImageProvider_Dispatcher_GetSurfaceDescription( IDirectFBImageProvider *thiz, + DFBSurfaceDescription *desc ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBImageProvider_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBImageProvider_Dispatcher_GetImageDescription( IDirectFBImageProvider *thiz, + DFBImageDescription *desc ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBImageProvider_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBImageProvider_Dispatcher_RenderTo( IDirectFBImageProvider *thiz, + IDirectFBSurface *destination, + const DFBRectangle *destination_rect ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBImageProvider_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBImageProvider_Dispatcher_SetRenderCallback( IDirectFBImageProvider *thiz, + DIRenderCallback callback, + void *callback_data ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBImageProvider_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +/**************************************************************************************************/ + +static DirectResult +Dispatch_Release( IDirectFBImageProvider *thiz, IDirectFBImageProvider *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBImageProvider_Dispatcher) + + return voodoo_manager_unregister_local( manager, data->self ); +} + +static DirectResult +Dispatch_GetSurfaceDescription( IDirectFBImageProvider *thiz, IDirectFBImageProvider *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + DFBSurfaceDescription desc; + + DIRECT_INTERFACE_GET_DATA(IDirectFBImageProvider_Dispatcher) + + ret = real->GetSurfaceDescription( real, &desc ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_DFBSurfaceDescription( desc ), + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetImageDescription( IDirectFBImageProvider *thiz, IDirectFBImageProvider *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + DFBImageDescription desc; + + DIRECT_INTERFACE_GET_DATA(IDirectFBImageProvider_Dispatcher) + + ret = real->GetImageDescription( real, &desc ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_DATA, sizeof(DFBImageDescription), &desc, + VMBT_NONE ); +} + +static DirectResult +Dispatch_RenderTo( IDirectFBImageProvider *thiz, IDirectFBImageProvider *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + VoodooMessageParser parser; + VoodooInstanceID instance; + const DFBRectangle *rect; + void *surface; + + DIRECT_INTERFACE_GET_DATA(IDirectFBImageProvider_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_ID( parser, instance ); + VOODOO_PARSER_GET_ODATA( parser, rect ); + VOODOO_PARSER_END( parser ); + + ret = voodoo_manager_lookup_local( manager, instance, NULL, &surface ); + if (ret) + return ret; + + ret = real->RenderTo( real, surface, rect ); + + return voodoo_manager_respond( manager, true, msg->header.serial, + ret, VOODOO_INSTANCE_NONE, + VMBT_NONE ); +} + +static DirectResult +Dispatch( void *dispatcher, void *real, VoodooManager *manager, VoodooRequestMessage *msg ) +{ + D_DEBUG( "IDirectFBImageProvider/Dispatcher: " + "Handling request for instance %u with method %u...\n", msg->instance, msg->method ); + + switch (msg->method) { + case IDIRECTFBIMAGEPROVIDER_METHOD_ID_Release: + return Dispatch_Release( dispatcher, real, manager, msg ); + + case IDIRECTFBIMAGEPROVIDER_METHOD_ID_GetSurfaceDescription: + return Dispatch_GetSurfaceDescription( dispatcher, real, manager, msg ); + + case IDIRECTFBIMAGEPROVIDER_METHOD_ID_GetImageDescription: + return Dispatch_GetImageDescription( dispatcher, real, manager, msg ); + + case IDIRECTFBIMAGEPROVIDER_METHOD_ID_RenderTo: + return Dispatch_RenderTo( dispatcher, real, manager, msg ); + } + + return DFB_NOSUCHMETHOD; +} + +/**************************************************************************************************/ + +static DFBResult +Probe() +{ + /* This implementation has to be loaded explicitly. */ + return DFB_UNSUPPORTED; +} + +static DFBResult +Construct( IDirectFBImageProvider *thiz, + IDirectFBImageProvider *real, + VoodooManager *manager, + VoodooInstanceID super, + void *arg, /* Optional arguments to constructor */ + VoodooInstanceID *ret_instance ) +{ + DFBResult ret; + + DIRECT_ALLOCATE_INTERFACE_DATA(thiz, IDirectFBImageProvider_Dispatcher) + + ret = voodoo_manager_register_local( manager, super, thiz, real, Dispatch, ret_instance ); + if (ret) { + DIRECT_DEALLOCATE_INTERFACE( thiz ); + return ret; + } + + data->ref = 1; + data->real = real; + data->self = *ret_instance; + + thiz->AddRef = IDirectFBImageProvider_Dispatcher_AddRef; + thiz->Release = IDirectFBImageProvider_Dispatcher_Release; + thiz->GetSurfaceDescription = IDirectFBImageProvider_Dispatcher_GetSurfaceDescription; + thiz->GetImageDescription = IDirectFBImageProvider_Dispatcher_GetImageDescription; + thiz->RenderTo = IDirectFBImageProvider_Dispatcher_RenderTo; + thiz->SetRenderCallback = IDirectFBImageProvider_Dispatcher_SetRenderCallback; + + return DFB_OK; +} + diff --git a/Source/DirectFB/proxy/dispatcher/idirectfbimageprovider_dispatcher.h b/Source/DirectFB/proxy/dispatcher/idirectfbimageprovider_dispatcher.h new file mode 100755 index 0000000..752bbe9 --- /dev/null +++ b/Source/DirectFB/proxy/dispatcher/idirectfbimageprovider_dispatcher.h @@ -0,0 +1,39 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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 __IDIRECTFBIMAGEPROVIDER_DISPATCHER_H__ +#define __IDIRECTFBIMAGEPROVIDER_DISPATCHER_H__ + +#define IDIRECTFBIMAGEPROVIDER_METHOD_ID_AddRef 1 +#define IDIRECTFBIMAGEPROVIDER_METHOD_ID_Release 2 +#define IDIRECTFBIMAGEPROVIDER_METHOD_ID_GetSurfaceDescription 3 +#define IDIRECTFBIMAGEPROVIDER_METHOD_ID_GetImageDescription 4 +#define IDIRECTFBIMAGEPROVIDER_METHOD_ID_RenderTo 5 +#define IDIRECTFBIMAGEPROVIDER_METHOD_ID_SetRenderCallback 6 + +#endif diff --git a/Source/DirectFB/proxy/dispatcher/idirectfbinputdevice_dispatcher.c b/Source/DirectFB/proxy/dispatcher/idirectfbinputdevice_dispatcher.c new file mode 100755 index 0000000..c363e50 --- /dev/null +++ b/Source/DirectFB/proxy/dispatcher/idirectfbinputdevice_dispatcher.c @@ -0,0 +1,635 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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. +*/ + +#include + +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include "idirectfbinputdevice_dispatcher.h" + +#include + + +static DFBResult Probe( void ); +static DFBResult Construct( IDirectFBInputDevice *thiz, + IDirectFBInputDevice *real, + VoodooManager *manager, + VoodooInstanceID super, + void *arg, + VoodooInstanceID *ret_instance ); + +#include + +DIRECT_INTERFACE_IMPLEMENTATION( IDirectFBInputDevice, Dispatcher ) + + +/**************************************************************************************************/ + +static void +IDirectFBInputDevice_Dispatcher_Destruct( IDirectFBInputDevice *thiz ) +{ + IDirectFBInputDevice_Dispatcher_data *data = thiz->priv; + + D_DEBUG( "%s (%p)\n", __FUNCTION__, thiz ); + + data->real->Release( data->real ); + + DIRECT_DEALLOCATE_INTERFACE( thiz ); +} + +/**************************************************************************************************/ + +static DirectResult +IDirectFBInputDevice_Dispatcher_AddRef( IDirectFBInputDevice *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Dispatcher) + + data->ref++; + + return DFB_OK; +} + +static DirectResult +IDirectFBInputDevice_Dispatcher_Release( IDirectFBInputDevice *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Dispatcher) + + if (--data->ref == 0) + IDirectFBInputDevice_Dispatcher_Destruct( thiz ); + + return DFB_OK; +} + +static DFBResult +IDirectFBInputDevice_Dispatcher_GetID( IDirectFBInputDevice *thiz, + DFBInputDeviceID *ret_id ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Dispatcher) + + if (!ret_id) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBInputDevice_Dispatcher_CreateEventBuffer( IDirectFBInputDevice *thiz, + IDirectFBEventBuffer **ret_interface ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBInputDevice_Dispatcher_AttachEventBuffer( IDirectFBInputDevice *thiz, + IDirectFBEventBuffer *buffer ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBInputDevice_Dispatcher_DetachEventBuffer( IDirectFBInputDevice *thiz, + IDirectFBEventBuffer *buffer ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBInputDevice_Dispatcher_GetDescription( IDirectFBInputDevice *thiz, + DFBInputDeviceDescription *ret_desc ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Dispatcher) + + if (!ret_desc) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBInputDevice_Dispatcher_GetKeymapEntry( IDirectFBInputDevice *thiz, + int keycode, + DFBInputDeviceKeymapEntry *ret_entry ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Dispatcher) + + if (!ret_entry) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBInputDevice_Dispatcher_GetKeyState( IDirectFBInputDevice *thiz, + DFBInputDeviceKeyIdentifier key_id, + DFBInputDeviceKeyState *ret_state ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Dispatcher) + + if (!ret_state) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBInputDevice_Dispatcher_GetModifiers( IDirectFBInputDevice *thiz, + DFBInputDeviceModifierMask *ret_modifiers ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Dispatcher) + + if (!ret_modifiers) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBInputDevice_Dispatcher_GetLockState( IDirectFBInputDevice *thiz, + DFBInputDeviceLockState *ret_locks ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Dispatcher) + + if (!ret_locks) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBInputDevice_Dispatcher_GetButtons( IDirectFBInputDevice *thiz, + DFBInputDeviceButtonMask *ret_buttons ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Dispatcher) + + if (!ret_buttons) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBInputDevice_Dispatcher_GetButtonState( IDirectFBInputDevice *thiz, + DFBInputDeviceButtonIdentifier button, + DFBInputDeviceButtonState *ret_state ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Dispatcher) + + if (!ret_state || (int)button < DIBI_FIRST || button > DIBI_LAST) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBInputDevice_Dispatcher_GetAxis( IDirectFBInputDevice *thiz, + DFBInputDeviceAxisIdentifier axis, + int *ret_pos ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Dispatcher) + + if (!ret_pos || (int)axis < DIAI_FIRST || axis > DIAI_LAST) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBInputDevice_Dispatcher_GetXY( IDirectFBInputDevice *thiz, + int *ret_x, + int *ret_y ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Dispatcher) + + if (!ret_x && !ret_y) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +/**************************************************************************************************/ + +static DirectResult +Dispatch_Release( IDirectFBInputDevice *thiz, IDirectFBInputDevice *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Dispatcher) + + return voodoo_manager_unregister_local( manager, data->self ); +} + +static DirectResult +Dispatch_GetID( IDirectFBInputDevice *thiz, IDirectFBInputDevice *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + DFBInputDeviceID id; + + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Dispatcher) + + ret = real->GetID( real, &id ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_ID, id, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetDescription( IDirectFBInputDevice *thiz, IDirectFBInputDevice *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + DFBInputDeviceDescription desc; + + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Dispatcher) + + ret = real->GetDescription( real, &desc ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_DATA, sizeof(desc), &desc, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetKeymapEntry( IDirectFBInputDevice *thiz, IDirectFBInputDevice *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + VoodooMessageParser parser; + int keycode; + DFBInputDeviceKeymapEntry entry; + + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_INT( parser, keycode ); + VOODOO_PARSER_END( parser ); + + ret = real->GetKeymapEntry( real, keycode, &entry ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_DATA, sizeof(entry), &entry, + VMBT_NONE ); +} + +static DirectResult +Dispatch_CreateEventBuffer( IDirectFBInputDevice *thiz, IDirectFBInputDevice *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + IDirectFBEventBuffer *buffer; + VoodooInstanceID instance; + VoodooMessageParser parser; + void *requestor; + + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_ID( parser, instance ); + VOODOO_PARSER_END( parser ); + + ret = real->CreateEventBuffer( real, &buffer ); + if (ret) + return ret; + + ret = voodoo_construct_requestor( manager, "IDirectFBEventBuffer", + instance, buffer, &requestor ); + + buffer->Release( buffer ); + + return voodoo_manager_respond( manager, true, msg->header.serial, + ret, VOODOO_INSTANCE_NONE, + VMBT_NONE ); +} + +static DirectResult +Dispatch_AttachEventBuffer( IDirectFBInputDevice *thiz, IDirectFBInputDevice *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + IDirectFBEventBuffer *buffer; + IDirectFBEventBuffer_Requestor_data *buffer_data; + VoodooInstanceID instance; + VoodooMessageParser parser; + void *ptr; + + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_ID( parser, instance ); + VOODOO_PARSER_END( parser ); + + ret = voodoo_manager_lookup_remote( manager, instance, &ptr ); + if (ret) + return ret; + + buffer = ptr; + + DIRECT_INTERFACE_GET_DATA_FROM( buffer, buffer_data, IDirectFBEventBuffer_Requestor ); + + ret = real->AttachEventBuffer( real, buffer_data->src ); + + return voodoo_manager_respond( manager, true, msg->header.serial, + ret, VOODOO_INSTANCE_NONE, + VMBT_NONE ); +} + +static DirectResult +Dispatch_DetachEventBuffer( IDirectFBInputDevice *thiz, IDirectFBInputDevice *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + IDirectFBEventBuffer *buffer; + IDirectFBEventBuffer_Requestor_data *buffer_data; + VoodooInstanceID instance; + VoodooMessageParser parser; + void *ptr; + + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_ID( parser, instance ); + VOODOO_PARSER_END( parser ); + + ret = voodoo_manager_lookup_remote( manager, instance, &ptr ); + if (ret) + return ret; + + buffer = ptr; + + DIRECT_INTERFACE_GET_DATA_FROM( buffer, buffer_data, IDirectFBEventBuffer_Requestor ); + + ret = real->DetachEventBuffer( real, buffer_data->src ); + + return voodoo_manager_respond( manager, true, msg->header.serial, + ret, VOODOO_INSTANCE_NONE, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetKeyState( IDirectFBInputDevice *thiz, IDirectFBInputDevice *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DirectResult +Dispatch_GetModifiers( IDirectFBInputDevice *thiz, IDirectFBInputDevice *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DirectResult +Dispatch_GetLockState( IDirectFBInputDevice *thiz, IDirectFBInputDevice *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DirectResult +Dispatch_GetButtons( IDirectFBInputDevice *thiz, IDirectFBInputDevice *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DirectResult +Dispatch_GetButtonState( IDirectFBInputDevice *thiz, IDirectFBInputDevice *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DirectResult +Dispatch_GetAxis( IDirectFBInputDevice *thiz, IDirectFBInputDevice *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DirectResult +Dispatch_GetXY( IDirectFBInputDevice *thiz, IDirectFBInputDevice *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DirectResult +Dispatch( void *dispatcher, void *real, VoodooManager *manager, VoodooRequestMessage *msg ) +{ + D_DEBUG( "IDirectFBInputDevice/Dispatcher: " + "Handling request for instance %u with method %u...\n", msg->instance, msg->method ); + + switch (msg->method) { + case IDIRECTFBINPUTDEVICE_METHOD_ID_Release: + return Dispatch_Release( dispatcher, real, manager, msg ); + + case IDIRECTFBINPUTDEVICE_METHOD_ID_GetID: + return Dispatch_GetID( dispatcher, real, manager, msg ); + + case IDIRECTFBINPUTDEVICE_METHOD_ID_GetDescription: + return Dispatch_GetDescription( dispatcher, real, manager, msg ); + + case IDIRECTFBINPUTDEVICE_METHOD_ID_GetKeymapEntry: + return Dispatch_GetKeymapEntry( dispatcher, real, manager, msg ); + + case IDIRECTFBINPUTDEVICE_METHOD_ID_CreateEventBuffer: + return Dispatch_CreateEventBuffer( dispatcher, real, manager, msg ); + + case IDIRECTFBINPUTDEVICE_METHOD_ID_AttachEventBuffer: + return Dispatch_AttachEventBuffer( dispatcher, real, manager, msg ); + + case IDIRECTFBINPUTDEVICE_METHOD_ID_DetachEventBuffer: + return Dispatch_DetachEventBuffer( dispatcher, real, manager, msg ); + + case IDIRECTFBINPUTDEVICE_METHOD_ID_GetKeyState: + return Dispatch_GetKeyState( dispatcher, real, manager, msg ); + + case IDIRECTFBINPUTDEVICE_METHOD_ID_GetModifiers: + return Dispatch_GetModifiers( dispatcher, real, manager, msg ); + + case IDIRECTFBINPUTDEVICE_METHOD_ID_GetLockState: + return Dispatch_GetLockState( dispatcher, real, manager, msg ); + + case IDIRECTFBINPUTDEVICE_METHOD_ID_GetButtons: + return Dispatch_GetButtons( dispatcher, real, manager, msg ); + + case IDIRECTFBINPUTDEVICE_METHOD_ID_GetButtonState: + return Dispatch_GetButtonState( dispatcher, real, manager, msg ); + + case IDIRECTFBINPUTDEVICE_METHOD_ID_GetAxis: + return Dispatch_GetAxis( dispatcher, real, manager, msg ); + + case IDIRECTFBINPUTDEVICE_METHOD_ID_GetXY: + return Dispatch_GetXY( dispatcher, real, manager, msg ); + } + + return DFB_NOSUCHMETHOD; +} + +/**************************************************************************************************/ + +static DFBResult +Probe() +{ + /* This implementation has to be loaded explicitly. */ + return DFB_UNSUPPORTED; +} + +static DFBResult +Construct( IDirectFBInputDevice *thiz, /* Dispatcher interface */ + IDirectFBInputDevice *real, /* Real interface implementation */ + VoodooManager *manager, /* Manager of the Voodoo framework */ + VoodooInstanceID super, /* Instance ID of the super interface */ + void *arg, /* Optional arguments to constructor */ + VoodooInstanceID *ret_instance ) +{ + DFBResult ret; + VoodooInstanceID instance; + + DIRECT_ALLOCATE_INTERFACE_DATA(thiz, IDirectFBInputDevice_Dispatcher) + + D_ASSERT( real != NULL ); + D_ASSERT( manager != NULL ); + D_ASSERT( super != VOODOO_INSTANCE_NONE ); + D_ASSERT( ret_instance != NULL ); + + /* Register the dispatcher, getting a new instance ID that refers to it. */ + ret = voodoo_manager_register_local( manager, super, thiz, real, Dispatch, &instance ); + if (ret) { + DIRECT_DEALLOCATE_INTERFACE( thiz ); + return ret; + } + + /* Return the new instance. */ + *ret_instance = instance; + + /* Initialize interface data. */ + data->ref = 1; + data->real = real; + data->self = instance; + data->super = super; + + /* Initialize interface methods. */ + thiz->AddRef = IDirectFBInputDevice_Dispatcher_AddRef; + thiz->Release = IDirectFBInputDevice_Dispatcher_Release; + thiz->GetID = IDirectFBInputDevice_Dispatcher_GetID; + thiz->GetDescription = IDirectFBInputDevice_Dispatcher_GetDescription; + thiz->GetKeymapEntry = IDirectFBInputDevice_Dispatcher_GetKeymapEntry; + thiz->CreateEventBuffer = IDirectFBInputDevice_Dispatcher_CreateEventBuffer; + thiz->AttachEventBuffer = IDirectFBInputDevice_Dispatcher_AttachEventBuffer; + thiz->DetachEventBuffer = IDirectFBInputDevice_Dispatcher_DetachEventBuffer; + thiz->GetKeyState = IDirectFBInputDevice_Dispatcher_GetKeyState; + thiz->GetModifiers = IDirectFBInputDevice_Dispatcher_GetModifiers; + thiz->GetLockState = IDirectFBInputDevice_Dispatcher_GetLockState; + thiz->GetButtons = IDirectFBInputDevice_Dispatcher_GetButtons; + thiz->GetButtonState = IDirectFBInputDevice_Dispatcher_GetButtonState; + thiz->GetAxis = IDirectFBInputDevice_Dispatcher_GetAxis; + thiz->GetXY = IDirectFBInputDevice_Dispatcher_GetXY; + + return DFB_OK; +} + diff --git a/Source/DirectFB/proxy/dispatcher/idirectfbinputdevice_dispatcher.h b/Source/DirectFB/proxy/dispatcher/idirectfbinputdevice_dispatcher.h new file mode 100755 index 0000000..b3442f7 --- /dev/null +++ b/Source/DirectFB/proxy/dispatcher/idirectfbinputdevice_dispatcher.h @@ -0,0 +1,60 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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 __IDIRECTFBINPUTDEVICE_DISPATCHER_H__ +#define __IDIRECTFBINPUTDEVICE_DISPATCHER_H__ + +#define IDIRECTFBINPUTDEVICE_METHOD_ID_AddRef 1 +#define IDIRECTFBINPUTDEVICE_METHOD_ID_Release 2 +#define IDIRECTFBINPUTDEVICE_METHOD_ID_GetID 3 +#define IDIRECTFBINPUTDEVICE_METHOD_ID_GetDescription 4 +#define IDIRECTFBINPUTDEVICE_METHOD_ID_GetKeymapEntry 5 +#define IDIRECTFBINPUTDEVICE_METHOD_ID_CreateEventBuffer 6 +#define IDIRECTFBINPUTDEVICE_METHOD_ID_AttachEventBuffer 7 +#define IDIRECTFBINPUTDEVICE_METHOD_ID_GetKeyState 8 +#define IDIRECTFBINPUTDEVICE_METHOD_ID_GetModifiers 9 +#define IDIRECTFBINPUTDEVICE_METHOD_ID_GetLockState 10 +#define IDIRECTFBINPUTDEVICE_METHOD_ID_GetButtons 11 +#define IDIRECTFBINPUTDEVICE_METHOD_ID_GetButtonState 12 +#define IDIRECTFBINPUTDEVICE_METHOD_ID_GetAxis 13 +#define IDIRECTFBINPUTDEVICE_METHOD_ID_GetXY 14 +#define IDIRECTFBINPUTDEVICE_METHOD_ID_DetachEventBuffer 15 + +/* + * private data struct of IDirectFBInputDevice_Dispatcher + */ +typedef struct { + int ref; /* reference counter */ + + IDirectFBInputDevice *real; + + VoodooInstanceID self; + VoodooInstanceID super; +} IDirectFBInputDevice_Dispatcher_data; + +#endif diff --git a/Source/DirectFB/proxy/dispatcher/idirectfbpalette_dispatcher.c b/Source/DirectFB/proxy/dispatcher/idirectfbpalette_dispatcher.c new file mode 100755 index 0000000..496df2b --- /dev/null +++ b/Source/DirectFB/proxy/dispatcher/idirectfbpalette_dispatcher.c @@ -0,0 +1,408 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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. +*/ + +#include + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "idirectfbpalette_dispatcher.h" + + +static DFBResult Probe( void ); +static DFBResult Construct( IDirectFBPalette *thiz, + IDirectFBPalette *real, + VoodooManager *manager, + VoodooInstanceID super, + void *arg, + VoodooInstanceID *ret_instance ); + +#include + +DIRECT_INTERFACE_IMPLEMENTATION( IDirectFBPalette, Dispatcher ) + + +/**************************************************************************************************/ + +/* + * private data struct of IDirectFBPalette_Dispatcher + */ +typedef struct { + int ref; /* reference counter */ + + IDirectFBPalette *real; + + VoodooInstanceID self; + VoodooInstanceID super; +} IDirectFBPalette_Dispatcher_data; + +/**************************************************************************************************/ + +static void +IDirectFBPalette_Dispatcher_Destruct( IDirectFBPalette *thiz ) +{ + IDirectFBPalette_Dispatcher_data *data = thiz->priv; + + D_DEBUG( "%s (%p)\n", __FUNCTION__, thiz ); + + data->real->Release( data->real ); + + DIRECT_DEALLOCATE_INTERFACE( thiz ); +} + +/**************************************************************************************************/ + +static DirectResult +IDirectFBPalette_Dispatcher_AddRef( IDirectFBPalette *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBPalette_Dispatcher) + + data->ref++; + + return DFB_OK; +} + +static DirectResult +IDirectFBPalette_Dispatcher_Release( IDirectFBPalette *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBPalette_Dispatcher) + + if (--data->ref == 0) + IDirectFBPalette_Dispatcher_Destruct( thiz ); + + return DFB_OK; +} + +static DFBResult +IDirectFBPalette_Dispatcher_GetCapabilities( IDirectFBPalette *thiz, + DFBPaletteCapabilities *caps ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBPalette_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBPalette_Dispatcher_GetSize( IDirectFBPalette *thiz, + unsigned int *size ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBPalette_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBPalette_Dispatcher_SetEntries( IDirectFBPalette *thiz, + const DFBColor *entries, + unsigned int num_entries, + unsigned int offset ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBPalette_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBPalette_Dispatcher_GetEntries( IDirectFBPalette *thiz, + DFBColor *entries, + unsigned int num_entries, + unsigned int offset ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBPalette_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBPalette_Dispatcher_FindBestMatch( IDirectFBPalette *thiz, + u8 r, + u8 g, + u8 b, + u8 a, + unsigned int *index ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBPalette_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBPalette_Dispatcher_CreateCopy( IDirectFBPalette *thiz, + IDirectFBPalette **interface_ptr ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBPalette_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +/**************************************************************************************************/ + +static DirectResult +Dispatch_Release( IDirectFBPalette *thiz, IDirectFBPalette *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBPalette_Dispatcher) + + return voodoo_manager_unregister_local( manager, data->self ); +} + +static DirectResult +Dispatch_GetCapabilities( IDirectFBPalette *thiz, IDirectFBPalette *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + DFBPaletteCapabilities caps; + + DIRECT_INTERFACE_GET_DATA(IDirectFBPalette_Dispatcher) + + ret = real->GetCapabilities( real, &caps ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_INT, caps, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetSize( IDirectFBPalette *thiz, IDirectFBPalette *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + unsigned int size; + + DIRECT_INTERFACE_GET_DATA(IDirectFBPalette_Dispatcher) + + ret = real->GetSize( real, &size ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_UINT, size, + VMBT_NONE ); +} + +static DirectResult +Dispatch_SetEntries( IDirectFBPalette *thiz, IDirectFBPalette *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + VoodooMessageParser parser; + const DFBColor *entries; + unsigned int num_entries; + unsigned int offset; + + DIRECT_INTERFACE_GET_DATA(IDirectFBPalette_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_DATA( parser, entries ); + VOODOO_PARSER_GET_UINT( parser, num_entries ); + VOODOO_PARSER_GET_UINT( parser, offset ); + VOODOO_PARSER_END( parser ); + + ret = real->SetEntries( real, entries, num_entries, offset ); + + return voodoo_manager_respond( manager, true, msg->header.serial, + ret, VOODOO_INSTANCE_NONE, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetEntries( IDirectFBPalette *thiz, IDirectFBPalette *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + VoodooMessageParser parser; + DFBColor *entries; + unsigned int num_entries; + unsigned int offset; + + DIRECT_INTERFACE_GET_DATA(IDirectFBPalette_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_UINT( parser, num_entries ); + VOODOO_PARSER_GET_UINT( parser, offset ); + VOODOO_PARSER_END( parser ); + + entries = D_MALLOC( num_entries * sizeof(DFBColor) ); + if (!entries) { + D_WARN( "out of memory" ); + return DFB_NOSYSTEMMEMORY; + } + + ret = real->GetEntries( real, entries, num_entries, offset ); + if (ret) { + D_FREE( entries ); + return ret; + } + + ret = voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_DATA, num_entries * sizeof(DFBColor), entries, + VMBT_NONE ); + + D_FREE( entries ); + + return ret; +} + +static DirectResult +Dispatch_FindBestMatch( IDirectFBPalette *thiz, IDirectFBPalette *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + VoodooMessageParser parser; + const DFBColor *color; + unsigned int index; + + DIRECT_INTERFACE_GET_DATA(IDirectFBPalette_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_DATA( parser, color ); + VOODOO_PARSER_END( parser ); + + ret = real->FindBestMatch( real, color->r, color->g, color->b, color->a, &index ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_UINT, index, + VMBT_NONE ); +} + +static DirectResult +Dispatch_CreateCopy( IDirectFBPalette *thiz, IDirectFBPalette *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBPalette_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DirectResult +Dispatch( void *dispatcher, void *real, VoodooManager *manager, VoodooRequestMessage *msg ) +{ + D_DEBUG( "IDirectFBPalette/Dispatcher: " + "Handling request for instance %u with method %u...\n", msg->instance, msg->method ); + + switch (msg->method) { + case IDIRECTFBPALETTE_METHOD_ID_Release: + return Dispatch_Release( dispatcher, real, manager, msg ); + + case IDIRECTFBPALETTE_METHOD_ID_GetCapabilities: + return Dispatch_GetCapabilities( dispatcher, real, manager, msg ); + + case IDIRECTFBPALETTE_METHOD_ID_GetSize: + return Dispatch_GetSize( dispatcher, real, manager, msg ); + + case IDIRECTFBPALETTE_METHOD_ID_SetEntries: + return Dispatch_SetEntries( dispatcher, real, manager, msg ); + + case IDIRECTFBPALETTE_METHOD_ID_GetEntries: + return Dispatch_GetEntries( dispatcher, real, manager, msg ); + + case IDIRECTFBPALETTE_METHOD_ID_FindBestMatch: + return Dispatch_FindBestMatch( dispatcher, real, manager, msg ); + + case IDIRECTFBPALETTE_METHOD_ID_CreateCopy: + return Dispatch_CreateCopy( dispatcher, real, manager, msg ); + } + + return DFB_NOSUCHMETHOD; +} + +/**************************************************************************************************/ + +static DFBResult +Probe() +{ + /* This implementation has to be loaded explicitly. */ + return DFB_UNSUPPORTED; +} + +static DFBResult +Construct( IDirectFBPalette *thiz, + IDirectFBPalette *real, + VoodooManager *manager, + VoodooInstanceID super, + void *arg, /* Optional arguments to constructor */ + VoodooInstanceID *ret_instance ) +{ + DFBResult ret; + + DIRECT_ALLOCATE_INTERFACE_DATA(thiz, IDirectFBPalette_Dispatcher) + + ret = voodoo_manager_register_local( manager, super, thiz, real, Dispatch, ret_instance ); + if (ret) { + DIRECT_DEALLOCATE_INTERFACE( thiz ); + return ret; + } + + data->ref = 1; + data->real = real; + data->self = *ret_instance; + data->super = super; + + thiz->AddRef = IDirectFBPalette_Dispatcher_AddRef; + thiz->Release = IDirectFBPalette_Dispatcher_Release; + thiz->GetCapabilities = IDirectFBPalette_Dispatcher_GetCapabilities; + thiz->GetSize = IDirectFBPalette_Dispatcher_GetSize; + thiz->SetEntries = IDirectFBPalette_Dispatcher_SetEntries; + thiz->GetEntries = IDirectFBPalette_Dispatcher_GetEntries; + thiz->FindBestMatch = IDirectFBPalette_Dispatcher_FindBestMatch; + thiz->CreateCopy = IDirectFBPalette_Dispatcher_CreateCopy; + + return DFB_OK; +} + diff --git a/Source/DirectFB/proxy/dispatcher/idirectfbpalette_dispatcher.h b/Source/DirectFB/proxy/dispatcher/idirectfbpalette_dispatcher.h new file mode 100755 index 0000000..8caab58 --- /dev/null +++ b/Source/DirectFB/proxy/dispatcher/idirectfbpalette_dispatcher.h @@ -0,0 +1,41 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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 __IDIRECTFBPALETTE_DISPATCHER_H__ +#define __IDIRECTFBPALETTE_DISPATCHER_H__ + +#define IDIRECTFBPALETTE_METHOD_ID_AddRef 1 +#define IDIRECTFBPALETTE_METHOD_ID_Release 2 +#define IDIRECTFBPALETTE_METHOD_ID_GetCapabilities 3 +#define IDIRECTFBPALETTE_METHOD_ID_GetSize 4 +#define IDIRECTFBPALETTE_METHOD_ID_SetEntries 5 +#define IDIRECTFBPALETTE_METHOD_ID_GetEntries 6 +#define IDIRECTFBPALETTE_METHOD_ID_FindBestMatch 7 +#define IDIRECTFBPALETTE_METHOD_ID_CreateCopy 8 + +#endif diff --git a/Source/DirectFB/proxy/dispatcher/idirectfbscreen_dispatcher.c b/Source/DirectFB/proxy/dispatcher/idirectfbscreen_dispatcher.c new file mode 100755 index 0000000..a2f58d9 --- /dev/null +++ b/Source/DirectFB/proxy/dispatcher/idirectfbscreen_dispatcher.c @@ -0,0 +1,572 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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. +*/ + +#include + +#include +#include + +#include + +#include + +#include +#include + +#include +#include + +#include + +#include "idirectfbscreen_dispatcher.h" + + +static DFBResult Probe( void ); +static DFBResult Construct( IDirectFBScreen *thiz, + IDirectFBScreen *real, + VoodooManager *manager, + VoodooInstanceID super, + void *arg, + VoodooInstanceID *ret_instance ); + +#include + +DIRECT_INTERFACE_IMPLEMENTATION( IDirectFBScreen, Dispatcher ) + +/**************************************************************************************************/ + +/* + * private data struct of IDirectFBScreen_Dispatcher + */ +typedef struct { + int ref; /* reference counter */ + + IDirectFBScreen *real; + + VoodooInstanceID self; /* The instance of this dispatcher itself. */ + VoodooInstanceID super; /* The instance of the creator. */ +} IDirectFBScreen_Dispatcher_data; + +/**************************************************************************************************/ + +static void +IDirectFBScreen_Dispatcher_Destruct( IDirectFBScreen *thiz ) +{ + IDirectFBScreen_Dispatcher_data *data = thiz->priv; + + D_DEBUG( "%s (%p)\n", __FUNCTION__, thiz ); + + data->real->Release( data->real ); + + DIRECT_DEALLOCATE_INTERFACE( thiz ); +} + +/**************************************************************************************************/ + +static DirectResult +IDirectFBScreen_Dispatcher_AddRef( IDirectFBScreen *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Dispatcher) + + data->ref++; + + return DFB_OK; +} + +static DirectResult +IDirectFBScreen_Dispatcher_Release( IDirectFBScreen *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Dispatcher) + + if (--data->ref == 0) + IDirectFBScreen_Dispatcher_Destruct( thiz ); + + return DFB_OK; +} + +static DFBResult +IDirectFBScreen_Dispatcher_GetID( IDirectFBScreen *thiz, + DFBScreenID *id ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Dispatcher) + + if (!id) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBScreen_Dispatcher_GetDescription( IDirectFBScreen *thiz, + DFBScreenDescription *desc ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Dispatcher) + + if (!desc) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBScreen_Dispatcher_GetSize( IDirectFBScreen *thiz, + int *width, + int *height ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Dispatcher) + + if (!width && !height) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBScreen_Dispatcher_EnumDisplayLayers( IDirectFBScreen *thiz, + DFBDisplayLayerCallback callbackfunc, + void *callbackdata ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Dispatcher) + + if (!callbackfunc) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBScreen_Dispatcher_SetPowerMode( IDirectFBScreen *thiz, + DFBScreenPowerMode mode ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Dispatcher) + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBScreen_Dispatcher_WaitForSync( IDirectFBScreen *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Dispatcher) + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBScreen_Dispatcher_GetMixerDescriptions( IDirectFBScreen *thiz, + DFBScreenMixerDescription *descriptions ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Dispatcher) + + if (!descriptions) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBScreen_Dispatcher_GetMixerConfiguration( IDirectFBScreen *thiz, + int mixer, + DFBScreenMixerConfig *config ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Dispatcher) + + if (!config) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBScreen_Dispatcher_TestMixerConfiguration( IDirectFBScreen *thiz, + int mixer, + const DFBScreenMixerConfig *config, + DFBScreenMixerConfigFlags *failed ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Dispatcher) + + if (!config || (config->flags & ~DSMCONF_ALL)) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBScreen_Dispatcher_SetMixerConfiguration( IDirectFBScreen *thiz, + int mixer, + const DFBScreenMixerConfig *config ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Dispatcher) + + if (!config || (config->flags & ~DSMCONF_ALL)) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBScreen_Dispatcher_GetEncoderDescriptions( IDirectFBScreen *thiz, + DFBScreenEncoderDescription *descriptions ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Dispatcher) + + if (!descriptions) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBScreen_Dispatcher_GetEncoderConfiguration( IDirectFBScreen *thiz, + int encoder, + DFBScreenEncoderConfig *config ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Dispatcher) + + if (!config) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBScreen_Dispatcher_TestEncoderConfiguration( IDirectFBScreen *thiz, + int encoder, + const DFBScreenEncoderConfig *config, + DFBScreenEncoderConfigFlags *failed ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Dispatcher) + + if (!config || (config->flags & ~DSECONF_ALL)) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBScreen_Dispatcher_SetEncoderConfiguration( IDirectFBScreen *thiz, + int encoder, + const DFBScreenEncoderConfig *config ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Dispatcher) + + if (!config || (config->flags & ~DSECONF_ALL)) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBScreen_Dispatcher_GetOutputDescriptions( IDirectFBScreen *thiz, + DFBScreenOutputDescription *descriptions ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Dispatcher) + + if (!descriptions) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBScreen_Dispatcher_GetOutputConfiguration( IDirectFBScreen *thiz, + int output, + DFBScreenOutputConfig *config ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Dispatcher) + + if (!config) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBScreen_Dispatcher_TestOutputConfiguration( IDirectFBScreen *thiz, + int output, + const DFBScreenOutputConfig *config, + DFBScreenOutputConfigFlags *failed ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Dispatcher) + + if (!config || (config->flags & ~DSOCONF_ALL)) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBScreen_Dispatcher_SetOutputConfiguration( IDirectFBScreen *thiz, + int output, + const DFBScreenOutputConfig *config ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Dispatcher) + + if (!config || (config->flags & ~DSOCONF_ALL)) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +/**************************************************************************************************/ + +static DirectResult +Dispatch_Release( IDirectFBScreen *thiz, IDirectFBScreen *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Dispatcher) + + return voodoo_manager_unregister_local( manager, data->self ); +} + +static DirectResult +Dispatch_GetID( IDirectFBScreen *thiz, IDirectFBScreen *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + DFBScreenID id; + + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Dispatcher) + + ret = real->GetID( real, &id ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_ID, id, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetDescription( IDirectFBScreen *thiz, IDirectFBScreen *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + DFBScreenDescription desc; + + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Dispatcher) + + ret = real->GetDescription( real, &desc ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_DATA, sizeof(DFBScreenDescription), &desc, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetSize( IDirectFBScreen *thiz, IDirectFBScreen *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + DFBDimension size; + + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Dispatcher) + + ret = real->GetSize( real, &size.w, &size.h ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_DATA, sizeof(DFBDimension), &size, + VMBT_NONE ); +} + +typedef struct { + int num; + IDirectFBScreen_Dispatcher_EnumDisplayLayers_Item items[MAX_LAYERS]; +} EnumDisplayLayers_Context; + +static DFBEnumerationResult +EnumDisplayLayers_Callback( DFBDisplayLayerID layer_id, + DFBDisplayLayerDescription desc, + void *callbackdata ) +{ + int index; + EnumDisplayLayers_Context *context = callbackdata; + + if (context->num == MAX_LAYERS) { + D_WARN( "maximum number of %d layers reached", MAX_LAYERS ); + return DFENUM_CANCEL; + } + + index = context->num++; + + context->items[index].layer_id = layer_id; + context->items[index].desc = desc; + + return DFENUM_OK; +} + +static DirectResult +Dispatch_EnumDisplayLayers( IDirectFBScreen *thiz, IDirectFBScreen *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + EnumDisplayLayers_Context context = { 0 }; + + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Dispatcher) + + ret = real->EnumDisplayLayers( real, EnumDisplayLayers_Callback, &context ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_INT, context.num, + VMBT_DATA, context.num * sizeof(IDirectFBScreen_Dispatcher_EnumDisplayLayers_Item), context.items, + VMBT_NONE ); +} + +static DirectResult +Dispatch_SetPowerMode( IDirectFBScreen *thiz, IDirectFBScreen *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + VoodooMessageParser parser; + DFBScreenPowerMode mode; + + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_INT( parser, mode ); + VOODOO_PARSER_END( parser ); + + ret = real->SetPowerMode( real, mode ); + + return DFB_OK; +} + +static DirectResult +Dispatch_WaitForSync( IDirectFBScreen *thiz, IDirectFBScreen *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Dispatcher) + + ret = real->WaitForSync( real ); + + return DFB_OK; +} + + +static DirectResult +Dispatch( void *dispatcher, void *real, VoodooManager *manager, VoodooRequestMessage *msg ) +{ + D_DEBUG( "IDirectFBScreen/Dispatcher: " + "Handling request for instance %u with method %u...\n", msg->instance, msg->method ); + + switch (msg->method) { + case IDIRECTFBSCREEN_METHOD_ID_Release: + return Dispatch_Release( dispatcher, real, manager, msg ); + + case IDIRECTFBSCREEN_METHOD_ID_GetID: + return Dispatch_GetID( dispatcher, real, manager, msg ); + + case IDIRECTFBSCREEN_METHOD_ID_GetDescription: + return Dispatch_GetDescription( dispatcher, real, manager, msg ); + + case IDIRECTFBSCREEN_METHOD_ID_GetSize: + return Dispatch_GetSize( dispatcher, real, manager, msg ); + + case IDIRECTFBSCREEN_METHOD_ID_EnumDisplayLayers: + return Dispatch_EnumDisplayLayers( dispatcher, real, manager, msg ); + + case IDIRECTFBSCREEN_METHOD_ID_SetPowerMode: + return Dispatch_SetPowerMode( dispatcher, real, manager, msg ); + + case IDIRECTFBSCREEN_METHOD_ID_WaitForSync: + return Dispatch_WaitForSync( dispatcher, real, manager, msg ); + } + + return DFB_NOSUCHMETHOD; +} + +/**************************************************************************************************/ + +static DFBResult +Probe() +{ + /* This implementation has to be loaded explicitly. */ + return DFB_UNSUPPORTED; +} + +static DFBResult +Construct( IDirectFBScreen *thiz, + IDirectFBScreen *real, + VoodooManager *manager, + VoodooInstanceID super, + void *arg, /* Optional arguments to constructor */ + VoodooInstanceID *ret_instance ) +{ + DFBResult ret; + VoodooInstanceID instance; + + DIRECT_ALLOCATE_INTERFACE_DATA(thiz, IDirectFBScreen_Dispatcher) + + ret = voodoo_manager_register_local( manager, super, thiz, real, Dispatch, &instance ); + if (ret) { + DIRECT_DEALLOCATE_INTERFACE( thiz ); + return ret; + } + + *ret_instance = instance; + + data->ref = 1; + data->real = real; + data->self = instance; + data->super = super; + + thiz->AddRef = IDirectFBScreen_Dispatcher_AddRef; + thiz->Release = IDirectFBScreen_Dispatcher_Release; + thiz->GetID = IDirectFBScreen_Dispatcher_GetID; + thiz->GetDescription = IDirectFBScreen_Dispatcher_GetDescription; + thiz->GetSize = IDirectFBScreen_Dispatcher_GetSize; + thiz->EnumDisplayLayers = IDirectFBScreen_Dispatcher_EnumDisplayLayers; + thiz->SetPowerMode = IDirectFBScreen_Dispatcher_SetPowerMode; + thiz->WaitForSync = IDirectFBScreen_Dispatcher_WaitForSync; + thiz->GetMixerDescriptions = IDirectFBScreen_Dispatcher_GetMixerDescriptions; + thiz->GetMixerConfiguration = IDirectFBScreen_Dispatcher_GetMixerConfiguration; + thiz->TestMixerConfiguration = IDirectFBScreen_Dispatcher_TestMixerConfiguration; + thiz->SetMixerConfiguration = IDirectFBScreen_Dispatcher_SetMixerConfiguration; + thiz->GetEncoderDescriptions = IDirectFBScreen_Dispatcher_GetEncoderDescriptions; + thiz->GetEncoderConfiguration = IDirectFBScreen_Dispatcher_GetEncoderConfiguration; + thiz->TestEncoderConfiguration = IDirectFBScreen_Dispatcher_TestEncoderConfiguration; + thiz->SetEncoderConfiguration = IDirectFBScreen_Dispatcher_SetEncoderConfiguration; + thiz->GetOutputDescriptions = IDirectFBScreen_Dispatcher_GetOutputDescriptions; + thiz->GetOutputConfiguration = IDirectFBScreen_Dispatcher_GetOutputConfiguration; + thiz->TestOutputConfiguration = IDirectFBScreen_Dispatcher_TestOutputConfiguration; + thiz->SetOutputConfiguration = IDirectFBScreen_Dispatcher_SetOutputConfiguration; + + return DFB_OK; +} + diff --git a/Source/DirectFB/proxy/dispatcher/idirectfbscreen_dispatcher.h b/Source/DirectFB/proxy/dispatcher/idirectfbscreen_dispatcher.h new file mode 100755 index 0000000..e920f30 --- /dev/null +++ b/Source/DirectFB/proxy/dispatcher/idirectfbscreen_dispatcher.h @@ -0,0 +1,58 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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 __IDIRECTFBSCREEN_DISPATCHER_H__ +#define __IDIRECTFBSCREEN_DISPATCHER_H__ + +#define IDIRECTFBSCREEN_METHOD_ID_AddRef 1 +#define IDIRECTFBSCREEN_METHOD_ID_Release 2 +#define IDIRECTFBSCREEN_METHOD_ID_GetID 3 +#define IDIRECTFBSCREEN_METHOD_ID_GetDescription 4 +#define IDIRECTFBSCREEN_METHOD_ID_GetSize 5 +#define IDIRECTFBSCREEN_METHOD_ID_EnumDisplayLayers 6 +#define IDIRECTFBSCREEN_METHOD_ID_SetPowerMode 7 +#define IDIRECTFBSCREEN_METHOD_ID_WaitForSync 8 +#define IDIRECTFBSCREEN_METHOD_ID_GetMixerDescriptions 9 +#define IDIRECTFBSCREEN_METHOD_ID_GetMixerConfiguration 10 +#define IDIRECTFBSCREEN_METHOD_ID_TestMixerConfiguration 11 +#define IDIRECTFBSCREEN_METHOD_ID_SetMixerConfiguration 12 +#define IDIRECTFBSCREEN_METHOD_ID_GetEncoderDescriptions 13 +#define IDIRECTFBSCREEN_METHOD_ID_GetEncoderConfiguration 14 +#define IDIRECTFBSCREEN_METHOD_ID_TestEncoderConfiguration 15 +#define IDIRECTFBSCREEN_METHOD_ID_SetEncoderConfiguration 16 +#define IDIRECTFBSCREEN_METHOD_ID_GetOutputDescriptions 17 +#define IDIRECTFBSCREEN_METHOD_ID_GetOutputConfiguration 18 +#define IDIRECTFBSCREEN_METHOD_ID_TestOutputConfiguration 19 +#define IDIRECTFBSCREEN_METHOD_ID_SetOutputConfiguration 20 + +typedef struct { + DFBDisplayLayerID layer_id; + DFBDisplayLayerDescription desc; +} IDirectFBScreen_Dispatcher_EnumDisplayLayers_Item; + +#endif diff --git a/Source/DirectFB/proxy/dispatcher/idirectfbsurface_dispatcher.c b/Source/DirectFB/proxy/dispatcher/idirectfbsurface_dispatcher.c new file mode 100755 index 0000000..9c38dcc --- /dev/null +++ b/Source/DirectFB/proxy/dispatcher/idirectfbsurface_dispatcher.c @@ -0,0 +1,2149 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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. +*/ + +#include + +#include +#include +#include + +#include + + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +#include "idirectfbsurface_dispatcher.h" + +static DFBResult Probe( void ); +static DFBResult Construct( IDirectFBSurface *thiz, + IDirectFBSurface *real, + VoodooManager *manager, + VoodooInstanceID super, + void *arg, + VoodooInstanceID *ret_instance ); + +#include + +DIRECT_INTERFACE_IMPLEMENTATION( IDirectFBSurface, Dispatcher ) + +/**************************************************************************************************/ + +/* + * private data struct of IDirectFBSurface_Dispatcher + */ +typedef struct { + int ref; /* reference counter */ + + IDirectFBSurface *real; + + VoodooInstanceID super; + VoodooInstanceID self; + + VoodooManager *manager; + + VoodooInstanceID remote; +} IDirectFBSurface_Dispatcher_data; + +/**************************************************************************************************/ + +static void +IDirectFBSurface_Dispatcher_Destruct( IDirectFBSurface *thiz ) +{ + IDirectFBSurface_Dispatcher_data *data; + + D_DEBUG( "%s (%p)\n", __FUNCTION__, thiz ); + + data = thiz->priv; + + data->real->Release( data->real ); + + DIRECT_DEALLOCATE_INTERFACE( thiz ); +} + +/**************************************************************************************************/ + +static DirectResult +IDirectFBSurface_Dispatcher_AddRef( IDirectFBSurface *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + data->ref++; + + return DFB_OK; +} + +static DirectResult +IDirectFBSurface_Dispatcher_Release( IDirectFBSurface *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + if (--data->ref == 0) + IDirectFBSurface_Dispatcher_Destruct( thiz ); + + return DFB_OK; +} + +static DFBResult +IDirectFBSurface_Dispatcher_GetCapabilities( IDirectFBSurface *thiz, + DFBSurfaceCapabilities *caps ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + if (!caps) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_GetPosition( IDirectFBSurface *thiz, + int *x, + int *y ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + if (!x && !y) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_GetSize( IDirectFBSurface *thiz, + int *width, + int *height ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + if (!width && !height) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_GetVisibleRectangle( IDirectFBSurface *thiz, + DFBRectangle *rect ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + if (!rect) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_GetPixelFormat( IDirectFBSurface *thiz, + DFBSurfacePixelFormat *format ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + if (!format) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_GetAccelerationMask( IDirectFBSurface *thiz, + IDirectFBSurface *source, + DFBAccelerationMask *mask ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + if (!mask) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_GetPalette( IDirectFBSurface *thiz, + IDirectFBPalette **interface_ptr ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + if (!interface_ptr) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_SetPalette( IDirectFBSurface *thiz, + IDirectFBPalette *palette ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + if (!palette) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_SetAlphaRamp( IDirectFBSurface *thiz, + u8 a0, u8 a1, u8 a2, u8 a3 ) + +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_Lock( IDirectFBSurface *thiz, + DFBSurfaceLockFlags flags, + void **ret_ptr, int *ret_pitch ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + if (!flags || !ret_ptr || !ret_pitch) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_GetFramebufferOffset( IDirectFBSurface *thiz, + int *offset ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + if (!offset) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_Unlock( IDirectFBSurface *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_Flip( IDirectFBSurface *thiz, + const DFBRegion *region, + DFBSurfaceFlipFlags flags ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_SetField( IDirectFBSurface *thiz, + int field ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + if (field < 0 || field > 1) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_Clear( IDirectFBSurface *thiz, + u8 r, u8 g, u8 b, u8 a ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_SetClip( IDirectFBSurface *thiz, + const DFBRegion *clip ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_GetClip( IDirectFBSurface *thiz, + DFBRegion *clip ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + if (!clip) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_SetColor( IDirectFBSurface *thiz, + u8 r, u8 g, u8 b, u8 a ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_SetColorIndex( IDirectFBSurface *thiz, + unsigned int index ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_SetSrcBlendFunction( IDirectFBSurface *thiz, + DFBSurfaceBlendFunction src ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_SetDstBlendFunction( IDirectFBSurface *thiz, + DFBSurfaceBlendFunction dst ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_SetPorterDuff( IDirectFBSurface *thiz, + DFBSurfacePorterDuffRule rule ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_SetSrcColorKey( IDirectFBSurface *thiz, + u8 r, + u8 g, + u8 b ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_SetSrcColorKeyIndex( IDirectFBSurface *thiz, + unsigned int index ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_SetDstColorKey( IDirectFBSurface *thiz, + u8 r, + u8 g, + u8 b ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_SetDstColorKeyIndex( IDirectFBSurface *thiz, + unsigned int index ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_SetFont( IDirectFBSurface *thiz, + IDirectFBFont *font ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_GetFont( IDirectFBSurface *thiz, + IDirectFBFont **font ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_SetDrawingFlags( IDirectFBSurface *thiz, + DFBSurfaceDrawingFlags flags ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_FillRectangle( IDirectFBSurface *thiz, + int x, int y, int w, int h ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_FillRectangles( IDirectFBSurface *thiz, + const DFBRectangle *rects, + unsigned int num_rects ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_FillSpans( IDirectFBSurface *thiz, + int y, + const DFBSpan *spans, + unsigned int num_spans ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + return DFB_UNIMPLEMENTED; +} + + +static DFBResult +IDirectFBSurface_Dispatcher_DrawLine( IDirectFBSurface *thiz, + int x1, int y1, int x2, int y2 ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_DrawLines( IDirectFBSurface *thiz, + const DFBRegion *lines, + unsigned int num_lines ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + if (!lines || !num_lines) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_DrawRectangle( IDirectFBSurface *thiz, + int x, int y, int w, int h ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + if (w<=0 || h<=0) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_FillTriangle( IDirectFBSurface *thiz, + int x1, int y1, + int x2, int y2, + int x3, int y3 ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_SetBlittingFlags( IDirectFBSurface *thiz, + DFBSurfaceBlittingFlags flags ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_Blit( IDirectFBSurface *thiz, + IDirectFBSurface *source, + const DFBRectangle *rect, + int x, + int y ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + if (!source) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_TileBlit( IDirectFBSurface *thiz, + IDirectFBSurface *source, + const DFBRectangle *rect, + int x, + int y ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + if (!source) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_BatchBlit( IDirectFBSurface *thiz, + IDirectFBSurface *source, + const DFBRectangle *source_rects, + const DFBPoint *dest_points, + int num ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + if (!source || !source_rects || !dest_points || num < 1) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_StretchBlit( IDirectFBSurface *thiz, + IDirectFBSurface *source, + const DFBRectangle *source_rect, + const DFBRectangle *destination_rect ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + if (!source) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_TextureTriangles( IDirectFBSurface *thiz, + IDirectFBSurface *source, + const DFBVertex *vertices, + const int *indices, + int num, + DFBTriangleFormation formation ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + if (!source || !vertices || num < 3) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_DrawString( IDirectFBSurface *thiz, + const char *text, int bytes, + int x, int y, + DFBSurfaceTextFlags flags ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + if (!text) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_DrawGlyph( IDirectFBSurface *thiz, + unsigned int index, int x, int y, + DFBSurfaceTextFlags flags ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + if (!index) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_SetEncoding( IDirectFBSurface *thiz, + DFBTextEncodingID encoding ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_GetSubSurface( IDirectFBSurface *thiz, + const DFBRectangle *rect, + IDirectFBSurface **surface ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + if (!surface) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_GetGL( IDirectFBSurface *thiz, + IDirectFBGL **interface_ptr ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + if (!interface_ptr) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_Dump( IDirectFBSurface *thiz, + const char *directory, + const char *prefix ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + if (!directory || !prefix) + return DFB_INVARG; + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_DisableAcceleration( IDirectFBSurface *thiz, + DFBAccelerationMask mask ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_ReleaseSource( IDirectFBSurface *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Dispatcher_SetIndexTranslation( IDirectFBSurface *thiz, + const int *indices, + int num_indices ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + return DFB_UNIMPLEMENTED; +} + +/**************************************************************************************************/ + +static DirectResult +Dispatch_Release( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + return voodoo_manager_unregister_local( manager, data->self ); +} + +static DirectResult +Dispatch_GetPosition( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DFBResult ret; + DFBPoint position; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + ret = real->GetPosition( real, &position.x, &position.y ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_DATA, sizeof(DFBPoint), &position, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetSize( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DFBResult ret; + DFBDimension dimension; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + ret = real->GetSize( real, &dimension.w, &dimension.h ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_DATA, sizeof(DFBDimension), &dimension, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetVisibleRectangle( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DFBResult ret; + DFBRectangle rect; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + ret = real->GetVisibleRectangle( real, &rect ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_DATA, sizeof(DFBRectangle), &rect, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetPixelFormat( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DFBResult ret; + DFBSurfacePixelFormat format; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + ret = real->GetPixelFormat( real, &format ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_INT, format, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetAccelerationMask( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + VoodooMessageParser parser; + VoodooInstanceID instance; + void *surface = NULL; + DFBAccelerationMask mask; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_ID( parser, instance ); + VOODOO_PARSER_END( parser ); + + if (instance != VOODOO_INSTANCE_NONE) { + ret = voodoo_manager_lookup_local( manager, instance, NULL, &surface ); + if (ret) + return ret; + } + + ret = real->GetAccelerationMask( real, surface, &mask ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_INT, mask, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetPalette( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + IDirectFBPalette *palette; + VoodooInstanceID instance; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + ret = real->GetPalette( real, &palette ); + if (ret) + return ret; + + ret = voodoo_construct_dispatcher( manager, "IDirectFBPalette", palette, + data->super, NULL, &instance, NULL ); + if (ret) { + palette->Release( palette ); + return ret; + } + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, instance, + VMBT_NONE ); +} + +static DirectResult +Dispatch_SetPalette( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + VoodooMessageParser parser; + VoodooInstanceID instance; + void *palette; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_ID( parser, instance ); + VOODOO_PARSER_END( parser ); + + ret = voodoo_manager_lookup_local( manager, instance, NULL, &palette ); + if (ret) + return ret; + + real->SetPalette( real, palette ); + + return DFB_OK; +} + +static DirectResult +Dispatch_Flip( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + VoodooMessageParser parser; + const DFBRegion *region; + DFBSurfaceFlipFlags flags; + unsigned int millis; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_ODATA( parser, region ); + VOODOO_PARSER_GET_INT( parser, flags ); + if (data->remote) + VOODOO_PARSER_GET_UINT( parser, millis ); + VOODOO_PARSER_END( parser ); + + ret = real->Flip( real, region, flags ); + + if (data->remote) + voodoo_manager_request( manager, data->remote, + IDIRECTFBSURFACE_REQUESTOR_METHOD_ID_FlipNotify, VREQ_NONE, NULL, + VMBT_UINT, millis, + VMBT_NONE ); + + if (flags & DSFLIP_WAIT) + return voodoo_manager_respond( manager, true, msg->header.serial, + ret, VOODOO_INSTANCE_NONE, + VMBT_NONE ); + + return DFB_OK; +} + +static DirectResult +Dispatch_Clear( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + VoodooMessageParser parser; + const DFBColor *color; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_DATA( parser, color ); + VOODOO_PARSER_END( parser ); + + real->Clear( real, color->r, color->g, color->b, color->a ); + + return DFB_OK; +} + +static DirectResult +Dispatch_SetClip( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + VoodooMessageParser parser; + const DFBRegion *clip; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_ODATA( parser, clip ); + VOODOO_PARSER_END( parser ); + + real->SetClip( real, clip ); + + return DFB_OK; +} + +static DirectResult +Dispatch_SetColor( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + VoodooMessageParser parser; + const DFBColor *color; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_DATA( parser, color ); + VOODOO_PARSER_END( parser ); + + real->SetColor( real, color->r, color->g, color->b, color->a ); + + return DFB_OK; +} + +static DirectResult +Dispatch_SetSrcColorKey( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + VoodooMessageParser parser; + const DFBColor *color; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_DATA( parser, color ); + VOODOO_PARSER_END( parser ); + + real->SetSrcColorKey( real, color->r, color->g, color->b ); + + return DFB_OK; +} + +static DirectResult +Dispatch_SetSrcColorKeyIndex( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + VoodooMessageParser parser; + unsigned int index; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_UINT( parser, index ); + VOODOO_PARSER_END( parser ); + + real->SetSrcColorKeyIndex( real, index ); + + return DFB_OK; +} + +static DirectResult +Dispatch_SetDstColorKey( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + VoodooMessageParser parser; + const DFBColor *color; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_DATA( parser, color ); + VOODOO_PARSER_END( parser ); + + real->SetDstColorKey( real, color->r, color->g, color->b ); + + return DFB_OK; +} + +static DirectResult +Dispatch_SetDstColorKeyIndex( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + VoodooMessageParser parser; + unsigned int index; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_UINT( parser, index ); + VOODOO_PARSER_END( parser ); + + real->SetDstColorKeyIndex( real, index ); + + return DFB_OK; +} + +static DirectResult +Dispatch_SetBlittingFlags( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + VoodooMessageParser parser; + DFBSurfaceBlittingFlags flags; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_INT( parser, flags ); + VOODOO_PARSER_END( parser ); + + real->SetBlittingFlags( real, flags ); + + return DFB_OK; +} + +static DirectResult +Dispatch_Blit( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + VoodooMessageParser parser; + VoodooInstanceID instance; + const DFBRectangle *rect; + const DFBPoint *point; + void *surface; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_ID( parser, instance ); + VOODOO_PARSER_GET_ODATA( parser, rect ); + VOODOO_PARSER_GET_DATA( parser, point ); + VOODOO_PARSER_END( parser ); + + ret = voodoo_manager_lookup_local( manager, instance, NULL, &surface ); + if (ret) + return ret; + + real->Blit( real, surface, rect, point->x, point->y ); + + return DFB_OK; +} + +static DirectResult +Dispatch_TileBlit( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + VoodooMessageParser parser; + VoodooInstanceID instance; + const DFBRectangle *rect; + const DFBPoint *point; + void *surface; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_ID( parser, instance ); + VOODOO_PARSER_GET_ODATA( parser, rect ); + VOODOO_PARSER_GET_DATA( parser, point ); + VOODOO_PARSER_END( parser ); + + ret = voodoo_manager_lookup_local( manager, instance, NULL, &surface ); + if (ret) + return ret; + + real->TileBlit( real, surface, rect, point->x, point->y ); + + return DFB_OK; +} + +static DirectResult +Dispatch_BatchBlit( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + VoodooMessageParser parser; + VoodooInstanceID instance; + unsigned int num; + const DFBRectangle *source_rects; + const DFBPoint *dest_points; + void *surface; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_ID( parser, instance ); + VOODOO_PARSER_GET_UINT( parser, num ); + VOODOO_PARSER_GET_DATA( parser, source_rects ); + VOODOO_PARSER_GET_DATA( parser, dest_points ); + VOODOO_PARSER_END( parser ); + + ret = voodoo_manager_lookup_local( manager, instance, NULL, &surface ); + if (ret) + return ret; + + real->BatchBlit( real, surface, source_rects, dest_points, num ); + + return DFB_OK; +} + +static DirectResult +Dispatch_StretchBlit( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + VoodooMessageParser parser; + VoodooInstanceID instance; + const DFBRectangle *srect; + const DFBRectangle *drect; + void *surface; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_ID( parser, instance ); + VOODOO_PARSER_GET_ODATA( parser, srect ); + VOODOO_PARSER_GET_ODATA( parser, drect ); + VOODOO_PARSER_END( parser ); + + ret = voodoo_manager_lookup_local( manager, instance, NULL, &surface ); + if (ret) + return ret; + + real->StretchBlit( real, surface, srect, drect ); + + return DFB_OK; +} + +static DirectResult +Dispatch_TextureTriangles( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + VoodooMessageParser parser; + VoodooInstanceID instance; + const DFBVertex *vertices; + const int *indices; + int num; + DFBTriangleFormation formation; + void *surface; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_ID( parser, instance ); + VOODOO_PARSER_GET_DATA( parser, vertices ); + VOODOO_PARSER_GET_ODATA( parser, indices ); + VOODOO_PARSER_GET_INT( parser, num ); + VOODOO_PARSER_GET_INT( parser, formation ); + VOODOO_PARSER_END( parser ); + + ret = voodoo_manager_lookup_local( manager, instance, NULL, &surface ); + if (ret) + return ret; + + real->TextureTriangles( real, surface, vertices, indices, num, formation ); + + return DFB_OK; +} + +static DirectResult +Dispatch_SetDrawingFlags( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + VoodooMessageParser parser; + DFBSurfaceDrawingFlags flags; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_INT( parser, flags ); + VOODOO_PARSER_END( parser ); + + real->SetDrawingFlags( real, flags ); + + return DFB_OK; +} + +static DirectResult +Dispatch_FillRectangle( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + VoodooMessageParser parser; + const DFBRectangle *rect; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_DATA( parser, rect ); + VOODOO_PARSER_END( parser ); + + real->FillRectangle( real, rect->x, rect->y, rect->w, rect->h ); + + return DFB_OK; +} + +static DirectResult +Dispatch_FillRectangles( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + VoodooMessageParser parser; + unsigned int num_rects; + const DFBRectangle *rects; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_UINT( parser, num_rects ); + VOODOO_PARSER_GET_DATA( parser, rects ); + VOODOO_PARSER_END( parser ); + + real->FillRectangles( real, rects, num_rects ); + + return DFB_OK; +} + +static DirectResult +Dispatch_FillSpans( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + VoodooMessageParser parser; + int y; + unsigned int num_spans; + const DFBSpan *spans; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_INT( parser, y ); + VOODOO_PARSER_GET_UINT( parser, num_spans ); + VOODOO_PARSER_GET_DATA( parser, spans ); + VOODOO_PARSER_END( parser ); + + real->FillSpans( real, y, spans, num_spans ); + + return DFB_OK; +} + +static DirectResult +Dispatch_DrawLine( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + VoodooMessageParser parser; + const DFBRegion *line; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_DATA( parser, line ); + VOODOO_PARSER_END( parser ); + + real->DrawLine( real, line->x1, line->y1, line->x2, line->y2 ); + + return DFB_OK; +} + +static DirectResult +Dispatch_DrawLines( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + VoodooMessageParser parser; + unsigned int num_lines; + const DFBRegion *lines; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_UINT( parser, num_lines ); + VOODOO_PARSER_GET_DATA( parser, lines ); + VOODOO_PARSER_END( parser ); + + real->DrawLines( real, lines, num_lines ); + + return DFB_OK; +} + +static DirectResult +Dispatch_DrawRectangle( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + VoodooMessageParser parser; + const DFBRectangle *rect; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_DATA( parser, rect ); + VOODOO_PARSER_END( parser ); + + real->DrawRectangle( real, rect->x, rect->y, rect->w, rect->h ); + + return DFB_OK; +} + +static DirectResult +Dispatch_FillTriangle( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + VoodooMessageParser parser; + const DFBTriangle *tri; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_DATA( parser, tri ); + VOODOO_PARSER_END( parser ); + + real->FillTriangle( real, tri->x1, tri->y1, tri->x2, tri->y2, tri->x3, tri->y3 ); + + return DFB_OK; +} + +static DirectResult +Dispatch_SetFont( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + VoodooMessageParser parser; + VoodooInstanceID instance; + void *font; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_ID( parser, instance ); + VOODOO_PARSER_END( parser ); + + if (instance == VOODOO_INSTANCE_NONE) { + real->SetFont( real, NULL ); + + return DFB_OK; + } + + ret = voodoo_manager_lookup_local( manager, instance, NULL, &font ); + if (ret) + return ret; + + real->SetFont( real, font ); + + return DFB_OK; +} + +static DirectResult +Dispatch_DrawString( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + VoodooMessageParser parser; + const char *text; + int bytes; + const DFBPoint *point; + DFBSurfaceTextFlags flags; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_DATA( parser, text ); + VOODOO_PARSER_GET_INT( parser, bytes ); + VOODOO_PARSER_GET_DATA( parser, point ); + VOODOO_PARSER_GET_INT( parser, flags ); + VOODOO_PARSER_END( parser ); + + real->DrawString( real, text, bytes, point->x, point->y, flags ); + + return DFB_OK; +} + +static DirectResult +Dispatch_DrawGlyph( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + VoodooMessageParser parser; + unsigned int index; + const DFBPoint *point; + DFBSurfaceTextFlags flags; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_UINT( parser, index ); + VOODOO_PARSER_GET_DATA( parser, point ); + VOODOO_PARSER_GET_INT( parser, flags ); + VOODOO_PARSER_END( parser ); + + real->DrawGlyph( real, index, point->x, point->y, flags ); + + return DFB_OK; +} + +static DirectResult +Dispatch_SetEncoding( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + VoodooMessageParser parser; + DFBTextEncodingID encoding; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_UINT( parser, encoding ); + VOODOO_PARSER_END( parser ); + + real->SetEncoding( real, encoding ); + + return DFB_OK; +} + +static DirectResult +Dispatch_GetSubSurface( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + VoodooMessageParser parser; + const DFBRectangle *rect; + IDirectFBSurface *surface; + VoodooInstanceID instance; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_ODATA( parser, rect ); + VOODOO_PARSER_END( parser ); + + ret = real->GetSubSurface( real, rect, &surface ); + if (ret) + return ret; + + ret = voodoo_construct_dispatcher( manager, "IDirectFBSurface", surface, + data->super, NULL, &instance, NULL ); + if (ret) { + surface->Release( surface ); + return ret; + } + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, instance, + VMBT_NONE ); +} + +static DirectResult +Dispatch_DisableAcceleration( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + VoodooMessageParser parser; + DFBAccelerationMask mask; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_INT( parser, mask ); + VOODOO_PARSER_END( parser ); + + real->DisableAcceleration( real, mask ); + + return DFB_OK; +} + +static DirectResult +Dispatch_ReleaseSource( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + real->ReleaseSource( real ); + + return DFB_OK; +} + +#define RLE16_KEY 0xf001 + +static void +rle16_decode( const u16 *src, + u16 *dst, + unsigned int num ) +{ + unsigned int n = 0, last, count, out = 0; + + while (out < num) { + last = src[n++]; + + if (last == RLE16_KEY) { + count = src[n++]; + + if (count == RLE16_KEY) { + dst[out++] = RLE16_KEY; + } + else { + last = src[n++]; + + while (count >= 4) { + dst[out+0] = + dst[out+1] = + dst[out+2] = + dst[out+3] = last; + + out += 4; + count -= 4; + } + + while (count >= 2) { + dst[out+0] = + dst[out+1] = last; + + out += 2; + count -= 2; + } + + while (count--) + dst[out++] = last; + } + } + else + dst[out++] = last; + } + + D_ASSERT( out == num ); +} + +#define RLE32_KEY 0xf0012345 + +static void +rle32_decode( const u32 *src, + u32 *dst, + unsigned int num ) +{ + unsigned int n = 0, last, count, out = 0; + + while (out < num) { + last = src[n++]; + + if (last == RLE32_KEY) { + count = src[n++]; + + if (count == RLE32_KEY) { + dst[out++] = RLE32_KEY; + } + else { + last = src[n++]; + + while (count >= 4) { + dst[out+0] = + dst[out+1] = + dst[out+2] = + dst[out+3] = last; + + out += 4; + count -= 4; + } + + while (count >= 2) { + dst[out+0] = + dst[out+1] = last; + + out += 2; + count -= 2; + } + + while (count--) + dst[out++] = last; + } + } + else + dst[out++] = last; + } + + D_ASSERT( out == num ); +} + +static DirectResult +Dispatch_Write( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + VoodooMessageParser parser; + unsigned int encoded; + const DFBRectangle *rect; + const void *ptr; + int pitch; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_UINT( parser, encoded ); + VOODOO_PARSER_GET_DATA( parser, rect ); + VOODOO_PARSER_GET_DATA( parser, ptr ); + VOODOO_PARSER_GET_INT( parser, pitch ); + VOODOO_PARSER_END( parser ); + + if (encoded) { + switch (encoded) { + case 2: { + if (rect->w > 2048) { + u16 *buf = D_MALLOC( rect->w * 2 ); + + if (buf) { + rle16_decode( ptr, buf, rect->w ); + + real->Write( real, rect, buf, pitch ); + + D_FREE( buf ); + } + else + D_OOM(); + } + else { + u16 buf[2048]; + + rle16_decode( ptr, buf, rect->w ); + + real->Write( real, rect, buf, pitch ); + } + break; + } + + case 4: { + if (rect->w > 1024) { + u32 *buf = D_MALLOC( rect->w * 4 ); + + if (buf) { + rle32_decode( ptr, buf, rect->w ); + + real->Write( real, rect, buf, pitch ); + + D_FREE( buf ); + } + else + D_OOM(); + } + else { + u32 buf[1024]; + + rle32_decode( ptr, buf, rect->w ); + + real->Write( real, rect, buf, pitch ); + } + break; + } + + default: + D_UNIMPLEMENTED(); + break; + } + } + else + real->Write( real, rect, ptr, pitch ); + + return DFB_OK; +} + +#define RLE16_KEY 0xf001 + +static bool +rle16_encode( const u16 *src, + u16 *dst, + unsigned int num, + unsigned int *ret_num ) +{ + unsigned int n, last, count = 0, out = 0; + + for (n=0; n num) { + *ret_num = num; + return false; + } + + if (count > 0) { + D_ASSERT( src[n] == last ); + + count++; + } + else { + count = 1; + last = src[n]; + } + + if (n == num-1 || src[n+1] != last) { + if (count > 2 || (count > 1 && last == RLE16_KEY)) { + dst[out++] = RLE16_KEY; + dst[out++] = count; + dst[out++] = last; + } + else { + if (count > 1 || last == RLE16_KEY) + dst[out++] = last; + + dst[out++] = last; + } + + count = 0; + } + } + + *ret_num = out; + + return true; +} + +#define RLE32_KEY 0xf0012345 + +static bool +rle32_encode( const u32 *src, + u32 *dst, + unsigned int num, + unsigned int *ret_num ) +{ + unsigned int n, last, count = 0, out = 0; + + for (n=0; n num) { + *ret_num = num; + return false; + } + + if (count > 0) { + D_ASSERT( src[n] == last ); + + count++; + } + else { + count = 1; + last = src[n]; + } + + if (n == num-1 || src[n+1] != last) { + if (count > 2 || (count > 1 && last == RLE32_KEY)) { + dst[out++] = RLE32_KEY; + dst[out++] = count; + dst[out++] = last; + } + else { + if (count > 1 || last == RLE32_KEY) + dst[out++] = last; + + dst[out++] = last; + } + + count = 0; + } + } + + *ret_num = out; + + return true; +} + +static DirectResult +Dispatch_Read( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + VoodooMessageParser parser; + const DFBRectangle *rect; + int len; + int y; + void *buf; + DFBSurfacePixelFormat format; + unsigned int encoded; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_DATA( parser, rect ); + VOODOO_PARSER_END( parser ); + + real->GetPixelFormat( real, &format ); + + len = DFB_BYTES_PER_LINE( format, rect->w ); + buf = alloca( len ); + + + switch (voodoo_config->compression_min ? DSPF_UNKNOWN : format) { + case DSPF_RGB16: { + u16 tmp[rect->w]; + + for (y=0; yh; y++) { + unsigned int num; + DFBRectangle r = { rect->x, rect->y + y, rect->w, 1 }; + + real->Read( real, &r, buf, len ); + + encoded = rle16_encode( buf, tmp, rect->w, &num ); + + ret = voodoo_manager_respond( manager, y == rect->h - 1, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_UINT, encoded ? 2 : 0, + VMBT_DATA, DFB_BYTES_PER_LINE( format, num ), + encoded ? tmp : buf, + VMBT_NONE ); + if (ret) + break; + } + break; + } + + case DSPF_RGB32: + case DSPF_ARGB: { + u32 tmp[rect->w]; + + for (y=0; yh; y++) { + unsigned int num; + DFBRectangle r = { rect->x, rect->y + y, rect->w, 1 }; + + real->Read( real, &r, buf, len ); + + encoded = rle32_encode( buf, tmp, rect->w, &num ); + + ret = voodoo_manager_respond( manager, y == rect->h - 1, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_UINT, encoded ? 4 : 0, + VMBT_DATA, DFB_BYTES_PER_LINE( format, num ), + encoded ? tmp : buf, + VMBT_NONE ); + if (ret) + break; + } + break; + } + + default: + for (y=0; yh; y++) { + DFBRectangle r = { rect->x, rect->y + y, rect->w, 1 }; + + real->Read( real, &r, buf, len ); + + voodoo_manager_respond( manager, y == rect->h - 1, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_UINT, 0, + VMBT_DATA, len, buf, + VMBT_NONE ); + } + break; + } + + return DFB_OK; +} + +static DirectResult +Dispatch_SetRenderOptions( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + VoodooMessageParser parser; + DFBSurfaceRenderOptions options; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_INT( parser, options ); + VOODOO_PARSER_END( parser ); + + real->SetRenderOptions( real, options ); + + return DFB_OK; +} + +static DirectResult +Dispatch_SetMatrix( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + VoodooMessageParser parser; + const s32 *matrix; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_DATA( parser, matrix ); + VOODOO_PARSER_END( parser ); + + real->SetMatrix( real, matrix ); + + return DFB_OK; +} + +static DirectResult +Dispatch_SetRemoteInstance( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + VoodooMessageParser parser; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_ID( parser, data->remote ); + VOODOO_PARSER_END( parser ); + + return voodoo_manager_respond( manager, true, msg->header.serial, DR_OK, VOODOO_INSTANCE_NONE, VMBT_NONE ); +} + +static DirectResult +Dispatch( void *dispatcher, void *real, VoodooManager *manager, VoodooRequestMessage *msg ) +{ + D_DEBUG( "IDirectFBSurface/Dispatcher: " + "Handling request for instance %u with method %u...\n", msg->instance, msg->method ); + + switch (msg->method) { + case IDIRECTFBSURFACE_METHOD_ID_Release: + return Dispatch_Release( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_GetPosition: + return Dispatch_GetPosition( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_GetSize: + return Dispatch_GetSize( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_GetVisibleRectangle: + return Dispatch_GetVisibleRectangle( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_GetPixelFormat: + return Dispatch_GetPixelFormat( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_GetAccelerationMask: + return Dispatch_GetAccelerationMask( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_GetPalette: + return Dispatch_GetPalette( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_SetPalette: + return Dispatch_SetPalette( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_Flip: + return Dispatch_Flip( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_Clear: + return Dispatch_Clear( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_SetClip: + return Dispatch_SetClip( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_SetColor: + return Dispatch_SetColor( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_SetSrcColorKey: + return Dispatch_SetSrcColorKey( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_SetSrcColorKeyIndex: + return Dispatch_SetSrcColorKeyIndex( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_SetDstColorKey: + return Dispatch_SetDstColorKey( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_SetDstColorKeyIndex: + return Dispatch_SetDstColorKeyIndex( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_SetBlittingFlags: + return Dispatch_SetBlittingFlags( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_Blit: + return Dispatch_Blit( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_TileBlit: + return Dispatch_TileBlit( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_BatchBlit: + return Dispatch_BatchBlit( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_StretchBlit: + return Dispatch_StretchBlit( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_TextureTriangles: + return Dispatch_TextureTriangles( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_SetDrawingFlags: + return Dispatch_SetDrawingFlags( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_FillRectangle: + return Dispatch_FillRectangle( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_DrawLine: + return Dispatch_DrawLine( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_DrawLines: + return Dispatch_DrawLines( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_DrawRectangle: + return Dispatch_DrawRectangle( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_FillTriangle: + return Dispatch_FillTriangle( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_SetFont: + return Dispatch_SetFont( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_DrawString: + return Dispatch_DrawString( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_DrawGlyph: + return Dispatch_DrawGlyph( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_SetEncoding: + return Dispatch_SetEncoding( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_GetSubSurface: + return Dispatch_GetSubSurface( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_FillRectangles: + return Dispatch_FillRectangles( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_FillSpans: + return Dispatch_FillSpans( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_DisableAcceleration: + return Dispatch_DisableAcceleration( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_ReleaseSource: + return Dispatch_ReleaseSource( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_Write: + return Dispatch_Write( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_Read: + return Dispatch_Read( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_SetRenderOptions: + return Dispatch_SetRenderOptions( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_SetMatrix: + return Dispatch_SetMatrix( dispatcher, real, manager, msg ); + + case IDIRECTFBSURFACE_METHOD_ID_SetRemoteInstance: + return Dispatch_SetRemoteInstance( dispatcher, real, manager, msg ); + } + + return DFB_NOSUCHMETHOD; +} + +/**************************************************************************************************/ + +static DFBResult +Probe() +{ + /* This implementation has to be loaded explicitly. */ + return DFB_UNSUPPORTED; +} + +static DFBResult +Construct( IDirectFBSurface *thiz, + IDirectFBSurface *real, + VoodooManager *manager, + VoodooInstanceID super, + void *arg, /* Optional arguments to constructor */ + VoodooInstanceID *ret_instance ) +{ + DFBResult ret; + + DIRECT_ALLOCATE_INTERFACE_DATA(thiz, IDirectFBSurface_Dispatcher) + + ret = voodoo_manager_register_local( manager, super, thiz, real, Dispatch, ret_instance ); + if (ret) { + DIRECT_DEALLOCATE_INTERFACE( thiz ); + return ret; + } + + data->ref = 1; + data->real = real; + data->super = super; + data->self = *ret_instance; + data->manager = manager; + + thiz->AddRef = IDirectFBSurface_Dispatcher_AddRef; + thiz->Release = IDirectFBSurface_Dispatcher_Release; + + thiz->GetCapabilities = IDirectFBSurface_Dispatcher_GetCapabilities; + thiz->GetPosition = IDirectFBSurface_Dispatcher_GetPosition; + thiz->GetSize = IDirectFBSurface_Dispatcher_GetSize; + thiz->GetVisibleRectangle = IDirectFBSurface_Dispatcher_GetVisibleRectangle; + thiz->GetPixelFormat = IDirectFBSurface_Dispatcher_GetPixelFormat; + thiz->GetAccelerationMask = IDirectFBSurface_Dispatcher_GetAccelerationMask; + + thiz->GetPalette = IDirectFBSurface_Dispatcher_GetPalette; + thiz->SetPalette = IDirectFBSurface_Dispatcher_SetPalette; + thiz->SetAlphaRamp = IDirectFBSurface_Dispatcher_SetAlphaRamp; + + thiz->Lock = IDirectFBSurface_Dispatcher_Lock; + thiz->GetFramebufferOffset = IDirectFBSurface_Dispatcher_GetFramebufferOffset; + thiz->Unlock = IDirectFBSurface_Dispatcher_Unlock; + thiz->Flip = IDirectFBSurface_Dispatcher_Flip; + thiz->SetField = IDirectFBSurface_Dispatcher_SetField; + thiz->Clear = IDirectFBSurface_Dispatcher_Clear; + + thiz->SetClip = IDirectFBSurface_Dispatcher_SetClip; + thiz->GetClip = IDirectFBSurface_Dispatcher_GetClip; + thiz->SetColor = IDirectFBSurface_Dispatcher_SetColor; + thiz->SetColorIndex = IDirectFBSurface_Dispatcher_SetColorIndex; + thiz->SetSrcBlendFunction = IDirectFBSurface_Dispatcher_SetSrcBlendFunction; + thiz->SetDstBlendFunction = IDirectFBSurface_Dispatcher_SetDstBlendFunction; + thiz->SetPorterDuff = IDirectFBSurface_Dispatcher_SetPorterDuff; + thiz->SetSrcColorKey = IDirectFBSurface_Dispatcher_SetSrcColorKey; + thiz->SetSrcColorKeyIndex = IDirectFBSurface_Dispatcher_SetSrcColorKeyIndex; + thiz->SetDstColorKey = IDirectFBSurface_Dispatcher_SetDstColorKey; + thiz->SetDstColorKeyIndex = IDirectFBSurface_Dispatcher_SetDstColorKeyIndex; + + thiz->SetBlittingFlags = IDirectFBSurface_Dispatcher_SetBlittingFlags; + thiz->Blit = IDirectFBSurface_Dispatcher_Blit; + thiz->TileBlit = IDirectFBSurface_Dispatcher_TileBlit; + thiz->BatchBlit = IDirectFBSurface_Dispatcher_BatchBlit; + thiz->StretchBlit = IDirectFBSurface_Dispatcher_StretchBlit; + thiz->TextureTriangles = IDirectFBSurface_Dispatcher_TextureTriangles; + + thiz->SetDrawingFlags = IDirectFBSurface_Dispatcher_SetDrawingFlags; + thiz->FillRectangle = IDirectFBSurface_Dispatcher_FillRectangle; + thiz->FillRectangles = IDirectFBSurface_Dispatcher_FillRectangles; + thiz->FillSpans = IDirectFBSurface_Dispatcher_FillSpans; + thiz->DrawLine = IDirectFBSurface_Dispatcher_DrawLine; + thiz->DrawLines = IDirectFBSurface_Dispatcher_DrawLines; + thiz->DrawRectangle = IDirectFBSurface_Dispatcher_DrawRectangle; + thiz->FillTriangle = IDirectFBSurface_Dispatcher_FillTriangle; + + thiz->SetFont = IDirectFBSurface_Dispatcher_SetFont; + thiz->GetFont = IDirectFBSurface_Dispatcher_GetFont; + thiz->DrawString = IDirectFBSurface_Dispatcher_DrawString; + thiz->DrawGlyph = IDirectFBSurface_Dispatcher_DrawGlyph; + thiz->SetEncoding = IDirectFBSurface_Dispatcher_SetEncoding; + + thiz->GetSubSurface = IDirectFBSurface_Dispatcher_GetSubSurface; + + thiz->GetGL = IDirectFBSurface_Dispatcher_GetGL; + + thiz->Dump = IDirectFBSurface_Dispatcher_Dump; + + thiz->DisableAcceleration = IDirectFBSurface_Dispatcher_DisableAcceleration; + + thiz->ReleaseSource = IDirectFBSurface_Dispatcher_ReleaseSource; + + thiz->SetIndexTranslation = IDirectFBSurface_Dispatcher_SetIndexTranslation; + + return DFB_OK; +} + diff --git a/Source/DirectFB/proxy/dispatcher/idirectfbsurface_dispatcher.h b/Source/DirectFB/proxy/dispatcher/idirectfbsurface_dispatcher.h new file mode 100755 index 0000000..5b2c7dc --- /dev/null +++ b/Source/DirectFB/proxy/dispatcher/idirectfbsurface_dispatcher.h @@ -0,0 +1,93 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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 __IDIRECTFBSURFACE_DISPATCHER_H__ +#define __IDIRECTFBSURFACE_DISPATCHER_H__ + +#define IDIRECTFBSURFACE_METHOD_ID_AddRef 1 +#define IDIRECTFBSURFACE_METHOD_ID_Release 2 +#define IDIRECTFBSURFACE_METHOD_ID_GetCapabilities 3 +#define IDIRECTFBSURFACE_METHOD_ID_GetSize 4 +#define IDIRECTFBSURFACE_METHOD_ID_GetVisibleRectangle 5 +#define IDIRECTFBSURFACE_METHOD_ID_GetPixelFormat 6 +#define IDIRECTFBSURFACE_METHOD_ID_GetAccelerationMask 7 +#define IDIRECTFBSURFACE_METHOD_ID_GetPalette 8 +#define IDIRECTFBSURFACE_METHOD_ID_SetPalette 9 +#define IDIRECTFBSURFACE_METHOD_ID_Lock 10 +#define IDIRECTFBSURFACE_METHOD_ID_Unlock 11 +#define IDIRECTFBSURFACE_METHOD_ID_Flip 12 +#define IDIRECTFBSURFACE_METHOD_ID_SetField 13 +#define IDIRECTFBSURFACE_METHOD_ID_Clear 14 +#define IDIRECTFBSURFACE_METHOD_ID_SetClip 15 +#define IDIRECTFBSURFACE_METHOD_ID_SetColor 16 +#define IDIRECTFBSURFACE_METHOD_ID_SetColorIndex 17 +#define IDIRECTFBSURFACE_METHOD_ID_SetSrcBlendFunction 18 +#define IDIRECTFBSURFACE_METHOD_ID_SetDstBlendFunction 19 +#define IDIRECTFBSURFACE_METHOD_ID_SetPorterDuff 20 +#define IDIRECTFBSURFACE_METHOD_ID_SetSrcColorKey 21 +#define IDIRECTFBSURFACE_METHOD_ID_SetSrcColorKeyIndex 22 +#define IDIRECTFBSURFACE_METHOD_ID_SetDstColorKey 23 +#define IDIRECTFBSURFACE_METHOD_ID_SetDstColorKeyIndex 24 +#define IDIRECTFBSURFACE_METHOD_ID_SetBlittingFlags 25 +#define IDIRECTFBSURFACE_METHOD_ID_Blit 26 +#define IDIRECTFBSURFACE_METHOD_ID_TileBlit 27 +#define IDIRECTFBSURFACE_METHOD_ID_BatchBlit 28 +#define IDIRECTFBSURFACE_METHOD_ID_StretchBlit 29 +#define IDIRECTFBSURFACE_METHOD_ID_TextureTriangles 30 +#define IDIRECTFBSURFACE_METHOD_ID_SetDrawingFlags 31 +#define IDIRECTFBSURFACE_METHOD_ID_FillRectangle 32 +#define IDIRECTFBSURFACE_METHOD_ID_DrawLine 33 +#define IDIRECTFBSURFACE_METHOD_ID_DrawLines 34 +#define IDIRECTFBSURFACE_METHOD_ID_DrawRectangle 35 +#define IDIRECTFBSURFACE_METHOD_ID_FillTriangle 36 +#define IDIRECTFBSURFACE_METHOD_ID_SetFont 37 +#define IDIRECTFBSURFACE_METHOD_ID_GetFont 38 +#define IDIRECTFBSURFACE_METHOD_ID_DrawString 39 +#define IDIRECTFBSURFACE_METHOD_ID_DrawGlyph 40 +#define IDIRECTFBSURFACE_METHOD_ID_GetSubSurface 41 +#define IDIRECTFBSURFACE_METHOD_ID_GetGL 42 +#define IDIRECTFBSURFACE_METHOD_ID_Dump 43 +#define IDIRECTFBSURFACE_METHOD_ID_FillRectangles 44 +#define IDIRECTFBSURFACE_METHOD_ID_FillSpans 45 +#define IDIRECTFBSURFACE_METHOD_ID_GetPosition 46 +#define IDIRECTFBSURFACE_METHOD_ID_SetEncoding 47 +#define IDIRECTFBSURFACE_METHOD_ID_DisableAcceleration 48 +#define IDIRECTFBSURFACE_METHOD_ID_ReleaseSource 49 +#define IDIRECTFBSURFACE_METHOD_ID_SetIndexTranslation 50 +#define IDIRECTFBSURFACE_METHOD_ID_SetRenderOptions 51 +#define IDIRECTFBSURFACE_METHOD_ID_SetMatrix 52 +#define IDIRECTFBSURFACE_METHOD_ID_SetSourceMask 53 +#define IDIRECTFBSURFACE_METHOD_ID_MakeSubSurface 54 +#define IDIRECTFBSURFACE_METHOD_ID_Write 55 +#define IDIRECTFBSURFACE_METHOD_ID_Read 56 +#define IDIRECTFBSURFACE_METHOD_ID_SetColors 57 +#define IDIRECTFBSURFACE_METHOD_ID_BatchBlit2 58 +#define IDIRECTFBSURFACE_METHOD_ID_SetRemoteInstance 59 +#define IDIRECTFBSURFACE_METHOD_ID_FillTrapezoids 60 + +#endif diff --git a/Source/DirectFB/proxy/dispatcher/idirectfbwindow_dispatcher.c b/Source/DirectFB/proxy/dispatcher/idirectfbwindow_dispatcher.c new file mode 100755 index 0000000..d3115f5 --- /dev/null +++ b/Source/DirectFB/proxy/dispatcher/idirectfbwindow_dispatcher.c @@ -0,0 +1,1391 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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. +*/ + +#include + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include "idirectfbwindow_dispatcher.h" + + +static DFBResult Probe( void ); +static DFBResult Construct( IDirectFBWindow *thiz, + IDirectFBWindow *real, + VoodooManager *manager, + VoodooInstanceID super, + void *arg, + VoodooInstanceID *ret_instance ); + +#include + +DIRECT_INTERFACE_IMPLEMENTATION( IDirectFBWindow, Dispatcher ) + + +/**************************************************************************************************/ + +static void +IDirectFBWindow_Dispatcher_Destruct( IDirectFBWindow *thiz ) +{ + IDirectFBWindow_Dispatcher_data *data; + + D_DEBUG( "%s (%p)\n", __FUNCTION__, thiz ); + + data = thiz->priv; + + data->real->Release( data->real ); + + DIRECT_DEALLOCATE_INTERFACE( thiz ); +} + +/**************************************************************************************************/ + +static DirectResult +IDirectFBWindow_Dispatcher_AddRef( IDirectFBWindow *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + data->ref++; + + return DFB_OK; +} + +static DirectResult +IDirectFBWindow_Dispatcher_Release( IDirectFBWindow *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + if (--data->ref == 0) + IDirectFBWindow_Dispatcher_Destruct( thiz ); + + return DFB_OK; +} + +static DFBResult +IDirectFBWindow_Dispatcher_CreateEventBuffer( IDirectFBWindow *thiz, + IDirectFBEventBuffer **buffer ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_AttachEventBuffer( IDirectFBWindow *thiz, + IDirectFBEventBuffer *buffer ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_DetachEventBuffer( IDirectFBWindow *thiz, + IDirectFBEventBuffer *buffer ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_EnableEvents( IDirectFBWindow *thiz, + DFBWindowEventType mask ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_DisableEvents( IDirectFBWindow *thiz, + DFBWindowEventType mask ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_GetID( IDirectFBWindow *thiz, + DFBWindowID *id ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_GetPosition( IDirectFBWindow *thiz, + int *x, + int *y ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_GetSize( IDirectFBWindow *thiz, + int *width, + int *height ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_GetSurface( IDirectFBWindow *thiz, + IDirectFBSurface **surface ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_SetProperty( IDirectFBWindow *thiz, + const char *key, + void *value, + void **old_value ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_GetProperty( IDirectFBWindow *thiz, + const char *key, + void **value ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_RemoveProperty( IDirectFBWindow *thiz, + const char *key, + void **value ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_SetOptions( IDirectFBWindow *thiz, + DFBWindowOptions options ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_GetOptions( IDirectFBWindow *thiz, + DFBWindowOptions *options ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_SetColorKey( IDirectFBWindow *thiz, + u8 r, + u8 g, + u8 b ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_SetColorKeyIndex( IDirectFBWindow *thiz, + unsigned int index ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_SetOpaqueRegion( IDirectFBWindow *thiz, + int x1, + int y1, + int x2, + int y2 ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_SetOpacity( IDirectFBWindow *thiz, + u8 opacity ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_GetOpacity( IDirectFBWindow *thiz, + u8 *opacity ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_SetCursorShape( IDirectFBWindow *thiz, + IDirectFBSurface *shape, + int hot_x, + int hot_y ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_RequestFocus( IDirectFBWindow *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_GrabKeyboard( IDirectFBWindow *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_UngrabKeyboard( IDirectFBWindow *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_GrabPointer( IDirectFBWindow *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_UngrabPointer( IDirectFBWindow *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_GrabKey( IDirectFBWindow *thiz, + DFBInputDeviceKeySymbol symbol, + DFBInputDeviceModifierMask modifiers ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_UngrabKey( IDirectFBWindow *thiz, + DFBInputDeviceKeySymbol symbol, + DFBInputDeviceModifierMask modifiers ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_Move( IDirectFBWindow *thiz, int dx, int dy ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_MoveTo( IDirectFBWindow *thiz, int x, int y ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_Resize( IDirectFBWindow *thiz, + int width, + int height ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_Raise( IDirectFBWindow *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_SetStackingClass( IDirectFBWindow *thiz, + DFBWindowStackingClass stacking_class ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_Lower( IDirectFBWindow *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_RaiseToTop( IDirectFBWindow *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_LowerToBottom( IDirectFBWindow *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_PutAtop( IDirectFBWindow *thiz, + IDirectFBWindow *lower ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_PutBelow( IDirectFBWindow *thiz, + IDirectFBWindow *upper ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_Close( IDirectFBWindow *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_Destroy( IDirectFBWindow *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_SetBounds( IDirectFBWindow *thiz, + int x, int y, int w, int h ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Dispatcher_ResizeSurface( IDirectFBWindow *thiz, + int width, + int height ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + + +/**************************************************************************************************/ + +static DirectResult +Dispatch_Release( IDirectFBWindow *thiz, IDirectFBWindow *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + return voodoo_manager_unregister_local( data->manager, data->self ); +} + +static DirectResult +Dispatch_CreateEventBuffer( IDirectFBWindow *thiz, IDirectFBWindow *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + IDirectFBEventBuffer *buffer; + VoodooInstanceID instance; + VoodooMessageParser parser; + void *requestor; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_ID( parser, instance ); + VOODOO_PARSER_END( parser ); + + ret = real->CreateEventBuffer( real, &buffer ); + if (ret) + return ret; + + ret = voodoo_construct_requestor( manager, "IDirectFBEventBuffer", + instance, buffer, &requestor ); + + buffer->Release( buffer ); + + return voodoo_manager_respond( manager, true, msg->header.serial, + ret, VOODOO_INSTANCE_NONE, + VMBT_NONE ); +} + +static DirectResult +Dispatch_AttachEventBuffer( IDirectFBWindow *thiz, IDirectFBWindow *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + IDirectFBEventBuffer *buffer; + IDirectFBEventBuffer_Requestor_data *buffer_data; + VoodooInstanceID instance; + VoodooMessageParser parser; + void *ptr; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_ID( parser, instance ); + VOODOO_PARSER_END( parser ); + + ret = voodoo_manager_lookup_remote( manager, instance, &ptr ); + if (ret) + return ret; + + buffer = ptr; + + DIRECT_INTERFACE_GET_DATA_FROM( buffer, buffer_data, IDirectFBEventBuffer_Requestor ); + + ret = real->AttachEventBuffer( real, buffer_data->src ); + + return voodoo_manager_respond( manager, true, msg->header.serial, + ret, VOODOO_INSTANCE_NONE, + VMBT_NONE ); +} + +static DirectResult +Dispatch_EnableEvents( IDirectFBWindow *thiz, IDirectFBWindow *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + VoodooMessageParser parser; + DFBWindowEventType mask; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_UINT( parser, mask ); + VOODOO_PARSER_END( parser ); + + return real->EnableEvents( real, mask ); +} + +static DirectResult +Dispatch_DetachEventBuffer( IDirectFBWindow *thiz, IDirectFBWindow *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + IDirectFBEventBuffer *buffer; + IDirectFBEventBuffer_Requestor_data *buffer_data; + VoodooInstanceID instance; + VoodooMessageParser parser; + void *ptr; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_ID( parser, instance ); + VOODOO_PARSER_END( parser ); + + ret = voodoo_manager_lookup_remote( manager, instance, &ptr ); + if (ret) + return ret; + + buffer = ptr; + + DIRECT_INTERFACE_GET_DATA_FROM( buffer, buffer_data, IDirectFBEventBuffer_Requestor ); + + ret = real->DetachEventBuffer( real, buffer_data->src ); + + return voodoo_manager_respond( manager, true, msg->header.serial, + ret, VOODOO_INSTANCE_NONE, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetID( IDirectFBWindow *thiz, IDirectFBWindow *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + DFBWindowID id; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + ret = real->GetID( real, &id ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_ID, id, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetPosition( IDirectFBWindow *thiz, IDirectFBWindow *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + DFBPoint position; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + ret = real->GetPosition( real, &position.x, &position.y ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_DATA, sizeof(DFBPoint), &position, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetSize( IDirectFBWindow *thiz, IDirectFBWindow *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + DFBDimension size; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + ret = real->GetSize( real, &size.w, &size.h ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_DATA, sizeof(DFBDimension), &size, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetSurface( IDirectFBWindow *thiz, IDirectFBWindow *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + IDirectFBSurface *surface; + VoodooInstanceID instance; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + ret = real->GetSurface( real, &surface ); + if (ret) + return ret; + + ret = voodoo_construct_dispatcher( manager, "IDirectFBSurface", + surface, data->super, NULL, &instance, NULL ); + if (ret) { + surface->Release( surface ); + return ret; + } + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, instance, + VMBT_NONE ); +} + +static DirectResult +Dispatch_SetOptions( IDirectFBWindow *thiz, IDirectFBWindow *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DFBResult ret; + VoodooMessageParser parser; + DFBWindowOptions options; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_INT( parser, options ); + VOODOO_PARSER_END( parser ); + + ret = real->SetOptions( real, options ); + + return DFB_OK; +} + +static DirectResult +Dispatch_GetOptions( IDirectFBWindow *thiz, IDirectFBWindow *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + DFBWindowOptions options; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + ret = real->GetOptions( real, &options ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_INT, options, + VMBT_NONE ); +} + +static DirectResult +Dispatch_SetOpacity( IDirectFBWindow *thiz, IDirectFBWindow *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + VoodooMessageParser parser; + u8 opacity; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_UINT( parser, opacity ); + VOODOO_PARSER_END( parser ); + + real->SetOpacity( real, opacity ); + + return DFB_OK; +} + +static DirectResult +Dispatch_GetOpacity( IDirectFBWindow *thiz, IDirectFBWindow *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + u8 opacity; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + ret = real->GetOpacity( real, &opacity ); + if (ret) + return ret; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_UINT, opacity, + VMBT_NONE ); +} + +static DirectResult +Dispatch_SetCursorShape( IDirectFBWindow *thiz, IDirectFBWindow *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + VoodooMessageParser parser; + VoodooInstanceID instance; + const DFBPoint *hot; + void *surface; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_ID( parser, instance ); + VOODOO_PARSER_GET_DATA( parser, hot ); + VOODOO_PARSER_END( parser ); + + ret = voodoo_manager_lookup_local( manager, instance, NULL, &surface ); + if (ret) + return ret; + + ret = real->SetCursorShape( real, surface, hot->x, hot->y ); + + return voodoo_manager_respond( manager, true, msg->header.serial, + ret, VOODOO_INSTANCE_NONE, + VMBT_NONE ); +} + +static DirectResult +Dispatch_RequestFocus( IDirectFBWindow *thiz, IDirectFBWindow *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DFBResult ret; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + ret = real->RequestFocus( real ); + + return voodoo_manager_respond( manager, true, msg->header.serial, + ret, VOODOO_INSTANCE_NONE, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GrabPointer( IDirectFBWindow *thiz, IDirectFBWindow *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + ret = real->GrabPointer( real ); + + return voodoo_manager_respond( manager, true, msg->header.serial, + ret, VOODOO_INSTANCE_NONE, + VMBT_NONE ); +} + +static DirectResult +Dispatch_UngrabPointer( IDirectFBWindow *thiz, IDirectFBWindow *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + ret = real->UngrabPointer( real ); + + return voodoo_manager_respond( manager, true, msg->header.serial, + ret, VOODOO_INSTANCE_NONE, + VMBT_NONE ); +} + +static DirectResult +Dispatch_Move( IDirectFBWindow *thiz, IDirectFBWindow *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + VoodooMessageParser parser; + const DFBPoint *point; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_DATA( parser, point ); + VOODOO_PARSER_END( parser ); + + real->Move( real, point->x, point->y ); + + return DFB_OK; +} + +static DirectResult +Dispatch_MoveTo( IDirectFBWindow *thiz, IDirectFBWindow *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + VoodooMessageParser parser; + const DFBPoint *point; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_DATA( parser, point ); + VOODOO_PARSER_END( parser ); + + real->MoveTo( real, point->x, point->y ); + + return DFB_OK; +} + +static DirectResult +Dispatch_Resize( IDirectFBWindow *thiz, IDirectFBWindow *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DFBResult ret; + VoodooMessageParser parser; + const DFBDimension *size; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_DATA( parser, size ); + VOODOO_PARSER_END( parser ); + + ret = real->Resize( real, size->w, size->h ); + + return voodoo_manager_respond( manager, true, msg->header.serial, + ret, VOODOO_INSTANCE_NONE, + VMBT_NONE ); +} + +static DirectResult +Dispatch_SetStackingClass( IDirectFBWindow *thiz, IDirectFBWindow *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DFBResult ret; + VoodooMessageParser parser; + DFBWindowStackingClass stacking_class; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_INT( parser, stacking_class ); + VOODOO_PARSER_END( parser ); + + if (1) { + if (voodoo_config->stacking_mask && !(voodoo_config->stacking_mask & (1 << stacking_class))) { + D_ERROR( "Stacking class not permitted!\n" ); + return DR_ACCESSDENIED; + } + } + + ret = real->SetStackingClass( real, stacking_class ); + + return DFB_OK; +} + +static DirectResult +Dispatch_Raise( IDirectFBWindow *thiz, IDirectFBWindow *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + real->Raise( real ); + + return DFB_OK; +} + +static DirectResult +Dispatch_Lower( IDirectFBWindow *thiz, IDirectFBWindow *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + real->Lower( real ); + + return DFB_OK; +} + +static DirectResult +Dispatch_RaiseToTop( IDirectFBWindow *thiz, IDirectFBWindow *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + real->RaiseToTop( real ); + + return DFB_OK; +} + +static DirectResult +Dispatch_LowerToBottom( IDirectFBWindow *thiz, IDirectFBWindow *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + real->LowerToBottom( real ); + + return DFB_OK; +} + +static DirectResult +Dispatch_Close( IDirectFBWindow *thiz, IDirectFBWindow *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + real->Close( real ); + + return DFB_OK; +} + +static DirectResult +Dispatch_Destroy( IDirectFBWindow *thiz, IDirectFBWindow *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DFBResult ret; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + ret = real->Destroy( real ); + + return voodoo_manager_respond( manager, true, msg->header.serial, + ret, VOODOO_INSTANCE_NONE, + VMBT_NONE ); +} + +static DirectResult +Dispatch_SetBounds( IDirectFBWindow *thiz, IDirectFBWindow *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DFBResult ret; + VoodooMessageParser parser; + const DFBRectangle *bounds; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_DATA( parser, bounds ); + VOODOO_PARSER_END( parser ); + + ret = real->SetBounds( real, bounds->x, bounds->y, bounds->w, bounds->h ); + + return voodoo_manager_respond( manager, true, msg->header.serial, + ret, VOODOO_INSTANCE_NONE, + VMBT_NONE ); +} + +static DirectResult +Dispatch_ResizeSurface( IDirectFBWindow *thiz, IDirectFBWindow *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DFBResult ret; + VoodooMessageParser parser; + const DFBDimension *size; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_DATA( parser, size ); + VOODOO_PARSER_END( parser ); + + ret = real->ResizeSurface( real, size->w, size->h ); + + return voodoo_manager_respond( manager, true, msg->header.serial, + ret, VOODOO_INSTANCE_NONE, + VMBT_NONE ); +} + +static DirectResult +Dispatch_SetSrcGeometry( IDirectFBWindow *thiz, IDirectFBWindow *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DFBResult ret; + VoodooMessageParser parser; + const DFBWindowGeometry *geometry; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_DATA( parser, geometry ); + VOODOO_PARSER_END( parser ); + + ret = real->SetSrcGeometry( real, geometry ); + + return voodoo_manager_respond( manager, true, msg->header.serial, + ret, VOODOO_INSTANCE_NONE, + VMBT_NONE ); +} + +static DirectResult +Dispatch_SetDstGeometry( IDirectFBWindow *thiz, IDirectFBWindow *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DFBResult ret; + VoodooMessageParser parser; + const DFBWindowGeometry *geometry; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_DATA( parser, geometry ); + VOODOO_PARSER_END( parser ); + + ret = real->SetDstGeometry( real, geometry ); + + return voodoo_manager_respond( manager, true, msg->header.serial, + ret, VOODOO_INSTANCE_NONE, + VMBT_NONE ); +} + +static DirectResult +Dispatch_GetProperty( IDirectFBWindow *thiz, IDirectFBWindow *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + DirectResult ret; + VoodooMessageParser parser; + const char *key; + void *value = NULL; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_STRING( parser, key ); + VOODOO_PARSER_END( parser ); + + ret = real->GetProperty( real, key, &value ); + if (ret) + return ret; + + if (!value) + value = (void*) ""; + + return voodoo_manager_respond( manager, true, msg->header.serial, + DFB_OK, VOODOO_INSTANCE_NONE, + VMBT_STRING, value, + VMBT_NONE ); +} + +static DirectResult +Dispatch_SendEvent( IDirectFBWindow *thiz, IDirectFBWindow *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + VoodooMessageParser parser; + const DFBWindowEvent *event; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Dispatcher) + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_DATA( parser, event ); + VOODOO_PARSER_END( parser ); + + return real->SendEvent( real, event ); +} + + +static DirectResult +Dispatch( void *dispatcher, void *real, VoodooManager *manager, VoodooRequestMessage *msg ) +{ + D_DEBUG( "IDirectFBWindow/Dispatcher: " + "Handling request for instance %u with method %u...\n", msg->instance, msg->method ); + + switch (msg->method) { + case IDIRECTFBWINDOW_METHOD_ID_Release: + return Dispatch_Release( dispatcher, real, manager, msg ); + + case IDIRECTFBWINDOW_METHOD_ID_CreateEventBuffer: + return Dispatch_CreateEventBuffer( dispatcher, real, manager, msg ); + + case IDIRECTFBWINDOW_METHOD_ID_AttachEventBuffer: + return Dispatch_AttachEventBuffer( dispatcher, real, manager, msg ); + + case IDIRECTFBWINDOW_METHOD_ID_EnableEvents: + return Dispatch_EnableEvents( dispatcher, real, manager, msg ); + + case IDIRECTFBWINDOW_METHOD_ID_DetachEventBuffer: + return Dispatch_DetachEventBuffer( dispatcher, real, manager, msg ); + + case IDIRECTFBWINDOW_METHOD_ID_GetID: + return Dispatch_GetID( dispatcher, real, manager, msg ); + + case IDIRECTFBWINDOW_METHOD_ID_GetPosition: + return Dispatch_GetPosition( dispatcher, real, manager, msg ); + + case IDIRECTFBWINDOW_METHOD_ID_GetSize: + return Dispatch_GetSize( dispatcher, real, manager, msg ); + + case IDIRECTFBWINDOW_METHOD_ID_GetSurface: + return Dispatch_GetSurface( dispatcher, real, manager, msg ); + + case IDIRECTFBWINDOW_METHOD_ID_SetOptions: + return Dispatch_SetOptions( dispatcher, real, manager, msg ); + + case IDIRECTFBWINDOW_METHOD_ID_GetOptions: + return Dispatch_GetOptions( dispatcher, real, manager, msg ); + + case IDIRECTFBWINDOW_METHOD_ID_SetOpacity: + return Dispatch_SetOpacity( dispatcher, real, manager, msg ); + + case IDIRECTFBWINDOW_METHOD_ID_GetOpacity: + return Dispatch_GetOpacity( dispatcher, real, manager, msg ); + + case IDIRECTFBWINDOW_METHOD_ID_SetCursorShape: + return Dispatch_SetCursorShape( dispatcher, real, manager, msg ); + + case IDIRECTFBWINDOW_METHOD_ID_RequestFocus: + return Dispatch_RequestFocus( dispatcher, real, manager, msg ); + + case IDIRECTFBWINDOW_METHOD_ID_GrabPointer: + return Dispatch_GrabPointer( dispatcher, real, manager, msg ); + + case IDIRECTFBWINDOW_METHOD_ID_UngrabPointer: + return Dispatch_UngrabPointer( dispatcher, real, manager, msg ); + + case IDIRECTFBWINDOW_METHOD_ID_Move: + return Dispatch_Move( dispatcher, real, manager, msg ); + + case IDIRECTFBWINDOW_METHOD_ID_MoveTo: + return Dispatch_MoveTo( dispatcher, real, manager, msg ); + + case IDIRECTFBWINDOW_METHOD_ID_Resize: + return Dispatch_Resize( dispatcher, real, manager, msg ); + + case IDIRECTFBWINDOW_METHOD_ID_SetStackingClass: + return Dispatch_SetStackingClass( dispatcher, real, manager, msg ); + + case IDIRECTFBWINDOW_METHOD_ID_Raise: + return Dispatch_Raise( dispatcher, real, manager, msg ); + + case IDIRECTFBWINDOW_METHOD_ID_Lower: + return Dispatch_Lower( dispatcher, real, manager, msg ); + + case IDIRECTFBWINDOW_METHOD_ID_RaiseToTop: + return Dispatch_RaiseToTop( dispatcher, real, manager, msg ); + + case IDIRECTFBWINDOW_METHOD_ID_LowerToBottom: + return Dispatch_LowerToBottom( dispatcher, real, manager, msg ); + + case IDIRECTFBWINDOW_METHOD_ID_Close: + return Dispatch_Close( dispatcher, real, manager, msg ); + + case IDIRECTFBWINDOW_METHOD_ID_Destroy: + return Dispatch_Destroy( dispatcher, real, manager, msg ); + + case IDIRECTFBWINDOW_METHOD_ID_SetBounds: + return Dispatch_SetBounds( dispatcher, real, manager, msg ); + + case IDIRECTFBWINDOW_METHOD_ID_ResizeSurface: + return Dispatch_ResizeSurface( dispatcher, real, manager, msg ); + + case IDIRECTFBWINDOW_METHOD_ID_SetSrcGeometry: + return Dispatch_SetSrcGeometry( dispatcher, real, manager, msg ); + + case IDIRECTFBWINDOW_METHOD_ID_SetDstGeometry: + return Dispatch_SetDstGeometry( dispatcher, real, manager, msg ); + + case IDIRECTFBWINDOW_METHOD_ID_GetProperty: + return Dispatch_GetProperty( dispatcher, real, manager, msg ); + + case IDIRECTFBWINDOW_METHOD_ID_SendEvent: + return Dispatch_SendEvent( dispatcher, real, manager, msg ); + } + + return DFB_NOSUCHMETHOD; +} + +/**************************************************************************************************/ + +static DFBResult +Probe() +{ + /* This implementation has to be loaded explicitly. */ + return DFB_UNSUPPORTED; +} + +static DFBResult +Construct( IDirectFBWindow *thiz, /* Dispatcher interface */ + IDirectFBWindow *real, /* Real interface implementation */ + VoodooManager *manager, /* Manager of the Voodoo framework */ + VoodooInstanceID super, /* Instance ID of the super interface */ + void *arg, /* Optional arguments to constructor */ + VoodooInstanceID *ret_instance ) +{ + DFBResult ret; + VoodooInstanceID instance; + + DIRECT_ALLOCATE_INTERFACE_DATA(thiz, IDirectFBWindow_Dispatcher) + + D_ASSERT( real != NULL ); + D_ASSERT( manager != NULL ); + D_ASSERT( super != VOODOO_INSTANCE_NONE ); + D_ASSERT( ret_instance != NULL ); + + /* Register the dispatcher, getting a new instance ID that refers to it. */ + ret = voodoo_manager_register_local( manager, super, thiz, real, Dispatch, &instance ); + if (ret) { + DIRECT_DEALLOCATE_INTERFACE( thiz ); + return ret; + } + + /* Return the new instance. */ + *ret_instance = instance; + + /* Initialize interface data. */ + data->ref = 1; + data->real = real; + data->self = instance; + data->super = super; + data->manager = manager; + + /* Initialize interface methods. */ + thiz->AddRef = IDirectFBWindow_Dispatcher_AddRef; + thiz->Release = IDirectFBWindow_Dispatcher_Release; + thiz->GetID = IDirectFBWindow_Dispatcher_GetID; + thiz->GetPosition = IDirectFBWindow_Dispatcher_GetPosition; + thiz->GetSize = IDirectFBWindow_Dispatcher_GetSize; + thiz->CreateEventBuffer = IDirectFBWindow_Dispatcher_CreateEventBuffer; + thiz->AttachEventBuffer = IDirectFBWindow_Dispatcher_AttachEventBuffer; + thiz->DetachEventBuffer = IDirectFBWindow_Dispatcher_DetachEventBuffer; + thiz->EnableEvents = IDirectFBWindow_Dispatcher_EnableEvents; + thiz->DisableEvents = IDirectFBWindow_Dispatcher_DisableEvents; + thiz->GetSurface = IDirectFBWindow_Dispatcher_GetSurface; + thiz->SetProperty = IDirectFBWindow_Dispatcher_SetProperty; + thiz->GetProperty = IDirectFBWindow_Dispatcher_GetProperty; + thiz->RemoveProperty = IDirectFBWindow_Dispatcher_RemoveProperty; + thiz->SetOptions = IDirectFBWindow_Dispatcher_SetOptions; + thiz->GetOptions = IDirectFBWindow_Dispatcher_GetOptions; + thiz->SetColorKey = IDirectFBWindow_Dispatcher_SetColorKey; + thiz->SetColorKeyIndex = IDirectFBWindow_Dispatcher_SetColorKeyIndex; + thiz->SetOpaqueRegion = IDirectFBWindow_Dispatcher_SetOpaqueRegion; + thiz->SetOpacity = IDirectFBWindow_Dispatcher_SetOpacity; + thiz->GetOpacity = IDirectFBWindow_Dispatcher_GetOpacity; + thiz->SetCursorShape = IDirectFBWindow_Dispatcher_SetCursorShape; + thiz->RequestFocus = IDirectFBWindow_Dispatcher_RequestFocus; + thiz->GrabKeyboard = IDirectFBWindow_Dispatcher_GrabKeyboard; + thiz->UngrabKeyboard = IDirectFBWindow_Dispatcher_UngrabKeyboard; + thiz->GrabPointer = IDirectFBWindow_Dispatcher_GrabPointer; + thiz->UngrabPointer = IDirectFBWindow_Dispatcher_UngrabPointer; + thiz->GrabKey = IDirectFBWindow_Dispatcher_GrabKey; + thiz->UngrabKey = IDirectFBWindow_Dispatcher_UngrabKey; + thiz->Move = IDirectFBWindow_Dispatcher_Move; + thiz->MoveTo = IDirectFBWindow_Dispatcher_MoveTo; + thiz->Resize = IDirectFBWindow_Dispatcher_Resize; + thiz->SetStackingClass = IDirectFBWindow_Dispatcher_SetStackingClass; + thiz->Raise = IDirectFBWindow_Dispatcher_Raise; + thiz->Lower = IDirectFBWindow_Dispatcher_Lower; + thiz->RaiseToTop = IDirectFBWindow_Dispatcher_RaiseToTop; + thiz->LowerToBottom = IDirectFBWindow_Dispatcher_LowerToBottom; + thiz->PutAtop = IDirectFBWindow_Dispatcher_PutAtop; + thiz->PutBelow = IDirectFBWindow_Dispatcher_PutBelow; + thiz->Close = IDirectFBWindow_Dispatcher_Close; + thiz->Destroy = IDirectFBWindow_Dispatcher_Destroy; + thiz->SetBounds = IDirectFBWindow_Dispatcher_SetBounds; + thiz->ResizeSurface = IDirectFBWindow_Dispatcher_ResizeSurface; + + return DFB_OK; +} + diff --git a/Source/DirectFB/proxy/dispatcher/idirectfbwindow_dispatcher.h b/Source/DirectFB/proxy/dispatcher/idirectfbwindow_dispatcher.h new file mode 100755 index 0000000..75a10c6 --- /dev/null +++ b/Source/DirectFB/proxy/dispatcher/idirectfbwindow_dispatcher.h @@ -0,0 +1,104 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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 __IDIRECTFBWINDOW_DISPATCHER_H__ +#define __IDIRECTFBWINDOW_DISPATCHER_H__ + +#define IDIRECTFBWINDOW_METHOD_ID_AddRef 1 +#define IDIRECTFBWINDOW_METHOD_ID_Release 2 +#define IDIRECTFBWINDOW_METHOD_ID_CreateEventBuffer 3 +#define IDIRECTFBWINDOW_METHOD_ID_AttachEventBuffer 4 +#define IDIRECTFBWINDOW_METHOD_ID_EnableEvents 5 +#define IDIRECTFBWINDOW_METHOD_ID_DisableEvents 6 +#define IDIRECTFBWINDOW_METHOD_ID_GetID 7 +#define IDIRECTFBWINDOW_METHOD_ID_GetPosition 8 +#define IDIRECTFBWINDOW_METHOD_ID_GetSize 9 +#define IDIRECTFBWINDOW_METHOD_ID_GetSurface 10 +#define IDIRECTFBWINDOW_METHOD_ID_SetOptions 11 +#define IDIRECTFBWINDOW_METHOD_ID_GetOptions 12 +#define IDIRECTFBWINDOW_METHOD_ID_SetColorKey 13 +#define IDIRECTFBWINDOW_METHOD_ID_SetColorKeyIndex 14 +#define IDIRECTFBWINDOW_METHOD_ID_SetOpaqueRegion 15 +#define IDIRECTFBWINDOW_METHOD_ID_SetOpacity 16 +#define IDIRECTFBWINDOW_METHOD_ID_GetOpacity 17 +#define IDIRECTFBWINDOW_METHOD_ID_SetCursorShape 18 +#define IDIRECTFBWINDOW_METHOD_ID_RequestFocus 19 +#define IDIRECTFBWINDOW_METHOD_ID_GrabKeyboard 20 +#define IDIRECTFBWINDOW_METHOD_ID_UngrabKeyboard 21 +#define IDIRECTFBWINDOW_METHOD_ID_GrabPointer 22 +#define IDIRECTFBWINDOW_METHOD_ID_UngrabPointer 23 +#define IDIRECTFBWINDOW_METHOD_ID_GrabKey 24 +#define IDIRECTFBWINDOW_METHOD_ID_UngrabKey 25 +#define IDIRECTFBWINDOW_METHOD_ID_Move 26 +#define IDIRECTFBWINDOW_METHOD_ID_MoveTo 27 +#define IDIRECTFBWINDOW_METHOD_ID_Resize 28 +#define IDIRECTFBWINDOW_METHOD_ID_SetStackingClass 29 +#define IDIRECTFBWINDOW_METHOD_ID_Raise 30 +#define IDIRECTFBWINDOW_METHOD_ID_Lower 31 +#define IDIRECTFBWINDOW_METHOD_ID_RaiseToTop 32 +#define IDIRECTFBWINDOW_METHOD_ID_LowerToBottom 33 +#define IDIRECTFBWINDOW_METHOD_ID_PutAtop 34 +#define IDIRECTFBWINDOW_METHOD_ID_PutBelow 35 +#define IDIRECTFBWINDOW_METHOD_ID_Close 36 +#define IDIRECTFBWINDOW_METHOD_ID_Destroy 37 +#define IDIRECTFBWINDOW_METHOD_ID_DetachEventBuffer 38 +#define IDIRECTFBWINDOW_METHOD_ID_SetBounds 39 +#define IDIRECTFBWINDOW_METHOD_ID_ResizeSurface 40 +#define IDIRECTFBWINDOW_METHOD_ID_Bind 41 +#define IDIRECTFBWINDOW_METHOD_ID_Unbind 42 +#define IDIRECTFBWINDOW_METHOD_ID_SetKeySelection 43 +#define IDIRECTFBWINDOW_METHOD_ID_GrabUnselectedKeys 44 +#define IDIRECTFBWINDOW_METHOD_ID_UngrabUnselectedKeys 45 +#define IDIRECTFBWINDOW_METHOD_ID_SetSrcGeometry 46 +#define IDIRECTFBWINDOW_METHOD_ID_SetDstGeometry 47 +#define IDIRECTFBWINDOW_METHOD_ID_SetProperty 48 +#define IDIRECTFBWINDOW_METHOD_ID_GetProperty 49 +#define IDIRECTFBWINDOW_METHOD_ID_RemoveProperty 50 +#define IDIRECTFBWINDOW_METHOD_ID_SetRotation 51 +#define IDIRECTFBWINDOW_METHOD_ID_SetAssociation 52 +#define IDIRECTFBWINDOW_METHOD_ID_BeginUpdates 53 +#define IDIRECTFBWINDOW_METHOD_ID_SetCursorFlags 54 +#define IDIRECTFBWINDOW_METHOD_ID_SetCursorResolution 55 +#define IDIRECTFBWINDOW_METHOD_ID_SetCursorPosition 56 +#define IDIRECTFBWINDOW_METHOD_ID_SendEvent 57 + +/* + * private data struct of IDirectFBWindow_Dispatcher + */ +typedef struct { + int ref; /* reference counter */ + + IDirectFBWindow *real; + + VoodooInstanceID self; + VoodooInstanceID super; + + VoodooManager *manager; +} IDirectFBWindow_Dispatcher_data; + +#endif diff --git a/Source/DirectFB/proxy/requestor/Makefile.am b/Source/DirectFB/proxy/requestor/Makefile.am new file mode 100755 index 0000000..e64f78d --- /dev/null +++ b/Source/DirectFB/proxy/requestor/Makefile.am @@ -0,0 +1,125 @@ +## Makefile.am for DirectFB/proxy/requestor + +INTERFACES_DIR = $(MODULEDIR)/interfaces + +idirectfbdir = $(INTERFACES_DIR)/IDirectFB +idirectfbdatabufferdir = $(INTERFACES_DIR)/IDirectFBDataBuffer +idirectfbdisplaylayerdir = $(INTERFACES_DIR)/IDirectFBDisplayLayer +idirectfbeventbufferdir = $(INTERFACES_DIR)/IDirectFBEventBuffer +idirectfbfontdir = $(INTERFACES_DIR)/IDirectFBFont +idirectfbimageproviderdir = $(INTERFACES_DIR)/IDirectFBImageProvider +idirectfbinputdevicedir = $(INTERFACES_DIR)/IDirectFBInputDevice +idirectfbpalettedir = $(INTERFACES_DIR)/IDirectFBPalette +idirectfbscreendir = $(INTERFACES_DIR)/IDirectFBScreen +idirectfbsurfacedir = $(INTERFACES_DIR)/IDirectFBSurface +idirectfbwindowdir = $(INTERFACES_DIR)/IDirectFBWindow +idirectfbvideoproviderdir = $(INTERFACES_DIR)/IDirectFBVideoProvider + +INCLUDES = \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include \ + -I$(top_srcdir)/lib \ + -I$(top_builddir)/lib \ + -I$(top_srcdir)/src \ + -I$(top_srcdir)/proxy/dispatcher \ + -DDATADIR=\"${RUNTIME_SYSROOT}@DATADIR@\" + +LIBS = \ + $(top_builddir)/lib/voodoo/libvoodoo.la \ + $(top_builddir)/lib/direct/libdirect.la + + +idirectfb_LTLIBRARIES = \ + libidirectfb_requestor.la + +idirectfbdatabuffer_LTLIBRARIES = \ + libidirectfbdatabuffer_requestor.la + +idirectfbdisplaylayer_LTLIBRARIES = \ + libidirectfbdisplaylayer_requestor.la + +idirectfbeventbuffer_LTLIBRARIES = \ + libidirectfbeventbuffer_requestor.la + +idirectfbfont_LTLIBRARIES = \ + libidirectfbfont_requestor.la + +idirectfbimageprovider_LTLIBRARIES = \ + libidirectfbimageprovider_requestor.la + +idirectfbinputdevice_LTLIBRARIES = \ + libidirectfbinputdevice_requestor.la + +idirectfbpalette_LTLIBRARIES = \ + libidirectfbpalette_requestor.la + +idirectfbscreen_LTLIBRARIES = \ + libidirectfbscreen_requestor.la + +idirectfbsurface_LTLIBRARIES = \ + libidirectfbsurface_requestor.la + +idirectfbwindow_LTLIBRARIES = \ + libidirectfbwindow_requestor.la + +if BUILD_STATIC +idirectfb_DATA = libidirectfb_requestor.o +idirectfbdatabuffer_DATA = libidirectfbdatabuffer_requestor.o +idirectfbdisplaylayer_DATA = libidirectfbdisplaylayer_requestor.o +idirectfbeventbuffer_DATA = libidirectfbeventbuffer_requestor.o +idirectfbfont_DATA = libidirectfbfont_requestor.o +idirectfbimageprovider_DATA = libidirectfbimageprovider_requestor.o +idirectfbinputdevice_DATA = libidirectfbinputdevice_requestor.o +idirectfbpalette_DATA = libidirectfbpalette_requestor.o +idirectfbscreen_DATA = libidirectfbscreen_requestor.o +idirectfbsurface_DATA = libidirectfbsurface_requestor.o +idirectfbwindow_DATA = libidirectfbwindow_requestor.o +endif + + +libidirectfb_requestor_la_SOURCES = idirectfb_requestor.c +libidirectfb_requestor_la_LDFLAGS = -avoid-version -module +libidirectfb_requestor_la_LIBADD = $(LIBS) + +libidirectfbdatabuffer_requestor_la_SOURCES = idirectfbdatabuffer_requestor.c +libidirectfbdatabuffer_requestor_la_LDFLAGS = -avoid-version -module +libidirectfbdatabuffer_requestor_la_LIBADD = $(LIBS) + +libidirectfbdisplaylayer_requestor_la_SOURCES = idirectfbdisplaylayer_requestor.c idirectfbdisplaylayer_requestor.h +libidirectfbdisplaylayer_requestor_la_LDFLAGS = -avoid-version -module +libidirectfbdisplaylayer_requestor_la_LIBADD = $(LIBS) + +libidirectfbeventbuffer_requestor_la_SOURCES = idirectfbeventbuffer_requestor.c idirectfbeventbuffer_requestor.h +libidirectfbeventbuffer_requestor_la_LDFLAGS = -avoid-version -module +libidirectfbeventbuffer_requestor_la_LIBADD = $(LIBS) + +libidirectfbfont_requestor_la_SOURCES = idirectfbfont_requestor.c idirectfbfont_requestor.h +libidirectfbfont_requestor_la_LDFLAGS = -avoid-version -module +libidirectfbfont_requestor_la_LIBADD = $(LIBS) + +libidirectfbimageprovider_requestor_la_SOURCES = idirectfbimageprovider_requestor.c +libidirectfbimageprovider_requestor_la_LDFLAGS = -avoid-version -module +libidirectfbimageprovider_requestor_la_LIBADD = $(LIBS) + +libidirectfbinputdevice_requestor_la_SOURCES = idirectfbinputdevice_requestor.c idirectfbinputdevice_requestor.h +libidirectfbinputdevice_requestor_la_LDFLAGS = -avoid-version -module +libidirectfbinputdevice_requestor_la_LIBADD = $(LIBS) + +libidirectfbpalette_requestor_la_SOURCES = idirectfbpalette_requestor.c idirectfbpalette_requestor.h +libidirectfbpalette_requestor_la_LDFLAGS = -avoid-version -module +libidirectfbpalette_requestor_la_LIBADD = $(LIBS) + +libidirectfbscreen_requestor_la_SOURCES = idirectfbscreen_requestor.c +libidirectfbscreen_requestor_la_LDFLAGS = -avoid-version -module +libidirectfbscreen_requestor_la_LIBADD = $(LIBS) + +libidirectfbsurface_requestor_la_SOURCES = idirectfbsurface_requestor.c idirectfbsurface_requestor.h +libidirectfbsurface_requestor_la_LDFLAGS = -avoid-version -module +libidirectfbsurface_requestor_la_LIBADD = $(LIBS) + +libidirectfbwindow_requestor_la_SOURCES = idirectfbwindow_requestor.c idirectfbwindow_requestor.h +libidirectfbwindow_requestor_la_LDFLAGS = -avoid-version -module +libidirectfbwindow_requestor_la_LIBADD = $(LIBS) + + +include $(top_srcdir)/rules/libobject.make diff --git a/Source/DirectFB/proxy/requestor/Makefile.in b/Source/DirectFB/proxy/requestor/Makefile.in new file mode 100755 index 0000000..6d7891c --- /dev/null +++ b/Source/DirectFB/proxy/requestor/Makefile.in @@ -0,0 +1,1401 @@ +# 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 = proxy/requestor +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)$(idirectfbdir)" \ + "$(DESTDIR)$(idirectfbdatabufferdir)" \ + "$(DESTDIR)$(idirectfbdisplaylayerdir)" \ + "$(DESTDIR)$(idirectfbeventbufferdir)" \ + "$(DESTDIR)$(idirectfbfontdir)" \ + "$(DESTDIR)$(idirectfbimageproviderdir)" \ + "$(DESTDIR)$(idirectfbinputdevicedir)" \ + "$(DESTDIR)$(idirectfbpalettedir)" \ + "$(DESTDIR)$(idirectfbscreendir)" \ + "$(DESTDIR)$(idirectfbsurfacedir)" \ + "$(DESTDIR)$(idirectfbwindowdir)" "$(DESTDIR)$(idirectfbdir)" \ + "$(DESTDIR)$(idirectfbdatabufferdir)" \ + "$(DESTDIR)$(idirectfbdisplaylayerdir)" \ + "$(DESTDIR)$(idirectfbeventbufferdir)" \ + "$(DESTDIR)$(idirectfbfontdir)" \ + "$(DESTDIR)$(idirectfbimageproviderdir)" \ + "$(DESTDIR)$(idirectfbinputdevicedir)" \ + "$(DESTDIR)$(idirectfbpalettedir)" \ + "$(DESTDIR)$(idirectfbscreendir)" \ + "$(DESTDIR)$(idirectfbsurfacedir)" \ + "$(DESTDIR)$(idirectfbwindowdir)" +idirectfbLTLIBRARIES_INSTALL = $(INSTALL) +idirectfbdatabufferLTLIBRARIES_INSTALL = $(INSTALL) +idirectfbdisplaylayerLTLIBRARIES_INSTALL = $(INSTALL) +idirectfbeventbufferLTLIBRARIES_INSTALL = $(INSTALL) +idirectfbfontLTLIBRARIES_INSTALL = $(INSTALL) +idirectfbimageproviderLTLIBRARIES_INSTALL = $(INSTALL) +idirectfbinputdeviceLTLIBRARIES_INSTALL = $(INSTALL) +idirectfbpaletteLTLIBRARIES_INSTALL = $(INSTALL) +idirectfbscreenLTLIBRARIES_INSTALL = $(INSTALL) +idirectfbsurfaceLTLIBRARIES_INSTALL = $(INSTALL) +idirectfbwindowLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(idirectfb_LTLIBRARIES) \ + $(idirectfbdatabuffer_LTLIBRARIES) \ + $(idirectfbdisplaylayer_LTLIBRARIES) \ + $(idirectfbeventbuffer_LTLIBRARIES) \ + $(idirectfbfont_LTLIBRARIES) \ + $(idirectfbimageprovider_LTLIBRARIES) \ + $(idirectfbinputdevice_LTLIBRARIES) \ + $(idirectfbpalette_LTLIBRARIES) $(idirectfbscreen_LTLIBRARIES) \ + $(idirectfbsurface_LTLIBRARIES) $(idirectfbwindow_LTLIBRARIES) +libidirectfb_requestor_la_DEPENDENCIES = $(LIBS) +am_libidirectfb_requestor_la_OBJECTS = idirectfb_requestor.lo +libidirectfb_requestor_la_OBJECTS = \ + $(am_libidirectfb_requestor_la_OBJECTS) +libidirectfb_requestor_la_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) $(libidirectfb_requestor_la_LDFLAGS) \ + $(LDFLAGS) -o $@ +libidirectfbdatabuffer_requestor_la_DEPENDENCIES = $(LIBS) +am_libidirectfbdatabuffer_requestor_la_OBJECTS = \ + idirectfbdatabuffer_requestor.lo +libidirectfbdatabuffer_requestor_la_OBJECTS = \ + $(am_libidirectfbdatabuffer_requestor_la_OBJECTS) +libidirectfbdatabuffer_requestor_la_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) \ + $(libidirectfbdatabuffer_requestor_la_LDFLAGS) $(LDFLAGS) -o \ + $@ +libidirectfbdisplaylayer_requestor_la_DEPENDENCIES = $(LIBS) +am_libidirectfbdisplaylayer_requestor_la_OBJECTS = \ + idirectfbdisplaylayer_requestor.lo +libidirectfbdisplaylayer_requestor_la_OBJECTS = \ + $(am_libidirectfbdisplaylayer_requestor_la_OBJECTS) +libidirectfbdisplaylayer_requestor_la_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) \ + $(libidirectfbdisplaylayer_requestor_la_LDFLAGS) $(LDFLAGS) -o \ + $@ +libidirectfbeventbuffer_requestor_la_DEPENDENCIES = $(LIBS) +am_libidirectfbeventbuffer_requestor_la_OBJECTS = \ + idirectfbeventbuffer_requestor.lo +libidirectfbeventbuffer_requestor_la_OBJECTS = \ + $(am_libidirectfbeventbuffer_requestor_la_OBJECTS) +libidirectfbeventbuffer_requestor_la_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) \ + $(libidirectfbeventbuffer_requestor_la_LDFLAGS) $(LDFLAGS) -o \ + $@ +libidirectfbfont_requestor_la_DEPENDENCIES = $(LIBS) +am_libidirectfbfont_requestor_la_OBJECTS = idirectfbfont_requestor.lo +libidirectfbfont_requestor_la_OBJECTS = \ + $(am_libidirectfbfont_requestor_la_OBJECTS) +libidirectfbfont_requestor_la_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) \ + $(libidirectfbfont_requestor_la_LDFLAGS) $(LDFLAGS) -o $@ +libidirectfbimageprovider_requestor_la_DEPENDENCIES = $(LIBS) +am_libidirectfbimageprovider_requestor_la_OBJECTS = \ + idirectfbimageprovider_requestor.lo +libidirectfbimageprovider_requestor_la_OBJECTS = \ + $(am_libidirectfbimageprovider_requestor_la_OBJECTS) +libidirectfbimageprovider_requestor_la_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) \ + $(libidirectfbimageprovider_requestor_la_LDFLAGS) $(LDFLAGS) \ + -o $@ +libidirectfbinputdevice_requestor_la_DEPENDENCIES = $(LIBS) +am_libidirectfbinputdevice_requestor_la_OBJECTS = \ + idirectfbinputdevice_requestor.lo +libidirectfbinputdevice_requestor_la_OBJECTS = \ + $(am_libidirectfbinputdevice_requestor_la_OBJECTS) +libidirectfbinputdevice_requestor_la_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) \ + $(libidirectfbinputdevice_requestor_la_LDFLAGS) $(LDFLAGS) -o \ + $@ +libidirectfbpalette_requestor_la_DEPENDENCIES = $(LIBS) +am_libidirectfbpalette_requestor_la_OBJECTS = \ + idirectfbpalette_requestor.lo +libidirectfbpalette_requestor_la_OBJECTS = \ + $(am_libidirectfbpalette_requestor_la_OBJECTS) +libidirectfbpalette_requestor_la_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) \ + $(libidirectfbpalette_requestor_la_LDFLAGS) $(LDFLAGS) -o $@ +libidirectfbscreen_requestor_la_DEPENDENCIES = $(LIBS) +am_libidirectfbscreen_requestor_la_OBJECTS = \ + idirectfbscreen_requestor.lo +libidirectfbscreen_requestor_la_OBJECTS = \ + $(am_libidirectfbscreen_requestor_la_OBJECTS) +libidirectfbscreen_requestor_la_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) \ + $(libidirectfbscreen_requestor_la_LDFLAGS) $(LDFLAGS) -o $@ +libidirectfbsurface_requestor_la_DEPENDENCIES = $(LIBS) +am_libidirectfbsurface_requestor_la_OBJECTS = \ + idirectfbsurface_requestor.lo +libidirectfbsurface_requestor_la_OBJECTS = \ + $(am_libidirectfbsurface_requestor_la_OBJECTS) +libidirectfbsurface_requestor_la_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) \ + $(libidirectfbsurface_requestor_la_LDFLAGS) $(LDFLAGS) -o $@ +libidirectfbwindow_requestor_la_DEPENDENCIES = $(LIBS) +am_libidirectfbwindow_requestor_la_OBJECTS = \ + idirectfbwindow_requestor.lo +libidirectfbwindow_requestor_la_OBJECTS = \ + $(am_libidirectfbwindow_requestor_la_OBJECTS) +libidirectfbwindow_requestor_la_LINK = $(LIBTOOL) --tag=CC \ + $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ + $(AM_CFLAGS) $(CFLAGS) \ + $(libidirectfbwindow_requestor_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 = $(libidirectfb_requestor_la_SOURCES) \ + $(libidirectfbdatabuffer_requestor_la_SOURCES) \ + $(libidirectfbdisplaylayer_requestor_la_SOURCES) \ + $(libidirectfbeventbuffer_requestor_la_SOURCES) \ + $(libidirectfbfont_requestor_la_SOURCES) \ + $(libidirectfbimageprovider_requestor_la_SOURCES) \ + $(libidirectfbinputdevice_requestor_la_SOURCES) \ + $(libidirectfbpalette_requestor_la_SOURCES) \ + $(libidirectfbscreen_requestor_la_SOURCES) \ + $(libidirectfbsurface_requestor_la_SOURCES) \ + $(libidirectfbwindow_requestor_la_SOURCES) +DIST_SOURCES = $(libidirectfb_requestor_la_SOURCES) \ + $(libidirectfbdatabuffer_requestor_la_SOURCES) \ + $(libidirectfbdisplaylayer_requestor_la_SOURCES) \ + $(libidirectfbeventbuffer_requestor_la_SOURCES) \ + $(libidirectfbfont_requestor_la_SOURCES) \ + $(libidirectfbimageprovider_requestor_la_SOURCES) \ + $(libidirectfbinputdevice_requestor_la_SOURCES) \ + $(libidirectfbpalette_requestor_la_SOURCES) \ + $(libidirectfbscreen_requestor_la_SOURCES) \ + $(libidirectfbsurface_requestor_la_SOURCES) \ + $(libidirectfbwindow_requestor_la_SOURCES) +idirectfbDATA_INSTALL = $(INSTALL_DATA) +idirectfbdatabufferDATA_INSTALL = $(INSTALL_DATA) +idirectfbdisplaylayerDATA_INSTALL = $(INSTALL_DATA) +idirectfbeventbufferDATA_INSTALL = $(INSTALL_DATA) +idirectfbfontDATA_INSTALL = $(INSTALL_DATA) +idirectfbimageproviderDATA_INSTALL = $(INSTALL_DATA) +idirectfbinputdeviceDATA_INSTALL = $(INSTALL_DATA) +idirectfbpaletteDATA_INSTALL = $(INSTALL_DATA) +idirectfbscreenDATA_INSTALL = $(INSTALL_DATA) +idirectfbsurfaceDATA_INSTALL = $(INSTALL_DATA) +idirectfbwindowDATA_INSTALL = $(INSTALL_DATA) +DATA = $(idirectfb_DATA) $(idirectfbdatabuffer_DATA) \ + $(idirectfbdisplaylayer_DATA) $(idirectfbeventbuffer_DATA) \ + $(idirectfbfont_DATA) $(idirectfbimageprovider_DATA) \ + $(idirectfbinputdevice_DATA) $(idirectfbpalette_DATA) \ + $(idirectfbscreen_DATA) $(idirectfbsurface_DATA) \ + $(idirectfbwindow_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 = \ + $(top_builddir)/lib/voodoo/libvoodoo.la \ + $(top_builddir)/lib/direct/libdirect.la + +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@ +INTERFACES_DIR = $(MODULEDIR)/interfaces +idirectfbdir = $(INTERFACES_DIR)/IDirectFB +idirectfbdatabufferdir = $(INTERFACES_DIR)/IDirectFBDataBuffer +idirectfbdisplaylayerdir = $(INTERFACES_DIR)/IDirectFBDisplayLayer +idirectfbeventbufferdir = $(INTERFACES_DIR)/IDirectFBEventBuffer +idirectfbfontdir = $(INTERFACES_DIR)/IDirectFBFont +idirectfbimageproviderdir = $(INTERFACES_DIR)/IDirectFBImageProvider +idirectfbinputdevicedir = $(INTERFACES_DIR)/IDirectFBInputDevice +idirectfbpalettedir = $(INTERFACES_DIR)/IDirectFBPalette +idirectfbscreendir = $(INTERFACES_DIR)/IDirectFBScreen +idirectfbsurfacedir = $(INTERFACES_DIR)/IDirectFBSurface +idirectfbwindowdir = $(INTERFACES_DIR)/IDirectFBWindow +idirectfbvideoproviderdir = $(INTERFACES_DIR)/IDirectFBVideoProvider +INCLUDES = \ + -I$(top_builddir)/include \ + -I$(top_srcdir)/include \ + -I$(top_srcdir)/lib \ + -I$(top_builddir)/lib \ + -I$(top_srcdir)/src \ + -I$(top_srcdir)/proxy/dispatcher \ + -DDATADIR=\"${RUNTIME_SYSROOT}@DATADIR@\" + +idirectfb_LTLIBRARIES = \ + libidirectfb_requestor.la + +idirectfbdatabuffer_LTLIBRARIES = \ + libidirectfbdatabuffer_requestor.la + +idirectfbdisplaylayer_LTLIBRARIES = \ + libidirectfbdisplaylayer_requestor.la + +idirectfbeventbuffer_LTLIBRARIES = \ + libidirectfbeventbuffer_requestor.la + +idirectfbfont_LTLIBRARIES = \ + libidirectfbfont_requestor.la + +idirectfbimageprovider_LTLIBRARIES = \ + libidirectfbimageprovider_requestor.la + +idirectfbinputdevice_LTLIBRARIES = \ + libidirectfbinputdevice_requestor.la + +idirectfbpalette_LTLIBRARIES = \ + libidirectfbpalette_requestor.la + +idirectfbscreen_LTLIBRARIES = \ + libidirectfbscreen_requestor.la + +idirectfbsurface_LTLIBRARIES = \ + libidirectfbsurface_requestor.la + +idirectfbwindow_LTLIBRARIES = \ + libidirectfbwindow_requestor.la + +@BUILD_STATIC_TRUE@idirectfb_DATA = libidirectfb_requestor.o +@BUILD_STATIC_TRUE@idirectfbdatabuffer_DATA = libidirectfbdatabuffer_requestor.o +@BUILD_STATIC_TRUE@idirectfbdisplaylayer_DATA = libidirectfbdisplaylayer_requestor.o +@BUILD_STATIC_TRUE@idirectfbeventbuffer_DATA = libidirectfbeventbuffer_requestor.o +@BUILD_STATIC_TRUE@idirectfbfont_DATA = libidirectfbfont_requestor.o +@BUILD_STATIC_TRUE@idirectfbimageprovider_DATA = libidirectfbimageprovider_requestor.o +@BUILD_STATIC_TRUE@idirectfbinputdevice_DATA = libidirectfbinputdevice_requestor.o +@BUILD_STATIC_TRUE@idirectfbpalette_DATA = libidirectfbpalette_requestor.o +@BUILD_STATIC_TRUE@idirectfbscreen_DATA = libidirectfbscreen_requestor.o +@BUILD_STATIC_TRUE@idirectfbsurface_DATA = libidirectfbsurface_requestor.o +@BUILD_STATIC_TRUE@idirectfbwindow_DATA = libidirectfbwindow_requestor.o +libidirectfb_requestor_la_SOURCES = idirectfb_requestor.c +libidirectfb_requestor_la_LDFLAGS = -avoid-version -module +libidirectfb_requestor_la_LIBADD = $(LIBS) +libidirectfbdatabuffer_requestor_la_SOURCES = idirectfbdatabuffer_requestor.c +libidirectfbdatabuffer_requestor_la_LDFLAGS = -avoid-version -module +libidirectfbdatabuffer_requestor_la_LIBADD = $(LIBS) +libidirectfbdisplaylayer_requestor_la_SOURCES = idirectfbdisplaylayer_requestor.c idirectfbdisplaylayer_requestor.h +libidirectfbdisplaylayer_requestor_la_LDFLAGS = -avoid-version -module +libidirectfbdisplaylayer_requestor_la_LIBADD = $(LIBS) +libidirectfbeventbuffer_requestor_la_SOURCES = idirectfbeventbuffer_requestor.c idirectfbeventbuffer_requestor.h +libidirectfbeventbuffer_requestor_la_LDFLAGS = -avoid-version -module +libidirectfbeventbuffer_requestor_la_LIBADD = $(LIBS) +libidirectfbfont_requestor_la_SOURCES = idirectfbfont_requestor.c idirectfbfont_requestor.h +libidirectfbfont_requestor_la_LDFLAGS = -avoid-version -module +libidirectfbfont_requestor_la_LIBADD = $(LIBS) +libidirectfbimageprovider_requestor_la_SOURCES = idirectfbimageprovider_requestor.c +libidirectfbimageprovider_requestor_la_LDFLAGS = -avoid-version -module +libidirectfbimageprovider_requestor_la_LIBADD = $(LIBS) +libidirectfbinputdevice_requestor_la_SOURCES = idirectfbinputdevice_requestor.c idirectfbinputdevice_requestor.h +libidirectfbinputdevice_requestor_la_LDFLAGS = -avoid-version -module +libidirectfbinputdevice_requestor_la_LIBADD = $(LIBS) +libidirectfbpalette_requestor_la_SOURCES = idirectfbpalette_requestor.c idirectfbpalette_requestor.h +libidirectfbpalette_requestor_la_LDFLAGS = -avoid-version -module +libidirectfbpalette_requestor_la_LIBADD = $(LIBS) +libidirectfbscreen_requestor_la_SOURCES = idirectfbscreen_requestor.c +libidirectfbscreen_requestor_la_LDFLAGS = -avoid-version -module +libidirectfbscreen_requestor_la_LIBADD = $(LIBS) +libidirectfbsurface_requestor_la_SOURCES = idirectfbsurface_requestor.c idirectfbsurface_requestor.h +libidirectfbsurface_requestor_la_LDFLAGS = -avoid-version -module +libidirectfbsurface_requestor_la_LIBADD = $(LIBS) +libidirectfbwindow_requestor_la_SOURCES = idirectfbwindow_requestor.c idirectfbwindow_requestor.h +libidirectfbwindow_requestor_la_LDFLAGS = -avoid-version -module +libidirectfbwindow_requestor_la_LIBADD = $(LIBS) +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 proxy/requestor/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu proxy/requestor/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-idirectfbLTLIBRARIES: $(idirectfb_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(idirectfbdir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbdir)" + @list='$(idirectfb_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(idirectfbdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(idirectfbdir)/$$f"; \ + else :; fi; \ + done + +uninstall-idirectfbLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(idirectfb_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(idirectfbdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(idirectfbdir)/$$p"; \ + done + +clean-idirectfbLTLIBRARIES: + -test -z "$(idirectfb_LTLIBRARIES)" || rm -f $(idirectfb_LTLIBRARIES) + @list='$(idirectfb_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 +install-idirectfbdatabufferLTLIBRARIES: $(idirectfbdatabuffer_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(idirectfbdatabufferdir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbdatabufferdir)" + @list='$(idirectfbdatabuffer_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbdatabufferLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(idirectfbdatabufferdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbdatabufferLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(idirectfbdatabufferdir)/$$f"; \ + else :; fi; \ + done + +uninstall-idirectfbdatabufferLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbdatabuffer_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(idirectfbdatabufferdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(idirectfbdatabufferdir)/$$p"; \ + done + +clean-idirectfbdatabufferLTLIBRARIES: + -test -z "$(idirectfbdatabuffer_LTLIBRARIES)" || rm -f $(idirectfbdatabuffer_LTLIBRARIES) + @list='$(idirectfbdatabuffer_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 +install-idirectfbdisplaylayerLTLIBRARIES: $(idirectfbdisplaylayer_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(idirectfbdisplaylayerdir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbdisplaylayerdir)" + @list='$(idirectfbdisplaylayer_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbdisplaylayerLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(idirectfbdisplaylayerdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbdisplaylayerLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(idirectfbdisplaylayerdir)/$$f"; \ + else :; fi; \ + done + +uninstall-idirectfbdisplaylayerLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbdisplaylayer_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(idirectfbdisplaylayerdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(idirectfbdisplaylayerdir)/$$p"; \ + done + +clean-idirectfbdisplaylayerLTLIBRARIES: + -test -z "$(idirectfbdisplaylayer_LTLIBRARIES)" || rm -f $(idirectfbdisplaylayer_LTLIBRARIES) + @list='$(idirectfbdisplaylayer_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 +install-idirectfbeventbufferLTLIBRARIES: $(idirectfbeventbuffer_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(idirectfbeventbufferdir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbeventbufferdir)" + @list='$(idirectfbeventbuffer_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbeventbufferLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(idirectfbeventbufferdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbeventbufferLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(idirectfbeventbufferdir)/$$f"; \ + else :; fi; \ + done + +uninstall-idirectfbeventbufferLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbeventbuffer_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(idirectfbeventbufferdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(idirectfbeventbufferdir)/$$p"; \ + done + +clean-idirectfbeventbufferLTLIBRARIES: + -test -z "$(idirectfbeventbuffer_LTLIBRARIES)" || rm -f $(idirectfbeventbuffer_LTLIBRARIES) + @list='$(idirectfbeventbuffer_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 +install-idirectfbfontLTLIBRARIES: $(idirectfbfont_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(idirectfbfontdir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbfontdir)" + @list='$(idirectfbfont_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbfontLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(idirectfbfontdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbfontLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(idirectfbfontdir)/$$f"; \ + else :; fi; \ + done + +uninstall-idirectfbfontLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbfont_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(idirectfbfontdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(idirectfbfontdir)/$$p"; \ + done + +clean-idirectfbfontLTLIBRARIES: + -test -z "$(idirectfbfont_LTLIBRARIES)" || rm -f $(idirectfbfont_LTLIBRARIES) + @list='$(idirectfbfont_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 +install-idirectfbimageproviderLTLIBRARIES: $(idirectfbimageprovider_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(idirectfbimageproviderdir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbimageproviderdir)" + @list='$(idirectfbimageprovider_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbimageproviderLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(idirectfbimageproviderdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbimageproviderLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(idirectfbimageproviderdir)/$$f"; \ + else :; fi; \ + done + +uninstall-idirectfbimageproviderLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbimageprovider_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(idirectfbimageproviderdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(idirectfbimageproviderdir)/$$p"; \ + done + +clean-idirectfbimageproviderLTLIBRARIES: + -test -z "$(idirectfbimageprovider_LTLIBRARIES)" || rm -f $(idirectfbimageprovider_LTLIBRARIES) + @list='$(idirectfbimageprovider_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 +install-idirectfbinputdeviceLTLIBRARIES: $(idirectfbinputdevice_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(idirectfbinputdevicedir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbinputdevicedir)" + @list='$(idirectfbinputdevice_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbinputdeviceLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(idirectfbinputdevicedir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbinputdeviceLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(idirectfbinputdevicedir)/$$f"; \ + else :; fi; \ + done + +uninstall-idirectfbinputdeviceLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbinputdevice_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(idirectfbinputdevicedir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(idirectfbinputdevicedir)/$$p"; \ + done + +clean-idirectfbinputdeviceLTLIBRARIES: + -test -z "$(idirectfbinputdevice_LTLIBRARIES)" || rm -f $(idirectfbinputdevice_LTLIBRARIES) + @list='$(idirectfbinputdevice_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 +install-idirectfbpaletteLTLIBRARIES: $(idirectfbpalette_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(idirectfbpalettedir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbpalettedir)" + @list='$(idirectfbpalette_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbpaletteLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(idirectfbpalettedir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbpaletteLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(idirectfbpalettedir)/$$f"; \ + else :; fi; \ + done + +uninstall-idirectfbpaletteLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbpalette_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(idirectfbpalettedir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(idirectfbpalettedir)/$$p"; \ + done + +clean-idirectfbpaletteLTLIBRARIES: + -test -z "$(idirectfbpalette_LTLIBRARIES)" || rm -f $(idirectfbpalette_LTLIBRARIES) + @list='$(idirectfbpalette_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 +install-idirectfbscreenLTLIBRARIES: $(idirectfbscreen_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(idirectfbscreendir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbscreendir)" + @list='$(idirectfbscreen_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbscreenLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(idirectfbscreendir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbscreenLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(idirectfbscreendir)/$$f"; \ + else :; fi; \ + done + +uninstall-idirectfbscreenLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbscreen_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(idirectfbscreendir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(idirectfbscreendir)/$$p"; \ + done + +clean-idirectfbscreenLTLIBRARIES: + -test -z "$(idirectfbscreen_LTLIBRARIES)" || rm -f $(idirectfbscreen_LTLIBRARIES) + @list='$(idirectfbscreen_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 +install-idirectfbsurfaceLTLIBRARIES: $(idirectfbsurface_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(idirectfbsurfacedir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbsurfacedir)" + @list='$(idirectfbsurface_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbsurfaceLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(idirectfbsurfacedir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbsurfaceLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(idirectfbsurfacedir)/$$f"; \ + else :; fi; \ + done + +uninstall-idirectfbsurfaceLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbsurface_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(idirectfbsurfacedir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(idirectfbsurfacedir)/$$p"; \ + done + +clean-idirectfbsurfaceLTLIBRARIES: + -test -z "$(idirectfbsurface_LTLIBRARIES)" || rm -f $(idirectfbsurface_LTLIBRARIES) + @list='$(idirectfbsurface_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 +install-idirectfbwindowLTLIBRARIES: $(idirectfbwindow_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(idirectfbwindowdir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbwindowdir)" + @list='$(idirectfbwindow_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbwindowLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(idirectfbwindowdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(idirectfbwindowLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(idirectfbwindowdir)/$$f"; \ + else :; fi; \ + done + +uninstall-idirectfbwindowLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbwindow_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(idirectfbwindowdir)/$$p'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(idirectfbwindowdir)/$$p"; \ + done + +clean-idirectfbwindowLTLIBRARIES: + -test -z "$(idirectfbwindow_LTLIBRARIES)" || rm -f $(idirectfbwindow_LTLIBRARIES) + @list='$(idirectfbwindow_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 +libidirectfb_requestor.la: $(libidirectfb_requestor_la_OBJECTS) $(libidirectfb_requestor_la_DEPENDENCIES) + $(libidirectfb_requestor_la_LINK) -rpath $(idirectfbdir) $(libidirectfb_requestor_la_OBJECTS) $(libidirectfb_requestor_la_LIBADD) $(LIBS) +libidirectfbdatabuffer_requestor.la: $(libidirectfbdatabuffer_requestor_la_OBJECTS) $(libidirectfbdatabuffer_requestor_la_DEPENDENCIES) + $(libidirectfbdatabuffer_requestor_la_LINK) -rpath $(idirectfbdatabufferdir) $(libidirectfbdatabuffer_requestor_la_OBJECTS) $(libidirectfbdatabuffer_requestor_la_LIBADD) $(LIBS) +libidirectfbdisplaylayer_requestor.la: $(libidirectfbdisplaylayer_requestor_la_OBJECTS) $(libidirectfbdisplaylayer_requestor_la_DEPENDENCIES) + $(libidirectfbdisplaylayer_requestor_la_LINK) -rpath $(idirectfbdisplaylayerdir) $(libidirectfbdisplaylayer_requestor_la_OBJECTS) $(libidirectfbdisplaylayer_requestor_la_LIBADD) $(LIBS) +libidirectfbeventbuffer_requestor.la: $(libidirectfbeventbuffer_requestor_la_OBJECTS) $(libidirectfbeventbuffer_requestor_la_DEPENDENCIES) + $(libidirectfbeventbuffer_requestor_la_LINK) -rpath $(idirectfbeventbufferdir) $(libidirectfbeventbuffer_requestor_la_OBJECTS) $(libidirectfbeventbuffer_requestor_la_LIBADD) $(LIBS) +libidirectfbfont_requestor.la: $(libidirectfbfont_requestor_la_OBJECTS) $(libidirectfbfont_requestor_la_DEPENDENCIES) + $(libidirectfbfont_requestor_la_LINK) -rpath $(idirectfbfontdir) $(libidirectfbfont_requestor_la_OBJECTS) $(libidirectfbfont_requestor_la_LIBADD) $(LIBS) +libidirectfbimageprovider_requestor.la: $(libidirectfbimageprovider_requestor_la_OBJECTS) $(libidirectfbimageprovider_requestor_la_DEPENDENCIES) + $(libidirectfbimageprovider_requestor_la_LINK) -rpath $(idirectfbimageproviderdir) $(libidirectfbimageprovider_requestor_la_OBJECTS) $(libidirectfbimageprovider_requestor_la_LIBADD) $(LIBS) +libidirectfbinputdevice_requestor.la: $(libidirectfbinputdevice_requestor_la_OBJECTS) $(libidirectfbinputdevice_requestor_la_DEPENDENCIES) + $(libidirectfbinputdevice_requestor_la_LINK) -rpath $(idirectfbinputdevicedir) $(libidirectfbinputdevice_requestor_la_OBJECTS) $(libidirectfbinputdevice_requestor_la_LIBADD) $(LIBS) +libidirectfbpalette_requestor.la: $(libidirectfbpalette_requestor_la_OBJECTS) $(libidirectfbpalette_requestor_la_DEPENDENCIES) + $(libidirectfbpalette_requestor_la_LINK) -rpath $(idirectfbpalettedir) $(libidirectfbpalette_requestor_la_OBJECTS) $(libidirectfbpalette_requestor_la_LIBADD) $(LIBS) +libidirectfbscreen_requestor.la: $(libidirectfbscreen_requestor_la_OBJECTS) $(libidirectfbscreen_requestor_la_DEPENDENCIES) + $(libidirectfbscreen_requestor_la_LINK) -rpath $(idirectfbscreendir) $(libidirectfbscreen_requestor_la_OBJECTS) $(libidirectfbscreen_requestor_la_LIBADD) $(LIBS) +libidirectfbsurface_requestor.la: $(libidirectfbsurface_requestor_la_OBJECTS) $(libidirectfbsurface_requestor_la_DEPENDENCIES) + $(libidirectfbsurface_requestor_la_LINK) -rpath $(idirectfbsurfacedir) $(libidirectfbsurface_requestor_la_OBJECTS) $(libidirectfbsurface_requestor_la_LIBADD) $(LIBS) +libidirectfbwindow_requestor.la: $(libidirectfbwindow_requestor_la_OBJECTS) $(libidirectfbwindow_requestor_la_DEPENDENCIES) + $(libidirectfbwindow_requestor_la_LINK) -rpath $(idirectfbwindowdir) $(libidirectfbwindow_requestor_la_OBJECTS) $(libidirectfbwindow_requestor_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idirectfb_requestor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idirectfbdatabuffer_requestor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idirectfbdisplaylayer_requestor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idirectfbeventbuffer_requestor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idirectfbfont_requestor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idirectfbimageprovider_requestor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idirectfbinputdevice_requestor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idirectfbpalette_requestor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idirectfbscreen_requestor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idirectfbsurface_requestor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idirectfbwindow_requestor.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-idirectfbDATA: $(idirectfb_DATA) + @$(NORMAL_INSTALL) + test -z "$(idirectfbdir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbdir)" + @list='$(idirectfb_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(idirectfbDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(idirectfbdir)/$$f'"; \ + $(idirectfbDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(idirectfbdir)/$$f"; \ + done + +uninstall-idirectfbDATA: + @$(NORMAL_UNINSTALL) + @list='$(idirectfb_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(idirectfbdir)/$$f'"; \ + rm -f "$(DESTDIR)$(idirectfbdir)/$$f"; \ + done +install-idirectfbdatabufferDATA: $(idirectfbdatabuffer_DATA) + @$(NORMAL_INSTALL) + test -z "$(idirectfbdatabufferdir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbdatabufferdir)" + @list='$(idirectfbdatabuffer_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(idirectfbdatabufferDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(idirectfbdatabufferdir)/$$f'"; \ + $(idirectfbdatabufferDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(idirectfbdatabufferdir)/$$f"; \ + done + +uninstall-idirectfbdatabufferDATA: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbdatabuffer_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(idirectfbdatabufferdir)/$$f'"; \ + rm -f "$(DESTDIR)$(idirectfbdatabufferdir)/$$f"; \ + done +install-idirectfbdisplaylayerDATA: $(idirectfbdisplaylayer_DATA) + @$(NORMAL_INSTALL) + test -z "$(idirectfbdisplaylayerdir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbdisplaylayerdir)" + @list='$(idirectfbdisplaylayer_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(idirectfbdisplaylayerDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(idirectfbdisplaylayerdir)/$$f'"; \ + $(idirectfbdisplaylayerDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(idirectfbdisplaylayerdir)/$$f"; \ + done + +uninstall-idirectfbdisplaylayerDATA: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbdisplaylayer_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(idirectfbdisplaylayerdir)/$$f'"; \ + rm -f "$(DESTDIR)$(idirectfbdisplaylayerdir)/$$f"; \ + done +install-idirectfbeventbufferDATA: $(idirectfbeventbuffer_DATA) + @$(NORMAL_INSTALL) + test -z "$(idirectfbeventbufferdir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbeventbufferdir)" + @list='$(idirectfbeventbuffer_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(idirectfbeventbufferDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(idirectfbeventbufferdir)/$$f'"; \ + $(idirectfbeventbufferDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(idirectfbeventbufferdir)/$$f"; \ + done + +uninstall-idirectfbeventbufferDATA: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbeventbuffer_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(idirectfbeventbufferdir)/$$f'"; \ + rm -f "$(DESTDIR)$(idirectfbeventbufferdir)/$$f"; \ + done +install-idirectfbfontDATA: $(idirectfbfont_DATA) + @$(NORMAL_INSTALL) + test -z "$(idirectfbfontdir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbfontdir)" + @list='$(idirectfbfont_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(idirectfbfontDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(idirectfbfontdir)/$$f'"; \ + $(idirectfbfontDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(idirectfbfontdir)/$$f"; \ + done + +uninstall-idirectfbfontDATA: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbfont_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(idirectfbfontdir)/$$f'"; \ + rm -f "$(DESTDIR)$(idirectfbfontdir)/$$f"; \ + done +install-idirectfbimageproviderDATA: $(idirectfbimageprovider_DATA) + @$(NORMAL_INSTALL) + test -z "$(idirectfbimageproviderdir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbimageproviderdir)" + @list='$(idirectfbimageprovider_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(idirectfbimageproviderDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(idirectfbimageproviderdir)/$$f'"; \ + $(idirectfbimageproviderDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(idirectfbimageproviderdir)/$$f"; \ + done + +uninstall-idirectfbimageproviderDATA: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbimageprovider_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(idirectfbimageproviderdir)/$$f'"; \ + rm -f "$(DESTDIR)$(idirectfbimageproviderdir)/$$f"; \ + done +install-idirectfbinputdeviceDATA: $(idirectfbinputdevice_DATA) + @$(NORMAL_INSTALL) + test -z "$(idirectfbinputdevicedir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbinputdevicedir)" + @list='$(idirectfbinputdevice_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(idirectfbinputdeviceDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(idirectfbinputdevicedir)/$$f'"; \ + $(idirectfbinputdeviceDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(idirectfbinputdevicedir)/$$f"; \ + done + +uninstall-idirectfbinputdeviceDATA: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbinputdevice_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(idirectfbinputdevicedir)/$$f'"; \ + rm -f "$(DESTDIR)$(idirectfbinputdevicedir)/$$f"; \ + done +install-idirectfbpaletteDATA: $(idirectfbpalette_DATA) + @$(NORMAL_INSTALL) + test -z "$(idirectfbpalettedir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbpalettedir)" + @list='$(idirectfbpalette_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(idirectfbpaletteDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(idirectfbpalettedir)/$$f'"; \ + $(idirectfbpaletteDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(idirectfbpalettedir)/$$f"; \ + done + +uninstall-idirectfbpaletteDATA: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbpalette_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(idirectfbpalettedir)/$$f'"; \ + rm -f "$(DESTDIR)$(idirectfbpalettedir)/$$f"; \ + done +install-idirectfbscreenDATA: $(idirectfbscreen_DATA) + @$(NORMAL_INSTALL) + test -z "$(idirectfbscreendir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbscreendir)" + @list='$(idirectfbscreen_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(idirectfbscreenDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(idirectfbscreendir)/$$f'"; \ + $(idirectfbscreenDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(idirectfbscreendir)/$$f"; \ + done + +uninstall-idirectfbscreenDATA: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbscreen_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(idirectfbscreendir)/$$f'"; \ + rm -f "$(DESTDIR)$(idirectfbscreendir)/$$f"; \ + done +install-idirectfbsurfaceDATA: $(idirectfbsurface_DATA) + @$(NORMAL_INSTALL) + test -z "$(idirectfbsurfacedir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbsurfacedir)" + @list='$(idirectfbsurface_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(idirectfbsurfaceDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(idirectfbsurfacedir)/$$f'"; \ + $(idirectfbsurfaceDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(idirectfbsurfacedir)/$$f"; \ + done + +uninstall-idirectfbsurfaceDATA: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbsurface_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(idirectfbsurfacedir)/$$f'"; \ + rm -f "$(DESTDIR)$(idirectfbsurfacedir)/$$f"; \ + done +install-idirectfbwindowDATA: $(idirectfbwindow_DATA) + @$(NORMAL_INSTALL) + test -z "$(idirectfbwindowdir)" || $(MKDIR_P) "$(DESTDIR)$(idirectfbwindowdir)" + @list='$(idirectfbwindow_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(idirectfbwindowDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(idirectfbwindowdir)/$$f'"; \ + $(idirectfbwindowDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(idirectfbwindowdir)/$$f"; \ + done + +uninstall-idirectfbwindowDATA: + @$(NORMAL_UNINSTALL) + @list='$(idirectfbwindow_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(idirectfbwindowdir)/$$f'"; \ + rm -f "$(DESTDIR)$(idirectfbwindowdir)/$$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)$(idirectfbdir)" "$(DESTDIR)$(idirectfbdatabufferdir)" "$(DESTDIR)$(idirectfbdisplaylayerdir)" "$(DESTDIR)$(idirectfbeventbufferdir)" "$(DESTDIR)$(idirectfbfontdir)" "$(DESTDIR)$(idirectfbimageproviderdir)" "$(DESTDIR)$(idirectfbinputdevicedir)" "$(DESTDIR)$(idirectfbpalettedir)" "$(DESTDIR)$(idirectfbscreendir)" "$(DESTDIR)$(idirectfbsurfacedir)" "$(DESTDIR)$(idirectfbwindowdir)" "$(DESTDIR)$(idirectfbdir)" "$(DESTDIR)$(idirectfbdatabufferdir)" "$(DESTDIR)$(idirectfbdisplaylayerdir)" "$(DESTDIR)$(idirectfbeventbufferdir)" "$(DESTDIR)$(idirectfbfontdir)" "$(DESTDIR)$(idirectfbimageproviderdir)" "$(DESTDIR)$(idirectfbinputdevicedir)" "$(DESTDIR)$(idirectfbpalettedir)" "$(DESTDIR)$(idirectfbscreendir)" "$(DESTDIR)$(idirectfbsurfacedir)" "$(DESTDIR)$(idirectfbwindowdir)"; 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-idirectfbLTLIBRARIES \ + clean-idirectfbdatabufferLTLIBRARIES \ + clean-idirectfbdisplaylayerLTLIBRARIES \ + clean-idirectfbeventbufferLTLIBRARIES \ + clean-idirectfbfontLTLIBRARIES \ + clean-idirectfbimageproviderLTLIBRARIES \ + clean-idirectfbinputdeviceLTLIBRARIES \ + clean-idirectfbpaletteLTLIBRARIES \ + clean-idirectfbscreenLTLIBRARIES \ + clean-idirectfbsurfaceLTLIBRARIES \ + clean-idirectfbwindowLTLIBRARIES 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-idirectfbDATA install-idirectfbLTLIBRARIES \ + install-idirectfbdatabufferDATA \ + install-idirectfbdatabufferLTLIBRARIES \ + install-idirectfbdisplaylayerDATA \ + install-idirectfbdisplaylayerLTLIBRARIES \ + install-idirectfbeventbufferDATA \ + install-idirectfbeventbufferLTLIBRARIES \ + install-idirectfbfontDATA install-idirectfbfontLTLIBRARIES \ + install-idirectfbimageproviderDATA \ + install-idirectfbimageproviderLTLIBRARIES \ + install-idirectfbinputdeviceDATA \ + install-idirectfbinputdeviceLTLIBRARIES \ + install-idirectfbpaletteDATA \ + install-idirectfbpaletteLTLIBRARIES \ + install-idirectfbscreenDATA install-idirectfbscreenLTLIBRARIES \ + install-idirectfbsurfaceDATA \ + install-idirectfbsurfaceLTLIBRARIES \ + install-idirectfbwindowDATA install-idirectfbwindowLTLIBRARIES + +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-idirectfbDATA uninstall-idirectfbLTLIBRARIES \ + uninstall-idirectfbdatabufferDATA \ + uninstall-idirectfbdatabufferLTLIBRARIES \ + uninstall-idirectfbdisplaylayerDATA \ + uninstall-idirectfbdisplaylayerLTLIBRARIES \ + uninstall-idirectfbeventbufferDATA \ + uninstall-idirectfbeventbufferLTLIBRARIES \ + uninstall-idirectfbfontDATA uninstall-idirectfbfontLTLIBRARIES \ + uninstall-idirectfbimageproviderDATA \ + uninstall-idirectfbimageproviderLTLIBRARIES \ + uninstall-idirectfbinputdeviceDATA \ + uninstall-idirectfbinputdeviceLTLIBRARIES \ + uninstall-idirectfbpaletteDATA \ + uninstall-idirectfbpaletteLTLIBRARIES \ + uninstall-idirectfbscreenDATA \ + uninstall-idirectfbscreenLTLIBRARIES \ + uninstall-idirectfbsurfaceDATA \ + uninstall-idirectfbsurfaceLTLIBRARIES \ + uninstall-idirectfbwindowDATA \ + uninstall-idirectfbwindowLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-idirectfbLTLIBRARIES \ + clean-idirectfbdatabufferLTLIBRARIES \ + clean-idirectfbdisplaylayerLTLIBRARIES \ + clean-idirectfbeventbufferLTLIBRARIES \ + clean-idirectfbfontLTLIBRARIES \ + clean-idirectfbimageproviderLTLIBRARIES \ + clean-idirectfbinputdeviceLTLIBRARIES \ + clean-idirectfbpaletteLTLIBRARIES \ + clean-idirectfbscreenLTLIBRARIES \ + clean-idirectfbsurfaceLTLIBRARIES \ + clean-idirectfbwindowLTLIBRARIES 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-idirectfbDATA \ + install-idirectfbLTLIBRARIES install-idirectfbdatabufferDATA \ + install-idirectfbdatabufferLTLIBRARIES \ + install-idirectfbdisplaylayerDATA \ + install-idirectfbdisplaylayerLTLIBRARIES \ + install-idirectfbeventbufferDATA \ + install-idirectfbeventbufferLTLIBRARIES \ + install-idirectfbfontDATA install-idirectfbfontLTLIBRARIES \ + install-idirectfbimageproviderDATA \ + install-idirectfbimageproviderLTLIBRARIES \ + install-idirectfbinputdeviceDATA \ + install-idirectfbinputdeviceLTLIBRARIES \ + install-idirectfbpaletteDATA \ + install-idirectfbpaletteLTLIBRARIES \ + install-idirectfbscreenDATA install-idirectfbscreenLTLIBRARIES \ + install-idirectfbsurfaceDATA \ + install-idirectfbsurfaceLTLIBRARIES \ + install-idirectfbwindowDATA install-idirectfbwindowLTLIBRARIES \ + 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-idirectfbDATA \ + uninstall-idirectfbLTLIBRARIES \ + uninstall-idirectfbdatabufferDATA \ + uninstall-idirectfbdatabufferLTLIBRARIES \ + uninstall-idirectfbdisplaylayerDATA \ + uninstall-idirectfbdisplaylayerLTLIBRARIES \ + uninstall-idirectfbeventbufferDATA \ + uninstall-idirectfbeventbufferLTLIBRARIES \ + uninstall-idirectfbfontDATA uninstall-idirectfbfontLTLIBRARIES \ + uninstall-idirectfbimageproviderDATA \ + uninstall-idirectfbimageproviderLTLIBRARIES \ + uninstall-idirectfbinputdeviceDATA \ + uninstall-idirectfbinputdeviceLTLIBRARIES \ + uninstall-idirectfbpaletteDATA \ + uninstall-idirectfbpaletteLTLIBRARIES \ + uninstall-idirectfbscreenDATA \ + uninstall-idirectfbscreenLTLIBRARIES \ + uninstall-idirectfbsurfaceDATA \ + uninstall-idirectfbsurfaceLTLIBRARIES \ + uninstall-idirectfbwindowDATA \ + uninstall-idirectfbwindowLTLIBRARIES + +%.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/proxy/requestor/idirectfb_requestor.c b/Source/DirectFB/proxy/requestor/idirectfb_requestor.c new file mode 100755 index 0000000..5e0796c --- /dev/null +++ b/Source/DirectFB/proxy/requestor/idirectfb_requestor.c @@ -0,0 +1,1045 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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. +*/ + +#include + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include +#include + +#include +#include + + +static DFBResult Probe( void ); +static DFBResult Construct( IDirectFB *thiz, const char *host, int session ); + +#include + +DIRECT_INTERFACE_IMPLEMENTATION( IDirectFB, Requestor ) + + +/**************************************************************************************************/ + +/* + * private data struct of IDirectFB_Requestor + */ +typedef struct { + int ref; /* reference counter */ + + VoodooClient *client; + VoodooManager *manager; + + VoodooInstanceID instance; + + DFBCooperativeLevel level; /* current cooperative level */ +} IDirectFB_Requestor_data; + +/**************************************************************************************************/ + +static void +IDirectFB_Requestor_Destruct( IDirectFB *thiz ) +{ + IDirectFB_Requestor_data *data = thiz->priv; + + D_DEBUG( "%s (%p)\n", __FUNCTION__, thiz ); + + voodoo_manager_request( data->manager, data->instance, + IDIRECTFB_METHOD_ID_Release, VREQ_NONE, NULL, + VMBT_NONE ); + + voodoo_client_destroy( data->client ); + + DIRECT_DEALLOCATE_INTERFACE( thiz ); +} + +/**************************************************************************************************/ + +static DirectResult +IDirectFB_Requestor_AddRef( IDirectFB *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Requestor) + + data->ref++; + + return DFB_OK; +} + +static DirectResult +IDirectFB_Requestor_Release( IDirectFB *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Requestor) + + if (--data->ref == 0) + IDirectFB_Requestor_Destruct( thiz ); + + return DFB_OK; +} + +static DFBResult +IDirectFB_Requestor_SetCooperativeLevel( IDirectFB *thiz, + DFBCooperativeLevel level ) +{ + DirectResult ret; + VoodooResponseMessage *response; + + DIRECT_INTERFACE_GET_DATA(IDirectFB_Requestor) + + if (level == data->level) + return DFB_OK; + + switch (level) { + case DFSCL_NORMAL: + break; + + case DFSCL_FULLSCREEN: + case DFSCL_EXCLUSIVE: + if (dfb_config->force_windowed || dfb_config->force_desktop) + return DFB_ACCESSDENIED; + + break; + + default: + return DFB_INVARG; + } + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFB_METHOD_ID_SetCooperativeLevel, VREQ_RESPOND, &response, + VMBT_INT, level, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret == DR_OK) + data->level = level; + + voodoo_manager_finish_request( data->manager, response ); + + return ret; +} + +static DFBResult +IDirectFB_Requestor_GetDeviceDescription( IDirectFB *thiz, + DFBGraphicsDeviceDescription *ret_desc ) +{ + DirectResult ret; + VoodooResponseMessage *response; + + DIRECT_INTERFACE_GET_DATA(IDirectFB_Requestor) + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFB_METHOD_ID_GetDeviceDescription, VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret == DR_OK) { + VoodooMessageParser parser; + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_READ_DATA( parser, ret_desc, sizeof(DFBGraphicsDeviceDescription) ); + VOODOO_PARSER_END( parser ); + } + + voodoo_manager_finish_request( data->manager, response ); + + return ret; +} + +static DFBResult +IDirectFB_Requestor_EnumVideoModes( IDirectFB *thiz, + DFBVideoModeCallback callbackfunc, + void *callbackdata ) +{ + DirectResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + int i, num; + IDirectFB_Dispatcher_EnumVideoModes_Item *items; + + DIRECT_INTERFACE_GET_DATA(IDirectFB_Requestor) + + if (!callbackfunc) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFB_METHOD_ID_EnumVideoModes, VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_INT( parser, num ); + + items = D_MALLOC( sizeof(*items) * num ); + if (items) + VOODOO_PARSER_READ_DATA( parser, items, sizeof(*items) * num ); + else + ret = D_OOM(); + + VOODOO_PARSER_END( parser ); + + voodoo_manager_finish_request( data->manager, response ); + + if (items) { + for (i=0; imanager, data->instance, + IDIRECTFB_METHOD_ID_SetVideoMode, VREQ_RESPOND, &response, + VMBT_INT, width, + VMBT_INT, height, + VMBT_INT, bpp, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + + voodoo_manager_finish_request( data->manager, response ); + + return ret; +} + +static DFBResult +IDirectFB_Requestor_CreateSurface( IDirectFB *thiz, + const DFBSurfaceDescription *real_desc, + IDirectFBSurface **ret_interface ) +{ + DirectResult ret; + VoodooResponseMessage *response; + VoodooInstanceID instance_id; + DFBSurfaceDescription desc; + DFBSurfaceCapabilities caps = DSCAPS_NONE; + void *interface_ptr = NULL; + + DIRECT_INTERFACE_GET_DATA(IDirectFB_Requestor) + + if (!real_desc || !ret_interface) + return DFB_INVARG; + + direct_memcpy( &desc, real_desc, sizeof(DFBSurfaceDescription) ); + + if (desc.flags & (DSDESC_PALETTE | DSDESC_PREALLOCATED)) + D_ONCE( "DSDESC_PALETTE and DSDESC_PREALLOCATED not supported yet" ); + + if (desc.flags & DSDESC_CAPS) + caps = desc.caps; + + if (caps & DSCAPS_PRIMARY) { + if (!(desc.flags & DSDESC_WIDTH) && dfb_config->mode.width) { + desc.flags |= DSDESC_WIDTH; + desc.width = dfb_config->mode.width; + } + + if (!(desc.flags & DSDESC_HEIGHT) && dfb_config->mode.height) { + desc.flags |= DSDESC_HEIGHT; + desc.height = dfb_config->mode.height; + } + } + + if (!(desc.flags & DSDESC_PIXELFORMAT) && dfb_config->mode.format != DSPF_UNKNOWN) { + desc.flags |= DSDESC_PIXELFORMAT; + desc.pixelformat = dfb_config->mode.format; + } + + if (!(desc.flags & DSDESC_RESOURCE_ID)) { + desc.flags |= DSDESC_RESOURCE_ID; + desc.resource_id = 1100; + } + + D_INFO( "IDirectFB_Requestor_CreateSurface: Using resource ID %lu\n", desc.resource_id ); + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFB_METHOD_ID_CreateSurface, VREQ_RESPOND, &response, + VMBT_DFBSurfaceDescription( desc ), + VMBT_NONE ); + if (ret) + return ret; + + /* Copy and finish as we do our next request in surface constructor already! */ + instance_id = response->instance; + + voodoo_manager_finish_request( data->manager, response ); + + ret = response->result; + if (ret == DR_OK) + ret = voodoo_construct_requestor( data->manager, "IDirectFBSurface", + instance_id, thiz, &interface_ptr ); + + *ret_interface = interface_ptr; + + return ret; +} + +static DFBResult +IDirectFB_Requestor_CreatePalette( IDirectFB *thiz, + const DFBPaletteDescription *desc, + IDirectFBPalette **interface_ptr ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Requestor) + + if (!interface_ptr) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFB_Requestor_EnumScreens( IDirectFB *thiz, + DFBScreenCallback callbackfunc, + void *callbackdata ) +{ + DirectResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + int i, num; + IDirectFB_Dispatcher_EnumScreens_Item *items; + + DIRECT_INTERFACE_GET_DATA(IDirectFB_Requestor) + + if (!callbackfunc) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFB_METHOD_ID_EnumScreens, VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_INT( parser, num ); + + items = D_MALLOC( sizeof(*items) * num ); + if (items) + VOODOO_PARSER_READ_DATA( parser, items, sizeof(*items) * num ); + else + ret = D_OOM(); + + VOODOO_PARSER_END( parser ); + + voodoo_manager_finish_request( data->manager, response ); + + if (items) { + for (i=0; imanager, data->instance, + IDIRECTFB_METHOD_ID_GetScreen, VREQ_RESPOND, &response, + VMBT_ID, id, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret == DR_OK) + ret = voodoo_construct_requestor( data->manager, "IDirectFBScreen", + response->instance, thiz, &interface_ptr ); + + voodoo_manager_finish_request( data->manager, response ); + + *ret_interface = interface_ptr; + + return ret; +} + +static DFBResult +IDirectFB_Requestor_EnumDisplayLayers( IDirectFB *thiz, + DFBDisplayLayerCallback callbackfunc, + void *callbackdata ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Requestor) + + if (!callbackfunc) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFB_Requestor_GetDisplayLayer( IDirectFB *thiz, + DFBDisplayLayerID id, + IDirectFBDisplayLayer **ret_interface ) +{ + DirectResult ret; + VoodooResponseMessage *response; + void *interface_ptr = NULL; + + DIRECT_INTERFACE_GET_DATA(IDirectFB_Requestor) + + if (!ret_interface) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFB_METHOD_ID_GetDisplayLayer, VREQ_RESPOND, &response, + VMBT_ID, id, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret == DR_OK) + ret = voodoo_construct_requestor( data->manager, "IDirectFBDisplayLayer", + response->instance, thiz, &interface_ptr ); + + voodoo_manager_finish_request( data->manager, response ); + + *ret_interface = interface_ptr; + + return ret; +} + +static DFBResult +IDirectFB_Requestor_EnumInputDevices( IDirectFB *thiz, + DFBInputDeviceCallback callbackfunc, + void *callbackdata ) +{ + DirectResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + int i, num; + IDirectFB_Dispatcher_EnumInputDevices_Item *items; + + DIRECT_INTERFACE_GET_DATA(IDirectFB_Requestor) + + if (!callbackfunc) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFB_METHOD_ID_EnumInputDevices, VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + if (response->result) { + voodoo_manager_finish_request( data->manager, response ); + return response->result; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_INT( parser, num ); + + items = D_MALLOC( sizeof(*items) * num ); + if (items) + VOODOO_PARSER_READ_DATA( parser, items, sizeof(*items) * num ); + else + ret = D_OOM(); + + VOODOO_PARSER_END( parser ); + + voodoo_manager_finish_request( data->manager, response ); + + if (items) { + for (i=0; imanager, data->instance, + IDIRECTFB_METHOD_ID_GetInputDevice, VREQ_RESPOND, &response, + VMBT_ID, id, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret == DR_OK) + ret = voodoo_construct_requestor( data->manager, "IDirectFBInputDevice", + response->instance, thiz, &interface_ptr ); + + voodoo_manager_finish_request( data->manager, response ); + + *ret_interface = interface_ptr; + + return ret; +} + +static DFBResult +IDirectFB_Requestor_CreateEventBuffer( IDirectFB *thiz, + IDirectFBEventBuffer **ret_interface) +{ + DFBResult ret; + IDirectFBEventBuffer *buffer; + IDirectFBEventBuffer *dispatcher; + VoodooInstanceID instance; + void *ptr; + + DIRECT_INTERFACE_GET_DATA(IDirectFB_Requestor) + + if (!ret_interface) + return DFB_INVARG; + + /* Create the real interface. */ + DIRECT_ALLOCATE_INTERFACE( buffer, IDirectFBEventBuffer ); + + IDirectFBEventBuffer_Construct( buffer, NULL, NULL ); + + /* Create the dispatcher. */ + ret = voodoo_construct_dispatcher( data->manager, "IDirectFBEventBuffer", buffer, + data->instance, NULL, &instance, &ptr ); + if (ret) { + buffer->Release( buffer ); + return ret; + } + + dispatcher = ptr; + + /* Send the request including the instance ID of the dispatcher. */ + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFB_METHOD_ID_CreateEventBuffer, VREQ_NONE, NULL, + VMBT_ID, instance, + VMBT_NONE ); + if (ret) { + dispatcher->Release( dispatcher ); + return ret; + } + + /* Return the dispatcher interface. */ + *ret_interface = dispatcher; + + return DFB_OK; +} + +static DFBResult +IDirectFB_Requestor_CreateInputEventBuffer( IDirectFB *thiz, + DFBInputDeviceCapabilities caps, + DFBBoolean global, + IDirectFBEventBuffer **ret_interface) +{ + DFBResult ret; + IDirectFBEventBuffer *buffer; + IDirectFBEventBuffer *dispatcher; + VoodooInstanceID instance; + void *ptr; + + DIRECT_INTERFACE_GET_DATA(IDirectFB_Requestor) + + if (!ret_interface) + return DFB_INVARG; + + /* Create the real interface. */ + DIRECT_ALLOCATE_INTERFACE( buffer, IDirectFBEventBuffer ); + + IDirectFBEventBuffer_Construct( buffer, NULL, NULL ); + + /* Create the dispatcher. */ + ret = voodoo_construct_dispatcher( data->manager, "IDirectFBEventBuffer", buffer, + data->instance, NULL, &instance, &ptr ); + if (ret) { + buffer->Release( buffer ); + return ret; + } + + dispatcher = ptr; + + /* Send the request including the instance ID of the dispatcher. */ + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFB_METHOD_ID_CreateInputEventBuffer, VREQ_NONE, NULL, + VMBT_ID, instance, + VMBT_INT, caps, + VMBT_INT, global, + VMBT_NONE ); + if (ret) { + dispatcher->Release( dispatcher ); + return ret; + } + + /* Return the dispatcher interface. */ + *ret_interface = dispatcher; + + return DFB_OK; +} + +static DFBResult +IDirectFB_Requestor_CreateImageProvider( IDirectFB *thiz, + const char *filename, + IDirectFBImageProvider **ret_interface ) +{ + DFBResult ret; + DFBDataBufferDescription desc; + IDirectFBDataBuffer *buffer; + IDirectFBImageProvider *provider; + + DIRECT_INTERFACE_GET_DATA(IDirectFB_Requestor) + + /* Check arguments */ + if (!filename || !ret_interface) + return DFB_INVARG; + + /* Create a data buffer. */ + desc.flags = DBDESC_FILE; + desc.file = filename; + + ret = thiz->CreateDataBuffer( thiz, &desc, &buffer ); + if (ret) + return ret; + + /* Create (probing) the image provider. */ + ret = buffer->CreateImageProvider( buffer, &provider ); + if (ret) { + buffer->Release( buffer ); + return ret; + } + + /* We don't need it anymore, image provider has its own reference. */ + buffer->Release( buffer ); + + /* Return the new provider. */ + *ret_interface = provider; + + return ret; +} + +static DFBResult +IDirectFB_Requestor_CreateVideoProvider( IDirectFB *thiz, + const char *filename, + IDirectFBVideoProvider **interface_ptr ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Requestor) + + /* Check arguments */ + if (!interface_ptr || !filename) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFB_Requestor_CreateFont( IDirectFB *thiz, + const char *filename, + const DFBFontDescription *desc, + IDirectFBFont **ret_interface ) +{ + DFBResult ret; + DFBDataBufferDescription bdesc; + IDirectFBDataBuffer *buffer; + IDirectFBFont *font; + + DIRECT_INTERFACE_GET_DATA(IDirectFB_Requestor) + + /* Check arguments */ + if (!filename || !ret_interface) + return DFB_INVARG; + + /* Create a data buffer. */ + bdesc.flags = DBDESC_FILE; + bdesc.file = filename; + + ret = thiz->CreateDataBuffer( thiz, &bdesc, &buffer ); + if (ret) + return ret; + + /* Create (probing) the font. */ + ret = buffer->CreateFont( buffer, desc, &font ); + if (ret) { + buffer->Release( buffer ); + return ret; + } + + /* We don't need it anymore, font has its own reference. */ + buffer->Release( buffer ); + + /* Return the new font. */ + *ret_interface = font; + + return ret; +} + +static DFBResult +IDirectFB_Requestor_CreateDataBuffer( IDirectFB *thiz, + const DFBDataBufferDescription *desc, + IDirectFBDataBuffer **ret_interface ) +{ + DFBResult ret; + IDirectFBDataBuffer *buffer; + IDirectFBDataBuffer *dispatcher; + VoodooInstanceID instance; + void *ptr; + + DIRECT_INTERFACE_GET_DATA(IDirectFB_Requestor) + + if (!ret_interface) + return DFB_INVARG; + + /* Create the real interface. */ + if (!desc) { + DIRECT_ALLOCATE_INTERFACE( buffer, IDirectFBDataBuffer ); + + ret = IDirectFBDataBuffer_Streamed_Construct( buffer, NULL ); + } + else if (desc->flags & DBDESC_FILE) { + if (!desc->file) + return DFB_INVARG; + + DIRECT_ALLOCATE_INTERFACE( buffer, IDirectFBDataBuffer ); + + ret = IDirectFBDataBuffer_File_Construct( buffer, desc->file, NULL ); + } + else if (desc->flags & DBDESC_MEMORY) { + if (!desc->memory.data || !desc->memory.length) + return DFB_INVARG; + + DIRECT_ALLOCATE_INTERFACE( buffer, IDirectFBDataBuffer ); + + ret = IDirectFBDataBuffer_Memory_Construct( buffer, + desc->memory.data, + desc->memory.length, + NULL ); + } + else + return DFB_INVARG; + + if (ret) + return ret; + + /* Create the dispatcher. */ + ret = voodoo_construct_dispatcher( data->manager, "IDirectFBDataBuffer", + buffer, data->instance, thiz, &instance, &ptr ); + if (ret) { + buffer->Release( buffer ); + return ret; + } + + dispatcher = ptr; + + /* Send the request including the instance ID of the dispatcher. */ + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFB_METHOD_ID_CreateDataBuffer, VREQ_NONE, NULL, + VMBT_ID, instance, + VMBT_NONE ); + if (ret) { + dispatcher->Release( dispatcher ); + return ret; + } + + /* Return the dispatcher(!) interface. */ + *ret_interface = dispatcher; + + return DFB_OK; +} + +static DFBResult +IDirectFB_Requestor_SetClipboardData( IDirectFB *thiz, + const char *mime_type, + const void *data, + unsigned int size, + struct timeval *timestamp ) +{ + if (!mime_type || !data || !size) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFB_Requestor_GetClipboardData( IDirectFB *thiz, + char **mime_type, + void **clip_data, + unsigned int *size ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Requestor) + + if (!mime_type && !clip_data && !size) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFB_Requestor_GetClipboardTimeStamp( IDirectFB *thiz, + struct timeval *timestamp ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Requestor) + + if (!timestamp) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFB_Requestor_Suspend( IDirectFB *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFB_Requestor_Resume( IDirectFB *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFB_Requestor_WaitIdle( IDirectFB *thiz ) +{ + DirectResult ret; + VoodooResponseMessage *response; + + DIRECT_INTERFACE_GET_DATA(IDirectFB_Requestor) + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFB_METHOD_ID_WaitIdle, VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + + voodoo_manager_finish_request( data->manager, response ); + + return ret; +} + +static DFBResult +IDirectFB_Requestor_WaitForSync( IDirectFB *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFB_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFB_Requestor_GetInterface( IDirectFB *thiz, + const char *type, + const char *implementation, + void *arg, + void **ret_interface ) +{ + DirectResult ret; + VoodooResponseMessage *response; + void *interface_ptr = NULL; + + DIRECT_INTERFACE_GET_DATA(IDirectFB_Requestor) + + if (!type || !ret_interface) + return DFB_INVARG; + + if (implementation || arg) + return DFB_UNSUPPORTED; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFB_METHOD_ID_GetInterface, VREQ_RESPOND, &response, + VMBT_STRING, type, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret == DR_OK) + ret = voodoo_construct_requestor( data->manager, type, response->instance, thiz, &interface_ptr ); + + voodoo_manager_finish_request( data->manager, response ); + + *ret_interface = interface_ptr; + + return ret; +} + +/**************************************************************************************************/ + +static DFBResult +Probe() +{ + /* This implementation has to be loaded explicitly. */ + return DFB_UNSUPPORTED; +} + +/* + * Constructor + * + * Fills in function pointers and intializes data structure. + */ +static DFBResult +Construct( IDirectFB *thiz, const char *host, int port ) +{ + DFBResult ret; + + DIRECT_ALLOCATE_INTERFACE_DATA(thiz, IDirectFB_Requestor) + + data->ref = 1; + data->level = DFSCL_NORMAL; + + ret = voodoo_client_create( host, port, &data->client ); + if (ret) { + DIRECT_DEALLOCATE_INTERFACE( thiz ); + return ret; + } + + data->manager = voodoo_client_manager( data->client ); + + ret = voodoo_manager_super( data->manager, "IDirectFB", &data->instance ); + if (ret) { + voodoo_client_destroy( data->client ); + DIRECT_DEALLOCATE_INTERFACE( thiz ); + return ret; + } + + thiz->AddRef = IDirectFB_Requestor_AddRef; + thiz->Release = IDirectFB_Requestor_Release; + thiz->SetCooperativeLevel = IDirectFB_Requestor_SetCooperativeLevel; + thiz->GetDeviceDescription = IDirectFB_Requestor_GetDeviceDescription; + thiz->EnumVideoModes = IDirectFB_Requestor_EnumVideoModes; + thiz->SetVideoMode = IDirectFB_Requestor_SetVideoMode; + thiz->CreateSurface = IDirectFB_Requestor_CreateSurface; + thiz->CreatePalette = IDirectFB_Requestor_CreatePalette; + thiz->EnumScreens = IDirectFB_Requestor_EnumScreens; + thiz->GetScreen = IDirectFB_Requestor_GetScreen; + thiz->EnumDisplayLayers = IDirectFB_Requestor_EnumDisplayLayers; + thiz->GetDisplayLayer = IDirectFB_Requestor_GetDisplayLayer; + thiz->EnumInputDevices = IDirectFB_Requestor_EnumInputDevices; + thiz->GetInputDevice = IDirectFB_Requestor_GetInputDevice; + thiz->CreateEventBuffer = IDirectFB_Requestor_CreateEventBuffer; + thiz->CreateInputEventBuffer = IDirectFB_Requestor_CreateInputEventBuffer; + thiz->CreateImageProvider = IDirectFB_Requestor_CreateImageProvider; + thiz->CreateVideoProvider = IDirectFB_Requestor_CreateVideoProvider; + thiz->CreateFont = IDirectFB_Requestor_CreateFont; + thiz->CreateDataBuffer = IDirectFB_Requestor_CreateDataBuffer; + thiz->SetClipboardData = IDirectFB_Requestor_SetClipboardData; + thiz->GetClipboardData = IDirectFB_Requestor_GetClipboardData; + thiz->GetClipboardTimeStamp = IDirectFB_Requestor_GetClipboardTimeStamp; + thiz->Suspend = IDirectFB_Requestor_Suspend; + thiz->Resume = IDirectFB_Requestor_Resume; + thiz->WaitIdle = IDirectFB_Requestor_WaitIdle; + thiz->WaitForSync = IDirectFB_Requestor_WaitForSync; + thiz->GetInterface = IDirectFB_Requestor_GetInterface; + + return DFB_OK; +} + diff --git a/Source/DirectFB/proxy/requestor/idirectfbdatabuffer_requestor.c b/Source/DirectFB/proxy/requestor/idirectfbdatabuffer_requestor.c new file mode 100755 index 0000000..eebe877 --- /dev/null +++ b/Source/DirectFB/proxy/requestor/idirectfbdatabuffer_requestor.c @@ -0,0 +1,484 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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. +*/ + +#include + +#include +#include + +#include + +#include + +#include +#include + +#include +#include + +#include + +#include + +#include + + +static DFBResult Probe( void ); +static DFBResult Construct( IDirectFBDataBuffer *thiz, + VoodooManager *manager, + VoodooInstanceID instance, + void *arg ); + +#include + +DIRECT_INTERFACE_IMPLEMENTATION( IDirectFBDataBuffer, Requestor ) + +/**************************************************************************************************/ + +/* + * private data struct of IDirectFBDataBuffer_Requestor + */ +typedef struct { + IDirectFBDataBuffer_data base; + + VoodooManager *manager; + VoodooInstanceID instance; +} IDirectFBDataBuffer_Requestor_data; + +/**************************************************************************************************/ + +static void +IDirectFBDataBuffer_Requestor_Destruct( IDirectFBDataBuffer *thiz ) +{ + IDirectFBDataBuffer_Requestor_data *data = thiz->priv; + + D_DEBUG( "%s (%p)\n", __FUNCTION__, thiz ); + + voodoo_manager_request( data->manager, data->instance, + IDIRECTFBDATABUFFER_METHOD_ID_Release, VREQ_NONE, NULL, + VMBT_NONE ); + + IDirectFBDataBuffer_Destruct( thiz ); +} + +/**************************************************************************************************/ + +static DirectResult +IDirectFBDataBuffer_Requestor_AddRef( IDirectFBDataBuffer *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Requestor) + + data->base.ref++; + + return DR_OK; +} + +static DirectResult +IDirectFBDataBuffer_Requestor_Release( IDirectFBDataBuffer *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Requestor) + + if (--data->base.ref == 0) + IDirectFBDataBuffer_Requestor_Destruct( thiz ); + + return DR_OK; +} + +static DFBResult +IDirectFBDataBuffer_Requestor_Flush( IDirectFBDataBuffer *thiz ) +{ + DFBResult ret; + VoodooResponseMessage *response; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Requestor) + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBDATABUFFER_METHOD_ID_Flush, VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + + voodoo_manager_finish_request( data->manager, response ); + + return ret; +} + +static DFBResult +IDirectFBDataBuffer_Requestor_Finish( IDirectFBDataBuffer *thiz ) +{ + DFBResult ret; + VoodooResponseMessage *response; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Requestor) + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBDATABUFFER_METHOD_ID_Finish, VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + + voodoo_manager_finish_request( data->manager, response ); + + return ret; +} + +static DFBResult +IDirectFBDataBuffer_Requestor_SeekTo( IDirectFBDataBuffer *thiz, + unsigned int offset ) +{ + DFBResult ret; + VoodooResponseMessage *response; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Requestor) + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBDATABUFFER_METHOD_ID_SeekTo, VREQ_RESPOND, &response, + VMBT_UINT, offset, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + + voodoo_manager_finish_request( data->manager, response ); + + return ret; +} + +static DFBResult +IDirectFBDataBuffer_Requestor_GetPosition( IDirectFBDataBuffer *thiz, + unsigned int *ret_offset ) +{ + DFBResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + unsigned int offset; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Requestor) + + if (!ret_offset) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBDATABUFFER_METHOD_ID_GetPosition, VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_UINT( parser, offset ); + VOODOO_PARSER_END( parser ); + + voodoo_manager_finish_request( data->manager, response ); + + *ret_offset = offset; + + return ret; +} + +static DFBResult +IDirectFBDataBuffer_Requestor_GetLength( IDirectFBDataBuffer *thiz, + unsigned int *ret_length ) +{ + DFBResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + unsigned int length; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Requestor) + + if (!ret_length) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBDATABUFFER_METHOD_ID_GetLength, VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_UINT( parser, length ); + VOODOO_PARSER_END( parser ); + + voodoo_manager_finish_request( data->manager, response ); + + *ret_length = length; + + return ret; +} + +static DFBResult +IDirectFBDataBuffer_Requestor_WaitForData( IDirectFBDataBuffer *thiz, + unsigned int length ) +{ + DFBResult ret; + VoodooResponseMessage *response; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Requestor) + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBDATABUFFER_METHOD_ID_WaitForData, VREQ_RESPOND, &response, + VMBT_UINT, length, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + + voodoo_manager_finish_request( data->manager, response ); + + return ret; +} + +static DFBResult +IDirectFBDataBuffer_Requestor_WaitForDataWithTimeout( IDirectFBDataBuffer *thiz, + unsigned int length, + unsigned int seconds, + unsigned int milli_seconds ) +{ + DFBResult ret; + VoodooResponseMessage *response; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Requestor) + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBDATABUFFER_METHOD_ID_WaitForDataWithTimeout, VREQ_RESPOND, &response, + VMBT_UINT, length, + VMBT_UINT, seconds, + VMBT_UINT, milli_seconds, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + + voodoo_manager_finish_request( data->manager, response ); + + return ret; +} + +static DFBResult +IDirectFBDataBuffer_Requestor_GetData( IDirectFBDataBuffer *thiz, + unsigned int length, + void *dest, + unsigned int *ret_read ) +{ + DFBResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + unsigned int read; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Requestor) + + if (!length || !dest) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBDATABUFFER_METHOD_ID_GetData, VREQ_RESPOND, &response, + VMBT_UINT, length, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_UINT( parser, read ); + VOODOO_PARSER_READ_DATA( parser, dest, length ); + VOODOO_PARSER_END( parser ); + + voodoo_manager_finish_request( data->manager, response ); + + if (ret_read) + *ret_read = read; + + return ret; +} + +static DFBResult +IDirectFBDataBuffer_Requestor_PeekData( IDirectFBDataBuffer *thiz, + unsigned int length, + int offset, + void *dest, + unsigned int *ret_read ) +{ + DFBResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + unsigned int read; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Requestor) + + if (!length || !dest) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBDATABUFFER_METHOD_ID_PeekData, VREQ_RESPOND, &response, + VMBT_UINT, length, + VMBT_INT, offset, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_UINT( parser, read ); + VOODOO_PARSER_READ_DATA( parser, dest, length ); + VOODOO_PARSER_END( parser ); + + voodoo_manager_finish_request( data->manager, response ); + + if (ret_read) + *ret_read = read; + + return ret; +} + +static DFBResult +IDirectFBDataBuffer_Requestor_HasData( IDirectFBDataBuffer *thiz ) +{ + DFBResult ret; + VoodooResponseMessage *response; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Requestor) + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBDATABUFFER_METHOD_ID_HasData, VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + + voodoo_manager_finish_request( data->manager, response ); + + return ret; +} + +static DFBResult +IDirectFBDataBuffer_Requestor_PutData( IDirectFBDataBuffer *thiz, + const void *source, + unsigned int length ) +{ + DFBResult ret; + VoodooResponseMessage *response; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDataBuffer_Requestor) + + if (!source || !length) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBDATABUFFER_METHOD_ID_PutData, VREQ_RESPOND, &response, + VMBT_UINT, length, + VMBT_DATA, length, source, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + + voodoo_manager_finish_request( data->manager, response ); + + return ret; +} + +/**************************************************************************************************/ + +static DFBResult +Probe() +{ + /* This implementation has to be loaded explicitly. */ + return DFB_UNSUPPORTED; +} + +static DFBResult +Construct( IDirectFBDataBuffer *thiz, + VoodooManager *manager, + VoodooInstanceID instance, + void *arg ) +{ + DFBResult ret; + IDirectFB *idirectfb = arg; + IDirectFB_data *idirectfb_data; + + DIRECT_INTERFACE_GET_DATA_FROM( idirectfb, idirectfb_data, IDirectFB ); + + DIRECT_ALLOCATE_INTERFACE_DATA( thiz, IDirectFBDataBuffer_Requestor ); + + ret = IDirectFBDataBuffer_Construct( thiz, NULL, idirectfb_data->core ); + if (ret) + return ret; + + data->manager = manager; + data->instance = instance; + + data->base.filename = ""; + + thiz->AddRef = IDirectFBDataBuffer_Requestor_AddRef; + thiz->Release = IDirectFBDataBuffer_Requestor_Release; + thiz->Flush = IDirectFBDataBuffer_Requestor_Flush; + thiz->Finish = IDirectFBDataBuffer_Requestor_Finish; + thiz->SeekTo = IDirectFBDataBuffer_Requestor_SeekTo; + thiz->GetPosition = IDirectFBDataBuffer_Requestor_GetPosition; + thiz->GetLength = IDirectFBDataBuffer_Requestor_GetLength; + thiz->WaitForData = IDirectFBDataBuffer_Requestor_WaitForData; + thiz->WaitForDataWithTimeout = IDirectFBDataBuffer_Requestor_WaitForDataWithTimeout; + thiz->GetData = IDirectFBDataBuffer_Requestor_GetData; + thiz->PeekData = IDirectFBDataBuffer_Requestor_PeekData; + thiz->HasData = IDirectFBDataBuffer_Requestor_HasData; + thiz->PutData = IDirectFBDataBuffer_Requestor_PutData; + + return DFB_OK; +} + diff --git a/Source/DirectFB/proxy/requestor/idirectfbdisplaylayer_requestor.c b/Source/DirectFB/proxy/requestor/idirectfbdisplaylayer_requestor.c new file mode 100755 index 0000000..4867f06 --- /dev/null +++ b/Source/DirectFB/proxy/requestor/idirectfbdisplaylayer_requestor.c @@ -0,0 +1,721 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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. +*/ + +#include + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include "idirectfbdisplaylayer_requestor.h" +#include "idirectfbsurface_requestor.h" + + +static DFBResult Probe( void ); +static DFBResult Construct( IDirectFBDisplayLayer *thiz, + VoodooManager *manager, + VoodooInstanceID instance, + void *arg ); + +#include + +DIRECT_INTERFACE_IMPLEMENTATION( IDirectFBDisplayLayer, Requestor ) + + +/**************************************************************************************************/ + +static void +IDirectFBDisplayLayer_Requestor_Destruct( IDirectFBDisplayLayer *thiz ) +{ + IDirectFBDisplayLayer_Requestor_data *data = thiz->priv; + + D_DEBUG( "%s (%p)\n", __FUNCTION__, thiz ); + + voodoo_manager_request( data->manager, data->instance, + IDIRECTFBDISPLAYLAYER_METHOD_ID_Release, VREQ_NONE, NULL, + VMBT_NONE ); + + DIRECT_DEALLOCATE_INTERFACE( thiz ); +} + +/**************************************************************************************************/ + +static DirectResult +IDirectFBDisplayLayer_Requestor_AddRef( IDirectFBDisplayLayer *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Requestor) + + data->ref++; + + return DFB_OK; +} + +static DirectResult +IDirectFBDisplayLayer_Requestor_Release( IDirectFBDisplayLayer *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Requestor) + + if (--data->ref == 0) + IDirectFBDisplayLayer_Requestor_Destruct( thiz ); + + return DFB_OK; +} + +static DFBResult +IDirectFBDisplayLayer_Requestor_GetID( IDirectFBDisplayLayer *thiz, + DFBDisplayLayerID *ret_id ) +{ + DirectResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + DFBDisplayLayerID id; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Requestor) + + if (!ret_id) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBDISPLAYLAYER_METHOD_ID_GetID, VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_ID( parser, id ); + VOODOO_PARSER_END( parser ); + + voodoo_manager_finish_request( data->manager, response ); + + *ret_id = id; + + return ret; +} + +static DFBResult +IDirectFBDisplayLayer_Requestor_GetDescription( IDirectFBDisplayLayer *thiz, + DFBDisplayLayerDescription *desc ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Requestor_GetSurface( IDirectFBDisplayLayer *thiz, + IDirectFBSurface **interface_ptr ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Requestor_GetScreen( IDirectFBDisplayLayer *thiz, + IDirectFBScreen **ret_interface ) +{ + DirectResult ret; + VoodooResponseMessage *response; + void *interface_ptr = NULL; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Requestor) + + if (!ret_interface) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBDISPLAYLAYER_METHOD_ID_GetScreen, VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret == DR_OK) + ret = voodoo_construct_requestor( data->manager, "IDirectFBScreen", + response->instance, data->idirectfb, &interface_ptr ); + + voodoo_manager_finish_request( data->manager, response ); + + *ret_interface = interface_ptr; + + return ret; +} + +static DFBResult +IDirectFBDisplayLayer_Requestor_SetCooperativeLevel( IDirectFBDisplayLayer *thiz, + DFBDisplayLayerCooperativeLevel level ) +{ + DirectResult ret; + VoodooResponseMessage *response; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Requestor) + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBDISPLAYLAYER_METHOD_ID_SetCooperativeLevel, VREQ_RESPOND, &response, + VMBT_UINT, level, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + + voodoo_manager_finish_request( data->manager, response ); + + return ret; +} + +static DFBResult +IDirectFBDisplayLayer_Requestor_SetOpacity( IDirectFBDisplayLayer *thiz, + u8 opacity ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Requestor_GetCurrentOutputField( IDirectFBDisplayLayer *thiz, int *field ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Requestor_SetFieldParity( IDirectFBDisplayLayer *thiz, int field ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Requestor_SetScreenLocation( IDirectFBDisplayLayer *thiz, + float x, + float y, + float width, + float height ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Requestor_SetSrcColorKey( IDirectFBDisplayLayer *thiz, + u8 r, + u8 g, + u8 b ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Requestor_SetDstColorKey( IDirectFBDisplayLayer *thiz, + u8 r, + u8 g, + u8 b ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Requestor_GetLevel( IDirectFBDisplayLayer *thiz, + int *level ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Requestor_SetLevel( IDirectFBDisplayLayer *thiz, + int level ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Requestor_GetConfiguration( IDirectFBDisplayLayer *thiz, + DFBDisplayLayerConfig *ret_config ) +{ + DirectResult ret; + VoodooResponseMessage *response; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Requestor) + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBDISPLAYLAYER_METHOD_ID_GetConfiguration, VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret == DR_OK) { + VoodooMessageParser parser; + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_READ_DATA( parser, ret_config, sizeof(DFBDisplayLayerConfig) ); + VOODOO_PARSER_END( parser ); + } + + voodoo_manager_finish_request( data->manager, response ); + + return ret; +} + +static DFBResult +IDirectFBDisplayLayer_Requestor_TestConfiguration( IDirectFBDisplayLayer *thiz, + const DFBDisplayLayerConfig *config, + DFBDisplayLayerConfigFlags *ret_failed ) +{ + DirectResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Requestor) + + if (!config) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBDISPLAYLAYER_METHOD_ID_TestConfiguration, VREQ_RESPOND, &response, + VMBT_DATA, sizeof(DFBDisplayLayerConfig), config, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + + if (ret_failed) { + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_UINT( parser, *ret_failed ); + VOODOO_PARSER_END( parser ); + } + + voodoo_manager_finish_request( data->manager, response ); + + return ret; +} + +static DFBResult +IDirectFBDisplayLayer_Requestor_SetConfiguration( IDirectFBDisplayLayer *thiz, + const DFBDisplayLayerConfig *config ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Requestor_SetBackgroundMode( IDirectFBDisplayLayer *thiz, + DFBDisplayLayerBackgroundMode background_mode ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Requestor) + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBDISPLAYLAYER_METHOD_ID_SetBackgroundMode, VREQ_NONE, NULL, + VMBT_INT, background_mode, + VMBT_NONE ); +} + +static DFBResult +IDirectFBDisplayLayer_Requestor_SetBackgroundImage( IDirectFBDisplayLayer *thiz, + IDirectFBSurface *surface ) +{ + IDirectFBSurface_Requestor_data *surface_data; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Requestor) + + if (!surface) + return DFB_INVARG; + + DIRECT_INTERFACE_GET_DATA_FROM( surface, surface_data, IDirectFBSurface_Requestor ); + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBDISPLAYLAYER_METHOD_ID_SetBackgroundImage, VREQ_NONE, NULL, + VMBT_ID, surface_data->instance, + VMBT_NONE ); +} + +static DFBResult +IDirectFBDisplayLayer_Requestor_SetBackgroundColor( IDirectFBDisplayLayer *thiz, + u8 r, u8 g, u8 b, u8 a ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Requestor_CreateWindow( IDirectFBDisplayLayer *thiz, + const DFBWindowDescription *real_desc, + IDirectFBWindow **ret_interface ) +{ + DirectResult ret; + VoodooResponseMessage *response; + DFBWindowDescription desc; + void *interface_ptr = NULL; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Requestor) + + if (!ret_interface) + return DFB_INVARG; + + direct_memcpy( &desc, real_desc, sizeof(DFBWindowDescription) ); + + if (!(desc.flags & DWDESC_RESOURCE_ID)) { + desc.flags |= DWDESC_RESOURCE_ID; + desc.resource_id = 1100; + } + + D_INFO( "IDirectFBDisplayLayer_Requestor_CreateWindow: Using resource ID %lu\n", desc.resource_id ); + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBDISPLAYLAYER_METHOD_ID_CreateWindow, VREQ_RESPOND, &response, + VMBT_DATA, sizeof(DFBWindowDescription), &desc, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret == DR_OK) + ret = voodoo_construct_requestor( data->manager, "IDirectFBWindow", + response->instance, data->idirectfb, &interface_ptr ); + + voodoo_manager_finish_request( data->manager, response ); + + *ret_interface = interface_ptr; + + return ret; +} + +static DFBResult +IDirectFBDisplayLayer_Requestor_GetWindow( IDirectFBDisplayLayer *thiz, + DFBWindowID id, + IDirectFBWindow **ret_interface ) +{ + DirectResult ret; + VoodooResponseMessage *response; + void *interface_ptr = NULL; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Requestor) + + if (!ret_interface) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBDISPLAYLAYER_METHOD_ID_GetWindow, VREQ_RESPOND, &response, + VMBT_ID, id, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret == DR_OK) + ret = voodoo_construct_requestor( data->manager, "IDirectFBWindow", + response->instance, data->idirectfb, &interface_ptr ); + + voodoo_manager_finish_request( data->manager, response ); + + *ret_interface = interface_ptr; + + return ret; +} + +static DFBResult +IDirectFBDisplayLayer_Requestor_EnableCursor( IDirectFBDisplayLayer *thiz, int enable ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Requestor_GetCursorPosition( IDirectFBDisplayLayer *thiz, + int *x, int *y ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Requestor_WarpCursor( IDirectFBDisplayLayer *thiz, int x, int y ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Requestor_SetCursorAcceleration( IDirectFBDisplayLayer *thiz, + int numerator, + int denominator, + int threshold ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Requestor_SetCursorShape( IDirectFBDisplayLayer *thiz, + IDirectFBSurface *shape, + int hot_x, + int hot_y ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Requestor_SetCursorOpacity( IDirectFBDisplayLayer *thiz, + u8 opacity ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Requestor_GetColorAdjustment( IDirectFBDisplayLayer *thiz, + DFBColorAdjustment *adj ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Requestor_SetColorAdjustment( IDirectFBDisplayLayer *thiz, + const DFBColorAdjustment *adj ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Requestor_WaitForSync( IDirectFBDisplayLayer *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBDisplayLayer_Requestor_GetWindowByResourceID( IDirectFBDisplayLayer *thiz, + unsigned long resource_id, + IDirectFBWindow **ret_interface ) +{ + DirectResult ret; + VoodooResponseMessage *response; + void *interface_ptr = NULL; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Requestor) + + if (!ret_interface) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBDISPLAYLAYER_METHOD_ID_GetWindowByResourceID, VREQ_RESPOND, &response, + VMBT_ID, resource_id, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret == DR_OK) + ret = voodoo_construct_requestor( data->manager, "IDirectFBWindow", + response->instance, data->idirectfb, &interface_ptr ); + + voodoo_manager_finish_request( data->manager, response ); + + *ret_interface = interface_ptr; + + return ret; +} + +static DFBResult +IDirectFBDisplayLayer_Requestor_GetRotation( IDirectFBDisplayLayer *thiz, + int *ret_rotation ) +{ + DirectResult ret; + VoodooResponseMessage *response; + + DIRECT_INTERFACE_GET_DATA(IDirectFBDisplayLayer_Requestor) + + if (!ret_rotation) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBDISPLAYLAYER_METHOD_ID_GetRotation, VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret == DR_OK) { + VoodooMessageParser parser; + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_INT( parser, *ret_rotation ); + VOODOO_PARSER_END( parser ); + } + + voodoo_manager_finish_request( data->manager, response ); + + return ret; +} + +/**************************************************************************************************/ + +static DFBResult +Probe() +{ + /* This implementation has to be loaded explicitly. */ + return DFB_UNSUPPORTED; +} + +static DFBResult +Construct( IDirectFBDisplayLayer *thiz, + VoodooManager *manager, + VoodooInstanceID instance, + void *arg ) +{ + DIRECT_ALLOCATE_INTERFACE_DATA(thiz, IDirectFBDisplayLayer_Requestor) + + data->ref = 1; + data->manager = manager; + data->instance = instance; + data->idirectfb = arg; + + thiz->AddRef = IDirectFBDisplayLayer_Requestor_AddRef; + thiz->Release = IDirectFBDisplayLayer_Requestor_Release; + thiz->GetID = IDirectFBDisplayLayer_Requestor_GetID; + thiz->GetDescription = IDirectFBDisplayLayer_Requestor_GetDescription; + thiz->GetSurface = IDirectFBDisplayLayer_Requestor_GetSurface; + thiz->GetScreen = IDirectFBDisplayLayer_Requestor_GetScreen; + thiz->SetCooperativeLevel = IDirectFBDisplayLayer_Requestor_SetCooperativeLevel; + thiz->SetOpacity = IDirectFBDisplayLayer_Requestor_SetOpacity; + thiz->GetCurrentOutputField = IDirectFBDisplayLayer_Requestor_GetCurrentOutputField; + thiz->SetScreenLocation = IDirectFBDisplayLayer_Requestor_SetScreenLocation; + thiz->SetSrcColorKey = IDirectFBDisplayLayer_Requestor_SetSrcColorKey; + thiz->SetDstColorKey = IDirectFBDisplayLayer_Requestor_SetDstColorKey; + thiz->GetLevel = IDirectFBDisplayLayer_Requestor_GetLevel; + thiz->SetLevel = IDirectFBDisplayLayer_Requestor_SetLevel; + thiz->GetConfiguration = IDirectFBDisplayLayer_Requestor_GetConfiguration; + thiz->TestConfiguration = IDirectFBDisplayLayer_Requestor_TestConfiguration; + thiz->SetConfiguration = IDirectFBDisplayLayer_Requestor_SetConfiguration; + thiz->SetBackgroundMode = IDirectFBDisplayLayer_Requestor_SetBackgroundMode; + thiz->SetBackgroundColor = IDirectFBDisplayLayer_Requestor_SetBackgroundColor; + thiz->SetBackgroundImage = IDirectFBDisplayLayer_Requestor_SetBackgroundImage; + thiz->GetColorAdjustment = IDirectFBDisplayLayer_Requestor_GetColorAdjustment; + thiz->SetColorAdjustment = IDirectFBDisplayLayer_Requestor_SetColorAdjustment; + thiz->CreateWindow = IDirectFBDisplayLayer_Requestor_CreateWindow; + thiz->GetWindow = IDirectFBDisplayLayer_Requestor_GetWindow; + thiz->WarpCursor = IDirectFBDisplayLayer_Requestor_WarpCursor; + thiz->SetCursorAcceleration = IDirectFBDisplayLayer_Requestor_SetCursorAcceleration; + thiz->EnableCursor = IDirectFBDisplayLayer_Requestor_EnableCursor; + thiz->GetCursorPosition = IDirectFBDisplayLayer_Requestor_GetCursorPosition; + thiz->SetCursorShape = IDirectFBDisplayLayer_Requestor_SetCursorShape; + thiz->SetCursorOpacity = IDirectFBDisplayLayer_Requestor_SetCursorOpacity; + thiz->SetFieldParity = IDirectFBDisplayLayer_Requestor_SetFieldParity; + thiz->WaitForSync = IDirectFBDisplayLayer_Requestor_WaitForSync; + thiz->GetWindowByResourceID = IDirectFBDisplayLayer_Requestor_GetWindowByResourceID; + thiz->GetRotation = IDirectFBDisplayLayer_Requestor_GetRotation; + + return DFB_OK; +} + diff --git a/Source/DirectFB/proxy/requestor/idirectfbdisplaylayer_requestor.h b/Source/DirectFB/proxy/requestor/idirectfbdisplaylayer_requestor.h new file mode 100755 index 0000000..c0fa8f7 --- /dev/null +++ b/Source/DirectFB/proxy/requestor/idirectfbdisplaylayer_requestor.h @@ -0,0 +1,47 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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 __IDIRECTFBDISPLAYLAYER_REQUESTOR_H__ +#define __IDIRECTFBDISPLAYLAYER_REQUESTOR_H__ + +#include + +/* + * private data struct of IDirectFBDisplayLayer_Requestor + */ +typedef struct { + int ref; /* reference counter */ + + IDirectFB *idirectfb; + + VoodooManager *manager; + VoodooInstanceID instance; +} IDirectFBDisplayLayer_Requestor_data; + +#endif + diff --git a/Source/DirectFB/proxy/requestor/idirectfbeventbuffer_requestor.c b/Source/DirectFB/proxy/requestor/idirectfbeventbuffer_requestor.c new file mode 100755 index 0000000..5d23d42 --- /dev/null +++ b/Source/DirectFB/proxy/requestor/idirectfbeventbuffer_requestor.c @@ -0,0 +1,300 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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. +*/ + +#include + +#include +#include + +#include +#include + +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include "idirectfbeventbuffer_requestor.h" + + +static DFBResult Probe( void ); +static DFBResult Construct( IDirectFBEventBuffer *thiz, + VoodooManager *manager, + VoodooInstanceID instance, + void *arg ); + +#include + +DIRECT_INTERFACE_IMPLEMENTATION( IDirectFBEventBuffer, Requestor ) + + +/**************************************************************************************************/ + +static void *feed_thread( DirectThread *thread, void *arg ); + +/**************************************************************************************************/ + +static void +IDirectFBEventBuffer_Requestor_Destruct( IDirectFBEventBuffer *thiz ) +{ + IDirectFBEventBuffer_Requestor_data *data = thiz->priv; + + D_DEBUG( "%s (%p)\n", __FUNCTION__, thiz ); + + data->stop = true; + + data->src->WakeUp( data->src ); + + direct_thread_join( data->thread ); + direct_thread_destroy( data->thread ); + + data->src->Release( data->src ); + + voodoo_manager_request( data->manager, data->instance, + IDIRECTFBEVENTBUFFER_METHOD_ID_Release, VREQ_NONE, NULL, + VMBT_NONE ); + + DIRECT_DEALLOCATE_INTERFACE( thiz ); +} + +/**************************************************************************************************/ + +static DirectResult +IDirectFBEventBuffer_Requestor_AddRef( IDirectFBEventBuffer *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBEventBuffer_Requestor) + + data->ref++; + + return DFB_OK; +} + +static DirectResult +IDirectFBEventBuffer_Requestor_Release( IDirectFBEventBuffer *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBEventBuffer_Requestor) + + if (--data->ref == 0) + IDirectFBEventBuffer_Requestor_Destruct( thiz ); + + return DFB_OK; +} + +static DFBResult +IDirectFBEventBuffer_Requestor_Reset( IDirectFBEventBuffer *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBEventBuffer_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBEventBuffer_Requestor_WaitForEvent( IDirectFBEventBuffer *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBEventBuffer_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBEventBuffer_Requestor_WaitForEventWithTimeout( IDirectFBEventBuffer *thiz, + unsigned int seconds, + unsigned int milli_seconds ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBEventBuffer_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBEventBuffer_Requestor_WakeUp( IDirectFBEventBuffer *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBEventBuffer_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBEventBuffer_Requestor_GetEvent( IDirectFBEventBuffer *thiz, + DFBEvent *event ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBEventBuffer_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBEventBuffer_Requestor_PeekEvent( IDirectFBEventBuffer *thiz, + DFBEvent *event ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBEventBuffer_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBEventBuffer_Requestor_HasEvent( IDirectFBEventBuffer *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBEventBuffer_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBEventBuffer_Requestor_PostEvent( IDirectFBEventBuffer *thiz, + const DFBEvent *event ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBEventBuffer_Requestor) + + if (!event) + return DFB_INVARG; + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBEVENTBUFFER_METHOD_ID_PostEvent, VREQ_NONE, NULL, + VMBT_DATA, sizeof(DFBEvent), event, + VMBT_NONE ); +} + +static DFBResult +IDirectFBEventBuffer_Requestor_CreateFileDescriptor( IDirectFBEventBuffer *thiz, + int *fd ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBEventBuffer_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +/**************************************************************************************************/ + +static DFBResult +Probe() +{ + /* This implementation has to be loaded explicitly. */ + return DFB_UNSUPPORTED; +} + +static DFBResult +Construct( IDirectFBEventBuffer *thiz, + VoodooManager *manager, + VoodooInstanceID instance, + void *arg ) +{ + DIRECT_ALLOCATE_INTERFACE_DATA(thiz, IDirectFBEventBuffer_Requestor) + + voodoo_manager_register_remote( manager, false, thiz, instance ); + + data->ref = 1; + data->manager = manager; + data->instance = instance; + + data->src = arg; + data->dst = thiz; + + data->src->AddRef( data->src ); + + thiz->AddRef = IDirectFBEventBuffer_Requestor_AddRef; + thiz->Release = IDirectFBEventBuffer_Requestor_Release; + thiz->Reset = IDirectFBEventBuffer_Requestor_Reset; + thiz->WaitForEvent = IDirectFBEventBuffer_Requestor_WaitForEvent; + thiz->WaitForEventWithTimeout = IDirectFBEventBuffer_Requestor_WaitForEventWithTimeout; + thiz->GetEvent = IDirectFBEventBuffer_Requestor_GetEvent; + thiz->PeekEvent = IDirectFBEventBuffer_Requestor_PeekEvent; + thiz->HasEvent = IDirectFBEventBuffer_Requestor_HasEvent; + thiz->PostEvent = IDirectFBEventBuffer_Requestor_PostEvent; + thiz->WakeUp = IDirectFBEventBuffer_Requestor_WakeUp; + thiz->CreateFileDescriptor = IDirectFBEventBuffer_Requestor_CreateFileDescriptor; + + data->thread = direct_thread_create( DTT_INPUT, feed_thread, data, "Event Feed" ); + + return DFB_OK; +} + +/**************************************************************************************************/ + +static void * +feed_thread( DirectThread *thread, void *arg ) +{ + DFBResult ret; + IDirectFBEventBuffer_Requestor_data *data = arg; + IDirectFBEventBuffer *src = data->src; + IDirectFBEventBuffer *dst = data->dst; + + while (!data->stop) { + DFBEvent event; + + ret = src->WaitForEvent( src ); + if (ret) { + if (ret == DFB_INTERRUPTED) + continue; + + DirectFBError( "IDirectFBEventBuffer::WaitForEvent", ret ); + return NULL; + } + + if (data->stop) + return NULL; + + while (src->GetEvent( src, &event ) == DFB_OK) { + ret = dst->PostEvent( dst, &event ); + if (ret) { + DirectFBError( "IDirectFBEventBuffer::PostEvent", ret ); + return NULL; + } + + if (data->stop) + return NULL; + } + } + + return NULL; +} + diff --git a/Source/DirectFB/proxy/requestor/idirectfbeventbuffer_requestor.h b/Source/DirectFB/proxy/requestor/idirectfbeventbuffer_requestor.h new file mode 100755 index 0000000..001732a --- /dev/null +++ b/Source/DirectFB/proxy/requestor/idirectfbeventbuffer_requestor.h @@ -0,0 +1,54 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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 __IDIRECTFBEVENTBUFFER_REQUESTOR_H__ +#define __IDIRECTFBEVENTBUFFER_REQUESTOR_H__ + +#include +#include + +#include + +/* + * private data struct of IDirectFBEventBuffer_Requestor + */ +typedef struct { + int ref; /* reference counter */ + + VoodooManager *manager; + VoodooInstanceID instance; + + IDirectFBEventBuffer *src; + IDirectFBEventBuffer *dst; + + bool stop; + DirectThread *thread; +} IDirectFBEventBuffer_Requestor_data; + +#endif + diff --git a/Source/DirectFB/proxy/requestor/idirectfbfont_requestor.c b/Source/DirectFB/proxy/requestor/idirectfbfont_requestor.c new file mode 100755 index 0000000..392901d --- /dev/null +++ b/Source/DirectFB/proxy/requestor/idirectfbfont_requestor.c @@ -0,0 +1,530 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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. +*/ + +#include + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include "idirectfbfont_requestor.h" + + +static DFBResult Probe( void ); +static DFBResult Construct( IDirectFBFont *thiz, + VoodooManager *manager, + VoodooInstanceID instance, + void *arg ); + +#include + +DIRECT_INTERFACE_IMPLEMENTATION( IDirectFBFont, Requestor ) + + +/**************************************************************************************************/ + +static void +IDirectFBFont_Requestor_Destruct( IDirectFBFont *thiz ) +{ + IDirectFBFont_Requestor_data *data = thiz->priv; + + D_DEBUG( "%s (%p)\n", __FUNCTION__, thiz ); + + data->buffer->Release( data->buffer ); + + voodoo_manager_request( data->manager, data->instance, + IDIRECTFBFONT_METHOD_ID_Release, VREQ_NONE, NULL, + VMBT_NONE ); + + DIRECT_DEALLOCATE_INTERFACE( thiz ); +} + +/**************************************************************************************************/ + +static DirectResult +IDirectFBFont_Requestor_AddRef( IDirectFBFont *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Requestor) + + data->ref++; + + return DFB_OK; +} + +static DirectResult +IDirectFBFont_Requestor_Release( IDirectFBFont *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Requestor) + + if (--data->ref == 0) + IDirectFBFont_Requestor_Destruct( thiz ); + + return DFB_OK; +} + +static DFBResult +IDirectFBFont_Requestor_GetAscender( IDirectFBFont *thiz, int *ret_ascender ) +{ + DirectResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + int ascender; + + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Requestor) + + if (!ret_ascender) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBFONT_METHOD_ID_GetAscender, VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_INT( parser, ascender ); + VOODOO_PARSER_END( parser ); + + voodoo_manager_finish_request( data->manager, response ); + + *ret_ascender = ascender; + + return DFB_OK; +} + +static DFBResult +IDirectFBFont_Requestor_GetDescender( IDirectFBFont *thiz, int *ret_descender ) +{ + DirectResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + int descender; + + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Requestor) + + if (!ret_descender) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBFONT_METHOD_ID_GetDescender, VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_INT( parser, descender ); + VOODOO_PARSER_END( parser ); + + voodoo_manager_finish_request( data->manager, response ); + + *ret_descender = descender; + + return DFB_OK; +} + +static DFBResult +IDirectFBFont_Requestor_GetHeight( IDirectFBFont *thiz, + int *ret_height ) +{ + DirectResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + int height; + + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Requestor) + + if (!ret_height) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBFONT_METHOD_ID_GetHeight, VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_INT( parser, height ); + VOODOO_PARSER_END( parser ); + + voodoo_manager_finish_request( data->manager, response ); + + *ret_height = height; + + return DFB_OK; +} + +static DFBResult +IDirectFBFont_Requestor_GetMaxAdvance( IDirectFBFont *thiz, int *ret_maxadvance ) +{ + DirectResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + int maxadvance; + + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Requestor) + + if (!ret_maxadvance) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBFONT_METHOD_ID_GetMaxAdvance, VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_INT( parser, maxadvance ); + VOODOO_PARSER_END( parser ); + + voodoo_manager_finish_request( data->manager, response ); + + *ret_maxadvance = maxadvance; + + return DFB_OK; +} + +static DFBResult +IDirectFBFont_Requestor_GetKerning( IDirectFBFont *thiz, + unsigned int prev_index, unsigned int current_index, + int *ret_kern_x, int *ret_kern_y) +{ + DirectResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + int kern_x; + int kern_y; + + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Requestor) + + if (!ret_kern_x && !ret_kern_y) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBFONT_METHOD_ID_GetMaxAdvance, VREQ_RESPOND, &response, + VMBT_UINT, prev_index, + VMBT_UINT, current_index, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_INT( parser, kern_x ); + VOODOO_PARSER_GET_INT( parser, kern_y ); + VOODOO_PARSER_END( parser ); + + voodoo_manager_finish_request( data->manager, response ); + + *ret_kern_x = kern_x; + *ret_kern_y = kern_y; + + return DFB_OK; +} + +static DFBResult +IDirectFBFont_Requestor_GetStringExtents( IDirectFBFont *thiz, + const char *text, int bytes, + DFBRectangle *logical_rect, + DFBRectangle *ink_rect ) +{ + DirectResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + const DFBRectangle *logical; + const DFBRectangle *ink; + + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Requestor) + + if (!text || (!logical_rect && !ink_rect)) + return DFB_INVARG; + + + if (bytes < 0) + bytes = strlen (text); + + if (bytes == 0) { + if (logical_rect) + memset( logical_rect, 0, sizeof(DFBRectangle) ); + + if (ink_rect) + memset( ink_rect, 0, sizeof(DFBRectangle) ); + + return DFB_OK; + } + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBFONT_METHOD_ID_GetStringExtents, VREQ_RESPOND, &response, + VMBT_DATA, bytes, text, + VMBT_INT, bytes, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_DATA( parser, logical ); + VOODOO_PARSER_GET_DATA( parser, ink ); + VOODOO_PARSER_END( parser ); + + if (logical_rect) + *logical_rect = *logical; + + if (ink_rect) + *ink_rect = *ink; + + voodoo_manager_finish_request( data->manager, response ); + + return DFB_OK; +} + +static DFBResult +IDirectFBFont_Requestor_GetStringWidth( IDirectFBFont *thiz, + const char *text, + int bytes, + int *ret_width ) +{ + DirectResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + int width; + + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Requestor) + + if (!text || !ret_width) + return DFB_INVARG; + + + if (bytes < 0) + bytes = strlen (text); + + if (bytes == 0) + return DFB_OK; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBFONT_METHOD_ID_GetStringWidth, VREQ_RESPOND, &response, + VMBT_DATA, bytes, text, + VMBT_INT, bytes, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_INT( parser, width ); + VOODOO_PARSER_END( parser ); + + voodoo_manager_finish_request( data->manager, response ); + + *ret_width = width; + + return DFB_OK; +} + +static DFBResult +IDirectFBFont_Requestor_GetGlyphExtents( IDirectFBFont *thiz, + unsigned int index, + DFBRectangle *rect, + int *ret_advance ) +{ + DirectResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + const DFBRectangle *extents; + int advance; + + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Requestor) + + if (!rect && !ret_advance) + return DFB_INVARG; + + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBFONT_METHOD_ID_GetGlyphExtents, VREQ_RESPOND, &response, + VMBT_UINT, index, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_DATA( parser, extents ); + VOODOO_PARSER_GET_INT( parser, advance ); + VOODOO_PARSER_END( parser ); + + if (rect) + *rect = *extents; + + if (advance) + *ret_advance = advance; + + voodoo_manager_finish_request( data->manager, response ); + + return DFB_OK; +} + +static DFBResult +IDirectFBFont_Requestor_GetStringBreak( IDirectFBFont *thiz, + const char *text, + int bytes, + int max_width, + int *ret_width, + int *ret_str_length, + const char **ret_next_line ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Requestor) + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBFont_Requestor_SetEncoding( IDirectFBFont *thiz, + DFBTextEncodingID encoding ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Requestor) + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBFont_Requestor_EnumEncodings( IDirectFBFont *thiz, + DFBTextEncodingCallback callback, + void *ctx ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Requestor) + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBFont_Requestor_FindEncoding( IDirectFBFont *thiz, + const char *name, + DFBTextEncodingID *encoding ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBFont_Requestor) + + return DFB_UNIMPLEMENTED; +} + +/**************************************************************************************************/ + +static DFBResult +Probe() +{ + /* This implementation has to be loaded explicitly. */ + return DFB_UNSUPPORTED; +} + +static DFBResult +Construct( IDirectFBFont *thiz, + VoodooManager *manager, + VoodooInstanceID instance, + void *arg ) +{ + IDirectFBDataBuffer *buffer = arg; + + DIRECT_ALLOCATE_INTERFACE_DATA(thiz, IDirectFBFont_Requestor) + + buffer->AddRef( buffer ); + + data->ref = 1; + data->manager = manager; + data->instance = instance; + data->buffer = buffer; + + thiz->AddRef = IDirectFBFont_Requestor_AddRef; + thiz->Release = IDirectFBFont_Requestor_Release; + thiz->GetAscender = IDirectFBFont_Requestor_GetAscender; + thiz->GetDescender = IDirectFBFont_Requestor_GetDescender; + thiz->GetHeight = IDirectFBFont_Requestor_GetHeight; + thiz->GetMaxAdvance = IDirectFBFont_Requestor_GetMaxAdvance; + thiz->GetKerning = IDirectFBFont_Requestor_GetKerning; + thiz->GetStringWidth = IDirectFBFont_Requestor_GetStringWidth; + thiz->GetStringExtents = IDirectFBFont_Requestor_GetStringExtents; + thiz->GetGlyphExtents = IDirectFBFont_Requestor_GetGlyphExtents; + thiz->GetStringBreak = IDirectFBFont_Requestor_GetStringBreak; + thiz->SetEncoding = IDirectFBFont_Requestor_SetEncoding; + thiz->EnumEncodings = IDirectFBFont_Requestor_EnumEncodings; + thiz->FindEncoding = IDirectFBFont_Requestor_FindEncoding; + + return DFB_OK; +} + diff --git a/Source/DirectFB/proxy/requestor/idirectfbfont_requestor.h b/Source/DirectFB/proxy/requestor/idirectfbfont_requestor.h new file mode 100755 index 0000000..5c2b203 --- /dev/null +++ b/Source/DirectFB/proxy/requestor/idirectfbfont_requestor.h @@ -0,0 +1,47 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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 __IDIRECTFBFONT_REQUESTOR_H__ +#define __IDIRECTFBFONT_REQUESTOR_H__ + +#include + +/* + * private data struct of IDirectFBFont_Requestor + */ +typedef struct { + int ref; /* reference counter */ + + VoodooManager *manager; + VoodooInstanceID instance; + + IDirectFBDataBuffer *buffer; +} IDirectFBFont_Requestor_data; + +#endif + diff --git a/Source/DirectFB/proxy/requestor/idirectfbfoo_requestor.c b/Source/DirectFB/proxy/requestor/idirectfbfoo_requestor.c new file mode 100755 index 0000000..9574354 --- /dev/null +++ b/Source/DirectFB/proxy/requestor/idirectfbfoo_requestor.c @@ -0,0 +1,135 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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. +*/ + +#include + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include "idirectfbfoo_requestor.h" + + +static DFBResult Probe(); +static DFBResult Construct( IDirectFBFoo *thiz, + VoodooManager *manager, + VoodooInstanceID instance, + void *arg ); + +#include + +DIRECT_INTERFACE_IMPLEMENTATION( IDirectFBFoo, Requestor ) + + +/**************************************************************************************************/ + +static void +IDirectFBFoo_Requestor_Destruct( IDirectFBFoo *thiz ) +{ + IDirectFBFoo_Requestor_data *data = thiz->priv; + + D_DEBUG( "%s (%p)\n", __FUNCTION__, thiz ); + + voodoo_manager_request( data->manager, data->instance, + IDIRECTFBFOO_METHOD_ID_Release, VREQ_NONE, NULL, + VMBT_NONE ); + + DIRECT_DEALLOCATE_INTERFACE( thiz ); +} + +/**************************************************************************************************/ + +static DFBResult +IDirectFBFoo_Requestor_AddRef( IDirectFBFoo *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBFoo_Requestor) + + data->ref++; + + return DFB_OK; +} + +static DFBResult +IDirectFBFoo_Requestor_Release( IDirectFBFoo *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBFoo_Requestor) + + if (--data->ref == 0) + IDirectFBFoo_Requestor_Destruct( thiz ); + + return DFB_OK; +} + +static DFBResult +IDirectFBFoo_Requestor_Bar( IDirectFBFoo *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBFoo_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +/**************************************************************************************************/ + +static DFBResult +Probe() +{ + /* This implementation has to be loaded explicitly. */ + return DFB_UNSUPPORTED; +} + +static DFBResult +Construct( IDirectFBFoo *thiz, + VoodooManager *manager, + VoodooInstanceID instance, + void *arg ) +{ + DIRECT_ALLOCATE_INTERFACE_DATA(thiz, IDirectFBFoo_Requestor) + + data->ref = 1; + data->manager = manager; + data->instance = instance; + + thiz->AddRef = IDirectFBFoo_Requestor_AddRef; + thiz->Release = IDirectFBFoo_Requestor_Release; + thiz->Bar = IDirectFBFoo_Requestor_Bar; + + return DFB_OK; +} + diff --git a/Source/DirectFB/proxy/requestor/idirectfbfoo_requestor.h b/Source/DirectFB/proxy/requestor/idirectfbfoo_requestor.h new file mode 100755 index 0000000..1b125bb --- /dev/null +++ b/Source/DirectFB/proxy/requestor/idirectfbfoo_requestor.h @@ -0,0 +1,45 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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 __IDIRECTFBFOO_REQUESTOR_H__ +#define __IDIRECTFBFOO_REQUESTOR_H__ + +#include + +/* + * private data struct of IDirectFBFoo_Requestor + */ +typedef struct { + int ref; /* reference counter */ + + VoodooManager *manager; + VoodooInstanceID instance; +} IDirectFBFoo_Requestor_data; + +#endif + diff --git a/Source/DirectFB/proxy/requestor/idirectfbimageprovider_requestor.c b/Source/DirectFB/proxy/requestor/idirectfbimageprovider_requestor.c new file mode 100755 index 0000000..b0ce08e --- /dev/null +++ b/Source/DirectFB/proxy/requestor/idirectfbimageprovider_requestor.c @@ -0,0 +1,264 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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. +*/ + +#include + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include "idirectfbsurface_requestor.h" + + +static DFBResult Probe( void ); +static DFBResult Construct( IDirectFBImageProvider *thiz, + VoodooManager *manager, + VoodooInstanceID instance, + void *arg ); + +#include + +DIRECT_INTERFACE_IMPLEMENTATION( IDirectFBImageProvider, Requestor ) + + +/**************************************************************************************************/ + +/* + * private data struct of IDirectFBImageProvider_Requestor + */ +typedef struct { + int ref; /* reference counter */ + + VoodooManager *manager; + VoodooInstanceID instance; + + IDirectFBDataBuffer *buffer; +} IDirectFBImageProvider_Requestor_data; + +/**************************************************************************************************/ + +static void +IDirectFBImageProvider_Requestor_Destruct( IDirectFBImageProvider *thiz ) +{ + IDirectFBImageProvider_Requestor_data *data = thiz->priv; + + D_DEBUG( "%s (%p)\n", __FUNCTION__, thiz ); + + data->buffer->Release( data->buffer ); + + voodoo_manager_request( data->manager, data->instance, + IDIRECTFBIMAGEPROVIDER_METHOD_ID_Release, VREQ_NONE, NULL, + VMBT_NONE ); + + DIRECT_DEALLOCATE_INTERFACE( thiz ); +} + +/**************************************************************************************************/ + +static DirectResult +IDirectFBImageProvider_Requestor_AddRef( IDirectFBImageProvider *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBImageProvider_Requestor) + + data->ref++; + + return DFB_OK; +} + +static DirectResult +IDirectFBImageProvider_Requestor_Release( IDirectFBImageProvider *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBImageProvider_Requestor) + + if (--data->ref == 0) + IDirectFBImageProvider_Requestor_Destruct( thiz ); + + return DFB_OK; +} + +static DFBResult +IDirectFBImageProvider_Requestor_GetSurfaceDescription( IDirectFBImageProvider *thiz, + DFBSurfaceDescription *desc ) +{ + DirectResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + + DIRECT_INTERFACE_GET_DATA(IDirectFBImageProvider_Requestor) + + if (!desc) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBIMAGEPROVIDER_METHOD_ID_GetSurfaceDescription, + VREQ_RESPOND | VREQ_ASYNC, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_READ_DFBSurfaceDescription( parser, *desc ); + VOODOO_PARSER_END( parser ); + + voodoo_manager_finish_request( data->manager, response ); + + return DFB_OK; +} + +static DFBResult +IDirectFBImageProvider_Requestor_GetImageDescription( IDirectFBImageProvider *thiz, + DFBImageDescription *desc ) +{ + DirectResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + + DIRECT_INTERFACE_GET_DATA(IDirectFBImageProvider_Requestor) + + if (!desc) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBIMAGEPROVIDER_METHOD_ID_GetImageDescription, + VREQ_RESPOND | VREQ_ASYNC, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_READ_DATA( parser, desc, sizeof(DFBImageDescription) ); + VOODOO_PARSER_END( parser ); + + voodoo_manager_finish_request( data->manager, response ); + + return DFB_OK; +} + +static DFBResult +IDirectFBImageProvider_Requestor_RenderTo( IDirectFBImageProvider *thiz, + IDirectFBSurface *destination, + const DFBRectangle *destination_rect ) +{ + DirectResult ret; + VoodooResponseMessage *response; + IDirectFBSurface_Requestor_data *destination_data; + + DIRECT_INTERFACE_GET_DATA(IDirectFBImageProvider_Requestor) + + if (!destination) + return DFB_INVARG; + + DIRECT_INTERFACE_GET_DATA_FROM( destination, destination_data, IDirectFBSurface_Requestor); + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBIMAGEPROVIDER_METHOD_ID_RenderTo, + VREQ_RESPOND | VREQ_ASYNC, &response, + VMBT_ID, destination_data->instance, + VMBT_ODATA, sizeof(DFBRectangle), destination_rect, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + + voodoo_manager_finish_request( data->manager, response ); + + return ret; +} + +static DFBResult +IDirectFBImageProvider_Requestor_SetRenderCallback( IDirectFBImageProvider *thiz, + DIRenderCallback callback, + void *callback_data ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBImageProvider_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +/**************************************************************************************************/ + +static DFBResult +Probe() +{ + /* This implementation has to be loaded explicitly. */ + return DFB_UNSUPPORTED; +} + +static DFBResult +Construct( IDirectFBImageProvider *thiz, + VoodooManager *manager, + VoodooInstanceID instance, + void *arg ) +{ + IDirectFBDataBuffer *buffer = arg; + + DIRECT_ALLOCATE_INTERFACE_DATA(thiz, IDirectFBImageProvider_Requestor) + + buffer->AddRef( buffer ); + + data->ref = 1; + data->manager = manager; + data->instance = instance; + data->buffer = buffer; + + thiz->AddRef = IDirectFBImageProvider_Requestor_AddRef; + thiz->Release = IDirectFBImageProvider_Requestor_Release; + thiz->GetSurfaceDescription = IDirectFBImageProvider_Requestor_GetSurfaceDescription; + thiz->GetImageDescription = IDirectFBImageProvider_Requestor_GetImageDescription; + thiz->RenderTo = IDirectFBImageProvider_Requestor_RenderTo; + thiz->SetRenderCallback = IDirectFBImageProvider_Requestor_SetRenderCallback; + + return DFB_OK; +} + diff --git a/Source/DirectFB/proxy/requestor/idirectfbinputdevice_requestor.c b/Source/DirectFB/proxy/requestor/idirectfbinputdevice_requestor.c new file mode 100755 index 0000000..3193467 --- /dev/null +++ b/Source/DirectFB/proxy/requestor/idirectfbinputdevice_requestor.c @@ -0,0 +1,469 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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. +*/ + +#include + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include +#include + +#include "idirectfbinputdevice_requestor.h" + + +static DFBResult Probe( void ); +static DFBResult Construct( IDirectFBInputDevice *thiz, + VoodooManager *manager, + VoodooInstanceID instance, + void *arg ); + +#include + +DIRECT_INTERFACE_IMPLEMENTATION( IDirectFBInputDevice, Requestor ) + + +/**************************************************************************************************/ + +static void +IDirectFBInputDevice_Requestor_Destruct( IDirectFBInputDevice *thiz ) +{ + IDirectFBInputDevice_Requestor_data *data = thiz->priv; + + D_DEBUG( "%s (%p)\n", __FUNCTION__, thiz ); + + voodoo_manager_request( data->manager, data->instance, + IDIRECTFBINPUTDEVICE_METHOD_ID_Release, VREQ_NONE, NULL, + VMBT_NONE ); + + DIRECT_DEALLOCATE_INTERFACE( thiz ); +} + +/**************************************************************************************************/ + +static DirectResult +IDirectFBInputDevice_Requestor_AddRef( IDirectFBInputDevice *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Requestor) + + data->ref++; + + return DFB_OK; +} + +static DirectResult +IDirectFBInputDevice_Requestor_Release( IDirectFBInputDevice *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Requestor) + + if (--data->ref == 0) + IDirectFBInputDevice_Requestor_Destruct( thiz ); + + return DFB_OK; +} + +static DFBResult +IDirectFBInputDevice_Requestor_GetID( IDirectFBInputDevice *thiz, + DFBInputDeviceID *ret_id ) +{ + DFBResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + DFBInputDeviceID id; + + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Requestor) + + if (!ret_id) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBINPUTDEVICE_METHOD_ID_GetID, VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_ID( parser, id ); + VOODOO_PARSER_END( parser ); + + voodoo_manager_finish_request( data->manager, response ); + + *ret_id = id; + + return DFB_OK; +} + +static DFBResult +IDirectFBInputDevice_Requestor_CreateEventBuffer( IDirectFBInputDevice *thiz, + IDirectFBEventBuffer **ret_interface ) +{ + DFBResult ret; + IDirectFBEventBuffer *buffer; + IDirectFBEventBuffer *dispatcher; + VoodooInstanceID instance; + VoodooResponseMessage *response; + void *ptr; + + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Requestor) + + if (!ret_interface) + return DFB_INVARG; + + /* Create the real interface. */ + DIRECT_ALLOCATE_INTERFACE( buffer, IDirectFBEventBuffer ); + + IDirectFBEventBuffer_Construct( buffer, NULL, NULL ); + + /* Create the dispatcher. */ + ret = voodoo_construct_dispatcher( data->manager, "IDirectFBEventBuffer", + buffer, data->instance, NULL, &instance, &ptr ); + if (ret) { + buffer->Release( buffer ); + return ret; + } + + dispatcher = ptr; + + /* Send the request including the instance ID of the dispatcher. */ + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBINPUTDEVICE_METHOD_ID_CreateEventBuffer, + VREQ_RESPOND, &response, + VMBT_ID, instance, + VMBT_NONE ); + if (ret) { + dispatcher->Release( dispatcher ); + return ret; + } + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + voodoo_manager_finish_request( data->manager, response ); + + /* Return the dispatcher interface. */ + *ret_interface = dispatcher; + + return DFB_OK; +} + +static DFBResult +IDirectFBInputDevice_Requestor_AttachEventBuffer( IDirectFBInputDevice *thiz, + IDirectFBEventBuffer *buffer ) +{ + DFBResult ret; + IDirectFBEventBuffer_Dispatcher_data *buffer_data; + VoodooResponseMessage *response; + + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Requestor) + + if (!buffer) + return DFB_INVARG; + + DIRECT_INTERFACE_GET_DATA_FROM( buffer, buffer_data, IDirectFBEventBuffer_Dispatcher ); + + /* Send the request including the instance ID of the dispatcher. */ + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBINPUTDEVICE_METHOD_ID_AttachEventBuffer, + VREQ_RESPOND, &response, + VMBT_ID, buffer_data->self, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + + voodoo_manager_finish_request( data->manager, response ); + + return ret; +} + +static DFBResult +IDirectFBInputDevice_Requestor_DetachEventBuffer( IDirectFBInputDevice *thiz, + IDirectFBEventBuffer *buffer ) +{ + DFBResult ret; + IDirectFBEventBuffer_Dispatcher_data *buffer_data; + VoodooResponseMessage *response; + + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Requestor) + + if (!buffer) + return DFB_INVARG; + + DIRECT_INTERFACE_GET_DATA_FROM( buffer, buffer_data, IDirectFBEventBuffer_Dispatcher ); + + /* Send the request including the instance ID of the dispatcher. */ + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBINPUTDEVICE_METHOD_ID_DetachEventBuffer, + VREQ_RESPOND, &response, + VMBT_ID, buffer_data->self, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + + voodoo_manager_finish_request( data->manager, response ); + + return ret; +} + +static DFBResult +IDirectFBInputDevice_Requestor_GetDescription( IDirectFBInputDevice *thiz, + DFBInputDeviceDescription *ret_desc ) +{ + DFBResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Requestor) + + if (!ret_desc) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBINPUTDEVICE_METHOD_ID_GetDescription, + VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_READ_DATA( parser, ret_desc, sizeof(DFBInputDeviceDescription) ); + VOODOO_PARSER_END( parser ); + + voodoo_manager_finish_request( data->manager, response ); + + return DFB_OK; +} + +static DFBResult +IDirectFBInputDevice_Requestor_GetKeymapEntry( IDirectFBInputDevice *thiz, + int keycode, + DFBInputDeviceKeymapEntry *ret_entry ) +{ + DFBResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Requestor) + + if (!ret_entry) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBINPUTDEVICE_METHOD_ID_GetKeymapEntry, + VREQ_RESPOND, &response, + VMBT_INT, keycode, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_READ_DATA( parser, ret_entry, sizeof(DFBInputDeviceKeymapEntry) ); + VOODOO_PARSER_END( parser ); + + voodoo_manager_finish_request( data->manager, response ); + + return DFB_OK; +} + +static DFBResult +IDirectFBInputDevice_Requestor_GetKeyState( IDirectFBInputDevice *thiz, + DFBInputDeviceKeyIdentifier key_id, + DFBInputDeviceKeyState *ret_state ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Requestor) + + if (!ret_state) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBInputDevice_Requestor_GetModifiers( IDirectFBInputDevice *thiz, + DFBInputDeviceModifierMask *ret_modifiers ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Requestor) + + if (!ret_modifiers) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBInputDevice_Requestor_GetLockState( IDirectFBInputDevice *thiz, + DFBInputDeviceLockState *ret_locks ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Requestor) + + if (!ret_locks) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBInputDevice_Requestor_GetButtons( IDirectFBInputDevice *thiz, + DFBInputDeviceButtonMask *ret_buttons ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Requestor) + + if (!ret_buttons) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBInputDevice_Requestor_GetButtonState( IDirectFBInputDevice *thiz, + DFBInputDeviceButtonIdentifier button, + DFBInputDeviceButtonState *ret_state ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Requestor) + + if (!ret_state || (int)button < DIBI_FIRST || button > DIBI_LAST) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBInputDevice_Requestor_GetAxis( IDirectFBInputDevice *thiz, + DFBInputDeviceAxisIdentifier axis, + int *ret_pos ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Requestor) + + if (!ret_pos || (int)axis < DIAI_FIRST || axis > DIAI_LAST) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBInputDevice_Requestor_GetXY( IDirectFBInputDevice *thiz, + int *ret_x, + int *ret_y ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBInputDevice_Requestor) + + if (!ret_x && !ret_y) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +/**************************************************************************************************/ + +static DFBResult +Probe() +{ + /* This implementation has to be loaded explicitly. */ + return DFB_UNSUPPORTED; +} + +static DFBResult +Construct( IDirectFBInputDevice *thiz, + VoodooManager *manager, + VoodooInstanceID instance, + void *arg ) +{ + DIRECT_ALLOCATE_INTERFACE_DATA(thiz, IDirectFBInputDevice_Requestor) + + data->ref = 1; + data->manager = manager; + data->instance = instance; + + thiz->AddRef = IDirectFBInputDevice_Requestor_AddRef; + thiz->Release = IDirectFBInputDevice_Requestor_Release; + thiz->GetID = IDirectFBInputDevice_Requestor_GetID; + thiz->GetDescription = IDirectFBInputDevice_Requestor_GetDescription; + thiz->GetKeymapEntry = IDirectFBInputDevice_Requestor_GetKeymapEntry; + thiz->CreateEventBuffer = IDirectFBInputDevice_Requestor_CreateEventBuffer; + thiz->AttachEventBuffer = IDirectFBInputDevice_Requestor_AttachEventBuffer; + thiz->DetachEventBuffer = IDirectFBInputDevice_Requestor_DetachEventBuffer; + thiz->GetKeyState = IDirectFBInputDevice_Requestor_GetKeyState; + thiz->GetModifiers = IDirectFBInputDevice_Requestor_GetModifiers; + thiz->GetLockState = IDirectFBInputDevice_Requestor_GetLockState; + thiz->GetButtons = IDirectFBInputDevice_Requestor_GetButtons; + thiz->GetButtonState = IDirectFBInputDevice_Requestor_GetButtonState; + thiz->GetAxis = IDirectFBInputDevice_Requestor_GetAxis; + thiz->GetXY = IDirectFBInputDevice_Requestor_GetXY; + + return DFB_OK; +} + diff --git a/Source/DirectFB/proxy/requestor/idirectfbinputdevice_requestor.h b/Source/DirectFB/proxy/requestor/idirectfbinputdevice_requestor.h new file mode 100755 index 0000000..20eb4b6 --- /dev/null +++ b/Source/DirectFB/proxy/requestor/idirectfbinputdevice_requestor.h @@ -0,0 +1,45 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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 __IDIRECTFBINPUTDEVICE_REQUESTOR_H__ +#define __IDIRECTFBINPUTDEVICE_REQUESTOR_H__ + +#include + +/* + * private data struct of IDirectFBInputDevice_Requestor + */ +typedef struct { + int ref; /* reference counter */ + + VoodooManager *manager; + VoodooInstanceID instance; +} IDirectFBInputDevice_Requestor_data; + +#endif + diff --git a/Source/DirectFB/proxy/requestor/idirectfbpalette_requestor.c b/Source/DirectFB/proxy/requestor/idirectfbpalette_requestor.c new file mode 100755 index 0000000..858460c --- /dev/null +++ b/Source/DirectFB/proxy/requestor/idirectfbpalette_requestor.c @@ -0,0 +1,335 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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. +*/ + +#include + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include "idirectfbpalette_requestor.h" + + +static DFBResult Probe( void ); +static DFBResult Construct( IDirectFBPalette *thiz, + VoodooManager *manager, + VoodooInstanceID instance, + void *arg ); + +#include + +DIRECT_INTERFACE_IMPLEMENTATION( IDirectFBPalette, Requestor ) + + +/**************************************************************************************************/ + +static void +IDirectFBPalette_Requestor_Destruct( IDirectFBPalette *thiz ) +{ + IDirectFBPalette_Requestor_data *data = thiz->priv; + + D_DEBUG( "%s (%p)\n", __FUNCTION__, thiz ); + + voodoo_manager_request( data->manager, data->instance, + IDIRECTFBPALETTE_METHOD_ID_Release, VREQ_NONE, NULL, + VMBT_NONE ); + + DIRECT_DEALLOCATE_INTERFACE( thiz ); +} + +/**************************************************************************************************/ + +static DirectResult +IDirectFBPalette_Requestor_AddRef( IDirectFBPalette *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBPalette_Requestor) + + data->ref++; + + return DFB_OK; +} + +static DirectResult +IDirectFBPalette_Requestor_Release( IDirectFBPalette *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBPalette_Requestor) + + if (--data->ref == 0) + IDirectFBPalette_Requestor_Destruct( thiz ); + + return DFB_OK; +} + +static DFBResult +IDirectFBPalette_Requestor_GetCapabilities( IDirectFBPalette *thiz, + DFBPaletteCapabilities *ret_caps ) +{ + DirectResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + DFBPaletteCapabilities caps; + + DIRECT_INTERFACE_GET_DATA(IDirectFBPalette_Requestor) + + if (!ret_caps) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBPALETTE_METHOD_ID_GetCapabilities, VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_INT( parser, caps ); + VOODOO_PARSER_END( parser ); + + voodoo_manager_finish_request( data->manager, response ); + + *ret_caps = caps; + + return DFB_OK; +} + +static DFBResult +IDirectFBPalette_Requestor_GetSize( IDirectFBPalette *thiz, + unsigned int *ret_size ) +{ + DirectResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + unsigned int size; + + DIRECT_INTERFACE_GET_DATA(IDirectFBPalette_Requestor) + + if (!ret_size) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBPALETTE_METHOD_ID_GetSize, VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_UINT( parser, size ); + VOODOO_PARSER_END( parser ); + + voodoo_manager_finish_request( data->manager, response ); + + *ret_size = size; + + return DFB_OK; +} + +static DFBResult +IDirectFBPalette_Requestor_SetEntries( IDirectFBPalette *thiz, + const DFBColor *entries, + unsigned int num_entries, + unsigned int offset ) +{ + DirectResult ret; + VoodooResponseMessage *response; + + DIRECT_INTERFACE_GET_DATA(IDirectFBPalette_Requestor) + + if (!entries) + return DFB_INVARG; + + if (!num_entries) + return DFB_OK; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBPALETTE_METHOD_ID_SetEntries, VREQ_RESPOND, &response, + VMBT_DATA, num_entries * sizeof(DFBColor), entries, + VMBT_UINT, num_entries, + VMBT_UINT, offset, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + + voodoo_manager_finish_request( data->manager, response ); + + return ret; +} + +static DFBResult +IDirectFBPalette_Requestor_GetEntries( IDirectFBPalette *thiz, + DFBColor *entries, + unsigned int num_entries, + unsigned int offset ) +{ + DirectResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + + DIRECT_INTERFACE_GET_DATA(IDirectFBPalette_Requestor) + + if (!entries) + return DFB_INVARG; + + if (!num_entries) + return DFB_OK; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBPALETTE_METHOD_ID_GetEntries, VREQ_RESPOND, &response, + VMBT_UINT, num_entries, + VMBT_UINT, offset, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_READ_DATA( parser, entries, num_entries * sizeof(DFBColor) ); + VOODOO_PARSER_END( parser ); + + voodoo_manager_finish_request( data->manager, response ); + + return DFB_OK; +} + +static DFBResult +IDirectFBPalette_Requestor_FindBestMatch( IDirectFBPalette *thiz, + u8 r, + u8 g, + u8 b, + u8 a, + unsigned int *ret_index ) +{ + DirectResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + unsigned int index; + DFBColor color = { a, r, g, b }; + + DIRECT_INTERFACE_GET_DATA(IDirectFBPalette_Requestor) + + if (!ret_index) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBPALETTE_METHOD_ID_FindBestMatch, VREQ_RESPOND, &response, + VMBT_DATA, sizeof(color), &color, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_UINT( parser, index ); + VOODOO_PARSER_END( parser ); + + voodoo_manager_finish_request( data->manager, response ); + + *ret_index = index; + + return DFB_OK; +} + +static DFBResult +IDirectFBPalette_Requestor_CreateCopy( IDirectFBPalette *thiz, + IDirectFBPalette **ret_interface ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBPalette_Requestor) + + if (!ret_interface) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +/**************************************************************************************************/ + +static DFBResult +Probe() +{ + /* This implementation has to be loaded explicitly. */ + return DFB_UNSUPPORTED; +} + +static DFBResult +Construct( IDirectFBPalette *thiz, + VoodooManager *manager, + VoodooInstanceID instance, + void *arg ) +{ + DIRECT_ALLOCATE_INTERFACE_DATA(thiz, IDirectFBPalette_Requestor) + + data->ref = 1; + data->manager = manager; + data->instance = instance; + + thiz->AddRef = IDirectFBPalette_Requestor_AddRef; + thiz->Release = IDirectFBPalette_Requestor_Release; + thiz->GetCapabilities = IDirectFBPalette_Requestor_GetCapabilities; + thiz->GetSize = IDirectFBPalette_Requestor_GetSize; + thiz->SetEntries = IDirectFBPalette_Requestor_SetEntries; + thiz->GetEntries = IDirectFBPalette_Requestor_GetEntries; + thiz->FindBestMatch = IDirectFBPalette_Requestor_FindBestMatch; + thiz->CreateCopy = IDirectFBPalette_Requestor_CreateCopy; + + return DFB_OK; +} + diff --git a/Source/DirectFB/proxy/requestor/idirectfbpalette_requestor.h b/Source/DirectFB/proxy/requestor/idirectfbpalette_requestor.h new file mode 100755 index 0000000..01c1946 --- /dev/null +++ b/Source/DirectFB/proxy/requestor/idirectfbpalette_requestor.h @@ -0,0 +1,45 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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 __IDIRECTFBPALETTE_REQUESTOR_H__ +#define __IDIRECTFBPALETTE_REQUESTOR_H__ + +#include + +/* + * private data struct of IDirectFBPalette_Requestor + */ +typedef struct { + int ref; /* reference counter */ + + VoodooManager *manager; + VoodooInstanceID instance; +} IDirectFBPalette_Requestor_data; + +#endif + diff --git a/Source/DirectFB/proxy/requestor/idirectfbscreen_requestor.c b/Source/DirectFB/proxy/requestor/idirectfbscreen_requestor.c new file mode 100755 index 0000000..d86dbd9 --- /dev/null +++ b/Source/DirectFB/proxy/requestor/idirectfbscreen_requestor.c @@ -0,0 +1,524 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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. +*/ + +#include + +#include +#include + +#include + +#include + +#include +#include +#include + +#include +#include + +#include + + +static DFBResult Probe( void ); +static DFBResult Construct( IDirectFBScreen *thiz, + VoodooManager *manager, + VoodooInstanceID instance, + void *arg ); + +#include + +DIRECT_INTERFACE_IMPLEMENTATION( IDirectFBScreen, Requestor ) + +/**************************************************************************************************/ + +/* + * private data struct of IDirectFBScreen_Requestor + */ +typedef struct { + int ref; /* reference counter */ + + VoodooManager *manager; + VoodooInstanceID instance; +} IDirectFBScreen_Requestor_data; + +/**************************************************************************************************/ + +static void +IDirectFBScreen_Requestor_Destruct( IDirectFBScreen *thiz ) +{ + IDirectFBScreen_Requestor_data *data = thiz->priv; + + D_DEBUG( "%s (%p)\n", __FUNCTION__, thiz ); + + voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSCREEN_METHOD_ID_Release, VREQ_NONE, NULL, + VMBT_NONE ); + + DIRECT_DEALLOCATE_INTERFACE( thiz ); +} + +/**************************************************************************************************/ + +static DirectResult +IDirectFBScreen_Requestor_AddRef( IDirectFBScreen *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Requestor) + + data->ref++; + + return DFB_OK; +} + +static DirectResult +IDirectFBScreen_Requestor_Release( IDirectFBScreen *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Requestor) + + if (--data->ref == 0) + IDirectFBScreen_Requestor_Destruct( thiz ); + + return DFB_OK; +} + +static DFBResult +IDirectFBScreen_Requestor_GetID( IDirectFBScreen *thiz, + DFBScreenID *ret_id ) +{ + DirectResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + DFBScreenID id; + + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Requestor) + + if (!ret_id) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSCREEN_METHOD_ID_GetID, VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_ID( parser, id ); + VOODOO_PARSER_END( parser ); + + voodoo_manager_finish_request( data->manager, response ); + + *ret_id = id; + + return ret; +} + +static DFBResult +IDirectFBScreen_Requestor_GetDescription( IDirectFBScreen *thiz, + DFBScreenDescription *ret_desc ) +{ + DirectResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + const DFBScreenDescription *desc; + + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Requestor) + + if (!ret_desc) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSCREEN_METHOD_ID_GetDescription, + VREQ_RESPOND, &response, VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_DATA( parser, desc ); + VOODOO_PARSER_END( parser ); + + voodoo_manager_finish_request( data->manager, response ); + + *ret_desc = *desc; + + return ret; +} + +static DFBResult +IDirectFBScreen_Requestor_GetSize( IDirectFBScreen *thiz, + int *width, + int *height ) +{ + DirectResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + const DFBDimension *size; + + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Requestor) + + if (!width && !height) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSCREEN_METHOD_ID_GetSize, + VREQ_RESPOND, &response, VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_DATA( parser, size ); + VOODOO_PARSER_END( parser ); + + voodoo_manager_finish_request( data->manager, response ); + + if (width) + *width = size->w; + + if (height) + *height = size->h; + + return ret; +} + +static DFBResult +IDirectFBScreen_Requestor_EnumDisplayLayers( IDirectFBScreen *thiz, + DFBDisplayLayerCallback callbackfunc, + void *callbackdata ) +{ + DirectResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + int i, num; + IDirectFBScreen_Dispatcher_EnumDisplayLayers_Item *items; + + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Requestor) + + if (!callbackfunc) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSCREEN_METHOD_ID_EnumDisplayLayers, VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_INT( parser, num ); + + items = D_MALLOC( sizeof(*items) * num ); + if (items) + VOODOO_PARSER_READ_DATA( parser, items, sizeof(*items) * num ); + else + ret = D_OOM(); + + VOODOO_PARSER_END( parser ); + + voodoo_manager_finish_request( data->manager, response ); + + if (items) { + for (i=0; imanager, data->instance, + IDIRECTFBSCREEN_METHOD_ID_SetPowerMode, VREQ_NONE, NULL, + VMBT_INT, mode, + VMBT_NONE ); +} + +static DFBResult +IDirectFBScreen_Requestor_WaitForSync( IDirectFBScreen *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Requestor) + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSCREEN_METHOD_ID_WaitForSync, VREQ_NONE, NULL, + VMBT_NONE ); +} + +static DFBResult +IDirectFBScreen_Requestor_GetMixerDescriptions( IDirectFBScreen *thiz, + DFBScreenMixerDescription *descriptions ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Requestor) + + if (!descriptions) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBScreen_Requestor_GetMixerConfiguration( IDirectFBScreen *thiz, + int mixer, + DFBScreenMixerConfig *config ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Requestor) + + if (!config) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBScreen_Requestor_TestMixerConfiguration( IDirectFBScreen *thiz, + int mixer, + const DFBScreenMixerConfig *config, + DFBScreenMixerConfigFlags *failed ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Requestor) + + if (!config || (config->flags & ~DSMCONF_ALL)) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBScreen_Requestor_SetMixerConfiguration( IDirectFBScreen *thiz, + int mixer, + const DFBScreenMixerConfig *config ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Requestor) + + if (!config || (config->flags & ~DSMCONF_ALL)) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBScreen_Requestor_GetEncoderDescriptions( IDirectFBScreen *thiz, + DFBScreenEncoderDescription *descriptions ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Requestor) + + if (!descriptions) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBScreen_Requestor_GetEncoderConfiguration( IDirectFBScreen *thiz, + int encoder, + DFBScreenEncoderConfig *config ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Requestor) + + if (!config) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBScreen_Requestor_TestEncoderConfiguration( IDirectFBScreen *thiz, + int encoder, + const DFBScreenEncoderConfig *config, + DFBScreenEncoderConfigFlags *failed ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Requestor) + + if (!config || (config->flags & ~DSECONF_ALL)) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBScreen_Requestor_SetEncoderConfiguration( IDirectFBScreen *thiz, + int encoder, + const DFBScreenEncoderConfig *config ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Requestor) + + if (!config || (config->flags & ~DSECONF_ALL)) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBScreen_Requestor_GetOutputDescriptions( IDirectFBScreen *thiz, + DFBScreenOutputDescription *descriptions ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Requestor) + + if (!descriptions) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBScreen_Requestor_GetOutputConfiguration( IDirectFBScreen *thiz, + int output, + DFBScreenOutputConfig *config ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Requestor) + + if (!config) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBScreen_Requestor_TestOutputConfiguration( IDirectFBScreen *thiz, + int output, + const DFBScreenOutputConfig *config, + DFBScreenOutputConfigFlags *failed ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Requestor) + + if (!config || (config->flags & ~DSOCONF_ALL)) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBScreen_Requestor_SetOutputConfiguration( IDirectFBScreen *thiz, + int output, + const DFBScreenOutputConfig *config ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBScreen_Requestor) + + if (!config || (config->flags & ~DSOCONF_ALL)) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +/**************************************************************************************************/ + +static DFBResult +Probe() +{ + /* This implementation has to be loaded explicitly. */ + return DFB_UNSUPPORTED; +} + +static DFBResult +Construct( IDirectFBScreen *thiz, + VoodooManager *manager, + VoodooInstanceID instance, + void *arg ) +{ + DIRECT_ALLOCATE_INTERFACE_DATA(thiz, IDirectFBScreen_Requestor) + + data->ref = 1; + data->manager = manager; + data->instance = instance; + + thiz->AddRef = IDirectFBScreen_Requestor_AddRef; + thiz->Release = IDirectFBScreen_Requestor_Release; + thiz->GetID = IDirectFBScreen_Requestor_GetID; + thiz->GetDescription = IDirectFBScreen_Requestor_GetDescription; + thiz->GetSize = IDirectFBScreen_Requestor_GetSize; + thiz->EnumDisplayLayers = IDirectFBScreen_Requestor_EnumDisplayLayers; + thiz->SetPowerMode = IDirectFBScreen_Requestor_SetPowerMode; + thiz->WaitForSync = IDirectFBScreen_Requestor_WaitForSync; + thiz->GetMixerDescriptions = IDirectFBScreen_Requestor_GetMixerDescriptions; + thiz->GetMixerConfiguration = IDirectFBScreen_Requestor_GetMixerConfiguration; + thiz->TestMixerConfiguration = IDirectFBScreen_Requestor_TestMixerConfiguration; + thiz->SetMixerConfiguration = IDirectFBScreen_Requestor_SetMixerConfiguration; + thiz->GetEncoderDescriptions = IDirectFBScreen_Requestor_GetEncoderDescriptions; + thiz->GetEncoderConfiguration = IDirectFBScreen_Requestor_GetEncoderConfiguration; + thiz->TestEncoderConfiguration = IDirectFBScreen_Requestor_TestEncoderConfiguration; + thiz->SetEncoderConfiguration = IDirectFBScreen_Requestor_SetEncoderConfiguration; + thiz->GetOutputDescriptions = IDirectFBScreen_Requestor_GetOutputDescriptions; + thiz->GetOutputConfiguration = IDirectFBScreen_Requestor_GetOutputConfiguration; + thiz->TestOutputConfiguration = IDirectFBScreen_Requestor_TestOutputConfiguration; + thiz->SetOutputConfiguration = IDirectFBScreen_Requestor_SetOutputConfiguration; + + return DFB_OK; +} + diff --git a/Source/DirectFB/proxy/requestor/idirectfbsurface_requestor.c b/Source/DirectFB/proxy/requestor/idirectfbsurface_requestor.c new file mode 100755 index 0000000..49984c0 --- /dev/null +++ b/Source/DirectFB/proxy/requestor/idirectfbsurface_requestor.c @@ -0,0 +1,1852 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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. +*/ + +#include + +#include +#include +#include + +#include + + +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +#include + +#include "idirectfbfont_requestor.h" +#include "idirectfbpalette_requestor.h" +#include "idirectfbsurface_requestor.h" + + +D_DEBUG_DOMAIN( IDirectFBSurface_Requestor_, "IDirectFBSurface/Requestor", "IDirectFBSurface Requestor" ); +D_DEBUG_DOMAIN( IDirectFBSurface_RequestorFlip, "IDirectFBSurface/Requestor/Flip", "IDirectFBSurface Requestor Flip" ); + +static DFBResult Probe( void ); +static DFBResult Construct( IDirectFBSurface *thiz, + VoodooManager *manager, + VoodooInstanceID instance, + void *arg ); + +#include + +DIRECT_INTERFACE_IMPLEMENTATION( IDirectFBSurface, Requestor ) + +/**************************************************************************************************/ + +static void +IDirectFBSurface_Requestor_Destruct( IDirectFBSurface *thiz ) +{ + IDirectFBSurface_Requestor_data *data = thiz->priv; + + D_DEBUG( "%s (%p)\n", __FUNCTION__, thiz ); + + direct_mutex_deinit( &data->flip.lock ); + direct_waitqueue_deinit( &data->flip.queue ); + + if (data->flip.window) + data->flip.window->Release( data->flip.window ); + + if (data->flip.buffer) + data->flip.buffer->Release( data->flip.buffer ); + + if (data->local != VOODOO_INSTANCE_NONE) + voodoo_manager_unregister_local( data->manager, data->local ); + + voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_Release, VREQ_NONE, NULL, + VMBT_NONE ); + + DIRECT_DEALLOCATE_INTERFACE( thiz ); +} + +/**************************************************************************************************/ + +static DirectResult +IDirectFBSurface_Requestor_AddRef( IDirectFBSurface *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + data->ref++; + + return DFB_OK; +} + +static DirectResult +IDirectFBSurface_Requestor_Release( IDirectFBSurface *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + if (--data->ref == 0) + IDirectFBSurface_Requestor_Destruct( thiz ); + + return DFB_OK; +} + + +static DFBResult +IDirectFBSurface_Requestor_GetPixelFormat( IDirectFBSurface *thiz, + DFBSurfacePixelFormat *ret_format ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + if (!ret_format) + return DFB_INVARG; + + if (!data->format) { + DFBResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_GetPixelFormat, VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_INT( parser, data->format ); + VOODOO_PARSER_END( parser ); + + voodoo_manager_finish_request( data->manager, response ); + } + + *ret_format = data->format; + + return DFB_OK; +} + +static DFBResult +IDirectFBSurface_Requestor_GetAccelerationMask( IDirectFBSurface *thiz, + IDirectFBSurface *source, + DFBAccelerationMask *ret_mask ) +{ + DirectResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + DFBAccelerationMask mask; + + IDirectFBSurface_Requestor_data *source_data = NULL; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + if (source) + DIRECT_INTERFACE_GET_DATA_FROM( source, source_data, IDirectFBSurface_Requestor ); + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_GetAccelerationMask, VREQ_RESPOND, &response, + VMBT_ID, source_data ? source_data->instance : VOODOO_INSTANCE_NONE, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_INT( parser, mask ); + VOODOO_PARSER_END( parser ); + + voodoo_manager_finish_request( data->manager, response ); + + *ret_mask = mask; + + return ret; +} + +static DFBResult +IDirectFBSurface_Requestor_GetPosition( IDirectFBSurface *thiz, + int *x, + int *y ) +{ + DFBResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + const DFBPoint *position; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + if (!x && !y) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_GetPosition, + VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_DATA( parser, position ); + VOODOO_PARSER_END( parser ); + + if (x) + *x = position->x; + + if (y) + *y = position->y; + + voodoo_manager_finish_request( data->manager, response ); + + return DFB_OK; +} + +static DFBResult +IDirectFBSurface_Requestor_GetSize( IDirectFBSurface *thiz, + int *width, + int *height ) +{ + DFBResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + const DFBDimension *dimension; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + if (!width && !height) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_GetSize, VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_DATA( parser, dimension ); + VOODOO_PARSER_END( parser ); + + if (width) + *width = dimension->w; + + if (height) + *height = dimension->h; + + voodoo_manager_finish_request( data->manager, response ); + + return DFB_OK; +} + +static DFBResult +IDirectFBSurface_Requestor_GetVisibleRectangle( IDirectFBSurface *thiz, + DFBRectangle *rect ) +{ + DFBResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + if (!rect) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_GetVisibleRectangle, + VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_READ_DATA( parser, rect, sizeof(DFBRectangle) ); + VOODOO_PARSER_END( parser ); + + voodoo_manager_finish_request( data->manager, response ); + + return DFB_OK; +} + +static DFBResult +IDirectFBSurface_Requestor_GetCapabilities( IDirectFBSurface *thiz, + DFBSurfaceCapabilities *caps ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + if (!caps) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Requestor_GetPalette( IDirectFBSurface *thiz, + IDirectFBPalette **ret_interface ) +{ + DirectResult ret; + VoodooResponseMessage *response; + void *interface_ptr = NULL; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + if (!ret_interface) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_GetPalette, VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret == DR_OK) + ret = voodoo_construct_requestor( data->manager, "IDirectFBPalette", + response->instance, data->idirectfb, &interface_ptr ); + + voodoo_manager_finish_request( data->manager, response ); + + *ret_interface = interface_ptr; + + return ret; +} + +static DFBResult +IDirectFBSurface_Requestor_SetPalette( IDirectFBSurface *thiz, + IDirectFBPalette *palette ) +{ + IDirectFBPalette_Requestor_data *palette_data = NULL; + + DIRECT_INTERFACE_GET_DATA( IDirectFBSurface_Requestor ) + + if (!palette) + return DFB_INVARG; + + DIRECT_INTERFACE_GET_DATA_FROM( palette, palette_data, IDirectFBPalette_Requestor ); + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_SetPalette, VREQ_QUEUE, NULL, + VMBT_ID, palette_data->instance, + VMBT_NONE ); +} + +static DFBResult +IDirectFBSurface_Requestor_SetAlphaRamp( IDirectFBSurface *thiz, + u8 a0, u8 a1, u8 a2, u8 a3 ) +{ + DIRECT_INTERFACE_GET_DATA( IDirectFBSurface_Requestor ) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Requestor_Lock( IDirectFBSurface *thiz, + DFBSurfaceLockFlags flags, + void **ret_ptr, int *ret_pitch ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + if (!flags || !ret_ptr || !ret_pitch) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Requestor_GetFramebufferOffset( IDirectFBSurface *thiz, + int *offset ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + if (!offset) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Requestor_Unlock( IDirectFBSurface *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DirectResult +Handle_FlipReturned( IDirectFBSurface *thiz, + unsigned int millis ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + D_DEBUG_AT( IDirectFBSurface_RequestorFlip, "%s( %p, millis %u )\n", __FUNCTION__, thiz, millis ); + + long long now = direct_clock_get_micros(); + + data->flip.returned = millis; + + data->flip.fps_count++; + + + long long diff = now - data->flip.fps_stamp; + unsigned int frames = data->flip.fps_count - data->flip.fps_old; + + if (diff > 10000000) { + long long kfps = frames * 1000000000ULL / diff; + + D_INFO( "IDirectFBSurface_Requestor_FlipNotify: FPS %lld.%03lld\n", kfps / 1000, kfps % 1000 ); + + data->flip.fps_stamp = now; + data->flip.fps_old = data->flip.fps_count; + } + + return DR_OK; +} + +static DFBResult +IDirectFBSurface_Requestor_Flip( IDirectFBSurface *thiz, + const DFBRegion *region, + DFBSurfaceFlipFlags flags ) +{ + DirectResult ret; + unsigned int millis; + bool use_notify_or_buffer = false; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + D_DEBUG_AT( IDirectFBSurface_RequestorFlip, "%s( %p, region %p, flags 0x%08x )\n", __FUNCTION__, thiz, region, flags ); + + // FIXME: find better heuristic for flip control, or use flag + if (!region || (region->x1 == 0 && region->y1 == 0)) + use_notify_or_buffer = true; + + millis = direct_clock_get_abs_millis(); + + if (flags & DSFLIP_WAIT) { + VoodooResponseMessage *response; + + if (data->flip.use_notify) + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_Flip, VREQ_RESPOND, &response, + VMBT_ODATA, sizeof(DFBRegion), region, + VMBT_INT, flags, + VMBT_UINT, millis, + VMBT_NONE ); + else + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_Flip, VREQ_RESPOND, &response, + VMBT_ODATA, sizeof(DFBRegion), region, + VMBT_INT, flags, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + + voodoo_manager_finish_request( data->manager, response ); + + return ret; + } + + if (data->flip.use_notify) { + D_DEBUG_AT( IDirectFBSurface_RequestorFlip, " -> millis %u, using FlipNotify\n", millis ); + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_Flip, VREQ_NONE, NULL, + VMBT_ODATA, sizeof(DFBRegion), region, + VMBT_INT, flags, + VMBT_UINT, millis, + VMBT_NONE ); + } + else { + D_DEBUG_AT( IDirectFBSurface_RequestorFlip, " -> millis %u, not using FlipNotify\n", millis ); + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_Flip, VREQ_NONE, NULL, + VMBT_ODATA, sizeof(DFBRegion), region, + VMBT_INT, flags, + VMBT_NONE ); + } + + if (use_notify_or_buffer && data->flip.use_notify) { + if (data->flip.end && millis - data->flip.end < 16) { + D_DEBUG_AT( IDirectFBSurface_RequestorFlip, " -> delaying next frame by %d ms\n", 16 - (millis - data->flip.end) ); + + direct_thread_sleep( (16 - (millis - data->flip.end)) * 1000 ); + } + + data->flip.requested = millis; + data->flip.end = direct_clock_get_abs_millis();; + + direct_mutex_lock( &data->flip.lock ); + + while (data->flip.requested - data->flip.returned > dfb_config->flip_notify_max_latency) + direct_waitqueue_wait( &data->flip.queue, &data->flip.lock ); + + direct_mutex_unlock( &data->flip.lock ); + } + else if (use_notify_or_buffer && data->flip.use_buffer) { + ret = data->flip.window->MoveTo( data->flip.window, 1 + (millis & 0xffff), 1 + (millis >> 16) ); + if (ret) { + D_DERROR( ret, "IDirectFBSurface_Requestor_Flip: MoveTo() for FlipNotify fallback failed!\n" ); + data->flip.use_buffer = false; + return DFB_OK; + } + + if (data->flip.end && millis - data->flip.end < 16) { + D_DEBUG_AT( IDirectFBSurface_RequestorFlip, " -> delaying next frame by %d ms\n", 16 - (millis - data->flip.end) ); + + direct_thread_sleep( (16 - (millis - data->flip.end)) * 1000 ); + } + + data->flip.requested = millis; + data->flip.end = direct_clock_get_abs_millis();; + + + DFBEvent event; + + while (data->flip.buffer->GetEvent( data->flip.buffer, &event ) == DFB_OK) { + if (event.clazz == DFEC_WINDOW && event.window.type == DWET_POSITION) + Handle_FlipReturned( thiz, ((u32)event.window.x - 1) | (((u32)event.window.y - 1) << 16) ); + } + + while (data->flip.requested - data->flip.returned > dfb_config->flip_notify_max_latency) { + data->flip.buffer->WaitForEvent( data->flip.buffer ); + + while (data->flip.buffer->GetEvent( data->flip.buffer, &event ) == DFB_OK) { + if (event.clazz == DFEC_WINDOW && event.window.type == DWET_POSITION) + Handle_FlipReturned( thiz, ((u32)event.window.x - 1) | (((u32)event.window.y - 1) << 16) ); + } + } + } + + return ret; +} + +static DFBResult +IDirectFBSurface_Requestor_SetField( IDirectFBSurface *thiz, + int field ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + if (field < 0 || field > 1) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Requestor_Clear( IDirectFBSurface *thiz, + u8 r, u8 g, u8 b, u8 a ) +{ + DFBColor color = { a, r, g, b }; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_Clear, VREQ_QUEUE, NULL, + VMBT_DATA, sizeof(DFBColor), &color, + VMBT_NONE ); +} + +static DFBResult +IDirectFBSurface_Requestor_SetClip( IDirectFBSurface *thiz, const DFBRegion *clip ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_SetClip, VREQ_QUEUE, NULL, + VMBT_ODATA, sizeof(DFBRegion), clip, + VMBT_NONE ); +} + +static DFBResult +IDirectFBSurface_Requestor_SetColor( IDirectFBSurface *thiz, + u8 r, u8 g, u8 b, u8 a ) +{ + DFBColor color = { a, r, g, b }; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_SetColor, VREQ_QUEUE, NULL, + VMBT_DATA, sizeof(DFBColor), &color, + VMBT_NONE ); +} + +static DFBResult +IDirectFBSurface_Requestor_SetColorIndex( IDirectFBSurface *thiz, + unsigned int index ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Requestor_SetSrcBlendFunction( IDirectFBSurface *thiz, + DFBSurfaceBlendFunction src ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Requestor_SetDstBlendFunction( IDirectFBSurface *thiz, + DFBSurfaceBlendFunction dst ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Requestor_SetPorterDuff( IDirectFBSurface *thiz, + DFBSurfacePorterDuffRule rule ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Requestor_SetSrcColorKey( IDirectFBSurface *thiz, + u8 r, + u8 g, + u8 b ) +{ + DFBColor color = { 0, r, g, b }; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_SetSrcColorKey, VREQ_QUEUE, NULL, + VMBT_DATA, sizeof(DFBColor), &color, + VMBT_NONE ); +} + +static DFBResult +IDirectFBSurface_Requestor_SetSrcColorKeyIndex( IDirectFBSurface *thiz, + unsigned int index ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_SetSrcColorKeyIndex, VREQ_QUEUE, NULL, + VMBT_UINT, index, + VMBT_NONE ); +} + +static DFBResult +IDirectFBSurface_Requestor_SetDstColorKey( IDirectFBSurface *thiz, + u8 r, + u8 g, + u8 b ) +{ + DFBColor color = { 0, r, g, b }; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_SetDstColorKey, VREQ_QUEUE, NULL, + VMBT_DATA, sizeof(DFBColor), &color, + VMBT_NONE ); +} + +static DFBResult +IDirectFBSurface_Requestor_SetDstColorKeyIndex( IDirectFBSurface *thiz, + unsigned int index ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_SetDstColorKeyIndex, VREQ_QUEUE, NULL, + VMBT_UINT, index, + VMBT_NONE ); +} + +static DFBResult +IDirectFBSurface_Requestor_SetFont( IDirectFBSurface *thiz, + IDirectFBFont *font ) +{ + IDirectFBFont_Requestor_data *font_data = NULL; + + DIRECT_INTERFACE_GET_DATA( IDirectFBSurface_Requestor ) + + if (data->font == font) + return DFB_OK; + + if (font) { + font->AddRef (font); + + DIRECT_INTERFACE_GET_DATA_FROM( font, font_data, IDirectFBFont_Requestor ); + } + + if (data->font) + data->font->Release (data->font); + + data->font = font; + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_SetFont, VREQ_QUEUE, NULL, + VMBT_ID, font_data ? font_data->instance : VOODOO_INSTANCE_NONE, + VMBT_NONE ); +} + +static DFBResult +IDirectFBSurface_Requestor_GetFont( IDirectFBSurface *thiz, + IDirectFBFont **font ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Requestor_SetDrawingFlags( IDirectFBSurface *thiz, + DFBSurfaceDrawingFlags flags ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_SetDrawingFlags, VREQ_QUEUE, NULL, + VMBT_INT, flags, + VMBT_NONE ); +} + +static DFBResult +IDirectFBSurface_Requestor_FillRectangle( IDirectFBSurface *thiz, + int x, int y, int w, int h ) +{ + DFBRectangle rect = { x, y, w, h }; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + if (w <= 0 || h <= 0) + return DFB_INVARG; + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_FillRectangle, VREQ_QUEUE, NULL, + VMBT_DATA, sizeof(DFBRectangle), &rect, + VMBT_NONE ); +} + +static DFBResult +IDirectFBSurface_Requestor_FillRectangles( IDirectFBSurface *thiz, + const DFBRectangle *rects, + unsigned int num_rects ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + if (!rects || !num_rects) + return DFB_INVARG; + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_FillRectangles, VREQ_QUEUE, NULL, + VMBT_UINT, num_rects, + VMBT_DATA, num_rects * sizeof(DFBRectangle), rects, + VMBT_NONE ); +} + +static DFBResult +IDirectFBSurface_Requestor_FillSpans( IDirectFBSurface *thiz, + int y, + const DFBSpan *spans, + unsigned int num_spans ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + if (!spans || !num_spans) + return DFB_INVARG; + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_FillSpans, VREQ_QUEUE, NULL, + VMBT_INT, y, + VMBT_UINT, num_spans, + VMBT_DATA, num_spans * sizeof(DFBSpan), spans, + VMBT_NONE ); +} + +static DFBResult +IDirectFBSurface_Requestor_DrawLine( IDirectFBSurface *thiz, + int x1, int y1, int x2, int y2 ) +{ + DFBRegion line = { x1, y1, x2, y2 }; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_DrawLine, VREQ_QUEUE, NULL, + VMBT_DATA, sizeof(DFBRegion), &line, + VMBT_NONE ); +} + +static DFBResult +IDirectFBSurface_Requestor_DrawLines( IDirectFBSurface *thiz, + const DFBRegion *lines, + unsigned int num_lines ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + if (!lines || !num_lines) + return DFB_INVARG; + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_DrawLines, VREQ_QUEUE, NULL, + VMBT_UINT, num_lines, + VMBT_DATA, num_lines * sizeof(DFBRegion), lines, + VMBT_NONE ); +} + +static DFBResult +IDirectFBSurface_Requestor_DrawRectangle( IDirectFBSurface *thiz, + int x, int y, int w, int h ) +{ + DFBRectangle rect = { x, y, w, h }; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + if (w <= 0 || h <= 0) + return DFB_INVARG; + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_DrawRectangle, VREQ_QUEUE, NULL, + VMBT_DATA, sizeof(DFBRectangle), &rect, + VMBT_NONE ); +} + +static DFBResult +IDirectFBSurface_Requestor_FillTriangle( IDirectFBSurface *thiz, + int x1, int y1, + int x2, int y2, + int x3, int y3 ) +{ + DFBTriangle triangle = { x1, y1, x2, y2, x3, y3 }; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_FillTriangle, VREQ_QUEUE, NULL, + VMBT_DATA, sizeof(DFBTriangle), &triangle, + VMBT_NONE ); +} + +static DFBResult +IDirectFBSurface_Requestor_SetBlittingFlags( IDirectFBSurface *thiz, + DFBSurfaceBlittingFlags flags ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_SetBlittingFlags, VREQ_QUEUE, NULL, + VMBT_INT, flags, + VMBT_NONE ); +} + +static DFBResult +IDirectFBSurface_Requestor_Blit( IDirectFBSurface *thiz, + IDirectFBSurface *source, + const DFBRectangle *rect, + int x, + int y ) +{ + DFBPoint point = { x, y }; + + IDirectFBSurface_Requestor_data *source_data; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + if (!source) + return DFB_INVARG; + + DIRECT_INTERFACE_GET_DATA_FROM( source, source_data, IDirectFBSurface_Requestor ); + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_Blit, VREQ_QUEUE, NULL, + VMBT_ID, source_data->instance, + VMBT_ODATA, sizeof(DFBRectangle), rect, + VMBT_DATA, sizeof(point), &point, + VMBT_NONE ); +} + +static DFBResult +IDirectFBSurface_Requestor_TileBlit( IDirectFBSurface *thiz, + IDirectFBSurface *source, + const DFBRectangle *rect, + int x, + int y ) +{ + DFBPoint point = { x, y }; + + IDirectFBSurface_Requestor_data *source_data; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + if (!source) + return DFB_INVARG; + + DIRECT_INTERFACE_GET_DATA_FROM( source, source_data, IDirectFBSurface_Requestor ); + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_TileBlit, VREQ_QUEUE, NULL, + VMBT_ID, source_data->instance, + VMBT_ODATA, sizeof(DFBRectangle), rect, + VMBT_DATA, sizeof(point), &point, + VMBT_NONE ); +} + +static DFBResult +IDirectFBSurface_Requestor_BatchBlit( IDirectFBSurface *thiz, + IDirectFBSurface *source, + const DFBRectangle *source_rects, + const DFBPoint *dest_points, + int num ) +{ + IDirectFBSurface_Requestor_data *source_data; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + if (!source || !source_rects || !dest_points || num < 1) + return DFB_INVARG; + + DIRECT_INTERFACE_GET_DATA_FROM( source, source_data, IDirectFBSurface_Requestor ); + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_BatchBlit, VREQ_QUEUE, NULL, + VMBT_ID, source_data->instance, + VMBT_UINT, num, + VMBT_DATA, num * sizeof(DFBRectangle), source_rects, + VMBT_DATA, num * sizeof(DFBPoint), dest_points, + VMBT_NONE ); +} + +static DFBResult +IDirectFBSurface_Requestor_StretchBlit( IDirectFBSurface *thiz, + IDirectFBSurface *source, + const DFBRectangle *source_rect, + const DFBRectangle *destination_rect ) +{ + IDirectFBSurface_Requestor_data *source_data; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + if (!source) + return DFB_INVARG; + + DIRECT_INTERFACE_GET_DATA_FROM( source, source_data, IDirectFBSurface_Requestor ); + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_StretchBlit, VREQ_QUEUE, NULL, + VMBT_ID, source_data->instance, + VMBT_ODATA, sizeof(DFBRectangle), source_rect, + VMBT_ODATA, sizeof(DFBRectangle), destination_rect, + VMBT_NONE ); +} + +static DFBResult +IDirectFBSurface_Requestor_TextureTriangles( IDirectFBSurface *thiz, + IDirectFBSurface *source, + const DFBVertex *vertices, + const int *indices, + int num, + DFBTriangleFormation formation ) +{ + int i; + int num_vertices = 0; + IDirectFBSurface_Requestor_data *source_data; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + if (!source || !vertices || num < 3) + return DFB_INVARG; + + if (indices) { + for (i=0; imanager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_TextureTriangles, VREQ_QUEUE, NULL, + VMBT_ID, source_data->instance, + VMBT_DATA, num_vertices * sizeof(DFBVertex), vertices, + VMBT_ODATA, num * sizeof(int), indices, + VMBT_INT, num, + VMBT_INT, formation, + VMBT_NONE ); +} + +static DFBResult +IDirectFBSurface_Requestor_DrawString( IDirectFBSurface *thiz, + const char *text, + int bytes, + int x, + int y, + DFBSurfaceTextFlags flags ) +{ + DFBPoint point = { x, y }; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + if (!text) + return DFB_INVARG; + + if (!data->font) + return DFB_MISSINGFONT; + + + if (bytes < 0) + bytes = strlen (text); + + if (bytes == 0) + return DFB_OK; + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_DrawString, VREQ_QUEUE, NULL, + VMBT_DATA, bytes, text, + VMBT_INT, bytes, + VMBT_DATA, sizeof(point), &point, + VMBT_INT, flags, + VMBT_NONE ); +} + +static DFBResult +IDirectFBSurface_Requestor_DrawGlyph( IDirectFBSurface *thiz, + unsigned int index, + int x, + int y, + DFBSurfaceTextFlags flags ) +{ + DFBPoint point = { x, y }; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + if (!index) + return DFB_INVARG; + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_DrawGlyph, VREQ_QUEUE, NULL, + VMBT_UINT, index, + VMBT_DATA, sizeof(point), &point, + VMBT_INT, flags, + VMBT_NONE ); +} + +static DFBResult +IDirectFBSurface_Requestor_SetEncoding( IDirectFBSurface *thiz, + DFBTextEncodingID encoding ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_SetEncoding, VREQ_QUEUE, NULL, + VMBT_UINT, encoding, + VMBT_NONE ); +} + +static DFBResult +IDirectFBSurface_Requestor_GetSubSurface( IDirectFBSurface *thiz, + const DFBRectangle *rect, + IDirectFBSurface **ret_interface ) +{ + DirectResult ret; + VoodooResponseMessage *response; + VoodooInstanceID instance_id; + void *interface_ptr = NULL; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + if (!ret_interface) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_GetSubSurface, VREQ_RESPOND, &response, + VMBT_ODATA, sizeof(DFBRectangle), rect, + VMBT_NONE ); + if (ret) + return ret; + + instance_id = response->instance; + + voodoo_manager_finish_request( data->manager, response ); + + ret = response->result; + if (ret == DR_OK) + ret = voodoo_construct_requestor( data->manager, "IDirectFBSurface", + instance_id, data->idirectfb, &interface_ptr ); + + *ret_interface = interface_ptr; + + return ret; +} + +static DFBResult +IDirectFBSurface_Requestor_GetGL( IDirectFBSurface *thiz, + IDirectFBGL **interface_ptr ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + if (!interface_ptr) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Requestor_Dump( IDirectFBSurface *thiz, + const char *directory, + const char *prefix ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + if (!directory || !prefix) + return DFB_INVARG; + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Requestor_DisableAcceleration( IDirectFBSurface *thiz, + DFBAccelerationMask mask ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_DisableAcceleration, + VREQ_QUEUE, NULL, + VMBT_UINT, mask, + VMBT_NONE ); +} + +static DFBResult +IDirectFBSurface_Requestor_ReleaseSource( IDirectFBSurface *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_ReleaseSource, VREQ_QUEUE, NULL, + VMBT_NONE ); +} + +static DFBResult +IDirectFBSurface_Requestor_SetIndexTranslation( IDirectFBSurface *thiz, + const int *indices, + int num_indices ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBSurface_Requestor_SetRenderOptions( IDirectFBSurface *thiz, + DFBSurfaceRenderOptions options ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_SetRenderOptions, VREQ_QUEUE, NULL, + VMBT_INT, options, + VMBT_NONE ); +} + +static DFBResult +IDirectFBSurface_Requestor_SetMatrix( IDirectFBSurface *thiz, + const s32 *matrix ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_SetMatrix, VREQ_QUEUE, NULL, + VMBT_DATA, sizeof(s32) * 9, matrix, + VMBT_NONE ); +} + +#define RLE16_KEY 0xf001 + +static bool +rle16_encode( const u16 *src, + u16 *dst, + unsigned int num, + unsigned int *ret_num ) +{ + unsigned int n, last, count = 0, out = 0; + + for (n=0; n num) { + *ret_num = num; + return false; + } + + if (count > 0) { + D_ASSERT( src[n] == last ); + + count++; + } + else { + count = 1; + last = src[n]; + } + + if (n == num-1 || src[n+1] != last) { + if (count > 2 || (count > 1 && last == RLE16_KEY)) { + dst[out++] = RLE16_KEY; + dst[out++] = count; + dst[out++] = last; + } + else { + if (count > 1 || last == RLE16_KEY) + dst[out++] = last; + + dst[out++] = last; + } + + count = 0; + } + } + + *ret_num = out; + + return true; +} + +#define RLE32_KEY 0xf0012345 + +static bool +rle32_encode( const u32 *src, + u32 *dst, + unsigned int num, + unsigned int *ret_num ) +{ + unsigned int n, last, count = 0, out = 0; + + for (n=0; n num) { + *ret_num = num; + return false; + } + + if (count > 0) { + D_ASSERT( src[n] == last ); + + count++; + } + else { + count = 1; + last = src[n]; + } + + if (n == num-1 || src[n+1] != last) { + if (count > 2 || (count > 1 && last == RLE32_KEY)) { + dst[out++] = RLE32_KEY; + dst[out++] = count; + dst[out++] = last; + } + else { + if (count > 1 || last == RLE32_KEY) + dst[out++] = last; + + dst[out++] = last; + } + + count = 0; + } + } + + *ret_num = out; + + return true; +} + +static DFBResult +IDirectFBSurface_Requestor_Write( IDirectFBSurface *thiz, + const DFBRectangle *rect, + const void *ptr, + int pitch ) +{ + DFBResult ret = DFB_OK; + int y; + DFBRectangle r; + DFBSurfacePixelFormat format; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + if (!rect || !ptr) + return DFB_INVARG; + + thiz->GetPixelFormat( thiz, &format ); + + r.x = rect->x; + r.y = rect->y; + r.w = rect->w; + r.h = 1; + + /* Use RLE only if Voodoo is not compressed already */ + switch (voodoo_config->compression_min ? DSPF_UNKNOWN : format) { + case DSPF_RGB16: + case DSPF_ARGB1555: { + unsigned int num; + u16 *buf = (u16*) D_MALLOC( rect->w * 2 ); + + if (buf) { + for (y=0; yh; y++) { + bool encoded = rle16_encode( (u16*)((char*) ptr + y * pitch), buf, rect->w, &num ); + + //D_INFO( "%3d: %u -> %u\n", r.y, rect->w, num ); + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_Write, VREQ_QUEUE, NULL, + VMBT_UINT, encoded ? 2 : 0, + VMBT_DATA, sizeof(DFBRectangle), &r, + VMBT_DATA, DFB_BYTES_PER_LINE( format, num ), + encoded ? buf : (u16*)((char*) ptr + y * pitch), + VMBT_INT, ABS(pitch), + VMBT_NONE ); + if (ret) + break; + + r.y++; + } + + D_FREE( buf ); + } + else + D_OOM(); + + break; + } + + case DSPF_RGB32: + case DSPF_ARGB: { + unsigned int num; + u32 *buf = (u32*) D_MALLOC( rect->w * 4 ); + + if (buf) { + for (y=0; yh; y++) { + bool encoded = rle32_encode( (u32*)((char*) ptr + y * pitch), buf, rect->w, &num ); + + //D_INFO( "%3d: %u -> %u\n", r.y, rect->w, num ); + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_Write, VREQ_QUEUE, NULL, + VMBT_UINT, encoded ? 4 : 0, + VMBT_DATA, sizeof(DFBRectangle), &r, + VMBT_DATA, DFB_BYTES_PER_LINE( format, num ), + encoded ? buf : (u32*)((char*) ptr + y * pitch), + VMBT_INT, ABS(pitch), + VMBT_NONE ); + if (ret) + break; + + r.y++; + } + + D_FREE( buf ); + } + else + D_OOM(); + + break; + } + + default: + for (y=0; yh; y++) { + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_Write, VREQ_QUEUE, NULL, + VMBT_UINT, false, + VMBT_DATA, sizeof(DFBRectangle), &r, + VMBT_DATA, DFB_BYTES_PER_LINE( format, rect->w ), (char*) ptr + y * pitch, + VMBT_INT, ABS(pitch), + VMBT_NONE ); + if (ret) + break; + + r.y++; + } + break; + } + + return ret; +} + + +#define RLE16_KEY 0xf001 + +static void +rle16_decode( const u16 *src, + u16 *dst, + unsigned int num ) +{ + unsigned int n = 0, last, count, out = 0; + + while (out < num) { + last = src[n++]; + + if (last == RLE16_KEY) { + count = src[n++]; + + if (count == RLE16_KEY) { + dst[out++] = RLE16_KEY; + } + else { + last = src[n++]; + + while (count >= 4) { + dst[out+0] = + dst[out+1] = + dst[out+2] = + dst[out+3] = last; + + out += 4; + count -= 4; + } + + while (count >= 2) { + dst[out+0] = + dst[out+1] = last; + + out += 2; + count -= 2; + } + + while (count--) + dst[out++] = last; + } + } + else + dst[out++] = last; + } + + D_ASSERT( out == num ); +} + +#define RLE32_KEY 0xf0012345 + +static void +rle32_decode( const u32 *src, + u32 *dst, + unsigned int num ) +{ + unsigned int n = 0, last, count, out = 0; + + while (out < num) { + last = src[n++]; + + if (last == RLE32_KEY) { + count = src[n++]; + + if (count == RLE32_KEY) { + dst[out++] = RLE32_KEY; + } + else { + last = src[n++]; + + while (count >= 4) { + dst[out+0] = + dst[out+1] = + dst[out+2] = + dst[out+3] = last; + + out += 4; + count -= 4; + } + + while (count >= 2) { + dst[out+0] = + dst[out+1] = last; + + out += 2; + count -= 2; + } + + while (count--) + dst[out++] = last; + } + } + else + dst[out++] = last; + } + + D_ASSERT( out == num ); +} + +static DFBResult +IDirectFBSurface_Requestor_Read( IDirectFBSurface *thiz, + const DFBRectangle *rect, + void *ptr, + int pitch ) +{ + DFBResult ret = DFB_OK; + int y; + DFBSurfacePixelFormat format; + VoodooMessageParser parser; + VoodooResponseMessage *response; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + D_DEBUG_AT( IDirectFBSurface_Requestor_, "%s( %p, %p, %d )\n", __FUNCTION__, rect, ptr, pitch ); + + if (!rect || !ptr) + return DFB_INVARG; + + D_DEBUG_AT( IDirectFBSurface_Requestor_, " -> %4d,%4d-%4dx%4d\n", DFB_RECTANGLE_VALS(rect) ); + + thiz->GetPixelFormat( thiz, &format ); + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBSURFACE_METHOD_ID_Read, VREQ_RESPOND, &response, + VMBT_DATA, sizeof(DFBRectangle), rect, + VMBT_NONE ); + if (ret) + return ret; + + for (y=0; yh; y++) { + unsigned int encoded; + const void *buf; + + D_DEBUG_AT( IDirectFBSurface_Requestor_, " -> [%d]\n", y ); + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_UINT( parser, encoded ); + VOODOO_PARSER_GET_DATA( parser, buf ); + VOODOO_PARSER_END( parser ); + + ret = response->result; + if (ret) + break; + + + if (encoded) { + switch (encoded) { + case 2: + rle16_decode( buf, (u16*)((char*) ptr + pitch * y), rect->w ); + break; + + case 4: + rle32_decode( buf, (u32*)((char*) ptr + pitch * y), rect->w ); + break; + + default: + D_UNIMPLEMENTED(); + break; + } + } + else + direct_memcpy( (char*) ptr + pitch * y, buf, DFB_BYTES_PER_LINE(format, rect->w) ); + + + if (y < rect->h - 1) + voodoo_manager_next_response( data->manager, response, &response ); + } + + voodoo_manager_finish_request( data->manager, response ); + + return ret; +} + + +/**************************************************************************************************/ + +static DirectResult +Dispatch_FlipNotify( IDirectFBSurface *thiz, IDirectFBSurface *real, + VoodooManager *manager, VoodooRequestMessage *msg ) +{ + VoodooMessageParser parser; + unsigned int millis; + + DIRECT_INTERFACE_GET_DATA(IDirectFBSurface_Requestor) + + direct_mutex_lock( &data->flip.lock ); + + + VOODOO_PARSER_BEGIN( parser, msg ); + VOODOO_PARSER_GET_UINT( parser, millis ); + VOODOO_PARSER_END( parser ); + + + Handle_FlipReturned( thiz, millis ); + + + direct_mutex_unlock( &data->flip.lock ); + + direct_waitqueue_signal( &data->flip.queue ); + + return DR_OK; +} + +static DirectResult +LocalDispatch( void *dispatcher, + void *real, + VoodooManager *manager, + VoodooRequestMessage *msg ) +{ + D_DEBUG( "IDirectFBSurface_Requestor/LocalDispatch: " + "Handling request for instance %u with method %u...\n", msg->instance, msg->method ); + + switch (msg->method) { + case IDIRECTFBSURFACE_REQUESTOR_METHOD_ID_FlipNotify: + return Dispatch_FlipNotify( real, real, manager, msg ); + } + + return DFB_NOSUCHMETHOD; +} + +/**************************************************************************************************/ + +static DFBResult +Probe() +{ + /* This implementation has to be loaded explicitly. */ + return DFB_UNSUPPORTED; +} + +static DFBResult +Construct( IDirectFBSurface *thiz, + VoodooManager *manager, + VoodooInstanceID instance, + void *arg ) +{ + DFBResult ret; + VoodooResponseMessage *response; + + DIRECT_ALLOCATE_INTERFACE_DATA(thiz, IDirectFBSurface_Requestor) + + data->ref = 1; + data->manager = manager; + data->instance = instance; + data->idirectfb = arg; + + + direct_mutex_init( &data->flip.lock ); + direct_waitqueue_init( &data->flip.queue ); + + if (dfb_config->flip_notify_max_latency) { + ret = voodoo_manager_register_local( manager, VOODOO_INSTANCE_NONE, NULL, thiz, LocalDispatch, &data->local ); + if (ret) { + D_DERROR( ret, "IDirectFBSurface_Requestor: Could not register local dispatch!\n" ); + DIRECT_DEALLOCATE_INTERFACE( thiz ); + return ret; + } + + ret = voodoo_manager_request( manager, instance, + IDIRECTFBSURFACE_METHOD_ID_SetRemoteInstance, VREQ_RESPOND, &response, + VMBT_ID, data->local, + VMBT_NONE ); + if (ret) + D_DERROR( ret, "IDirectFBSurface_Requestor: Could not set remote instance, FlipNotify not used!\n" ); + else if (response->result) + D_DERROR( response->result, "IDirectFBSurface_Requestor: Could not set remote instance, FlipNotify not used!\n" ); + else { + D_INFO( "IDirectFBSurface_Requestor: Using FlipNotify\n" ); + + data->flip.use_notify = true; + } + + voodoo_manager_finish_request( manager, response ); + + /* + * Implement fallback for missing FlipNotify support via event buffer and hidden window + */ + if (!data->flip.use_notify) { + DFBWindowDescription desc; + IDirectFBDisplayLayer *layer; + + ret = data->idirectfb->CreateEventBuffer( data->idirectfb, &data->flip.buffer ); + if (ret) { + D_DERROR( ret, "IDirectFBSurface_Requestor: Could not create event buffer for FlipNotify fallback!\n" ); + DIRECT_DEALLOCATE_INTERFACE( thiz ); + return ret; + } + + ret = data->idirectfb->GetDisplayLayer( data->idirectfb, DLID_PRIMARY, &layer ); + if (ret) { + D_DERROR( ret, "IDirectFBSurface_Requestor: Could not get display layer for FlipNotify fallback!\n" ); + DIRECT_DEALLOCATE_INTERFACE( thiz ); + return ret; + } + + desc.flags = DWDESC_CAPS; + desc.caps = DWCAPS_INPUTONLY | DWCAPS_NODECORATION; + + ret = layer->CreateWindow( layer, &desc, &data->flip.window ); + if (ret) { + D_DERROR( ret, "IDirectFBSurface_Requestor: Could not create window for FlipNotify fallback!\n" ); + DIRECT_DEALLOCATE_INTERFACE( thiz ); + return ret; + } + + ret = data->flip.window->AttachEventBuffer( data->flip.window, data->flip.buffer ); + if (ret) { + D_DERROR( ret, "IDirectFBSurface_Requestor: Could not attach event buffer for FlipNotify fallback!\n" ); + DIRECT_DEALLOCATE_INTERFACE( thiz ); + return ret; + } + + layer->Release( layer ); + + + D_INFO( "IDirectFBSurface_Requestor: Using FlipNotify fallback via event buffer/window!\n" ); + + data->flip.use_buffer = true; + } + } + + thiz->AddRef = IDirectFBSurface_Requestor_AddRef; + thiz->Release = IDirectFBSurface_Requestor_Release; + + thiz->GetCapabilities = IDirectFBSurface_Requestor_GetCapabilities; + thiz->GetPosition = IDirectFBSurface_Requestor_GetPosition; + thiz->GetSize = IDirectFBSurface_Requestor_GetSize; + thiz->GetVisibleRectangle = IDirectFBSurface_Requestor_GetVisibleRectangle; + thiz->GetPixelFormat = IDirectFBSurface_Requestor_GetPixelFormat; + thiz->GetAccelerationMask = IDirectFBSurface_Requestor_GetAccelerationMask; + + thiz->GetPalette = IDirectFBSurface_Requestor_GetPalette; + thiz->SetPalette = IDirectFBSurface_Requestor_SetPalette; + thiz->SetAlphaRamp = IDirectFBSurface_Requestor_SetAlphaRamp; + + thiz->Lock = IDirectFBSurface_Requestor_Lock; + thiz->GetFramebufferOffset = IDirectFBSurface_Requestor_GetFramebufferOffset; + thiz->Unlock = IDirectFBSurface_Requestor_Unlock; + thiz->Flip = IDirectFBSurface_Requestor_Flip; + thiz->SetField = IDirectFBSurface_Requestor_SetField; + thiz->Clear = IDirectFBSurface_Requestor_Clear; + + thiz->SetClip = IDirectFBSurface_Requestor_SetClip; + thiz->SetColor = IDirectFBSurface_Requestor_SetColor; + thiz->SetColorIndex = IDirectFBSurface_Requestor_SetColorIndex; + thiz->SetSrcBlendFunction = IDirectFBSurface_Requestor_SetSrcBlendFunction; + thiz->SetDstBlendFunction = IDirectFBSurface_Requestor_SetDstBlendFunction; + thiz->SetPorterDuff = IDirectFBSurface_Requestor_SetPorterDuff; + thiz->SetSrcColorKey = IDirectFBSurface_Requestor_SetSrcColorKey; + thiz->SetSrcColorKeyIndex = IDirectFBSurface_Requestor_SetSrcColorKeyIndex; + thiz->SetDstColorKey = IDirectFBSurface_Requestor_SetDstColorKey; + thiz->SetDstColorKeyIndex = IDirectFBSurface_Requestor_SetDstColorKeyIndex; + + thiz->SetBlittingFlags = IDirectFBSurface_Requestor_SetBlittingFlags; + thiz->Blit = IDirectFBSurface_Requestor_Blit; + thiz->TileBlit = IDirectFBSurface_Requestor_TileBlit; + thiz->BatchBlit = IDirectFBSurface_Requestor_BatchBlit; + thiz->StretchBlit = IDirectFBSurface_Requestor_StretchBlit; + thiz->TextureTriangles = IDirectFBSurface_Requestor_TextureTriangles; + + thiz->SetDrawingFlags = IDirectFBSurface_Requestor_SetDrawingFlags; + thiz->FillRectangle = IDirectFBSurface_Requestor_FillRectangle; + thiz->FillRectangles = IDirectFBSurface_Requestor_FillRectangles; + thiz->FillSpans = IDirectFBSurface_Requestor_FillSpans; + thiz->DrawLine = IDirectFBSurface_Requestor_DrawLine; + thiz->DrawLines = IDirectFBSurface_Requestor_DrawLines; + thiz->DrawRectangle = IDirectFBSurface_Requestor_DrawRectangle; + thiz->FillTriangle = IDirectFBSurface_Requestor_FillTriangle; + + thiz->SetFont = IDirectFBSurface_Requestor_SetFont; + thiz->GetFont = IDirectFBSurface_Requestor_GetFont; + thiz->DrawString = IDirectFBSurface_Requestor_DrawString; + thiz->DrawGlyph = IDirectFBSurface_Requestor_DrawGlyph; + thiz->SetEncoding = IDirectFBSurface_Requestor_SetEncoding; + + thiz->GetSubSurface = IDirectFBSurface_Requestor_GetSubSurface; + + thiz->GetGL = IDirectFBSurface_Requestor_GetGL; + + thiz->Dump = IDirectFBSurface_Requestor_Dump; + + thiz->DisableAcceleration = IDirectFBSurface_Requestor_DisableAcceleration; + + thiz->ReleaseSource = IDirectFBSurface_Requestor_ReleaseSource; + + thiz->SetIndexTranslation = IDirectFBSurface_Requestor_SetIndexTranslation; + + thiz->SetRenderOptions = IDirectFBSurface_Requestor_SetRenderOptions; + thiz->SetMatrix = IDirectFBSurface_Requestor_SetMatrix; + + thiz->Read = IDirectFBSurface_Requestor_Read; + thiz->Write = IDirectFBSurface_Requestor_Write; + + return DFB_OK; +} + diff --git a/Source/DirectFB/proxy/requestor/idirectfbsurface_requestor.h b/Source/DirectFB/proxy/requestor/idirectfbsurface_requestor.h new file mode 100755 index 0000000..27599a9 --- /dev/null +++ b/Source/DirectFB/proxy/requestor/idirectfbsurface_requestor.h @@ -0,0 +1,80 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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 __IDIRECTFBSURFACE_REQUESTOR_H__ +#define __IDIRECTFBSURFACE_REQUESTOR_H__ + +#include + +#include + +#include + +#define IDIRECTFBSURFACE_REQUESTOR_METHOD_ID_FlipNotify 1 + +/* + * private data struct of IDirectFBSurface_Requestor + */ +typedef struct { + int ref; /* reference counter */ + + IDirectFB *idirectfb; + + VoodooManager *manager; + VoodooInstanceID instance; + VoodooInstanceID local; + + IDirectFBFont *font; + + DFBSurfacePixelFormat format; + + struct { + bool use_notify; + + DirectMutex lock; + DirectWaitQueue queue; + + unsigned int requested; + unsigned int returned; + unsigned int end; + + long long fps_stamp; + unsigned int fps_count; + unsigned int fps_old; + + + + bool use_buffer; + + IDirectFBEventBuffer *buffer; + IDirectFBWindow *window; + } flip; +} IDirectFBSurface_Requestor_data; + +#endif + diff --git a/Source/DirectFB/proxy/requestor/idirectfbwindow_requestor.c b/Source/DirectFB/proxy/requestor/idirectfbwindow_requestor.c new file mode 100755 index 0000000..08e4ff2 --- /dev/null +++ b/Source/DirectFB/proxy/requestor/idirectfbwindow_requestor.c @@ -0,0 +1,1120 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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. +*/ + +#include + +#include + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include + +#include +#include + +#include "idirectfbsurface_requestor.h" +#include "idirectfbwindow_requestor.h" + + +static DFBResult Probe( void ); +static DFBResult Construct( IDirectFBWindow *thiz, + VoodooManager *manager, + VoodooInstanceID instance, + void *arg ); + +#include + +DIRECT_INTERFACE_IMPLEMENTATION( IDirectFBWindow, Requestor ) + + +/**************************************************************************************************/ + +static void +IDirectFBWindow_Requestor_Destruct( IDirectFBWindow *thiz ) +{ + IDirectFBWindow_Requestor_data *data = thiz->priv; + + D_DEBUG( "%s (%p)\n", __FUNCTION__, thiz ); + + voodoo_manager_request( data->manager, data->instance, + IDIRECTFBWINDOW_METHOD_ID_Release, VREQ_NONE, NULL, + VMBT_NONE ); + + DIRECT_DEALLOCATE_INTERFACE( thiz ); +} + +/**************************************************************************************************/ + +static DirectResult +IDirectFBWindow_Requestor_AddRef( IDirectFBWindow *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + data->ref++; + + return DFB_OK; +} + +static DirectResult +IDirectFBWindow_Requestor_Release( IDirectFBWindow *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + if (--data->ref == 0) + IDirectFBWindow_Requestor_Destruct( thiz ); + + return DFB_OK; +} + +static DFBResult +IDirectFBWindow_Requestor_CreateEventBuffer( IDirectFBWindow *thiz, + IDirectFBEventBuffer **ret_interface ) +{ + DFBResult ret; + IDirectFBEventBuffer *buffer; + IDirectFBEventBuffer *dispatcher; + VoodooInstanceID instance; + VoodooResponseMessage *response; + void *ptr; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + if (!ret_interface) + return DFB_INVARG; + + /* Create the real interface. */ + DIRECT_ALLOCATE_INTERFACE( buffer, IDirectFBEventBuffer ); + + IDirectFBEventBuffer_Construct( buffer, NULL, NULL ); + + /* Create the dispatcher. */ + ret = voodoo_construct_dispatcher( data->manager, "IDirectFBEventBuffer", + buffer, data->instance, NULL, &instance, &ptr ); + if (ret) { + buffer->Release( buffer ); + return ret; + } + + dispatcher = ptr; + + /* Send the request including the instance ID of the dispatcher. */ + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBWINDOW_METHOD_ID_CreateEventBuffer, VREQ_RESPOND, &response, + VMBT_ID, instance, + VMBT_NONE ); + if (ret) { + dispatcher->Release( dispatcher ); + return ret; + } + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + voodoo_manager_finish_request( data->manager, response ); + + /* Return the dispatcher interface. */ + *ret_interface = dispatcher; + + return DFB_OK; +} + +static DFBResult +IDirectFBWindow_Requestor_AttachEventBuffer( IDirectFBWindow *thiz, + IDirectFBEventBuffer *buffer ) +{ + DFBResult ret; + IDirectFBEventBuffer_Dispatcher_data *buffer_data; + VoodooResponseMessage *response; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + if (!buffer) + return DFB_INVARG; + + DIRECT_INTERFACE_GET_DATA_FROM( buffer, buffer_data, IDirectFBEventBuffer_Dispatcher ); + + /* Send the request including the instance ID of the dispatcher. */ + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBWINDOW_METHOD_ID_AttachEventBuffer, VREQ_RESPOND, &response, + VMBT_ID, buffer_data->self, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + + voodoo_manager_finish_request( data->manager, response ); + + return ret; +} + +static DFBResult +IDirectFBWindow_Requestor_DetachEventBuffer( IDirectFBWindow *thiz, + IDirectFBEventBuffer *buffer ) +{ + DFBResult ret; + IDirectFBEventBuffer_Dispatcher_data *buffer_data; + VoodooResponseMessage *response; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + if (!buffer) + return DFB_INVARG; + + DIRECT_INTERFACE_GET_DATA_FROM( buffer, buffer_data, IDirectFBEventBuffer_Dispatcher ); + + /* Send the request including the instance ID of the dispatcher. */ + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBWINDOW_METHOD_ID_DetachEventBuffer, VREQ_RESPOND, &response, + VMBT_ID, buffer_data->self, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + + voodoo_manager_finish_request( data->manager, response ); + + return ret; +} + +static DFBResult +IDirectFBWindow_Requestor_EnableEvents( IDirectFBWindow *thiz, + DFBWindowEventType mask ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBWINDOW_METHOD_ID_EnableEvents, VREQ_NONE, NULL, + VMBT_UINT, mask, + VMBT_NONE ); +} + +static DFBResult +IDirectFBWindow_Requestor_DisableEvents( IDirectFBWindow *thiz, + DFBWindowEventType mask ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Requestor_GetID( IDirectFBWindow *thiz, + DFBWindowID *ret_id ) +{ + DirectResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + DFBWindowID id; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + if (!ret_id) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBWINDOW_METHOD_ID_GetID, VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_ID( parser, id ); + VOODOO_PARSER_END( parser ); + + voodoo_manager_finish_request( data->manager, response ); + + *ret_id = id; + + return ret; +} + +static DFBResult +IDirectFBWindow_Requestor_GetPosition( IDirectFBWindow *thiz, + int *x, + int *y ) +{ + DirectResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + const DFBPoint *position; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + if (!x && !y) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBWINDOW_METHOD_ID_GetPosition, VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_DATA( parser, position ); + VOODOO_PARSER_END( parser ); + + voodoo_manager_finish_request( data->manager, response ); + + if (x) + *x = position->x; + + if (y) + *y = position->y; + + return ret; +} + +static DFBResult +IDirectFBWindow_Requestor_GetSize( IDirectFBWindow *thiz, + int *width, + int *height ) +{ + DirectResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + const DFBDimension *size; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + if (!width && !height) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBWINDOW_METHOD_ID_GetSize, VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_DATA( parser, size ); + VOODOO_PARSER_END( parser ); + + voodoo_manager_finish_request( data->manager, response ); + + if (width) + *width = size->w; + + if (height) + *height = size->h; + + return ret; +} + +static DFBResult +IDirectFBWindow_Requestor_GetSurface( IDirectFBWindow *thiz, + IDirectFBSurface **ret_interface ) +{ + DirectResult ret; + VoodooResponseMessage *response; + VoodooInstanceID instance_id; + void *interface_ptr = NULL; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + if (!ret_interface) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBWINDOW_METHOD_ID_GetSurface, VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + /* Copy and finish as we do our next request in surface constructor already! */ + instance_id = response->instance; + + voodoo_manager_finish_request( data->manager, response ); + + ret = response->result; + if (ret == DR_OK) + ret = voodoo_construct_requestor( data->manager, "IDirectFBSurface", + instance_id, data->idirectfb, &interface_ptr ); + + *ret_interface = interface_ptr; + + return ret; +} + +static DFBResult +IDirectFBWindow_Requestor_SetProperty( IDirectFBWindow *thiz, + const char *key, + void *value, + void **old_value ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Requestor_GetProperty( IDirectFBWindow *thiz, + const char *key, + void **ret_value ) +{ + DirectResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + const char *value; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + if (!ret_value) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBWINDOW_METHOD_ID_GetProperty, VREQ_RESPOND, &response, + VMBT_STRING, key, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_STRING( parser, value ); + VOODOO_PARSER_END( parser ); + + *ret_value = D_STRDUP( value ); // FIXME: LEAK + + voodoo_manager_finish_request( data->manager, response ); + + return DFB_OK; +} + +static DFBResult +IDirectFBWindow_Requestor_RemoveProperty( IDirectFBWindow *thiz, + const char *key, + void **value ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Requestor_SetOptions( IDirectFBWindow *thiz, + DFBWindowOptions options ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + if (options & ~DWOP_ALL) + return DFB_INVARG; + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBWINDOW_METHOD_ID_SetOptions, VREQ_NONE, NULL, + VMBT_INT, options, + VMBT_NONE ); +} + +static DFBResult +IDirectFBWindow_Requestor_GetOptions( IDirectFBWindow *thiz, + DFBWindowOptions *ret_options ) +{ + DirectResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + DFBWindowOptions options; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + if (!ret_options) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBWINDOW_METHOD_ID_GetOptions, VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_INT( parser, options ); + VOODOO_PARSER_END( parser ); + + voodoo_manager_finish_request( data->manager, response ); + + *ret_options = options; + + return ret; +} + +static DFBResult +IDirectFBWindow_Requestor_SetColorKey( IDirectFBWindow *thiz, + u8 r, + u8 g, + u8 b ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Requestor_SetColorKeyIndex( IDirectFBWindow *thiz, + unsigned int index ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Requestor_SetOpaqueRegion( IDirectFBWindow *thiz, + int x1, + int y1, + int x2, + int y2 ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Requestor_SetOpacity( IDirectFBWindow *thiz, + u8 opacity ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBWINDOW_METHOD_ID_SetOpacity, VREQ_NONE, NULL, + VMBT_UINT, opacity, + VMBT_NONE ); +} + +static DFBResult +IDirectFBWindow_Requestor_GetOpacity( IDirectFBWindow *thiz, + u8 *ret_opacity ) +{ + DirectResult ret; + VoodooResponseMessage *response; + VoodooMessageParser parser; + u8 opacity; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + if (!ret_opacity) + return DFB_INVARG; + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBWINDOW_METHOD_ID_GetOpacity, VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + if (ret) { + voodoo_manager_finish_request( data->manager, response ); + return ret; + } + + VOODOO_PARSER_BEGIN( parser, response ); + VOODOO_PARSER_GET_UINT( parser, opacity ); + VOODOO_PARSER_END( parser ); + + voodoo_manager_finish_request( data->manager, response ); + + *ret_opacity = opacity; + + return ret; +} + +static DFBResult +IDirectFBWindow_Requestor_SetCursorShape( IDirectFBWindow *thiz, + IDirectFBSurface *shape, + int hot_x, + int hot_y ) +{ + DFBPoint hot = { hot_x, hot_y }; + DirectResult ret; + VoodooResponseMessage *response; + IDirectFBSurface_Requestor_data *shape_data; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + if (!shape) + return DFB_INVARG; + + DIRECT_INTERFACE_GET_DATA_FROM( shape, shape_data, IDirectFBSurface_Requestor); + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBWINDOW_METHOD_ID_SetCursorShape, VREQ_RESPOND, &response, + VMBT_ID, shape_data->instance, + VMBT_DATA, sizeof(DFBPoint), &hot, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + + voodoo_manager_finish_request( data->manager, response ); + + return ret; +} + +static DFBResult +IDirectFBWindow_Requestor_RequestFocus( IDirectFBWindow *thiz ) +{ + DirectResult ret; + VoodooResponseMessage *response; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBWINDOW_METHOD_ID_RequestFocus, VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + + voodoo_manager_finish_request( data->manager, response ); + + return ret; +} + +static DFBResult +IDirectFBWindow_Requestor_GrabKeyboard( IDirectFBWindow *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Requestor_UngrabKeyboard( IDirectFBWindow *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Requestor_GrabPointer( IDirectFBWindow *thiz ) +{ + DirectResult ret; + VoodooResponseMessage *response; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBWINDOW_METHOD_ID_GrabPointer, VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + + voodoo_manager_finish_request( data->manager, response ); + + return ret; +} + +static DFBResult +IDirectFBWindow_Requestor_UngrabPointer( IDirectFBWindow *thiz ) +{ + DirectResult ret; + VoodooResponseMessage *response; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBWINDOW_METHOD_ID_UngrabPointer, VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + + voodoo_manager_finish_request( data->manager, response ); + + return ret; +} + +static DFBResult +IDirectFBWindow_Requestor_GrabKey( IDirectFBWindow *thiz, + DFBInputDeviceKeySymbol symbol, + DFBInputDeviceModifierMask modifiers ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Requestor_UngrabKey( IDirectFBWindow *thiz, + DFBInputDeviceKeySymbol symbol, + DFBInputDeviceModifierMask modifiers ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Requestor_Move( IDirectFBWindow *thiz, int dx, int dy ) +{ + DFBPoint point = { dx, dy }; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBWINDOW_METHOD_ID_Move, VREQ_NONE, NULL, + VMBT_DATA, sizeof(point), &point, + VMBT_NONE ); +} + +static DFBResult +IDirectFBWindow_Requestor_MoveTo( IDirectFBWindow *thiz, int x, int y ) +{ + DFBPoint point = { x, y }; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBWINDOW_METHOD_ID_MoveTo, VREQ_NONE, NULL, + VMBT_DATA, sizeof(point), &point, + VMBT_NONE ); +} + +static DFBResult +IDirectFBWindow_Requestor_Resize( IDirectFBWindow *thiz, + int width, + int height ) +{ + DirectResult ret; + DFBDimension size = { width, height }; + VoodooResponseMessage *response; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBWINDOW_METHOD_ID_Resize, VREQ_RESPOND, &response, + VMBT_DATA, sizeof(size), &size, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + + voodoo_manager_finish_request( data->manager, response ); + + return ret; +} + +static DFBResult +IDirectFBWindow_Requestor_Raise( IDirectFBWindow *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBWINDOW_METHOD_ID_Raise, VREQ_NONE, NULL, + VMBT_NONE ); +} + +static DFBResult +IDirectFBWindow_Requestor_SetStackingClass( IDirectFBWindow *thiz, + DFBWindowStackingClass stacking_class ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBWINDOW_METHOD_ID_SetStackingClass, VREQ_NONE, NULL, + VMBT_INT, stacking_class, + VMBT_NONE ); +} + +static DFBResult +IDirectFBWindow_Requestor_Lower( IDirectFBWindow *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBWINDOW_METHOD_ID_Lower, VREQ_NONE, NULL, + VMBT_NONE ); +} + +static DFBResult +IDirectFBWindow_Requestor_RaiseToTop( IDirectFBWindow *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBWINDOW_METHOD_ID_RaiseToTop, VREQ_NONE, NULL, + VMBT_NONE ); +} + +static DFBResult +IDirectFBWindow_Requestor_LowerToBottom( IDirectFBWindow *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBWINDOW_METHOD_ID_LowerToBottom, VREQ_NONE, NULL, + VMBT_NONE ); +} + +static DFBResult +IDirectFBWindow_Requestor_PutAtop( IDirectFBWindow *thiz, + IDirectFBWindow *lower ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Requestor_PutBelow( IDirectFBWindow *thiz, + IDirectFBWindow *upper ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + D_UNIMPLEMENTED(); + + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Requestor_Close( IDirectFBWindow *thiz ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBWINDOW_METHOD_ID_Close, VREQ_NONE, NULL, + VMBT_NONE ); +} + +static DFBResult +IDirectFBWindow_Requestor_Destroy( IDirectFBWindow *thiz ) +{ + DirectResult ret; + VoodooResponseMessage *response; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBWINDOW_METHOD_ID_Destroy, VREQ_RESPOND, &response, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + + voodoo_manager_finish_request( data->manager, response ); + + return ret; +} + +static DFBResult +IDirectFBWindow_Requestor_SetBounds( IDirectFBWindow *thiz, + int x, int y, int w, int h ) +{ + DirectResult ret; + DFBRectangle bounds = { x, y, w, h }; + VoodooResponseMessage *response; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBWINDOW_METHOD_ID_SetBounds, VREQ_RESPOND, &response, + VMBT_DATA, sizeof(bounds), &bounds, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + + voodoo_manager_finish_request( data->manager, response ); + + return ret; +} + +static DFBResult +IDirectFBWindow_Requestor_ResizeSurface( IDirectFBWindow *thiz, + int width, + int height ) +{ + DirectResult ret; + DFBDimension size = { width, height }; + VoodooResponseMessage *response; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBWINDOW_METHOD_ID_ResizeSurface, VREQ_RESPOND, &response, + VMBT_DATA, sizeof(size), &size, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + + voodoo_manager_finish_request( data->manager, response ); + + return ret; +} + +static DFBResult +IDirectFBWindow_Requestor_Bind( IDirectFBWindow *thiz, + IDirectFBWindow *source, + int x, + int y ) +{ + D_UNIMPLEMENTED(); + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Requestor_Unbind( IDirectFBWindow *thiz, + IDirectFBWindow *source ) +{ + D_UNIMPLEMENTED(); + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Requestor_SetKeySelection( IDirectFBWindow *thiz, + DFBWindowKeySelection selection, + const DFBInputDeviceKeySymbol *keys, + unsigned int num_keys ) +{ + D_UNIMPLEMENTED(); + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Requestor_GrabUnselectedKeys( IDirectFBWindow *thiz ) +{ + D_UNIMPLEMENTED(); + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Requestor_UngrabUnselectedKeys( IDirectFBWindow *thiz ) +{ + D_UNIMPLEMENTED(); + return DFB_UNIMPLEMENTED; +} + +static DFBResult +IDirectFBWindow_Requestor_SetSrcGeometry( IDirectFBWindow *thiz, + const DFBWindowGeometry *geometry ) +{ + DirectResult ret; + VoodooResponseMessage *response; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBWINDOW_METHOD_ID_SetSrcGeometry, VREQ_RESPOND, &response, + VMBT_DATA, sizeof(DFBWindowGeometry), geometry, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + + voodoo_manager_finish_request( data->manager, response ); + + return ret; +} + +static DFBResult +IDirectFBWindow_Requestor_SetDstGeometry( IDirectFBWindow *thiz, + const DFBWindowGeometry *geometry ) +{ + DirectResult ret; + VoodooResponseMessage *response; + + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + ret = voodoo_manager_request( data->manager, data->instance, + IDIRECTFBWINDOW_METHOD_ID_SetDstGeometry, VREQ_RESPOND, &response, + VMBT_DATA, sizeof(DFBWindowGeometry), geometry, + VMBT_NONE ); + if (ret) + return ret; + + ret = response->result; + + voodoo_manager_finish_request( data->manager, response ); + + return ret; +} + +static DFBResult +IDirectFBWindow_Requestor_SendEvent( IDirectFBWindow *thiz, + const DFBWindowEvent *event ) +{ + DIRECT_INTERFACE_GET_DATA(IDirectFBWindow_Requestor) + + return voodoo_manager_request( data->manager, data->instance, + IDIRECTFBWINDOW_METHOD_ID_SendEvent, VREQ_NONE, NULL, + VMBT_DATA, sizeof(DFBWindowEvent), event, + VMBT_NONE ); +} + +/**************************************************************************************************/ + +static DFBResult +Probe() +{ + /* This implementation has to be loaded explicitly. */ + return DFB_UNSUPPORTED; +} + +static DFBResult +Construct( IDirectFBWindow *thiz, + VoodooManager *manager, + VoodooInstanceID instance, + void *arg ) +{ + DIRECT_ALLOCATE_INTERFACE_DATA(thiz, IDirectFBWindow_Requestor) + + data->ref = 1; + data->manager = manager; + data->instance = instance; + data->idirectfb = arg; + + thiz->AddRef = IDirectFBWindow_Requestor_AddRef; + thiz->Release = IDirectFBWindow_Requestor_Release; + thiz->GetID = IDirectFBWindow_Requestor_GetID; + thiz->GetPosition = IDirectFBWindow_Requestor_GetPosition; + thiz->GetSize = IDirectFBWindow_Requestor_GetSize; + thiz->CreateEventBuffer = IDirectFBWindow_Requestor_CreateEventBuffer; + thiz->AttachEventBuffer = IDirectFBWindow_Requestor_AttachEventBuffer; + thiz->DetachEventBuffer = IDirectFBWindow_Requestor_DetachEventBuffer; + thiz->EnableEvents = IDirectFBWindow_Requestor_EnableEvents; + thiz->DisableEvents = IDirectFBWindow_Requestor_DisableEvents; + thiz->GetSurface = IDirectFBWindow_Requestor_GetSurface; + thiz->SetProperty = IDirectFBWindow_Requestor_SetProperty; + thiz->GetProperty = IDirectFBWindow_Requestor_GetProperty; + thiz->RemoveProperty = IDirectFBWindow_Requestor_RemoveProperty; + thiz->SetOptions = IDirectFBWindow_Requestor_SetOptions; + thiz->GetOptions = IDirectFBWindow_Requestor_GetOptions; + thiz->SetColorKey = IDirectFBWindow_Requestor_SetColorKey; + thiz->SetColorKeyIndex = IDirectFBWindow_Requestor_SetColorKeyIndex; + thiz->SetOpaqueRegion = IDirectFBWindow_Requestor_SetOpaqueRegion; + thiz->SetOpacity = IDirectFBWindow_Requestor_SetOpacity; + thiz->GetOpacity = IDirectFBWindow_Requestor_GetOpacity; + thiz->SetCursorShape = IDirectFBWindow_Requestor_SetCursorShape; + thiz->RequestFocus = IDirectFBWindow_Requestor_RequestFocus; + thiz->GrabKeyboard = IDirectFBWindow_Requestor_GrabKeyboard; + thiz->UngrabKeyboard = IDirectFBWindow_Requestor_UngrabKeyboard; + thiz->GrabPointer = IDirectFBWindow_Requestor_GrabPointer; + thiz->UngrabPointer = IDirectFBWindow_Requestor_UngrabPointer; + thiz->GrabKey = IDirectFBWindow_Requestor_GrabKey; + thiz->UngrabKey = IDirectFBWindow_Requestor_UngrabKey; + thiz->Move = IDirectFBWindow_Requestor_Move; + thiz->MoveTo = IDirectFBWindow_Requestor_MoveTo; + thiz->Resize = IDirectFBWindow_Requestor_Resize; + thiz->SetStackingClass = IDirectFBWindow_Requestor_SetStackingClass; + thiz->Raise = IDirectFBWindow_Requestor_Raise; + thiz->Lower = IDirectFBWindow_Requestor_Lower; + thiz->RaiseToTop = IDirectFBWindow_Requestor_RaiseToTop; + thiz->LowerToBottom = IDirectFBWindow_Requestor_LowerToBottom; + thiz->PutAtop = IDirectFBWindow_Requestor_PutAtop; + thiz->PutBelow = IDirectFBWindow_Requestor_PutBelow; + thiz->Close = IDirectFBWindow_Requestor_Close; + thiz->Destroy = IDirectFBWindow_Requestor_Destroy; + thiz->SetBounds = IDirectFBWindow_Requestor_SetBounds; + thiz->ResizeSurface = IDirectFBWindow_Requestor_ResizeSurface; + thiz->Bind = IDirectFBWindow_Requestor_Bind; + thiz->Unbind = IDirectFBWindow_Requestor_Unbind; + thiz->SetKeySelection = IDirectFBWindow_Requestor_SetKeySelection; + thiz->GrabUnselectedKeys = IDirectFBWindow_Requestor_GrabUnselectedKeys; + thiz->UngrabUnselectedKeys = IDirectFBWindow_Requestor_UngrabUnselectedKeys; + thiz->SetSrcGeometry = IDirectFBWindow_Requestor_SetSrcGeometry; + thiz->SetDstGeometry = IDirectFBWindow_Requestor_SetDstGeometry; + thiz->SendEvent = IDirectFBWindow_Requestor_SendEvent; + + return DFB_OK; +} + diff --git a/Source/DirectFB/proxy/requestor/idirectfbwindow_requestor.h b/Source/DirectFB/proxy/requestor/idirectfbwindow_requestor.h new file mode 100755 index 0000000..8499a69 --- /dev/null +++ b/Source/DirectFB/proxy/requestor/idirectfbwindow_requestor.h @@ -0,0 +1,47 @@ +/* + (c) Copyright 2001-2009 The world wide DirectFB Open Source Community (directfb.org) + (c) Copyright 2000-2004 Convergence (integrated media) GmbH + + All rights reserved. + + Written by Denis Oliver Kropp , + Andreas Hundt , + Sven Neumann , + Ville Syrjälä and + Claudio Ciccani . + + 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 __IDIRECTFBWINDOW_REQUESTOR_H__ +#define __IDIRECTFBWINDOW_REQUESTOR_H__ + +#include + +/* + * private data struct of IDirectFBWindow_Requestor + */ +typedef struct { + int ref; /* reference counter */ + + IDirectFB *idirectfb; + + VoodooManager *manager; + VoodooInstanceID instance; +} IDirectFBWindow_Requestor_data; + +#endif + -- cgit