many small pending changes

SVN revision: 65200
This commit is contained in:
Andreas Volz 2011-11-14 21:31:44 +00:00
parent 48b1712f2b
commit 1260f6e706
18 changed files with 58 additions and 28 deletions

View File

@ -102,6 +102,8 @@ private:
std::map <std::pair <std::string, std::string>, SignalSignal*> mSignalList;
std::map <std::string, Part*> mPartList;
bool mFree;
};

View File

@ -14,7 +14,8 @@ using namespace std;
namespace Edjexx {
Object::Object( Evasxx::Canvas &canvas )
Object::Object( Evasxx::Canvas &canvas ) :
mFree (true)
{
// Initialize the Edje library
Base::init ();
@ -28,7 +29,8 @@ Object::Object( Evasxx::Canvas &canvas )
#endif
}
Object::Object( Evasxx::Canvas &canvas, const std::string &filename, const std::string &groupname )
Object::Object( Evasxx::Canvas &canvas, const std::string &filename, const std::string &groupname ) :
mFree (true)
{
// Initialize the Edje library
Base::init ();
@ -43,7 +45,8 @@ Object::Object( Evasxx::Canvas &canvas, const std::string &filename, const std::
setFile( filename, groupname );
}
Object::Object( Evasxx::Canvas &canvas, const Eflxx::Point &pos, const std::string &filename, const std::string &groupname )
Object::Object( Evasxx::Canvas &canvas, const Eflxx::Point &pos, const std::string &filename, const std::string &groupname ) :
mFree (true)
{
// Initialize the Edje library
Base::init ();
@ -59,15 +62,20 @@ Object::Object( Evasxx::Canvas &canvas, const Eflxx::Point &pos, const std::stri
move (pos);
}
Object::Object( Evas_Object* object)
Object::Object( Evas_Object* object) :
mFree (false)
{
o = object;
}
Object::~Object()
{
disconnectAll ();
evas_object_del( o );
if (mFree)
{
cout << "delete Object" << endl;
disconnectAll ();
evas_object_del( o );
}
}
void Object::deleteAllParts ()
@ -184,7 +192,7 @@ void Object::_edje_signal_handler_callback( void *data, Evas_Object *obj, const
Object* Object::wrap( Evas_Object* o )
{
return new Object( o );
return new Edjexx::Object( o );
}
} // end namespace Edjexx

View File

@ -26,7 +26,7 @@ static void testFunc (Evasxx::Object &obj, void *event_info)
cout << "sub-object-del" << endl;
}
int main (int argc, char **argv)
int main (int argc, const char **argv)
{
Application elmApp (argc, argv);

View File

@ -77,7 +77,7 @@ my_win_del (Evasxx::Object &obj, void *event_info)
#endif // ELM_LIB_QUICKLAUNCH
int main (int argc, char **argv)
int main (int argc, const char **argv)
{
elmApp = new Application (argc, argv);
@ -106,6 +106,8 @@ int main (int argc, char **argv)
* callback like objects or data layered on top */
win->getEventSignal ("delete-request")->connect (sigc::ptr_fun (&my_win_del));
win->setAutoDel (true);
/* add a background to our window. this just uses the standard theme set
* background. without a backgorund, you could make a window seem
* transparent with elm_win_alpha_set(win, 1); for example. if you have

View File

@ -158,7 +158,7 @@ void test_genlist (void *data, Evas_Object *obj, void *event_info)
bx->packEnd (*gl);
gl->show ();
Eflxx::CountedPtr <Evasxx::Canvas> canvas (win->getEvas ());
Eflxx::CountedPtr <Evasxx::Canvas> canvas (win->getCanvas ());
Evasxx::Rectangle *over = new Evasxx::Rectangle (*canvas);
over->setColor (Eflxx::Color (0, 0, 0, 0));

View File

@ -23,7 +23,7 @@ static void testFunc (Evasxx::Object &obj, void *event_info)
cout << "sub-object-del" << endl;
}
int main (int argc, char **argv)
int main (int argc, const char **argv)
{
Application elmApp (argc, argv);
@ -32,7 +32,7 @@ int main (int argc, char **argv)
Background *bg = Background::factory (*elmWin);
Evas *e = evas_object_evas_get(bg->obj ());
//Evas *e = evas_object_evas_get(bg->obj ());
/* Evasxx::Canvas ec (e);

View File

@ -25,8 +25,8 @@ AM_PROG_LIBTOOL
PKG_CHECK_MODULES(EFL, elementary)
PKG_CHECK_MODULES(EFLXX, eflxx evasxx)
PKG_CHECK_MODULES(EFL, elementary evas)
PKG_CHECK_MODULES(EFLXX, eflxx evasxx edjexx )
AC_OUTPUT([
elementaryxx.pc
elementaryxx-uninstalled.pc

View File

@ -6,7 +6,7 @@ includedir=include
Name: @PACKAGE@
Description: Elementary (EFL) C++ Wrapper, Not installed
Version: @VERSION@
Requires: sigc++-2.0 evasxx elementary eflxx
Requires: sigc++-2.0 evasxx edjexx elementary eflxx
Conflicts:
Libs: ${pcfiledir}/${libdir}/libelementaryxx.la
Cflags: -I${pcfiledir}/${includedir}

View File

@ -6,7 +6,7 @@ includedir=@prefix@/include
Name: @PACKAGE@
Description: Elementary (EFL) C++ Wrapper
Version: @VERSION@
Requires: sigc++-2.0 evasxx elementary eflxx
Requires: sigc++-2.0 evasxx edjexx elementary eflxx
Conflicts:
Libs: -L${libdir} -lelementaryxx
Cflags: -I${includedir}

View File

@ -11,7 +11,7 @@ namespace Elmxx {
class Application
{
public:
Application (int argc, char **argv);
Application (int argc, const char **argv);
virtual ~Application ();
static void run ();

View File

@ -4,7 +4,8 @@
/* STL */
#include <string>
/* ELFxx */
/* EFL */
#include <edjexx/Edjexx.h>
#include "Object.h"
namespace Elmxx {
@ -19,8 +20,9 @@ public:
bool setFile (const std::string &file, const std::string &group);
void setContent (const std::string &swallow, const Evasxx::Object &content);
Eflxx::CountedPtr <Edjexx::Object> getEdje ();
//EAPI Evas_Object *elm_layout_edje_get(const Evas_Object *obj);
private:
Layout (); // forbid standard constructor

View File

@ -49,13 +49,13 @@ public:
void elm_object_scroll_freeze_push(Evas_Object *obj);
void elm_object_scroll_freeze_pop(Evas_Object *obj);*/
void destroy ();
protected:
Object (); // allow only construction for child classes
virtual ~Object (); // forbid direct delete -> use destroy()
void elmInit ();
void destroy ();
private:
Object (const Object&); // forbid copy constructor

View File

@ -11,9 +11,9 @@ using namespace std;
namespace Elmxx {
Application::Application (int argc, char **argv)
Application::Application (int argc, const char **argv)
{
elm_init (argc, argv);
elm_init (argc, const_cast <char**> (argv));
}
Application::~Application ()

View File

@ -4,6 +4,9 @@
#include "../include/elementaryxx/Layout.h"
/* EFL */
#include <Evas.h>
using namespace std;
namespace Elmxx {
@ -37,4 +40,13 @@ void Layout::setContent (const std::string &swallow, const Evasxx::Object &conte
elm_layout_content_set (o, swallow.c_str (), content.obj ());
}
Eflxx::CountedPtr <Edjexx::Object> Layout::getEdje ()
{
Evas_Object *eo = elm_layout_edje_get (o);
Edjexx::Object *ret_o = Edjexx::Object::wrap (eo);
return Eflxx::CountedPtr <Edjexx::Object> (ret_o);
}
} // end namespace Elmxx

View File

@ -6,8 +6,8 @@ AM_CPPFLAGS = \
-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
-DPACKAGE_SRC_DIR=\""$(srcdir)"\" \
-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
$(EFL_CFLAGS) \
$(EFLXX_CFLAGS)
$(EFLXX_CFLAGS) \
$(EFL_CFLAGS)
AM_CFLAGS =\
-Wall\
@ -56,3 +56,7 @@ libelementaryxx_la_SOURCES = \
GenItem.cpp \
GenListItem.cpp
libelementaryxx_la_LIBADD = \
$(EFLXX_LIBS) \
$(EFL_LIBS)

View File

@ -218,7 +218,7 @@ public:
*
* @return The Canvas that the object is on.
*/
Eflxx::CountedPtr <Canvas> getEvas ();
Eflxx::CountedPtr <Evasxx::Canvas> getCanvas ();
private:

View File

@ -181,7 +181,7 @@ private:
Evas_Smart_Class sc;
CustomEventWrapMapType mCustomSignalMap;
bool mFree; /// @deprecated
bool mFree;
};
} // end namespace Evasxx

View File

@ -364,7 +364,7 @@ const Object* Object::objectLink( const Evas_Object *evas_object )
return static_cast<const Object*>( v );
}
Eflxx::CountedPtr <Canvas> Object::getEvas ()
Eflxx::CountedPtr <Canvas> Object::getCanvas ()
{
return Eflxx::CountedPtr <Canvas> (Canvas::wrap (o));
}