1 // Copyright 2013 Samsung Electronics. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef ewk_settings_private_h
6 #define ewk_settings_private_h
11 #include <content/public/common/web_preferences.h>
12 #include "common/web_preferences_efl.h"
13 #include "public/ewk_settings_internal.h"
17 Ewk_Settings(Evas_Object* evas_object,
18 const content::WebPreferences& preferences);
21 const char* defaultTextEncoding() const {
22 return m_preferences.default_encoding.c_str();
24 void setDefaultTextEncoding(const char*);
25 bool autofillPasswordForm() const { return m_autofillPasswordForm; }
26 void setAutofillPasswordForm(bool enable) { m_autofillPasswordForm = enable; }
27 bool formCandidateData() const { return m_formCandidateData; }
28 void setFormCandidateData(bool enable) { m_formCandidateData = enable; }
29 bool autofillProfileForm() const { return m_autofillProfileForm; }
30 void setAutofillProfileForm(bool enable) { m_autofillProfileForm = enable; }
31 bool textSelectionEnabled() const { return m_textSelectionEnabled; }
32 void setTextSelectionEnabled(bool enable) { m_textSelectionEnabled = enable; }
33 bool autoClearTextSelection() const { return m_autoClearTextSelection; }
34 void setAutoClearTextSelection(bool enable) { m_autoClearTextSelection = enable; }
35 bool autoSelectWord() const { return m_autoSelectWord; }
36 void setAutoSelectWord(bool enable) { m_autoSelectWord = enable; }
37 bool edgeEffectEnabled() const { return m_edgeEffectEnabled; }
38 void setEdgeEffectEnabled(bool enable);
39 void setTextZoomEnabled(bool enable);
40 bool textZoomEnabled() const { return m_preferences.text_zoom_enabled; }
41 void setLoadRemoteImages(bool loadRemoteImages) { m_loadRemoteImages = loadRemoteImages; }
42 bool loadRemoteImages() const { return m_loadRemoteImages; }
43 void setCurrentLegacyFontSizeMode(Ewk_Legacy_Font_Size_Mode mode);
44 Ewk_Legacy_Font_Size_Mode currentLegacyFontSizeMode() const { return m_currentLegacyFontSizeMode; }
45 void setPasteImageUriEnabled(bool enable) { m_pasteImageUriEnabled = enable; }
46 bool pasteImageUriEnabled() const {return m_pasteImageUriEnabled;}
47 bool defaultKeypadEnabled() const { return m_defaultKeypadEnabled; }
48 void setEnableDefaultKeypad(bool flag) { m_defaultKeypadEnabled = flag; }
49 bool useKeyPadWithoutUserAction() const { return m_useKeyPadWithoutUserAction; }
50 void setUseKeyPadWithoutUserAction(bool enable) { m_useKeyPadWithoutUserAction = enable; }
51 bool textStyleStateState() const { return m_textStyleState; }
52 void setTextStyleStateState(bool enable) { m_textStyleState = enable; }
53 void setSpdyEnabled(bool flag);
54 void setDetectContentsAutomatically(bool enable) { m_detectContentsAutomatically = enable; }
55 bool detectContentsAutomatically() const { return m_detectContentsAutomatically; }
57 Evas_Object* getEvasObject() { return m_evas_object; }
59 content::WebPreferences& getPreferences() { return m_preferences; }
60 const content::WebPreferences& getPreferences() const { return m_preferences; }
62 WebPreferencesEfl& getPreferencesEfl() { return m_preferences_efl; }
63 const WebPreferencesEfl& getPreferencesEfl() const { return m_preferences_efl; }
65 void setCacheBuilderEnabled(bool enable) { m_cacheBuilderEnabled = enable; }
67 /* ewk_extra_features related */
68 void setLongPressEnabled(bool enable) { m_longPressEnabled = enable; }
69 bool getLongPressEnabled() const { return m_longPressEnabled; }
70 void setLinkMagnifierEnabled(bool enable) { m_linkMagnifierEnabled = enable; }
71 bool getLinkMagnifierEnabled() const { return m_linkMagnifierEnabled; }
72 void setDetectContentsEnabled(bool enable) { m_detectContentsEnabled = enable; }
73 bool getDetectContentsEnabled() const { return m_detectContentsEnabled; }
74 void setWebLoginEnabled(bool enable) { m_webLoginEnabled = enable; }
75 bool getWebLoginEnabled() const { return m_webLoginEnabled; }
76 void setDoubleTapEnabled(bool enable) { m_doubleTapEnabled = enable; }
77 bool getDoubleTapEnabled() const { return m_doubleTapEnabled; }
78 void setZoomEnabled(bool enable) { m_zoomEnabled = enable; }
79 bool getZoomEnabled() const { return m_zoomEnabled; }
80 void setOpenPanelEnabled(bool enable) { m_openPanelEnabled = enable; }
81 bool getOpenPanelEnabled() const { return m_openPanelEnabled; }
82 void setAllowRestrictedURLEnabled(bool enable) { m_allowRestrictedURL = enable; }
83 bool getAllowRestrictedURLEnabled() const { return m_allowRestrictedURL; }
84 void setURLBarHideEnabled(bool enable) { m_URLBarHide = enable; }
85 bool getURLBarHideEnabled() const { return m_URLBarHide; }
86 void setLinkEffectEnabled(bool enable) { m_linkEffectEnabled = enable; }
87 bool getLinkEffectEnabled() const { return m_linkEffectEnabled; }
88 void setSwipeToRefreshEnabled(bool enable) {
89 m_swipeToRefreshEnabled = enable;
91 bool getSwipeToRefreshEnabled() const { return m_swipeToRefreshEnabled; }
94 content::WebPreferences m_preferences;
95 WebPreferencesEfl m_preferences_efl;
97 bool m_autofillPasswordForm;
98 bool m_formCandidateData;
99 bool m_autofillProfileForm;
100 bool m_textSelectionEnabled;
101 bool m_autoClearTextSelection;
102 bool m_autoSelectWord;
103 bool m_edgeEffectEnabled;
104 bool m_loadRemoteImages;
105 Ewk_Legacy_Font_Size_Mode m_currentLegacyFontSizeMode;
106 bool m_pasteImageUriEnabled;
107 bool m_defaultKeypadEnabled;
108 bool m_useKeyPadWithoutUserAction;
109 bool m_textStyleState;
110 bool m_detectContentsAutomatically;
112 Evas_Object* m_evas_object;
113 bool m_cacheBuilderEnabled;
115 /* ewk_extra_features related */
116 bool m_longPressEnabled;
117 bool m_linkMagnifierEnabled;
118 bool m_detectContentsEnabled;
119 bool m_webLoginEnabled;
120 bool m_doubleTapEnabled;
122 bool m_openPanelEnabled;
123 bool m_allowRestrictedURL;
125 bool m_linkEffectEnabled;
126 bool m_swipeToRefreshEnabled;
129 #endif // ewk_settings_private_h