Fixed code style issues in the app-assist-efl module 37/99037/4
authorAleksandr Sapozhnik <a.sapozhnik@samsung.com>
Mon, 21 Nov 2016 14:23:13 +0000 (16:23 +0200)
committerAleksandr Sapozhnik <a.sapozhnik@samsung.com>
Thu, 24 Nov 2016 08:26:11 +0000 (10:26 +0200)
Change-Id: Iefaf24bdfd05fc136f12b644a448c17dd2d196f9
Signed-off-by: Aleksandr Sapozhnik <a.sapozhnik@samsung.com>
27 files changed:
app-assist-efl/inc/IWUiObject.h
app-assist-efl/inc/WApp.h
app-assist-efl/inc/WAppEventHandler.h
app-assist-efl/inc/WControl.h
app-assist-efl/inc/WDebugBase.h
app-assist-efl/inc/WDefine.h
app-assist-efl/inc/WEvasObject.h
app-assist-efl/inc/WGenlistItem.h
app-assist-efl/inc/WMenuPopup.h
app-assist-efl/inc/WNaviframe.h
app-assist-efl/inc/WPopup.h
app-assist-efl/inc/WToastPopup.h
app-assist-efl/inc/WUiTimer.h
app-assist-efl/inc/WView.h
app-assist-efl/inc/WWindow.h
app-assist-efl/src/WApp.cpp
app-assist-efl/src/WAppEventHandler.cpp
app-assist-efl/src/WControl.cpp
app-assist-efl/src/WEvasObject.cpp
app-assist-efl/src/WGenlistItem.cpp
app-assist-efl/src/WMenuPopup.cpp
app-assist-efl/src/WNaviframe.cpp
app-assist-efl/src/WPopup.cpp
app-assist-efl/src/WUiTimer.cpp
app-assist-efl/src/WVersion.cpp
app-assist-efl/src/WView.cpp
app-assist-efl/src/WWindow.cpp

index 74f756c..2a7d0a6 100644 (file)
@@ -48,19 +48,19 @@ public:
         *
         * @return true if succeed.
         */
-       virtual bool create(Evas_Object* parent, void* param)=0;
+       virtual bool create(Evas_Object *parent, void *param) = 0;
 
        /**
         * @brief Destroys this class instance and deletes evas object.
         */
-       virtual void destroy()=0;
+       virtual void destroy() = 0;
 
        /**
         * @brief Get the evas object created.
         *
         * @return evas object created.
         */
-       virtual Evas_Object* getEvasObj()=0;
+       virtual Evas_Object *getEvasObj() = 0;
 
 protected:
        /**
index d6009e0..9c7264d 100644 (file)
 * @code
 *
 * // main.cpp
-* WAPP_ASSIST_EXPORT int main( int argc, char* argv[] )
+* WAPP_ASSIST_EXPORT int main(int argc, char *argv[])
 * {
 *   MyApp app;
-*   int ret = app.start( argc, argv );
+*   int ret = app.start(argc, argv);
 *   return ret;
 * }
 * @endcode
@@ -59,7 +59,7 @@ public:
         *
         * @return result
         */
-       int start( int argc, char* argv[] );
+       int start(int argc, char *argv[]);
 
 protected:
        /**
@@ -70,7 +70,7 @@ protected:
         *
         * @return result.
         */
-       virtual int onStart( int argc, char* argv[] );
+       virtual int onStart(int argc, char *argv[]);
 
        /**
         * @brief Called when the application created.
@@ -100,14 +100,14 @@ protected:
         * @param[in]   request       Handle of request information.
         * @param[in]   firstLaunch   True, if it is called after creation.
         */
-       virtual void onAppControl(app_control_h request, bool firstLaunch );
+       virtual void onAppControl(app_control_h request, bool firstLaunch);
 
        /**
         * @brief Gets the window class instance of the application.
         *
         * @return The pointer to the window.
         */
-       WWindowgetWindow();
+       WWindow *getWindow();
 
        /**
         * @brief Attaches a window to the application.
@@ -115,12 +115,11 @@ protected:
         * @param[in]   win   A pointer to the window to attach.
         * @return True if the window attached successfully, else false.
         */
-       bool attachWindow(WWindowwin);
+       bool attachWindow(WWindow *win);
 
 private:
        WDECLARE_PRIVATE_IMPL(WApp);
        WDISABLE_COPY_AND_ASSIGN(WApp);
-
 };
 
 #endif /* _WAPP_H_ */
index 6b3f39a..f5d32ca 100644 (file)
@@ -48,7 +48,7 @@ public:
         *
         * @return 0 on success, otherwise error.
         */
-       int addEventHandler( app_event_type_e eventType, const std::function<void (app_event_info_h eventInfo, void* userData)>& handlerFunc, void* userData );
+       int addEventHandler(app_event_type_e eventType, const std::function<void(app_event_info_h eventInfo, void *userData)>& handlerFunc, void *userData);
 
        /**
         * @brief Remove application event handler.
@@ -68,7 +68,6 @@ protected:
 private:
        WDECLARE_PRIVATE_IMPL(WAppEventHandler);
        WDISABLE_COPY_AND_ASSIGN(WAppEventHandler);
-
 };
 
 #endif /* _WAPP_EVENT_HANDLER_H_ */
index 1f837b7..a7db99c 100644 (file)
@@ -42,7 +42,7 @@ public:
         *
         * @return The class name.
         */
-       virtual const chargetClassName();
+       virtual const char *getClassName();
 
        /**
         * @brief Initialize and creates the control. onCreate will be called subsequently.
@@ -54,7 +54,7 @@ public:
         *
         * @see onCreate()
         */
-       bool create(Evas_Object* parent, void* param );
+       bool create(Evas_Object *parent, void *param);
 
        /**
         * @brief Destroy the control. The linked evas object will be delete together.
@@ -69,28 +69,28 @@ public:
         *
         * @return The pointer to evas object.
         */
-       Evas_ObjectgetEvasObj();
+       Evas_Object *getEvasObj();
 
        /**
         * @brief Get evas object of this class for read-only reference.
         *
         * @return The read-only pointer to evas object.
         */
-       const Evas_ObjectgetConstEvasObj() const;
+       const Evas_Object *getConstEvasObj() const;
 
        /**
         * @brief Set the name of the instance.
         *
         * @param[in]   name   Name.
         */
-       void setName( const char* name);
+       void setName(const char *name);
 
        /**
         * @brief Get the name of the instance.
         *
         * @return The control name.
         */
-       const chargetName();
+       const char *getName();
 
        /**
         * @brief Return weak pointer of this instance to refer it safe.
@@ -108,7 +108,7 @@ public:
         *
         * @see destroyPopup()
         */
-       void attachPopup( WControl* popup );
+       void attachPopup(WControl *popup);
 
        /**
         * @brief Destroy pop-up. Use this method when you want to destroy pop-up explicitly.
@@ -131,7 +131,7 @@ protected:
         * @see create()
         * @see onCreated()
         */
-       virtual Evas_Object* onCreate( Evas_Object* parent, void* param ) = 0;
+       virtual Evas_Object *onCreate(Evas_Object *parent, void *param) = 0;
 
        /**
         * @brief Override this method to do something after evas object is created.
@@ -156,7 +156,6 @@ protected:
 private:
        WDECLARE_PRIVATE_IMPL(WControl);
        WDISABLE_COPY_AND_ASSIGN(WControl);
-
 };
 
 /**
@@ -167,6 +166,6 @@ private:
  * @return The pointer to WControl class instance.
  * It will be NULL, if no instance is related.
  */
-WAPP_ASSIST_EXPORT WControl* WControl_getInstanceFromEvasObj( Evas_Object* obj );
+WAPP_ASSIST_EXPORT WControl *WControl_getInstanceFromEvasObj(Evas_Object *obj);
 
 #endif /* _WCONTROL_H_ */
index 0306e6c..32e0444 100644 (file)
@@ -68,7 +68,7 @@
 #define WERROR(fmt, args...) LOGE(WCOLOR_RED "* Critical * " fmt WCOLOR_END, ##args)
 
 #define WHIT() LOGD(WCOLOR_BLUE ">>>HIT<<<" WCOLOR_END)
-#define WHITM(fmt, args... ) LOGD(WCOLOR_BLUE ">>>HIT<<<" fmt WCOLOR_END, ##args)
+#define WHITM(fmt, args...) LOGD(WCOLOR_BLUE ">>>HIT<<<" fmt WCOLOR_END, ##args)
 
 #define WENTER() LOGD(WCOLOR_GREEN "BEGIN >>>>" WCOLOR_END)
 #define WLEAVE() LOGD(WCOLOR_GREEN "END <<<<" WCOLOR_END)
 #define WSERROR(fmt, args...) SECURE_LOGE(WCOLOR_RED "* Critical * " fmt WCOLOR_END, ##args)
 
 #define WPRET_VM(expr, val, fmt, arg...) do { \
-                                       if (expr) { \
-                                               WERROR(fmt, ##arg); \
-                                               return (val); \
-                                               } \
-                                       } while (0)
+               if (expr) { \
+                       WERROR(fmt, ##arg); \
+                       return (val); \
+               } \
+       } while (0)
 
 #define WPRET_M(expr, fmt, arg...) do { \
-                                       if (expr) { \
-                                       WERROR(fmt, ##arg); \
-                                       return; \
-                                       } \
-                               } while (0)
+               if (expr) { \
+                       WERROR(fmt, ##arg); \
+                       return; \
+               } \
+       } while (0)
 
 #define WASSERT(expr) do { \
-               if(!(expr)) \
-               {\
-                       WERROR( "WASSERT!" );\
+               if (!(expr)) { \
+                       WERROR("WASSERT!");\
                        assert((expr)); \
-               }\
-       }while(0);
+               } \
+       } while (0);
 
-#define WASSERT_EX(expr, fmt, args... ) do { \
-               if(!(expr)) \
-               {\
-                       WERROR( "WASSERT! " fmt, ##args);\
+#define WASSERT_EX(expr, fmt, args...) do { \
+               if (!(expr)) { \
+                       WERROR("WASSERT! " fmt, ##args);\
                        assert((expr)); \
-               }\
-       }while(0);
+               } \
+       } while (0);
 
 
 
index 6bdf0e0..ea94e13 100644 (file)
 WAPP_ASSIST_EXPORT int WAppAssist_getMajorVersion();
 WAPP_ASSIST_EXPORT int WAppAssist_getMinorVersion();
 WAPP_ASSIST_EXPORT int WAppAssist_getPatchVersion();
-WAPP_ASSIST_EXPORT const charWAppAssist_getVersion();
+WAPP_ASSIST_EXPORT const char *WAppAssist_getVersion();
 
-#define WDISABLE_COPY_AND_ASSIGN( A ) \
-               A( const A& ) = delete; \
-               const A& operator=( const A& ) = delete
+#define WDISABLE_COPY_AND_ASSIGN(A) \
+               A(const A&) = delete; \
+               const A& operator=(const A&) = delete
 
-#define WDECLARE_PRIVATE_IMPL( A ) \
-       class __##A##Impl__pv; \
+#define WDECLARE_PRIVATE_IMPL(A) \
+       class __##A##Impl *__pv; \
        friend class __##A##Impl
 
 
index 73198a0..bd317e0 100644 (file)
@@ -32,7 +32,7 @@ public:
         *
         * @return Evas object.
         */
-       virtual Evas_ObjectgetEvasObj() = 0;
+       virtual Evas_Object *getEvasObj() = 0;
 
 protected:
        virtual ~IWEvasObject(){};
@@ -54,7 +54,7 @@ typedef std::weak_ptr<IWEvasObject> WEvasObjectPtr;
  *
  * @see WEvasObjectPtr.
  */
-WAPP_ASSIST_EXPORT WEvasObjectPtr WEvasObject_getWeakPtr( Evas_Object* obj );
+WAPP_ASSIST_EXPORT WEvasObjectPtr WEvasObject_getWeakPtr(Evas_Object *obj);
 
 
 
index e3efc4f..f499a1a 100644 (file)
@@ -52,7 +52,7 @@ public:
         *
         * @see getItemClassStatic()
         */
-       virtual Elm_Genlist_Item_ClassgetItemClassNew();
+       virtual Elm_Genlist_Item_Class *getItemClassNew();
 
        /**
         * @brief Override this method to create Elm_Genlist_Item_Class structure.
@@ -63,7 +63,7 @@ public:
         *
         * @see getItemClassNew()
         */
-       virtual Elm_Genlist_Item_ClassgetItemClassStatic();
+       virtual Elm_Genlist_Item_Class *getItemClassStatic();
 
        /**
         * @brief Get Elm_Object_Item of this item instance after it is append to genlist.
@@ -72,7 +72,7 @@ public:
         *
         * @see setElmObjectItem()
         */
-       Elm_Object_ItemgetElmObjectItem();
+       Elm_Object_Item *getElmObjectItem();
 
        /**
         * @brief Set Elm_Object_Item, which is returned when this item is appended to genlist.
@@ -81,17 +81,17 @@ public:
         *
         * @see getElmObjectItem()
         */
-       void setElmObjectItem( Elm_Object_Item* objItem );
+       void setElmObjectItem(Elm_Object_Item *objItem);
 
        /**
         * @brief This is static callback function to be used to append item to the genlist.
-        * Then this will call onSelect( Elm_Object_Item* item ) method when this callback is invoked.
+        * Then this will call onSelect(Elm_Object_Item *item) method when this callback is invoked.
         *
         * @param[in]   data         Genlist select callback parameter.
         * @param[in]   obj          Genlist select callback parameter.
         * @param[in]   event_info   Genlist select callback parameter.
         *
-        * @see onSelect( Elm_Object_Item* item )
+        * @see onSelect(Elm_Object_Item *item)
         */
        static void selectCb(void *data, Evas_Object *obj, void *event_info);
 
@@ -104,7 +104,7 @@ protected:
         *
         * @see selectCb()
         */
-       virtual void onSelect( Elm_Object_Item* objItem );
+       virtual void onSelect(Elm_Object_Item *objItem);
 
        /**
         * @brief Attache the pop-up to the view, which is the container view of this item.
@@ -113,17 +113,16 @@ protected:
         *
         * @return True the view is found and it is attached successfully.
         */
-       bool attachToView( WControl* popup );
+       bool attachToView(WControl *popup);
 
 private:
        WDECLARE_PRIVATE_IMPL(WGenlistItem);
        WDISABLE_COPY_AND_ASSIGN(WGenlistItem);
-
 };
 
-#define WGENLIST_ITEM_DEL() [](void* data, Evas_Object* obj) \
+#define WGENLIST_ITEM_DEL() [](void *data, Evas_Object *obj) \
                { \
-                       WGenlistItem* item = static_cast<WGenlistItem*>(data); \
+                       WGenlistItem *item = static_cast<WGenlistItem *>(data); \
                        delete item; \
                }
 
index 8e97e41..524ef0d 100644 (file)
@@ -45,7 +45,7 @@ public:
         *
         * @see create()
         */
-       void prepare(Evas_Object* win, Evas_Object* naviframe);
+       void prepare(Evas_Object *win, Evas_Object *naviframe);
 
        /**
         * @brief Append menu items.
@@ -55,7 +55,7 @@ public:
         *
         * @return Appended item. NULL, if failed.
         */
-       Elm_Object_Item* appendItem(const char* label, std::function< void()> selectItemCb);
+       Elm_Object_Item *appendItem(const char *label, std::function< void()> selectItemCb);
 
        /**
         * @brief Create and show menu pop-up.
@@ -71,7 +71,7 @@ protected:
        virtual ~WMenuPopup();
 
 private:
-       virtual Evas_Object* onCreate(Evas_Object* parent, void* param);
+       virtual Evas_Object *onCreate(Evas_Object *parent, void *param);
        virtual void onDestroy();
 
        WDECLARE_PRIVATE_IMPL(WMenuPopup);
index d066fcc..661f83d 100644 (file)
@@ -46,7 +46,7 @@ public:
         *
         * @return The class name.
         */
-       virtual const chargetClassName();
+       virtual const char *getClassName();
 
        /**
         * @brief Initialize and creates the evas object.
@@ -59,7 +59,7 @@ public:
         *
         * @see onCreate()
         */
