summaryrefslogtreecommitdiff
path: root/Source/DirectFB/src/windows
diff options
context:
space:
mode:
Diffstat (limited to 'Source/DirectFB/src/windows')
-rwxr-xr-xSource/DirectFB/src/windows/Makefile.am20
-rwxr-xr-xSource/DirectFB/src/windows/Makefile.in552
-rwxr-xr-xSource/DirectFB/src/windows/idirectfbwindow.c1446
-rwxr-xr-xSource/DirectFB/src/windows/idirectfbwindow.h44
4 files changed, 2062 insertions, 0 deletions
diff --git a/Source/DirectFB/src/windows/Makefile.am b/Source/DirectFB/src/windows/Makefile.am
new file mode 100755
index 0000000..572dc27
--- /dev/null
+++ b/Source/DirectFB/src/windows/Makefile.am
@@ -0,0 +1,20 @@
+## Makefile.am for DirectFB/src/windows
+
+INCLUDES = \
+ -I$(top_builddir)/lib \
+ -I$(top_builddir)/include \
+ -I$(top_srcdir)/include \
+ -I$(top_srcdir)/lib \
+ -I$(top_srcdir)/src
+
+
+internalincludedir = $(INTERNALINCLUDEDIR)/windows
+
+internalinclude_HEADERS = \
+ idirectfbwindow.h
+
+
+noinst_LTLIBRARIES = libdirectfb_windows.la
+
+libdirectfb_windows_la_SOURCES = \
+ idirectfbwindow.c
diff --git a/Source/DirectFB/src/windows/Makefile.in b/Source/DirectFB/src/windows/Makefile.in
new file mode 100755
index 0000000..23e44b9
--- /dev/null
+++ b/Source/DirectFB/src/windows/Makefile.in
@@ -0,0 +1,552 @@
+# 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 = src/windows
+DIST_COMMON = $(internalinclude_HEADERS) $(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 =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+libdirectfb_windows_la_LIBADD =
+am_libdirectfb_windows_la_OBJECTS = idirectfbwindow.lo
+libdirectfb_windows_la_OBJECTS = $(am_libdirectfb_windows_la_OBJECTS)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(libdirectfb_windows_la_SOURCES)
+DIST_SOURCES = $(libdirectfb_windows_la_SOURCES)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__installdirs = "$(DESTDIR)$(internalincludedir)"
+internalincludeHEADERS_INSTALL = $(INSTALL_HEADER)
+HEADERS = $(internalinclude_HEADERS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AR = @AR@
+AS = @AS@
+ASFLAGS = @ASFLAGS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIR = @DATADIR@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DFB_CFLAGS_OMIT_FRAME_POINTER = @DFB_CFLAGS_OMIT_FRAME_POINTER@
+DFB_INTERNAL_CFLAGS = @DFB_INTERNAL_CFLAGS@
+DFB_LDFLAGS = @DFB_LDFLAGS@
+DFB_SMOOTH_SCALING = @DFB_SMOOTH_SCALING@
+DIRECTFB_BINARY_AGE = @DIRECTFB_BINARY_AGE@
+DIRECTFB_CSOURCE = @DIRECTFB_CSOURCE@
+DIRECTFB_INTERFACE_AGE = @DIRECTFB_INTERFACE_AGE@
+DIRECTFB_MAJOR_VERSION = @DIRECTFB_MAJOR_VERSION@
+DIRECTFB_MICRO_VERSION = @DIRECTFB_MICRO_VERSION@
+DIRECTFB_MINOR_VERSION = @DIRECTFB_MINOR_VERSION@
+DIRECTFB_VERSION = @DIRECTFB_VERSION@
+DIRECT_BUILD_DEBUG = @DIRECT_BUILD_DEBUG@
+DIRECT_BUILD_DEBUGS = @DIRECT_BUILD_DEBUGS@
+DIRECT_BUILD_GETTID = @DIRECT_BUILD_GETTID@
+DIRECT_BUILD_NETWORK = @DIRECT_BUILD_NETWORK@
+DIRECT_BUILD_STDBOOL = @DIRECT_BUILD_STDBOOL@
+DIRECT_BUILD_TEXT = @DIRECT_BUILD_TEXT@
+DIRECT_BUILD_TRACE = @DIRECT_BUILD_TRACE@
+DSYMUTIL = @DSYMUTIL@
+DYNLIB = @DYNLIB@
+ECHO = @ECHO@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
+FREETYPE_LIBS = @FREETYPE_LIBS@
+FREETYPE_PROVIDER = @FREETYPE_PROVIDER@
+FUSION_BUILD_KERNEL = @FUSION_BUILD_KERNEL@
+FUSION_BUILD_MULTI = @FUSION_BUILD_MULTI@
+FUSION_MESSAGE_SIZE = @FUSION_MESSAGE_SIZE@
+GIF_PROVIDER = @GIF_PROVIDER@
+GREP = @GREP@
+HAVE_LINUX = @HAVE_LINUX@
+INCLUDEDIR = @INCLUDEDIR@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTERNALINCLUDEDIR = @INTERNALINCLUDEDIR@
+JPEG_PROVIDER = @JPEG_PROVIDER@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBJPEG = @LIBJPEG@
+LIBOBJS = @LIBOBJS@
+LIBPNG = @LIBPNG@
+LIBPNG_CONFIG = @LIBPNG_CONFIG@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_AGE = @LT_AGE@
+LT_BINARY = @LT_BINARY@
+LT_CURRENT = @LT_CURRENT@
+LT_RELEASE = @LT_RELEASE@
+LT_REVISION = @LT_REVISION@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MAN2HTML = @MAN2HTML@
+MKDIR_P = @MKDIR_P@
+MODULEDIR = @MODULEDIR@
+MODULEDIRNAME = @MODULEDIRNAME@
+NMEDIT = @NMEDIT@
+OBJEXT = @OBJEXT@
+OSX_LIBS = @OSX_LIBS@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+PKG_CONFIG = @PKG_CONFIG@
+PNG_PROVIDER = @PNG_PROVIDER@
+RANLIB = @RANLIB@
+RUNTIME_SYSROOT = @RUNTIME_SYSROOT@
+SDL_CFLAGS = @SDL_CFLAGS@
+SDL_LIBS = @SDL_LIBS@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SOPATH = @SOPATH@
+STRIP = @STRIP@
+SYSCONFDIR = @SYSCONFDIR@
+SYSFS_LIBS = @SYSFS_LIBS@
+THREADFLAGS = @THREADFLAGS@
+THREADLIB = @THREADLIB@
+TSLIB_CFLAGS = @TSLIB_CFLAGS@
+TSLIB_LIBS = @TSLIB_LIBS@
+VERSION = @VERSION@
+VNC_CFLAGS = @VNC_CFLAGS@
+VNC_CONFIG = @VNC_CONFIG@
+VNC_LIBS = @VNC_LIBS@
+X11_CFLAGS = @X11_CFLAGS@
+X11_LIBS = @X11_LIBS@
+ZLIB_LIBS = @ZLIB_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+INCLUDES = \
+ -I$(top_builddir)/lib \
+ -I$(top_builddir)/include \
+ -I$(top_srcdir)/include \
+ -I$(top_srcdir)/lib \
+ -I$(top_srcdir)/src
+
+internalincludedir = $(INTERNALINCLUDEDIR)/windows
+internalinclude_HEADERS = \
+ idirectfbwindow.h
+
+noinst_LTLIBRARIES = libdirectfb_windows.la
+libdirectfb_windows_la_SOURCES = \
+ idirectfbwindow.c
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/windows/Makefile'; \
+ cd $(top_srcdir) && \
+ $(AUTOMAKE) --gnu src/windows/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
+
+clean-noinstLTLIBRARIES:
+ -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+ @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+libdirectfb_windows.la: $(libdirectfb_windows_la_OBJECTS) $(libdirectfb_windows_la_DEPENDENCIES)
+ $(LINK) $(libdirectfb_windows_la_OBJECTS) $(libdirectfb_windows_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idirectfbwindow.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-internalincludeHEADERS: $(internalinclude_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(internalincludedir)" || $(MKDIR_P) "$(DESTDIR)$(internalincludedir)"
+ @list='$(internalinclude_HEADERS)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f=$(am__strip_dir) \
+ echo " $(internalincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(internalincludedir)/$$f'"; \
+ $(internalincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(internalincludedir)/$$f"; \
+ done
+
+uninstall-internalincludeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(internalinclude_HEADERS)'; for p in $$list; do \
+ f=$(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(internalincludedir)/$$f'"; \
+ rm -f "$(DESTDIR)$(internalincludedir)/$$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) $(HEADERS)
+installdirs:
+ for dir in "$(DESTDIR)$(internalincludedir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+ 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-internalincludeHEADERS
+
+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-internalincludeHEADERS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am \
+ install-internalincludeHEADERS 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-internalincludeHEADERS
+
+# 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/src/windows/idirectfbwindow.c b/Source/DirectFB/src/windows/idirectfbwindow.c
new file mode 100755
index 0000000..d3fb281
--- /dev/null
+++ b/Source/DirectFB/src/windows/idirectfbwindow.c
@@ -0,0 +1,1446 @@
+/*
+ (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 <dok@directfb.org>,
+ Andreas Hundt <andi@fischlustig.de>,
+ Sven Neumann <neo@directfb.org>,
+ Ville Syrjälä <syrjala@sci.fi> and
+ Claudio Ciccani <klan@users.sf.net>.
+
+ 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 <config.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+
+#include <sched.h>
+
+#include <sys/time.h>
+#include <errno.h>
+
+#include <pthread.h>
+
+#include <directfb.h>
+
+#include <idirectfb.h>
+
+#include <core/core.h>
+#include <core/coredefs.h>
+#include <core/coretypes.h>
+
+#include <core/layers.h>
+#include <core/palette.h>
+#include <core/state.h>
+#include <core/surface.h>
+#include <core/windows.h>
+#include <core/wm.h>
+#include <core/windowstack.h>
+#include <core/windows_internal.h> /* FIXME */
+
+#include <display/idirectfbsurface.h>
+#include <display/idirectfbsurface_window.h>
+
+#include <input/idirectfbinputbuffer.h>
+
+#include <misc/util.h>
+#include <direct/interface.h>
+#include <direct/mem.h>
+
+#include <gfx/convert.h>
+
+#include <windows/idirectfbwindow.h>
+
+
+D_DEBUG_DOMAIN( IDirectFB_Window, "IDirectFBWindow", "DirectFB Window Interface" );
+
+
+/*
+ * adds an window event to the event queue
+ */
+static ReactionResult IDirectFBWindow_React( const void *msg_data,
+ void *ctx );
+
+
+
+typedef struct {
+ int ref;
+ CoreWindow *window;
+ CoreLayer *layer;
+
+ IDirectFBSurface *surface;
+
+ Reaction reaction;
+
+ bool detached;
+ bool destroyed;
+
+ CoreDFB *core;
+} IDirectFBWindow_data;
+
+
+static void
+IDirectFBWindow_Destruct( IDirectFBWindow *thiz )
+{
+ IDirectFBWindow_data *data = (IDirectFBWindow_data*)thiz->priv;
+
+ D_DEBUG_AT( IDirectFB_Window, "IDirectFBWindow_Destruct()\n" );
+
+ if (!data->detached) {
+ D_DEBUG_AT( IDirectFB_Window, " -> detaching...\n" );
+
+ dfb_window_detach( data->window, &data->reaction );
+ }
+
+ /* this will destroy the fusion object and (eventually) the window */
+ D_DEBUG_AT( IDirectFB_Window, " -> unrefing...\n" );
+
+ dfb_window_unref( data->window );
+
+ D_DEBUG_AT( IDirectFB_Window, " -> releasing surface...\n" );
+
+ if (data->surface)
+ data->surface->Release( data->surface );
+
+ D_DEBUG_AT( IDirectFB_Window, " -> done.\n" );
+
+ DIRECT_DEALLOCATE_INTERFACE( thiz );
+}
+
+static DirectResult
+IDirectFBWindow_AddRef( IDirectFBWindow *thiz )
+{
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ data->ref++;
+
+ return DFB_OK;
+}
+
+static DirectResult
+IDirectFBWindow_Release( IDirectFBWindow *thiz )
+{
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (--data->ref == 0)
+ IDirectFBWindow_Destruct( thiz );
+
+ return DFB_OK;
+}
+
+static DFBResult
+IDirectFBWindow_CreateEventBuffer( IDirectFBWindow *thiz,
+ IDirectFBEventBuffer **buffer )
+{
+ IDirectFBEventBuffer *b;
+
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ DIRECT_ALLOCATE_INTERFACE( b, IDirectFBEventBuffer );
+
+ IDirectFBEventBuffer_Construct( b, NULL, NULL );
+
+ IDirectFBEventBuffer_AttachWindow( b, data->window );
+
+ dfb_window_send_configuration( data->window );
+
+ *buffer = b;
+
+ return DFB_OK;
+}
+
+static DFBResult
+IDirectFBWindow_AttachEventBuffer( IDirectFBWindow *thiz,
+ IDirectFBEventBuffer *buffer )
+{
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ IDirectFBEventBuffer_AttachWindow( buffer, data->window );
+
+ dfb_window_send_configuration( data->window );
+
+ return DFB_OK;
+}
+
+static DFBResult
+IDirectFBWindow_DetachEventBuffer( IDirectFBWindow *thiz,
+ IDirectFBEventBuffer *buffer )
+{
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ return IDirectFBEventBuffer_DetachWindow( buffer, data->window );
+}
+
+static DFBResult
+IDirectFBWindow_EnableEvents( IDirectFBWindow *thiz,
+ DFBWindowEventType mask )
+{
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ if (mask & ~DWET_ALL)
+ return DFB_INVARG;
+
+ return dfb_window_change_events( data->window, DWET_NONE, mask );
+}
+
+static DFBResult
+IDirectFBWindow_DisableEvents( IDirectFBWindow *thiz,
+ DFBWindowEventType mask )
+{
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ if (mask & ~DWET_ALL)
+ return DFB_INVARG;
+
+ return dfb_window_change_events( data->window, mask, DWET_NONE );
+}
+
+static DFBResult
+IDirectFBWindow_GetID( IDirectFBWindow *thiz,
+ DFBWindowID *id )
+{
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ if (!id)
+ return DFB_INVARG;
+
+ *id = data->window->id;
+
+ return DFB_OK;
+}
+
+static DFBResult
+IDirectFBWindow_GetPosition( IDirectFBWindow *thiz,
+ int *x,
+ int *y )
+{
+ DFBInsets insets;
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ if (!x && !y)
+ return DFB_INVARG;
+
+ dfb_windowstack_lock( data->window->stack );
+ dfb_wm_get_insets( data->window->stack, data->window, &insets );
+ dfb_windowstack_unlock( data->window->stack );
+
+ if (x)
+ *x = data->window->config.bounds.x-insets.l;
+
+ if (y)
+ *y = data->window->config.bounds.y-insets.t;
+
+ return DFB_OK;
+}
+
+static DFBResult
+IDirectFBWindow_GetSize( IDirectFBWindow *thiz,
+ int *width,
+ int *height )
+{
+ DFBInsets insets;
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ if (!width && !height)
+ return DFB_INVARG;
+
+ dfb_windowstack_lock( data->window->stack );
+ dfb_wm_get_insets( data->window->stack, data->window, &insets );
+ dfb_windowstack_unlock( data->window->stack );
+
+ if (width)
+ *width = data->window->config.bounds.w-insets.l-insets.r;
+
+ if (height)
+ *height = data->window->config.bounds.h-insets.t-insets.b;
+
+ return DFB_OK;
+}
+
+static DFBResult
+IDirectFBWindow_GetSurface( IDirectFBWindow *thiz,
+ IDirectFBSurface **surface )
+{
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ if (!surface)
+ return DFB_INVARG;
+
+ if (data->window->caps & (DWCAPS_INPUTONLY | DWCAPS_COLOR))
+ return DFB_UNSUPPORTED;
+
+ if (!data->surface) {
+ DFBResult ret;
+
+ DIRECT_ALLOCATE_INTERFACE( *surface, IDirectFBSurface );
+
+ ret = IDirectFBSurface_Window_Construct( *surface, NULL,
+ NULL, NULL, data->window,
+ DSCAPS_DOUBLE, data->core );
+ if (ret)
+ return ret;
+
+ data->surface = *surface;
+ }
+ else
+ *surface = data->surface;
+
+ data->surface->AddRef( data->surface );
+
+ return DFB_OK;
+}
+
+static DFBResult
+IDirectFBWindow_SetProperty( IDirectFBWindow *thiz,
+ const char *key,
+ void *value,
+ void **old_value )
+{
+ DFBResult ret;
+
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ /* Check arguments */
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ if (!key)
+ return DFB_INVARG;
+
+ dfb_windowstack_lock( data->window->stack );
+ ret = dfb_wm_set_window_property( data->window->stack, data->window, key, value, old_value );
+ dfb_windowstack_unlock( data->window->stack );
+
+ return ret;
+}
+
+static DFBResult
+IDirectFBWindow_GetProperty( IDirectFBWindow *thiz,
+ const char *key,
+ void **ret_value )
+{
+ DFBResult ret;
+
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ if (!key)
+ return DFB_INVARG;
+
+ if (!ret_value)
+ return DFB_INVARG;
+
+ dfb_windowstack_lock( data->window->stack );
+ ret = dfb_wm_get_window_property( data->window->stack, data->window, key, ret_value );
+ dfb_windowstack_unlock( data->window->stack );
+
+ return ret;
+}
+
+static DFBResult
+IDirectFBWindow_RemoveProperty( IDirectFBWindow *thiz,
+ const char *key,
+ void **ret_value )
+{
+ DFBResult ret;
+
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ if (!key)
+ return DFB_INVARG;
+
+ dfb_windowstack_lock( data->window->stack );
+ ret = dfb_wm_remove_window_property( data->window->stack, data->window, key, ret_value );
+ dfb_windowstack_unlock( data->window->stack );
+
+ return ret;
+}
+
+static DFBResult
+IDirectFBWindow_SetOptions( IDirectFBWindow *thiz,
+ DFBWindowOptions options )
+{
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ /* Check arguments */
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ if (options & ~DWOP_ALL)
+ return DFB_INVARG;
+
+ if (!(data->window->caps & DWCAPS_ALPHACHANNEL))
+ options &= ~DWOP_ALPHACHANNEL;
+
+ /* Set new options */
+ return dfb_window_change_options( data->window, DWOP_ALL, options );
+}
+
+static DFBResult
+IDirectFBWindow_GetOptions( IDirectFBWindow *thiz,
+ DFBWindowOptions *ret_options )
+{
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ if (!ret_options)
+ return DFB_INVARG;
+
+ *ret_options = data->window->config.options;
+
+ return DFB_OK;
+}
+
+static DFBResult
+IDirectFBWindow_SetColor( IDirectFBWindow *thiz,
+ u8 r,
+ u8 g,
+ u8 b,
+ u8 a )
+{
+ DFBColor color = { a: a, r: r, g: g, b: b };
+
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ if (!(data->window->caps & DWCAPS_COLOR))
+ return DFB_UNSUPPORTED;
+
+ dfb_window_set_color( data->window, color );
+
+ return DFB_OK;
+}
+
+static DFBResult
+IDirectFBWindow_SetColorKey( IDirectFBWindow *thiz,
+ u8 r,
+ u8 g,
+ u8 b )
+{
+ u32 key;
+ CoreSurface *surface;
+
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ if (data->window->caps & DWCAPS_INPUTONLY)
+ return DFB_UNSUPPORTED;
+
+ surface = data->window->surface;
+
+ if (DFB_PIXELFORMAT_IS_INDEXED( surface->config.format ))
+ key = dfb_palette_search( surface->palette, r, g, b, 0x80 );
+ else
+ key = dfb_color_to_pixel( surface->config.format, r, g, b );
+
+ return dfb_window_set_colorkey( data->window, key );
+}
+
+static DFBResult
+IDirectFBWindow_SetColorKeyIndex( IDirectFBWindow *thiz,
+ unsigned int index )
+{
+ u32 key = index;
+
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ if (data->window->caps & DWCAPS_INPUTONLY)
+ return DFB_UNSUPPORTED;
+
+ return dfb_window_set_colorkey( data->window, key );
+}
+
+static DFBResult
+IDirectFBWindow_SetOpaqueRegion( IDirectFBWindow *thiz,
+ int x1,
+ int y1,
+ int x2,
+ int y2 )
+{
+ DFBRegion region;
+
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ if (x1 > x2 || y1 > y2)
+ return DFB_INVAREA;
+
+ region = (DFBRegion) { x1, y1, x2, y2 };
+
+ return dfb_window_set_opaque( data->window, &region );
+}
+
+static DFBResult
+IDirectFBWindow_SetOpacity( IDirectFBWindow *thiz,
+ u8 opacity )
+{
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ return dfb_window_set_opacity( data->window, opacity );
+}
+
+static DFBResult
+IDirectFBWindow_GetOpacity( IDirectFBWindow *thiz,
+ u8 *opacity )
+{
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ if (!opacity)
+ return DFB_INVARG;
+
+ *opacity = data->window->config.opacity;
+
+ return DFB_OK;
+}
+
+static DFBResult
+IDirectFBWindow_SetCursorShape( IDirectFBWindow *thiz,
+ IDirectFBSurface *shape,
+ int hot_x,
+ int hot_y )
+{
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ if (shape) {
+ IDirectFBSurface_data *shape_data;
+ CoreSurface *shape_surface;
+
+ shape_data = (IDirectFBSurface_data*) shape->priv;
+ if (!shape_data)
+ return DFB_DEAD;
+
+ shape_surface = shape_data->surface;
+ if (!shape_surface)
+ return DFB_DESTROYED;
+
+ return dfb_window_set_cursor_shape( data->window, shape_surface, hot_x, hot_y );
+ }
+
+ return dfb_window_set_cursor_shape( data->window, NULL, 0, 0 );
+}
+
+static DFBResult
+IDirectFBWindow_RequestFocus( IDirectFBWindow *thiz )
+{
+ CoreWindow *window;
+
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ window = data->window;
+
+ if (window->config.options & DWOP_GHOST)
+ return DFB_UNSUPPORTED;
+
+ if (!window->config.opacity && !(window->caps & DWCAPS_INPUTONLY))
+ return DFB_UNSUPPORTED;
+
+ return dfb_window_request_focus( window );
+}
+
+static DFBResult
+IDirectFBWindow_GrabKeyboard( IDirectFBWindow *thiz )
+{
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ return dfb_window_change_grab( data->window, CWMGT_KEYBOARD, true );
+}
+
+static DFBResult
+IDirectFBWindow_UngrabKeyboard( IDirectFBWindow *thiz )
+{
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ return dfb_window_change_grab( data->window, CWMGT_KEYBOARD, false );
+}
+
+static DFBResult
+IDirectFBWindow_GrabPointer( IDirectFBWindow *thiz )
+{
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ return dfb_window_change_grab( data->window, CWMGT_POINTER, true );
+}
+
+static DFBResult
+IDirectFBWindow_UngrabPointer( IDirectFBWindow *thiz )
+{
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ return dfb_window_change_grab( data->window, CWMGT_POINTER, false );
+}
+
+static DFBResult
+IDirectFBWindow_GrabKey( IDirectFBWindow *thiz,
+ DFBInputDeviceKeySymbol symbol,
+ DFBInputDeviceModifierMask modifiers )
+{
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ return dfb_window_grab_key( data->window, symbol, modifiers );
+}
+
+static DFBResult
+IDirectFBWindow_UngrabKey( IDirectFBWindow *thiz,
+ DFBInputDeviceKeySymbol symbol,
+ DFBInputDeviceModifierMask modifiers )
+{
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ return dfb_window_ungrab_key( data->window, symbol, modifiers );
+}
+
+static DFBResult
+IDirectFBWindow_Move( IDirectFBWindow *thiz, int dx, int dy )
+{
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ if (dx == 0 && dy == 0)
+ return DFB_OK;
+
+ return dfb_window_move( data->window, dx, dy, true );
+}
+
+static DFBResult
+IDirectFBWindow_MoveTo( IDirectFBWindow *thiz, int x, int y )
+{
+ DFBResult ret;
+ DFBInsets insets;
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ dfb_windowstack_lock( data->window->stack );
+
+ dfb_wm_get_insets( data->window->stack, data->window, &insets );
+ x += insets.l;
+ y += insets.t;
+
+ ret = dfb_window_move( data->window, x, y, false );
+
+ dfb_windowstack_unlock( data->window->stack );
+
+ return ret;
+}
+
+static DFBResult
+IDirectFBWindow_Resize( IDirectFBWindow *thiz,
+ int width,
+ int height )
+{
+ DFBResult ret;
+ DFBInsets insets;
+
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ if (width < 1 || width > 4096 || height < 1 || height > 4096)
+ return DFB_INVARG;
+
+ dfb_windowstack_lock( data->window->stack );
+
+ dfb_wm_get_insets( data->window->stack, data->window, &insets );
+ width += insets.l+insets.r;
+ height += insets.t+insets.b;
+
+ ret = dfb_window_resize( data->window, width, height );
+
+ dfb_windowstack_unlock( data->window->stack );
+
+ return ret;
+}
+
+static DFBResult
+IDirectFBWindow_Raise( IDirectFBWindow *thiz )
+{
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ return dfb_window_raise( data->window );
+}
+
+static DFBResult
+IDirectFBWindow_SetStackingClass( IDirectFBWindow *thiz,
+ DFBWindowStackingClass stacking_class )
+{
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ switch (stacking_class) {
+ case DWSC_MIDDLE:
+ case DWSC_UPPER:
+ case DWSC_LOWER:
+ break;
+ default:
+ return DFB_INVARG;
+ }
+
+ return dfb_window_change_stacking( data->window, stacking_class );
+}
+
+static DFBResult
+IDirectFBWindow_Lower( IDirectFBWindow *thiz )
+{
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ return dfb_window_lower( data->window );
+}
+
+static DFBResult
+IDirectFBWindow_RaiseToTop( IDirectFBWindow *thiz )
+{
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ return dfb_window_raisetotop( data->window );
+}
+
+static DFBResult
+IDirectFBWindow_LowerToBottom( IDirectFBWindow *thiz )
+{
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ return dfb_window_lowertobottom( data->window );
+}
+
+static DFBResult
+IDirectFBWindow_PutAtop( IDirectFBWindow *thiz,
+ IDirectFBWindow *lower )
+{
+ IDirectFBWindow_data *lower_data;
+
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ if (!lower)
+ return DFB_INVARG;
+
+ lower_data = (IDirectFBWindow_data*) lower->priv;
+ if (!lower_data)
+ return DFB_DEAD;
+
+ if (!lower_data->window)
+ return DFB_DESTROYED;
+
+ return dfb_window_putatop( data->window, lower_data->window );
+}
+
+static DFBResult
+IDirectFBWindow_PutBelow( IDirectFBWindow *thiz,
+ IDirectFBWindow *upper )
+{
+ IDirectFBWindow_data *upper_data;
+
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ if (!upper)
+ return DFB_INVARG;
+
+ upper_data = (IDirectFBWindow_data*) upper->priv;
+ if (!upper_data)
+ return DFB_DEAD;
+
+ if (!upper_data->window)
+ return DFB_DESTROYED;
+
+ return dfb_window_putbelow( data->window, upper_data->window );
+}
+
+static DFBResult
+IDirectFBWindow_Close( IDirectFBWindow *thiz )
+{
+ DFBWindowEvent evt;
+
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ evt.type = DWET_CLOSE;
+
+ dfb_window_post_event( data->window, &evt );
+
+ return DFB_OK;
+}
+
+static DFBResult
+IDirectFBWindow_Destroy( IDirectFBWindow *thiz )
+{
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ D_DEBUG_AT( IDirectFB_Window, "IDirectFBWindow_Destroy()\n" );
+
+ dfb_window_destroy( data->window );
+
+ return DFB_OK;
+}
+
+static DFBResult
+IDirectFBWindow_SetBounds( IDirectFBWindow *thiz,
+ int x,
+ int y,
+ int width,
+ int height )
+{
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ D_DEBUG_AT( IDirectFB_Window, "IDirectFBWindow_SetBounds( %d, %d - %dx%d )\n", x, y, width, height );
+
+ return dfb_window_set_bounds( data->window, x, y, width, height );
+}
+
+static DFBResult
+IDirectFBWindow_ResizeSurface( IDirectFBWindow *thiz,
+ int width,
+ int height )
+{
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ if (width < 1 || width > 4096 || height < 1 || height > 4096)
+ return DFB_INVARG;
+
+ return dfb_surface_reformat( data->window->surface, width, height, data->window->surface->config.format );
+}
+
+static DFBResult
+IDirectFBWindow_SetKeySelection( IDirectFBWindow *thiz,
+ DFBWindowKeySelection selection,
+ const DFBInputDeviceKeySymbol *keys,
+ unsigned int num_keys )
+{
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ /* What a lovely switch */
+ switch (selection) {
+ case DWKS_ALL:
+ case DWKS_NONE:
+ break;
+ case DWKS_LIST:
+ if (!keys || num_keys == 0)
+ default:
+ return DFB_INVARG;
+ }
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ return dfb_window_set_key_selection( data->window, selection, keys, num_keys );
+}
+
+static DFBResult
+IDirectFBWindow_GrabUnselectedKeys( IDirectFBWindow *thiz )
+{
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ return dfb_window_change_grab( data->window, CWMGT_UNSELECTED_KEYS, true );
+}
+
+static DFBResult
+IDirectFBWindow_UngrabUnselectedKeys( IDirectFBWindow *thiz )
+{
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ return dfb_window_change_grab( data->window, CWMGT_UNSELECTED_KEYS, false );
+}
+
+static DFBResult
+IDirectFBWindow_Bind( IDirectFBWindow *thiz,
+ IDirectFBWindow *source,
+ int x,
+ int y )
+{
+ IDirectFBWindow_data *source_data;
+
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ DIRECT_INTERFACE_GET_DATA_FROM(source, source_data, IDirectFBWindow);
+
+ if (source_data->destroyed)
+ return DFB_DESTROYED;
+
+ return dfb_window_bind( data->window, source_data->window, x, y );
+}
+
+static DFBResult
+IDirectFBWindow_Unbind( IDirectFBWindow *thiz,
+ IDirectFBWindow *source )
+{
+ IDirectFBWindow_data *source_data;
+
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ DIRECT_INTERFACE_GET_DATA_FROM(source, source_data, IDirectFBWindow);
+
+ if (source_data->destroyed)
+ return DFB_DESTROYED;
+
+ return dfb_window_unbind( data->window, source_data->window );
+}
+
+static DFBResult
+CheckGeometry( const DFBWindowGeometry *geometry )
+{
+ if (!geometry)
+ return DFB_INVARG;
+
+ switch (geometry->mode) {
+ case DWGM_DEFAULT:
+ case DWGM_FOLLOW:
+ break;
+
+ case DWGM_RECTANGLE:
+ if (geometry->rectangle.x < 0 ||
+ geometry->rectangle.y < 0 ||
+ geometry->rectangle.w < 1 ||
+ geometry->rectangle.h < 1)
+ return DFB_INVARG;
+ break;
+
+ case DWGM_LOCATION:
+ if (geometry->location.x < 0.0f ||
+ geometry->location.y < 0.0f ||
+ geometry->location.w > 1.0f ||
+ geometry->location.h > 1.0f ||
+ geometry->location.w <= 0.0f ||
+ geometry->location.h <= 0.0f ||
+ geometry->location.x + geometry->location.w > 1.0f ||
+ geometry->location.y + geometry->location.h > 1.0f)
+ return DFB_INVARG;
+ break;
+
+ default:
+ return DFB_INVARG;
+ }
+
+ return DFB_OK;
+}
+
+static DFBResult
+IDirectFBWindow_SetSrcGeometry( IDirectFBWindow *thiz,
+ const DFBWindowGeometry *geometry )
+{
+ DFBResult ret;
+ CoreWindowConfig config;
+
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ ret = CheckGeometry( geometry );
+ if (ret)
+ return ret;
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ config.src_geometry = *geometry;
+
+ return dfb_window_set_config( data->window, &config, CWCF_SRC_GEOMETRY );
+}
+
+static DFBResult
+IDirectFBWindow_SetDstGeometry( IDirectFBWindow *thiz,
+ const DFBWindowGeometry *geometry )
+{
+ DFBResult ret;
+ CoreWindowConfig config;
+
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ ret = CheckGeometry( geometry );
+ if (ret)
+ return ret;
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ config.dst_geometry = *geometry;
+
+ return dfb_window_set_config( data->window, &config, CWCF_DST_GEOMETRY );
+}
+
+static DFBResult
+IDirectFBWindow_SetRotation(IDirectFBWindow *thiz,
+ int rotation)
+{
+
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ return dfb_window_set_rotation( data->window, rotation % 360 );
+}
+
+static DFBResult
+IDirectFBWindow_SetAssociation( IDirectFBWindow *thiz,
+ DFBWindowID window_id )
+{
+ CoreWindowConfig config;
+
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ config.association = window_id;
+
+ return dfb_window_set_config( data->window, &config, CWCF_ASSOCIATION );
+}
+
+static DFBResult
+IDirectFBWindow_BeginUpdates( IDirectFBWindow *thiz,
+ const DFBRegion *update )
+{
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ dfb_windowstack_lock( data->window->stack );
+
+ dfb_wm_begin_updates( data->window, update );
+
+ dfb_windowstack_unlock( data->window->stack );
+
+ return DFB_OK;
+}
+
+static DFBResult
+IDirectFBWindow_SendEvent( IDirectFBWindow *thiz,
+ const DFBWindowEvent *event )
+{
+ DFBWindowEvent evt;
+
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s\n", __FUNCTION__ );
+
+ if (!event)
+ return DFB_INVARG;
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ evt = *event;
+
+ dfb_window_post_event( data->window, &evt );
+
+ return DFB_OK;
+}
+
+static DFBResult
+IDirectFBWindow_SetCursorFlags( IDirectFBWindow *thiz,
+ DFBWindowCursorFlags flags )
+{
+ CoreWindowConfig config;
+
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s( 0x%04x )\n", __FUNCTION__, flags );
+
+ if (flags & ~DWCF_ALL)
+ return DFB_INVARG;
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ config.cursor_flags = flags;
+
+ return dfb_window_set_config( data->window, &config, CWCF_CURSOR_FLAGS );
+}
+
+static DFBResult
+IDirectFBWindow_SetCursorResolution( IDirectFBWindow *thiz,
+ const DFBDimension *resolution )
+{
+ CoreWindowConfig config;
+
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ if (resolution)
+ D_DEBUG_AT( IDirectFB_Window, "%s( %dx%d )\n", __FUNCTION__, resolution->w, resolution->h );
+ else
+ D_DEBUG_AT( IDirectFB_Window, "%s( NULL )\n", __FUNCTION__ );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ if (resolution)
+ config.cursor_resolution = *resolution;
+ else {
+ config.cursor_resolution.w = 0;
+ config.cursor_resolution.h = 0;
+ }
+
+ return dfb_window_set_config( data->window, &config, CWCF_CURSOR_RESOLUTION );
+}
+
+static DFBResult
+IDirectFBWindow_SetCursorPosition( IDirectFBWindow *thiz,
+ int x,
+ int y )
+{
+ DIRECT_INTERFACE_GET_DATA(IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "%s( %d,%d )\n", __FUNCTION__, x, y );
+
+ if (data->destroyed)
+ return DFB_DESTROYED;
+
+ dfb_windowstack_lock( data->window->stack );
+
+ dfb_wm_set_cursor_position( data->window, x, y );
+
+ dfb_windowstack_unlock( data->window->stack );
+
+ return DFB_OK;
+}
+
+DFBResult
+IDirectFBWindow_Construct( IDirectFBWindow *thiz,
+ CoreWindow *window,
+ CoreLayer *layer,
+ CoreDFB *core )
+{
+ DIRECT_ALLOCATE_INTERFACE_DATA(thiz, IDirectFBWindow)
+
+ D_DEBUG_AT( IDirectFB_Window, "IDirectFBWindow_Construct() <- %d, %d - %dx%d\n",
+ DFB_RECTANGLE_VALS( &window->config.bounds ) );
+
+ data->ref = 1;
+ data->window = window;
+ data->layer = layer;
+ data->core = core;
+
+ dfb_window_attach( window, IDirectFBWindow_React, data, &data->reaction );
+
+ thiz->AddRef = IDirectFBWindow_AddRef;
+ thiz->Release = IDirectFBWindow_Release;
+ thiz->CreateEventBuffer = IDirectFBWindow_CreateEventBuffer;
+ thiz->AttachEventBuffer = IDirectFBWindow_AttachEventBuffer;
+ thiz->DetachEventBuffer = IDirectFBWindow_DetachEventBuffer;
+ thiz->EnableEvents = IDirectFBWindow_EnableEvents;
+ thiz->DisableEvents = IDirectFBWindow_DisableEvents;
+ thiz->GetID = IDirectFBWindow_GetID;
+ thiz->GetPosition = IDirectFBWindow_GetPosition;
+ thiz->GetSize = IDirectFBWindow_GetSize;
+ thiz->GetSurface = IDirectFBWindow_GetSurface;
+ thiz->SetProperty = IDirectFBWindow_SetProperty;
+ thiz->GetProperty = IDirectFBWindow_GetProperty;
+ thiz->RemoveProperty = IDirectFBWindow_RemoveProperty;
+ thiz->SetOptions = IDirectFBWindow_SetOptions;
+ thiz->GetOptions = IDirectFBWindow_GetOptions;
+ thiz->SetColor = IDirectFBWindow_SetColor;
+ thiz->SetColorKey = IDirectFBWindow_SetColorKey;
+ thiz->SetColorKeyIndex = IDirectFBWindow_SetColorKeyIndex;
+ thiz->SetOpaqueRegion = IDirectFBWindow_SetOpaqueRegion;
+ thiz->SetOpacity = IDirectFBWindow_SetOpacity;
+ thiz->GetOpacity = IDirectFBWindow_GetOpacity;
+ thiz->SetCursorShape = IDirectFBWindow_SetCursorShape;
+ thiz->RequestFocus = IDirectFBWindow_RequestFocus;
+ thiz->GrabKeyboard = IDirectFBWindow_GrabKeyboard;
+ thiz->UngrabKeyboard = IDirectFBWindow_UngrabKeyboard;
+ thiz->GrabPointer = IDirectFBWindow_GrabPointer;
+ thiz->UngrabPointer = IDirectFBWindow_UngrabPointer;
+ thiz->GrabKey = IDirectFBWindow_GrabKey;
+ thiz->UngrabKey = IDirectFBWindow_UngrabKey;
+ thiz->Move = IDirectFBWindow_Move;
+ thiz->MoveTo = IDirectFBWindow_MoveTo;
+ thiz->Resize = IDirectFBWindow_Resize;
+ thiz->SetStackingClass = IDirectFBWindow_SetStackingClass;
+ thiz->Raise = IDirectFBWindow_Raise;
+ thiz->Lower = IDirectFBWindow_Lower;
+ thiz->RaiseToTop = IDirectFBWindow_RaiseToTop;
+ thiz->LowerToBottom = IDirectFBWindow_LowerToBottom;
+ thiz->PutAtop = IDirectFBWindow_PutAtop;
+ thiz->PutBelow = IDirectFBWindow_PutBelow;
+ thiz->Close = IDirectFBWindow_Close;
+ thiz->Destroy = IDirectFBWindow_Destroy;
+ thiz->SetBounds = IDirectFBWindow_SetBounds;
+ thiz->ResizeSurface = IDirectFBWindow_ResizeSurface;
+ thiz->Bind = IDirectFBWindow_Bind;
+ thiz->Unbind = IDirectFBWindow_Unbind;
+ thiz->SetKeySelection = IDirectFBWindow_SetKeySelection;
+ thiz->GrabUnselectedKeys = IDirectFBWindow_GrabUnselectedKeys;
+ thiz->UngrabUnselectedKeys = IDirectFBWindow_UngrabUnselectedKeys;
+ thiz->SetSrcGeometry = IDirectFBWindow_SetSrcGeometry;
+ thiz->SetDstGeometry = IDirectFBWindow_SetDstGeometry;
+ thiz->SetRotation = IDirectFBWindow_SetRotation;
+ thiz->SetAssociation = IDirectFBWindow_SetAssociation;
+ thiz->BeginUpdates = IDirectFBWindow_BeginUpdates;
+ thiz->SendEvent = IDirectFBWindow_SendEvent;
+ thiz->SetCursorFlags = IDirectFBWindow_SetCursorFlags;
+ thiz->SetCursorResolution = IDirectFBWindow_SetCursorResolution;
+ thiz->SetCursorPosition = IDirectFBWindow_SetCursorPosition;
+
+ return DFB_OK;
+}
+
+
+/* internals */
+
+static ReactionResult
+IDirectFBWindow_React( const void *msg_data,
+ void *ctx )
+{
+ const DFBWindowEvent *evt = msg_data;
+ IDirectFBWindow_data *data = ctx;
+
+ D_DEBUG_AT( IDirectFB_Window, "%s()\n", __FUNCTION__ );
+
+ switch (evt->type) {
+ case DWET_DESTROYED:
+ D_DEBUG_AT( IDirectFB_Window, " -> window destroyed\n" );
+
+ data->detached = true;
+ data->destroyed = true;
+
+ return RS_REMOVE;
+
+ case DWET_GOTFOCUS:
+ case DWET_LOSTFOCUS:
+ IDirectFB_SetAppFocus( idirectfb_singleton,
+ evt->type == DWET_GOTFOCUS );
+
+ default:
+ break;
+ }
+
+ return RS_OK;
+}
+
diff --git a/Source/DirectFB/src/windows/idirectfbwindow.h b/Source/DirectFB/src/windows/idirectfbwindow.h
new file mode 100755
index 0000000..29c9e6a
--- /dev/null
+++ b/Source/DirectFB/src/windows/idirectfbwindow.h
@@ -0,0 +1,44 @@
+/*
+ (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 <dok@directfb.org>,
+ Andreas Hundt <andi@fischlustig.de>,
+ Sven Neumann <neo@directfb.org>,
+ Ville Syrjälä <syrjala@sci.fi> and
+ Claudio Ciccani <klan@users.sf.net>.
+
+ 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_H__
+#define __IDIRECTFBWINDOW_H__
+
+#include <directfb.h>
+
+#include <core/coretypes.h>
+
+/*
+ * initializes a new window and constructs interface
+ */
+DFBResult IDirectFBWindow_Construct( IDirectFBWindow *thiz,
+ CoreWindow *window,
+ CoreLayer *layer,
+ CoreDFB *core );
+
+#endif