macro(LinkMagnifierEnabled, linkMagnifierEnabled, Bool, bool, false) \
macro(AutoFittingEnabled, autoFittingEnabled, Bool, bool, true) \
macro(TextStyleStateEnabled, textStyleStateEnabled, Bool, bool, false) \
+ macro(ForceZoomEnabled, forceZoomEnabled, Bool, bool, false) \
\
#else
macro(LinkMagnifierEnabled, linkMagnifierEnabled, Bool, bool, false) \
macro(AutoFittingEnabled, autoFittingEnabled, Bool, bool, true) \
macro(TextStyleStateEnabled, textStyleStateEnabled, Bool, bool, false) \
+ macro(ForceZoomEnabled, forceZoomEnabled, Bool, bool, false) \
\
#endif
constraints.layoutSize = attributes.layoutSize;
constraints.fixedInitialScale = (ViewportArguments::ValueAuto != attributes.initialScale);
+ bool forceZoomEnabled = m_viewImpl->page()->pageGroup()->preferences()->forceZoomEnabled();
+ if (forceZoomEnabled && (fabs(constraints.minimumScale - constraints.maximumScale) < numeric_limits<float>::epsilon())) {
+ constraints.maximumScale = 5.0;
+ constraints.userScalable = true;
+ }
+
bool autoFittingEnabled = m_viewImpl->page()->pageGroup()->preferences()->autoFittingEnabled();
if (autoFittingEnabled)
constraints.initialScale = attributes.minimumScale * attributes.devicePixelRatio;
return settings->preferences()->autoFittingEnabled();
}
+Eina_Bool ewk_settings_force_zoom_set(Ewk_Settings* settings, Eina_Bool enable)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+
+ settings->preferences()->setForceZoomEnabled(enable);
+
+ return true;
+}
+
+Eina_Bool ewk_settings_force_zoom_get(const Ewk_Settings* settings)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
+
+ return settings->preferences()->forceZoomEnabled();
+}
+
Eina_Bool ewk_settings_font_default_size_set(Ewk_Settings* settings, int size)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(settings, false);
EAPI Eina_Bool ewk_settings_auto_fitting_get(const Ewk_Settings *settings);
/**
+ * Requests setting of force zoom.
+ *
+ * @param settings settings object to enable force zoom
+ * @param enable to force zoom
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EAPI Eina_Bool ewk_settings_force_zoom_set(Ewk_Settings *settings, Eina_Bool enable);
+
+/**
+ * Returns the force zoom status.
+ *
+ * @param settings settings object to enable force zoom
+ *
+ * @return @c EINA_TRUE if enable force zoom or @c EINA_FALSE.
+ */
+EAPI Eina_Bool ewk_settings_force_zoom_get(const Ewk_Settings *settings);
+
+/**
* Requests to set the default font size.
*
* @param settings settings object to set the default font size