tasn pushed a commit to branch master.

http://git.enlightenment.org/bindings/cxx/eflxx.git/commit/?id=3b5ce6e53fd348341e481ba4723927afbc9cf850

commit 3b5ce6e53fd348341e481ba4723927afbc9cf850
Author: Andreas Volz <[email protected]>
Date:   Sun Jul 25 18:29:53 2010 +0000

    emotionxx example
    
    
    SVN revision: 50488
---
 eflxx_examples/configure.ac                    |  4 +-
 eflxx_examples/src/emotionxx/Makefile.am       |  3 +-
 eflxx_examples/src/emotionxx/audio/Makefile.am | 23 +++++++++++
 eflxx_examples/src/emotionxx/audio/main.cpp    | 40 ++++++++++++++++++
 eflxx_examples/src/emotionxx/simple/main.cpp   | 56 +++++++++++++-------------
 5 files changed, 94 insertions(+), 32 deletions(-)

diff --git a/eflxx_examples/configure.ac b/eflxx_examples/configure.ac
index 5a1fcdb..f433b08 100644
--- a/eflxx_examples/configure.ac
+++ b/eflxx_examples/configure.ac
@@ -97,9 +97,6 @@ AC_DEFINE_UNQUOTED(SYSTEM_PIXMAPS_DIR, 
"${packageprefix}/${systempixmapsdir}",""
 AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}","")
 
 
-#PKG_CHECK_MODULES(ESMARTXX_CONTAINER, esmartxx_container)
-#PKG_CHECK_MODULES(ESMARTXX_GROUP, esmartxx_group)
-#PKG_CHECK_MODULES(ESMARTXX_TEXTENTRY, esmartxx_textentry)
 PKG_CHECK_MODULES(EDJEXX, edjexx)
 PKG_CHECK_MODULES(EFL, eflxx)
 PKG_CHECK_MODULES(ECOREXX, ecorexx)
@@ -131,6 +128,7 @@ src/eetxx/Makefile
 src/eetxx/simple_write_read/Makefile
 src/emotionxx/Makefile
 src/emotionxx/simple/Makefile
+src/emotionxx/audio/Makefile
 src/elementaryxx/Makefile
 src/elementaryxx/simple/Makefile
 src/elementaryxx/full/Makefile
diff --git a/eflxx_examples/src/emotionxx/Makefile.am 
b/eflxx_examples/src/emotionxx/Makefile.am
index c2288e9..ed1b230 100644
--- a/eflxx_examples/src/emotionxx/Makefile.am
+++ b/eflxx_examples/src/emotionxx/Makefile.am
@@ -1,6 +1,7 @@
 
 SUBDIRS = \
-       simple
+       simple\
+       audio
 
 ## File created by the gnome-build tools
 
