This patch implements EWK API for window features.
This is code migration from m34 beta to DEV,
Origin patch patch info:
http://suprem.sec.samsung.net/gerrit/#/c/6721
and http://suprem.sec.samsung.net/gerrit/#/c/6726
Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=7782
Reviewed by: Antonio Gomes
Change-Id: I1b9cdcc0d4435073b32a547b95e81256c65d335f
Signed-off-by: zhishun.zhou <zhishun.zhou@samsung.com>
* THE POSSIBILITY OF SUCH DAMAGE.
*/
-#if !defined(EWK_BRINGUP)
#include "ewk_window_features.h"
#include <../impl/API/ewk_window_features_private.h>
#include "eweb_view.h"
-void _EWK_Window_Features::setToolbarVisible(bool toolbar_visible)
+void _Ewk_Window_Features::setToolbarVisible(bool toolbar_visible)
{
- toolBar_Visible_ = toolbar_visible;
+ toolbar_visible_ = toolbar_visible;
view_->SmartCallback<EWebViewCallbacks::ToolbarVisible>().call(&toolbar_visible);
}
-void _EWK_Window_Features::setStatusBarVisible(bool statusbar_visible)
+void _Ewk_Window_Features::setStatusBarVisible(bool statusbar_visible)
{
- statusBar_Visible_ = statusbar_visible;
+ statusbar_visible_ = statusbar_visible;
view_->SmartCallback<EWebViewCallbacks::StatusBarVisible>().call(&statusbar_visible);
}
-void _EWK_Window_Features::setMenuBarVisible(bool menubar_visible)
+void _Ewk_Window_Features::setMenuBarVisible(bool menubar_visible)
{
- menuBar_Visible_ = menubar_visible;
+ menubar_visible_ = menubar_visible;
view_->SmartCallback<EWebViewCallbacks::MenuBarVisible>().call(&menubar_visible);
}
-void _EWK_Window_Features::setResizable(bool resizable)
+void _Ewk_Window_Features::setResizable(bool resizable)
{
resizable_ = resizable;
view_->SmartCallback<EWebViewCallbacks::WindowResizable>().call(&resizable);
Eina_Bool ewk_window_features_toolbar_visible_get(const Ewk_Window_Features* window_features)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(window_features, false);
- return window_features->toolBar_Visible_;
+ return window_features->toolbar_visible_;
}
Eina_Bool ewk_window_features_statusbar_visible_get(const Ewk_Window_Features* window_features)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(window_features, false);
- return window_features->statusBar_Visible_;
+ return window_features->statusbar_visible_;
}
Eina_Bool ewk_window_features_scrollbars_visible_get(const Ewk_Window_Features* window_features)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(window_features, false);
- return window_features->scrollBar_Visible_;
+ return window_features->scrollbar_visible_;
}
Eina_Bool ewk_window_features_menubar_visible_get(const Ewk_Window_Features* window_features)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(window_features, false);
- return window_features->menuBar_Visible_;
+ return window_features->menubar_visible_;
}
Eina_Bool ewk_window_features_locationbar_visible_get(const Ewk_Window_Features* window_features)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(window_features, false);
- return window_features->locationBar_Visible_;
+ return window_features->locationbar_visible_;
}
Eina_Bool ewk_window_features_resizable_get(const Ewk_Window_Features* window_features)
Eina_Bool ewk_window_features_fullscreen_get(const Ewk_Window_Features* window_features)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(window_features, false);
- return window_features->fullScreen_;
+ return window_features->fullscreen_;
}
void ewk_window_features_geometry_get(const Ewk_Window_Features* window_features, float* x, float* y, float* width, float* height)
*height = window_features->height_;
}
-#endif
#ifndef ewk_window_features_h
#define ewk_window_features_h
-#if !defined(EWK_BRINGUP)
#include <Eina.h>
#include <Evas.h>
//EwkObject is removed or deprecated
//typedef struct EwkObject Ewk_Window_Features;
-typedef struct _EWK_Window_Features Ewk_Window_Features;
+typedef struct _Ewk_Window_Features Ewk_Window_Features;
/**
* Queries the toolbar visibility of the window feature.
}
#endif
-#endif // EWK_BRINGUP
#endif // ewk_window_features_h
--- /dev/null
+/*
+ * Copyright (C) 2014 Samsung Electronics. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ewk_window_features_private_h
+#define ewk_window_features_private_h
+
+class EWebView;
+
+struct _Ewk_Window_Features{
+ _Ewk_Window_Features(EWebView* ewk_view)
+ : view_(ewk_view)
+ , x_(0), y_(0), width_(0), height_(0), menubar_visible_(true)
+ , statusbar_visible_(true), toolbar_visible_(true), locationbar_visible_(true)
+ , scrollbar_visible_(true), resizable_(true), fullscreen_(false)
+ {
+ }
+
+ ~_Ewk_Window_Features()
+ {
+ }
+
+ void setToolbarVisible(bool toolbar_visible);
+ void setStatusBarVisible(bool statusbar_visible);
+ void setMenuBarVisible(bool menubar_visible);
+ void setResizable(bool resizable);
+
+ EWebView* view_;
+
+ float x_;
+ float y_;
+ float width_;
+ float height_;
+
+ bool menubar_visible_;
+ bool statusbar_visible_;
+ bool toolbar_visible_;
+ bool locationbar_visible_;
+ bool scrollbar_visible_;
+ bool resizable_;
+ bool fullscreen_;
+
+};
+
+#endif //ewk_window_features_private_h
'API/ewk_user_media_private.h',
'API/ewk_web_application_icon_data_private.h',
'API/ewk_web_application_icon_data_private.cc',
+ 'API/ewk_window_features_private.h',
'EdgeEffect.cpp',
'EdgeEffect.h',
'browser/autofill/autofill_manager_delegate_efl.cc',
DECLARE_EWK_VIEW_CALLBACK(FaviconChanged, "favicon,changed", void);
DECLARE_EWK_VIEW_CALLBACK(LoadError, "load,error", Ewk_Error*);
DECLARE_EWK_VIEW_CALLBACK(ProvisionalLoadFailed, "load,provisional,failed", Ewk_Error*);
-DECLARE_EWK_VIEW_CALLBACK(MenuBarVisible, "menubar,visible", bool*);
DECLARE_EWK_VIEW_CALLBACK(NavigationPolicyDecision, "policy,decision,navigation", Ewk_Navigation_Policy_Decision*);
-DECLARE_EWK_VIEW_CALLBACK(StatusBarVisible, "statusbar,visible", bool*);
DECLARE_EWK_VIEW_CALLBACK(TextFound, "text,found", unsigned*);
-DECLARE_EWK_VIEW_CALLBACK(ToolbarVisible, "toolbar,visible", bool*);
DECLARE_EWK_VIEW_CALLBACK(TooltipTextUnset, "tooltip,text,unset", void);
DECLARE_EWK_VIEW_CALLBACK(Vibrate, "vibrate", uint32_t*);
-DECLARE_EWK_VIEW_CALLBACK(WindowResizable, "window,resizable", bool*);
*/
// Note: type 'void' means that no arguments are expected.
#if defined(OS_TIZEN_TV)
DECLARE_EWK_VIEW_CALLBACK(NewWindowNavigationPolicyDecision, "policy,decision,new,window", Ewk_Navigation_Policy_Decision*);
#endif // OS_TIZEN_TV
+
+DECLARE_EWK_VIEW_CALLBACK(MenuBarVisible, "menubar,visible", bool*);
+DECLARE_EWK_VIEW_CALLBACK(StatusBarVisible, "statusbar,visible", bool*);
+DECLARE_EWK_VIEW_CALLBACK(ToolbarVisible, "toolbar,visible", bool*);
+DECLARE_EWK_VIEW_CALLBACK(WindowResizable, "window,resizable", bool*);
+
}
#endif