tasn pushed a commit to branch master.

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

commit d90a7ce8205f344caed35afc997cfa46e3e0502c
Author: Andreas Volz <li...@brachttal.net>
Date:   Sat Dec 19 22:54:41 2009 +0000

    added esmart cairo wrapper
    
    
    SVN revision: 44583
---
 esmartxx/configure.ac                              | 10 ++--
 esmartxx/esmartxx_cairo-uninstalled.pc.in          | 12 +++++
 esmartxx/esmartxx_cairo.pc.in                      | 13 ++++++
 esmartxx/src/Makefile.am                           |  7 +--
 esmartxx/src/esmartxx_cairo/Cairo.cpp              | 54 ++++++++++++++++++++++
 esmartxx/src/esmartxx_cairo/Cairo.h                | 41 ++++++++++++++++
 esmartxx/src/esmartxx_cairo/Makefile.am            | 27 +++++++++++
 .../Container.cpp                                  |  0
 .../{container => esmartxx_container}/Container.h  |  0
 .../{container => esmartxx_container}/Makefile.am  |  0
 esmartxx/src/{group => esmartxx_group}/Group.cpp   |  0
 esmartxx/src/{group => esmartxx_group}/Group.h     |  0
 esmartxx/src/{group => esmartxx_group}/Makefile.am |  0
 .../{textentry => esmartxx_textentry}/Makefile.am  |  0
 .../TextEntry.cpp                                  |  0
 .../{textentry => esmartxx_textentry}/TextEntry.h  |  0
 16 files changed, 158 insertions(+), 6 deletions(-)

diff --git a/esmartxx/configure.ac b/esmartxx/configure.ac
index 584b922..981276f 100644
--- a/esmartxx/configure.ac
+++ b/esmartxx/configure.ac
@@ -28,7 +28,10 @@ AM_PROG_LIBTOOL
 PKG_CHECK_MODULES(EFL, eflxx evasxx edjexx)
 PKG_CHECK_MODULES(ESMART_TEXTENTRY, esmart_text_entry)
 PKG_CHECK_MODULES(ESMART_CONTAINER, esmart_container)
+PKG_CHECK_MODULES(ESMART_CAIRO, esmart_cairo)
 AC_OUTPUT([
+esmartxx_cairo.pc
+esmartxx_cairo-uninstalled.pc
 esmartxx_container.pc
 esmartxx_container-uninstalled.pc
 esmartxx_group.pc
@@ -37,7 +40,8 @@ esmartxx_textentry.pc
 esmartxx_textentry-uninstalled.pc
 Makefile
 src/Makefile
-src/container/Makefile
-src/group/Makefile
-src/textentry/Makefile
+src/esmartxx_container/Makefile
+src/esmartxx_cairo/Makefile
+src/esmartxx_group/Makefile
+src/esmartxx_textentry/Makefile
 ])
diff --git a/esmartxx/esmartxx_cairo-uninstalled.pc.in 
b/esmartxx/esmartxx_cairo-uninstalled.pc.in
new file mode 100644
index 0000000..35be47c
--- /dev/null
+++ b/esmartxx/esmartxx_cairo-uninstalled.pc.in
@@ -0,0 +1,12 @@
+prefix=
+exec_prefix=
+libdir=src/container
+includedir=src
+
+Name: @PACKAGE@
+Description: Esmart_Cairo (EFL) C++ Wrapper, Not installed
+Version: @VERSION@
+Requires: sigc++-2.0 evasxx
+Conflicts: 
+Libs: ${pcfiledir}/${libdir}/libesmartxx_cairo.la
+Cflags: -I${pcfiledir}/${includedir} 
diff --git a/esmartxx/esmartxx_cairo.pc.in b/esmartxx/esmartxx_cairo.pc.in
new file mode 100644
index 0000000..a65cf45
--- /dev/null
+++ b/esmartxx/esmartxx_cairo.pc.in
@@ -0,0 +1,13 @@
+prefix=@prefix@
+exec_prefix=@prefix@
+libdir=@exec_prefix@/lib
+includedir=@prefix@/include
+
+Name: @PACKAGE@
+Description: Esmart_Cairo (EFL) C++ Wrapper
+Version: @VERSION@
+Requires: sigc++-2.0 evasxx
+Conflicts: 
+Libs: -L${libdir} -lesmartxx_cairo
+Cflags: -I${includedir}
+
diff --git a/esmartxx/src/Makefile.am b/esmartxx/src/Makefile.am
index 666c159..d6927d3 100644
--- a/esmartxx/src/Makefile.am
+++ b/esmartxx/src/Makefile.am
@@ -12,7 +12,8 @@ AM_CFLAGS =\
         -g
 
 SUBDIRS = \