diff --git a/eflxx_examples/src/emotionxx/audio/Makefile.am 
b/eflxx_examples/src/emotionxx/audio/Makefile.am
new file mode 100644
index 0000000..f0e1d2f
--- /dev/null
+++ b/eflxx_examples/src/emotionxx/audio/Makefile.am
@@ -0,0 +1,23 @@
+
+bin_PROGRAMS = \
+       emotionxx_example_audio
+
+emotionxx_example_audio_SOURCES = \
+       main.cpp
+
+emotionxx_example_audio_LDADD = \
+       $(EDJEXX_LIBS) \
+       $(EINAXX_LIBS) \
+       $(EFL_LIBS) \
+       $(ECOREXX_LIBS) \
+       $(EMOTIONXX_LIBS)
+
+AM_CPPFLAGS = \
+       $(EDJEXX_CFLAGS) \
+       $(EINAXX_CFLAGS) \
+       $(EFL_CFLAGS) \
+       $(ECOREXX_CFLAGS) \
+       $(EMOTIONXX_CFLAGS)
+
+## File created by the gnome-build tools
+
diff --git a/eflxx_examples/src/emotionxx/audio/main.cpp 
b/eflxx_examples/src/emotionxx/audio/main.cpp
new file mode 100644
index 0000000..1443bd7
--- /dev/null
+++ b/eflxx_examples/src/emotionxx/audio/main.cpp
@@ -0,0 +1,40 @@
+#include <ecorexx/Ecorexx.h>
+#include <evasxx/Evasxx.h>
+#include <edjexx/Edjexx.h>
+#include <emotionxx/Emotionxx.h>
+#include "../../common/searchFile.h"
+#include <iostream>
+#include <assert.h>
+
+using namespace Eflxx;
+using namespace std;
+
+int main( int argc, const char **argv )
+{
+  /* Create the application object */
+  Ecorexx::Application* app = new Ecorexx::Application( argc, argv, "Simple 
Emotion Test" );
+  if ( argc < 2 )
+  {
+      cerr << "Usage: " << argv[0] << "<audio file>" << endl;
+      return 1;
+  }
+  /* Create the main window, a window with an embedded canvas */
+  Ecorexx::EvasWindowSoftwareX11* mw = new Ecorexx::EvasWindowSoftwareX11 
(Size (0, 0));
+  Evasxx::Canvas &evas = mw->getCanvas();
+
+  /* Create Emotionxx::Object object using xine engine */
+  Emotionxx::AudioObject* emotion = new Emotionxx::AudioObject (evas, argv[1], 
"xine" );
+
+  emotion->setPlay( true );
+
+  // don't show the window!
+
+  /* Enter the application main loop */
+  app->exec();
+
+  /* Delete the application */
+  delete app;
+
+  return 0;
+}
+
diff --git a/eflxx_examples/src/emotionxx/simple/main.cpp 
b/eflxx_examples/src/emotionxx/simple/main.cpp
index e81c570..9b862b0 100644
--- a/eflxx_examples/src/emotionxx/simple/main.cpp
+++ b/eflxx_examples/src/emotionxx/simple/main.cpp
@@ -16,33 +16,33 @@ using namespace std;
 
 int main( int argc, const char **argv )
 {
-    /* Create the application object */
-    Ecorexx::Application* app = new Ecorexx::Application( argc, argv, "Simple 
Emotion Test" );
-    if ( argc < 2 )
-    {
-        cerr << "Usage: " << argv[0] << "<video file>" << endl;
-        return 1;
-    }
-    /* Create the main window, a window with an embedded canvas */
-    Ecorexx::EvasWindowSoftwareX11* mw = new Ecorexx::EvasWindowSoftwareX11( 
Size (WIDTH, HEIGHT) );
-    Evasxx::Canvas &evas = mw->getCanvas();
-    evas.appendFontPath( searchDataDir () + "/fonts" );
-
-    /* Create Emotionxx::Object object using xine engine */
-    Emotionxx::Object* emotion = new Emotionxx::Object( evas, Rect (0, 0, 320, 
240), argv[1], "xine" );
-    emotion->setSmoothScale( 1 );
-       
-    emotion->setPlay( true );
-    emotion->show();
-
-    mw->show();
-
-    /* Enter the application main loop */
-    app->exec();
-
-    /* Delete the application */
-    delete app;
-
-    return 0;
+  /* Create the application object */
+  Ecorexx::Application* app = new Ecorexx::Application( argc, argv, "Simple 
Emotion Test" );
+  if ( argc < 2 )
+  {
+      cerr << "Usage: " << argv[0] << "<video file>" << endl;
+      return 1;
+  }
+  /* Create the main window, a window with an embedded canvas */
+  Ecorexx::EvasWindowSoftwareX11* mw = new Ecorexx::EvasWindowSoftwareX11( 
Size (WIDTH, HEIGHT) );
+  Evasxx::Canvas &evas = mw->getCanvas();
+  evas.appendFontPath( searchDataDir () + "/fonts" );
+
+  /* Create Emotionxx::Object object using xine engine */
+  Emotionxx::SPUObject* emotion = new Emotionxx::SPUObject( evas, Rect (0, 0, 
320, 240), argv[1], "xine" );
+  emotion->setSmoothScale( 1 );
+
+  emotion->setPlay( true );
+  emotion->show();
+
+  mw->show();
+
+  /* Enter the application main loop */
+  app->exec();
+
+  /* Delete the application */
+  delete app;
+
+  return 0;
 }
 

-- 


Reply via email to