2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
20 * @brief This is the header file for the %Web class.
22 * This header file contains the declarations of the %Web class.
24 #ifndef _FWEB_CTRL_WEB_H_
25 #define _FWEB_CTRL_WEB_H_
27 #include <FBaseBuffer.h>
28 #include <FBaseResult.h>
29 #include <FBaseString.h>
30 #include <FUiContainer.h>
32 namespace Tizen { namespace Graphics
39 namespace Tizen { namespace Net { namespace Http
42 }}} // Tizen::Net::Http
44 namespace Tizen { namespace Web { namespace Controls
46 class IJavaScriptBridge;
47 class ILoadingListener;
48 class ITextSearchListener;
49 class IWebDownloadListener;
50 class IWebKeypadEventListener;
51 class IWebUiEventListener;
52 class IWebUiEventListenerF;
54 class HitElementResult;
55 class PageNavigationList;
58 }}} // Tizen::Web::Controls
60 namespace Tizen { namespace Web { namespace Controls
65 * @brief This class provides methods for embedding a browser in an application.
69 * The %Web class provides methods for embedding a browser in an application to load and render various types of %Web content. Similar to adding UI controls, the %Web content can be added to the application by adding a %Web control.
71 * For more information on the class features and %Web browser feature limitations, see <a href="../org.tizen.native.appprogramming/html/guide/web/controls_namespace.htm">Web Controls Guide</a> and <a href="../org.tizen.native.appprogramming/html/guide/web/supported_web_features.htm">Supported Features in the Web Control</a>.
73 * The following example demonstrates how to use the %Web class.
75 // Sample code using Form for WebSample.h
80 public Tizen::Ui::Controls::Form
84 virtual ~WebSample(void) {};
90 Tizen::Web::Controls::Web *__pWeb;
93 virtual result OnInitializing(void);
96 // Sample code using Form for WebSample.cpp
97 #include "WebSample.h"
99 using namespace Tizen::Ui;
100 using namespace Tizen::Ui::Controls;
101 using namespace Tizen::Web::Controls;
104 WebSample::OnInitializing(void)
106 result r = E_SUCCESS;
112 __pWeb->Construct(GetClientAreaBounds());
120 // Calls LoadUrl() with the URL of the Web content to display it on the Web control
122 WebSample::LoadUrl(void)
124 Tizen::Base::String url(L"http://www.tizen.org/about/");
126 __pWeb->LoadUrl(url);
131 // Sample code using Window for WebSample.h
137 public Tizen::Ui::Window
141 virtual ~WebSample(void) {};
147 Tizen::Web::Controls::Web *__pWeb;
150 virtual result OnInitializing(void);
153 // Sample code using Window for WebSample.cpp
154 #include "WebSample.h"
156 using namespace Tizen::App;
157 using namespace Tizen::Ui;
158 using namespace Tizen::Ui::Controls;
159 using namespace Tizen::Web::Controls;
162 WebSample::OnInitializing(void)
164 result r = E_SUCCESS;
166 // Constucts a Window
169 Frame *pFrame = UiApp::GetInstance()->GetAppFrame()->GetFrame();
170 SetOwner(pFrame->GetCurrentForm());
173 __pWeb->Construct(GetClientAreaBounds());
182 // Calls LoadUrl() with the URL of the Web content to display it on the Web control
184 WebSample::LoadUrl(void)
186 Tizen::Base::String url(L"http://www.tizen.org/about/");
188 __pWeb->LoadUrl(url);
192 class _OSP_EXPORT_ Web
193 : public Tizen::Ui::Container
197 * The object is not fully constructed after this constructor is called. @n
198 * For full construction, the Construct() method must be called right after calling this constructor.
205 * This destructor overrides Tizen::Base::Object::~Object().
212 * Initializes this instance of the %Web control with the specified parameters.
216 * @privilege %http://tizen.org/privilege/web.service
218 * @return An error code
219 * @param[in] rect The rectangle size of the control
220 * @exception E_SUCCESS The method is successful.
221 * @exception E_SYSTEM The method has failed.
222 * @exception E_INVALID_ARG The specified @c rect is invalid.
223 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
224 * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
226 result Construct(const Tizen::Graphics::Rectangle& rect);
229 * Initializes this instance of the %Web control with the specified parameters.
233 * @privilege %http://tizen.org/privilege/web.service
235 * @return An error code
236 * @param[in] rect The rectangle size of the control
237 * @exception E_SUCCESS The method is successful.
238 * @exception E_SYSTEM The method has failed.
239 * @exception E_INVALID_ARG The specified @c rect is invalid.
240 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
241 * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method.
243 result Construct(const Tizen::Graphics::FloatRectangle& rect);
246 * Loads the resource specified by the URL.
250 * @privilege %http://tizen.org/privilege/web.service
252 * @param[in] url The resource to load
253 * @exception E_SUCCESS The method is successful.
254 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
255 * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
256 * @remarks The specific error code can be accessed using the GetLastResult() method.
258 void LoadUrl(const Tizen::Base::String& url);
261 * Loads the resource specified by the URL with a given header of HTTP request.
265 * @privilege %http://tizen.org/privilege/web.service
267 * @return An error code
268 * @param[in] url The resource to load
269 * @param[in] header The header of the HTTP request
270 * @exception E_SUCCESS The method is successful.
271 * @exception E_INVALID_HEADER The header object does not contain any header fields.
272 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
273 * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
275 result LoadUrl(const Tizen::Base::String& url, const Tizen::Net::Http::HttpHeader& header);
278 * Loads the resource specified by the URL with a given header and body of HTTP request. @n
279 * The header must include content-type entity-header field that is needed to check mime-type of the message body.
283 * @privilege %http://tizen.org/privilege/web.service
285 * @return An error code
286 * @param[in] url The resource to load
287 * @param[in] header The header of the HTTP request
288 * @param[in] body The message body of the HTTP request
289 * @exception E_SUCCESS The method is successful.
290 * @exception E_INVALID_HEADER The header object does not contain any header fields.
291 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
292 * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
294 result LoadUrlWithPostRequest(const Tizen::Base::String& url, const Tizen::Net::Http::HttpHeader& header, const Tizen::Base::ByteBuffer& body);
297 * Loads the content of the specified buffer.
301 * @privilege %http://tizen.org/privilege/web.service
303 * @param[in] baseUrl The uniform resource locator (URL) of the content
304 * @param[in] content The content
305 * @param[in] mime The MIME type of the content
306 * @param[in] encoding The <a href= "../org.tizen.native.appprogramming/html/guide/web/supported_web_features.htm">text encoding</a> of the content
307 * @exception E_SUCCESS The method is successful.
308 * @exception E_INVALID_ARG The content buffer is empty. @b Since: @b 2.1
309 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
310 * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
311 * @remarks The specific error code can be accessed using the GetLastResult() method.
313 void LoadData(const Tizen::Base::String& baseUrl, const Tizen::Base::ByteBuffer& content, const Tizen::Base::String& mime, const Tizen::Base::String& encoding = "UTF-8");
316 * Stops the current loading operation.
320 * @privilege %http://tizen.org/privilege/web.service
322 * @exception E_SUCCESS The method is successful.
323 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
324 * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
325 * @remarks The specific error code can be accessed using the GetLastResult() method.
327 void StopLoading(void);
330 * Reloads the current page.
334 * @privilege %http://tizen.org/privilege/web.service
336 * @exception E_SUCCESS The method is successful.
337 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
338 * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
339 * @remarks The specific error code can be accessed using the GetLastResult() method.
344 * Checks whether the page is loading.
348 * @return @c true if a page is loading, @n
351 bool IsLoading(void) const;
354 * Checks whether the current %Web control has a back history item.
358 * @return @c true if a back history item exists, @n
361 bool CanGoBack(void) const;
364 * Checks whether the current %Web control has a forward history item.
368 * @return @c true if a forward history item exists, @n
371 bool CanGoForward(void) const;
374 * Goes to the back history of the current %Web control.
378 * @privilege %http://tizen.org/privilege/web.service
380 * @exception E_SUCCESS The method is successful.
381 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
382 * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
383 * @remarks The specific error code can be accessed using the GetLastResult() method.
388 * Goes to the forward history of the current %Web control.
392 * @privilege %http://tizen.org/privilege/web.service
394 * @exception E_SUCCESS The method is successful.
395 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
396 * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
397 * @remarks The specific error code can be accessed using the GetLastResult() method.
399 void GoForward(void);
402 * Gets the backward and forward navigation list of the %Web control.
406 * @return A pointer to PageNavigationList containing the history items of the %Web control
407 * @exception E_SUCCESS The method is successful.
408 * @exception E_SYSTEM The method cannot proceed due to a severe system error.
409 * @remarks The specific error code can be accessed using the GetLastResult() method.
411 Tizen::Web::Controls::PageNavigationList* GetBackForwardListN(void) const;
414 * Searches for a word on the current page. @n
415 * When called again, it searches for the next instance of the word on the page. Set @c searchForward to @c false to search for the word in the backward
420 * @return @c true if the specified @c word is found, @n
422 * @param[in] word The string to search for
423 * @param[in] searchForward Set to @c true to search for the word in the forward direction from the current position, @n
424 * else @c false to search for the word in the backward direction from the current position
426 bool SearchText(const Tizen::Base::String& word, bool searchForward = true);
429 * Sets the new values for the default setting. @n
430 * It fails to change the setting during data load.
434 * @privilege %http://tizen.org/privilege/web.service
436 * @return An error code
437 * @param[in] setting The setting to update
438 * @exception E_SUCCESS The method is successful.
439 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
440 * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
442 result SetSetting(const Tizen::Web::Controls::WebSetting& setting);
445 * Gets the setting of the %Web control.
449 * @return An instance of WebSetting
451 Tizen::Web::Controls::WebSetting GetSetting(void) const;
455 * Gets the information of the element pointed by the specified coordinates.
459 * @return A HitElementResult of the pointed element
460 * @param[in] point The x and y coordinates
461 * @exception E_SUCCESS The method is successful.
462 * @exception E_INVALID_ARG The specified @c point is invalid.
463 * @exception E_UNSUPPORTED_FORMAT The image format is not supported.
464 * @exception E_SYSTEM The method cannot proceed due to a severe system error.
465 * @remarks The specific error code can be accessed using the GetLastResult() method.
467 Tizen::Web::Controls::HitElementResult* GetElementByPointN(const Tizen::Graphics::Point& point) const;
470 * Gets the information of the element pointed by the specified coordinates.
474 * @return A HitElementResult of the pointed element
475 * @param[in] point The x and y coordinates
476 * @exception E_SUCCESS The method is successful.
477 * @exception E_INVALID_ARG The specified @c point is invalid.
478 * @exception E_UNSUPPORTED_FORMAT The image format is not supported.
479 * @exception E_SYSTEM The method cannot proceed due to a severe system error.
480 * @remarks The specific error code can be accessed using the GetLastResult() method.
482 Tizen::Web::Controls::HitElementResult* GetElementByPointN(const Tizen::Graphics::FloatPoint& point) const;
485 * Evaluates the JavaScript string and returns the result.
489 * @privilege %http://tizen.org/privilege/web.service
491 * @return The result of the evaluated JavaScript, @n
492 * else @c null if an error occurs
493 * @param[in] scriptCode The JavaScript code as string
494 * @exception E_SUCCESS The method is successful.
495 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
496 * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
497 * @remarks The specific error code can be accessed using the GetLastResult() method.
499 Tizen::Base::String* EvaluateJavascriptN(const Tizen::Base::String& scriptCode);
502 * Sets the zoom-out level as a ratio.
506 * @return An error code
507 * @param[in] level The zoom-out level @n
508 * The value ranges between @c 0.3 and @c 2.0. When the page view is at its original size, the level is @c 1.0. @n If the
509 * specified level is less than @c 1.0, the page view is reduced. @n If the specified level is greater than @c 1.0, the page view is
511 * @exception E_SUCCESS The method is successful.
512 * @exception E_OUT_OF_RANGE The specified @c level is less than @c 0.3 or greater than @c 2.0.
514 result SetZoomLevel(float level);
517 * Gets the zoom level of a page as a percentage.
521 * @return The value ranges between @c 0.3 and @c 2.0
523 float GetZoomLevel(void) const;
526 * Gets the title of the current page.
530 * @return The title of the current page
532 Tizen::Base::String GetTitle(void) const;
535 * Gets the URL of the current page.
539 * @return The URL of the current page
541 Tizen::Base::String GetUrl(void) const;
544 * Checks whether the specified multipurpose internet mail extensions (MIME) type is supported by %Tizen.
548 * @return @c true if the specified MIME type is supported, @n
550 * @param[in] mime The MIME type
552 bool IsMimeSupported(const Tizen::Base::String& mime) const;
555 * Sets a load event listener.
559 * @privilege %http://tizen.org/privilege/web.service
561 * @param[in] pLoadingListener The listener receives the events that occurs while loading the data
562 * @exception E_SUCCESS The method is successful.
563 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
564 * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
565 * @remarks The specific error code can be accessed using the GetLastResult() method.
567 void SetLoadingListener(Tizen::Web::Controls::ILoadingListener* pLoadingListener);
570 * Sets a download event listener.
574 * @privilege %http://tizen.org/privilege/web.service
576 * @param[in] pDownLoadListener The listener to receive the data from a network incrementally
577 * @exception E_SUCCESS The method is successful.
578 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
579 * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
580 * @remarks The specific error code can be accessed using the GetLastResult() method.
582 void SetDownloadListener(Tizen::Web::Controls::IWebDownloadListener* pDownLoadListener);
585 * Sets the starting point for the text selection block. @n
586 * It sets the selection block around the nearest word bound.
590 * @return An error code
591 * @param[in] startPoint The starting point for the text selection block
592 * @exception E_SUCCESS The method is successful.
593 * @exception E_INVALID_ARG There is nothing to select from the specified starting point.
595 result SetBlockSelectionPosition(const Tizen::Graphics::Point& startPoint);
598 * Sets the starting point for the text selection block. @n
599 * It sets the selection block around the nearest word bound.
603 * @return An error code
604 * @param[in] startPoint The starting point for the text selection block
605 * @exception E_SUCCESS The method is successful.
606 * @exception E_INVALID_ARG There is nothing to select from the specified starting point.
608 result SetBlockSelectionPosition(const Tizen::Graphics::FloatPoint& startPoint);
611 * Releases the currently selected block.
615 * @return An error code
616 * @exception E_SUCCESS The method is successful.
619 result ReleaseBlock(void);
622 * Gets the starting point and the ending point of the selected text block. @n
623 * When the %GetBlockRange() method is called without the selection block, the @c startPoint and @c endPoint have (0,0) values for the x and y coordinates.
627 * @return An error code
628 * @param[out] startPoint The starting point of the selected text block
629 * @param[out] endPoint The ending point of the selected text block
630 * @exception E_SUCCESS The method is successful.
632 result GetBlockRange(Tizen::Graphics::Point& startPoint, Tizen::Graphics::Point& endPoint) const;
635 * Gets the starting point and the ending point of the selected text block. @n
636 * When this method is called without the selection block, the startPoint and endPoint have (0.0,0.0) values for the x and y coordinates.
640 * @return An error code
641 * @param[out] startPoint The starting point of the selected text block
642 * @param[out] endPoint The ending point of the selected text block
643 * @exception E_SUCCESS The method is successful.
645 result GetBlockRange(Tizen::Graphics::FloatPoint& startPoint, Tizen::Graphics::FloatPoint& endPoint) const;
649 * Gets the text of the selected text block.
653 * @return The selected text, @n
654 * else an empty string if there is no selection block
656 Tizen::Base::String GetTextFromBlock(void) const;
659 * Enables or disables the vertical and horizontal scrolls.
663 * @param[in] enable Set to @c true to enable the scrolling of the web page, @n
665 * @exception E_SUCCESS The method is successful.
666 * @remarks This method does not affect javascript touch event.
668 result SetScrollEnabled(bool enable);
672 * Checks whether the web page scroll is enabled.
676 * @return @c true if the web page scroll is enabled, @n
679 bool IsScrollEnabled(void) const;
682 * Registers a user interface (UI) event listener.
686 * @param[in] pUiEventListener The listener to receive the user interface (UI) related events
688 void SetWebUiEventListener(Tizen::Web::Controls::IWebUiEventListener* pUiEventListener);
691 * Registers a user interface (UI) event listener.
695 * @param[in] pUiEventListener The listener to receive the user interface (UI) related events
697 void SetWebUiEventListenerF(Tizen::Web::Controls::IWebUiEventListenerF* pUiEventListener);
700 * Checks whether the %Web control uses private browsing.
704 * @return @c true if private browsing is enabled, @n
707 bool IsPrivateBrowsingEnabled(void) const;
710 * Sets the private browsing and returns the result.
714 * @privilege %http://tizen.org/privilege/web.service
716 * @return The result of setting the private browsing
717 * @param[in] enable Set to @c true to enable private browsing, @n
719 * @exception E_SUCCESS The method is successful.
720 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
721 * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
723 result SetPrivateBrowsingEnabled(bool enable);
726 * Clears the back and forward navigation list.
730 * @privilege %http://tizen.org/privilege/web.service
732 * @return An error code
733 * @exception E_SUCCESS The method is successful.
734 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
735 * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method.
737 * @see CanGoForward()
741 result ClearHistory(void);
744 * Clears the application's cache.
748 * @privilege %http://tizen.org/privilege/web.service
750 * @return An error code
751 * @exception E_SUCCESS The method is successful.
752 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
753 * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
755 result ClearCache(void);
758 * Clears the application's cookie.
762 * @privilege %http://tizen.org/privilege/web.service
764 * @return An error code
765 * @exception E_SUCCESS The method is successful.
766 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
767 * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
769 result ClearCookie(void);
772 * Clears the application's all stored form datas.
776 * @privilege %http://tizen.org/privilege/web.service
778 * @return An error code
779 * @exception E_SUCCESS The method is successful.
780 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
781 * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method.
783 result ClearFormData(void);
786 * Clears the application's all stored ID/password datas.
790 * @privilege %http://tizen.org/privilege/web.service
792 * @return An error code
793 * @exception E_SUCCESS The method is successful.
794 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
795 * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method.
797 result ClearLoginFormData(void);
800 * Checks whether the %Web control allows cookie. @n
801 * Returns @c true if cookie is enabled.
805 * @return @c true if cookie is allowed, @n
808 bool IsCookieEnabled(void) const;
811 * Enables or disables a cookie.
815 * @privilege %http://tizen.org/privilege/web.service
817 * @return The result of enabling or disabling cookie
818 * @param[in] enable Set to @c true if the web control allows a cookie, @n
820 * @exception E_SUCCESS The method is successful.
821 * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
822 * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
824 result SetCookieEnabled(bool enable);
827 * Saves the current web page as a pdf file. @n The size parameter is used to set size of the pdf file using millimeter.
831 * @return An error code
832 * @param[in] filePath The path of the pdf file that is created
833 * @param[in] pSize The width and height of the pdf file in millimeter. The width and height must be greater than @c 0. @n
834 * If the parameter contains @c null, the method uses the default size of the web page that is shown on the screen.
835 * @exception E_SUCCESS The method is successful.
836 * @exception E_INVALID_ARG Either of the following conditions has occurred: @n
837 * - The specified path is invalid.
838 * - The specified size is invalid.
839 * @exception E_INACCESSIBLE_PATH The file path is not allowed for the application to write.
841 result SavePageAsPdf(const Tizen::Base::String& filePath, const Tizen::Graphics::Dimension* pSize = null);
844 * Adds a JavaScript bridge instance.
848 * @return An error code
849 * @param[in] jsBridge The JavaScript bridge to add
850 * @exception E_SUCCESS The method is successful.
851 * @exception E_OBJ_ALREADY_EXIST A JavaScript bridge with the same name already exists.
853 result AddJavaScriptBridge(const IJavaScriptBridge& jsBridge);
856 * Removes a JavaScript bridge instance.
860 * @return An error code
861 * @param[in] jsBridge The JavaScript bridge to remove
862 * @exception E_SUCCESS The method is successful.
863 * @exception E_OBJ_NOT_FOUND The specified element is not found.
865 result RemoveJavaScriptBridge(const IJavaScriptBridge& jsBridge);
868 * Registers a keypad event listener. @n
869 * The registered listener is notified when the keypad associated with <input> tag or with <textarea> tag is opened or closed.
873 * @param[in] pKeypadEventListener The event listener to set
874 * @remarks The interfaces of IWebKeypadEventListener are called only when the input style of the keypad is @c INPUT_STYLE_OVERLAY.
875 * @see WebSetting::SetInputStyle()
877 void SetWebKeypadEventListener(IWebKeypadEventListener* pKeypadEventListener);
880 * Searches for all instances of the text on the current page and then highlights them. @n
881 * The current matched block will indicate the first match.
885 * @return An error code
886 * @param[in] text The string to search for
887 * @param[in] caseSensitive Set to @c true to search for the text with case-sensitive mode, @n
888 * else @c false to search for the text in the backward direction from the current position
889 * @exception E_SUCCESS The method is successful.
890 * @exception E_INVALID_ARG The specified @c text is invalid.
891 * @remarks This method operates asynchronously.
892 * @see Tizen::Web::Controls::ITextSearchListener::OnTextFound()
894 result SearchTextAllAsync(const Tizen::Base::String& text, bool caseSensitive);
897 * Scrolls the current matched block to the next text matched by SearchTextAllAsync().
901 * @return An error code
902 * @param[in] searchForward Set to @c true to search for the text in the forward direction from the current position, @n
903 * @exception E_SUCCESS The method is successful.
904 * @exception E_OBJ_NOT_FOUND The next instance is not found.
905 * @exception E_INVALID_OPERATION The SearchTextAllAsync() method is not called.
906 * @remarks This method operates asynchronously.
907 * @see Tizen::Web::Controls::ITextSearchListener::OnTextFound()
909 result SearchNextAsync(bool searchForward = true);
912 * Sets a text search listener.
916 * @param[in] pTextSearchListener The result of the search operation made by asynchronous methods
918 void SetTextSearchListener(ITextSearchListener* pTextSearchListener);
921 * Gets the favicon image from current page.
926 * @see Tizen::Web::Controls::ILoadingListener::OnFaviconReceived()
928 Tizen::Graphics::Bitmap* GetFaviconN(void) const;
931 * Informs the browser engine to stop the screen operations such as updating a screen until %Web calls the Resume() method. @n
932 * It is useful when a %Web control is not visible and does not need to update its screen.
939 * Informs the browser engine to resume the handling of screen operations.
946 * Scrolls the web page with the given coordinates.
950 * @param[in] diff The x and y coordinates
952 void ScrollBy(const Tizen::Graphics::Point& diff);
955 * Sets the scrolled position of the web page.
959 * @param[in] dest The x and y coordinates
961 void ScrollTo(const Tizen::Graphics::Point& dest);
964 * Gets the current scroll position of the web page.
968 * @return The x and y coordinates
970 Tizen::Graphics::Point GetScrollPosition(void) const;
973 * Gets the size of the current web page.
977 * @return The size of the current web page
978 * @remarks If an application want to get the displayed size, the return value should be multiplied by the zoom factor.
979 * @see GetZoomLevel()
981 Tizen::Graphics::Dimension GetPageSize(void) const;
985 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
987 // @param[in] item The instance of the %Web class to copy from
988 // @remarks This constructor is hidden.
990 Web(const Web& item);
993 // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
995 // @param[in] item The instance of the %Web class to assign from
996 // @remarks This operator is hidden.
998 Web& operator =(const Web& item);
1001 }}} // Tizen::Web::Controls
1002 #endif // _FWEB_CTRL_WEB_H_