-       bool create( Evas_Object* parent, void* param );
+       bool create(Evas_Object *parent, void *param);
 
        /**
         * @brief Destroy the instance. "onDestroy" will be called subsequently.
@@ -74,21 +74,21 @@ public:
         *
         * @return The pointer to the evas object
         */
-       Evas_ObjectgetEvasObj();
+       Evas_Object *getEvasObj();
 
        /**
         * @brief Set the name of this instance.
         *
         * @param[in]   name   The name to be set.
         */
-       void setName( const char* name);
+       void setName(const char *name);
 
        /**
         * @brief Get the name of this instance.
         *
         * @return The name of the naviframe.
         */
-       const chargetName();
+       const char *getName();
 
        /**
         * @brief Push the view instance into naviframe. "onPushToNaviframe" will be called subsequently.
@@ -102,7 +102,7 @@ public:
         *
         * @see onPushToNaviframe
         */
-       bool push( WView* view, const char* viewName = NULL, void* viewCreationParam = NULL );
+       bool push(WView *view, const char *viewName = NULL, void *viewCreationParam = NULL);
 
        /**
         * @brief Destroy all views stacked on naviframe.
@@ -119,7 +119,7 @@ public:
         *
         * @see onCreate()
         */
-       void setOnCreate( const std::function<Evas_Object*(Evas_Object*, void*)>& handlerFunc);
+       void setOnCreate(const std::function<Evas_Object *(Evas_Object *, void *)>& handlerFunc);
 
        /**
         * @brief Set the handler function pointer to override virtual
@@ -130,7 +130,7 @@ public:
         *
         * @see onLastItemPop()
         */
-       void setOnLastItemPop( const std::function<void(bool*)>& handlerFunc);
+       void setOnLastItemPop(const std::function<void(bool *)>& handlerFunc);
 
 protected:
        /**
@@ -140,7 +140,7 @@ protected:
         * @param[in]   param   User data.
         * @return The pointer to naviframe evas object created.
         */
-       virtual Evas_Object* onCreate( Evas_Object* parent, void* param);
+       virtual Evas_Object *onCreate(Evas_Object *parent, void *param);
 
        /**
         * @brief Override this method to do something after evas object is created.
@@ -168,7 +168,7 @@ protected:
         *
         * @see push
         */
-       virtual bool onPush( WView* view, void* viewParam);
+       virtual bool onPush(WView *view, void *viewParam);
 
        /**
         * @brief Override this method to do something before popping the view from the naviframe.
@@ -181,7 +181,7 @@ protected:
         *
         * @see onLastItemPop()
         */
-       virtual bool onItemPop( WView* view, Elm_Object_Item* item);
+       virtual bool onItemPop(WView *view, Elm_Object_Item *item);
 
        /**
         * @brief Override this method to change how the application should work when last view is popped from naviframe.
@@ -192,7 +192,7 @@ protected:
         *
         * @see onItemPop()
         */
-       virtual void onLastItemPop( bool* popOut );
+       virtual void onLastItemPop(bool *popOut);
 
        /**
         * @brief Get the pointer to the WWindow class instance.
@@ -200,7 +200,7 @@ protected:
         * @return The pointer to the window instance. If the naviframe
         * is the part of UG module, NULL will be returned.
         */
-       WWindowgetWindow();
+       WWindow *getWindow();
 
 protected:
        /**
@@ -209,11 +209,10 @@ protected:
        virtual ~WNaviframe();
 
 private:
-       static Eina_Bool __popCb( void* data, Elm_Object_Item* item);
+       static Eina_Bool __popCb(void *data, Elm_Object_Item *item);
 
        WDECLARE_PRIVATE_IMPL(WNaviframe);
        WDISABLE_COPY_AND_ASSIGN(WNaviframe);
-
 };
 
 #endif /* _WNAVI_FRAME_H_ */
index d4b4440..137429e 100644 (file)
@@ -41,7 +41,7 @@ public:
         * @param[in]   title         Title text.
         * @param[in]   textContent   Content text.
         */
-       WPopup( const char* title, const char* textContent );
+       WPopup(const char *title, const char *textContent);
 
        /**
         * @brief Set the title string of the pop-up.
@@ -50,7 +50,7 @@ public:
         *
         * @see setContent()
         */
-       void setTitle( const char* title );
+       void setTitle(const char *title);
 
        /**
         * @brief Set the content string of the pop-up.
@@ -59,7 +59,7 @@ public:
         *
         * @see other setContent()
         */
-       void setContent( const char* text );
+       void setContent(const char *text);
 
        /**
         * @brief Set the content of the pop-up with WControl instance.
@@ -69,7 +69,7 @@ public:
         *
         * @see other setContent()
         */
-       void setContent( WControl* control );
+       void setContent(WControl *control);
 
        /**
         * @brief Set the creation function of the content Evas Object of the pop-up.
@@ -79,7 +79,7 @@ public:
         *
         * @see other setContent()
         */
-       void setContent( const std::function<Evas_Object* (Evas_Object* parent)> contentCreateCb );
+       void setContent(const std::function<Evas_Object *(Evas_Object *parent)> contentCreateCb);
 
        /**
         * @brief Set the string ID's domain name to be automatically translated on language change.
@@ -87,10 +87,10 @@ public:
         *
         * @param[in]   textDomain   Text domain name.
         *
-        * @see setTitle( const char* title)
-        * @seesetContent( const char* text)
+        * @see setTitle(const char *title)
+        * @seesetContent(const char *text)
         */
-       void setTextTranslatable( const char* textDomain );
+       void setTextTranslatable(const char *textDomain);
 
        /**
         * @brief Add buttons with button text string and button pressed callback function.
@@ -101,7 +101,7 @@ public:
         *
         * @return True if succeeded.
         */
-       bool addButton(const char* buttonText, const std::function<void (bool* destroyPopup)> buttonCb, const std::function<void (Evas_Object* button)> setPropertyCb = NULL );
+       bool addButton(const char *buttonText, const std::function<void(bool *destroyPopup)> buttonCb, const std::function<void(Evas_Object *button)> setPropertyCb = NULL);
 
        /**
         * @brief Add handler function when back button is pressed.
@@ -111,7 +111,7 @@ public:
         *                       If it returns true, pop-up will be closed, if not, remained.
         *
         */
-       void setOnBack( const std::function<void (bool* destroyPopup)> backCb );
+       void setOnBack(const std::function<void(bool *destroyPopup)> backCb);
 
        /**
         * @brief Add handler function to set more properties of pop-up.
@@ -121,7 +121,7 @@ public:
         *
         * @return True if succeeded.
         */
-       void setOnMoreProperties( const std::function<void(Evas_Object* popup)>& morePropertiesCb );
+       void setOnMoreProperties(const std::function<void(Evas_Object *popup)>& morePropertiesCb);
 
 protected:
        /**
@@ -134,7 +134,7 @@ protected:
         *
         * @return Evas object created.
         */
-       virtual Evas_Object* onCreate(Evas_Object* parent, void* param);
+       virtual Evas_Object *onCreate(Evas_Object *parent, void *param);
 
        /**
         * @brief It is called when pop-up instance is deleted.
index f067052..6fb0ea6 100644 (file)
@@ -37,7 +37,7 @@ public:
         *
         * @param[in]   text   Message text string.
         */
-       WToastPopup(const chartext);
+       WToastPopup(const char *text);
 
        /**
         * @brief This is the constructor with message text and time-out time.
@@ -45,10 +45,10 @@ public:
         * @param[in]   text      Message text string.
         * @param[in]   timeout   Time-out time to be destroyed. Unit is second.
         */
-       WToastPopup(const chartext, double timeout);
+       WToastPopup(const char *text, double timeout);
 
 private:
-       virtual Evas_Object* onCreate(Evas_Object* parent, void* param);
+       virtual Evas_Object *onCreate(Evas_Object *parent, void *param);
        virtual void onDestroy();
 
        virtual ~WToastPopup();
index 6bdaec7..cd7faee 100644 (file)
@@ -35,7 +35,8 @@ public:
        /**
         * @brief Timer types.
         */
