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/SaWMan/include/Makefile.am | 7 + Source/SaWMan/include/Makefile.in | 419 ++++++++++++++++++++++++++++ Source/SaWMan/include/sawman.h | 519 +++++++++++++++++++++++++++++++++++ Source/SaWMan/include/sawman_types.h | 43 +++ 4 files changed, 988 insertions(+) create mode 100755 Source/SaWMan/include/Makefile.am create mode 100755 Source/SaWMan/include/Makefile.in create mode 100755 Source/SaWMan/include/sawman.h create mode 100755 Source/SaWMan/include/sawman_types.h (limited to 'Source/SaWMan/include') diff --git a/Source/SaWMan/include/Makefile.am b/Source/SaWMan/include/Makefile.am new file mode 100755 index 0000000..cc2ce87 --- /dev/null +++ b/Source/SaWMan/include/Makefile.am @@ -0,0 +1,7 @@ +## Makefile.am for DirectFB/include + +includedir = @INCLUDEDIR@ + +include_HEADERS = \ + sawman.h \ + sawman_types.h diff --git a/Source/SaWMan/include/Makefile.in b/Source/SaWMan/include/Makefile.in new file mode 100755 index 0000000..5742b59 --- /dev/null +++ b/Source/SaWMan/include/Makefile.in @@ -0,0 +1,419 @@ +# 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@ +subdir = include +DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(includedir)" +includeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(include_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DATADIR = @DATADIR@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DFB_CFLAGS = @DFB_CFLAGS@ +DFB_LIBS = @DFB_LIBS@ +DSYMUTIL = @DSYMUTIL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +GREP = @GREP@ +INCLUDEDIR = @INCLUDEDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_AGE = @LT_AGE@ +LT_CURRENT = @LT_CURRENT@ +LT_RELEASE = @LT_RELEASE@ +LT_REVISION = @LT_REVISION@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +MODULEDIR = @MODULEDIR@ +NMEDIT = @NMEDIT@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +RANLIB = @RANLIB@ +SAWMAN_BINARY_AGE = @SAWMAN_BINARY_AGE@ +SAWMAN_INTERFACE_AGE = @SAWMAN_INTERFACE_AGE@ +SAWMAN_MAJOR_VERSION = @SAWMAN_MAJOR_VERSION@ +SAWMAN_MICRO_VERSION = @SAWMAN_MICRO_VERSION@ +SAWMAN_MINOR_VERSION = @SAWMAN_MINOR_VERSION@ +SAWMAN_VERSION = @SAWMAN_VERSION@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @INCLUDEDIR@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +include_HEADERS = \ + sawman.h \ + sawman_types.h + +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu include/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +install-includeHEADERS: $(include_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)" + @list='$(include_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ + $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ + done + +uninstall-includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ + rm -f "$(DESTDIR)$(includedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; 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 $(HEADERS) +installdirs: + for dir in "$(DESTDIR)$(includedir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-includeHEADERS + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-includeHEADERS + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool ctags distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am \ + install-includeHEADERS install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags uninstall uninstall-am uninstall-includeHEADERS + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/Source/SaWMan/include/sawman.h b/Source/SaWMan/include/sawman.h new file mode 100755 index 0000000..fa0fbbb --- /dev/null +++ b/Source/SaWMan/include/sawman.h @@ -0,0 +1,519 @@ +/* + (c) Copyright 2006-2007 directfb.org + + All rights reserved. + + Written by Denis Oliver Kropp . + + 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 __SAWMAN_H__ +#define __SAWMAN_H__ + +#ifdef __cplusplus +extern "C" +{ +#endif + +#include +#include +#include +#include + +#include "sawman_types.h" + +/* + * Main SaWMan interface for all executables including start/stop of other applications. + */ +DECLARE_INTERFACE( ISaWMan ) + +/* + * Manager interface to be created only once for the application manager executable. + */ +DECLARE_INTERFACE( ISaWManManager ) + + +DirectResult SaWManInit ( int *argc, + char ***argv ); + +DirectResult SaWManCreate( ISaWMan **ret_sawman ); + +/* + * Public SaWMan types + */ + +typedef enum { + SWMWF_NONE = 0x00000000, + + SWMWF_INSERTED = 0x00000001, + + SWMWF_FOCUSED = 0x00000002, /* only used for GetWindowInfo */ + SWMWF_ENTERED = 0x00000004, /* only used for GetWindowInfo */ + + SWMWF_UPDATING = 0x00000010, + + SWMWF_ALL = 0x00000017 +} SaWManWindowFlags; + + +typedef enum { + SWMSM_SMOOTH_SW, /* Smooth scaling algorithm in software */ + SWMSM_STANDARD /* As provided by hardware, otherwise software (nearest neighbor) */ +} SaWManScalingMode; + + +typedef enum { + SWMPF_NONE = 0x00000000, + + SWMPF_MASTER = 0x00000001, + SWMPF_MANAGER = 0x00000002, + + SWMPF_EXITING = 0x00000010, + + SWMPF_ALL = 0x00000013 +} SaWManProcessFlags; + + +/* defines stacking relation. + * If 2 valid window handles are passed, defines relative order of 1st towards 2nd + * If only 1 handle is valid (2nd is WINDOW_NONE), defines location in complete stack */ +typedef enum { + SWMWR_TOP, + SWMWR_BOTTOM +} SaWManWindowRelation; + + +typedef struct { + DirectLink link; + + int magic; + + pid_t pid; + FusionID fusion_id; + SaWManProcessFlags flags; + + FusionRef ref; +} SaWManProcess; + + +typedef unsigned long SaWManWindowHandle; +#define SAWMAN_WINDOW_NONE ((SaWManWindowHandle) 0) + + +typedef enum { + SWMCF_NONE = 0x00000000, + + SWMCF_POSITION = 0x00000001, + SWMCF_SIZE = 0x00000002, + SWMCF_OPACITY = 0x00000004, + SWMCF_STACKING = 0x00000008, + + SWMCF_OPTIONS = 0x00000010, + SWMCF_EVENTS = 0x00000020, + + SWMCF_COLOR_KEY = 0x00000100, + SWMCF_OPAQUE = 0x00000200, + SWMCF_COLOR = 0x00000400, + + SWMCF_KEY_SELECTION = 0x00001000, + + SWMCF_ASSOCIATION = 0x00002000, + SWMCF_CURSOR_FLAGS = 0x00004000, + SWMCF_CURSOR_RESOLUTION = 0x00008000, + + SWMCF_SRC_GEOMETRY = 0x00010000, + SWMCF_DST_GEOMETRY = 0x00020000, + + SWMCF_ALL = 0x0003F73F +} SaWManWindowConfigFlags; + +typedef struct { + DFBRectangle bounds; /* position and size */ + int opacity; /* global alpha factor */ + DFBWindowStackingClass stacking; /* level boundaries */ + DFBWindowOptions options; /* flags for appearance/behaviour */ + + DFBWindowEventType events; /* mask of enabled events */ + DFBColor color; /* constant color (no surface needed) */ + u32 color_key; /* transparent pixel */ + DFBRegion opaque; /* region of the window forced to be opaque */ + + DFBWindowKeySelection key_selection; /* how to filter keys in focus */ + DFBInputDeviceKeySymbol *keys; /* list of keys for DWKS_LIST */ + unsigned int num_keys; /* number of entries in key array */ + + DFBWindowID association; /* ID of window which this is associated to */ + + DFBWindowGeometry src_geometry; /* advanced source geometry */ + DFBWindowGeometry dst_geometry; /* advanced destination geometry */ + + DFBWindowCursorFlags cursor_flags; + DFBDimension cursor_resolution; +} SaWManWindowConfig; + +typedef struct { + SaWManWindowHandle handle; + + DFBWindowCapabilities caps; + SaWManWindowConfig config; + + unsigned long resource_id; + DFBWindowID win_id; + + SaWManWindowFlags flags; +} SaWManWindowInfo; + +typedef struct { + SaWManWindowHandle handle; + + DFBWindowCapabilities caps; /* window capabilities, RO */ + + SaWManWindowConfigFlags flags; /* applicability of below values */ + SaWManWindowConfig current; + SaWManWindowConfig request; +} SaWManWindowReconfig; + +typedef struct { + DFBDisplayLayerID layer_id; + + SaWManWindowHandle single; + DFBDisplayLayerConfig config; +} SaWManLayerReconfig; + +/* + * Callbacks, to be used together with the SaWMan Manager interface + */ + +typedef struct { + DirectResult (*Start) ( void *context, + const char *name, + pid_t *ret_pid ); + + DirectResult (*Stop) ( void *context, + pid_t pid, + FusionID caller ); + + + + DirectResult (*ProcessAdded) ( void *context, + SaWManProcess *process ); + + DirectResult (*ProcessRemoved) ( void *context, + SaWManProcess *process ); + + + + DirectResult (*InputFilter) ( void *context, + DFBInputEvent *event ); + + + + DirectResult (*WindowPreConfig)( void *context, + SaWManWindowConfig *config ); + + + + DirectResult (*WindowAdded) ( void *context, + SaWManWindowInfo *info ); + + DirectResult (*WindowRemoved) ( void *context, + SaWManWindowInfo *info ); + + + + DirectResult (*WindowReconfig) ( void *context, + SaWManWindowReconfig *reconfig ); + + DirectResult (*WindowRestack) ( void *context, + SaWManWindowHandle handle, + SaWManWindowHandle relative, + SaWManWindowRelation relation ); + + DirectResult (*SwitchFocus) ( void *context, + SaWManWindowHandle handle ); + + + + DirectResult (*StackResized) ( void *context, + const DFBDimension *size ); + + DirectResult (*LayerReconfig) ( void *context, + SaWManLayerReconfig *reconfig ); + +} SaWManCallbacks; + +/*********** + * ISaWMan * + ***********/ + +/* + * Main entry point for clients of SaWMan. + * Can be used to start/stop external applications and return not-wanted keys to the key collector. + * Also used to create the singleton Window Manager interface. + */ +DEFINE_INTERFACE( ISaWMan, + + /** Applications **/ + + /* + * Start an application. + */ + DirectResult (*Start) ( + ISaWMan *thiz, + const char *name, + pid_t *ret_pid + ); + + /* + * Stop an application. + * + * Use 0 pid to indicate to kill all but me + */ + DirectResult (*Stop) ( + ISaWMan *thiz, + pid_t pid + ); + + + /** Event handling **/ + + /* + * Returns a received key event. + * + * This sends the key event to the key collector. + * In the flags field of the event structure DWEF_RETURNED will be set. + */ + DirectResult (*ReturnKeyEvent) ( + ISaWMan *thiz, + DFBWindowEvent *event + ); + + + /** Manager **/ + + /* + * Create the manager interface. + * + * This only works once and is called by the application manager executable. + */ + DirectResult (*CreateManager) ( + ISaWMan *thiz, + const SaWManCallbacks *callbacks, + void *context, + ISaWManManager **ret_manager + ); + + + /** Updates **/ + + /* + * Get updates. + */ + DirectResult (*GetUpdates) ( + ISaWMan *thiz, + DFBWindowStackingClass stacking_class, + DFBRegion *ret_updates, + unsigned int *ret_num + ); +) + + +/****************** + * ISaWManManager * + ******************/ + +/* + * Manages SaWMan. + * used to request and deny regular window activties like close, remove, switch focus. + * To be used together with the callbacks given to ISaWMan::CreateManager(). + */ +DEFINE_INTERFACE( ISaWManManager, + + /** Updates **/ + + /* + * Queue an update of the screen, e.g. due to layout changes. + * + * If region is NULL the whole screen will be updated. + */ + DirectResult (*QueueUpdate) ( + ISaWManManager *thiz, + DFBWindowStackingClass stacking, + const DFBRegion *region + ); + + /* + * Process queued updates. + */ + DirectResult (*ProcessUpdates) ( + ISaWManManager *thiz, + DFBSurfaceFlipFlags flags + ); + + + /** Windows **/ + + /* + * Send a close request to a window. + */ + DirectResult (*CloseWindow) ( + ISaWManManager *thiz, + SaWManWindowHandle handle + ); + + /* + * Show or hide a window. + */ + DirectResult (*SetVisible) ( + ISaWManManager *thiz, + SaWManWindowHandle handle, + DFBBoolean visible + ); + + /* + * Switches focus to a window. + */ + DirectResult (*SwitchFocus) ( + ISaWManManager *thiz, + SaWManWindowHandle handle + ); + + + /** Stack **/ + + /* + * Get the dimensions of the stack. + */ + DirectResult (*GetSize) ( + ISaWManManager *thiz, + DFBWindowStackingClass stacking, + DFBDimension *ret_size + ); + + /* + * Insert a window that has been added. + * + * If no relative is specified, the window will be inserted at the top or bottom most + * position in its stacking class. Otherwise the window will be inserted on top of or below the + * relative. + */ + DirectResult (*InsertWindow) ( + ISaWManManager *thiz, + SaWManWindowHandle handle, + SaWManWindowHandle relative, + SaWManWindowRelation relation + ); + + /* + * Remove a window. + */ + DirectResult (*RemoveWindow) ( + ISaWManManager *thiz, + SaWManWindowHandle handle + ); + + + /** Configuration **/ + + /* + * Choose scaling quality. + */ + DirectResult (*SetScalingMode) ( + ISaWManManager *thiz, + SaWManScalingMode mode + ); + + DirectResult (*SetWindowConfig) ( + ISaWManManager *thiz, + SaWManWindowHandle handle, + SaWManWindowConfigFlags flags, + SaWManWindowConfig *config + ); + + /** Event handling **/ + + /* + * Send an event to a window. + * + * This sends an event to the window specified by the handle. + */ + DirectResult (*SendWindowEvent) ( + ISaWManManager *thiz, + SaWManWindowHandle handle, + const DFBWindowEvent *event + ); + + + /** Locking **/ + + /* + * Lock SaWMan for calls to this interface and access to data structures. + */ + DirectResult (*Lock) ( + ISaWManManager *thiz + ); + + /* + * Unlock SaWMan. + */ + DirectResult (*Unlock) ( + ISaWManManager *thiz + ); + + /** Information retrieval **/ + + /* + * Returns window information of the requested window. + * + * The window information will be copied into the provided structure, + * except info->config.keys which will be a pointer to the internal table, + * so do not change the content of this table with this function. + */ + DirectResult (*GetWindowInfo) ( + ISaWManManager *thiz, + SaWManWindowHandle handle, + SaWManWindowInfo *ret_info + ); + + /* + * Returns process information of the requested window. + * + * The process information will be copied into the provided structure. + */ + DirectResult (*GetProcessInfo) ( + ISaWManManager *thiz, + SaWManWindowHandle handle, + SaWManProcess *ret_process + ); + + /* + * Determines visibility of a window. + */ + DirectResult (*IsWindowShowing) ( + ISaWManManager *thiz, + SaWManWindowHandle handle, + DFBBoolean *ret_showing + ); +) + + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/Source/SaWMan/include/sawman_types.h b/Source/SaWMan/include/sawman_types.h new file mode 100755 index 0000000..1ad2257 --- /dev/null +++ b/Source/SaWMan/include/sawman_types.h @@ -0,0 +1,43 @@ +/* + (c) Copyright 2006-2007 directfb.org + + All rights reserved. + + Written by Denis Oliver Kropp . + + 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 __SAWMAN_TYPES_H__ +#define __SAWMAN_TYPES_H__ + +#ifdef __cplusplus +extern "C" +{ +#endif + +typedef struct __SaWMan_SaWMan SaWMan; +typedef struct __SaWMan_SaWManGrabbedKey SaWManGrabbedKey; +typedef struct __SaWMan_SaWManManager SaWManManager; +typedef struct __SaWMan_SaWManTier SaWManTier; +typedef struct __SaWMan_SaWManWindow SaWManWindow; + +#ifdef __cplusplus +} +#endif + +#endif + -- cgit