commit a551a7f05647be9cd753fbd46fda8a4c7ac012da Author: Gustavo Sverzut Barbieri Date: Sun Aug 17 16:34:48 2008 +0000 mv PROTO/eflpp BINDINGS/cxx SVN revision: 35517 diff --git a/.cvsignore b/.cvsignore new file mode 100644 index 0000000..5b98064 --- /dev/null +++ b/.cvsignore @@ -0,0 +1,24 @@ +stamp-h1 +ltmain.sh +libtool +eflpp.pws +eflpp.pc +eflpp-uninstalled.pc +configure +config.sub +config.status +config.log +config.h.in +config.h +config.guess +autom4te.cache +aclocal.m4 +Makefile.in +Makefile +.tm_project.cache +missing +install-sh +depcomp +.tm_project2.cache +.anjuta + diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..7ae5fb5 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,2 @@ +Michael 'Mickey' Lauer +Andreas 'audifahrer' Volz diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..e69de29 diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..01a8867 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,38 @@ +2006-06-27 mickeyl + * Catch up with changes in EWL + * Start wrapping ETK + * Embedding an EWL in an Evas now finally works + +2006-05-01 mickeyl + * Add new demo programs + * TextBlock is currently disabled due to internal Evas + changes. The next release will contain a working TextBlock + * Released EFL++ 0.1.0 + +2005-09-01 mickeyl + * Started wrapping Emotion + * Add EdjePart abstraction + +2005-08-29 mickeyl + * Started wrapping Esmart_Container + * Started wrapping EWL + * Started wrapping Edje + * Released EFL++ 0.0.3 + +2005-08-01 mickeyl + * Catch up example programs with changes in Evas API + * Released EFL++ 0.0.2 + +2005-07-01 mickeyl + * Added the new Evas TextBlock, more work on it will follow + when the Evas TextBlock API has stabilized + +2005-05-05 mickeyl + * Released EFL++ 0.0.1 + +2004-09-01 mickeyl + * Started working on the Ecore part of EFL++ + * Released EFL++ 0.0.0 + +2004-08-10 mickeyl + * Started working on Evas part of EFL++ diff --git a/Doxyfile b/Doxyfile new file mode 100644 index 0000000..09960be --- /dev/null +++ b/Doxyfile @@ -0,0 +1,139 @@ +PROJECT_NAME = EFLpp +PROJECT_NUMBER = +OUTPUT_DIRECTORY = doc +INPUT = ./src ./src/edje +IMAGE_PATH = doc/img +OUTPUT_LANGUAGE = English +GENERATE_HTML = YES +HTML_OUTPUT = html +HTML_FILE_EXTENSION = .html +HTML_HEADER = doc/head.html +HTML_FOOTER = doc/foot.html +HTML_STYLESHEET = doc/eflpp.css +HTML_ALIGN_MEMBERS = YES +ENUM_VALUES_PER_LINE = 1 +GENERATE_HTMLHELP = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +BINARY_TOC = NO +TOC_EXPAND = NO +DISABLE_INDEX = NO +EXTRACT_ALL = YES +EXTRACT_PRIVATE = NO +EXTRACT_STATIC = NO +EXTRACT_LOCAL_CLASSES = NO +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_FRIEND_COMPOUNDS = YES +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = NO +STRIP_FROM_PATH = +INTERNAL_DOCS = NO +STRIP_CODE_COMMENTS = YES +CASE_SENSE_NAMES = YES +SHORT_NAMES = NO +HIDE_SCOPE_NAMES = NO +VERBATIM_HEADERS = NO +SHOW_INCLUDE_FILES = NO +JAVADOC_AUTOBRIEF = YES +MULTILINE_CPP_IS_BRIEF = NO +DETAILS_AT_TOP = NO +INHERIT_DOCS = YES +INLINE_INFO = YES +SORT_MEMBER_DOCS = YES +DISTRIBUTE_GROUP_DOC = NO +TAB_SIZE = 2 +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ALIASES = +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +OPTIMIZE_OUTPUT_FOR_C = YES +OPTIMIZE_OUTPUT_JAVA = NO +SHOW_USED_FILES = NO +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_FORMAT = "$file:$line: $text" +WARN_LOGFILE = +FILE_PATTERNS = +RECURSIVE = YES +EXCLUDE = +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = +EXAMPLE_RECURSIVE = NO +INPUT_FILTER = +FILTER_SOURCE_FILES = NO +SOURCE_BROWSER = NO +INLINE_SOURCES = NO +REFERENCED_BY_RELATION = YES +REFERENCES_RELATION = YES +ALPHABETICAL_INDEX = YES +COLS_IN_ALPHA_INDEX = 2 +IGNORE_PREFIX = +GENERATE_TREEVIEW = NO +TREEVIEW_WIDTH = 250 +GENERATE_LATEX = YES +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4wide +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = YES +USE_PDFLATEX = NO +LATEX_BATCHMODE = NO +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +GENERATE_MAN = YES +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_LINKS = YES +GENERATE_XML = NO +XML_SCHEMA = +XML_DTD = +GENERATE_AUTOGEN_DEF = NO +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = NO +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +TAGFILES = +GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = /usr/bin/perl +CLASS_DIAGRAMS = YES +HIDE_UNDOC_RELATIONS = NO +HAVE_DOT = YES +CLASS_GRAPH = YES +COLLABORATION_GRAPH = NO +TEMPLATE_RELATIONS = NO +INCLUDE_GRAPH = NO +INCLUDED_BY_GRAPH = NO +GRAPHICAL_HIERARCHY = NO +DOT_IMAGE_FORMAT = png +DOT_PATH = +DOTFILE_DIRS = +MAX_DOT_GRAPH_WIDTH = 512 +MAX_DOT_GRAPH_HEIGHT = 512 +GENERATE_LEGEND = YES +DOT_CLEANUP = YES +SEARCHENGINE = NO diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..e69de29 diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..c6b9983 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,29 @@ +## Process this file with automake to produce Makefile.in +## Created by Anjuta - will *NOT* be overwritten + +SUBDIRS = src examples data + +libeflppdocdir = ${prefix}/doc/eflpp +libeflppdoc_DATA = \ + README\ + COPYING\ + AUTHORS\ + ChangeLog\ + INSTALL\ + NEWS\ + TODO + +EXTRA_DIST = $(libeflppdoc_DATA)\ + eflpp.pc.in\ + eflpp-uninstalled.pc.in + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = eflpp.pc + +# Copy all the spec files. Of cource, only one is actually used. +dist-hook: + for specfile in *.spec; do \ + if test -f $$specfile; then \ + cp -p $$specfile $(distdir); \ + fi \ + done diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..e69de29 diff --git a/README b/README new file mode 100644 index 0000000..9ebbc59 --- /dev/null +++ b/README @@ -0,0 +1,46 @@ +//=========================================================================================================// +// Enlightenment Foundation Libraries C++ Bindings. (C) 2004-2006 Vanille Media, Michael 'Mickey' Lauer. +//=========================================================================================================// + +Some FAQs to get you started: + +Q: Where's the homepage? +A: http://www.vanille-media.de/site/index.php/projects/efl/ + +Q: What's the license? +A: LGPL + +Q: What are the requirements? +A: You need a C++ toolchain (recommended: g++ 4.1.1), libsigc-2.x, Evas, Ecore, Edje. + For a debugging build, you need libcwd, see http://libcwd.sourceforge.net + Optional parts need Esmart, Epsilon, Ewl, Etk, and Emotion + +Q: How do I build eflpp? +A: ./autogen.sh && make && make install + +Q: Why no inline functions [yet]? +A: Premature optimization is the root of all evil. + +Q: Why is it using const char* and not some string class? +A: I couldn't decide yet whether libstdc++ should be optional or not. + After all, I'm targetting embedded systems... + +Q: Why a monolithic library and not just one library for every EFL sublibrary? +A: EFLpp as a class library benefits from putting everything into one library. + I may reconsider this when I have more knowledge about the EFLpp use-cases. + +Q: How stable is the API yet? +A: Not at all! Trust me, everything can change. I know this is a bit sucky for all potential + users of this library and I promise it will improve once we get nearer towards v0.9. + +Q: How can I contribute? +A: Send patches adding more C-API coverage, tests, examples, etc. + +Q: Where are the largest construction sites? +A: See TODO + +Q: How can I see the debug messages? +A: export EFL_DEBUG="1" and regenerate all Makefiles + +Q: It takes a long time to 'make' and 'make install'. This is bad while development. Are there alternatives? +A: Yes. You could simpy add the eflpp top level directory to the PKG_CONFIG_PATH variable. Then pkg-config is able to find the unsinstalled lib and include files. No need to do a 'make install'. diff --git a/TODO b/TODO new file mode 100644 index 0000000..0660b49 --- /dev/null +++ b/TODO @@ -0,0 +1,6 @@ +* memory handling, it leaks like hell +* parent/child chaining +* callback handling needs more thinking +* much more :/ +* wrap evas_color_* functions (e.g. evas_color_argb_premul) +* move all #include from *.h to *.cpp diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..0846992 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +rm -rf autom4te.cache +rm -f aclocal.m4 ltmain.sh + +touch README + +echo "Running aclocal..." ; aclocal $ACLOCAL_FLAGS || exit 1 +echo "Running autoheader..." ; autoheader || exit 1 +echo "Running autoconf..." ; autoconf || exit 1 +echo "Running libtoolize..." ; (libtoolize --copy --automake || glibtoolize --automake) || exit 1 +echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1 + +if [ -z "$NOCONFIGURE" ]; then + ./configure "$@" +fi diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..9dec418 --- /dev/null +++ b/configure.ac @@ -0,0 +1,201 @@ +dnl Process this file with autoconf to produce a configure script. +dnl Created by Anjuta - will *NOT* be overwritten + +AC_INIT(EFLpp, 0.1, mickey@vanille-media.de) +AM_INIT_AUTOMAKE(eflpp, 0.1) +AM_CONFIG_HEADER(config.h) + +dnl Disable libtool 1.5 support for languages we don't use +define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl +define([AC_LIBTOOL_LANG_GCJ_CONFIG], [:])dnl + +AM_MAINTAINER_MODE + +AC_PROG_CC +AM_PROG_CC_STDC +AC_PROG_CPP +AC_PROG_CXX +AC_HEADER_STDC +AC_PROG_LIBTOOL + +dnl Check for option to enable esmart +AC_MSG_CHECKING(whether to enable esmart) +AC_ARG_ENABLE(emotion, + [ --enable-esmart=[no/yes] enables esmart build (default=yes)],, + enable_esmart=yes) + +if [ ! test "x$enable_esmart" != "xyes"]; then + AC_DEFINE(EFL_SUPPORT_ESMART, 1, [Define to enable esmart support]) + esmart_modules="esmart_container esmart_text_entry" + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi + +dnl Check for option to enable emotion +AC_MSG_CHECKING(whether to enable emotion) +AC_ARG_ENABLE(emotion, + [ --enable-emotion=[no/yes] enables emotion build (default=yes)],, + enable_emotion=yes) + +if [ ! test "x$enable_emotion" != "xyes"]; then + AC_DEFINE(EFL_SUPPORT_EMOTION, 1, [Define to enable emotion support]) + emotion_modules="emotion" + AC_MSG_RESULT(yes) +else + AC_MSG_RESULT(no) +fi + + +dnl Check for programs + +dnl Checks for libraries + +AC_ARG_ENABLE(fbcon, + [AC_HELP_STRING([--enable-fbcon],[enable fbcon support])], + [enable_fbcon=$enableval], [enable_fbcon="auto"]) +have_fbcon=no +if test "x$enable_fbcon" != "xno" ; then + AC_CHECK_HEADERS(Evas_Engine_FB.h, + [AC_CHECK_HEADER(Ecore_Fb.h, + [have_fbcon=yes], + [], [#include ])], + [], [#include ]) + if test "x$have_fbcon" = "xyes" ; then + AC_DEFINE(ENABLE_EFLPP_FB, 1, [Enable FB]) + elif test "x$enable_fbcon" = "xyes" ; then + AC_MSG_ERROR(fbcon requested but no evas/ecore support found) + fi +fi +AM_CONDITIONAL(EFLPP_ENABLE_FB, test "x$have_fbcon" = xyes) + + + +dnl Check for pkg-config stuff +pkg_modules="$esmart_modules $emotion_modules evas ecore ecore-config ecore-evas ecore-ipc ecore-txt ecore-con ecore-job sigc++-2.0 etk ewl" +PKG_CHECK_MODULES(PACKAGE, [$pkg_modules]) + +dnl Check for headers + +dnl Check for functions + +dnl Check for edce_cc +EDJE_DEF="" +AC_SUBST(EDJE_DEF) +AC_ARG_WITH(edje-cc, + AC_HELP_STRING([--with-edje-cc=PATH],[Specify a specific path to edje_cc]), +[ + v=$withval; + edje_cc=$v + echo " Enlightenment edje_cc explicitly set to "$edje_cc; +],[ + edje_cc=$(pkg-config --variable=prefix edje)/bin/edje_cc +]) +AC_SUBST(edje_cc) + +dnl Set PACKAGE SOURCE DIR +packagesrcdir=`cd $srcdir && pwd` + +dnl Set PACKAGE PREFIX +if test "x${prefix}" = "xNONE"; then + packageprefix=${ac_default_prefix} +else + packageprefix=${prefix} +fi + +dnl Set PACKAGE DIRS in config.h +packagedatadir=share/${PACKAGE} +packagedocdir=doc/${PACKAGE} +packagepixmapsdir=share/pixmaps/${PACKAGE} +systempixmapsdir=share/pixmaps + +dnl Subst PACKAGE_DATA_DIR. +NO_PREFIX_PACKAGE_DATA_DIR="${packagedatadir}" +AC_SUBST(NO_PREFIX_PACKAGE_DATA_DIR) +PACKAGE_DATA_DIR="${packageprefix}/${packagedatadir}" +AC_SUBST(PACKAGE_DATA_DIR) + +dnl Subst PACKAGE_DOC_DIR. +NO_PREFIX_PACKAGE_DOC_DIR="${packagedocdir}" +AC_SUBST(NO_PREFIX_PACKAGE_DOC_DIR) +PACKAGE_DOC_DIR="${packageprefix}/${packagedocdir}" +AC_SUBST(PACKAGE_DOC_DIR) + +dnl Subst PACKAGE_PIXMAPS_DIR. +NO_PREFIX_PACKAGE_PIXMAPS_DIR="${packagepixmapsdir}" +AC_SUBST(NO_PREFIX_PACKAGE_PIXMAPS_DIR) +PACKAGE_PIXMAPS_DIR="${packageprefix}/${packagepixmapsdir}" +AC_SUBST(PACKAGE_PIXMAPS_DIR) + +dnl Subst SYSTEM_PIXMAPS_DIR. +NO_PREFIX_SYSTEM_PIXMAPS_DIR="${packagepixmapsdir}" +AC_SUBST(NO_PREFIX_SYSTEM_PIXMAPS_DIR) +SYSTEM_PIXMAPS_DIR="${packageprefix}/${systempixmapsdir}" +AC_SUBST(SYSTEM_PIXMAPS_DIR) + +dnl Subst PACKAGE_SOURCE_DIR +PACKAGE_SOURCE_DIR="${packagesrcdir}" +AC_SUBST(PACKAGE_SOURCE_DIR) + +AC_DEFINE_UNQUOTED(PACKAGE_DATA_DIR, "${packageprefix}/${packagedatadir}","") +AC_DEFINE_UNQUOTED(PACKAGE_DOC_DIR, "${packageprefix}/${packagedocdir}","") +AC_DEFINE_UNQUOTED(PACKAGE_PIXMAPS_DIR, "${packageprefix}/${packagepixmapsdir}","") +AC_DEFINE_UNQUOTED(SYSTEM_PIXMAPS_DIR, "${packageprefix}/${systempixmapsdir}","") +AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}","") + +AC_OUTPUT([ +eflpp.pc +eflpp-uninstalled.pc +Makefile +src/Makefile +src/common/Makefile +src/ecore/Makefile +src/edje/Makefile +src/esmart/Makefile +src/evas/Makefile +src/edb/Makefile +src/eet/Makefile +src/emotion/Makefile +src/etk/Makefile +src/ewl/Makefile +src/misc/Makefile +examples/Makefile +examples/edje/Makefile +examples/edje/simple/Makefile +examples/esmart/Makefile +examples/esmart/container/Makefile +examples/esmart/textentry/Makefile +examples/esmart/group/Makefile +examples/etk/Makefile +examples/etk/embed/Makefile +examples/etk/simple/Makefile +examples/ewl/Makefile +examples/ewl/embed/Makefile +examples/ewl/simple/Makefile +examples/signals/Makefile +examples/signals/simple/Makefile +examples/emotion/Makefile +examples/emotion/simple/Makefile +examples/debug/Makefile +examples/debug/simple/Makefile +examples/ecore/Makefile +examples/ecore/3dstars/Makefile +examples/ecore/calibrate/Makefile +examples/ecore/callbacks/Makefile +examples/ecore/config/Makefile +examples/ecore/paint/Makefile +examples/ecore/simple/Makefile +examples/ecore/stars/Makefile +examples/ecore/timers/Makefile +examples/ecore/list/Makefile +examples/ecore/x/Makefile +examples/angstrom/Makefile +examples/angstrom/bootmanager/Makefile +examples/evas/Makefile +examples/evas/hash/Makefile +examples/evas/list/Makefile +data/Makefile +data/edjes/Makefile +data/fonts/Makefile +data/images/Makefile +]) diff --git a/data/.cvsignore b/data/.cvsignore new file mode 100644 index 0000000..3dda729 --- /dev/null +++ b/data/.cvsignore @@ -0,0 +1,2 @@ +Makefile.in +Makefile diff --git a/data/Makefile.am b/data/Makefile.am new file mode 100644 index 0000000..4e20e27 --- /dev/null +++ b/data/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = edjes fonts images diff --git a/data/edjes/.cvsignore b/data/edjes/.cvsignore new file mode 100644 index 0000000..743f45f --- /dev/null +++ b/data/edjes/.cvsignore @@ -0,0 +1,3 @@ +*.edj +Makefile.in +Makefile diff --git a/data/edjes/Makefile.am b/data/edjes/Makefile.am new file mode 100644 index 0000000..91907a1 --- /dev/null +++ b/data/edjes/Makefile.am @@ -0,0 +1,44 @@ +MAINTAINERCLEANFILES = Makefile.in + +EDJE_CC = @edje_cc@ +EDJE_FLAGS = \ + -v \ + -id $(top_srcdir)/data/images \ + -fd $(top_srcdir)/data/fonts \ + @EDJE_DEF@ + +filesdir = $(pkgdatadir)/edjes +files_DATA = simple.edj angstrom-bootmanager.edj angstrom-calibrate.edj angstrom-installer.edj esmart_text_entry_test.edj + +EXTRA_DIST = angstrom-background.edc \ + angstrom-bootmanager.edc \ + angstrom-calibrate.edc \ + angstrom-installer.edc \ + e17-default-clock.edc \ + entrance-buttons.edc \ + simple.edc \ + esmart_text_entry_test.edc + +simple.edj: Makefile simple.edc + $(EDJE_CC) $(EDJE_FLAGS) \ + $(top_srcdir)/data/edjes/simple.edc + +angstrom-bootmanager.edj: Makefile angstrom-bootmanager.edc + $(EDJE_CC) $(EDJE_FLAGS) \ + $(top_srcdir)/data/edjes/angstrom-bootmanager.edc + +angstrom-calibrate.edj: Makefile angstrom-calibrate.edc + $(EDJE_CC) $(EDJE_FLAGS) \ + $(top_srcdir)/data/edjes/angstrom-calibrate.edc + +angstrom-installer.edj: Makefile angstrom-installer.edc + $(EDJE_CC) $(EDJE_FLAGS) \ + $(top_srcdir)/data/edjes/angstrom-installer.edc + +esmart_text_entry_test.edj: Makefile esmart_text_entry_test.edc + $(EDJE_CC) $(EDJE_FLAGS) \ + $(top_srcdir)/data/edjes/esmart_text_entry_test.edc + +clean-local: + rm -f *.edj + diff --git a/data/edjes/angstrom-background.edc b/data/edjes/angstrom-background.edc new file mode 100644 index 0000000..dab0689 --- /dev/null +++ b/data/edjes/angstrom-background.edc @@ -0,0 +1,411 @@ +images { + image: "logo_shad.png" COMP; + image: "shad.png" COMP; + image: "tex.png" LOSSY 85; + image: "ref.png" LOSSY 60; + image: "bar_l.png" COMP; + image: "bar_r.png" COMP; + image: "bar_l_sh.png" COMP; + image: "bar_r_sh.png" COMP; + image: "angstrom.png" COMP; +} + +fonts { + font: "Vera.ttf" "Vera"; +} + +group { + name: "background"; + parts { + part { + name: "background_image"; + description { + state: "default" 0.0; + image { + normal: "tex.png"; + } + fill { + size { + relative: 0 0; + offset: 800 510; + } + } + } + } + part { + name: "shad"; + description { + state: "default" 0.0; + image { + normal: "shad.png"; + } + } + } + part { + name: "bar_l_sh"; + description { + state: "default" 0.0; + min: 0 39; + max: 99999 39; + align: 0.0 1.0; + rel1 { + to: "bar_l"; + offset: 0 -7; + } + rel2 { + to: "bar_l"; + offset: 5 6; + } + image { + normal: "bar_l_sh.png"; + border: 0 60 0 0; + } + fill { + smooth: 0; + } + } + } + part { + name: "bar_r_sh"; + description { + state: "default" 0.0; + min: 0 39; + max: 99999 39; + align: 0.0 1.0; + rel1 { + to: "bar_r"; + offset: -5 -7; + } + rel2 { + to: "bar_r"; + offset: -1 6; + } + image { + normal: "bar_r_sh.png"; + border: 60 0 0 0; + } + fill { + smooth: 0; + } + } + } + part { + name: "bar_l1"; + description { + state: "default" 0.0; + min: 0 4; + max: 99999 4; + rel1 { + to: "bar_l"; + relative: 0.0 0.0; + offset: 0 6; + } + rel2 { + to: "bar_l"; + relative: 1.0 0.0; + offset: -15 9; + } + image { + normal: "ref.png"; + } + fill { + origin { + relative: 0 0; + offset: 0 0; + } + size { + relative: 0 0; + offset: 400 80; + } + } + } + description { + state: "default2" 0.0; + inherit: "default" 0.0; + fill { + origin { + offset: -400 80; + } + } + } + } + part { + name: "bar_l2"; + description { + state: "default" 0.0; + min: 0 4; + max: 99999 4; + rel1 { + to: "bar_l"; + relative: 0.0 1.0; + offset: 0 -10; + } + rel2 { + to: "bar_l"; + relative: 1.0 1.0; + offset: -7 -7; + } + image { + normal: "ref.png"; + } + fill { + origin { + relative: 0 0; + offset: 0 0; + } + size { + relative: 0 0; + offset: 400 80; + } + } + } + description { + state: "default2" 0.0; + inherit: "default" 0.0; + fill { + origin { + offset: -400 -80; + } + } + } + } + part { + name: "bar_r1"; + description { + state: "default" 0.0; + min: 0 4; + max: 99999 4; + rel1 { + to: "bar_r"; + relative: 0.0 0.0; + offset: 14 6; + } + rel2 { + to: "bar_r"; + relative: 1.0 0.0; + offset: -1 9; + } + image { + normal: "ref.png"; + } + fill { + origin { + relative: 0 0; + offset: 0 0; + } + size { + relative: 0 0; + offset: 400 80; + } + } + } + description { + state: "default2" 0.0; + inherit: "default" 0.0; + fill { + origin { + offset: 400 80; + } + } + } + } + part { + name: "bar_r2"; + description { + state: "default" 0.0; + min: 0 4; + max: 99999 4; + rel1 { + to: "bar_r"; + relative: 0.0 1.0; + offset: 6 -10; + } + rel2 { + to: "bar_r"; + relative: 1.0 1.0; + offset: 0 -7; + } + image { + normal: "ref.png"; + } + fill { + origin { + relative: 0 0; + offset: 0 0; + } + size { + relative: 0 0; + offset: 400 80; + } + } + } + description { + state: "default2" 0.0; + inherit: "default" 0.0; + fill { + origin { + offset: 400 -80; + } + } + } + } + part { + name: "bar_l"; + description { + state: "default" 0.0; + min: 0 25; + max: 99999 25; + align: 0.0 1.0; + rel1 { + relative: 0.0 1.0; + offset: 0 -50; + } + rel2 { + relative: 0.5 1.0; + offset: -50 -50; + } + image { + normal: "bar_l.png"; + border: 0 30 0 0; + } + fill { + smooth: 0; + } + } + } + part { + name: "bar_r"; + description { + state: "default" 0.0; + min: 0 25; + max: 99999 25; + align: 1.0 1.0; + rel1 { + relative: 0.5 1.0; + offset: 49 -50; + } + rel2 { + relative: 1.0 1.0; + offset: -1 -50; + } + image { + normal: "bar_r.png"; + border: 30 0 0 0; + } + fill { + smooth: 0; + } + } + } + part { + name: "logo"; + description { + state: "default" 0.0; + min: 128 100; + max: 256 200; + align: 0.5 1.0; + rel1 { + relative: 0.5 1.0; + offset: 0 -20; + } + rel2 { + relative: 0.5 1.0; + offset: 0 -20; + } + image { + normal: "angstrom.png"; + } + } + } + + /* version text at bottom in the middle */ + part { + name: "version"; + type: "TEXT"; + effect: OUTLINE_SOFT_SHADOW; + description { + state: "default" 0.0; + color: 255 255 255 255; + /*align: 0.0 0.0;*/ + + rel1 { + relative: 0.0 0.97; + offset: 0 0; + } + rel2 { + relative: 1.0 0.97; + offset: 0 0; + } + text { + text: "SETME: Angstrom Version"; + font: "Vera"; + size: 14; + } + } + } + + programs { + program { + name: "ref1_1"; + signal: "show"; + source: ""; + action: STATE_SET "default2" 0.0; + transition: LINEAR 4.0; + target: "bar_l1"; + after: "ref1_2"; + } + program { + name: "ref1_2"; + action: STATE_SET "default" 0.0; + target: "bar_l1"; + after: "ref1_1"; + } + program { + name: "ref2_1"; + signal: "show"; + source: ""; + action: STATE_SET "default2" 0.0; + transition: LINEAR 5.71; + target: "bar_l2"; + after: "ref2_2"; + } + program { + name: "ref2_2"; + action: STATE_SET "default" 0.0; + target: "bar_l2"; + after: "ref2_1"; + } + program { + name: "ref3_1"; + signal: "show"; + source: ""; + action: STATE_SET "default2" 0.0; + transition: LINEAR 3.46; + target: "bar_r1"; + after: "ref3_2"; + } + program { + name: "ref3_2"; + action: STATE_SET "default" 0.0; + target: "bar_r1"; + after: "ref3_1"; + } + program { + name: "ref4_1"; + signal: "show"; + source: ""; + action: STATE_SET "default2" 0.0; + transition: LINEAR 6.32; + target: "bar_r2"; + after: "ref4_2"; + } + program { + name: "ref4_2"; + action: STATE_SET "default" 0.0; + target: "bar_r2"; + after: "ref4_1"; + } + } +} +} + diff --git a/data/edjes/angstrom-bootmanager.edc b/data/edjes/angstrom-bootmanager.edc new file mode 100644 index 0000000..7279bea --- /dev/null +++ b/data/edjes/angstrom-bootmanager.edc @@ -0,0 +1,7 @@ +/* most artwork is taken by the Enlightenment Team + * the respective licenses apply */ + +collections { +#include "angstrom-background.edc" +#include "entrance-buttons.edc" +} diff --git a/data/edjes/angstrom-calibrate.edc b/data/edjes/angstrom-calibrate.edc new file mode 100644 index 0000000..03e68e5 --- /dev/null +++ b/data/edjes/angstrom-calibrate.edc @@ -0,0 +1,128 @@ +collections { + +images { + image: "panel.png" COMP; + image: "shadow.png" COMP; + image: "angstrom.png" COMP; + image: "crosshair.png" COMP; +} + +fonts { + font: "Vera.ttf" "Vera"; +} + +group { + name: "background"; + parts { + part { + name: "background_image"; + description { + state: "default" 0.0; + image { + normal: "panel.png"; + } + } + } + part { + name: "shadow"; + description { + state: "default" 0.0; + image { + normal: "shadow.png"; + } + } + } + + part { + name: "crosshair"; + description { + state: "default" 0.0; + min: 31 31; + max: 31 31; + align: 0.5 0.5; + rel1 { + relative: 0.5 0.5; + offset: 0 0; + } + rel2 { + relative: 0.5 0.5; + offset: 0 0; + } + image { + normal: "crosshair.png"; + } + } + } + + part { + name: "logo"; + description { + state: "default" 0.0; + min: 128 100; + max: 256 200; + align: 0.5 1.0; + rel1 { + relative: 0.5 1.0; + offset: 0 0; + } + rel2 { + relative: 0.5 1.0; + offset: 0 0; + } + image { + normal: "angstrom.png"; + } + } + } + + part { + name: "help"; + type: "TEXT"; + effect: NONE; + description { + state: "default" 0.0; + color: 0 0 0 255; + + rel1 { + relative: 0.0 0.3; + offset: 0 0; + } + rel2 { + relative: 1.0 0.3; + offset: 0 0; + } + text { + text: "Click to calibrate your touchscreen"; + font: "Vera"; + size: 10; + } + } + } + +programs { + + program { + name: "init"; + signal: "load"; + source: ""; + } + + program { + name: "user_startup"; + signal: "show"; + source: ""; + action: SIGNAL_EMIT "user" "on"; + after: "crosshair_animate"; + } + + program { + name: "crosshair_animate"; + action: STATE_SET "default" 0.0; + transition: LINEAR 2.0; + target: "crosshair"; + after: "crosshair_animate"; + } + +} +} +} diff --git a/data/edjes/angstrom-installer.edc b/data/edjes/angstrom-installer.edc new file mode 100644 index 0000000..1c0d21f --- /dev/null +++ b/data/edjes/angstrom-installer.edc @@ -0,0 +1,144 @@ +// Sample EDC +images { + image, "background.png" LOSSY 95; +} + +collections { + group { + name, "test"; + min, 32 32; + max, 1024 768; + + parts { + part { + name, "background"; + type, IMAGE; + mouse_events, 0; + + description { + state, "default" 0.0; + + rel1 { + relative, 0.0 0.0; + offset, 0 0; + } + rel2 { + relative, 1.0 1.0; + offset, -1 -1; + } + image { + normal, "background.png"; + } + } + } + + part { + name, "button"; + type, RECT; + mouse_events, 1; + + description { + state, "default" 0.0; + min, 100 50; + max, 100 50; + align, 0.5 0.5; + + color, 211 168 234 255; + + rel1 { + relative, 0.0 0.0; + offset, 0 0; + } + rel2 { + relative, 1.0 1.0; + offset, -1 -1; + } + } + description { + state, "clicked" 0.0; + min, 100 50; + max, 100 50; + align, 0.5 0.5; + + color, 170 89 214 255; + + rel1 { + relative, 0.0 0.0; + offset, 0 0; + } + rel2 { + relative, 1.0 1.0; + offset, -1 -1; + } + } + } + part { + name, "text"; + type, TEXT; + mouse_events, 0; + + description { + state, "default" 0.0; + + rel1 { + + relative, 0.0 0.0; + offset, 0 0; + to, "button"; + } + rel2 { + relative, 1.0 1.0; + offset, -1 -1; + to, "button"; + } + text { + text, "Press Me"; + font, "Vera"; + size, 14; + align, 0.5 0.5; + } + } + } + } /* Close Parts */ + + programs { + + program { + name, "button_click"; + signal, "mouse,down,1"; + source, "button"; + action, STATE_SET "clicked" 0.0; + target, "button"; + after, "do_me"; + } + + program { + name, "button_unclick"; + signal, "mouse,up,1"; + source, "button"; + action, STATE_SET "default" 0.0; + target, "button"; + after, "stop_doing_me"; + } + + program { + name, "do_me"; + signal, "*"; + source, "button_click"; + action, SIGNAL_EMIT "PANTS ON" "button"; + in, 1.0 0.0; + after, "do_me"; + } + + program { + name, "stop_doing_me"; + signal, "*"; + source, "button_unclick"; + action, ACTION_STOP; + target, "do_me"; + } + + } /* Close Prog */ + } /* Close Group */ +} /* Close Coll */ + diff --git a/data/edjes/entrance-buttons.edc b/data/edjes/entrance-buttons.edc new file mode 100644 index 0000000..b96c1aa --- /dev/null +++ b/data/edjes/entrance-buttons.edc @@ -0,0 +1,268 @@ +images { + image: "power_button_0.png" LOSSY 90; + image: "power_button_1.png" LOSSY 90; + image: "power_button_glow_0.png" LOSSY 90; + image: "power_button_glow_1.png" LOSSY 90; + + image: "reset_button_0.png" LOSSY 90; + image: "reset_button_1.png" LOSSY 90; + image: "reset_button_glow_0.png" LOSSY 90; + image: "reset_button_glow_1.png" LOSSY 90; +} +group { + name: "buttons"; + parts { + part { + name: "all_clip"; + type: RECT; + mouse_events: 0; + description { + state: "default" 0.0; + visible: 1; + color: 255 0 0 0; + } + description { + state: "hidden" 0.0; + visible: 0; + color: 255 0 0 0; + } + } + part { + name: "power_button"; + mouse_events: 1; + description { + state: "default" 0.0; + min: 32 32; + max: 32 32; + align: 1.0 1.0; + rel1 { + relative: 0.98 0.98; + offset: 0 0; + } + rel2 { + relative: 0.98 0.98; + offset: 0 0; + } + image { + normal: "power_button_0.png"; + } + } + description { + state: "clicked" 0.0; + inherit: "default" 0.0; + image { + normal: "power_button_1.png"; + } + } + } + part { + name: "power_button_glow"; + mouse_events: 0; + description { + state: "default" 0.0; + visible: 0; + rel1 { + to: "power_button"; + } + rel2 { + to: "power_button"; + } + color: 255 255 255 0; + image { + normal: "power_button_glow_0.png"; + } + } + description { + state: "hilited" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + description { + state: "clicked" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + image { + normal: "power_button_glow_1.png"; + } + } + } + + part { + name: "reset_button"; + mouse_events: 1; + description { + state: "default" 0.0; + min: 32 32; + max: 32 32; + align: 0.0 1.0; + rel1 { + relative: 0.02 0.98; + offset: 0 0; + } + rel2 { + relative: 0.02 0.98; + offset: 0 0; + } + image { + normal: "reset_button_0.png"; + } + } + description { + state: "clicked" 0.0; + inherit: "default" 0.0; + image { + normal: "reset_button_1.png"; + } + } + } + part { + name: "reset_button_glow"; + mouse_events: 0; + description { + state: "default" 0.0; + visible: 0; + rel1 { + to: "reset_button"; + } + rel2 { + to: "reset_button"; + } + color: 255 255 255 0; + image { + normal: "reset_button_glow_0.png"; + } + } + description { + state: "hilited" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + } + description { + state: "clicked" 0.0; + inherit: "default" 0.0; + visible: 1; + color: 255 255 255 255; + image { + normal: "reset_button_glow_1.png"; + } + } + } + } + + programs { + program { + name: "power_button_in"; + signal: "mouse,in"; + source: "power_button"; + action: STATE_SET "hilited" 0.0; + transition: LINEAR 0.5; + target: "power_button_glow"; + } + program { + name: "power_button_out"; + signal: "mouse,out"; + source: "power_button"; + action: STATE_SET "default" 0.0; + transition: LINEAR 0.5; + target: "power_button_glow"; + } + program { + name: "power_button_down"; + signal: "mouse,down,1"; + source: "power_button"; + action: STATE_SET "clicked" 0.0; + transition: LINEAR 0.0; + target: "power_button"; + target: "power_button_glow"; + } + program { + name: "power_button_up"; + signal: "mouse,up,1"; + source: "power_button"; + action: STATE_SET "default" 0.0; + transition: LINEAR 0.0; + target: "power_button"; + target: "power_button_glow"; + } + program { + name: "power_button_up2"; + signal: "mouse,clicked,1"; + source: "power_button"; + action: STATE_SET "hilited" 0.0; + target: "power_button_glow"; + after: "power_button_up3"; + } + program { + name: "power_button_up3"; + action: STATE_SET "hidden" 0.0; + transition: SINUSOIDAL 2.0; + target: "all_clip"; + } + program { + name: "power_button_clicked"; + signal: "mouse,clicked,1"; + source: "power_button"; + action: SIGNAL_EMIT "angstrom|system|suspend" "2nd parameter"; + in: 2.0 0.0; + } + + program { + name: "reset_button_in"; + signal: "mouse,in"; + source: "reset_button"; + action: STATE_SET "hilited" 0.0; + transition: LINEAR 0.5; + target: "reset_button_glow"; + } + program { + name: "reset_button_out"; + signal: "mouse,out"; + source: "reset_button"; + action: STATE_SET "default" 0.0; + transition: LINEAR 0.5; + target: "reset_button_glow"; + } + program { + name: "reset_button_down"; + signal: "mouse,down,1"; + source: "reset_button"; + action: STATE_SET "clicked" 0.0; + transition: LINEAR 0.0; + target: "reset_button"; + target: "reset_button_glow"; + } + program { + name: "reset_button_up"; + signal: "mouse,up,1"; + source: "reset_button"; + action: STATE_SET "default" 0.0; + transition: LINEAR 0.0; + target: "reset_button"; + target: "reset_button_glow"; + } + program { + name: "reset_button_up2"; + signal: "mouse,clicked,1"; + source: "reset_button"; + action: STATE_SET "hilited" 0.0; + target: "reset_button_glow"; + after: "reset_button_up3"; + } + program { + name: "reset_button_up3"; + action: STATE_SET "hidden" 0.0; + transition: SINUSOIDAL 2.0; + target: "all_clip"; + } + program { + name: "reset_button_clicked"; + signal: "mouse,clicked,1"; + source: "reset_button"; + action: SIGNAL_EMIT "angstrom|system|reboot" "2nd parameter"; + in: 2.0 0.0; + } + } +} diff --git a/data/edjes/esmart_text_entry_test.edc b/data/edjes/esmart_text_entry_test.edc new file mode 100644 index 0000000..579d19f --- /dev/null +++ b/data/edjes/esmart_text_entry_test.edc @@ -0,0 +1,143 @@ +// Esmart Text Entry Example EDC +images +{ + image, "text_view_bg.png" COMP; + image, "text_view_over.png" COMP; + image, "entry_cursor.png" COMP; +} + +collections { + group { + name, "text_entry"; + min, 10 10; + max, 1024 768; + + parts { + + part { + name, "back_clip"; + + description { + state, "default" 0.0; + + rel1 { + relative, 0 0; + offset, 0 0; + } + } + } + + part { + name, "background"; + type, IMAGE; + mouse_events, 1; + + description { + state, "default" 0.0; + + rel1 { + relative, 0 0; + offset, 0 0; + } + + image { + normal, "text_view_bg.png"; + border: 10 6 9 7; + } + } + } + + part { + name, "overlay"; + type, IMAGE; + mouse_events, 1; + + description { + state, "default" 0.0; + + rel1 { + relative, 0 0; + offset, 0 0; + } + + image { + normal, "text_view_over.png"; + border: 10 6 9 7; + } + } + } + + part + { + name: "text"; + type: TEXT; + mouse_events: 1; + effect: SHADOW; + + description + { + state: "default" 0.0; + color: 0 0 0 255; + align: 0 0; + + text + { + font: "FreeSans"; + size: 12; +// fit: 0 1; + min: 1 0; + align: 0 0.5; + } + + rel1 + { + relative: 0 0; + offset: 7 0; + } + + rel2 + { + relative: 0 1; + offset: 0 0; + } + } + } + + part { + name, "cursor"; + type, IMAGE; + mouse_events, 1; + clip_to: "back_clip"; + + description { + state, "default" 0.0; + aspect: 1.0 1.0; + aspect_preference: VERTICAL; + align: 0.0 0.5; + + rel1 { + relative, 1 0; + offset, 0 5; + to: "text"; + } + + rel2 { + relative, 1 1; + offset, 0 -5; + } + + + image { + normal, "entry_cursor.png"; + } + } + } + + } /* Close Parts */ + + programs { + + } /* Close Prog */ + } /* Close Group */ +} /* Close Coll */ + diff --git a/data/edjes/simple.edc b/data/edjes/simple.edc new file mode 100644 index 0000000..6274516 --- /dev/null +++ b/data/edjes/simple.edc @@ -0,0 +1,148 @@ +// Simple Button edc +images { + image: "tex.png" LOSSY 95; + image: "item_normal.png" LOSSY 95; + image: "item_selected.png" LOSSY 95; +} + +collections { + group { + name, "test"; + min, 32 32; + max, 1024 768; + + parts { + part { + name, "background"; + type, IMAGE; + mouse_events, 0; + + description { + state, "default" 0.0; + rel1 { + relative, 0.0 0.0; + offset, 0 0; + } + rel2 { + relative, 1.0 1.0; + offset, -1 -1; + } + image { + normal, "tex.png"; + } + } + } + + part { + name, "button"; + type, IMAGE; + mouse_events, 1; + + description { + state, "default" 0.0; + min, 100 50; + max, 100 50; + align, 0.5 0.5; + + rel1 { + relative, 0.0 0.0; + offset, 0 0; + } + rel2 { + relative, 1.0 1.0; + offset, -1 -1; + } + image { + normal: "item_normal.png"; + } + } + description { + state, "clicked" 0.0; + min, 100 50; + max, 100 50; + align, 0.5 0.5; + + rel1 { + relative, 0.0 0.0; + offset, 0 0; + } + rel2 { + relative, 1.0 1.0; + offset, -1 -1; + } + image { + normal: "item_selected.png"; + } + } + } + part { + name, "text"; + type, TEXT; + effect: "OUTLINE"; + mouse_events, 0; + + description { + state, "default" 0.0; + + rel1 { + + relative, 0.0 0.0; + offset, 0 0; + to, "button"; + } + rel2 { + relative, 1.0 1.0; + offset, -1 -1; + to, "button"; + } + text { + text, "Press Me"; + font, "Vera"; + size, 14; + align, 0.5 0.5; + } + } + } + } /* Close Parts */ + + programs { + + program { + name, "button_click"; + signal, "mouse,down,1"; + source, "button"; + action, STATE_SET "clicked" 0.0; + target, "button"; + after, "do_me"; + } + + program { + name, "button_unclick"; + signal, "mouse,up,1"; + source, "button"; + action, STATE_SET "default" 0.0; + target, "button"; + after, "stop_doing_me"; + } + + program { + name, "do_me"; + signal, "*"; + source, "button_click"; + action, SIGNAL_EMIT "PANTS ON" "button"; + in, 1.0 0.0; + after, "do_me"; + } + + program { + name, "stop_doing_me"; + signal, "*"; + source, "button_unclick"; + action, ACTION_STOP; + target, "do_me"; + } + + } /* Close Prog */ + } /* Close Group */ +} /* Close Coll */ + diff --git a/data/fonts/.cvsignore b/data/fonts/.cvsignore new file mode 100644 index 0000000..3dda729 --- /dev/null +++ b/data/fonts/.cvsignore @@ -0,0 +1,2 @@ +Makefile.in +Makefile diff --git a/data/fonts/Gentium.ttf b/data/fonts/Gentium.ttf new file mode 100644 index 0000000..bd14bd8 Binary files /dev/null and b/data/fonts/Gentium.ttf differ diff --git a/data/fonts/GentiumI.ttf b/data/fonts/GentiumI.ttf new file mode 100644 index 0000000..00f6b72 Binary files /dev/null and b/data/fonts/GentiumI.ttf differ diff --git a/data/fonts/Makefile.am b/data/fonts/Makefile.am new file mode 100644 index 0000000..21cbd76 --- /dev/null +++ b/data/fonts/Makefile.am @@ -0,0 +1,15 @@ +## Process this file with automake to produce Makefile.in + +## Created by Anjuta - will be overwritten +## If you don't want it to overwrite it, +## Please disable it in the Anjuta project configuration + +eflpp_fontsdir = @PACKAGE_DATA_DIR@/fonts + +eflpp_fonts_DATA = \ + GentiumI.ttf \ + Gentium.ttf \ + VeraMono.ttf \ + Vera.ttf + +EXTRA_DIST = $(eflpp_fonts_DATA) diff --git a/data/fonts/Vera.ttf b/data/fonts/Vera.ttf new file mode 100644 index 0000000..a4d30c3 Binary files /dev/null and b/data/fonts/Vera.ttf differ diff --git a/data/fonts/VeraMono.ttf b/data/fonts/VeraMono.ttf new file mode 100644 index 0000000..236056c Binary files /dev/null and b/data/fonts/VeraMono.ttf differ diff --git a/data/images/.cvsignore b/data/images/.cvsignore new file mode 100644 index 0000000..3dda729 --- /dev/null +++ b/data/images/.cvsignore @@ -0,0 +1,2 @@ +Makefile.in +Makefile diff --git a/data/images/Makefile.am b/data/images/Makefile.am new file mode 100644 index 0000000..549786a --- /dev/null +++ b/data/images/Makefile.am @@ -0,0 +1,49 @@ +## Process this file with automake to produce Makefile.in + +# TODO: not all images need to be installed! + +eflpp_pixmapsdir = @PACKAGE_DATA_DIR@/images + +eflpp_pixmaps_DATA = \ + angstrom.png \ + background.png \ + bar_l.png \ + bar_l_sh.png \ + bar_r.png \ + bar_r_sh.png \ + bg.png \ + blue_type.png \ + boing-shadow.png \ + border.png \ + brushed_metal.png \ + crosshair.png \ + e_logo.png \ + e_logo_small.png \ + evas_logo.png \ + fleur_de_lis.png \ + floral.png \ + item_normal.png \ + item_selected.png \ + item_title.png \ + logo.png \ + logo_shad.png \ + numbers.png \ + panel.png \ + panel_shadow.png \ + panel_top.png \ + pingi-shadow.png \ + power_button_0.png \ + power_button_1.png \ + power_button_glow_0.png \ + power_button_glow_1.png \ + ref.png \ + reset_button_0.png \ + reset_button_1.png \ + reset_button_glow_0.png \ + reset_button_glow_1.png \ + shadow.png \ + shad.png \ + tex.png \ + vanille.png + +EXTRA_DIST = $(eflpp_pixmaps_DATA) diff --git a/data/images/angstrom.png b/data/images/angstrom.png new file mode 100644 index 0000000..2a412b9 Binary files /dev/null and b/data/images/angstrom.png differ diff --git a/data/images/background.png b/data/images/background.png new file mode 100644 index 0000000..ccbde90 Binary files /dev/null and b/data/images/background.png differ diff --git a/data/images/bar_l.png b/data/images/bar_l.png new file mode 100644 index 0000000..f76fc5b Binary files /dev/null and b/data/images/bar_l.png differ diff --git a/data/images/bar_l_sh.png b/data/images/bar_l_sh.png new file mode 100644 index 0000000..3eccd30 Binary files /dev/null and b/data/images/bar_l_sh.png differ diff --git a/data/images/bar_r.png b/data/images/bar_r.png new file mode 100644 index 0000000..7a60424 Binary files /dev/null and b/data/images/bar_r.png differ diff --git a/data/images/bar_r_sh.png b/data/images/bar_r_sh.png new file mode 100644 index 0000000..fe53f9a Binary files /dev/null and b/data/images/bar_r_sh.png differ diff --git a/data/images/bg.png b/data/images/bg.png new file mode 100644 index 0000000..ccbde90 Binary files /dev/null and b/data/images/bg.png differ diff --git a/data/images/blue_type.png b/data/images/blue_type.png new file mode 100644 index 0000000..71d4dca Binary files /dev/null and b/data/images/blue_type.png differ diff --git a/data/images/boing-shadow.png b/data/images/boing-shadow.png new file mode 100644 index 0000000..eda0a1f Binary files /dev/null and b/data/images/boing-shadow.png differ diff --git a/data/images/border.png b/data/images/border.png new file mode 100644 index 0000000..ecbb0e2 Binary files /dev/null and b/data/images/border.png differ diff --git a/data/images/brushed_metal.png b/data/images/brushed_metal.png new file mode 100644 index 0000000..7d91bc6 Binary files /dev/null and b/data/images/brushed_metal.png differ diff --git a/data/images/crosshair.png b/data/images/crosshair.png new file mode 100644 index 0000000..b3ebdba Binary files /dev/null and b/data/images/crosshair.png differ diff --git a/data/images/e_logo.png b/data/images/e_logo.png new file mode 100644 index 0000000..7f685c6 Binary files /dev/null and b/data/images/e_logo.png differ diff --git a/data/images/e_logo_small.png b/data/images/e_logo_small.png new file mode 100644 index 0000000..355e78b Binary files /dev/null and b/data/images/e_logo_small.png differ diff --git a/data/images/entry_cursor.png b/data/images/entry_cursor.png new file mode 100644 index 0000000..5d8a87f Binary files /dev/null and b/data/images/entry_cursor.png differ diff --git a/data/images/evas_logo.png b/data/images/evas_logo.png new file mode 100644 index 0000000..ce31158 Binary files /dev/null and b/data/images/evas_logo.png differ diff --git a/data/images/fleur_de_lis.png b/data/images/fleur_de_lis.png new file mode 100644 index 0000000..6418f08 Binary files /dev/null and b/data/images/fleur_de_lis.png differ diff --git a/data/images/floral.png b/data/images/floral.png new file mode 100644 index 0000000..e61fe31 Binary files /dev/null and b/data/images/floral.png differ diff --git a/data/images/item_normal.png b/data/images/item_normal.png new file mode 100644 index 0000000..e05c98f Binary files /dev/null and b/data/images/item_normal.png differ diff --git a/data/images/item_selected.png b/data/images/item_selected.png new file mode 100644 index 0000000..380b54f Binary files /dev/null and b/data/images/item_selected.png differ diff --git a/data/images/item_title.png b/data/images/item_title.png new file mode 100644 index 0000000..0ff4019 Binary files /dev/null and b/data/images/item_title.png differ diff --git a/data/images/logo.png b/data/images/logo.png new file mode 100644 index 0000000..ffcc1d3 Binary files /dev/null and b/data/images/logo.png differ diff --git a/data/images/logo_shad.png b/data/images/logo_shad.png new file mode 100644 index 0000000..2bfe105 Binary files /dev/null and b/data/images/logo_shad.png differ diff --git a/data/images/numbers.png b/data/images/numbers.png new file mode 100644 index 0000000..df04574 Binary files /dev/null and b/data/images/numbers.png differ diff --git a/data/images/panel.png b/data/images/panel.png new file mode 100644 index 0000000..5027f76 Binary files /dev/null and b/data/images/panel.png differ diff --git a/data/images/panel_shadow.png b/data/images/panel_shadow.png new file mode 100644 index 0000000..0c4855a Binary files /dev/null and b/data/images/panel_shadow.png differ diff --git a/data/images/panel_top.png b/data/images/panel_top.png new file mode 100644 index 0000000..872712f Binary files /dev/null and b/data/images/panel_top.png differ diff --git a/data/images/pingi-shadow.png b/data/images/pingi-shadow.png new file mode 100644 index 0000000..73f883d Binary files /dev/null and b/data/images/pingi-shadow.png differ diff --git a/data/images/power_button_0.png b/data/images/power_button_0.png new file mode 100644 index 0000000..8338400 Binary files /dev/null and b/data/images/power_button_0.png differ diff --git a/data/images/power_button_1.png b/data/images/power_button_1.png new file mode 100644 index 0000000..8cd609a Binary files /dev/null and b/data/images/power_button_1.png differ diff --git a/data/images/power_button_glow_0.png b/data/images/power_button_glow_0.png new file mode 100644 index 0000000..a0443e3 Binary files /dev/null and b/data/images/power_button_glow_0.png differ diff --git a/data/images/power_button_glow_1.png b/data/images/power_button_glow_1.png new file mode 100644 index 0000000..64fec31 Binary files /dev/null and b/data/images/power_button_glow_1.png differ diff --git a/data/images/ref.png b/data/images/ref.png new file mode 100644 index 0000000..6f9f55d Binary files /dev/null and b/data/images/ref.png differ diff --git a/data/images/reset_button_0.png b/data/images/reset_button_0.png new file mode 100644 index 0000000..33c563b Binary files /dev/null and b/data/images/reset_button_0.png differ diff --git a/data/images/reset_button_1.png b/data/images/reset_button_1.png new file mode 100644 index 0000000..5305965 Binary files /dev/null and b/data/images/reset_button_1.png differ diff --git a/data/images/reset_button_glow_0.png b/data/images/reset_button_glow_0.png new file mode 100644 index 0000000..dbab3ff Binary files /dev/null and b/data/images/reset_button_glow_0.png differ diff --git a/data/images/reset_button_glow_1.png b/data/images/reset_button_glow_1.png new file mode 100644 index 0000000..ab790d2 Binary files /dev/null and b/data/images/reset_button_glow_1.png differ diff --git a/data/images/shad.png b/data/images/shad.png new file mode 100644 index 0000000..3f7093f Binary files /dev/null and b/data/images/shad.png differ diff --git a/data/images/shadow.png b/data/images/shadow.png new file mode 100644 index 0000000..23f3efc Binary files /dev/null and b/data/images/shadow.png differ diff --git a/data/images/tex.png b/data/images/tex.png new file mode 100644 index 0000000..c88a9ca Binary files /dev/null and b/data/images/tex.png differ diff --git a/data/images/text_view_bg.png b/data/images/text_view_bg.png new file mode 100644 index 0000000..7a295d8 Binary files /dev/null and b/data/images/text_view_bg.png differ diff --git a/data/images/text_view_over.png b/data/images/text_view_over.png new file mode 100644 index 0000000..13a7b7b Binary files /dev/null and b/data/images/text_view_over.png differ diff --git a/data/images/vanille.png b/data/images/vanille.png new file mode 100644 index 0000000..349c303 Binary files /dev/null and b/data/images/vanille.png differ diff --git a/doc/eflpp.css b/doc/eflpp.css new file mode 100644 index 0000000..6117b39 --- /dev/null +++ b/doc/eflpp.css @@ -0,0 +1,178 @@ +td.md { + background-color: #ffffff; + font-family: monospace; + text-align: left; + vertical-align: center; + font-size: 10; + padding-right : 1px; + padding-top : 1px; + padding-left : 1px; + padding-bottom : 1px; + margin-left : 1px; + margin-right : 1px; + margin-top : 1px; + margin-bottom : 1px +} +td.mdname { + font-family: monospace; + text-align: left; + vertical-align: center; + font-size: 10; + padding-right : 1px; + padding-top : 1px; + padding-left : 1px; + padding-bottom : 1px; + margin-left : 1px; + margin-right : 1px; + margin-top : 1px; + margin-bottom : 1px +} +h1 +{ + text-align: center; + color: #333333 +} +h2 +{ + text-align: left; + color: #333333 +} +h3 +{ + text-align: left; + color: #333333 +} +a:link +{ + text-decoration: none; + color: #444444; + font-weight: bold; +} +a:visited +{ + text-decoration: none; + color: #666666; + font-weight: bold; +} +a:hover +{ + text-decoration: none; + color: #000000; + font-weight: bold; +} +a.nav:link +{ + text-decoration: none; + color: #444444; + font-weight: normal; +} +a.nav:visited +{ + text-decoration: none; + color: #666666; + font-weight: normal; +} +a.nav:hover +{ + text-decoration: none; + color: #000000; + font-weight: normal; +} +a.qindex:link +{ + text-decoration: none; + color: #444444; + font-weight: normal; +} +a.qindex:visited +{ + text-decoration: none; + color: #666666; + font-weight: normal; +} +a.qindex:hover +{ + text-decoration: none; + color: #000000; + font-weight: normal; +} +p +{ + color: #000000; + font-family: sans-serif; + font-size: 10; +} +body { + background-image: url("hilite.png"); + background-repeat: no-repeat; + background-position: left top; + background-color: #dddddd; + color: #000000; + font-family: sans-serif; + padding: 8px; + margin: 0; +} +div.fragment +{ + background-image: url("hilite.png"); + background-repeat: no-repeat; + background-position: left top; + border: thin solid #888888; + background-color: #eeeeee; + padding: 4px; + text-align: left; + vertical-align: center; + font-size: 12; +} +hr +{ + border: 0; + background-color: #000000; + width: 80%; + height: 1; +} +dl +{ + background-image: url("hilite.png"); + background-repeat: no-repeat; + background-position: left top; + border: thin solid #aaaaaa; + background-color: #eeeeee; + padding: 4px; + text-align: left; + vertical-align: center; + font-size: 12; +} +em +{ + color: #334466; + font-family: courier; + font-size: 10; + font-style: normal; +} + +div.nav +{ + border: thin solid #000000; + background-color: #ffffff; + padding: 1px; + text-align: center; + vertical-align: center; + font-size: 12; +} +div.body +{ + border: thin solid #000000; + background-color: #ffffff; + padding: 4px; + text-align: left; + font-size: 10; +} +div.diag +{ + border: thin solid #888888; + background-color: #eeeeee; + padding: 4px; + text-align: center; + font-size: 8; +} diff --git a/doc/foot.html b/doc/foot.html new file mode 100644 index 0000000..308b1d0 --- /dev/null +++ b/doc/foot.html @@ -0,0 +1,2 @@ + + diff --git a/doc/head.html b/doc/head.html new file mode 100644 index 0000000..f4ceebb --- /dev/null +++ b/doc/head.html @@ -0,0 +1,19 @@ + + + + +$title + + + + + + diff --git a/doc/img/eflpp.png b/doc/img/eflpp.png new file mode 100644 index 0000000..47597a8 Binary files /dev/null and b/doc/img/eflpp.png differ diff --git a/doc/img/eflpp_big.png b/doc/img/eflpp_big.png new file mode 100644 index 0000000..cd818f7 Binary files /dev/null and b/doc/img/eflpp_big.png differ diff --git a/doc/img/eflpp_mini.png b/doc/img/eflpp_mini.png new file mode 100644 index 0000000..f4f99f0 Binary files /dev/null and b/doc/img/eflpp_mini.png differ diff --git a/doc/img/eflpp_small.png b/doc/img/eflpp_small.png new file mode 100644 index 0000000..8bea367 Binary files /dev/null and b/doc/img/eflpp_small.png differ diff --git a/doc/img/hilite.png b/doc/img/hilite.png new file mode 100644 index 0000000..88a4381 Binary files /dev/null and b/doc/img/hilite.png differ diff --git a/eflpp-uninstalled.pc.in b/eflpp-uninstalled.pc.in new file mode 100644 index 0000000..d5b885b --- /dev/null +++ b/eflpp-uninstalled.pc.in @@ -0,0 +1,13 @@ +prefix= +exec_prefix= +libdir=src +includedir=src + +Name: @PACKAGE@ +Description: EFL C++ Wrapper, Not installed +Version: @VERSION@ +Requires: sigc++-2.0 +Conflicts: +Libs: ${pcfiledir}/${libdir}/libeflpp.la +Cflags: -I${pcfiledir}/${includedir}/common -I${pcfiledir}/${includedir}/ecore -I${pcfiledir}/${includedir}/edb -I${pcfiledir}/${includedir}/edje -I${pcfiledir}/${includedir}/eet -I${pcfiledir}/${includedir}/embryo -I${pcfiledir}/${includedir}/emotion -I${pcfiledir}/${includedir}/esmart -I${pcfiledir}/${includedir}/etk -I${pcfiledir}/${includedir}/evas -I${pcfiledir}/${includedir}/ewl -I${pcfiledir}/${includedir}/misc + diff --git a/eflpp.anjuta b/eflpp.anjuta new file mode 100644 index 0000000..8b9268a --- /dev/null +++ b/eflpp.anjuta @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/eflpp.pc.in b/eflpp.pc.in new file mode 100644 index 0000000..700c93d --- /dev/null +++ b/eflpp.pc.in @@ -0,0 +1,13 @@ +prefix=@prefix@ +exec_prefix=@prefix@ +libdir=@exec_prefix@/lib +includedir=@prefix@/include/eflpp + +Name: @PACKAGE@ +Description: EFL C++ Wrapper +Version: @VERSION@ +Requires: sigc++-2.0 +Conflicts: +Libs: -L${libdir} -leflpp +Cflags: -I${includedir} + diff --git a/examples/.cvsignore b/examples/.cvsignore new file mode 100644 index 0000000..282522d --- /dev/null +++ b/examples/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/examples/Makefile.am b/examples/Makefile.am new file mode 100644 index 0000000..c094733 --- /dev/null +++ b/examples/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = edje esmart etk ewl emotion ecore signals debug diff --git a/examples/angstrom/.cvsignore b/examples/angstrom/.cvsignore new file mode 100644 index 0000000..282522d --- /dev/null +++ b/examples/angstrom/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/examples/angstrom/Makefile.am b/examples/angstrom/Makefile.am new file mode 100644 index 0000000..4962741 --- /dev/null +++ b/examples/angstrom/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = bootmanager diff --git a/examples/angstrom/bootmanager/.cvsignore b/examples/angstrom/bootmanager/.cvsignore new file mode 100644 index 0000000..051d1bd --- /dev/null +++ b/examples/angstrom/bootmanager/.cvsignore @@ -0,0 +1,3 @@ +Makefile +Makefile.in +.deps diff --git a/examples/angstrom/bootmanager/Makefile.am b/examples/angstrom/bootmanager/Makefile.am new file mode 100644 index 0000000..36e74ec --- /dev/null +++ b/examples/angstrom/bootmanager/Makefile.am @@ -0,0 +1,30 @@ +## Process this file with automake to produce Makefile.in + +INCLUDES = + +AM_CXXFLAGS =\ + @PACKAGE_CFLAGS@ \ + -I$(top_srcdir)/src/ecore/ \ + -I$(top_srcdir)/src/evas/ \ + -I$(top_srcdir)/src/edje/ \ + -I$(top_srcdir)/src/common/ \ + -Wall + + +bin_PROGRAMS = eflpp_angstrom_bootmanager + +eflpp_angstrom_bootmanager_SOURCES = \ + app.cpp \ + app.h \ + calibrate.cpp \ + calibrate.h \ + main.cpp \ + Makefile.am \ + win.cpp \ + win.h + +eflpp_angstrom_bootmanager_LDFLAGS = @PACKAGE_LIBS@ + +eflpp_angstrom_bootmanager_LDADD = $(top_builddir)/src/libeflpp.la + +eflpp_angstrom_bootmanager_DEPENDENCIES = $(top_builddir)/src/libeflpp.la diff --git a/examples/angstrom/bootmanager/app.cpp b/examples/angstrom/bootmanager/app.cpp new file mode 100644 index 0000000..7013c19 --- /dev/null +++ b/examples/angstrom/bootmanager/app.cpp @@ -0,0 +1,31 @@ +#include "app.h" + +#include +using namespace efl; + +#include +#include +using namespace std; + +BootManagerApp::BootManagerApp( int argc, const char** argv, const char* title ) + :EcoreApplication( argc, argv, title ) +{ +} + +BootManagerApp::~BootManagerApp() +{ +} + +void BootManagerApp::suspend( const char*, const char* ) +{ + cout << "APP: suspending..." << endl; + //FIXME Add confirmation dialog + //::system( "apm --suspend" ); +} + +void BootManagerApp::reboot() +{ + cout << "APP: rebooting..." << endl; + //FIXME Add confirmation dialog + //::system( "reboot" ); +} diff --git a/examples/angstrom/bootmanager/app.h b/examples/angstrom/bootmanager/app.h new file mode 100644 index 0000000..3543e25 --- /dev/null +++ b/examples/angstrom/bootmanager/app.h @@ -0,0 +1,20 @@ +#ifndef BOOTMANAGER_APP_H +#define BOOTMANAGER_APP_H + +#include +using namespace efl; + +class BootManagerApp : public EcoreApplication +{ + public: + BootManagerApp( int argc, const char** argv, const char* title ); + ~BootManagerApp(); + + public: /* slots */ + void suspend( const char*, const char* ); + void reboot(); +}; + +#endif + + diff --git a/examples/angstrom/bootmanager/calibrate.cpp b/examples/angstrom/bootmanager/calibrate.cpp new file mode 100644 index 0000000..a22c279 --- /dev/null +++ b/examples/angstrom/bootmanager/calibrate.cpp @@ -0,0 +1,301 @@ +#include "calibrate.h" + +#include +#include +using namespace std; + +#include +#include + +#ifdef ENABLE_EFLPP_FB +#include +#endif + +#include + +const unsigned int offset = 32; + +static Ecore_Event_Filter* filter = 0; + +static void* calibration_event_filter_start( void* data ) +{ + return 0; +} + +static int calibration_event_filter_event( void* loop_data, void *data, int type, void* event ) +{ +#ifdef ENABLE_EFLPP_FB + if ( type == ECORE_FB_EVENT_MOUSE_BUTTON_UP ) + { + Ecore_Fb_Event_Mouse_Button_Up* ev = static_cast( event ); + cout << " - data = " << data << endl; + cout << " - mouse button up at position = " << ev->x << ", " << ev->y << endl; + CalibrationRectangle* cr = reinterpret_cast( data ); + cr->nextPoint( ev->x, ev->y ); + return 0; // swallow event + } + else +#endif + { + return 1; // keep event + } +} + +static void calibration_event_filter_end( void* data, void *loop_data ) +{ +} + +CalibrationRectangle::CalibrationRectangle( int x, int y, int width, int height, EvasCanvas* evas ) + :EvasRectangle( x, y, width, height, evas, "CalibrationRectangle" ) +{ + setLayer( 255 ); + setColor( 255, 255, 255, 0 ); // white, fully transparent + + // setup the five calibration points + Size s = evas->size(); + cd.canvasPoints[TopLeft].set( offset, offset ); + cd.canvasPoints[BottomLeft].set( offset, s.height()-offset ); + cd.canvasPoints[BottomRight].set( s.width()-offset, s.height()-offset ); + cd.canvasPoints[TopRight].set( s.width()-offset, offset ); + cd.canvasPoints[Center].set( s.width()/2, s.height()/2 ); + + switch ( eApp->mainWindow()->rotation() ) + { + case 0: + cout << "ROT 0" << endl; + cd.screenPoints[TopLeft] = cd.canvasPoints[TopLeft]; + cd.screenPoints[BottomLeft] = cd.canvasPoints[BottomLeft]; + cd.screenPoints[BottomRight] = cd.canvasPoints[BottomRight]; + cd.screenPoints[TopRight] = cd.canvasPoints[TopRight]; + cd.screenPoints[Center] = cd.canvasPoints[Center]; + break; + case 90: + cd.screenPoints[TopLeft] = cd.canvasPoints[TopLeft]; + cd.screenPoints[BottomLeft] = cd.canvasPoints[BottomLeft]; + cd.screenPoints[BottomRight] = cd.canvasPoints[BottomRight]; + cd.screenPoints[TopRight] = cd.canvasPoints[TopRight]; + cd.screenPoints[Center] = cd.canvasPoints[Center]; + break; + case 180: + cd.screenPoints[TopLeft] = cd.canvasPoints[TopLeft]; + cd.screenPoints[BottomLeft] = cd.canvasPoints[BottomLeft]; + cd.screenPoints[BottomRight] = cd.canvasPoints[BottomRight]; + cd.screenPoints[TopRight] = cd.canvasPoints[TopRight]; + cd.screenPoints[Center] = cd.canvasPoints[Center]; + break; + case 270: + cout << "ROT 270" << endl; + cd.screenPoints[TopLeft].set( s.height()-offset, offset ); + cd.screenPoints[BottomLeft].set( offset, offset ); + cd.screenPoints[BottomRight].set( offset, s.width()-offset ); + cd.screenPoints[TopRight].set( s.height()-offset, s.width()-offset ); + cd.screenPoints[Center].set( s.height()/2, s.width()/2 ); + break; + } + + // setup background + background = new EvasGradient( 0, 0, s.width(), s.height(), evas ); + background->setLayer( 21 ); + background->setAngle( 15 ); + background->addColor( 255, 255, 255, 255, 10 ); + background->addColor( 200, 200, 200, 255, 10 ); + background->addColor( 255, 255, 255, 255, 10 ); + background->show(); + + // setup text + text = new EvasText( PACKAGE_DATA_DIR "/fonts/Vera.ttf", 12, 0, s.height()/2, "foo", evas ); + text->setColor( 0, 0, 0, 255 ); + text->setLayer( 22 ); + text->setText( "Click on crosshair to calibrate screen" ); + text->show(); + + // setup crosshair +#if 0 + crosshair = new EvasImage( PACKAGE_DATA_DIR "/images/crosshair.png", evas ); + crosshair->setLayer( 23 ); +#else + crosshairhorz = new EvasLine( evas ); + crosshairvert = new EvasLine( evas ); + crosshairhorz->setLayer( 23 ); + crosshairvert->setLayer( 23 ); + crosshairhorz->setColor( 0, 0, 0, 255 ); + crosshairvert->setColor( 0, 0, 0, 255 ); + crosshairhorz->show(); + crosshairvert->show(); +#endif +} + +CalibrationRectangle::~CalibrationRectangle() +{ +} + +bool CalibrationRectangle::handleShow() +{ +#ifdef ENABLE_EFLPP_FB + ecore_fb_touch_screen_calibrate_set( 1, 0, 0, 0, 0 ); +#endif + cout << "this = " << this << endl; + filter = ecore_event_filter_add( &calibration_event_filter_start, + &calibration_event_filter_event, + &calibration_event_filter_end, this ); + position = TopLeft; + moveCrossHair(); +} + +void CalibrationRectangle::nextPoint( int x, int y ) +{ + cd.devicePoints[position].set( x, y ); + + if ( ++position <= LastPosition ) + { + moveCrossHair(); + } + else + { + //FIXME: Don't delete or hide, dissolve, and after that, hide :D + //hide(); + hide(); + delete background; +#if 0 + delete crosshair; +#else + delete crosshairhorz; + delete crosshairvert; +#endif + delete text; + //crosshair->hide(); + //text->hide(); +#ifdef ENABLE_EFLPP_FB + ecore_fb_touch_screen_calibrate_set( 0, 0, 0, 0, 0 ); +#endif + ecore_event_filter_del( filter ); + calibrate(); + done.emit(); + } +} + +void CalibrationRectangle::moveCrossHair() +{ +#if 0 + crosshair->move( cd.canvasPoints[position] ); + crosshair->show(); +#else + int x = cd.canvasPoints[position].x(); + int y = cd.canvasPoints[position].y(); + crosshairhorz->setGeometry( x-offset/2, y, offset, 0 ); + crosshairvert->setGeometry( x, y-offset/2, 0, offset ); +#endif +} + +bool CalibrationRectangle::calibrate() +{ + // calibration code based on ts_calibrate.c (C) Russell King + + int j; + float n, x, y, x2, y2, xy, z, zx, zy; + float det, cal_a, cal_b, cal_c, cal_d, cal_e, cal_f, cal_i; + float scaling = 65536.0; + int cal_x[5], cal_xfb[5], cal_y[5], cal_yfb[5], cal_o[7]; + + cal_x[0]=cd.devicePoints[ TopLeft ].x(); + cal_y[0]=cd.devicePoints[ TopLeft ].y(); + cal_x[1]=cd.devicePoints[ TopRight ].x(); + cal_y[1]=cd.devicePoints[ TopRight ].y(); + cal_x[2]=cd.devicePoints[ BottomLeft ].x(); + cal_y[2]=cd.devicePoints[ BottomLeft ].y(); + cal_x[3]=cd.devicePoints[ BottomRight ].x(); + cal_y[3]=cd.devicePoints[ BottomRight ].y(); + cal_x[4]=cd.devicePoints[ Center ].x(); + cal_y[4]=cd.devicePoints[ Center ].y(); + + cal_xfb[0]=cd.screenPoints[ TopLeft ].x(); + cal_yfb[0]=cd.screenPoints[ TopLeft ].y(); + cal_xfb[1]=cd.screenPoints[ TopRight ].x(); + cal_yfb[1]=cd.screenPoints[ TopRight ].y(); + cal_xfb[2]=cd.screenPoints[ BottomLeft ].x(); + cal_yfb[2]=cd.screenPoints[ BottomLeft ].y(); + cal_xfb[3]=cd.screenPoints[ BottomRight ].x(); + cal_yfb[3]=cd.screenPoints[ BottomRight ].y(); + cal_xfb[4]=cd.screenPoints[ Center ].x(); + cal_yfb[4]=cd.screenPoints[ Center ].y(); + + // Get sums for matrix + n = x = y = x2 = y2 = xy = 0; + for(j=0;j<5;j++) { + n += 1.0; + x += (float)cal_x[j]; + y += (float)cal_y[j]; + x2 += (float)(cal_x[j]*cal_x[j]); + y2 += (float)(cal_y[j]*cal_y[j]); + xy += (float)(cal_x[j]*cal_y[j]); + } + + // Get determinant of matrix -- check if determinant is too small + det = n*(x2*y2 - xy*xy) + x*(xy*y - x*y2) + y*(x*xy - y*x2); + if ( det < 0.1 && det > -0.1 ) + { + cout << "CalibrationRectangle::calibrate() - determinant " << det << " is too small - aborting." << endl; + return false; + } + + // Get elements of inverse matrix + cal_a = (x2*y2 - xy*xy)/det; + cal_b = (xy*y - x*y2)/det; + cal_c = (x*xy - y*x2)/det; + cal_e = (n*y2 - y*y)/det; + cal_f = (x*y - n*xy)/det; + cal_i = (n*x2 - x*x)/det; + + // Get sums for x calibration + z = zx = zy = 0; + for( j=0; j < 5; j++ ) { + z += (float)cal_xfb[j]; + zx += (float)(cal_xfb[j]*cal_x[j]); + zy += (float)(cal_xfb[j]*cal_y[j]); + } + + // Now multiply out to get the calibration for framebuffer x coord + cal_o[0] = (int)((cal_a*z + cal_b*zx + cal_c*zy)*(scaling)); + cal_o[1] = (int)((cal_b*z + cal_e*zx + cal_f*zy)*(scaling)); + cal_o[2] = (int)((cal_c*z + cal_f*zx + cal_i*zy)*(scaling)); + + cout << "CAL: " << (cal_a*z + cal_b*zx + cal_c*zy) << " " + << (cal_b*z + cal_e*zx + cal_f*zy) << " " + << (cal_c*z + cal_f*zx + cal_i*zy) << endl; + + // Get sums for y calibration + z = zx = zy = 0; + for (j=0;j<5;j++) { + z += (float)cal_yfb[j]; + zx += (float)(cal_yfb[j]*cal_x[j]); + zy += (float)(cal_yfb[j]*cal_y[j]); + } + + // Now multiply out to get the calibration for framebuffer y coord + cal_o[3] = (int)((cal_a*z + cal_b*zx + cal_c*zy)*(scaling)); + cal_o[4] = (int)((cal_b*z + cal_e*zx + cal_f*zy)*(scaling)); + cal_o[5] = (int)((cal_c*z + cal_f*zx + cal_i*zy)*(scaling)); + + cout << "CAL: " << (cal_a*z + cal_b*zx + cal_c*zy) << " " + << (cal_b*z + cal_e*zx + cal_f*zy) << " " + << (cal_c*z + cal_f*zx + cal_i*zy) << endl; + + + // If we got here, we're OK, so assign scaling to a[6] and return + cal_o[6] = (int) scaling; + + cout << "CAL constants: " << cal_o[0] << " " << cal_o[1] << " " << cal_o[2] << " " + << cal_o[3] << " " << cal_o[4] << " " << cal_o[5] << " " << cal_o[6] << endl; + + FILE* stream = fopen( "/etc/pointercal", "w" ); + if ( stream == NULL ) + { + cout << "CalibrationRectangle::calibrate() - couldn't open /etc/pointercal (" << strerror( errno ) << ")" << endl; + return false; + } + + fprintf( stream, "%d %d %d %d %d %d %d\n", cal_o[1], cal_o[2], cal_o[0], cal_o[4], cal_o[5], cal_o[3], cal_o[6] ); + fclose( stream ); + + return true; +} diff --git a/examples/angstrom/bootmanager/calibrate.h b/examples/angstrom/bootmanager/calibrate.h new file mode 100644 index 0000000..aaf9338 --- /dev/null +++ b/examples/angstrom/bootmanager/calibrate.h @@ -0,0 +1,50 @@ +#ifndef CALIBRATE_H +#define CALIBRATE_H + +#include +using namespace efl; + +enum +{ + TopLeft = 0, + TopRight = 1, + BottomRight = 2, + BottomLeft = 3, + Center = 4, + LastPosition = Center +}; + +class CalibrationData +{ + public: + Point devicePoints[5]; // unrotated, unscaled + Point screenPoints[5]; // unrotated, scaled + Point canvasPoints[5]; // rotated, scaled +}; + +class CalibrationRectangle : public EvasRectangle +{ +public: + CalibrationRectangle( int x, int y, int width, int height, EvasCanvas* evas ); + virtual ~CalibrationRectangle(); + + Signal done; + + bool calibrate(); + void nextPoint( int x, int y ); + +protected: + virtual bool handleShow(); + void moveCrossHair(); + +private: + CalibrationData cd; + unsigned int position; + EvasGradient* background; + EvasImage* crosshair; + EvasLine* crosshairhorz; + EvasLine* crosshairvert; + EvasText* text; +}; + +#endif diff --git a/examples/angstrom/bootmanager/main.cpp b/examples/angstrom/bootmanager/main.cpp new file mode 100644 index 0000000..0e49613 --- /dev/null +++ b/examples/angstrom/bootmanager/main.cpp @@ -0,0 +1,16 @@ +#include "app.h" +#include "win.h" + +// Ångström BootManager + +int main( int argc, const char **argv ) +{ + BootManagerApp application( argc, argv, "Angstrom BootManager" ); + BootManagerWin* window = new BootManagerWin( 240, 320 ); + window->show(); + + application.exec(); + + return 0; +} + diff --git a/examples/angstrom/bootmanager/win.cpp b/examples/angstrom/bootmanager/win.cpp new file mode 100644 index 0000000..a774749 --- /dev/null +++ b/examples/angstrom/bootmanager/win.cpp @@ -0,0 +1,42 @@ +#include "app.h" +#include "win.h" + +/* EFL */ +#include +#include +#include + +#include + +using namespace efl; + +BootManagerWin::BootManagerWin( int width, int height ) + :EcoreEvasWindow( width, height ), _app( static_cast( eApp ) ) +{ + EvasCanvas* evas = canvas(); + + //FIXME: Why does that crash if created in slotCalibrationDone() ? + background = new EvasEdje( 0, 0, PACKAGE_DATA_DIR "/edjes/angstrom-bootmanager.edj", "background", evas ); + background->setLayer( 0 ); + background->resize( evas->size() ); + background->part( "version" )->setText( "Angstrom V2006.01" ); + background->show(); + + //FIXME: Focus handling on buttons is not quite right if and only if the calibration is created... evas/edje bug? + buttons = new EvasEdje( 0, 0, PACKAGE_DATA_DIR "/edjes/angstrom-bootmanager.edj", "buttons", evas ); + buttons->setLayer( 1 ); + buttons->resize( evas->size() ); + buttons->show(); + + buttons->connect( "angstrom|system|suspend", "*", sigc::mem_fun( _app, &BootManagerApp::suspend ) ); + buttons->connect( "angstrom|system|reboot", "*", sigc::hide(sigc::hide(sigc::mem_fun( _app, &BootManagerApp::reboot ) ) ) ); +} + +BootManagerWin::~BootManagerWin() +{ +} + +void BootManagerWin::slotCalibrationDone() +{ + // scan available boot devices and show them in a list +} diff --git a/examples/angstrom/bootmanager/win.h b/examples/angstrom/bootmanager/win.h new file mode 100644 index 0000000..7c1c657 --- /dev/null +++ b/examples/angstrom/bootmanager/win.h @@ -0,0 +1,27 @@ +#ifndef BOOTMANAGER_WIN_H +#define BOOTMANAGER_WIN_H + +#include +#include +#include +using namespace efl; + +class BootManagerApp; + +class BootManagerWin : public EcoreEvasWindow +{ + public: + BootManagerWin( int height, int width ); + ~BootManagerWin(); + + void slotCalibrationDone(); + + private: + BootManagerApp* _app; + EvasEdje* background; + EvasEdje* buttons; +}; + +#endif + + diff --git a/examples/debug/.cvsignore b/examples/debug/.cvsignore new file mode 100644 index 0000000..282522d --- /dev/null +++ b/examples/debug/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/examples/debug/Makefile.am b/examples/debug/Makefile.am new file mode 100644 index 0000000..a9468ce --- /dev/null +++ b/examples/debug/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = simple diff --git a/examples/debug/simple/.cvsignore b/examples/debug/simple/.cvsignore new file mode 100644 index 0000000..581407e --- /dev/null +++ b/examples/debug/simple/.cvsignore @@ -0,0 +1,5 @@ +Makefile +Makefile.in +.deps +.libs +eflpp_debug_simple diff --git a/examples/debug/simple/Makefile.am b/examples/debug/simple/Makefile.am new file mode 100644 index 0000000..9436051 --- /dev/null +++ b/examples/debug/simple/Makefile.am @@ -0,0 +1,20 @@ +## Process this file with automake to produce Makefile.in + +INCLUDES = + +AM_CXXFLAGS =\ + @PACKAGE_CFLAGS@ \ + -I$(top_srcdir)/src/common/ \ + -Wall + + +bin_PROGRAMS = eflpp_debug_simple + +eflpp_debug_simple_SOURCES = \ + main.cpp + +eflpp_debug_simple_LDFLAGS = @PACKAGE_LIBS@ + +eflpp_debug_simple_LDADD = $(top_builddir)/src/libeflpp.la + +eflpp_debug_simple_DEPENDENCIES = $(top_builddir)/src/libeflpp.la diff --git a/examples/debug/simple/main.cpp b/examples/debug/simple/main.cpp new file mode 100644 index 0000000..5d2844c --- /dev/null +++ b/examples/debug/simple/main.cpp @@ -0,0 +1,51 @@ +#include +#include +#include +using namespace efl; + +#include +using std::cout; +using std::cin; +using std::endl; + +class DebugGuard +{ +public: + DebugGuard( const char* fn ) : _fn( fn ) { eflDout( dc::notice, "Entering " << _fn ); }; + ~DebugGuard() { eflDout( dc::notice, "Leaving " << _fn ); }; + private: + const char* _fn; +}; + +int test2( int bar ) +{ + DebugGuard g( __PRETTY_FUNCTION__ ); + return bar; +} + +int test( int foo ) +{ + DebugGuard g( __PRETTY_FUNCTION__ ); + return test2( -foo ); +} + +int main(int argc, char **argv, char **envv) +{ + eflDebug( "EFL_DEBUG_DEMO: Using eflDebug - This is a test..." ); + eflDout( dc::notice, "EFL_DEBUG_DEMO: Using eflDout - Debug Output" ); + + Rect r( 10, 10, 50, 50 ); + Color c( 10, 20, 30, 40 ); + Point p( -50, -30 ); + Size s( 640, 480 ); + + //cout << r << c << p << s << endl; + + eflDout( dc::notice, "This is a value " << test( 20 ) ); + + eflForAllDebugChannels( "EFL_DEBUG_DEMO: Test..." ); + eflDoutFatal( dc::fatal, "EFL_DEBUG_DEMO: Using eflDoutFatal(dc::fatal) - A fatal error occured... exiting." ); + eflDoutFatal( dc::core, "EFL_DEBUG_DEMO: Using eflDoutFatal(dc::core) - A fatal error occured... exiting." ); + + return 0; +} diff --git a/examples/ecore/.cvsignore b/examples/ecore/.cvsignore new file mode 100644 index 0000000..282522d --- /dev/null +++ b/examples/ecore/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/examples/ecore/3dstars/.cvsignore b/examples/ecore/3dstars/.cvsignore new file mode 100644 index 0000000..08f47c9 --- /dev/null +++ b/examples/ecore/3dstars/.cvsignore @@ -0,0 +1,5 @@ +Makefile +Makefile.in +.deps +.libs +eflpp_ecore_3dstars diff --git a/examples/ecore/3dstars/Makefile.am b/examples/ecore/3dstars/Makefile.am new file mode 100644 index 0000000..7167e90 --- /dev/null +++ b/examples/ecore/3dstars/Makefile.am @@ -0,0 +1,22 @@ +## Process this file with automake to produce Makefile.in + +INCLUDES = + +AM_CXXFLAGS =\ + @PACKAGE_CFLAGS@ \ + -I$(top_srcdir)/src/ecore/ \ + -I$(top_srcdir)/src/evas/ \ + -I$(top_srcdir)/src/common/ \ + -Wall + + +bin_PROGRAMS = eflpp_ecore_3dstars + +eflpp_ecore_3dstars_SOURCES = \ + main.cpp + +eflpp_ecore_3dstars_LDFLAGS = @PACKAGE_LIBS@ + +eflpp_ecore_3dstars_LDADD = $(top_builddir)/src/libeflpp.la + +eflpp_ecore_3dstars_DEPENDENCIES = $(top_builddir)/src/libeflpp.la diff --git a/examples/ecore/3dstars/main.cpp b/examples/ecore/3dstars/main.cpp new file mode 100644 index 0000000..d86b837 --- /dev/null +++ b/examples/ecore/3dstars/main.cpp @@ -0,0 +1,116 @@ +#include +#include +#include +#include +using namespace efl; + +const unsigned int WIDTH = 600; +const unsigned int HEIGHT = 600; +const unsigned int STARS = 64; +const unsigned int speed = 15; +const double rotation = 0.0005; + +static int width = 0; +static int height = 0; + +#include +#include +#include +using std::pair; +using std::list; + +class Star : public EvasLine +{ + static double angle; + public: + Star( EvasCanvas* evas ) : EvasLine( evas ) + { + setLayer( 10 ); + reset(); + draw(); + } + void reset() + { + _x = -500.0 + (1000.0*rand() / (RAND_MAX -500.0)); + _y = -500.0 + (1000.0*rand() / (RAND_MAX -500.0)); + _z = 256.0 + (1000.0*rand() / (RAND_MAX +256.0)); + eflDout( dc::notice, "Star @ " << _x << ", " << _y << ", " << _z ); + } + void draw() + { + setColor( 255, 255, 255, 255 ); + int _xrot = _x * cos( angle ) - _y * sin( angle ); + int _yrot = _x * sin( angle ) + _y * cos( angle ); + int x = _xrot*256.0/_z + width/2; + int y = _yrot*256.0/_z + height/2; + if ( (x > width) || (y > height) || (x<0) || (y<0) ) + { + eflDout( dc::notice, "Star ( " << x << ", " << y << ") left the screen @ zpos = " << _z ); + hide(); + reset(); + } + else + { + setGeometry( x, y, 1, 0 ); + setColor( (int)(300-_z/5), (int)(300-_z/5), (int)(300-_z/5), 255 ); + show(); + } + } + void advance( int velocity, double rotation ) + { + angle += rotation; + _z -= speed; + draw(); + } + ~Star() {}; + private: + double _x; + double _y; + double _z; +}; + +double Star::angle = 0; +typedef list Starfield; +typedef list::iterator StarfieldIterator; +Starfield starfield; + +void advance( EcoreTimer* e ) +{ + for (StarfieldIterator it = starfield.begin(); it != starfield.end(); ++it ) + { + Star* star = *it; + star->advance( speed, rotation ); + } +} + +int main( int argc, const char **argv ) +{ + EcoreApplication* app = new efl::EcoreApplication( argc, argv, "Ecore 3D Stars Test" ); + EcoreEvasWindowSoftwareX11* mw = new efl::EcoreEvasWindowSoftwareX11( WIDTH, HEIGHT ); + EvasCanvas* evas = mw->canvas(); + + Rect bg = evas->geometry(); + width = bg.width(); + height = bg.height(); + + EvasRectangle* r = new EvasRectangle( bg, evas ); + r->setColor( 0, 0, 0, 255 ); + r->setLayer( 0 ); + r->show(); + + for ( unsigned int i = 0; i < STARS; ++i ) + { + starfield.push_back( new Star( evas ) ); + } + + ( new EcoreTimer( 0.05 ) )->timeout.connect( sigc::ptr_fun( advance ) ); + + /* Enter the application main loop */ + app->exec(); + + /* Delete the application */ + delete app; + + return 0; +} + diff --git a/examples/ecore/Makefile.am b/examples/ecore/Makefile.am new file mode 100644 index 0000000..70ac757 --- /dev/null +++ b/examples/ecore/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = 3dstars calibrate callbacks config paint simple stars timers list x diff --git a/examples/ecore/calibrate/.cvsignore b/examples/ecore/calibrate/.cvsignore new file mode 100644 index 0000000..8f90184 --- /dev/null +++ b/examples/ecore/calibrate/.cvsignore @@ -0,0 +1,5 @@ +Makefile +Makefile.in +.deps +.libs +eflpp_ecore_calibrate diff --git a/examples/ecore/calibrate/Makefile.am b/examples/ecore/calibrate/Makefile.am new file mode 100644 index 0000000..7493157 --- /dev/null +++ b/examples/ecore/calibrate/Makefile.am @@ -0,0 +1,24 @@ +## Process this file with automake to produce Makefile.in + +INCLUDES = + +AM_CXXFLAGS =\ + @PACKAGE_CFLAGS@ \ + -I$(top_srcdir)/src/ecore/ \ + -I$(top_srcdir)/src/evas/ \ + -I$(top_srcdir)/src/common/ \ + -Wall + + +bin_PROGRAMS = eflpp_ecore_calibrate + +eflpp_ecore_calibrate_SOURCES = \ + main.cpp \ + calibrate.cpp \ + calibrate.h + +eflpp_ecore_calibrate_LDFLAGS = @PACKAGE_LIBS@ + +eflpp_ecore_calibrate_LDADD = $(top_builddir)/src/libeflpp.la + +eflpp_ecore_calibrate_DEPENDENCIES = $(top_builddir)/src/libeflpp.la diff --git a/examples/ecore/calibrate/calibrate.cpp b/examples/ecore/calibrate/calibrate.cpp new file mode 100644 index 0000000..932fc02 --- /dev/null +++ b/examples/ecore/calibrate/calibrate.cpp @@ -0,0 +1,416 @@ +#include + +#include "calibrate.h" + +#include +#include +using namespace std; + +#include +#include + +#ifdef ENABLE_EFLPP_FB +#include +#endif + +#include + +#define CALIBRATE_FANCY_CROSSHAIR 1 + +const unsigned int offset = 32; + +static Ecore_Event_Filter* filter = 0; + +static void* calibration_event_filter_start( void* data ) +{ + return 0; +} + +#warning FIXME this is wrong +#define ECORE_FB_EVENT_MOUSE_BUTTON_UP 2 + +static int calibration_event_filter_event( void* loop_data, void *data, int type, void* event ) +{ +#ifdef ENABLE_EFLPP_FB + if ( type == ECORE_FB_EVENT_MOUSE_BUTTON_UP ) + { + Ecore_Fb_Event_Mouse_Button_Up* ev = static_cast( event ); + cout << " - data = " << data << endl; + cout << " - mouse button up at position = " << ev->x << ", " << ev->y << endl; + CalibrationRectangle* cr = reinterpret_cast( data ); + cr->nextPoint( ev->x, ev->y ); + return 0; // swallow event + } + else +#endif + { + return 1; // keep event + } +} + +static void calibration_event_filter_end( void* data, void *loop_data ) +{ +} + +CalibrationRectangle::CalibrationRectangle( int x, int y, int width, int height, EvasCanvas* evas ) + :EvasRectangle( x, y, width, height, evas, "CalibrationRectangle" ), Trackable( "CalibrationRectangle" ) +{ + setLayer( 255 ); + setColor( 255, 255, 255, 0 ); // white, fully transparent + + // setup the five calibration points + Size s = evas->size(); + cd.canvasPoints[TopLeft].set( offset, offset ); + cd.canvasPoints[BottomLeft].set( offset, s.height()-offset ); + cd.canvasPoints[BottomRight].set( s.width()-offset, s.height()-offset ); + cd.canvasPoints[TopRight].set( s.width()-offset, offset ); + cd.canvasPoints[Center].set( s.width()/2, s.height()/2 ); + + switch ( eApp->mainWindow()->rotation() ) + { + case 0: + cout << "ROT 0" << endl; + cd.screenPoints[TopLeft] = cd.canvasPoints[TopLeft]; + cd.screenPoints[BottomLeft] = cd.canvasPoints[BottomLeft]; + cd.screenPoints[BottomRight] = cd.canvasPoints[BottomRight]; + cd.screenPoints[TopRight] = cd.canvasPoints[TopRight]; + cd.screenPoints[Center] = cd.canvasPoints[Center]; + break; + case 90: + //FIXME + cd.screenPoints[TopLeft] = cd.canvasPoints[TopLeft]; + cd.screenPoints[BottomLeft] = cd.canvasPoints[BottomLeft]; + cd.screenPoints[BottomRight] = cd.canvasPoints[BottomRight]; + cd.screenPoints[TopRight] = cd.canvasPoints[TopRight]; + cd.screenPoints[Center] = cd.canvasPoints[Center]; + break; + case 180: + //FIXME + cd.screenPoints[TopLeft] = cd.canvasPoints[TopLeft]; + cd.screenPoints[BottomLeft] = cd.canvasPoints[BottomLeft]; + cd.screenPoints[BottomRight] = cd.canvasPoints[BottomRight]; + cd.screenPoints[TopRight] = cd.canvasPoints[TopRight]; + cd.screenPoints[Center] = cd.canvasPoints[Center]; + break; + case 270: + cout << "ROT 270" << endl; + cd.screenPoints[TopLeft].set( s.height()-offset, offset ); + cd.screenPoints[BottomLeft].set( offset, offset ); + cd.screenPoints[BottomRight].set( offset, s.width()-offset ); + cd.screenPoints[TopRight].set( s.height()-offset, s.width()-offset ); + cd.screenPoints[Center].set( s.height()/2, s.width()/2 ); + break; + } + + // setup floor + EvasRectangle* floor = new EvasRectangle( 0, 0, s.width(), s.height(), evas ); + floor->setLayer( 0 ); + floor->setColor( 0, 0, 0, 255 ); + floor->show(); + + // setup background + background = new EvasGradient( 0, 0, s.width(), s.height(), evas ); + background->setLayer( 5 ); + background->setAngle( angle = 13 ); + background->addColorStop( 255, 255, 255, 255, 10 ); + background->addColorStop( 170, 160, 190, 255, 5 ); + background->addColorStop( 255, 255, 240, 255, 10 ); + background->setColor( 255, 255, 255, 255 ); + //background->show(); + //new CalibrationAnimator( CalibrationAnimator::alpha, background, 255, 0 ); + + EvasImage* t1 = new EvasImage( PACKAGE_DATA_DIR "/images/panel.png", evas ); + t1->setGeometry( 0, 0, s.width(), s.height() ); + t1->setColor( 255, 255, 255, 255 ); + t1->setLayer( 10 ); + t1->show(); + + EvasImage* t2 = new EvasImage( PACKAGE_DATA_DIR "/images/shadow.png", evas ); + t2->setGeometry( 0, 0, s.width(), s.height() ); + t2->setLayer( 15 ); + t2->show(); + + // setup text + text = new EvasText( PACKAGE_DATA_DIR "/fonts/Vera.ttf", 12, 5, s.height()/2.5, "foo", evas ); + text->setColor( 0, 0, 0, 255 ); + text->setLayer( 22 ); + text->setText( "Click on crosshair to calibrate screen" ); + text->show(); + +#if 1 + EvasImage* image = new EvasImage( PACKAGE_DATA_DIR "/images/angstrom.png", evas ); + image->rresize( 0.6 ); + Rect geom = image->geometry(); + cout << "Image size = " << image->size() << ", trueSize = " << image->trueSize() << ", geometry = " << image->geometry() << endl; + image->move( width/2-geom.width()/2, height-geom.height() ); + image->setColor( 255, 255, 255, 255 ); + image->setLayer( 15 ); + image->show(); +#endif + EcoreAnimator::setFrameTime( 0.004 ); + + // setup crosshair + crosshair = new EvasImage( PACKAGE_DATA_DIR "/images/crosshair.png", evas ); + crosshair->setLayer( 23 ); + crosshairShadow = new EvasImage( PACKAGE_DATA_DIR "/images/crosshair.png", evas ); + crosshairShadow->setLayer( 22 ); + crosshairShadow->setColor( 150, 150, 150, 50 ); + + crosshairhorz = new EvasLine( evas ); + crosshairvert = new EvasLine( evas ); + crosshairhorz->setLayer( 23 ); + crosshairvert->setLayer( 23 ); + crosshairhorz->setColor( 0, 0, 0, 255 ); + crosshairvert->setColor( 0, 0, 0, 255 ); + +#ifdef CALIBRATE_FANCY_CROSSHAIR + crosshair->show(); + crosshairShadow->show(); +#else + crosshairhorz->show(); + crosshairvert->show(); +#endif + +} + +CalibrationRectangle::~CalibrationRectangle() +{ +} + +bool CalibrationRectangle::handleShow() +{ + filter = ecore_event_filter_add( &calibration_event_filter_start, + &calibration_event_filter_event, + &calibration_event_filter_end, this ); + position = TopLeft; + moveCrossHair(); + + return true; +} + +bool CalibrationRectangle::handleMouseUp( const EvasMouseUpEvent& e ) +{ + nextPoint( e.data->canvas.x, e.data->canvas.y ); + + return true; +} + +void CalibrationRectangle::nextPoint( int x, int y ) +{ + cd.devicePoints[position].set( x, y ); + + if ( ++position <= LastPosition ) + { + moveCrossHair(); + } + else + { + //FIXME: Don't delete or hide, dissolve, and after that, hide :D + //hide(); + /*hide(); + delete background; + delete crosshair; + delete crosshairhorz; + delete crosshairvert; + delete text; + */ + //crosshair->hide(); + //text->hide(); + ecore_event_filter_del( filter ); + calibrate(); + done.emit(); + eApp->quit(); + } +} + +void CalibrationRectangle::moveCrossHair() +{ + int x = cd.canvasPoints[position].x(); + int y = cd.canvasPoints[position].y(); + Size s = crosshair->size(); +// crosshair->move( x-s.width()/2, y-s.height()/2 ); + new CalibrationAnimator( CalibrationAnimator::position, crosshair, x-s.width()/2, y-s.height()/2 ); + new CalibrationAnimator( CalibrationAnimator::position, crosshairShadow, x-s.width()/2+10, y-s.height()/2+10 ); + + crosshairhorz->setGeometry( x-offset/2, y, offset, 0 ); + crosshairvert->setGeometry( x, y-offset/2, 0, offset ); +} + +bool CalibrationRectangle::calibrate() +{ + // calibration code based on ts_calibrate.c (C) Russell King + + int j; + float n, x, y, x2, y2, xy, z, zx, zy; + float det, cal_a, cal_b, cal_c, cal_e, cal_f, cal_i; + float scaling = 65536.0; + int cal_x[5], cal_xfb[5], cal_y[5], cal_yfb[5], cal_o[7]; + + cal_x[0]=cd.devicePoints[ TopLeft ].x(); + cal_y[0]=cd.devicePoints[ TopLeft ].y(); + cal_x[1]=cd.devicePoints[ TopRight ].x(); + cal_y[1]=cd.devicePoints[ TopRight ].y(); + cal_x[2]=cd.devicePoints[ BottomLeft ].x(); + cal_y[2]=cd.devicePoints[ BottomLeft ].y(); + cal_x[3]=cd.devicePoints[ BottomRight ].x(); + cal_y[3]=cd.devicePoints[ BottomRight ].y(); + cal_x[4]=cd.devicePoints[ Center ].x(); + cal_y[4]=cd.devicePoints[ Center ].y(); + + cal_xfb[0]=cd.screenPoints[ TopLeft ].x(); + cal_yfb[0]=cd.screenPoints[ TopLeft ].y(); + cal_xfb[1]=cd.screenPoints[ TopRight ].x(); + cal_yfb[1]=cd.screenPoints[ TopRight ].y(); + cal_xfb[2]=cd.screenPoints[ BottomLeft ].x(); + cal_yfb[2]=cd.screenPoints[ BottomLeft ].y(); + cal_xfb[3]=cd.screenPoints[ BottomRight ].x(); + cal_yfb[3]=cd.screenPoints[ BottomRight ].y(); + cal_xfb[4]=cd.screenPoints[ Center ].x(); + cal_yfb[4]=cd.screenPoints[ Center ].y(); + + // Get sums for matrix + n = x = y = x2 = y2 = xy = 0; + for(j=0;j<5;j++) { + n += 1.0; + x += (float)cal_x[j]; + y += (float)cal_y[j]; + x2 += (float)(cal_x[j]*cal_x[j]); + y2 += (float)(cal_y[j]*cal_y[j]); + xy += (float)(cal_x[j]*cal_y[j]); + } + + // Get determinant of matrix -- check if determinant is too small + det = n*(x2*y2 - xy*xy) + x*(xy*y - x*y2) + y*(x*xy - y*x2); + if ( det < 0.1 && det > -0.1 ) + { + cout << "CalibrationRectangle::calibrate() - determinant " << det << " is too small - aborting." << endl; + return false; + } + + // Get elements of inverse matrix + cal_a = (x2*y2 - xy*xy)/det; + cal_b = (xy*y - x*y2)/det; + cal_c = (x*xy - y*x2)/det; + cal_e = (n*y2 - y*y)/det; + cal_f = (x*y - n*xy)/det; + cal_i = (n*x2 - x*x)/det; + + // Get sums for x calibration + z = zx = zy = 0; + for( j=0; j < 5; j++ ) { + z += (float)cal_xfb[j]; + zx += (float)(cal_xfb[j]*cal_x[j]); + zy += (float)(cal_xfb[j]*cal_y[j]); + } + + // Now multiply out to get the calibration for framebuffer x coord + cal_o[0] = (int)((cal_a*z + cal_b*zx + cal_c*zy)*(scaling)); + cal_o[1] = (int)((cal_b*z + cal_e*zx + cal_f*zy)*(scaling)); + cal_o[2] = (int)((cal_c*z + cal_f*zx + cal_i*zy)*(scaling)); + + cout << "CAL: " << (cal_a*z + cal_b*zx + cal_c*zy) << " " + << (cal_b*z + cal_e*zx + cal_f*zy) << " " + << (cal_c*z + cal_f*zx + cal_i*zy) << endl; + + // Get sums for y calibration + z = zx = zy = 0; + for (j=0;j<5;j++) { + z += (float)cal_yfb[j]; + zx += (float)(cal_yfb[j]*cal_x[j]); + zy += (float)(cal_yfb[j]*cal_y[j]); + } + + // Now multiply out to get the calibration for framebuffer y coord + cal_o[3] = (int)((cal_a*z + cal_b*zx + cal_c*zy)*(scaling)); + cal_o[4] = (int)((cal_b*z + cal_e*zx + cal_f*zy)*(scaling)); + cal_o[5] = (int)((cal_c*z + cal_f*zx + cal_i*zy)*(scaling)); + + cout << "CAL: " << (cal_a*z + cal_b*zx + cal_c*zy) << " " + << (cal_b*z + cal_e*zx + cal_f*zy) << " " + << (cal_c*z + cal_f*zx + cal_i*zy) << endl; + + + // If we got here, we're OK, so assign scaling to a[6] and return + cal_o[6] = (int) scaling; + + cout << "CAL constants: " << cal_o[0] << " " << cal_o[1] << " " << cal_o[2] << " " + << cal_o[3] << " " << cal_o[4] << " " << cal_o[5] << " " << cal_o[6] << endl; + + FILE* stream = fopen( "/etc/pointercal", "w" ); + if ( stream == NULL ) + { + cout << "CalibrationRectangle::calibrate() - couldn't open /etc/pointercal (" << strerror( errno ) << ")" << endl; + return false; + } + + fprintf( stream, "%d %d %d %d %d %d %d\n", cal_o[1], cal_o[2], cal_o[0], cal_o[4], cal_o[5], cal_o[3], cal_o[6] ); + fclose( stream ); + + return true; +} + +CalibrationAnimator::CalibrationAnimator( CAtype t, EvasObject* o, int x, int y ) + :EcoreAnimator(), _t( t ), _o( o ), _x( x ), _y( y ) +{ +} + +CalibrationAnimator::~CalibrationAnimator() +{ +} + +bool CalibrationAnimator::tick() +{ + Color c; + int newx; + int newy; + Rect r; + + switch (_t) + { + case position: + r = _o->geometry(); + newx = r.x(); + newy = r.y(); + if ( newx == _x && newy == _y ) return false; + if ( newx > _x ) newx--; + if ( newx < _x ) newx++; + if ( newy > _y ) newy--; + if ( newy < _y ) newy++; + _o->move( newx, newy ); + return true; + case size: + r = _o->geometry(); + newx = r.width(); + newy = r.height(); + if ( newx == _x && newy == _y ) return false; + if ( newx > _x ) newx--; + if ( newx < _x ) newx++; + if ( newy > _y ) newy--; + if ( newy < _y ) newy++; + _o->move( newx, newy ); + return true; + case angle: + newx = static_cast( _o )->angle(); + if ( newx == _x ) return false; + if ( newx > _x ) newx--; + if ( newx < _x ) newx++; + static_cast( _o )->setAngle( newx ); + return true; + case alpha: + c = _o->color(); + newx = c.alpha(); + if ( c.alpha() == _x ) return false; + if ( newx > _x ) newx--; + if ( newx < _x ) newx++; + _o->setColor( c.r(), c.g(), c.b(), newx ); + return true; + } + + return true; +} + +void CalibrationRectangle::timerEvent() +{ + cout << "CalibrationAnimator::timerEvent()" << endl; + background->setAngle( ++angle ); +} diff --git a/examples/ecore/calibrate/calibrate.h b/examples/ecore/calibrate/calibrate.h new file mode 100644 index 0000000..b016f0f --- /dev/null +++ b/examples/ecore/calibrate/calibrate.h @@ -0,0 +1,71 @@ +#ifndef CALIBRATE_H +#define CALIBRATE_H + +#include +#include +using namespace efl; + +enum +{ + TopLeft = 0, + TopRight = 1, + BottomRight = 2, + BottomLeft = 3, + Center = 4, + LastPosition = Center +}; + +class CalibrationData +{ + public: + Point devicePoints[5]; // unrotated, unscaled + Point screenPoints[5]; // unrotated, scaled + Point canvasPoints[5]; // rotated, scaled +}; + +class CalibrationRectangle : public EvasRectangle, public Trackable +{ +public: + CalibrationRectangle( int x, int y, int width, int height, EvasCanvas* evas ); + virtual ~CalibrationRectangle(); + + Signal done; + + bool calibrate(); + void nextPoint( int x, int y ); + void timerEvent(); + +protected: + virtual bool handleMouseUp( const EvasMouseUpEvent& ); + virtual bool handleShow(); + void moveCrossHair(); + +private: + CalibrationData cd; + unsigned int position; + EvasGradient* background; + EvasImage* crosshair; + EvasImage* crosshairShadow; + EvasLine* crosshairhorz; + EvasLine* crosshairvert; + EvasText* text; + + int angle; +}; + +class CalibrationAnimator : public EcoreAnimator +{ + public: + enum CAtype { position, size, angle, alpha }; + CalibrationAnimator( CAtype, EvasObject* o, int x, int y ); + ~CalibrationAnimator(); + virtual bool tick(); + + private: + CAtype _t; + EvasObject* _o; + int _x; + int _y; +}; + +#endif diff --git a/examples/ecore/calibrate/main.cpp b/examples/ecore/calibrate/main.cpp new file mode 100644 index 0000000..61dbe2c --- /dev/null +++ b/examples/ecore/calibrate/main.cpp @@ -0,0 +1,24 @@ +#include + +#include "calibrate.h" + +#include +#include +using namespace efl; + +#define WIDTH 240 +#define HEIGHT 320 + +int main( int argc, const char **argv ) +{ + efl::EcoreApplication app( argc, argv, "Ecore Calibration Example" ); + efl::EcoreEvasWindowSoftwareX11* mw = new efl::EcoreEvasWindowSoftwareX11( WIDTH, HEIGHT ); + efl::EvasCanvas* evas = mw->canvas(); + Size s = evas->size(); + + CalibrationRectangle* r = new CalibrationRectangle( 0, 0, s.width(), s.height(), evas ); + r->show(); // starts calibration + + app.exec(); + return 0; +} diff --git a/examples/ecore/callbacks/.cvsignore b/examples/ecore/callbacks/.cvsignore new file mode 100644 index 0000000..f36bb00 --- /dev/null +++ b/examples/ecore/callbacks/.cvsignore @@ -0,0 +1,5 @@ +Makefile +Makefile.in +.libs +.deps +eflpp_ecore_callbacks diff --git a/examples/ecore/callbacks/Makefile.am b/examples/ecore/callbacks/Makefile.am new file mode 100644 index 0000000..1bda9c9 --- /dev/null +++ b/examples/ecore/callbacks/Makefile.am @@ -0,0 +1,22 @@ +## Process this file with automake to produce Makefile.in + +INCLUDES = + +AM_CXXFLAGS =\ + @PACKAGE_CFLAGS@ \ + -I$(top_srcdir)/src/ecore/ \ + -I$(top_srcdir)/src/evas/ \ + -I$(top_srcdir)/src/common/ \ + -Wall + + +bin_PROGRAMS = eflpp_ecore_callbacks + +eflpp_ecore_callbacks_SOURCES = \ + main.cpp + +eflpp_ecore_callbacks_LDFLAGS = @PACKAGE_LIBS@ + +eflpp_ecore_callbacks_LDADD = $(top_builddir)/src/libeflpp.la + +eflpp_ecore_callbacks_DEPENDENCIES = $(top_builddir)/src/libeflpp.la diff --git a/examples/ecore/callbacks/main.cpp b/examples/ecore/callbacks/main.cpp new file mode 100644 index 0000000..cfa7d34 --- /dev/null +++ b/examples/ecore/callbacks/main.cpp @@ -0,0 +1,102 @@ +#include +#include + +#include +#include +using namespace std; + +const int WIDTH = 320; +const int HEIGHT = 0; +const double PI = 3.141; +const unsigned int NUMBALLS = 15; +const unsigned int BALLSIZE = 50; +const unsigned int BALLWIDTH = WIDTH-BALLSIZE; +const unsigned int BALLHEIGHT = HEIGHT-BALLSIZE; + +class TimerApp : public efl::EcoreApplication +{ +public: + +TimerApp( int argc, const char** argv ) : efl::EcoreApplication( argc, argv, "Ecore Timer Test" ), + xoffset( 0 ), yoffset( PI/3 ), + xstep( 2*PI/360 ), ystep( 2*PI/360 ), + size( BALLSIZE ), direction( -1 ), + alpha( 0 ), alphadirection( 1 ), + xaddfactor( 1 ), yaddfactor( 1 ) +{ + mw = new efl::EcoreEvasWindowSoftwareX11( WIDTH, HEIGHT ); + evas = mw->canvas(); + + image = new efl::EvasImage( 0, 0, PACKAGE_DATA_DIR "/images/panel.png", evas ); + image->resize( WIDTH, HEIGHT ); + image->setFill( 0, 0, image->trueSize() ); + image->show(); + + shadow = new efl::EvasImage( 0, 0, PACKAGE_DATA_DIR "/images/panel_shadow.png", evas ); + shadow->resize( WIDTH, HEIGHT ); + shadow->setFill( 0, 0, WIDTH, HEIGHT ); + shadow->show(); + shadow->setFocus( true ); + + logo = new efl::EvasImage( 40, 20, PACKAGE_DATA_DIR "/images/e_logo.png", evas ); + logo->setColor( 255, 255, 255, 0 ); + logo->show(); + + for( unsigned int i = 0; i < NUMBALLS; ++i ) + { + balls[i] = new efl::EvasImage( 20*i, 20*i, PACKAGE_DATA_DIR "/images/boing-shadow.png", evas ); + balls[i]->resize( BALLSIZE, BALLSIZE, true ); + balls[i]->setColor( 255, 255, 255, 240 ); + balls[i]->show(); + } + + startTimer( 1.0 / 25 ); +} + +efl::EcoreEvasWindowSoftwareX11* mw; +efl::EvasCanvas* evas; +efl::EvasImage* image, *shadow, *logo; +efl::EvasImage* balls[NUMBALLS]; +double xoffset; double yoffset; +double xstep; double ystep; +int size; int direction; +int alpha; int alphadirection; +double xaddfactor; double yaddfactor; + +virtual bool timerEvent() +{ + + logo->setColor( 255, 255, 255, alpha ); + alpha += alphadirection; + if ( alpha == 0 || alpha == 255 ) alphadirection *= -1; + + for ( unsigned int i = 0; i < NUMBALLS; ++i ) + { + balls[i]->move( BALLWIDTH / 2 + sin( xoffset + xaddfactor*i*(2*PI/NUMBALLS) ) * BALLWIDTH/2, + BALLHEIGHT / 2 + cos( yoffset + yaddfactor*i*(2*PI/NUMBALLS) ) * BALLHEIGHT/2 ); + balls[i]->resize( size, size ); + } + xoffset += xstep; + yoffset += ystep; + size += direction; + if ( size == -5 || size == BALLSIZE+10 ) direction *= -1; + if ( size == -5 ) + { + xstep = 2*PI / (360.0*rand()/(RAND_MAX)); + ystep = 2*PI / (360.0*rand()/(RAND_MAX)); + xaddfactor = -2 + (4.0*rand()/(RAND_MAX)); + yaddfactor = -2 + (4.0*rand()/(RAND_MAX)); + } + + return true; // call me again, please +} + +}; + +int main( int argc, const char **argv ) +{ + TimerApp* app = new TimerApp( argc, argv ); + app->exec(); + delete app; + return 0; +} diff --git a/examples/ecore/config/.cvsignore b/examples/ecore/config/.cvsignore new file mode 100644 index 0000000..8f4eb43 --- /dev/null +++ b/examples/ecore/config/.cvsignore @@ -0,0 +1,5 @@ +Makefile +Makefile.in +.deps +.libs +eflpp_ecore_config diff --git a/examples/ecore/config/Makefile.am b/examples/ecore/config/Makefile.am new file mode 100644 index 0000000..231d448 --- /dev/null +++ b/examples/ecore/config/Makefile.am @@ -0,0 +1,22 @@ +## Process this file with automake to produce Makefile.in + +INCLUDES = + +AM_CXXFLAGS =\ + @PACKAGE_CFLAGS@ \ + -I$(top_srcdir)/src/ecore/ \ + -I$(top_srcdir)/src/evas/ \ + -I$(top_srcdir)/src/common/ \ + -Wall + + +bin_PROGRAMS = eflpp_ecore_config + +eflpp_ecore_config_SOURCES = \ + main.cpp + +eflpp_ecore_config_LDFLAGS = @PACKAGE_LIBS@ + +eflpp_ecore_config_LDADD = $(top_builddir)/src/libeflpp.la + +eflpp_ecore_config_DEPENDENCIES = $(top_builddir)/src/libeflpp.la diff --git a/examples/ecore/config/main.cpp b/examples/ecore/config/main.cpp new file mode 100644 index 0000000..f6f4f58 --- /dev/null +++ b/examples/ecore/config/main.cpp @@ -0,0 +1,29 @@ +#include +#include +using namespace efl; + +#include +using namespace std; + +int main( int argc, const char **argv ) +{ + // using the EcoreConfigClass directly + EcoreConfig c( "test" ); + c.setValue( "aString", string( "foo" ) ); + c.setValue( "anInt", 42 ); + c.setValue( "aBool", true ); + + cout << "the string is = " << c.getString( "aString", "defaultString" ) << endl; + cout << "the integer is = " << c.getInt( "anInt", 100 ) << endl; + cout << "the boolean is = " << c.getBool( "aBool", false ) << endl; + + cout << "something not there is = " << c.getString( "not here", "not here" ) << endl; + + // using the application ecore config class + EcoreApplication app( argc, argv, "This is my Application" ); + int runcount = app.config()->getInt( "runcount", 0 ); + cout << "this application runs for the " << ++runcount << "th time" << endl; + app.config()->setValue( "runcount", runcount ); + + return 0; +} diff --git a/examples/ecore/list/.cvsignore b/examples/ecore/list/.cvsignore new file mode 100644 index 0000000..14091d8 --- /dev/null +++ b/examples/ecore/list/.cvsignore @@ -0,0 +1,5 @@ +Makefile +Makefile.in +.deps +.libs +eflpp_ecore_list diff --git a/examples/ecore/list/Makefile.am b/examples/ecore/list/Makefile.am new file mode 100644 index 0000000..3bafa45 --- /dev/null +++ b/examples/ecore/list/Makefile.am @@ -0,0 +1,22 @@ +## Process this file with automake to produce Makefile.in + +INCLUDES = + +AM_CXXFLAGS =\ + @PACKAGE_CFLAGS@ \ + -I$(top_srcdir)/src/ecore/ \ + -I$(top_srcdir)/src/evas/ \ + -I$(top_srcdir)/src/common/ \ + -Wall + + +bin_PROGRAMS = eflpp_ecore_list + +eflpp_ecore_list_SOURCES = \ + main.cpp + +eflpp_ecore_list_LDFLAGS = @PACKAGE_LIBS@ + +eflpp_ecore_list_LDADD = $(top_builddir)/src/libeflpp.la + +eflpp_ecore_list_DEPENDENCIES = $(top_builddir)/src/libeflpp.la diff --git a/examples/ecore/list/main.cpp b/examples/ecore/list/main.cpp new file mode 100644 index 0000000..657c80a --- /dev/null +++ b/examples/ecore/list/main.cpp @@ -0,0 +1,48 @@ +#include +#include + +#include +using namespace std; +using namespace efl; + +int main( int argc, const char **argv ) +{ + // int* test + EcoreList numberList; + + int n[6] = {10,11,12,13,14,15}; + + numberList.append( &n[0] ); + numberList.append( &n[1] ); + numberList.append( &n[2] ); + numberList.append( &n[3] ); + numberList.append( &n[4] ); + numberList.append( &n[5] ); + + int *i = numberList.gotoFirst (); + i = numberList.next (); + + for (; i != NULL; i = numberList.next ()) + { + printf ("i = %d\n", *i); + } + + // char* test + EcoreList strList; + + char *str[3] = {"First", "Second", "Third"}; + + strList.append( str[0] ); + strList.append( str[1] ); + strList.append( str[2] ); + + char *s = strList.gotoFirst (); + s = strList.next (); + + for (; s != NULL; s = strList.next ()) + { + printf ("s = %s\n", s); + } + + return 0; +} diff --git a/examples/ecore/paint/.cvsignore b/examples/ecore/paint/.cvsignore new file mode 100644 index 0000000..e99dcd1 --- /dev/null +++ b/examples/ecore/paint/.cvsignore @@ -0,0 +1,5 @@ +Makefile +Makefile.in +.deps +.libs +eflpp_ecore_paint diff --git a/examples/ecore/paint/Makefile.am b/examples/ecore/paint/Makefile.am new file mode 100644 index 0000000..bb3fe2a --- /dev/null +++ b/examples/ecore/paint/Makefile.am @@ -0,0 +1,22 @@ +## Process this file with automake to produce Makefile.in + +INCLUDES = + +AM_CXXFLAGS =\ + @PACKAGE_CFLAGS@ \ + -I$(top_srcdir)/src/ecore/ \ + -I$(top_srcdir)/src/evas/ \ + -I$(top_srcdir)/src/common/ \ + -Wall + + +bin_PROGRAMS = eflpp_ecore_paint + +eflpp_ecore_paint_SOURCES = \ + main.cpp + +eflpp_ecore_paint_LDFLAGS = @PACKAGE_LIBS@ + +eflpp_ecore_paint_LDADD = $(top_builddir)/src/libeflpp.la + +eflpp_ecore_paint_DEPENDENCIES = $(top_builddir)/src/libeflpp.la diff --git a/examples/ecore/paint/main.cpp b/examples/ecore/paint/main.cpp new file mode 100644 index 0000000..33a2f1e --- /dev/null +++ b/examples/ecore/paint/main.cpp @@ -0,0 +1,125 @@ +#include +#include +#include +#include +#include +using namespace efl; + +#include +using namespace std; + +#define WIDTH 240 +#define HEIGHT 320 + +#define DOTSIZE 2 + +static int callback( void* data, int type, void *event ) +{ + cout << "CALLBACK RECEIVED: type = " << type << ", pevent = " << event << "pdata = " << data << endl; + return 0; +} + +class PaintArea : public EvasRectangle +{ +public: + PaintArea( EvasCanvas* evas ) : EvasRectangle( evas ), mouseDown( false ) + { + setLayer( 10 ); + setColor( 255, 255, 255, 0 ); // fully transparent, to catch the mouse events + setFocus( true ); + } + virtual ~PaintArea() { }; + + virtual bool handleMouseUp( const EvasMouseUpEvent& e ) + { + cout << "PA::mouseUp" << endl; + mouseDown = false; + } + virtual bool handleMouseDown( const EvasMouseDownEvent& e ) + { + cout << "PA::mouseDown" << endl; + mouseDown = true; + EvasObject* l = new EvasRectangle( e.data->canvas.x, e.data->canvas.y, 2, 2, canvas() ); + int b=200+(int) (55.0*rand()/(RAND_MAX+1.0)); + l->setColor( b, b, b, 255 ); + l->show(); + } + virtual bool handleMouseMove( const EvasMouseMoveEvent& e ) + { + cout << "PA::mouseMove" << endl; + if ( mouseDown ) + { + int width = 2 + abs( e.data->cur.canvas.x - e.data->prev.canvas.x ); + int height = 2 + abs( e.data->cur.canvas.y - e.data->prev.canvas.y ); + cout << "width = " << width << ", height = " << height << endl; + EvasObject* l = new EvasRectangle( e.data->cur.canvas.x - width/2, e.data->cur.canvas.y - height/2, width, height, canvas() ); + int b=200+(int) (55.0*rand()/(RAND_MAX+1.0)); + l->setColor( b, b, b, 255 ); + l->show(); + } + } + virtual bool handleKeyUp( const EvasKeyUpEvent& e ) + { + cout << "PA:::keyUp - released '" << e.data->keyname << "'" << endl; + if ( strcmp( e.data->keyname, "Escape" ) == 0 ) + { + eApp->quit(); + } + if ( strcmp( e.data->keyname, "0x5b" ) == 0 ) + { + int rot = eApp->mainWindow()->rotation(); + rot = rot ? 0: 270; + eApp->mainWindow()->setRotation( rot ); + //eApp->mainWindow()->resize( + } + if ( strcmp( e.data->keyname, "j" ) == 0 ) + { + Rect vp = eApp->mainWindow()->canvas()->viewport(); + eApp->mainWindow()->canvas()->setViewport( vp.x()+10, vp.y()+10, vp.width()-10, vp.height()-10 ); + } + if ( strcmp( e.data->keyname, "k" ) == 0 ) + { + Rect vp = eApp->mainWindow()->canvas()->viewport(); + eApp->mainWindow()->canvas()->setViewport( vp.x()-10, vp.y()-10, vp.width()+10, vp.height()+10 ); + } + + } +private: + bool mouseDown; +}; + +int main( int argc, const char **argv ) +{ + /* Create the application object */ + efl::EcoreApplication* app = new efl::EcoreApplication( argc, argv, "Ecore Paint Example" ); + + /* Create the main window, a window with an embedded canvas */ + efl::EcoreEvasWindowSoftwareX11* mw = new efl::EcoreEvasWindowSoftwareX11( WIDTH, HEIGHT ); + mw->setAlpha (true); + + mw->show (); + + /* Create some objects on the canvas */ + efl::EvasCanvas* evas = mw->canvas(); + + Size s = evas->size(); + cout << "PA: Size = " << s << endl; + + efl::EvasRectangle* bg = new efl::EvasRectangle( 0, 0, s.width(), s.height(), evas ); + bg->setColor( 50, 50, 50, 128 ); + bg->setLayer( 0 ); + bg->show(); + + PaintArea* p = new PaintArea( evas ); + p->setGeometry( 0, 0, s.width(), s.height() ); + p->setLayer( 1 ); + p->show(); + + /* Enter the application main loop */ + app->exec(); + + /* Delete the application */ + delete app; + + return 0; +} diff --git a/examples/ecore/simple/.cvsignore b/examples/ecore/simple/.cvsignore new file mode 100644 index 0000000..f68a834 --- /dev/null +++ b/examples/ecore/simple/.cvsignore @@ -0,0 +1,5 @@ +Makefile +Makefile.in +.libs +.deps +eflpp_ecore_simple diff --git a/examples/ecore/simple/Makefile.am b/examples/ecore/simple/Makefile.am new file mode 100644 index 0000000..00e388b --- /dev/null +++ b/examples/ecore/simple/Makefile.am @@ -0,0 +1,22 @@ +## Process this file with automake to produce Makefile.in + +INCLUDES = + +AM_CXXFLAGS =\ + @PACKAGE_CFLAGS@ \ + -I$(top_srcdir)/src/ecore/ \ + -I$(top_srcdir)/src/evas/ \ + -I$(top_srcdir)/src/common/ \ + -Wall + + +bin_PROGRAMS = eflpp_ecore_simple + +eflpp_ecore_simple_SOURCES = \ + main.cpp + +eflpp_ecore_simple_LDFLAGS = @PACKAGE_LIBS@ + +eflpp_ecore_simple_LDADD = $(top_builddir)/src/libeflpp.la + +eflpp_ecore_simple_DEPENDENCIES = $(top_builddir)/src/libeflpp.la diff --git a/examples/ecore/simple/main.cpp b/examples/ecore/simple/main.cpp new file mode 100644 index 0000000..19d0d10 --- /dev/null +++ b/examples/ecore/simple/main.cpp @@ -0,0 +1,47 @@ +#include +#include + +#define WIDTH 320 +#define HEIGHT 240 + +#include +using namespace std; + +int main( int argc, const char **argv ) +{ + /* Create the application object */ + efl::EcoreApplication* app = new efl::EcoreApplication( argc, argv, "Simple Ecore Test" ); + + /* Create the main window, a window with an embedded canvas */ + efl::EcoreEvasWindowSoftwareX11* mw = new efl::EcoreEvasWindowSoftwareX11( WIDTH, HEIGHT ); + + /* Create some objects on the canvas */ + efl::EvasCanvas* evas = mw->canvas(); + + efl::EvasImage* image = new efl::EvasImage( 0, 0, PACKAGE_DATA_DIR "/images/panel.png", evas ); + image->resize( evas->size() ); + image->setFill( 0, 0, image->trueSize() ); + image->show(); + image->setFocus( true ); + + efl::EvasImage* shadow = new efl::EvasImage( 0, 0, PACKAGE_DATA_DIR "/images/panel_shadow.png", evas ); + shadow->resize( evas->size() ); + shadow->setFill( 0, 0, image->size() ); + shadow->show(); + + efl::EvasImage* logo = new efl::EvasImage( 50, 50, PACKAGE_DATA_DIR "/images/boing-shadow.png", evas ); + logo->show(); + + efl::EvasText* text = new efl::EvasText( PACKAGE_DATA_DIR "/fonts/Gentium.ttf", 20, 10, 10, "", evas ); + text->setText( "Commodore AMIGA rulez ..." ); + text->setLayer( 5 ); + text->show(); + + /* Enter the application main loop */ + app->exec(); + + /* Delete the application */ + delete app; + + return 0; +} diff --git a/examples/ecore/stars/.cvsignore b/examples/ecore/stars/.cvsignore new file mode 100644 index 0000000..bdc21f3 --- /dev/null +++ b/examples/ecore/stars/.cvsignore @@ -0,0 +1,5 @@ +Makefile +Makefile.in +.libs +.deps +eflpp_ecore_stars diff --git a/examples/ecore/stars/Makefile.am b/examples/ecore/stars/Makefile.am new file mode 100644 index 0000000..171939b --- /dev/null +++ b/examples/ecore/stars/Makefile.am @@ -0,0 +1,22 @@ +## Process this file with automake to produce Makefile.in + +INCLUDES = + +AM_CXXFLAGS =\ + @PACKAGE_CFLAGS@ \ + -I$(top_srcdir)/src/ecore/ \ + -I$(top_srcdir)/src/evas/ \ + -I$(top_srcdir)/src/common/ \ + -Wall + + +bin_PROGRAMS = eflpp_ecore_stars + +eflpp_ecore_stars_SOURCES = \ + main.cpp + +eflpp_ecore_stars_LDFLAGS = @PACKAGE_LIBS@ + +eflpp_ecore_stars_LDADD = $(top_builddir)/src/libeflpp.la + +eflpp_ecore_stars_DEPENDENCIES = $(top_builddir)/src/libeflpp.la diff --git a/examples/ecore/stars/main.cpp b/examples/ecore/stars/main.cpp new file mode 100644 index 0000000..c07b767 --- /dev/null +++ b/examples/ecore/stars/main.cpp @@ -0,0 +1,74 @@ +#include +#include +using namespace efl; + +#define WIDTH 320 +#define HEIGHT 240 + +#include + +#include +#include +using std::pair; +using std::cout; +using std::endl; +using std::list; + +typedef pair Star; +typedef list Starfield; +typedef list::iterator StarfieldIterator; + +Starfield starfield; + +int width = 0; + +void advance( EcoreTimer* e ) +{ + for (StarfieldIterator it = starfield.begin(); it != starfield.end(); ++it ) + { + Star* star = *it; + EvasLine* line = star->first; + int speed = star->second; + Rect g = line->geometry(); + line->setGeometry( ( g.x()+speed ) % width, g.y(), 1, 0 ); + } + +} + +int main( int argc, const char **argv ) +{ + EcoreApplication* app = new efl::EcoreApplication( argc, argv, "Ecore Stars Test" ); + EcoreEvasWindowSoftwareX11* mw = new efl::EcoreEvasWindowSoftwareX11( WIDTH, HEIGHT ); + EvasCanvas* evas = mw->canvas(); + + Rect bg = evas->geometry(); + width = bg.width(); + + EvasRectangle* r = new EvasRectangle( bg, evas ); + r->setColor( 0, 0, 0, 255 ); + r->setLayer( 0 ); + r->show(); + + for ( int scanline = 0; scanline < bg.height(); ++scanline ) + { + int xpos = (int) ((double)bg.width()*rand()/(RAND_MAX)); + int speed = 1+(int) (10.0*rand()/(RAND_MAX+1.0)); + EvasLine* line = new EvasLine( xpos, scanline, xpos+1, scanline, evas ); + line->setColor( 50+speed*16, 50+speed*18, 50+speed*17, 255 ); + line->setLayer( 10 ); + line->show(); + + starfield.push_back( new Star( line, speed ) ); + } + + ( new EcoreTimer( 0.08 ) )->timeout.connect( sigc::ptr_fun( advance ) ); + + /* Enter the application main loop */ + app->exec(); + + /* Delete the application */ + delete app; + + return 0; +} + diff --git a/examples/ecore/timers/.cvsignore b/examples/ecore/timers/.cvsignore new file mode 100644 index 0000000..ca7769e --- /dev/null +++ b/examples/ecore/timers/.cvsignore @@ -0,0 +1,5 @@ +Makefile +Makefile.in +.deps +.libs +eflpp_ecore_timers diff --git a/examples/ecore/timers/Makefile.am b/examples/ecore/timers/Makefile.am new file mode 100644 index 0000000..16d367d --- /dev/null +++ b/examples/ecore/timers/Makefile.am @@ -0,0 +1,22 @@ +## Process this file with automake to produce Makefile.in + +INCLUDES = + +AM_CXXFLAGS =\ + @PACKAGE_CFLAGS@ \ + -I$(top_srcdir)/src/ecore/ \ + -I$(top_srcdir)/src/evas/ \ + -I$(top_srcdir)/src/common/ \ + -Wall + + +bin_PROGRAMS = eflpp_ecore_timers + +eflpp_ecore_timers_SOURCES = \ + main.cpp + +eflpp_ecore_timers_LDFLAGS = @PACKAGE_LIBS@ + +eflpp_ecore_timers_LDADD = $(top_builddir)/src/libeflpp.la + +eflpp_ecore_timers_DEPENDENCIES = $(top_builddir)/src/libeflpp.la diff --git a/examples/ecore/timers/main.cpp b/examples/ecore/timers/main.cpp new file mode 100644 index 0000000..4854ab0 --- /dev/null +++ b/examples/ecore/timers/main.cpp @@ -0,0 +1,102 @@ +#include +#include + +#include +#include +using namespace std; + +const int WIDTH = 320; +const int HEIGHT = 320; +const double PI = 3.141; +const unsigned int NUMBALLS = 15; +const unsigned int BALLSIZE = 50; +const unsigned int BALLWIDTH = WIDTH-BALLSIZE; +const unsigned int BALLHEIGHT = HEIGHT-BALLSIZE; + +class TimerApp : public efl::EcoreApplication +{ +public: + +TimerApp( int argc, const char** argv ) : efl::EcoreApplication( argc, argv, "Ecore Timer Test" ), + xoffset( 0 ), yoffset( PI/3 ), + xstep( 2*PI/360 ), ystep( 2*PI/360 ), + size( BALLSIZE ), direction( -1 ), + alpha( 0 ), alphadirection( 1 ), + xaddfactor( 1 ), yaddfactor( 1 ) +{ + mw = new efl::EcoreEvasWindowSoftwareX11( WIDTH, HEIGHT ); + evas = mw->canvas(); + + image = new efl::EvasImage( 0, 0, PACKAGE_DATA_DIR "/images/panel.png", evas ); + image->resize( evas->size() ); + image->setFill( 0, 0, image->trueSize() ); + image->show(); + + shadow = new efl::EvasImage( 0, 0, PACKAGE_DATA_DIR "/images/panel_shadow.png", evas ); + shadow->resize( evas->size() ); + shadow->setFill( 0, 0, evas->size() ); + shadow->show(); + shadow->setFocus( true ); + + logo = new efl::EvasImage( 40, 20, PACKAGE_DATA_DIR "/images/e_logo.png", evas ); + logo->setColor( 255, 255, 255, 0 ); + logo->show(); + + for( int i = 0; i < NUMBALLS; ++i ) + { + balls[i] = new efl::EvasImage( 20*i, 20*i, PACKAGE_DATA_DIR "/images/boing-shadow.png", evas ); + balls[i]->resize( BALLSIZE, BALLSIZE, true ); + balls[i]->setColor( 255, 255, 255, 240 ); + balls[i]->show(); + } + + startTimer( 1.0 / 25 ); +} + +efl::EcoreEvasWindowSoftwareX11* mw; +efl::EvasCanvas* evas; +efl::EvasImage* image, *shadow, *logo; +efl::EvasImage* balls[NUMBALLS]; +double xoffset; double yoffset; +double xstep; double ystep; +int size; int direction; +int alpha; int alphadirection; +double xaddfactor; double yaddfactor; + +virtual bool timerEvent() +{ + + logo->setColor( 255, 255, 255, alpha ); + alpha += alphadirection; + if ( alpha == 0 || alpha == 255 ) alphadirection *= -1; + + for ( int i = 0; i < NUMBALLS; ++i ) + { + balls[i]->move( BALLWIDTH / 2 + sin( xoffset + xaddfactor*i*(2*PI/NUMBALLS) ) * BALLWIDTH/2, + BALLHEIGHT / 2 + cos( yoffset + yaddfactor*i*(2*PI/NUMBALLS) ) * BALLHEIGHT/2 ); + balls[i]->resize( size, size ); + } + xoffset += xstep; + yoffset += ystep; + size += direction; + if ( size == -5 || size == BALLSIZE+10 ) direction *= -1; + if ( size == -5 ) + { + xstep = 2*PI / (360.0*rand()/(RAND_MAX)); + ystep = 2*PI / (360.0*rand()/(RAND_MAX)); + xaddfactor = -2 + (4.0*rand()/(RAND_MAX)); + yaddfactor = -2 + (4.0*rand()/(RAND_MAX)); + } + + return true; // call me again, please +} + +}; + +int main( int argc, const char **argv ) +{ + TimerApp* app = new TimerApp( argc, argv ); + app->exec(); + delete app; + return 0; +} diff --git a/examples/ecore/x/.cvsignore b/examples/ecore/x/.cvsignore new file mode 100644 index 0000000..8451c48 --- /dev/null +++ b/examples/ecore/x/.cvsignore @@ -0,0 +1,5 @@ +Makefile +Makefile.in +.libs +.deps +eflpp_ecore_x diff --git a/examples/ecore/x/Makefile.am b/examples/ecore/x/Makefile.am new file mode 100644 index 0000000..79896bd --- /dev/null +++ b/examples/ecore/x/Makefile.am @@ -0,0 +1,22 @@ +## Process this file with automake to produce Makefile.in + +INCLUDES = + +AM_CXXFLAGS =\ + @PACKAGE_CFLAGS@ \ + -I$(top_srcdir)/src/ecore/ \ + -I$(top_srcdir)/src/evas/ \ + -I$(top_srcdir)/src/common/ \ + -Wall + + +bin_PROGRAMS = eflpp_ecore_x + +eflpp_ecore_x_SOURCES = \ + main.cpp + +eflpp_ecore_x_LDFLAGS = @PACKAGE_LIBS@ + +eflpp_ecore_x_LDADD = $(top_builddir)/src/libeflpp.la + +eflpp_ecore_x_DEPENDENCIES = $(top_builddir)/src/libeflpp.la diff --git a/examples/ecore/x/main.cpp b/examples/ecore/x/main.cpp new file mode 100644 index 0000000..b863442 --- /dev/null +++ b/examples/ecore/x/main.cpp @@ -0,0 +1,55 @@ +#include +#include +#include + +#define WIDTH 320 +#define HEIGHT 240 + +#include +using namespace std; +using namespace efl; + +int main( int argc, const char **argv ) +{ + /* Create the application object */ + EcoreApplication* app = new EcoreApplication( argc, argv, "Simple Ecore Test" ); + + /* Create the main window, a window with an embedded canvas */ + EcoreEvasWindowSoftwareX11* mw = new EcoreEvasWindowSoftwareX11( WIDTH, HEIGHT ); + + // Open this window as 'Utility' window + EcoreXWindow *exwin = mw->getXWindow(); + exwin->setNetWMWindowType ( EcoreXWindow::Utility ); + delete exwin; + + /* Create some objects on the canvas */ + EvasCanvas* evas = mw->canvas(); + + EvasImage* image = new EvasImage( 0, 0, PACKAGE_DATA_DIR "/images/panel.png", evas ); + image->resize( evas->size() ); + image->setFill( 0, 0, image->trueSize() ); + image->show(); + image->setFocus( true ); + + EvasImage* shadow = new EvasImage( 0, 0, PACKAGE_DATA_DIR "/images/panel_shadow.png", evas ); + shadow->resize( evas->size() ); + shadow->setFill( 0, 0, image->size() ); + shadow->show(); + + EvasImage* logo = new EvasImage( 50, 50, PACKAGE_DATA_DIR "/images/boing-shadow.png", evas ); + logo->show(); + + EvasText* text = new EvasText( PACKAGE_DATA_DIR "/fonts/Gentium.ttf", 20, 10, 10, "", evas ); + text->setText( "Commodore AMIGA rulez ..." ); + text->setLayer( 5 ); + text->show(); + + + /* Enter the application main loop */ + app->exec(); + + /* Delete the application */ + delete app; + + return 0; +} diff --git a/examples/edje/.cvsignore b/examples/edje/.cvsignore new file mode 100644 index 0000000..282522d --- /dev/null +++ b/examples/edje/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/examples/edje/Makefile.am b/examples/edje/Makefile.am new file mode 100644 index 0000000..a9468ce --- /dev/null +++ b/examples/edje/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = simple diff --git a/examples/edje/simple/.cvsignore b/examples/edje/simple/.cvsignore new file mode 100644 index 0000000..426a981 --- /dev/null +++ b/examples/edje/simple/.cvsignore @@ -0,0 +1,5 @@ +Makefile +Makefile.in +.deps +.libs +eflpp_edje_simple diff --git a/examples/edje/simple/Makefile.am b/examples/edje/simple/Makefile.am new file mode 100644 index 0000000..a5bc0e6 --- /dev/null +++ b/examples/edje/simple/Makefile.am @@ -0,0 +1,23 @@ +## Process this file with automake to produce Makefile.in + +INCLUDES = + +AM_CXXFLAGS =\ + @PACKAGE_CFLAGS@ \ + -I$(top_srcdir)/src/ecore/ \ + -I$(top_srcdir)/src/evas/ \ + -I$(top_srcdir)/src/edje/ \ + -I$(top_srcdir)/src/common/ \ + -Wall + + +bin_PROGRAMS = eflpp_edje_simple + +eflpp_edje_simple_SOURCES = \ + main.cpp + +eflpp_edje_simple_LDFLAGS = @PACKAGE_LIBS@ + +eflpp_edje_simple_LDADD = $(top_builddir)/src/libeflpp.la + +eflpp_edje_simple_DEPENDENCIES = $(top_builddir)/src/libeflpp.la diff --git a/examples/edje/simple/main.cpp b/examples/edje/simple/main.cpp new file mode 100644 index 0000000..562163e --- /dev/null +++ b/examples/edje/simple/main.cpp @@ -0,0 +1,41 @@ +#include +#include +#include + +#define WIDTH 240 +#define HEIGHT 320 + +#include + +using namespace efl; + +int main( int argc, const char **argv ) +{ + /* Create the application object */ + EcoreApplication* app = new EcoreApplication( argc, argv, "Simple Edje Test" ); + + /* Create the main window, a window with an embedded canvas */ + EcoreEvasWindowSoftwareX11* mw = new EcoreEvasWindowSoftwareX11( WIDTH, HEIGHT ); + + EvasCanvas* evas = mw->canvas(); + + evas->appendFontPath( PACKAGE_DATA_DIR "fonts" ); + + /* Add some objects to the canvas */ + + EvasEdje* edje = new EvasEdje( 0, 0, PACKAGE_DATA_DIR "/edjes/simple.edj", "test", evas ); + + edje->resize( WIDTH, HEIGHT ); + Size s = edje->minimalSize(); + edje->setLayer( 0 ); + edje->show(); + + /* Enter the application main loop */ + app->exec(); + + /* Delete the application */ + delete app; + + return 0; +} + diff --git a/examples/emotion/.cvsignore b/examples/emotion/.cvsignore new file mode 100644 index 0000000..282522d --- /dev/null +++ b/examples/emotion/.cvsignore @@ -0,0 +1,2 @@ +Makefile +Makefile.in diff --git a/examples/emotion/Makefile.am b/examples/emotion/Makefile.am new file mode 100644 index 0000000..a9468ce --- /dev/null +++ b/examples/emotion/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = simple diff --git a/examples/emotion/simple/.cvsignore b/examples/emotion/simple/.cvsignore new file mode 100644 index 0000000..0f53319 --- /dev/null +++ b/examples/emotion/simple/.cvsignore @@ -0,0 +1,5 @@ +Makefile +Makefile.in +.deps +.libs +eflpp_emotion_simple diff --git a/examples/emotion/simple/Makefile.am b/examples/emotion/simple/Makefile.am new file mode 100644 index 0000000..95e2ff3 --- /dev/null +++ b/examples/emotion/simple/Makefile.am @@ -0,0 +1,24 @@ +## Process this file with automake to produce Makefile.in + +INCLUDES = + +AM_CXXFLAGS =\ + @PACKAGE_CFLAGS@ \ + -I$(top_srcdir)/src/ecore/ \ + -I$(top_srcdir)/src/evas/ \ + -I$(top_srcdir)/src/edje/ \ + -I$(top_srcdir)/src/emotion/ \ + -I$(top_srcdir)/src/common/ \ + -Wall + + +bin_PROGRAMS = eflpp_emotion_simple + +eflpp_emotion_simple_SOURCES = \ + main.cpp + +eflpp_emotion_simple_LDFLAGS = @PACKAGE_LIBS@ + +eflpp_emotion_simple_LDADD = $(top_builddir)/src/libeflpp.la + +eflpp_emotion_simple_DEPENDENCIES = $(top_builddir)/src/libeflpp.la diff --git a/examples/emotion/simple/main.cpp b/examples/emotion/simple/main.cpp new file mode 100644 index 0000000..fcf57d7 --- /dev/null +++ b/examples/emotion/simple/main.cpp @@ -0,0 +1,44 @@ +#include +#include +#include +#include +using namespace efl; + +#define WIDTH 320 +#define HEIGHT 240 + +#include +using namespace std; + +#include + +int main( int argc, const char **argv ) +{ + /* Create the application object */ + EcoreApplication* app = new EcoreApplication( argc, argv, "Simple Emotion Test" ); + if ( argc < 2 ) + { + cerr << "Usage: " << argv[0] << "