commit aba5b4e9d811ea83acfcfe88bfc1f3cffab4ca3b Author: Edouard Dupin Date: Tue Jul 24 21:11:15 2012 +0200 first commit creation diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..fda6d67 --- /dev/null +++ b/Makefile @@ -0,0 +1,15 @@ + +############################################################################### +### Some Preject properties : ### +############################################################################### + +# group name or constructor ... (no dot, no MAJ no Numerical char) +PROJECT_VENDOR=heeroyui +# Binary name ... (no dot, no MAJ no Numerical char) +PROJECT_NAME=fxcreator + +USER_PACKAGES=$(shell pwd)/jni/ + +# include basic makefile for EWOL +include $(shell pwd)/../ewol/Build/Makefile.mk + diff --git a/assets/Font/freefont/FreeSerif.ttf b/assets/Font/freefont/FreeSerif.ttf new file mode 100644 index 0000000..b8906f5 Binary files /dev/null and b/assets/Font/freefont/FreeSerif.ttf differ diff --git a/assets/Font/freefont/FreeSerifBold.ttf b/assets/Font/freefont/FreeSerifBold.ttf new file mode 100644 index 0000000..59a7a90 Binary files /dev/null and b/assets/Font/freefont/FreeSerifBold.ttf differ diff --git a/assets/Font/freefont/FreeSerifBoldItalic.ttf b/assets/Font/freefont/FreeSerifBoldItalic.ttf new file mode 100644 index 0000000..c187d0e Binary files /dev/null and b/assets/Font/freefont/FreeSerifBoldItalic.ttf differ diff --git a/assets/Font/freefont/FreeSerifItalic.ttf b/assets/Font/freefont/FreeSerifItalic.ttf new file mode 100644 index 0000000..7367418 Binary files /dev/null and b/assets/Font/freefont/FreeSerifItalic.ttf differ diff --git a/assets/icon/Add.svg b/assets/icon/Add.svg new file mode 100644 index 0000000..562f893 --- /dev/null +++ b/assets/icon/Add.svg @@ -0,0 +1,7 @@ + + + + + + diff --git a/assets/icon/AtoZ.svg b/assets/icon/AtoZ.svg new file mode 100644 index 0000000..781cd3c --- /dev/null +++ b/assets/icon/AtoZ.svg @@ -0,0 +1,11 @@ + + + + + + + + diff --git a/assets/icon/Attache.svg b/assets/icon/Attache.svg new file mode 100644 index 0000000..84be150 --- /dev/null +++ b/assets/icon/Attache.svg @@ -0,0 +1,7 @@ + + + + + + diff --git a/assets/icon/CaseSensitive.svg b/assets/icon/CaseSensitive.svg new file mode 100644 index 0000000..5ef3f6c --- /dev/null +++ b/assets/icon/CaseSensitive.svg @@ -0,0 +1,13 @@ + + + + + image/svg+xml + + + + + + + + diff --git a/assets/icon/Close.svg b/assets/icon/Close.svg new file mode 100644 index 0000000..ef041c8 --- /dev/null +++ b/assets/icon/Close.svg @@ -0,0 +1,9 @@ + + + + + + + diff --git a/assets/icon/Contact.svg b/assets/icon/Contact.svg new file mode 100644 index 0000000..61e6b2d --- /dev/null +++ b/assets/icon/Contact.svg @@ -0,0 +1,14 @@ + + + + + + + + + + diff --git a/assets/icon/Down.svg b/assets/icon/Down.svg new file mode 100644 index 0000000..1e34f0d --- /dev/null +++ b/assets/icon/Down.svg @@ -0,0 +1,14 @@ + + + + + image/svg+xml + + + + + + + + + diff --git a/assets/icon/FavoriteDisable.svg b/assets/icon/FavoriteDisable.svg new file mode 100644 index 0000000..5d9e376 --- /dev/null +++ b/assets/icon/FavoriteDisable.svg @@ -0,0 +1,7 @@ + + + + + + diff --git a/assets/icon/FavoriteEnable.svg b/assets/icon/FavoriteEnable.svg new file mode 100644 index 0000000..804bb84 --- /dev/null +++ b/assets/icon/FavoriteEnable.svg @@ -0,0 +1,9 @@ + + + + + + + diff --git a/assets/icon/FavoriteMiddle.svg b/assets/icon/FavoriteMiddle.svg new file mode 100644 index 0000000..4a3a616 --- /dev/null +++ b/assets/icon/FavoriteMiddle.svg @@ -0,0 +1,9 @@ + + + + + + + diff --git a/assets/icon/File.svg b/assets/icon/File.svg new file mode 100644 index 0000000..9cdd5b9 --- /dev/null +++ b/assets/icon/File.svg @@ -0,0 +1,4 @@ + + + + diff --git a/assets/icon/Folder.svg b/assets/icon/Folder.svg new file mode 100644 index 0000000..3f309e2 --- /dev/null +++ b/assets/icon/Folder.svg @@ -0,0 +1,7 @@ + + + + + + diff --git a/assets/icon/Forbidden.svg b/assets/icon/Forbidden.svg new file mode 100644 index 0000000..fa523d0 --- /dev/null +++ b/assets/icon/Forbidden.svg @@ -0,0 +1,60 @@ + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/assets/icon/Help.svg b/assets/icon/Help.svg new file mode 100644 index 0000000..8dd63d7 --- /dev/null +++ b/assets/icon/Help.svg @@ -0,0 +1,7 @@ + + + + + + diff --git a/assets/icon/Home.svg b/assets/icon/Home.svg new file mode 100644 index 0000000..4aa0a07 --- /dev/null +++ b/assets/icon/Home.svg @@ -0,0 +1,11 @@ + + + + + + + + diff --git a/assets/icon/Info.svg b/assets/icon/Info.svg new file mode 100644 index 0000000..3c957ff --- /dev/null +++ b/assets/icon/Info.svg @@ -0,0 +1,7 @@ + + + + + + diff --git a/assets/icon/List.svg b/assets/icon/List.svg new file mode 100644 index 0000000..8f2414a --- /dev/null +++ b/assets/icon/List.svg @@ -0,0 +1,11 @@ + + + + + + + + diff --git a/assets/icon/Load.svg b/assets/icon/Load.svg new file mode 100644 index 0000000..926fb25 --- /dev/null +++ b/assets/icon/Load.svg @@ -0,0 +1,7 @@ + + + + + + diff --git a/assets/icon/Lock.svg b/assets/icon/Lock.svg new file mode 100644 index 0000000..b4d88e6 --- /dev/null +++ b/assets/icon/Lock.svg @@ -0,0 +1,7 @@ + + + + + + diff --git a/assets/icon/Next.svg b/assets/icon/Next.svg new file mode 100644 index 0000000..8ac2c93 --- /dev/null +++ b/assets/icon/Next.svg @@ -0,0 +1,7 @@ + + + + + + diff --git a/assets/icon/OpenMenu.svg b/assets/icon/OpenMenu.svg new file mode 100644 index 0000000..7754b5e --- /dev/null +++ b/assets/icon/OpenMenu.svg @@ -0,0 +1,9 @@ + + + + + + + diff --git a/assets/icon/Parameter.svg b/assets/icon/Parameter.svg new file mode 100644 index 0000000..5eeed26 --- /dev/null +++ b/assets/icon/Parameter.svg @@ -0,0 +1,61 @@ + + + + + + + + + + image/svg+xml + + + + + + + diff --git a/assets/icon/Previous.svg b/assets/icon/Previous.svg new file mode 100644 index 0000000..08c79b5 --- /dev/null +++ b/assets/icon/Previous.svg @@ -0,0 +1,7 @@ + + + + + + diff --git a/assets/icon/Quit.svg b/assets/icon/Quit.svg new file mode 100644 index 0000000..bc512d1 --- /dev/null +++ b/assets/icon/Quit.svg @@ -0,0 +1,9 @@ + + + + + + + diff --git a/assets/icon/Redo.svg b/assets/icon/Redo.svg new file mode 100644 index 0000000..a76f98c --- /dev/null +++ b/assets/icon/Redo.svg @@ -0,0 +1,12 @@ + + + + + + + diff --git a/assets/icon/Remove.svg b/assets/icon/Remove.svg new file mode 100644 index 0000000..e4c4d79 --- /dev/null +++ b/assets/icon/Remove.svg @@ -0,0 +1,7 @@ + + + + + + diff --git a/assets/icon/Remove2.svg b/assets/icon/Remove2.svg new file mode 100644 index 0000000..29be9c9 --- /dev/null +++ b/assets/icon/Remove2.svg @@ -0,0 +1,63 @@ + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/assets/icon/Replace.svg b/assets/icon/Replace.svg new file mode 100644 index 0000000..2d59c32 --- /dev/null +++ b/assets/icon/Replace.svg @@ -0,0 +1,15 @@ + + + + + image/svg+xml + + + + + + + + + + diff --git a/assets/icon/SDCard.svg b/assets/icon/SDCard.svg new file mode 100644 index 0000000..1b434d3 --- /dev/null +++ b/assets/icon/SDCard.svg @@ -0,0 +1,7 @@ + + + + + + diff --git a/assets/icon/Save.svg b/assets/icon/Save.svg new file mode 100644 index 0000000..138c8a4 --- /dev/null +++ b/assets/icon/Save.svg @@ -0,0 +1,16 @@ + + + + + + + + + \ No newline at end of file diff --git a/assets/icon/Search.svg b/assets/icon/Search.svg new file mode 100644 index 0000000..53e9a44 --- /dev/null +++ b/assets/icon/Search.svg @@ -0,0 +1,61 @@ + + + + + + image/svg+xml + + + + + + + + + + diff --git a/assets/icon/Trash.svg b/assets/icon/Trash.svg new file mode 100644 index 0000000..c7765e9 --- /dev/null +++ b/assets/icon/Trash.svg @@ -0,0 +1,9 @@ + + + + + + + diff --git a/assets/icon/Undo.svg b/assets/icon/Undo.svg new file mode 100644 index 0000000..2cdc7f8 --- /dev/null +++ b/assets/icon/Undo.svg @@ -0,0 +1,12 @@ + + + + + + + diff --git a/assets/icon/Up.svg b/assets/icon/Up.svg new file mode 100644 index 0000000..273a0fe --- /dev/null +++ b/assets/icon/Up.svg @@ -0,0 +1,14 @@ + + + + + image/svg+xml + + + + + + + + + diff --git a/assets/icon/Update.svg b/assets/icon/Update.svg new file mode 100644 index 0000000..67286a1 --- /dev/null +++ b/assets/icon/Update.svg @@ -0,0 +1,9 @@ + + + + + + + diff --git a/assets/icon/Validate.svg b/assets/icon/Validate.svg new file mode 100644 index 0000000..54e9f80 --- /dev/null +++ b/assets/icon/Validate.svg @@ -0,0 +1,7 @@ + + + + + + diff --git a/assets/icon/VolumeMax.svg b/assets/icon/VolumeMax.svg new file mode 100644 index 0000000..181f34d --- /dev/null +++ b/assets/icon/VolumeMax.svg @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/assets/icon/VolumeMute.svg b/assets/icon/VolumeMute.svg new file mode 100644 index 0000000..a28cefb --- /dev/null +++ b/assets/icon/VolumeMute.svg @@ -0,0 +1,9 @@ + + + + + + + diff --git a/assets/icon/Warning.svg b/assets/icon/Warning.svg new file mode 100644 index 0000000..2e1cbd7 --- /dev/null +++ b/assets/icon/Warning.svg @@ -0,0 +1,7 @@ + + + + + + diff --git a/assets/icon/WhereAmI.svg b/assets/icon/WhereAmI.svg new file mode 100644 index 0000000..80e6032 --- /dev/null +++ b/assets/icon/WhereAmI.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + diff --git a/assets/icon/WrapAround.svg b/assets/icon/WrapAround.svg new file mode 100644 index 0000000..2b0b925 --- /dev/null +++ b/assets/icon/WrapAround.svg @@ -0,0 +1,13 @@ + + + + + image/svg+xml + + + + + + + + diff --git a/assets/icon/ZoomIn.svg b/assets/icon/ZoomIn.svg new file mode 100644 index 0000000..25578fc --- /dev/null +++ b/assets/icon/ZoomIn.svg @@ -0,0 +1,9 @@ + + + + + + + diff --git a/jni/Android.mk b/jni/Android.mk new file mode 100644 index 0000000..d245bd7 --- /dev/null +++ b/jni/Android.mk @@ -0,0 +1,48 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) + +# load the common sources file of the platform +include $(LOCAL_PATH)/file.mk + +# name of the librairy +LOCAL_MODULE := fxcreatorpackage + +# get the tag of the current project : +LOCAL_VERSION_TAG=$(shell cd $(LOCAL_PATH) ; git describe --tags) +LOCAL_VERSION_TAG_SHORT=$(shell cd $(LOCAL_PATH) ; git describe --tags --abbrev=0) +$(info $(LOCAL_MODULE) version TAG : $(LOCAL_VERSION_TAG)) + +# name of the dependency +LOCAL_STATIC_LIBRARIES := ewol etk tinyxml libzip libpng libfreetype libparsersvg libagg + +LOCAL_C_INCLUDES := $(LOCAL_PATH) $(addprefix $(LOCAL_PATH)/, $(sort $(dir $(FILE_LIST)))) + +LOCAL_SRC_FILES := ewolAndroidAbstraction.cpp \ + $(FILE_LIST) + +LOCAL_LDLIBS := -llog -landroid + +# -frtti +ifeq ($(DEBUG),1) +LOCAL_CFLAGS := -D__PLATFORM__Android \ + -D__MODE__Touch \ + -DETK_DEBUG_LEVEL=3 \ + -DAPPL_DEBUG_LEVEL=3 \ + -DPROJECT_NAME="\"$(LOCAL_MODULE)\"" +else +LOCAL_CFLAGS := -D__PLATFORM__Android \ + -D__MODE__Touch \ + -DETK_DEBUG_LEVEL=1 \ + -DAPPL_DEBUG_LEVEL=1 \ + -DMODE_RELEASE \ + -DPROJECT_NAME="\"$(LOCAL_MODULE)\"" +endif + + +include $(BUILD_SHARED_LIBRARY) + +NDK_MODULE_PATH := $(LOCAL_PATH)/../../ + + +$(call import-module,ewol/Sources) diff --git a/jni/Linux.mk b/jni/Linux.mk new file mode 100644 index 0000000..68a8a0b --- /dev/null +++ b/jni/Linux.mk @@ -0,0 +1,44 @@ +LOCAL_PATH := $(call my-dir) + +include $(CLEAR_VARS) + +# load the common sources file of the platform +include $(LOCAL_PATH)/file.mk + +# name of the librairy +LOCAL_MODULE := fxcreator + +# get the tag of the current project : +LOCAL_VERSION_TAG=$(shell cd $(LOCAL_PATH) ; git describe --tags) +LOCAL_VERSION_TAG_SHORT=$(shell cd $(LOCAL_PATH) ; git describe --tags --abbrev=0) +$(info $(LOCAL_MODULE) version TAG : $(LOCAL_VERSION_TAG)) + +# name of the dependency +LOCAL_STATIC_LIBRARIES := ewol + +LOCAL_C_INCLUDES := $(LOCAL_PATH) $(addprefix $(LOCAL_PATH)/, $(sort $(dir $(FILE_LIST)))) + +LOCAL_SRC_FILES := $(FILE_LIST) + + +LOCAL_LDLIBS := + +ifeq ($(DEBUG),1) +LOCAL_CFLAGS := -D__PLATFORM__Linux \ + -DETK_DEBUG_LEVEL=3 \ + -DAPPL_DEBUG_LEVEL=3 \ + -DPROJECT_NAME="\"$(LOCAL_MODULE)\"" +else +LOCAL_CFLAGS := -D__PLATFORM__Linux \ + -DETK_DEBUG_LEVEL=3 \ + -DAPPL_DEBUG_LEVEL=1 \ + -DMODE_RELEASE \ + -DPROJECT_NAME="\"$(LOCAL_MODULE)\"" +endif + +include $(BUILD_EXECUTABLE) + +NDK_MODULE_PATH := $(LOCAL_PATH)/../../ + + +$(call import-module,ewol/Sources) diff --git a/jni/appl/Debug.cpp b/jni/appl/Debug.cpp new file mode 100644 index 0000000..03e9479 --- /dev/null +++ b/jni/appl/Debug.cpp @@ -0,0 +1,27 @@ +/** + ******************************************************************************* + * @file Debug.h + * @brief Application log implementation + * @author Edouard DUPIN + * @date 24/07/2012 + * @par Project + * fxCreator + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + + +const char * applLog = "fxCreator"; diff --git a/jni/appl/Debug.h b/jni/appl/Debug.h new file mode 100644 index 0000000..508e99b --- /dev/null +++ b/jni/appl/Debug.h @@ -0,0 +1,78 @@ +/** + ******************************************************************************* + * @file Debug.h + * @brief Application log implementation + * @author Edouard DUPIN + * @date 24/07/2012 + * @par Project + * fxCreator + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#ifndef __DEBUG_H__ +#define __DEBUG_H__ + +#include +#include + +extern const char * applLog; + +#define APPL_CRITICAL(data) ETK_CRITICAL(applLog, data) +// General +#if APPL_DEBUG_LEVEL > 0 +# define APPL_WARNING(data) ETK_WARNING(applLog, data) +# define APPL_ERROR(data) ETK_ERROR(applLog, data) +#else +# define APPL_WARNING(data) do {}while(0) +# define APPL_ERROR(data) do {}while(0) +#endif + +#if APPL_DEBUG_LEVEL > 1 +# define APPL_INFO(data) ETK_INFO(applLog, data) +#else +# define APPL_INFO(data) do {}while(0) +#endif + +#if APPL_DEBUG_LEVEL > 2 +# define APPL_DEBUG(data) ETK_DEBUG(applLog, data) +#else +# define APPL_DEBUG(data) do {}while(0) +#endif + +#if APPL_DEBUG_LEVEL > 3 +# define APPL_VERBOSE(data) ETK_VERBOSE(applLog, data) +#else +# define APPL_VERBOSE(data) do {}while(0) +#endif + +#define APPL_TODO(data) ETK_WARNING(applLog, "TODO : " << data) + +#define APPL_ASSERT(cond, data) ETK_ASSERT(applLog, cond, data) + +#if APPL_DEBUG_LEVEL > 1 +# define APPL_CHECK_INOUT(cond) ETK_CHECK_INOUT_ASSERT(applLog, cond) +#elif APPL_DEBUG_LEVEL > 0 +# define APPL_CHECK_INOUT(cond) ETK_CHECK_INOUT_WARNING(applLog, cond) +#else +# define APPL_CHECK_INOUT(cond) do { } while (0) +#endif + + + + + +#endif diff --git a/jni/appl/Gui/MainWindows.cpp b/jni/appl/Gui/MainWindows.cpp new file mode 100644 index 0000000..75f6ce6 --- /dev/null +++ b/jni/appl/Gui/MainWindows.cpp @@ -0,0 +1,130 @@ +/** + ******************************************************************************* + * @file MainWindows.cpp + * @brief Audio FX creator : main Windows diplayer (Sources) + * @author Edouard DUPIN + * @date 24/07/2012 + * @par Project + * fxCreator + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#undef __class__ +#define __class__ "MainWindows" + +MainWindows::MainWindows(void) +{ + APPL_DEBUG("CREATE WINDOWS ... "); + ewol::SizerVert * mySizerVert = NULL; + ewol::SizerVert * mySizerVert2 = NULL; + ewol::SizerHori * mySizerHori = NULL; + //ewol::Button * myButton = NULL; + ewol::Menu * myMenu = NULL; + + mySizerVert = new ewol::SizerVert(); + SetSubWidget(mySizerVert); + + mySizerHori = new ewol::SizerHori(); + mySizerVert->SubWidgetAdd(mySizerHori); + + + + mySizerHori = new ewol::SizerHori(); + mySizerVert->SubWidgetAdd(mySizerHori); + + myMenu = new ewol::Menu(); + mySizerHori->SubWidgetAdd(myMenu); + int32_t idMenuFile = myMenu->AddTitle("File"); + /* + (void)myMenu->Add(idMenuFile, "New", "", ednMsgGuiNew); + (void)myMenu->AddSpacer(); + (void)myMenu->Add(idMenuFile, "Open", "icon/Load.svg", ednMsgGuiOpen); + (void)myMenu->Add(idMenuFile, "Close", "icon/Close.svg", ednMsgGuiClose, "current"); + (void)myMenu->Add(idMenuFile, "Close (all)", "", ednMsgGuiClose, "All"); + (void)myMenu->Add(idMenuFile, "Save", "icon/Save.svg", ednMsgGuiSave, "current"); + (void)myMenu->Add(idMenuFile, "Save As ...", "", ednMsgGuiSaveAs); + */ + + m_widgetLabelFileName = new ewol::Label("FileName"); + m_widgetLabelFileName->SetExpendX(true); + m_widgetLabelFileName->SetFillY(true); + mySizerHori->SubWidgetAdd(m_widgetLabelFileName); + + // Generic event ... + //RegisterMultiCast(ednMsgGuiSaveAs); + +} + + +MainWindows::~MainWindows(void) +{ + +} + + +const char *const ednEventPopUpFileSelected = "edn-mainWindows-openSelected"; +const char *const ednEventPopUpFileSaveAs = "edn-mainWindows-saveAsSelected"; + +/** + * @brief Receive a message from an other EObject with a specific eventId and data + * @param[in] CallerObject Pointer on the EObject that information came from + * @param[in] eventId Message registered by this class + * @param[in] data Data registered by this class + * @return --- + */ +void MainWindows::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data) +{ + ewol::Windows::OnReceiveMessage(CallerObject, eventId, data); + + return; +} + + +/** +* @brief Inform object that an other object is removed ... +* @param[in] removeObject Pointer on the EObject remeved ==> the user must remove all reference on this EObject +* @note : Sub classes must call this class +* @return --- +*/ +void MainWindows::OnObjectRemove(ewol::EObject * removeObject) +{ + ewol::Windows::OnObjectRemove(removeObject); +/* + if (m_widgetLabelFileName == removeObject) { + m_widgetLabelFileName = NULL; + } +*/ +} diff --git a/jni/appl/Gui/MainWindows.h b/jni/appl/Gui/MainWindows.h new file mode 100644 index 0000000..211e75c --- /dev/null +++ b/jni/appl/Gui/MainWindows.h @@ -0,0 +1,70 @@ +/** + ******************************************************************************* + * @file MainWindows.h + * @brief Audio FX creator : main Windows diplayer (header) + * @author Edouard DUPIN + * @date 24/07/2012 + * @par Project + * fxCreator + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ +#ifndef __MAIN_WINDOWS_H__ +#define __MAIN_WINDOWS_H__ + +#include +#include +#include +#include + +class MainWindows : public ewol::Windows +{ + private: + int32_t m_currentSavingAsIdBuffer; + ewol::Label* m_widgetLabelFileName; + public: + // Constructeur + MainWindows(void); + ~MainWindows(void); + /** + * @brief Get the current Object type of the EObject + * @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it + * @param[in] objectType type description + * @return true if the object is compatible, otherwise false + */ + const char * const GetObjectType(void) { return "ApplMainWindows"; }; + /** + * @brief Receive a message from an other EObject with a specific eventId and data + * @param[in] CallerObject Pointer on the EObject that information came from + * @param[in] eventId Message registered by this class + * @param[in] data Data registered by this class + * @return --- + */ + virtual void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data); + /** + * @brief Inform object that an other object is removed ... + * @param[in] removeObject Pointer on the EObject remeved ==> the user must remove all reference on this EObject + * @note : Sub classes must call this class + * @return --- + */ + virtual void OnObjectRemove(ewol::EObject * removeObject); +}; + +#define EDN_CAST_MAIN_WINDOWS(curentPointer) EWOL_CAST(TYPE_EOBJECT_EDN_MAIN_WINDOWS,MainWindows,curentPointer) + +#endif + + diff --git a/jni/appl/globalMsg.cpp b/jni/appl/globalMsg.cpp new file mode 100644 index 0000000..c93e7df --- /dev/null +++ b/jni/appl/globalMsg.cpp @@ -0,0 +1,33 @@ +/** + ******************************************************************************* + * @file appl/globalMsg.cpp + * @brief Fx Creator : message beetween thread and GUI elements ... (Souces) + * @author Edouard DUPIN + * @date 24/07/2012 + * @par Project + * fxCreator + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#include + + +//////////////////////////////////////////////////////////////////////// +// Event of the gui request something : +//////////////////////////////////////////////////////////////////////// +extern const char* const fxcMsgGuiNew = "fxc-Msg-Gui-New"; + diff --git a/jni/appl/globalMsg.h b/jni/appl/globalMsg.h new file mode 100644 index 0000000..8123522 --- /dev/null +++ b/jni/appl/globalMsg.h @@ -0,0 +1,37 @@ +/** + ******************************************************************************* + * @file appl/globalMsg.h + * @brief Fx Creator : message beetween thread and GUI elements ... (header) + * @author Edouard DUPIN + * @date 24/07/2012 + * @par Project + * fxCreator + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#ifndef __MSG_BROADCAST_H__ +#define __MSG_BROADCAST_H__ + +//////////////////////////////////////////////////////////////////////// +// Event of the gui request something : +//////////////////////////////////////////////////////////////////////// + extern const char* const fxcMsgGuiNew; // data : "" + + + +#endif + diff --git a/jni/appl/init.cpp b/jni/appl/init.cpp new file mode 100644 index 0000000..c3ad8c3 --- /dev/null +++ b/jni/appl/init.cpp @@ -0,0 +1,107 @@ +/** + ******************************************************************************* + * @file init.cpp + * @brief Fx Creator main file + * @author Edouard DUPIN + * @date 24/07/2012 + * @par Project + * fxCreator + * + * @par Copyright + * Copyright 2010 Edouard DUPIN, all right reserved + * + * This software is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY. + * + * Licence summary : + * You can modify and redistribute the sources code and binaries. + * You can send me the bug-fix + * You can not earn money with this Software (if the source extract from Edn + * represent less than 50% of original Sources) + * Term of the licence in in the file licence.txt. + * + ******************************************************************************* + */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +MainWindows * basicWindows = NULL; + + +/** + * @brief main application function Initialisation + */ +void APP_Init(void) +{ + #ifdef __PLATFORM__Linux + #ifdef MODE_RELEASE + APPL_INFO("==> Init "PROJECT_NAME" (START) (Linux) (Release)"); + #else + APPL_INFO("==> Init "PROJECT_NAME" (START) (Linux) (Debug)"); + #endif + #else + #ifdef MODE_RELEASE + APPL_INFO("==> Init "PROJECT_NAME" (START) (Android) (Release)"); + #else + APPL_INFO("==> Init "PROJECT_NAME" (START) (Android) (Debug)"); + #endif + #endif + ewol::ChangeSize(800, 600); + etk::InitDefaultFolder(PROJECT_NAME); + + ewol::SetFontFolder("Font"); + + #ifdef __PLATFORM__Android + ewol::SetDefaultFont("freefont/FreeSerif.ttf", 19); + #else + ewol::SetDefaultFont("freefont/FreeSerif.ttf", 14); + #endif + + basicWindows = new MainWindows(); + + if (NULL == basicWindows) { + APPL_ERROR("Can not allocate the basic windows"); + ewol::Stop(); + return; + } + // create the specific windows + ewol::DisplayWindows(basicWindows); + + // add files + APPL_INFO("show list of files : "); + + APPL_INFO("==> Init Edn (END)"); +} + + +etk::File APP_Icon(void) +{ + return ""; +} + +/** + * @brief main application function Un-Initialisation + */ +void APP_UnInit(void) +{ + APPL_INFO("==> Un-Init Edn (START)"); + // Remove windows : + ewol::DisplayWindows(NULL); + + if (NULL != basicWindows) { + basicWindows->MarkToRemove(); + basicWindows = NULL; + } + APPL_INFO("==> Un-Init Edn (END)"); +} + diff --git a/jni/file.mk b/jni/file.mk new file mode 100644 index 0000000..b928538 --- /dev/null +++ b/jni/file.mk @@ -0,0 +1,15 @@ + + +############################################################################### +### Files Listes ### +############################################################################### + +# Globals debug tool: +FILE_LIST+= appl/Debug.cpp + +# Gui: +FILE_LIST+= appl/Gui/MainWindows.cpp + +# Main entry file : +FILE_LIST+= appl/init.cpp +