-       container\
-       group\
-       textentry
+       esmartxx_container\
+       esmartxx_group\
+       esmartxx_textentry \
+       esmartxx_cairo
 
diff --git a/esmartxx/src/esmartxx_cairo/Cairo.cpp 
b/esmartxx/src/esmartxx_cairo/Cairo.cpp
new file mode 100644
index 0000000..3c94c11
--- /dev/null
+++ b/esmartxx/src/esmartxx_cairo/Cairo.cpp
@@ -0,0 +1,54 @@
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "Cairo.h"
+
+#include <iostream>
+#include <assert.h>
+
+using namespace std;
+
+namespace Esmartxx {
+  
+Cairo::Cairo( Evasxx::Canvas &canvas, const Eflxx::Size &size, bool alpha)
+{
+  o = esmart_image_cairo_new( canvas.obj(), size.width (), size.height (), 
alpha );
+  init();
+}
+
+Cairo::Cairo( Evasxx::Canvas &canvas, const Eflxx::Point &pos, const 
Eflxx::Size &size, bool alpha)
+{
+  o = esmart_image_cairo_new( canvas.obj(), size.width (), size.height (), 
alpha );
+  init();
+
+  move( pos );
+}
+
+Cairo::Cairo( Evasxx::Canvas &canvas, cairo_surface_t *cairo_surface)
+{
+  o = esmart_image_cairo_new_from_surface( canvas.obj(), cairo_surface );
+  init();
+}
+
+Cairo::~Cairo()
+{
+  evas_object_del( o );
+}
+
+cairo_surface_t* Cairo::getSurface ()
+{
+  return esmart_image_cairo_surface_get (o);
+}
+
+bool Cairo::setSurface (cairo_surface_t *cairo_surface)
+{
+  return esmart_image_cairo_surface_set (o, mCairoSurface);
+}
+
+void Cairo::setAutoFill (bool enable)
+{
+  esmart_image_cairo_fill_auto_set (o, enable);
+}
+
+} // end namespace Esmartxx
diff --git a/esmartxx/src/esmartxx_cairo/Cairo.h 
b/esmartxx/src/esmartxx_cairo/Cairo.h
new file mode 100644
index 0000000..d56b2bb
--- /dev/null
+++ b/esmartxx/src/esmartxx_cairo/Cairo.h
@@ -0,0 +1,41 @@
+#ifndef ESMARTXX_CAIRO_H
+#define ESMARTXX_CAIRO_H
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <evasxx/Smart.h>
+
+/* EFL */
+#include <Esmart/Esmart_Cairo.h>
+
+namespace Esmartxx {
+
+class Cairo : public Evasxx::Smart
+{
+public:
+
+public:
+  Cairo( Evasxx::Canvas &canvas, const Eflxx::Size &size, bool alpha);
+  Cairo( Evasxx::Canvas &canvas, const Eflxx::Point &pos, const Eflxx::Size 
&size, bool alpha);
+  Cairo( Evasxx::Canvas &canvas, cairo_surface_t *cairo_surface);  // 
TODO:think about supporting cairomm
+  
+  virtual ~Cairo();
+
+public:
+
+  cairo_surface_t* getSurface ();
+  
+  bool setSurface (cairo_surface_t *cairo_surface);
+  
+  void setAutoFill (bool enable);
+  
+private:
+  cairo_surface_t *mCairoSurface;
+
+};
+
+} // end namespace Esmartxx
+
+#endif // ESMARTXX_CAIRO_H
diff --git a/esmartxx/src/esmartxx_cairo/Makefile.am 
b/esmartxx/src/esmartxx_cairo/Makefile.am
new file mode 100644
index 0000000..2b6d52d
--- /dev/null
+++ b/esmartxx/src/esmartxx_cairo/Makefile.am
@@ -0,0 +1,27 @@
+
+lib_LTLIBRARIES = \
+       libesmartxx_cairo.la
+
+libesmartxx_cairo_la_SOURCES = \
+       Cairo.cpp
+
+libesmartxx_cairo_la_LIBADD =                \
+       $(EFL_LIBS)                \
+       $(ESMART_CAIRO_LIBS)
+
+EXTRA_DIST = \
+       $(esmartxx_cairo_HEADERS)\
+       $(libesmartxx_cairo_HEADERS)
+
+libesmartxx_cairo_HEADERS = \
+       Cairo.h
+
+libesmartxx_cairodir = \
+       $(pkgincludedir)
+
+AM_CPPFLAGS = \
+       $(EFL_CFLAGS) \
+       $(ESMART_CAIRO_CFLAGS)
+
+## File created by the gnome-build tools
+
diff --git a/esmartxx/src/container/Container.cpp 
b/esmartxx/src/esmartxx_container/Container.cpp
similarity index 100%
rename from esmartxx/src/container/Container.cpp
rename to esmartxx/src/esmartxx_container/Container.cpp
diff --git a/esmartxx/src/container/Container.h 
b/esmartxx/src/esmartxx_container/Container.h
similarity index 100%
rename from esmartxx/src/container/Container.h
rename to esmartxx/src/esmartxx_container/Container.h
diff --git a/esmartxx/src/container/Makefile.am 
b/esmartxx/src/esmartxx_container/Makefile.am
similarity index 100%
rename from esmartxx/src/container/Makefile.am
rename to esmartxx/src/esmartxx_container/Makefile.am
diff --git a/esmartxx/src/group/Group.cpp 
b/esmartxx/src/esmartxx_group/Group.cpp
similarity index 100%
rename from esmartxx/src/group/Group.cpp
rename to esmartxx/src/esmartxx_group/Group.cpp
diff --git a/esmartxx/src/group/Group.h b/esmartxx/src/esmartxx_group/Group.h
similarity index 100%
rename from esmartxx/src/group/Group.h
rename to esmartxx/src/esmartxx_group/Group.h
diff --git a/esmartxx/src/group/Makefile.am 
b/esmartxx/src/esmartxx_group/Makefile.am
similarity index 100%
rename from esmartxx/src/group/Makefile.am
rename to esmartxx/src/esmartxx_group/Makefile.am
diff --git a/esmartxx/src/textentry/Makefile.am 
b/esmartxx/src/esmartxx_textentry/Makefile.am
similarity index 100%
rename from esmartxx/src/textentry/Makefile.am
rename to esmartxx/src/esmartxx_textentry/Makefile.am
diff --git a/esmartxx/src/textentry/TextEntry.cpp 
b/esmartxx/src/esmartxx_textentry/TextEntry.cpp
similarity index 100%
rename from esmartxx/src/textentry/TextEntry.cpp
rename to esmartxx/src/esmartxx_textentry/TextEntry.cpp
diff --git a/esmartxx/src/textentry/TextEntry.h 
b/esmartxx/src/esmartxx_textentry/TextEntry.h
similarity index 100%
rename from esmartxx/src/textentry/TextEntry.h
rename to esmartxx/src/esmartxx_textentry/TextEntry.h

-- 


Reply via email to