-       enum TimerType{
+       enum TimerType
+       {
                IDLER,    /**< Can be called multiple times with in one rendering cycle, based on system load */
                ANIMATOR, /**< Called just once per rendering cycle */
                TIMER,    /**< Called just once per rendering cycle, if the "set time" is elapsed before next vsync */
@@ -61,12 +62,12 @@ public:
         * @param[in]   timerFunc    std::function object of worker function.
         * @param[in]   userData     User data.
         * @param[in]   monitorObj   UI object, like WView or WControl object, is to be monitored.
-        *                           If it has been deleted,when callback function is called, the callback
+        *                           If it has been deleted, when callback function is called, the callback
         *                           function will not do anything and just delete itself.
         *
         * @return WUiTimer instance created. If failed, NULL will be returned.
         */
-       static WUiTimer* addIdler( const std::function<Eina_Bool (void*)>& timerFunc, void* userData, WUiObjectPtr monitorObj);
+       static WUiTimer *addIdler(const std::function<Eina_Bool(void *)>& timerFunc, void *userData, WUiObjectPtr monitorObj);
 
        /**
         * @brief Create a ANIMATOR type timer. It uses ecore_animator internally.
@@ -75,12 +76,12 @@ public:
         * @param[in]   timerFunc    std::function object of worker function.
         * @param[in]   userData     User data.
         * @param[in]   monitorObj   UI object, like WView or WControl object, is to be monitored.
-        *                           If it has been deleted,when callback function is called, the callback
+        *                           If it has been deleted, when callback function is called, the callback
         *                           function will not do anything and just delete itself.
         *
         * @return WUiTimer instance created. If failed, NULL will be returned.
         */
-       static WUiTimer* addAnimator( const std::function<Eina_Bool (void*)>& timerFunc, void* userData, WUiObjectPtr monitorObj );
+       static WUiTimer *addAnimator(const std::function<Eina_Bool(void *)>& timerFunc, void *userData, WUiObjectPtr monitorObj);
 
        /**
         * @brief Create a timer. It uses ecore_timer internally.
@@ -91,12 +92,12 @@ public:
         * @param[in]   timerFunc    std::function object of worker function.
         * @param[in]   userData     User data.
         * @param[in]   monitorObj   UI object, like WView or WControl object, is to be monitored.
-        *                           If it has been deleted,when callback function is called, the callback
+        *                           If it has been deleted, when callback function is called, the callback
         *                           function will not do anything and just delete itself.
         *
         * @return WUiTimer instance created. If failed, NULL will be returned.
         */
-       static WUiTimer* addTimer( double interval, const std::function<Eina_Bool (void*)>& timerFunc, void* userData, WUiObjectPtr monitorObj );
+       static WUiTimer *addTimer(double interval, const std::function<Eina_Bool(void *)>& timerFunc, void *userData, WUiObjectPtr monitorObj);
 
        /**
         * @brief Create a JOB type timer. It uses ecore_job internally.
@@ -105,12 +106,12 @@ public:
         * @param[in]   timerFunc    std::function object of worker function.
         * @param[in]   userData     User data.
         * @param[in]   monitorObj   UI object, like WView or WControl object, is to be monitored.
-        *                           If it has been deleted,when callback function is called, the callback
+        *                           If it has been deleted, when callback function is called, the callback
         *                           function will not do anything and just delete itself.
         *
         * @return WUiTimer instance created. If failed, NULL will be returned.
         */
-       static WUiTimer* addJob( const std::function<void (void*)>& timerFunc, void* userData, WUiObjectPtr monitorObj );
+       static WUiTimer *addJob(const std::function<void(void *)>& timerFunc, void *userData, WUiObjectPtr monitorObj);
 
 private:
        WUiTimer();
@@ -118,7 +119,6 @@ private:
 
        WDECLARE_PRIVATE_IMPL(WUiTimer);
        WDISABLE_COPY_AND_ASSIGN(WUiTimer);
-
 };
 
 #endif /* _WUI_TIMER_H_ */
index 89eaea3..ddc5c05 100644 (file)
@@ -49,12 +49,12 @@ public:
         *
         * @param[in]   name   The instance name to be set.
         */
-       explicit WView( const char* name );
+       explicit WView(const char *name);
 
        /**
         * @brief Get the class name.
         */
-       virtual const chargetClassName();
+       virtual const char *getClassName();
 
        /**
         * @brief Create evas object which represents this view.
@@ -63,7 +63,7 @@ public:
         * @param[in]   parent      Parent evas object of the view.
         * @param[in]   viewParam   User data.
         */
-       bool create( Evas_Object* parent, void* viewParam );
+       bool create(Evas_Object *parent, void *viewParam);
 
        /**
         * @brief Destroy the class instance and deletes evas object.
@@ -77,7 +77,7 @@ public:
         *
         * @return The pointer to the evas object.
         */
-       Evas_ObjectgetEvasObj();
+       Evas_Object *getEvasObj();
 
        /**
         * @brief Set the name of the class instance.
@@ -86,14 +86,14 @@ public:
         *
         * @see getName()
         */
-       void setName( const char* name );
+       void setName(const char *name);
 
        /**
         * @brief Get the name of the class instance.
         *
         * @see setName()
         */
-       const chargetName();
+       const char *getName();
 
        /**
         * @brief Set the title string of the view.
@@ -101,14 +101,14 @@ public:
         *
         * @param[in]   title   String of the title to be set.
         */
-       void setTitle( const char* title );
+       void setTitle(const char *title);
 
        /**
         * @brief Get the title string.
         *
         * @return Title string.
         */
-       const chargetTitle();
+       const char *getTitle();
 
        /**
         * @brief Return weak pointer of this instance to refer it safe.
@@ -126,7 +126,7 @@ public:
         *
         * @see destroyPopup()
         */
-       void attachPopup( WControl* popup );
+       void attachPopup(WControl *popup);
 
        /**
         * @brief Destroy pop-up. Use this method when you want to destroy pop-up explicitly.
@@ -145,7 +145,7 @@ public:
         *
         * @see onCreate()
         */
-       void setOnCreate( const std::function<Evas_Object* (Evas_Object*, void*)>& handlerFunc );
+       void setOnCreate(const std::function<Evas_Object *(Evas_Object *, void *)>& handlerFunc);
 
        /**
         * @brief Set the handler function pointer to override virtual function
@@ -156,7 +156,7 @@ public:
         *
         * @see onPushed()
         */
-       void setOnPushed( const std::function<void (Elm_Object_Item*)>& handlerFunc );
+       void setOnPushed(const std::function<void(Elm_Object_Item *)>& handlerFunc);
 
 protected:
        /**
@@ -169,7 +169,7 @@ protected:
         * @return The most parent evas object created in this method.
         * It will be related to the class instance.
         */
-       virtual Evas_Object* onCreate( Evas_Object* parent, void* viewParam );
+       virtual Evas_Object *onCreate(Evas_Object *parent, void *viewParam);
 
        /**
         * @brief Override this method to do something after evas object is created.
@@ -196,7 +196,7 @@ protected:
         * @see %WNaviframe::push()
         * @see onPushed()
         */
-       virtual Elm_Object_Item* onPushToNaviframe( Evas_Object* naviFrame);
+       virtual Elm_Object_Item *onPushToNaviframe(Evas_Object *naviFrame);
 
        /**
         * @brief Called when this view instance evas object is pushed into naviframe.
@@ -207,7 +207,7 @@ protected:
         * @see %WNaviframe::push()
         * @see onPushToNaviframe()
         */
-       virtual void onPushed(Elm_Object_ItemnaviItem);
+       virtual void onPushed(Elm_Object_Item *naviItem);
 
        /**
         * @brief Called when the view evas object is popped from naviframe.
@@ -223,7 +223,7 @@ protected:
         * @return The pointer to the window. If the view is the part of UG module,
         * NULL will be returned.
         */
-       WWindowgetWindow();
+       WWindow *getWindow();
 
        /**
         * @brief Get the WNaviframe class instance.
@@ -231,7 +231,7 @@ protected:
         * @return the pointer to the WNaviframe class instance.
         * If this view instance is not pushed into naviframe, it will be NULL.
         */
-       WNaviframegetNaviframe();
+       WNaviframe *getNaviframe();
 
        /**
         * @brief Get a navi item.
@@ -239,7 +239,7 @@ protected:
         * @return The pointer to navi item. If this view instance
         * is not pushed into naviframe, it will be NULL.
         */
-       Elm_Object_ItemgetNaviItem();
+       Elm_Object_Item *getNaviItem();
 
        /**
         * @brief Pop out this view instance evas object from naviframe.
@@ -258,7 +258,7 @@ protected:
         * @see %WNaviframe::push()
         * @see onPushed()
         */
-       bool enableMoreButton( Elm_Object_Item* naviItem, Evas_Smart_Cb clickedCb, void* userData );
+       bool enableMoreButton(Elm_Object_Item *naviItem, Evas_Smart_Cb clickedCb, void *userData);
 
 protected:
        /**
@@ -267,16 +267,16 @@ protected:
        virtual ~WView();
 
 private:
-       bool __callPushedHandlerFunc(Elm_Object_ItemnaviItem);
+       bool __callPushedHandlerFunc(Elm_Object_Item *naviItem);
        void __destroy();
 
        WDECLARE_PRIVATE_IMPL(WView);
        WDISABLE_COPY_AND_ASSIGN(WView);
        friend class WNaviframe;
-       friend Evas_Object* WView_getWindowBaseLayoutEvasObj( WView* view );
-       friend Evas_Object* WView_getWindowEvasObj( WView* view );
-       friend void WView_setContainerProperties( WView* view, WWindow* win, WNaviframe* naviframe );
-       friend void WView_setContainerNaviItemProperty( WView* view, Elm_Object_Item* item );
+       friend Evas_Object *WView_getWindowBaseLayoutEvasObj(WView *view);
+       friend Evas_Object *WView_getWindowEvasObj(WView *view);
+       friend void WView_setContainerProperties(WView *view, WWindow *win, WNaviframe *naviframe);
+       friend void WView_setContainerNaviItemProperty(WView *view, Elm_Object_Item *item);
 };
 
 /**
@@ -286,7 +286,7 @@ private:
  *
  * @return NULL, if no view class instance is related.
  */
-WAPP_ASSIST_EXPORT WView* WView_getInstanceFromEvasObj(Evas_Object* obj);
+WAPP_ASSIST_EXPORT WView *WView_getInstanceFromEvasObj(Evas_Object *obj);
 
 /**
  * @brief Get window base layout.
@@ -295,7 +295,7 @@ WAPP_ASSIST_EXPORT WView* WView_getInstanceFromEvasObj(Evas_Object* obj);
  *
  * @return Window base layout.
  */
-WAPP_ASSIST_EXPORT Evas_Object* WView_getWindowBaseLayoutEvasObj( WView* view );
+WAPP_ASSIST_EXPORT Evas_Object *WView_getWindowBaseLayoutEvasObj(WView *view);
 
 /**
  * @brief Get window evas object.
@@ -304,7 +304,7 @@ WAPP_ASSIST_EXPORT Evas_Object* WView_getWindowBaseLayoutEvasObj( WView* view );
  *
  * @return Window evas object.
  */
-WAPP_ASSIST_EXPORT Evas_Object* WView_getWindowEvasObj( WView* view );
+WAPP_ASSIST_EXPORT Evas_Object *WView_getWindowEvasObj(WView *view);
 
 /**
  * @brief Set the container class properties to the view.
@@ -315,7 +315,7 @@ WAPP_ASSIST_EXPORT Evas_Object* WView_getWindowEvasObj( WView* view );
  * @param[in]   win         WWindow instance.
  * @param[in]   naviframe   WNaviframe instance.
  */
-WAPP_ASSIST_EXPORT void WView_setContainerProperties( WView* view, WWindow* win, WNaviframe* naviframe );
+WAPP_ASSIST_EXPORT void WView_setContainerProperties(WView *view, WWindow *win, WNaviframe *naviframe);
 
 /**
  * @brief Set the container class navi item property to the view.
@@ -325,6 +325,6 @@ WAPP_ASSIST_EXPORT void WView_setContainerProperties( WView* view, WWindow* win,
  * @param[in]   view   WView instance to set these properties
  * @param[in]   item   Navi item pointer of container view which is pushed into naviframe.
  */
-WAPP_ASSIST_EXPORT void WView_setContainerNaviItemProperty( WView* view, Elm_Object_Item* item );
+WAPP_ASSIST_EXPORT void WView_setContainerNaviItemProperty(WView *view, Elm_Object_Item *item);
 
 #endif /* _WVIEW_H_ */
index 1332cc9..76722c7 100644 (file)
@@ -41,7 +41,7 @@ public:
         * @param[in]   name      The window name.
         * @param[in]   winType   The type of the window.
         */
-       WWindow(const charname, Elm_Win_Type winType);
+       WWindow(const char *name, Elm_Win_Type winType);
 
        /**
         * @brief Constructor.
@@ -51,14 +51,14 @@ public:
         * @param[in]   conform      Pointer to evas object conformant.
         * @param[in]   baseLayout   Pointer to evas object base layout.
         */
-       WWindow(Evas_Object* win, Evas_Object* conform, Evas_Object* baseLayout);
+       WWindow(Evas_Object *win, Evas_Object *conform, Evas_Object *baseLayout);
 
        /**
         * @brief Get the class name of this class.
         *
         * @return The class name.
         */
-       virtual const chargetClassName();
+       virtual const char *getClassName();
 
        /**
         * @brief Create the windows
@@ -93,7 +93,7 @@ public:
         *
         * @see onCreateWin()
         */
-       Evas_ObjectgetEvasObj();
+       Evas_Object *getEvasObj();
 
        /**
         * @brief Get the base layout evas object.
@@ -102,14 +102,14 @@ public:
         *
         * @see onCreateBaseLayout()
         */
-       Evas_ObjectgetBaseLayoutEvasObj();
+       Evas_Object *getBaseLayoutEvasObj();
 
        /**
         * @brief Get the conformant evas object.
         *
         * @return The pointer to the evas object of the conformant.
         */
-       Evas_ObjectgetConformantEvasObj();
+       Evas_Object *getConformantEvasObj();
 
        /**
         * @brief Attache base UI object, which can be WNaviframe or WView instance.
@@ -122,7 +122,7 @@ public:
         *
         * @see getBaseUiObject()
         */
-       bool attachBaseUiObject( IWUiObject* baseObj, void* creationParam = NULL );
+       bool attachBaseUiObject(IWUiObject *baseObj, void *creationParam = NULL);
 
        /**
         * @brief Get the base UI object attached.
@@ -131,14 +131,14 @@ public:
         *
         * @see attachBaseUiObject()
         */
-       IWUiObjectgetBaseUiObject();
+       IWUiObject *getBaseUiObject();
 
        /**
         * @brief Detach the base UI object.
         *
         * @return The base UI object, which should be deleted explicitly later.
         */
-       IWUiObjectdetachBaseUiObject();
+       IWUiObject *detachBaseUiObject();
 
        /**
         * @brief Destroy the base UI object.
@@ -150,7 +150,7 @@ public:
         *
         * @return The name of the window.
         */
-       const chargetName();
+       const char *getName();
 
        /**
         * @brief Get the type of the window.
@@ -168,7 +168,7 @@ public:
         *
         * @see onCreateWin()
         */
-       void setOnCreateWin( const std::function<Evas_Object* ()>& handlerFunc );
+       void setOnCreateWin(const std::function<Evas_Object *()>& handlerFunc);
 
        /**
         * @brief Set the handler function pointer to override virtual function
@@ -179,7 +179,7 @@ public:
         *
         * @see onCreateBaseLayout()
         */
-       void setOnCreateBaseLayout( const std::function<Evas_Object* (Evas_Object*, Evas_Object** outConformant)>& handlerFunc );
+       void setOnCreateBaseLayout(const std::function<Evas_Object *(Evas_Object *, Evas_Object **outConformant)>& handlerFunc);
 
 protected:
        /**
@@ -190,7 +190,7 @@ protected:
         *
         * @see create()
         */
-       virtual Evas_ObjectonCreateWin();
+       virtual Evas_Object *onCreateWin();
 
        /**
         * @brief Called when create method is called to create base layout.
@@ -201,7 +201,7 @@ protected:
         *
         * @return The pointer to the evas object of base layout created.
         */
-       virtual Evas_Object* onCreateBaseLayout(Evas_Object* win, Evas_Object** outConformant);
+       virtual Evas_Object *onCreateBaseLayout(Evas_Object *win, Evas_Object **outConformant);
 
        /**
         * @brief Called when the window is destroyed
index 2153766..3f5b326 100644 (file)
@@ -28,80 +28,77 @@ public:
        __WAppImpl():__window(NULL), __firstLaunch(true) {}
        ~__WAppImpl();
 public:
-       WWindow__window;
+       WWindow *__window;
        bool __firstLaunch;
        //
-       static bool __onCreate( void* data);
-       static void __onTerminate( void* data);
-       static void __onPause( void* data);
-       static void __onResume( void* data);
-       static void __onAppControl( app_control_h request, void* data);
+       static bool __onCreate(void *data);
+       static void __onTerminate(void *data);
+       static void __onPause(void *data);
+       static void __onResume(void *data);
+       static void __onAppControl(app_control_h request, void *data);
 };
 
 __WAppImpl::~__WAppImpl()
 {
-
 }
 
-bool __WAppImpl::__onCreate( void* data)
+bool __WAppImpl::__onCreate(void *data)
 {
        WHIT();
 
        elm_app_base_scale_set(APP_BASE_SCALE);
        elm_config_accel_preference_set("3d");
 
-       auto pApp = (WApp*)data;
+       auto pApp = (WApp *)data;
        return pApp->onCreate();
 }
 
-void __WAppImpl::__onTerminate( void* data)
+void __WAppImpl::__onTerminate(void *data)
 {
        WHIT();
 
-       auto pApp = (WApp*)data;
+       auto pApp = (WApp *)data;
        pApp->onTerminate();
 
        // To reverse destruction order
        // It will destroy View and then Naviframe instance before the window is destroyed.
-       if (pApp->__pv->__window)
+       if (pApp->__pv->__window) {
                pApp->__pv->__window->destroyBaseUiObject();
+       }
 
        // window evas object "del" callback will be called by system.
 }
 
-void __WAppImpl::__onPause( void* data)
+void __WAppImpl::__onPause(void *data)
 {
        WHIT();
 
-       auto pApp = (WApp*)data;
+       auto pApp = (WApp *)data;
        pApp->onPause();
-
 }
 
-void __WAppImpl::__onResume( void* data)
+void __WAppImpl::__onResume(void *data)
 {
        WHIT();
 
-       auto pApp = (WApp*)data;
+       auto pApp = (WApp *)data;
        pApp->onResume();
-
 }
 
-void __WAppImpl::__onAppControl( app_control_h request, void* data)
+void __WAppImpl::__onAppControl(app_control_h request, void *data)
 {
        WHIT();
 
-       auto pApp = (WApp*)data;
-       pApp->onAppControl( request, pApp->__pv->__firstLaunch );
+       auto pApp = (WApp *)data;
+       pApp->onAppControl(request, pApp->__pv->__firstLaunch);
        //
        pApp->__pv->__firstLaunch = false;
-
 }
 
 
 WApp::WApp()
 {
-       WDEBUG("app-assist version=%s", WAppAssist_getVersion() );
+       WDEBUG("app-assist version=%s", WAppAssist_getVersion());
        __pv = new __WAppImpl();
 }
 
@@ -111,43 +108,42 @@ WApp::~WApp()
        delete __pv;
 }
 
-int WApp::start( int argc, char* argv[] )
+int WApp::start(int argc, char *argv[])
 {
-       return onStart( argc, argv );
+       return onStart(argc, argv);
 }
 
-WWindowWApp::getWindow()
+WWindow *WApp::getWindow()
 {
        return __pv->__window;
 }
 
-bool WApp::attachWindow(WWindowwin)
+bool WApp::attachWindow(WWindow *win)
 {
-       WASSERT( __pv->__window == NULL);
+       WASSERT(__pv->__window == NULL);
        __pv->__window = win;
        return win->create();
 }
 
 void WApp::onAppControl(app_control_h request, bool firstLaunch)
 {
-       Evas_Objectwin = getWindow()->getEvasObj();
-       if( win ) {
-               elm_win_activate( win);
-               evas_object_show( win);
+       Evas_Object *win = getWindow()->getEvasObj();
+       if (win) {
+               elm_win_activate(win);
+               evas_object_show(win);
        }
 }
 
-int WApp::onStart( int argc, char* argv[] )
+int WApp::onStart(int argc, char *argv[])
 {
        ui_app_lifecycle_callback_s cb;
-       memset( &cb, 0, sizeof(cb));
+       memset(&cb, 0, sizeof(cb));
        cb.create = __WAppImpl::__onCreate;
        cb.terminate = __WAppImpl::__onTerminate;
        cb.pause = __WAppImpl::__onPause;
        cb.resume = __WAppImpl::__onResume;
        cb.app_control = __WAppImpl::__onAppControl;
 
-       return ui_app_main( argc, argv, &cb, this);
-
+       return ui_app_main(argc, argv, &cb, this);
 }
 
index e4698fd..503c0ad 100644 (file)
@@ -29,10 +29,10 @@ public:
        //
        app_event_handler_h __handle;
        //
-       void__userData;
-       std::function<void (app_event_info_h, void*)> __eventHandlerFunc;
+       void *__userData;
+       std::function<void(app_event_info_h, void *)> __eventHandlerFunc;
 
-       static void __eventCb( app_event_info_h eventInfo, void* userData);
+       static void __eventCb(app_event_info_h eventInfo, void *userData);
        void __removeEventHandler();
 };
 
@@ -48,19 +48,18 @@ __WAppEventHandlerImpl::~__WAppEventHandlerImpl()
 }
 
 
-void __WAppEventHandlerImpl::__eventCb( app_event_info_h eventInfo, void* userData)
+void __WAppEventHandlerImpl::__eventCb(app_event_info_h eventInfo, void *userData)
 {
-       auto p = (__WAppEventHandlerImpl*)userData;
-       p->__eventHandlerFunc( eventInfo, p->__userData );
+       auto p = (__WAppEventHandlerImpl *)userData;
+       p->__eventHandlerFunc(eventInfo, p->__userData);
 }
 
 void __WAppEventHandlerImpl::__removeEventHandler()
 {
-       if( __handle ) {
-               ui_app_remove_event_handler( __handle );
+       if (__handle) {
+               ui_app_remove_event_handler(__handle);
                __handle = NULL;
                __userData = NULL;
-
        }
 }
 
@@ -75,14 +74,14 @@ WAppEventHandler::~WAppEventHandler()
 }
 
 
-int WAppEventHandler::addEventHandler( app_event_type_e eventType, const std::function<void (app_event_info_h, void*)>& handlerFunc, void* userData )
+int WAppEventHandler::addEventHandler(app_event_type_e eventType, const std::function<void(app_event_info_h, void *)>& handlerFunc, void *userData)
 {
        removeEventHandler();
 
        __pv->__eventHandlerFunc = handlerFunc;
        __pv->__userData = userData;
 
-       return ui_app_add_event_handler( &__pv->__handle, eventType, __pv->__eventCb, __pv );
+       return ui_app_add_event_handler(&__pv->__handle, eventType, __pv->__eventCb, __pv);
 }
 
 void WAppEventHandler::removeEventHandler()
index 80bb8a9..d857232 100644 (file)
@@ -32,13 +32,12 @@ public:
        ~__WControlImpl();
 public:
        //
-       Evas_Object__obj;
-       char__name;
-       std::shared_ptr<IWUiObject>__selfPtr;
-       std::weak_ptr<IWUiObject>__popupMonitor;
+       Evas_Object *__obj;
+       char *__name;
+       std::shared_ptr<IWUiObject> *__selfPtr;
+       std::weak_ptr<IWUiObject> *__popupMonitor;
        //
-       static void __objDelCb( void* data, Evas* evas, Evas_Object* obj, void* event_info);
-
+       static void __objDelCb(void *data, Evas *evas, Evas_Object *obj, void *event_info);
 };
 __WControlImpl::__WControlImpl()
 {
@@ -50,11 +49,12 @@ __WControlImpl::__WControlImpl()
 
 __WControlImpl::~__WControlImpl()
 {
-       if(__name)
+       if (__name) {
                free(__name);
+       }
 
-       if( __popupMonitor ) {
-               if( auto p = __popupMonitor->lock() ) {
+       if (__popupMonitor) {
+               if (auto p = __popupMonitor->lock()) {
                        p->destroy();
                }
        }
@@ -62,9 +62,9 @@ __WControlImpl::~__WControlImpl()
        delete __selfPtr;
 }
 
-void __WControlImpl::__objDelCb( void* data, Evas* evas, Evas_Object* obj, void* event_info)
+void __WControlImpl::__objDelCb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
 {
-       auto ctrl = (WControl*)data;
+       auto ctrl = (WControl *)data;
        ctrl->onDestroy();
 
        delete ctrl;
@@ -76,43 +76,44 @@ WControl::WControl()
 
 WControl::~WControl()
 {
-       if__pv->__name) {
-               WDEBUG( "name=%s", __pv->__name );
+       if (__pv->__name) {
+               WDEBUG("name=%s", __pv->__name);
        } else {
                WHIT();
        }
        //
        delete __pv;
 }
-const charWControl::getClassName()
+const char *WControl::getClassName()
 {
        return __CLASS_NAME;
 }
 
-bool WControl::create( Evas_Object* parent, void* param )
+bool WControl::create(Evas_Object *parent, void *param)
 {
-       if( __pv->__name)
-               WDEBUG( "name=%s", __pv->__name );
-       else
+       if (__pv->__name) {
+               WDEBUG("name=%s", __pv->__name);
+       } else {
                WHIT();
+       }
 
-       if( __pv->__obj ) {
+       if (__pv->__obj) {
                WDEBUG("Already created!");
                return true;
        }
 
-       __pv->__obj = onCreate( parent, param );
+       __pv->__obj = onCreate(parent, param);
 
-       if( __pv->__obj == NULL)
+       if (__pv->__obj == NULL) {
                return false;
+       }
 
-       if( __pv->__name )  // for easy debugging
-       {
-               evas_object_name_set( __pv->__obj, __pv->__name );
+       if (__pv->__name) { // for easy debugging
+               evas_object_name_set(__pv->__obj, __pv->__name);
        }
 
-       evas_object_data_set( __pv->__obj, WKEY_CONTROL_INSTANCE, this );
-       evas_object_event_callback_add( __pv->__obj, EVAS_CALLBACK_DEL, __WControlImpl::__objDelCb, this);
+       evas_object_data_set(__pv->__obj, WKEY_CONTROL_INSTANCE, this);
+       evas_object_event_callback_add(__pv->__obj, EVAS_CALLBACK_DEL, __WControlImpl::__objDelCb, this);
        //
        // Do not place this before "evas_object_event_callback_add",
        // The reason is that if additional del callback is added at child class, it should be called first to keep state the class object is still alive.
@@ -122,7 +123,7 @@ bool WControl::create( Evas_Object* parent, void* param )
 
 void WControl::destroy()
 {
-       if(__pv->__obj) {
+       if (__pv->__obj) {
                evas_object_del(__pv->__obj);
                // Do not leave any code here.
                // After executing upper statement "evas_object_del", this object will be deleted at evas object deletion callback!
@@ -133,84 +134,87 @@ void WControl::destroy()
        }
 }
 
-Evas_ObjectWControl::getEvasObj()
+Evas_Object *WControl::getEvasObj()
 {
        return __pv->__obj;
 }
 
-const Evas_ObjectWControl::getConstEvasObj() const
+const Evas_Object *WControl::getConstEvasObj() const
 {
        return __pv->__obj;
 }
 
-void WControl::setName(const charname)
+void WControl::setName(const char *name)
 {
-       if__pv->__name) {
-               free( __pv->__name);
+       if (__pv->__name) {
+               free(__pv->__name);
                __pv->__name = NULL;
        }
-       if( name ) {
+       if (name) {
                size_t len = strlen(name) + 1;
-               __pv->__name = (char*)malloc(len);
-               strncpy( __pv->__name, name, len);
+               __pv->__name = (char *)malloc(len);
+               strncpy(__pv->__name, name, len);
        }
 }
 
-const charWControl::getName()
+const char *WControl::getName()
 {
        return __pv->__name;
 }
 
 std::weak_ptr<IWUiObject> WControl::getWeakPtr()
 {
-       if( __pv->__selfPtr ) {
+       if (__pv->__selfPtr) {
                return std::weak_ptr<IWUiObject>(*__pv->__selfPtr);
        }
-       __pv->__selfPtr = new std::shared_ptr<IWUiObject>( this,[](IWUiObject* p){} );
+       __pv->__selfPtr = new std::shared_ptr<IWUiObject>(this, [](IWUiObject *p){});
        return std::weak_ptr<IWUiObject>(*__pv->__selfPtr);
 }
 
-void WControl::attachPopup( WControl* popup )
+void WControl::attachPopup(WControl *popup)
 {
-       Evas_Objectparent = NULL;
-       Evas_Objectobj = getEvasObj();
-       while( (obj = elm_object_parent_widget_get( obj )) != NULL ) {
-               WView* view = WView_getInstanceFromEvasObj( obj );
-               if( view != NULL ) {
-                       parent = WView_getWindowBaseLayoutEvasObj( view );
+       Evas_Object *parent = NULL;
+       Evas_Object *obj = getEvasObj();
+       while ((obj = elm_object_parent_widget_get(obj)) != NULL) {
+               WView *view = WView_getInstanceFromEvasObj(obj);
+               if (view != NULL) {
+                       parent = WView_getWindowBaseLayoutEvasObj(view);
                        break;
                }
        }
 
-       if( parent == NULL ) {
+       if (parent == NULL) {
                WERROR("Cannot find parent View!");
                // If the pop-up has been already created, the following statement will just return without creating pop-up.
-               popup->create( elm_object_top_widget_get( getEvasObj() ), NULL);
+               popup->create(elm_object_top_widget_get(getEvasObj()), NULL);
        } else {
                // If the pop-up has been already created, the following statement will just return without creating pop-up.
-               popup->create( parent, NULL );
+               popup->create(parent, NULL);
        }
 
        // destroy old popup after new popup created
        destroyPopup();
 
-       if( __pv->__popupMonitor == NULL)
+       if (__pv->__popupMonitor == NULL) {
                __pv->__popupMonitor = new std::weak_ptr<IWUiObject>;
+       }
        *__pv->__popupMonitor = popup->getWeakPtr();
 }
 
 void WControl::destroyPopup()
 {
-       if( __pv->__popupMonitor == NULL ) return;
+       if (__pv->__popupMonitor == NULL) {
+               return;
+       }
 
-       if( auto p = __pv->__popupMonitor->lock() ) {
+       if (auto p = __pv->__popupMonitor->lock()) {
                p->destroy();
                __pv->__popupMonitor->reset();
        }
 }
 
-WControl* WControl_getInstanceFromEvasObj(Evas_Object* obj)
+WControl *WControl_getInstanceFromEvasObj(Evas_Object *obj)
 {
-       return (WControl*)evas_object_data_get(obj, WKEY_CONTROL_INSTANCE);
+       return (WControl *)evas_object_data_get(obj, WKEY_CONTROL_INSTANCE);
 }
 
index 7d6a991..c8159cf 100644 (file)
 class __WEvasObjectImpl : public IWEvasObject
 {
 public:
-       __WEvasObjectImpl(Evas_Objectobj):__evasObj(obj) { }
+       __WEvasObjectImpl(Evas_Object *obj):__evasObj(obj) { }
 
 public:
-       virtual Evas_ObjectgetEvasObj() { return __evasObj; }
+       virtual Evas_Object *getEvasObj() { return __evasObj; }
 
-       static void __objDelCb( void* data, Evas* evas, Evas_Object* obj, void* event_info)
+       static void __objDelCb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
        {
-               auto p = (__WEvasObjectImpl*)data;
+               auto p = (__WEvasObjectImpl *)data;
                delete p;
        }
 
        std::shared_ptr<IWEvasObject> __selfPtr;
-       Evas_Object__evasObj;
+       Evas_Object *__evasObj;
 };
 
-std::weak_ptr<IWEvasObject> WEvasObject_getWeakPtr( Evas_Object* obj )
+std::weak_ptr<IWEvasObject> WEvasObject_getWeakPtr(Evas_Object *obj)
 {
        auto pImpl = new __WEvasObjectImpl(obj);
-       std::shared_ptr<IWEvasObject> sp( pImpl,[](IWEvasObject* p){} );
+       std::shared_ptr<IWEvasObject> sp(pImpl, [](IWEvasObject *p){});
        pImpl->__selfPtr = sp;
 
-       evas_object_event_callback_add( obj, EVAS_CALLBACK_DEL, __WEvasObjectImpl::__objDelCb, pImpl);
+       evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL, __WEvasObjectImpl::__objDelCb, pImpl);
 
        return std::weak_ptr<IWEvasObject>(pImpl->__selfPtr);
 }
index fd744ee..f526149 100644 (file)
@@ -29,11 +29,10 @@ public:
                __objectItem = NULL; }
        ~__WGenlistItemImpl(){};
 public:
-       Elm_Object_Item* __objectItem;
-
+       Elm_Object_Item *__objectItem;
 };
 
-WGenlistItem::WGenlistItem() : __pv( new __WGenlistItemImpl() )
+WGenlistItem::WGenlistItem() : __pv(new __WGenlistItemImpl())
 {
 }
 
@@ -42,27 +41,27 @@ WGenlistItem::~WGenlistItem()
        delete __pv;
 }
 
-Elm_Genlist_Item_ClassWGenlistItem::getItemClassNew()
+Elm_Genlist_Item_Class *WGenlistItem::getItemClassNew()
 {
        return NULL;
 }
 
-Elm_Genlist_Item_ClassWGenlistItem::getItemClassStatic()
+Elm_Genlist_Item_Class *WGenlistItem::getItemClassStatic()
 {
        return NULL;
 }
 
-void WGenlistItem::onSelect( Elm_Object_Item* objItem )
+void WGenlistItem::onSelect(Elm_Object_Item *objItem)
 {
 }
 
 
-Elm_Object_ItemWGenlistItem::getElmObjectItem()
+Elm_Object_Item *WGenlistItem::getElmObjectItem()
 {
        return __pv->__objectItem;
 }
 
-void WGenlistItem::setElmObjectItem( Elm_Object_Item* objItem )
+void WGenlistItem::setElmObjectItem(Elm_Object_Item *objItem)
 {
        __pv->__objectItem = objItem;
 }
@@ -70,26 +69,26 @@ void WGenlistItem::setElmObjectItem( Elm_Object_Item* objItem )
 
 void WGenlistItem::selectCb(void *data, Evas_Object *obj, void *event_info)
 {
-       Elm_Object_Item* genlistItem = (Elm_Object_Item*) event_info;
+       Elm_Object_Item *genlistItem = (Elm_Object_Item *) event_info;
        elm_genlist_item_selected_set(genlistItem, EINA_FALSE);
 
-       auto item = (WGenlistItem*)data;
-       item->onSelect( genlistItem );
+       auto item = (WGenlistItem *)data;
+       item->onSelect(genlistItem);
 }
 
 
-bool WGenlistItem::attachToView( WControl* popup )
+bool WGenlistItem::attachToView(WControl *popup)
 {
-       if( __pv->__objectItem == NULL ) {
+       if (__pv->__objectItem == NULL) {
                WERROR("object item is not created!");
                return false;
        }
 
-       Evas_Object* obj = elm_object_item_widget_get( __pv->__objectItem );
-       while( (obj = elm_object_parent_widget_get( obj )) != NULL ) {
-               WView* view = WView_getInstanceFromEvasObj( obj );
-               if( view != NULL ) {
-                       view->attachPopup( popup );
+       Evas_Object *obj = elm_object_item_widget_get(__pv->__objectItem);
+       while ((obj = elm_object_parent_widget_get(obj)) != NULL) {
+               WView *view = WView_getInstanceFromEvasObj(obj);
+               if (view != NULL) {
+                       view->attachPopup(popup);
                        return true;
                }
        }
index ec634b3..6036a5f 100644 (file)
@@ -26,18 +26,17 @@ public:
        ~__WMenuPopupImpl();
 public:
        //
-       Evas_Object__win;
-       Evas_Object__navi;
-       Evas_Object__popup;
+       Evas_Object *__win;
+       Evas_Object *__navi;
+       Evas_Object *__popup;
        std::vector<std::function< void()>> __vSelectItemCb;
 
        void __popupMove();
 
-       static void __popupSelectCb(void* data, Evas_Object* obj, void* event_info);
-       static void __popupResizeCb(void* data, Evas* e, Evas_Object* obj, void* event_info);
-       static void __popupWinRotateCb(void* data, Evas_Object* obj, void* event_info);
-       static void __popupDismissedCb(void* data, Evas_Object* obj, void* event_info);
-
+       static void __popupSelectCb(void *data, Evas_Object *obj, void *event_info);
+       static void __popupResizeCb(void *data, Evas *e, Evas_Object *obj, void *event_info);
+       static void __popupWinRotateCb(void *data, Evas_Object *obj, void *event_info);
+       static void __popupDismissedCb(void *data, Evas_Object *obj, void *event_info);
 };
 
 __WMenuPopupImpl::__WMenuPopupImpl()
@@ -49,33 +48,33 @@ __WMenuPopupImpl::__WMenuPopupImpl()
 
 __WMenuPopupImpl::~__WMenuPopupImpl()
 {
-
 }
 
 void __WMenuPopupImpl:: __popupMove()
 {
        WENTER();
-       int y, w,h,w1,h1;
+       int y, w, h, w1, h1;
        int rotate;
 
        evas_object_geometry_get(NULL, NULL, &y, &w, &h);
        elm_win_screen_size_get(__win, NULL, NULL, &w1, &h1);
        rotate = elm_win_rotation_get(__win);
 
-       if(rotate == 90)
+       if (rotate == 90) {
                evas_object_move(__popup, h1/2, w1);
-       else if(rotate == 270)
+       } else if (rotate == 270) {
                evas_object_move(__popup, h1/2, w1);
-       else
+       } else {
                evas_object_move(__popup, w1/2, h1);
+       }
 
        evas_object_show(__popup);
 }
 
-void __WMenuPopupImpl::__popupSelectCb( void* data, Evas_Object* obj, void* event_info )
+void __WMenuPopupImpl::__popupSelectCb(void *data, Evas_Object *obj, void *event_info)
 {
        WENTER();
-       auto p = (WMenuPopup*)WControl_getInstanceFromEvasObj(obj);
+       auto p = (WMenuPopup *)WControl_getInstanceFromEvasObj(obj);
        const unsigned int itemIndex = reinterpret_cast<unsigned long long>(data);
        if (p && p->__pv) {
            p->__pv->__vSelectItemCb[itemIndex]();
@@ -83,29 +82,29 @@ void __WMenuPopupImpl::__popupSelectCb( void* data, Evas_Object* obj, void* even
        evas_object_del(obj);
 }
 
-void __WMenuPopupImpl::__popupResizeCb(void* data, Evas* e, Evas_Object* obj, void* event_info)
+void __WMenuPopupImpl::__popupResizeCb(void *data, Evas *e, Evas_Object *obj, void *event_info)
 {
        WENTER();
-       auto p = (WMenuPopup*)data;
+       auto p = (WMenuPopup *)data;
        p->__pv->__popupMove();
 }
 
-void __WMenuPopupImpl::__popupWinRotateCb(void* data, Evas_Object* obj, void* event_info)
+void __WMenuPopupImpl::__popupWinRotateCb(void *data, Evas_Object *obj, void *event_info)
 {
        WENTER();
-       auto p = (WMenuPopup*)data;
+       auto p = (WMenuPopup *)data;
        p->__pv->__popupMove();
 }
 
-void __WMenuPopupImpl::__popupDismissedCb(void* data, Evas_Object* obj, void* event_info)
+void __WMenuPopupImpl::__popupDismissedCb(void *data, Evas_Object *obj, void *event_info)
 {
        WENTER();
-       auto p = (WMenuPopup*)data;
+       auto p = (WMenuPopup *)data;
 
        evas_object_del(p->getEvasObj());
 }
 
-WMenuPopup::WMenuPopup() : __pv( new __WMenuPopupImpl() )
+WMenuPopup::WMenuPopup() : __pv(new __WMenuPopupImpl())
 {
        WHIT();
 }
@@ -120,12 +119,12 @@ WMenuPopup::~WMenuPopup()
        delete __pv;
 }
 
-void WMenuPopup::prepare(Evas_Object* win, Evas_Object* naviframe)
+void WMenuPopup::prepare(Evas_Object *win, Evas_Object *naviframe)
 {
        __pv->__win = win;
        __pv->__navi = naviframe;
 
-       Evas_Objectpopup = NULL;
+       Evas_Object *popup = NULL;
        popup = elm_ctxpopup_add(__pv->__win);
     elm_object_style_set(popup, "more/default");
        elm_ctxpopup_auto_hide_disabled_set(popup, EINA_TRUE);
@@ -139,24 +138,23 @@ void WMenuPopup::prepare(Evas_Object* win, Evas_Object* naviframe)
        evas_object_smart_callback_add(popup, "language,changed", __WMenuPopupImpl::__popupDismissedCb, this);
 
        __pv->__popup = popup;
-
 }
 
-Elm_Object_Item* WMenuPopup::appendItem( const char* label, std::function< void()> selectCb )
+Elm_Object_Item *WMenuPopup::appendItem(const char *label, std::function<void()> selectCb)
 {
        WASSERT(__pv->__popup);
        __pv->__vSelectItemCb.push_back(selectCb);
-       return elm_ctxpopup_item_append(__pv->__popup, label, NULL, __WMenuPopupImpl::__popupSelectCb, (void*)(__pv->__vSelectItemCb.size() - 1));
+       return elm_ctxpopup_item_append(__pv->__popup, label, NULL, __WMenuPopupImpl::__popupSelectCb, (void *)(__pv->__vSelectItemCb.size() - 1));
 }
 
 void WMenuPopup::createMenu()
 {
-       WControl::create(NULL,NULL);
+       WControl::create(NULL, NULL);
 }
 
-Evas_Object* WMenuPopup::onCreate(Evas_Object* parent, void* param)
+Evas_Object *WMenuPopup::onCreate(Evas_Object *parent, void *param)
 {
-       if(__pv->__popup == NULL) {
+       if (__pv->__popup == NULL) {
                WERROR("Not initialized!");
                return NULL;
        }
index 117a656..7ec5849 100644 (file)
@@ -31,14 +31,14 @@ public:
        ~__WNaviframeImpl();
 public:
        //
-       char__name;
-       Evas_Object__evasObj;
+       char *__name;
+       Evas_Object *__evasObj;
        //
-       std::function<Evas_Object*(Evas_Object*, void*)> __createHandler;
-       std::function<void(bool*)> __lastItemPopHandler;
+       std::function<Evas_Object *(Evas_Object *, void *)> __createHandler;
+       std::function<void(bool *)> __lastItemPopHandler;
 
-       static void __objDelCb( void* data, Evas* evas, Evas_Object* obj, void* event_info);
-       static void __transitionFinishedCb(void* data, Evas_Object* obj, void* event_info);
+       static void __objDelCb(void *data, Evas *evas, Evas_Object *obj, void *event_info);
+       static void __transitionFinishedCb(void *data, Evas_Object *obj, void *event_info);
 };
 
 __WNaviframeImpl::__WNaviframeImpl():
@@ -50,27 +50,28 @@ __WNaviframeImpl::__WNaviframeImpl():
 }
 __WNaviframeImpl::~__WNaviframeImpl()
 {
-       if( __name)
+       if (__name) {
                free(__name);
+       }
 }
 
 
-void __WNaviframeImpl::__objDelCb( void* data, Evas* evas, Evas_Object* obj, void* event_info)
+void __WNaviframeImpl::__objDelCb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
 {
        WHIT();
 
-       auto frame = (WNaviframe*)data;
+       auto frame = (WNaviframe *)data;
        frame->onDestroy();
        //
        delete frame;
 }
 
-void __WNaviframeImpl::__transitionFinishedCb(void* data, Evas_Object* obj, void* event_info)
+void __WNaviframeImpl::__transitionFinishedCb(void *data, Evas_Object *obj, void *event_info)
 {
        WHIT();
 }
 
-WNaviframe::WNaviframe() : __pv( new __WNaviframeImpl() )
+WNaviframe::WNaviframe() : __pv(new __WNaviframeImpl())
 {
        WHIT();
 }
@@ -81,29 +82,30 @@ WNaviframe::~WNaviframe()
        delete __pv;
 }
 
-const charWNaviframe::getClassName()
+const char *WNaviframe::getClassName()
 {
        return __CLASS_NAME;
 }
 
-bool WNaviframe::create( Evas_Object* parent, void* param )
+bool WNaviframe::create(Evas_Object *parent, void *param)
 {
-       if( __pv->__evasObj ) {
+       if (__pv->__evasObj) {
                WDEBUG("Already created!");
                return true;
        }
        __pv->__evasObj = NULL;
-       if( __pv->__createHandler )
+       if (__pv->__createHandler) {
                __pv->__evasObj = __pv->__createHandler(parent, param);
-       else
+       } else {
                __pv->__evasObj = onCreate(parent, param);
+       }
 
-       if(__pv->__evasObj ==  NULL) {
+       if (__pv->__evasObj ==  NULL) {
                WERROR("No frame object created!");
                return false;
        }
-       evas_object_data_set( __pv->__evasObj, WKEY_FRAME_INSTANCE, this );
-       evas_object_event_callback_add( __pv->__evasObj, EVAS_CALLBACK_DEL, __WNaviframeImpl::__objDelCb, this);
+       evas_object_data_set(__pv->__evasObj, WKEY_FRAME_INSTANCE, this);
+       evas_object_event_callback_add(__pv->__evasObj, EVAS_CALLBACK_DEL, __WNaviframeImpl::__objDelCb, this);
        //
        // Do not place this before "evas_object_event_callback_add",
        // The reason is that if additional del callback is added at child class, it should be called first to keep state the class object is still alive.
@@ -115,7 +117,7 @@ bool WNaviframe::create( Evas_Object* parent, void* param )
 void WNaviframe::destroy()
 {
        WHIT();
-       if(__pv->__evasObj) {
+       if (__pv->__evasObj) {
                destroyAllViews();
                evas_object_del(__pv->__evasObj);
                // Do not leave any code here.
@@ -126,71 +128,73 @@ void WNaviframe::destroy()
        }
 }
 
-Evas_ObjectWNaviframe::getEvasObj()
+Evas_Object *WNaviframe::getEvasObj()
 {
        return __pv->__evasObj;
 }
 
-void WNaviframe::setName(const charname)
+void WNaviframe::setName(const char *name)
 {
-       if__pv->__name) {
+       if (__pv->__name) {
                free(__pv->__name);
                __pv->__name = NULL;
        }
-       if( name ) {
+       if (name) {
                size_t len = strlen(name) + 1;
-               __pv->__name = (char*)malloc(len);
-               strncpy( __pv->__name, name, len);
+               __pv->__name = (char *)malloc(len);
+               strncpy(__pv->__name, name, len);
        }
 }
 
-const charWNaviframe::getName()
+const char *WNaviframe::getName()
 {
        return __pv->__name;
 }
 
-WWindowWNaviframe::getWindow()
+WWindow *WNaviframe::getWindow()
 {
-       if( __pv->__evasObj == NULL)
+       if (__pv->__evasObj == NULL) {
                return NULL;
+       }
 
-       WWindow* window = (WWindow*)evas_object_data_get( __pv->__evasObj, WKEY_WINDOW_INSTANCE );
+       WWindow *window = (WWindow *)evas_object_data_get(__pv->__evasObj, WKEY_WINDOW_INSTANCE);
 
        return window;
 }
 
-bool WNaviframe::push( WView* view, const char* viewName, void* viewCreationParam )
+bool WNaviframe::push(WView *view, const char *viewName, void *viewCreationParam)
 {
-       if( viewName )
-               view->setName( viewName );
-       return onPush( view, viewCreationParam );
+       if (viewName) {
+               view->setName(viewName);
+       }
+       return onPush(view, viewCreationParam);
 }
 
 void WNaviframe::destroyAllViews()
 {
        WHIT();
 
-       Eina_List* list = elm_naviframe_items_get( getEvasObj());
-       Eina_Listtemp = NULL;
-       voidit = NULL;
-       EINA_LIST_FOREACH( list, temp, it) {
-               elm_object_item_del( (Elm_Object_Item*)it);
+       Eina_List *list = elm_naviframe_items_get(getEvasObj());
+       Eina_List *temp = NULL;
+       void *it = NULL;
+       EINA_LIST_FOREACH(list, temp, it) {
+               elm_object_item_del((Elm_Object_Item *)it);
        }
 }
 
-void WNaviframe::setOnCreate( const std::function<Evas_Object*(Evas_Object*, void*)>& handlerFunc)
+void WNaviframe::setOnCreate(const std::function<Evas_Object *(Evas_Object *, void *)>& handlerFunc)
 {
        __pv->__createHandler = handlerFunc;
 }
 
-void WNaviframe::setOnLastItemPop( const std::function<void(bool*)>& handlerFunc)
+void WNaviframe::setOnLastItemPop(const std::function<void(bool *)>& handlerFunc)
 {
        __pv->__lastItemPopHandler = handlerFunc;
 }
 
-Evas_Object* WNaviframe::onCreate(Evas_Object* parent, void* param)
+Evas_Object *WNaviframe::onCreate(Evas_Object *parent, void *param)
 {
-       Evas_Object* obj = elm_naviframe_add( parent);
+       Evas_Object *obj = elm_naviframe_add(parent);
        elm_naviframe_prev_btn_auto_pushed_set(obj, EINA_TRUE);
        elm_object_part_content_set(parent, "elm.swallow.content", obj);
        eext_object_event_callback_add(obj, EEXT_CALLBACK_BACK, eext_naviframe_back_cb, NULL);
@@ -204,75 +208,79 @@ Evas_Object* WNaviframe::onCreate(Evas_Object* parent, void* param)
 
 void WNaviframe::onDestroy()
 {
-
 }
 
-void WNaviframe::onLastItemPop(boolpopOut)
+void WNaviframe::onLastItemPop(bool *popOut)
 {
        WHIT();
        *popOut = false;
-       WWindowwindow = getWindow();
+       WWindow *window = getWindow();
        if (window != NULL) {
-               Evas_ObjectevasObj = window->getEvasObj();
+               Evas_Object *evasObj = window->getEvasObj();
                if (evasObj != NULL) {
                        elm_win_lower(evasObj);
                }
        }
 }
 
-bool WNaviframe::onPush( WView* view, void* viewParam )
+bool WNaviframe::onPush(WView *view, void *viewParam)
 {
-       WASSERT( getEvasObj() != NULL );
+       WASSERT(getEvasObj() != NULL);
        //
-       view->create( getEvasObj(), viewParam );
+       view->create(getEvasObj(), viewParam);
 
 
-       WView_setContainerProperties( view, getWindow(), this);
+       WView_setContainerProperties(view, getWindow(), this);
        //
-       Elm_Object_Item* item = view->onPushToNaviframe( getEvasObj() );
-       if( item == NULL )
-               item = elm_naviframe_item_push( getEvasObj(), view->getTitle(), NULL, NULL, view->getEvasObj(), NULL);
+       Elm_Object_Item *item = view->onPushToNaviframe(getEvasObj());
+       if (item == NULL) {
+               item = elm_naviframe_item_push(getEvasObj(), view->getTitle(), NULL, NULL, view->getEvasObj(), NULL);
+       }
        //
-       WView_setContainerNaviItemProperty( view, item );
+       WView_setContainerNaviItemProperty(view, item);
        //
-       if( view->__callPushedHandlerFunc( item ) == false)
-               view->onPushed( item );
+       if (view->__callPushedHandlerFunc(item) == false) {
+               view->onPushed(item);
+       }
 
-       elm_naviframe_item_pop_cb_set( item, __popCb, view);
+       elm_naviframe_item_pop_cb_set(item, __popCb, view);
 
        return true;
 }
 
-bool WNaviframe::onItemPop( WView* view, Elm_Object_Item* item )
+bool WNaviframe::onItemPop(WView *view, Elm_Object_Item *item)
 {
-       WNaviframenf = view->getNaviframe();
+       WNaviframe *nf = view->getNaviframe();
 
-       if( item == elm_naviframe_bottom_item_get( nf->getEvasObj() )) {
+       if (item == elm_naviframe_bottom_item_get(nf->getEvasObj())) {
                bool ret = view->onPop();
-               if( ret == false )
+               if (ret == false) {
                        return EINA_FALSE;
+               }
 
                bool popOut = true;
 
-               if( nf->__pv->__lastItemPopHandler)
+               if (nf->__pv->__lastItemPopHandler) {
                        nf->__pv->__lastItemPopHandler(&popOut);
-               else
+               } else {
                        nf->onLastItemPop(&popOut);
+               }
                return popOut;
        } else {
                return view->onPop();
        }
 }
 
-Eina_Bool WNaviframe::__popCb( void* data, Elm_Object_Item* item)
+Eina_Bool WNaviframe::__popCb(void *data, Elm_Object_Item *item)
 {
-       auto view = (WView*)data;
-       WNaviframenf = view->getNaviframe();
+       auto view = (WView *)data;
+       WNaviframe *nf = view->getNaviframe();
        //
-       WASSERT( view->getNaviItem() == item );
+       WASSERT(view->getNaviItem() == item);
        //
-       if( nf->onItemPop( view, item ) )
+       if (nf->onItemPop(view, item)) {
                return EINA_TRUE;
-       else
+       } else {
                return EINA_FALSE;
+       }
 }
index 0fff3f6..aadc726 100644 (file)
@@ -32,46 +32,47 @@ public:
        std::string __title;
        std::string __text;
        std::string __textDomain;
-       WControl__content;
+       WControl *__content;
 
-       std::function<Evas_Object* (Evas_Object* parent)> __contentCreateCb;
-       std::function<void(Evas_Objectpopup)> __morePropertiesCb;
-       std::function<void (bool* destroyPopup)> __backCb;
+       std::function<Evas_Object *(Evas_Object *parent)> __contentCreateCb;
+       std::function<void(Evas_Object *popup)> __morePropertiesCb;
+       std::function<void(bool *destroyPopup)> __backCb;
 
-       std::function<void (bool* destroyPopup)> __vButtonCb[__MAX_BUTTON_NUM];
-       std::function<void (Evas_Object* button)>* buttonPropertyCb[__MAX_BUTTON_NUM];
+       std::function<void(bool *destroyPopup)> __vButtonCb[__MAX_BUTTON_NUM];
+       std::function<void(Evas_Object *button)> *buttonPropertyCb[__MAX_BUTTON_NUM];
 
        std::string __listButtonLabel[__MAX_BUTTON_NUM];
        int __count;
-
 };
 __WPopupImpl::__WPopupImpl()
 {
        __content = NULL;
        __count = 0;
-       for( int i=0; i< __MAX_BUTTON_NUM; i++) {
+       for (int i = 0; i < __MAX_BUTTON_NUM; i++) {
                buttonPropertyCb[i] = NULL;
        }
 }
 
 __WPopupImpl::~__WPopupImpl()
 {
-       for( int i=0; i< __MAX_BUTTON_NUM; i++) {
+       for (int i = 0; i < __MAX_BUTTON_NUM; i++) {
                delete buttonPropertyCb[i];
        }
 }
 
 
-WPopup::WPopup() : __pv( new __WPopupImpl() )
+WPopup::WPopup() : __pv(new __WPopupImpl())
 {
        WHIT();
 }
-WPopup::WPopup( const char* title, const char* textContent ) : __pv( new __WPopupImpl() )
+WPopup::WPopup(const char *title, const char *textContent) : __pv(new __WPopupImpl())
 {
-       if( title )
+       if (title) {
                __pv->__title = title;
-       if( textContent )
+       }
+       if (textContent) {
                __pv->__text = textContent;
+       }
 }
 
 WPopup::~WPopup()
@@ -80,145 +81,155 @@ WPopup::~WPopup()
        delete __pv;
 }
 
-void WPopup::setTitle( const char* title )
+void WPopup::setTitle(const char *title)
 {
-       if( title )
+       if (title) {
                __pv->__title = title;
-       else
+       } else {
                __pv->__title.clear();
+       }
 }
 
-void WPopup::setContent( const char* text )
+void WPopup::setContent(const char *text)
 {
-       if( text )
+       if (text) {
                __pv->__text = text;
-       else
+       } else {
                __pv->__text.clear();
-       if( __pv->__content ) {
+       }
+       if (__pv->__content) {
                __pv->__content->destroy();
                __pv->__content = NULL;
        }
 }
 
-void WPopup::setContent( WControl* control )
+void WPopup::setContent(WControl *control)
 {
        __pv->__text = "";
        __pv->__content = control;
 }
 
-void WPopup::setContent( const std::function<Evas_Object* (Evas_Object* parent)> contentCreateCb )
+void WPopup::setContent(const std::function<Evas_Object *(Evas_Object *parent)> contentCreateCb)
 {
        __pv->__text = "";
-       if( __pv->__content ) {
+       if (__pv->__content) {
                __pv->__content->destroy();
                __pv->__content = NULL;
        }
        __pv->__contentCreateCb = contentCreateCb;
 }
 
-void WPopup::setTextTranslatable( const char* textDomain )
+void WPopup::setTextTranslatable(const char *textDomain)
 {
-       if( textDomain )
+       if (textDomain) {
                __pv->__textDomain = textDomain;
-       else
+       } else {
                __pv->__textDomain.clear();
+       }
 }
 
 #define BUTTON_CALLBACK(_buttonIndex) \
-[](void* data, Evas_Object* obj, void* eventInfo) {\
-       WPopup* self = (WPopup*)data;\
+[](void *data, Evas_Object *obj, void *eventInfo) { \
+       WPopup *self = (WPopup *)data;\
        if (self->__pv->__vButtonCb[_buttonIndex]) { \
                bool destroyPopup = true; \
                self->__pv->__vButtonCb[_buttonIndex](&destroyPopup); \
-               if( destroyPopup ) \
-                       evas_object_del(self->getEvasObj());\
-       }\
-       else \
-               evas_object_del(self->getEvasObj());\
+               if (destroyPopup) { \
+                       evas_object_del(self->getEvasObj()); \
+               } \
+       } else { \
+               evas_object_del(self->getEvasObj()); \
+       } \
 }
 
-bool WPopup::addButton(const char* buttonText, const std::function<void (bool* destroyPopup)> buttonCb, const std::function<void (Evas_Object* button)> setPropertyCb )
+bool WPopup::addButton(const char *buttonText, const std::function<void(bool *destroyPopup)> buttonCb, const std::function<void(Evas_Object *button)> setPropertyCb)
 {
-       if( __pv->__count >= __MAX_BUTTON_NUM ) {
+       if (__pv->__count >= __MAX_BUTTON_NUM) {
                WERROR("Over the max button number! =%d", __pv->__count);
                return false;
        }
        __pv->__listButtonLabel[__pv->__count] = buttonText;
        __pv->__vButtonCb[__pv->__count] = buttonCb;
-       if( setPropertyCb )
-               __pv->buttonPropertyCb[__pv->__count] = new std::function<void (Evas_Object* button)>( setPropertyCb );
+       if (setPropertyCb) {
+               __pv->buttonPropertyCb[__pv->__count] = new std::function<void(Evas_Object *button)>(setPropertyCb);
+       }
 
        __pv->__count++;
        return true;
 }
 
-void WPopup::setOnBack( const std::function<void (bool* destroyPopup)> backCb )
+void WPopup::setOnBack(const std::function<void(bool *destroyPopup)> backCb)
 {
        __pv->__backCb = backCb;
 }
 
-void WPopup::setOnMoreProperties( const std::function<void(Evas_Object* popup)>& morePropertiesCb )
+void WPopup::setOnMoreProperties(const std::function<void(Evas_Object *popup)>& morePropertiesCb)
 {
        __pv->__morePropertiesCb = morePropertiesCb;
 }
 
-Evas_Object* WPopup::onCreate(Evas_Object* parent, void* param)
+Evas_Object *WPopup::onCreate(Evas_Object *parent, void *param)
 {
        WHIT();
 
-       Evas_Object* popup = elm_popup_add( parent );
+       Evas_Object *popup = elm_popup_add(parent);
 
        // It make the width to fit to screen width in portrait mode. 2014.09.30 modified as EFL notice.
-       elm_popup_align_set( popup, ELM_NOTIFY_ALIGN_FILL, 1.0 );
+       elm_popup_align_set(popup, ELM_NOTIFY_ALIGN_FILL, 1.0);
 
-       if( __pv->__backCb )
-               eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, [](void *data, Evas_Object *obj, void *event_info){
-                       WPopup* p = (WPopup*)data;
+       if (__pv->__backCb) {
+               eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, [](void *data, Evas_Object *obj, void *event_info) {
+                       WPopup *p = (WPopup *)data;
                        bool destroyPopup = true;
-                       p->__pv->__backCb( &destroyPopup );
-                       if( destroyPopup ) {
+                       p->__pv->__backCb(&destroyPopup);
+                       if (destroyPopup) {
                                p->destroy();
                        }
                }, this);
-       else
+       } else {
                eext_object_event_callback_add(popup, EEXT_CALLBACK_BACK, eext_popup_back_cb, NULL);
+       }
 
-       if( __pv->__morePropertiesCb )
-               __pv->__morePropertiesCb( popup );
+       if (__pv->__morePropertiesCb) {
+               __pv->__morePropertiesCb(popup);
+       }
 
        if (!__pv->__title.empty()) {
-               if (!__pv->__textDomain.empty())
+               if (!__pv->__textDomain.empty()) {
                        elm_object_domain_translatable_part_text_set(popup, "title,text", __pv->__textDomain.c_str(), __pv->__title.c_str());
-               else
-                       elm_object_part_text_set(popup, "title,text", __pv->__title.c_str() );
+               } else {
+                       elm_object_part_text_set(popup, "title,text", __pv->__title.c_str());
+               }
        }
 
        if (!__pv->__text.empty()) {
-               if (!__pv->__textDomain.empty())
+               if (!__pv->__textDomain.empty()) {
                        elm_object_domain_translatable_part_text_set(popup, NULL, __pv->__textDomain.c_str(), __pv->__text.c_str());
-               else
+               } else {
                        elm_object_text_set(popup, __pv->__text.c_str());
-       } else if( __pv->__content) {
+               }
+       } else if (__pv->__content) {
                __pv->__content->create(popup, NULL);
                elm_object_content_set(popup, __pv->__content->getEvasObj());
-       } else if( __pv->__contentCreateCb ) {
-               Evas_Object* obj = __pv->__contentCreateCb( popup );
+       } else if (__pv->__contentCreateCb) {
+               Evas_Object *obj = __pv->__contentCreateCb(popup);
                elm_object_content_set(popup, obj);
        }
 
-       for( int i=0; i< __pv->__count; i++ ) {
-               Evas_Objectbutton = elm_button_add(popup);
+       for (int i = 0; i < __pv->__count; i++) {
+               Evas_Object *button = elm_button_add(popup);
                elm_object_style_set(button, "popup");
-               if (!__pv->__textDomain.empty())
-                       elm_object_domain_translatable_part_text_set(button, NULL, __pv->__textDomain.c_str(), __pv->__listButtonLabel[i].c_str() );
-               else
-                       elm_object_text_set(button, __pv->__listButtonLabel[i].c_str() );
+               if (!__pv->__textDomain.empty()) {
+                       elm_object_domain_translatable_part_text_set(button, NULL, __pv->__textDomain.c_str(), __pv->__listButtonLabel[i].c_str());
+               } else {
+                       elm_object_text_set(button, __pv->__listButtonLabel[i].c_str());
+               }
 
                char partname[100] = {0};
                snprintf(partname, sizeof(partname) - 1, "button%d", i + 1);
                elm_object_part_content_set(popup, partname, button);
                //
-               switch ( i ) {
+               switch (i) {
                        case 0:
                                evas_object_smart_callback_add(button, "clicked", BUTTON_CALLBACK(0), this);
                                break;
@@ -232,16 +243,15 @@ Evas_Object* WPopup::onCreate(Evas_Object* parent, void* param)
                                break;
                }
 
-               if( __pv->buttonPropertyCb[i] ) {
-                       (*__pv->buttonPropertyCb[i])( button );
+               if (__pv->buttonPropertyCb[i]) {
+                       (*__pv->buttonPropertyCb[i])(button);
                }
-               evas_object_show( button);
+               evas_object_show(button);
        }
 
        evas_object_show(popup);
 
        return popup;
-
 }
 
 void WPopup::onDestroy()
index a259f4c..1c9b7ee 100644 (file)
@@ -26,19 +26,18 @@ public:
        ~__WUiTimerImpl();
 public:
        //
-       void__timer;
+       void *__timer;
        WUiTimer::TimerType __type;
 
-       void__userData;
-       std::weak_ptr<IWUiObject>__uiObjMonitor;
+       void *__userData;
+       std::weak_ptr<IWUiObject> *__uiObjMonitor;
 
-       std::function<Eina_Bool (void*)> __timerFunc;
-       std::function<void (void*)> __jobFunc;
+       std::function<Eina_Bool(void *)> __timerFunc;
+       std::function<void(void *)> __jobFunc;
        //
        void __deleteTimer();
-       static Eina_Bool __timerCb(void* data);
-       static void __jobCb(void* data);
-
+       static Eina_Bool __timerCb(void *data);
+       static void __jobCb(void *data);
 };
 __WUiTimerImpl::__WUiTimerImpl()
 {
@@ -52,24 +51,23 @@ __WUiTimerImpl::~__WUiTimerImpl()
 {
        __deleteTimer();
        delete __uiObjMonitor;
-
 }
 
 void __WUiTimerImpl::__deleteTimer()
 {
-       if( __timer ) {
-               switch( __type ) {
+       if (__timer) {
+               switch(__type) {
                case WUiTimer::IDLER:
-                       ecore_idler_del( (Ecore_Idler*)__timer);
+                       ecore_idler_del((Ecore_Idler *)__timer);
                        break;
                case WUiTimer::ANIMATOR:
-                       ecore_animator_del( (Ecore_Animator*)__timer);
+                       ecore_animator_del((Ecore_Animator *)__timer);
                        break;
                case WUiTimer::TIMER:
-                       ecore_timer_del( (Ecore_Timer*)__timer);
+                       ecore_timer_del((Ecore_Timer *)__timer);
                        break;
                case WUiTimer::JOB:
-                       ecore_job_del( (Ecore_Job*)__timer);
+                       ecore_job_del((Ecore_Job *)__timer);
                        break;
                default:
                        break;
@@ -78,33 +76,33 @@ void __WUiTimerImpl::__deleteTimer()
        }
 }
 
-Eina_Bool __WUiTimerImpl::__timerCb( void* data )
+Eina_Bool __WUiTimerImpl::__timerCb(void *data)
 {
-       auto p = (WUiTimer*)data;
+       auto p = (WUiTimer *)data;
 
-       if( p->__pv->__uiObjMonitor && p->__pv->__uiObjMonitor->expired() ) {
+       if (p->__pv->__uiObjMonitor && p->__pv->__uiObjMonitor->expired()) {
                p->__pv->__timer = NULL;
                delete p;
                return ECORE_CALLBACK_CANCEL;
        }
-       Eina_Bool ret = p->__pv->__timerFunc( p->__pv->__userData );
-       if( ret == ECORE_CALLBACK_CANCEL ) {
+       Eina_Bool ret = p->__pv->__timerFunc(p->__pv->__userData);
+       if (ret == ECORE_CALLBACK_CANCEL) {
                p->__pv->__timer = NULL;
                delete p;
        }
        return ret;
 }
 
-void __WUiTimerImpl::__jobCb( void* data )
+void __WUiTimerImpl::__jobCb(void *data)
 {
-       auto p = (WUiTimer*)data;
+       auto p = (WUiTimer *)data;
 
-       ifp->__pv->__uiObjMonitor && p->__pv->__uiObjMonitor->expired()) {
+       if (p->__pv->__uiObjMonitor && p->__pv->__uiObjMonitor->expired()) {
                p->__pv->__timer = NULL;
                delete p;
                return;
        }
-       p->__pv->__jobFunc( p->__pv->__userData );
+       p->__pv->__jobFunc(p->__pv->__userData);
        p->__pv->__timer = NULL;
        delete p;
 }
@@ -131,21 +129,21 @@ void WUiTimer::destroy()
        delete this;
 }
 
-WUiTimer* WUiTimer::addIdler( const std::function<Eina_Bool (void*)>& timerFunc, void* userData, WUiObjectPtr monitorObj )
+WUiTimer *WUiTimer::addIdler(const std::function<Eina_Bool(void *)>& timerFunc, void *userData, WUiObjectPtr monitorObj)
 {
-       WUiTimertimer = new WUiTimer();
+       WUiTimer *timer = new WUiTimer();
        timer->__pv->__type = WUiTimer::IDLER;
-       if( !monitorObj.expired() ) {
+       if (!monitorObj.expired()) {
                timer->__pv->__uiObjMonitor = new std::weak_ptr<IWUiObject>;
                *timer->__pv->__uiObjMonitor = monitorObj;
        } else {
-               WDEBUG( "No monitored object is set!");
+               WDEBUG("No monitored object is set!");
        }
 
        timer->__pv->__timerFunc = timerFunc;
        timer->__pv->__userData = userData;
-       Ecore_Idler* ecoreIdler = ecore_idler_add( __WUiTimerImpl::__timerCb, timer );
-       if( ecoreIdler == NULL ) {
+       Ecore_Idler *ecoreIdler = ecore_idler_add(__WUiTimerImpl::__timerCb, timer);
+       if (ecoreIdler == NULL) {
                WERROR("failed to add ecore idler!");
                delete timer;
                return NULL;
@@ -153,20 +151,20 @@ WUiTimer* WUiTimer::addIdler( const std::function<Eina_Bool (void*)>& timerFunc,
        timer->__pv->__timer = ecoreIdler;
        return timer;
 }
-WUiTimer* WUiTimer::addAnimator( const std::function<Eina_Bool (void*)>& timerFunc, void* userData, WUiObjectPtr monitorObj )
+WUiTimer *WUiTimer::addAnimator(const std::function<Eina_Bool(void *)>& timerFunc, void *userData, WUiObjectPtr monitorObj)
 {
-       WUiTimertimer = new WUiTimer();
+       WUiTimer *timer = new WUiTimer();
        timer->__pv->__type = WUiTimer::ANIMATOR;
-       if( !monitorObj.expired() ) {
+       if (!monitorObj.expired()) {
                timer->__pv->__uiObjMonitor = new std::weak_ptr<IWUiObject>;
                *timer->__pv->__uiObjMonitor = monitorObj;
        } else {
-               WDEBUG( "No monitored object is set!");
+               WDEBUG("No monitored object is set!");
        }
        timer->__pv->__timerFunc = timerFunc;
        timer->__pv->__userData = userData;
-       Ecore_Animator* ecoreAnimator = ecore_animator_add( __WUiTimerImpl::__timerCb, timer );
-       if( ecoreAnimator == NULL ) {
+       Ecore_Animator *ecoreAnimator = ecore_animator_add(__WUiTimerImpl::__timerCb, timer);
+       if (ecoreAnimator == NULL) {
                WERROR("failed to add ecore animator!");
                delete timer;
                return NULL;
@@ -174,20 +172,20 @@ WUiTimer* WUiTimer::addAnimator( const std::function<Eina_Bool (void*)>& timerFu
        timer->__pv->__timer = ecoreAnimator;
        return timer;
 }
-WUiTimer* WUiTimer::addTimer( double interval, const std::function<Eina_Bool (void*)>& timerFunc, void* userData, WUiObjectPtr monitorObj )
+WUiTimer *WUiTimer::addTimer(double interval, const std::function<Eina_Bool(void *)>& timerFunc, void *userData, WUiObjectPtr monitorObj)
 {
-       WUiTimertimer = new WUiTimer();
+       WUiTimer *timer = new WUiTimer();
        timer->__pv->__type = WUiTimer::TIMER;
-       if( !monitorObj.expired() ) {
+       if (!monitorObj.expired()) {
                timer->__pv->__uiObjMonitor = new std::weak_ptr<IWUiObject>;
                *timer->__pv->__uiObjMonitor = monitorObj;
        } else {
-               WDEBUG( "No monitored object is set!");
+               WDEBUG("No monitored object is set!");
        }
        timer->__pv->__timerFunc = timerFunc;
        timer->__pv->__userData = userData;
-       Ecore_Timer* ecoreTimer = ecore_timer_add( interval, __WUiTimerImpl::__timerCb, timer );
-       if( ecoreTimer == NULL ) {
+       Ecore_Timer *ecoreTimer = ecore_timer_add(interval, __WUiTimerImpl::__timerCb, timer);
+       if (ecoreTimer == NULL) {
                WERROR("failed to add ecore timer!");
                delete timer;
                return NULL;
@@ -196,20 +194,20 @@ WUiTimer* WUiTimer::addTimer( double interval, const std::function<Eina_Bool (vo
 
        return timer;
 }
-WUiTimer* WUiTimer::addJob( const std::function<void (void*)>& timerFunc, void* userData, WUiObjectPtr monitorObj )
+WUiTimer *WUiTimer::addJob(const std::function<void(void *)>& timerFunc, void *userData, WUiObjectPtr monitorObj)
 {
-       WUiTimertimer = new WUiTimer();
+       WUiTimer *timer = new WUiTimer();
        timer->__pv->__type = WUiTimer::JOB;
-       if( !monitorObj.expired() ) {
+       if (!monitorObj.expired()) {
                timer->__pv->__uiObjMonitor = new std::weak_ptr<IWUiObject>;
                *timer->__pv->__uiObjMonitor = monitorObj;
        } else {
-               WDEBUG( "No monitored object is set!");
+               WDEBUG("No monitored object is set!");
        }
        timer->__pv->__jobFunc = timerFunc;
        timer->__pv->__userData = userData;
-       Ecore_Job* ecoreJob = ecore_job_add( __WUiTimerImpl::__jobCb, timer );
-       if( ecoreJob == NULL ) {
+       Ecore_Job *ecoreJob = ecore_job_add(__WUiTimerImpl::__jobCb, timer);
+       if (ecoreJob == NULL) {
                WERROR("failed to add ecore job!");
                delete timer;
                return NULL;
index c4ecef3..d5a04ef 100644 (file)
 int WAppAssist_getMajorVersion() { return WAPP_ASSIST_VERSION_MAJOR; }
 int WAppAssist_getMinorVersion() { return WAPP_ASSIST_VERSION_MINOR; }
 int WAppAssist_getPatchVersion() { return WAPP_ASSIST_VERSION_PATCH; }
-const charWAppAssist_getVersion()
+const char *WAppAssist_getVersion()
 {
-       static char ver[24] = {0,};
-       if( ver[0] == '\0' )
-               snprintf( ver, sizeof(ver), "%d.%d.%d", WAppAssist_getMajorVersion(), WAppAssist_getMinorVersion(), WAppAssist_getPatchVersion() );
+       static char ver[24] = {0, };
+       if (ver[0] == '\0') {
+               snprintf(ver, sizeof(ver), "%d.%d.%d", WAppAssist_getMajorVersion(), WAppAssist_getMinorVersion(), WAppAssist_getPatchVersion());
+       }
 
        return ver;
 }
index 0dfbde2..db149c0 100644 (file)
@@ -34,21 +34,20 @@ public:
        ~__WViewImpl();
 public:
        //
-       Evas_Object__obj;
-       char__name;
-       char__title;
-       Elm_Object_Item__naviItem;
-       WWindow__window;
-       WNaviframe__naviframe;
+       Evas_Object *__obj;
+       char *__name;
+       char *__title;
+       Elm_Object_Item *__naviItem;
+       WWindow *__window;
+       WNaviframe *__naviframe;
        //
-       std::function<Evas_Object* (Evas_Object*, void*)> __createHandler;
-       std::function<void (Elm_Object_Item*)> __pushedHandler;
+       std::function<Evas_Object *(Evas_Object *, void *)> __createHandler;
+       std::function<void(Elm_Object_Item *)> __pushedHandler;
 
-       std::shared_ptr<IWUiObject>* __selfPtr;
-       std::weak_ptr<IWUiObject>* __popupMonitor;
-
-       static void __objDelCb( void* data, Evas* evas, Evas_Object* obj, void* event_info);
+       std::shared_ptr<IWUiObject> *__selfPtr;
+       std::weak_ptr<IWUiObject> *__popupMonitor;
 
+       static void __objDelCb(void *data, Evas *evas, Evas_Object *obj, void *event_info);
 };
 __WViewImpl::__WViewImpl()
 {
@@ -66,15 +65,17 @@ __WViewImpl::__WViewImpl()
 
 __WViewImpl::~__WViewImpl()
 {
-       if(__name)
+       if (__name) {
                free(__name);
+       }
 
-       if(__title)
+       if (__title) {
                free(__title);
+       }
 
        //
-       if( __popupMonitor ) {
-               if( auto p = __popupMonitor->lock() ) {
+       if (__popupMonitor) {
+               if (auto p = __popupMonitor->lock()) {
                        p->destroy();
                }
        }
@@ -82,11 +83,11 @@ __WViewImpl::~__WViewImpl()
        delete __selfPtr;
 }
 
-void __WViewImpl::__objDelCb( void* data, Evas* evas, Evas_Object* obj, void* event_info)
+void __WViewImpl::__objDelCb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
 {
        WHIT();
 
-       auto view = (WView*)data;
+       auto view = (WView *)data;
 
        view->__destroy();
 }
@@ -97,16 +98,16 @@ WView::WView()
        __pv = new __WViewImpl();
 }
 
-WView::WView( const char* name ) : __pv( new __WViewImpl() )
+WView::WView(const char *name) : __pv(new __WViewImpl())
 {
        WHIT();
-       setName( name);
+       setName(name);
 }
 
 WView::~WView()
 {
-       if__pv->__name) {
-               WDEBUG( "name=%s", __pv->__name );
+       if (__pv->__name) {
+               WDEBUG("name=%s", __pv->__name);
        } else {
                WHIT();
        }
@@ -114,35 +115,36 @@ WView::~WView()
        delete __pv;
 }
 
-const charWView::getClassName()
+const char *WView::getClassName()
 {
        return __CLASS_NAME;
 }
 
 
-bool WView::create( Evas_Object* parent, void* viewParam )
+bool WView::create(Evas_Object *parent, void *viewParam)
 {
        WHIT();
 
-       if( __pv->__obj ) {
+       if (__pv->__obj) {
                WDEBUG("Already created!");
                return true;
        }
-       if( __pv->__createHandler )
-               __pv->__obj = __pv->__createHandler( parent, viewParam );
-       else
-               __pv->__obj = onCreate( parent, viewParam );
+       if (__pv->__createHandler) {
+               __pv->__obj = __pv->__createHandler(parent, viewParam);
+       } else {
+               __pv->__obj = onCreate(parent, viewParam);
+       }
 
-       if( __pv->__obj == NULL)
+       if (__pv->__obj == NULL) {
                return false;
+       }
 
-       if( __pv->__name ) // for easy debugging
-       {
-               evas_object_name_set( __pv->__obj, __pv->__name );
+       if (__pv->__name) {// for easy debugging
+               evas_object_name_set(__pv->__obj, __pv->__name);
        }
 
-       evas_object_data_set( __pv->__obj, WKEY_VIEW_INSTANCE, this );
-       evas_object_event_callback_add( __pv->__obj, EVAS_CALLBACK_DEL, __WViewImpl::__objDelCb, this);
+       evas_object_data_set(__pv->__obj, WKEY_VIEW_INSTANCE, this);
+       evas_object_event_callback_add(__pv->__obj, EVAS_CALLBACK_DEL, __WViewImpl::__objDelCb, this);
        //
        // Do not place this before "evas_object_event_callback_add",
        // The reason is that if additional del callback is added at child class, it should be called first to keep state the class object is still alive.
@@ -153,9 +155,9 @@ bool WView::create( Evas_Object* parent, void* viewParam )
 
 void WView::destroy()
 {
-       if(__pv->__obj) {
-               if( getNaviframe() ) {
-                       elm_object_item_del( __pv->__naviItem );
+       if (__pv->__obj) {
+               if (getNaviframe()) {
+                       elm_object_item_del(__pv->__naviItem);
                } else {
                        evas_object_del(__pv->__obj);
                }
@@ -166,79 +168,79 @@ void WView::destroy()
        }
 }
 
-Evas_ObjectWView::getEvasObj()
+Evas_Object *WView::getEvasObj()
 {
        return __pv->__obj;
 }
 
-void WView::setName(const charname)
+void WView::setName(const char *name)
 {
-       if__pv->__name) {
-               free( __pv->__name);
+       if (__pv->__name) {
+               free(__pv->__name);
                __pv->__name = NULL;
        }
-       if( name ) {
+       if (name) {
                size_t len = strlen(name) + 1;
-               __pv->__name = (char*)malloc(len);
-               strncpy( __pv->__name, name, len);
+               __pv->__name = (char *)malloc(len);
+               strncpy(__pv->__name, name, len);
        }
 }
 
-const charWView::getName()
+const char *WView::getName()
 {
        return __pv->__name;
 }
 
-void WView::setTitle( const char* title )
+void WView::setTitle(const char *title)
 {
-       if__pv->__title) {
-               free( __pv->__title);
+       if (__pv->__title) {
+               free(__pv->__title);
                __pv->__title = NULL;
        }
-       if( title ) {
+       if (title) {
                size_t len = strlen(title) + 1;
-               __pv->__title = (char*)malloc(len);
-               strncpy( __pv->__title, title, len);
+               __pv->__title = (char *)malloc(len);
+               strncpy(__pv->__title, title, len);
        }
 }
-const charWView::getTitle()
+const char *WView::getTitle()
 {
        return __pv->__title;
 }
 
 std::weak_ptr<IWUiObject> WView::getWeakPtr()
 {
-       if( __pv->__selfPtr ) {
+       if (__pv->__selfPtr) {
                return std::weak_ptr<IWUiObject>(*__pv->__selfPtr);
        }
-       __pv->__selfPtr = new std::shared_ptr<IWUiObject>( this,[](IWUiObject* p){} );
+       __pv->__selfPtr = new std::shared_ptr<IWUiObject>(this, [](IWUiObject *p){});
        return std::weak_ptr<IWUiObject>(*__pv->__selfPtr);
 }
 
-void WView::setOnCreate( const std::function<Evas_Object* (Evas_Object*, void*)>& handlerFunc )
+void WView::setOnCreate(const std::function<Evas_Object *(Evas_Object *, void *)>& handlerFunc)
 {
        __pv->__createHandler = handlerFunc;
 }
 
-void WView::setOnPushed( const std::function<void (Elm_Object_Item*)>& handlerFunc )
+void WView::setOnPushed(const std::function<void(Elm_Object_Item *)>& handlerFunc)
 {
        __pv->__pushedHandler = handlerFunc;
 }
 
 bool WView::popOut()
 {
-       ifgetEvasObj() == NULL) {
+       if (getEvasObj() == NULL) {
                WWARNING("Not created view! No Evas Object!");
                return false;
        }
-       ifgetNaviframe() == NULL) {
+       if (getNaviframe() == NULL) {
                WWARNING("Not pushed to naviframe!");
                return false;
        }
 
        destroyPopup(); // Before popping out view, pop-up is destroyed, if it has.Because pop-up is disappeared too late.
 
-       if( __pv->__naviItem != elm_naviframe_top_item_get(getNaviframe()->getEvasObj()) ) {
+       if (__pv->__naviItem != elm_naviframe_top_item_get(getNaviframe()->getEvasObj())) {
                elm_object_item_del(__pv->__naviItem);
                return true;
        }
@@ -248,7 +250,7 @@ bool WView::popOut()
 }
 
 
-WWindowWView::getWindow()
+WWindow *WView::getWindow()
 {
        return __pv->__window;
 }
@@ -258,58 +260,58 @@ bool WView::onPop()
        return true;
 }
 
-WNaviframeWView::getNaviframe()
+WNaviframe *WView::getNaviframe()
 {
-       if__pv->__naviframe == NULL) {
+       if (__pv->__naviframe == NULL) {
                WWARNING("naviframe does not exist!");
        }
 
        return __pv->__naviframe;
 }
 
-Elm_Object_ItemWView::getNaviItem()
+Elm_Object_Item *WView::getNaviItem()
 {
-       if__pv->__naviItem == NULL) {
+       if (__pv->__naviItem == NULL) {
                WWARNING("naviItem does not exist!");
        }
 
        return __pv->__naviItem;
 }
 
-void WView::onPushed(Elm_Object_ItemnaviItem)
+void WView::onPushed(Elm_Object_Item *naviItem)
 {
-
 }
 
-Elm_Object_Item* WView::onPushToNaviframe( Evas_Object* naviFrame)
+Elm_Object_Item *WView::onPushToNaviframe(Evas_Object *naviFrame)
 {
        return NULL;
 }
 
 
-Evas_Object* WView::onCreate( Evas_Object* parent, void* viewParam )
+Evas_Object *WView::onCreate(Evas_Object *parent, void *viewParam)
 {
-       Evas_Objectlayout = elm_layout_add(parent);
+       Evas_Object *layout = elm_layout_add(parent);
        evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
 
-       charpath = app_get_resource_path();
-       if( path == NULL ) {
-               WERROR("Failed to get resource path=NULL");
+       char *path = app_get_resource_path();
+       if (path == NULL) {
+               WERROR("Failed to get resource path = NULL");
                return layout;
        }
        std::string edjPath(path);
        free(path);
        edjPath += "edje/app-assist-efl.edj";
 
-       ifelm_layout_file_set(layout, edjPath.c_str(), "default-view") == EINA_TRUE) {
-               Evas_Objectrect = evas_object_rectangle_add(evas_object_evas_get(layout));
+       if (elm_layout_file_set(layout, edjPath.c_str(), "default-view") == EINA_TRUE) {
+               Evas_Object *rect = evas_object_rectangle_add(evas_object_evas_get(layout));
                evas_object_color_set(rect, rand() % 256, rand() % 256, rand() % 256, 255);
                evas_object_size_hint_weight_set(rect, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
                evas_object_size_hint_align_set(rect, EVAS_HINT_FILL, EVAS_HINT_FILL);
 
                elm_object_part_content_set(layout, "rect", rect);
-               if( getName() != NULL )
+               if (getName() != NULL) {
                        elm_object_part_text_set(layout, "name", getName());
+               }
 
        } else {
                WERROR("Fail to set layout. Check EDJ file(%s)", edjPath.c_str());
@@ -322,17 +324,18 @@ Evas_Object* WView::onCreate( Evas_Object* parent, void* viewParam )
 
 void WView::onDestroy()
 {
-
 }
 
-bool WView::enableMoreButton( Elm_Object_Item* naviItem, Evas_Smart_Cb clickedCb, void* userData )
+bool WView::enableMoreButton(Elm_Object_Item *naviItem, Evas_Smart_Cb clickedCb, void *userData)
 {
-       if( getNaviframe() == NULL ) {
+       if (getNaviframe() == NULL) {
                WERROR("naviframe is not set");
                return false;
        }
-       Evas_Object *btn = elm_button_add( getNaviframe()->getEvasObj() );
-       if (!btn) return false;
+       Evas_Object *btn = elm_button_add(getNaviframe()->getEvasObj());
+       if (!btn) {
+               return false;
+       }
        elm_object_style_set(btn, "naviframe/more/default");
        evas_object_show(btn);
        evas_object_smart_callback_add(btn, "clicked", clickedCb, userData);
@@ -340,39 +343,42 @@ bool WView::enableMoreButton( Elm_Object_Item* naviItem, Evas_Smart_Cb clickedCb
        return true;
 }
 
-void WView::attachPopup( WControl* popup )
+void WView::attachPopup(WControl *popup)
 {
        // If the pop-up has been already created, the following statement will just return without creating pop-up.
-       Evas_Object* parent = WView_getWindowBaseLayoutEvasObj( this );
-       if( parent == NULL ) {
+       Evas_Object *parent = WView_getWindowBaseLayoutEvasObj(this);
+       if (parent == NULL) {
                WERROR("Parent is NULL! Fail to attach popup");
                return;
        }
        // Base layout should be parent.
        // If the window is parent, the pop-up is displayed bottom of the screen and keyboard overlaps and hides it, if the pop-up has entry field.
-       popup->create( parent, NULL );
+       popup->create(parent, NULL);
 
        // destroy old popup after new popup created, because of edit field of the view re-focusing issue related to IME.
        destroyPopup();
 
-       if( __pv->__popupMonitor == NULL)
+       if (__pv->__popupMonitor == NULL) {
                __pv->__popupMonitor = new std::weak_ptr<IWUiObject>;
+       }
        *__pv->__popupMonitor = popup->getWeakPtr();
 }
 
 void WView::destroyPopup()
 {
-       if( __pv->__popupMonitor == NULL ) return;
+       if (__pv->__popupMonitor == NULL) {
+               return;
+       }
 
-       if( auto p = __pv->__popupMonitor->lock() ) {
+       if (auto p = __pv->__popupMonitor->lock()) {
                p->destroy();
                __pv->__popupMonitor->reset();
        }
 }
 
-bool WView::__callPushedHandlerFunc(Elm_Object_ItemnaviItem)
+bool WView::__callPushedHandlerFunc(Elm_Object_Item *naviItem)
 {
-       if( __pv->__pushedHandler ) {
+       if (__pv->__pushedHandler) {
                __pv->__pushedHandler(naviItem);
                return true;
        }
@@ -385,14 +391,14 @@ void WView::__destroy()
        delete this;
 }
 
-WView* WView_getInstanceFromEvasObj(Evas_Object* obj)
+WView *WView_getInstanceFromEvasObj(Evas_Object *obj)
 {
-       return (WView*)evas_object_data_get(obj, WKEY_VIEW_INSTANCE);
+       return (WView *)evas_object_data_get(obj, WKEY_VIEW_INSTANCE);
 }
 
-Evas_Object* WView_getWindowBaseLayoutEvasObj( WView* view )
+Evas_Object *WView_getWindowBaseLayoutEvasObj(WView *view)
 {
-       if( view->getWindow() ) {
+       if (view->getWindow()) {
                return view->getWindow()->getBaseLayoutEvasObj();
        } else {
                WERROR("Fail to get base layout");
@@ -400,9 +406,9 @@ Evas_Object* WView_getWindowBaseLayoutEvasObj( WView* view )
        }
 }
 
-Evas_Object* WView_getWindowEvasObj( WView* view )
+Evas_Object *WView_getWindowEvasObj(WView *view)
 {
-       if( view->getWindow() ) {
+       if (view->getWindow()) {
                return view->getWindow()->getEvasObj();
        } else {
                WERROR("Fail to get window evas object");
@@ -410,14 +416,14 @@ Evas_Object* WView_getWindowEvasObj( WView* view )
        }
 }
 
-void WView_setContainerProperties( WView* view, WWindow* win, WNaviframe* naviframe)
+void WView_setContainerProperties(WView *view, WWindow *win, WNaviframe *naviframe)
 {
        view->__pv->__window = win;
        view->__pv->__naviframe = naviframe;
 }
 
 
-void WView_setContainerNaviItemProperty( WView* view, Elm_Object_Item* item )
+void WView_setContainerNaviItemProperty(WView *view, Elm_Object_Item *item)
 {
        view->__pv->__naviItem = item;
 }
index 5e55b93..4148a23 100644 (file)
 class __WWindowImpl
 {
 public:
-       __WWindowImpl(const charinName, Elm_Win_Type inWinType);
-       __WWindowImpl(Evas_Object* win, Evas_Object* conform, Evas_Object* baseLayout);
+       __WWindowImpl(const char *inName, Elm_Win_Type inWinType);
+       __WWindowImpl(Evas_Object *win, Evas_Object *conform, Evas_Object *baseLayout);
        ~__WWindowImpl();
 public:
        //
-       Evas_Object__win;
-       Evas_Object__baseLayout;
-       Evas_Object__conformant;
-       IWUiObject__baseObj;
+       Evas_Object *__win;
+       Evas_Object *__baseLayout;
+       Evas_Object *__conformant;
+       IWUiObject *__baseObj;
        std::string __name;
        Elm_Win_Type __winType;
-       std::function<Evas_Object()> __createWinHandler;
-       std::function<Evas_Object* (Evas_Object*, Evas_Object** )> __createBaseLayoutHandler;
+       std::function<Evas_Object *()> __createWinHandler;
+       std::function<Evas_Object *(Evas_Object *, Evas_Object **)> __createBaseLayoutHandler;
        bool __owner;
 
-       static void __delReqCb( void* data, Evas_Object* obj, void* event_info);
-       static void __objDelCb( void* data, Evas* evas, Evas_Object* obj, void* event_info);
+       static void __delReqCb(void *data, Evas_Object *obj, void *event_info);
+       static void __objDelCb(void *data, Evas *evas, Evas_Object *obj, void *event_info);
 };
 
-__WWindowImpl::__WWindowImpl(const charname, Elm_Win_Type winType):
+__WWindowImpl::__WWindowImpl(const char *name, Elm_Win_Type winType):
        __win(NULL),
        __baseLayout(NULL),
        __conformant(NULL),
@@ -57,11 +57,11 @@ __WWindowImpl::__WWindowImpl(const char* name, Elm_Win_Type winType):
        __createBaseLayoutHandler(NULL),
        __owner(true)
 {
-       WASSERT( name );
+       WASSERT(name);
        __name = name;
 }
 
-__WWindowImpl::__WWindowImpl(Evas_Object* win, Evas_Object* conform, Evas_Object* baseLayout):
+__WWindowImpl::__WWindowImpl(Evas_Object *win, Evas_Object *conform, Evas_Object *baseLayout):
        __win(win),
        __baseLayout(baseLayout),
        __conformant(conform),
@@ -72,44 +72,46 @@ __WWindowImpl::__WWindowImpl(Evas_Object* win, Evas_Object* conform, Evas_Object
        __createBaseLayoutHandler(NULL),
        __owner(false)
 {
-       if(win) {
+       if (win) {
                __winType = elm_win_type_get(win);
                const char *title = elm_win_title_get(win);
-               if(title)
+               if (title) {
                        __name = title;
-               evas_object_data_set( __win, WKEY_WINDOW_INSTANCE, this ); // ?
+               }
+               evas_object_data_set(__win, WKEY_WINDOW_INSTANCE, this); // ?
        }
 }
 
 __WWindowImpl::~__WWindowImpl()
 {
-       if(__win && !__owner)
-               evas_object_data_del( __win, WKEY_WINDOW_INSTANCE);
+       if (__win && !__owner) {
+               evas_object_data_del(__win, WKEY_WINDOW_INSTANCE);
+       }
 }
 
 
-void __WWindowImpl::__delReqCb( void* data, Evas_Object* obj, void* event_info)
+void __WWindowImpl::__delReqCb(void *data, Evas_Object *obj, void *event_info)
 {
        WHIT();
        elm_exit();
 }
-void __WWindowImpl::__objDelCb( void* data, Evas* evas, Evas_Object* obj, void* event_info)
+void __WWindowImpl::__objDelCb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
 {
        WHIT();
 
-       auto win = (WWindow*)data;
+       auto win = (WWindow *)data;
 
        win->onDestroy();
        delete win;
 }
 
 
-WWindow::WWindow(const charname, Elm_Win_Type winType)
+WWindow::WWindow(const char *name, Elm_Win_Type winType)
 {
        __pv = new __WWindowImpl(name, winType);
 }
 
-WWindow::WWindow(Evas_Object* win, Evas_Object* conform, Evas_Object* baseLayout)
+WWindow::WWindow(Evas_Object *win, Evas_Object *conform, Evas_Object *baseLayout)
 {
        __pv = new __WWindowImpl(win, conform, baseLayout);
 }
@@ -120,36 +122,38 @@ WWindow::~WWindow()
        delete __pv;
 }
 
-const charWWindow::getClassName()
+const char *WWindow::getClassName()
 {
        return __CLASS_NAME;
 }
 
 bool WWindow::create()
 {
-       if(__pv->__win || !__pv->__owner) {
+       if (__pv->__win || !__pv->__owner) {
                WDEBUG("Already created!");
                return true;
        }
 
-       Evas_Objectwin = NULL;
-       if( __pv->__createWinHandler )
+       Evas_Object *win = NULL;
+       if (__pv->__createWinHandler) {
                win = __pv->__createWinHandler();
-       else
+       } else {
                win = onCreateWin();
+       }
        __pv->__win = win;
-       if( win ) {
-               Evas_Objectcf = NULL;
-               if(__pv->__createBaseLayoutHandler)
-                       __pv->__baseLayout = __pv->__createBaseLayoutHandler(win,&cf);
-               else
+       if (win) {
+               Evas_Object *cf = NULL;
+               if (__pv->__createBaseLayoutHandler) {
+                       __pv->__baseLayout = __pv->__createBaseLayoutHandler(win, &cf);
+               } else {
                        __pv->__baseLayout = onCreateBaseLayout(win, &cf);
+               }
                __pv->__conformant = cf;
-               evas_object_data_set( win, WKEY_WINDOW_INSTANCE, this );
-               evas_object_smart_callback_add( win, "delete,request", __WWindowImpl::__delReqCb, this);
-               evas_object_event_callback_add( win, EVAS_CALLBACK_DEL, __WWindowImpl::__objDelCb, this);
+               evas_object_data_set(win, WKEY_WINDOW_INSTANCE, this);
+               evas_object_smart_callback_add(win, "delete,request", __WWindowImpl::__delReqCb, this);
+               evas_object_event_callback_add(win, EVAS_CALLBACK_DEL, __WWindowImpl::__objDelCb, this);
 
-               evas_object_show( win );
+               evas_object_show(win);
 
                return true;
        } else {
@@ -159,8 +163,8 @@ bool WWindow::create()
 
 void WWindow::destroy()
 {
-       if(__pv->__owner) {
-               if__pv->__win) {
+       if (__pv->__owner) {
+               if (__pv->__win) {
                        evas_object_del(__pv->__win);
                        // Do not leave any code here.
                        // After executing upper statement "evas_object_del", this object will be deleted at evas object deletion callback!
@@ -178,58 +182,58 @@ bool WWindow::isOwner() const
        return __pv->__owner;
 }
 
-Evas_ObjectWWindow::getEvasObj()
+Evas_Object *WWindow::getEvasObj()
 {
        return __pv->__win;
 }
 
-Evas_ObjectWWindow::getBaseLayoutEvasObj()
+Evas_Object *WWindow::getBaseLayoutEvasObj()
 {
        return __pv->__baseLayout;
 }
 
-Evas_ObjectWWindow::getConformantEvasObj()
+Evas_Object *WWindow::getConformantEvasObj()
 {
        return __pv->__conformant;
 }
 
-bool WWindow::attachBaseUiObject( IWUiObject* baseObj, void* creationParam )
+bool WWindow::attachBaseUiObject(IWUiObject *baseObj, void *creationParam)
 {
+       WASSERT(__pv->__baseObj == NULL);
 
-       WASSERT( __pv->__baseObj == NULL);
-
-       if( baseObj->create( __pv->__baseLayout, creationParam) == false ) {
+       if (baseObj->create(__pv->__baseLayout, creationParam) == false) {
                return false;
        }
 
        __pv->__baseObj = baseObj;
 
-       evas_object_data_set( baseObj->getEvasObj(), WKEY_WINDOW_INSTANCE, this );
+       evas_object_data_set(baseObj->getEvasObj(), WKEY_WINDOW_INSTANCE, this);
 
        return true;
 }
 
-IWUiObjectWWindow::getBaseUiObject()
+IWUiObject *WWindow::getBaseUiObject()
 {
        return __pv->__baseObj;
 }
 
-IWUiObjectWWindow::detachBaseUiObject()
+IWUiObject *WWindow::detachBaseUiObject()
 {
-       IWUiObjectobj = __pv->__baseObj;
+       IWUiObject *obj = __pv->__baseObj;
        __pv->__baseObj = NULL;
        return obj;
 }
 
 void WWindow::destroyBaseUiObject()
 {
-       if( __pv->__baseObj )
+       if (__pv->__baseObj) {
                __pv->__baseObj->destroy();
+       }
 
        __pv->__baseObj = NULL;
 }
 
-const charWWindow::getName()
+const char *WWindow::getName()
 {
        return __pv->__name.c_str();
 }
@@ -238,64 +242,62 @@ Elm_Win_Type WWindow::getWinType()
        return __pv->__winType;
 }
 
-void WWindow::setOnCreateWin( const std::function<Evas_Object* ()>& handlerFunc )
+void WWindow::setOnCreateWin(const std::function<Evas_Object *()>& handlerFunc)
 {
        __pv->__createWinHandler = handlerFunc;
 }
-void WWindow::setOnCreateBaseLayout( const std::function<Evas_Object* (Evas_Object*, Evas_Object** )>& handlerFunc )
+void WWindow::setOnCreateBaseLayout(const std::function<Evas_Object *(Evas_Object *, Evas_Object**)>& handlerFunc)
 {
        __pv->__createBaseLayoutHandler = handlerFunc;
-
 }
 
-Evas_ObjectWWindow::onCreateWin()
+Evas_Object *WWindow::onCreateWin()
 {
-       Evas_Object* win = elm_win_add( NULL, getName(), getWinType() );
-       ifwin == NULL) {
+       Evas_Object *win = elm_win_add(NULL, getName(), getWinType());
+       if (win == NULL) {
                WERROR("Fail to create win!");
                return NULL;
        }
 
-       elm_win_title_set( win, getName() );
-       elm_win_conformant_set( win, EINA_TRUE);
-       elm_win_autodel_set( win, EINA_TRUE);
-       if( elm_win_wm_rotation_supported_get(win)) {
-               int rotation[4] = {0,90,180,270};
-               elm_win_wm_rotation_available_rotations_set( win, (const int*)(&rotation), 4);
-
+       elm_win_title_set(win, getName());
+       elm_win_conformant_set(win, EINA_TRUE);
+       elm_win_autodel_set(win, EINA_TRUE);
+       if (elm_win_wm_rotation_supported_get(win)) {
+               int rotation[4] = {0, 90, 180, 270};
+               elm_win_wm_rotation_available_rotations_set(win, (const int *)(&rotation), 4);
        }
-       elm_win_indicator_mode_set( win, ELM_WIN_INDICATOR_SHOW);
+       elm_win_indicator_mode_set(win, ELM_WIN_INDICATOR_SHOW);
        elm_win_indicator_opacity_set(win, ELM_WIN_INDICATOR_OPAQUE);
 
 
        return win;
 }
 
-Evas_Object* WWindow::onCreateBaseLayout( Evas_Object* win, Evas_Object** outConformant )
+Evas_Object *WWindow::onCreateBaseLayout(Evas_Object *win, Evas_Object **outConformant)
 {
-       Evas_Object* bg = elm_bg_add( win );
+       Evas_Object *bg = elm_bg_add(win);
 
-       evas_object_size_hint_weight_set( bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       elm_win_resize_object_add( win, bg);
+       evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_win_resize_object_add(win, bg);
        evas_object_show(bg);
 
        // If window has no conformant object, ug creation is failed.
-       Evas_Object* cf = elm_conformant_add( win);
+       Evas_Object *cf = elm_conformant_add(win);
 
-       evas_object_size_hint_weight_set( cf, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       elm_win_resize_object_add( win, cf);
+       evas_object_size_hint_weight_set(cf, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_win_resize_object_add(win, cf);
        evas_object_show(cf);
 
-       Evas_Object* cf_bg = elm_bg_add( cf);
-       elm_object_style_set( cf_bg, "indicator/headerbg");
-       elm_object_part_content_set( cf, "elm.swallow.indicator_bg", cf_bg);
+       Evas_Object *cf_bg = elm_bg_add(cf);
+       elm_object_style_set(cf_bg, "indicator/headerbg");
+       elm_object_part_content_set(cf, "elm.swallow.indicator_bg", cf_bg);
        evas_object_show(cf_bg);
 
 
-       Evas_Object* layout = elm_layout_add( cf);
-       elm_layout_theme_set( layout, "layout", "application", "default");
-       evas_object_size_hint_weight_set( layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-       elm_object_content_set( cf, layout);
+       Evas_Object *layout = elm_layout_add(cf);
+       elm_layout_theme_set(layout, "layout", "application", "default");
+       evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       elm_object_content_set(cf, layout);
 
        evas_object_show(layout);
 
@@ -306,6 +308,5 @@ Evas_Object* WWindow::onCreateBaseLayout( Evas_Object* win, Evas_Object** outCon
 
 void WWindow::onDestroy()
 {
-
 }