*
* The following example demonstrates how to use the %Web class.
* @code
-// Sample code for WebSample.h
+// Sample code using Form for WebSample.h
#include <FUi.h>
#include <FWeb.h>
virtual result OnInitializing(void);
};
-// Sample code for WebSample.cpp
+// Sample code using Form for WebSample.cpp
#include "WebSample.h"
using namespace Tizen::Ui;
{
result r = E_SUCCESS;
+ // Constucts a Form
+ ...
+
__pWeb = new Web();
__pWeb->Construct(GetClientAreaBounds());
- AddControl(*__pWeb);
+ AddControl(__pWeb);
+
LoadUrl();
return r;
}
* @endcode
*
+ * @code
+// Sample code using Window for WebSample.h
+#include <FApp.h>
+#include <FUi.h>
+#include <FWeb.h>
+
+class WebSample :
+ public Tizen::Ui::Window
+{
+public:
+ WebSample(void) {};
+ virtual ~WebSample(void) {};
+
+protected:
+ void LoadUrl(void);
+
+private:
+ Tizen::Web::Controls::Web *__pWeb;
+
+public:
+ virtual result OnInitializing(void);
+};
+
+// Sample code using Window for WebSample.cpp
+#include "WebSample.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Web::Controls;
+
+result
+WebSample::OnInitializing(void)
+{
+ result r = E_SUCCESS;
+
+ // Constucts a Window
+ ...
+
+ Frame *pFrame = UiApp::GetInstance()->GetAppFrame()->GetFrame();
+ SetOwner(pFrame->GetCurrentForm());
+
+ __pWeb = new Web();
+ __pWeb->Construct(GetClientAreaBounds());
+ AddControl(__pWeb);
+
+ Show();
+ LoadUrl();
+
+ return r;
+}
+
+// Calls LoadUrl() with the URL of the Web content to display it on the Web control
+void
+WebSample::LoadUrl(void)
+{
+ Tizen::Base::String url(L"http://www.tizen.org");
+
+ __pWeb->LoadUrl(url);
+}
+ * @endcode
*/
class _OSP_EXPORT_ Web
: public Tizen::Ui::Container
{
public:
/**
- * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor.
+ * The object is not fully constructed after this constructor is called. @n
+ * For full construction, the Construct() method must be called right after calling this constructor.
*
* @since 2.0
*/
* Initializes this instance of the %Web control with the specified parameters.
*
* @since 2.0
- *
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
* @exception E_SYSTEM The method has failed.
* @exception E_INVALID_ARG The specified @c rect is invalid.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
*/
result Construct(const Tizen::Graphics::Rectangle& rect);
* Initializes this instance of the %Web control with the specified parameters.
*
* @since 2.1
- *
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
* @exception E_SYSTEM The method has failed.
* @exception E_INVALID_ARG The specified @c rect is invalid.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method.
*/
result Construct(const Tizen::Graphics::FloatRectangle& rect);
* Loads the resource specified by the URL.
*
* @since 2.0
- *
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
* @param[in] url The resource to load
* @exception E_SUCCESS The method is successful.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
void LoadUrl(const Tizen::Base::String& url);
/**
- * Loads the resource specified by the URL with the given header of HTTP request.
+ * Loads the resource specified by the URL with a given header of HTTP request.
*
* @since 2.0
- *
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_HEADER The header object does not contain any header fields.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
*/
result LoadUrl(const Tizen::Base::String& url, const Tizen::Net::Http::HttpHeader& header);
/**
- * Load the resource specified by the URL with the given header and body of HTTP request. @n
+ * Loads the resource specified by the URL with a given header and body of HTTP request. @n
* The header must include content-type entity-header field that is needed to check mime-type of the message body.
*
* @since 2.0
- *
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
* @exception E_SUCCESS The method is successful.
* @exception E_INVALID_HEADER The header object does not contain any header fields.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
*/
result LoadUrlWithPostRequest(const Tizen::Base::String& url, const Tizen::Net::Http::HttpHeader& header, const Tizen::Base::ByteBuffer& body);
* Loads the content of the specified buffer.
*
* @since 2.0
- *
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
* @param[in] mime The MIME type of the content
* @param[in] encoding The <a href= "../org.tizen.native.appprogramming/html/guide/web/supported_web_features.htm">text encoding</a> of the content
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG The content buffer is empty @b Since: @b 2.1
+ * @exception E_INVALID_ARG The content buffer is empty. @b Since: @b 2.1
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
void LoadData(const Tizen::Base::String& baseUrl, const Tizen::Base::ByteBuffer& content, const Tizen::Base::String& mime, const Tizen::Base::String& encoding = "UTF-8");
* Stops the current loading operation.
*
* @since 2.0
- *
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
* @exception E_SUCCESS The method is successful.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
void StopLoading(void);
* Reloads the current page.
*
* @since 2.0
- *
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
* @exception E_SUCCESS The method is successful.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
void Reload(void);
* Goes to the back history of the current %Web control.
*
* @since 2.0
- *
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
* @exception E_SUCCESS The method is successful.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
void GoBack(void);
* Goes to the forward history of the current %Web control.
*
* @since 2.0
- *
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
* @exception E_SUCCESS The method is successful.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
void GoForward(void);
* It fails to change the setting during data load.
*
* @since 2.0
- *
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
* @param[in] setting The setting to update
* @exception E_SUCCESS The method is successful.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
*/
result SetSetting(const Tizen::Web::Controls::WebSetting& setting);
* Evaluates the JavaScript string and returns the result.
*
* @since 2.0
- *
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
* @return The result of the evaluated JavaScript, @n
- * else an empty string if an error occurs
+ * else @c null if an error occurs
* @param[in] scriptCode The JavaScript code as string
* @exception E_SUCCESS The method is successful.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
Tizen::Base::String* EvaluateJavascriptN(const Tizen::Base::String& scriptCode);
* Sets a load event listener.
*
* @since 2.0
- *
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
* @param[in] pLoadingListener The listener receives the events that occurs while loading the data
* @exception E_SUCCESS The method is successful.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
void SetLoadingListener(Tizen::Web::Controls::ILoadingListener* pLoadingListener);
* Sets a download event listener.
*
* @since 2.0
- *
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
* @param[in] pDownLoadListener The listener to receive the data from a network incrementally
* @exception E_SUCCESS The method is successful.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
* @remarks The specific error code can be accessed using the GetLastResult() method.
*/
void SetDownloadListener(Tizen::Web::Controls::IWebDownloadListener* pDownLoadListener);
* @return An error code
* @param[in] startPoint The starting point for the text selection block
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG There is nothing to select from the starting point specified.
+ * @exception E_INVALID_ARG There is nothing to select from the specified starting point.
*/
result SetBlockSelectionPosition(const Tizen::Graphics::Point& startPoint);
* @return An error code
* @param[in] startPoint The starting point for the text selection block
* @exception E_SUCCESS The method is successful.
- * @exception E_INVALID_ARG There is nothing to select from the starting point specified.
+ * @exception E_INVALID_ARG There is nothing to select from the specified starting point.
*/
result SetBlockSelectionPosition(const Tizen::Graphics::FloatPoint& startPoint);
* @param[in] enable Set to @c true to enable the scrolling of the web page, @n
* else @c false
* @exception E_SUCCESS The method is successful.
+ * @remarks This method does not affect javascript touch event.
*/
result SetScrollEnabled(bool enable);
* Sets the private browsing and returns the result.
*
* @since 2.0
- *
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
* else @c false
* @exception E_SUCCESS The method is successful.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
*/
result SetPrivateBrowsingEnabled(bool enable);
* Clears the back and forward navigation list.
*
* @since 2.1
- *
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
* @return An error code
* @exception E_SUCCESS The method is successful.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method.
* @see CanGoBack()
* @see CanGoForward()
* @see GoBack()
* Clears the application's cache.
*
* @since 2.0
- *
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
* @return An error code
* @exception E_SUCCESS The method is successful.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
*/
result ClearCache(void);
* Clears the application's cookie.
*
* @since 2.0
- *
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
* @return An error code
* @exception E_SUCCESS The method is successful.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
*/
result ClearCookie(void);
* Clears the application's all stored form datas.
*
* @since 2.1
- *
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
* @return An error code
* @exception E_SUCCESS The method is successful.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method.
*/
result ClearFormData(void);
/**
- * Clears the application's all stored id/password datas.
+ * Clears the application's all stored ID/password datas.
*
* @since 2.1
- *
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
* @return An error code
* @exception E_SUCCESS The method is successful.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method.
*/
result ClearLoginFormData(void);
* Enables or disables a cookie.
*
* @since 2.0
- *
* @privlevel public
* @privilege %http://tizen.org/privilege/web.service
*
* else @c false
* @exception E_SUCCESS The method is successful.
* @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.
+ * @exception E_USER_NOT_CONSENTED The user blocks an application from calling this method. @b Since: @b 2.1
*/
result SetCookieEnabled(bool enable);
* @since 2.0
*
* @return An error code
- *
* @param[in] text The string to search for
* @param[in] caseSensitive Set to @c true to search for the text with case-sensitive mode, @n
* else @c false to search for the text in the backward direction from the current position
* @since 2.0
*
* @return An error code
- *
* @param[in] searchForward Set to @c true to search for the text in the forward direction from the current position, @n
* @exception E_SUCCESS The method is successful.
* @exception E_OBJ_NOT_FOUND The next instance is not found.
Tizen::Graphics::Point GetScrollPosition(void) const;
/**
- * Gets the real size of the current web page.
+ * Gets the size of the current web page.
*
* @since 2.1
*