emotionxx example

SVN revision: 50488
This commit is contained in:
Andreas Volz 2010-07-25 18:29:53 +00:00
parent 3edcb64f4b
commit 3b5ce6e53f
5 changed files with 89 additions and 27 deletions

View File

@ -97,9 +97,6 @@ AC_DEFINE_UNQUOTED(SYSTEM_PIXMAPS_DIR, "${packageprefix}/${systempixmapsdir}",""
AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}","") 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(EDJEXX, edjexx)
PKG_CHECK_MODULES(EFL, eflxx) PKG_CHECK_MODULES(EFL, eflxx)
PKG_CHECK_MODULES(ECOREXX, ecorexx) PKG_CHECK_MODULES(ECOREXX, ecorexx)
@ -131,6 +128,7 @@ src/eetxx/Makefile
src/eetxx/simple_write_read/Makefile src/eetxx/simple_write_read/Makefile
src/emotionxx/Makefile src/emotionxx/Makefile
src/emotionxx/simple/Makefile src/emotionxx/simple/Makefile
src/emotionxx/audio/Makefile
src/elementaryxx/Makefile src/elementaryxx/Makefile
src/elementaryxx/simple/Makefile src/elementaryxx/simple/Makefile
src/elementaryxx/full/Makefile src/elementaryxx/full/Makefile

View File

@ -1,6 +1,7 @@
SUBDIRS = \ SUBDIRS = \
simple simple\
audio
## File created by the gnome-build tools ## File created by the gnome-build tools

View File

@ -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

View File

@ -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;
}

View File

@ -16,33 +16,33 @@ using namespace std;
int main( int argc, const char **argv ) int main( int argc, const char **argv )
{ {
/* Create the application object */ /* Create the application object */
Ecorexx::Application* app = new Ecorexx::Application( argc, argv, "Simple Emotion Test" ); Ecorexx::Application* app = new Ecorexx::Application( argc, argv, "Simple Emotion Test" );
if ( argc < 2 ) if ( argc < 2 )
{ {
cerr << "Usage: " << argv[0] << "<video file>" << endl; cerr << "Usage: " << argv[0] << "<video file>" << endl;
return 1; return 1;
} }
/* Create the main window, a window with an embedded canvas */ /* Create the main window, a window with an embedded canvas */
Ecorexx::EvasWindowSoftwareX11* mw = new Ecorexx::EvasWindowSoftwareX11( Size (WIDTH, HEIGHT) ); Ecorexx::EvasWindowSoftwareX11* mw = new Ecorexx::EvasWindowSoftwareX11( Size (WIDTH, HEIGHT) );
Evasxx::Canvas &evas = mw->getCanvas(); Evasxx::Canvas &evas = mw->getCanvas();
evas.appendFontPath( searchDataDir () + "/fonts" ); evas.appendFontPath( searchDataDir () + "/fonts" );
/* Create Emotionxx::Object object using xine engine */ /* Create Emotionxx::Object object using xine engine */
Emotionxx::Object* emotion = new Emotionxx::Object( evas, Rect (0, 0, 320, 240), argv[1], "xine" ); Emotionxx::SPUObject* emotion = new Emotionxx::SPUObject( evas, Rect (0, 0, 320, 240), argv[1], "xine" );
emotion->setSmoothScale( 1 ); emotion->setSmoothScale( 1 );
emotion->setPlay( true );
emotion->show();
mw->show(); emotion->setPlay( true );
emotion->show();
/* Enter the application main loop */ mw->show();
app->exec();
/* Delete the application */ /* Enter the application main loop */
delete app; app->exec();
return 0; /* Delete the application */
delete app;
return 0;
} }