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.
19 * @file FWebCtrlHitElementResult.h
20 * @brief This is the header file for the %HitElementResult class.
22 * This header file contains the declarations of the %HitElementResult class.
24 #ifndef _FWEB_CTRL_HIT_ELEMENT_RESULT_H_
25 #define _FWEB_CTRL_HIT_ELEMENT_RESULT_H_
27 #include <FBaseColIMap.h>
28 #include <FBaseObject.h>
29 #include <FBaseString.h>
31 namespace Tizen { namespace Graphics
36 namespace Tizen { namespace Web { namespace Controls
38 class _HitElementResultImpl;
39 }}} // Tizen::Web::Controls
41 namespace Tizen { namespace Web { namespace Controls
45 * @class HitElementResult
46 * @brief This class provides methods to retrieve information from the HyperText Markup Language (HTML) element, pointed by the x and y coordinates.
50 * The %HitElementResult class provides methods to retrieve information from the HTML element, such as tag name, attributes and content.
52 * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/web/controls_namespace.htm">Web Controls Guide</a>.
55 class _OSP_EXPORT_ HitElementResult
56 : public Tizen::Base::Object
61 * This destructor overrides Tizen::Base::Object::~Object().
65 virtual ~HitElementResult(void);
68 * Gets the tag name of an element.
72 * @return The tag name of the element
74 Tizen::Base::String GetTagName(void) const;
77 * Gets the value of the specified attribute.
81 * @return The value of the specified attribute
82 * @param[in] attributeName The name of attribute
84 Tizen::Base::String GetAttributeValue(const Tizen::Base::String& attributeName) const;
87 * Gets the content of an element.
91 * @return The content of the element
93 Tizen::Base::String GetContent(void) const;
96 * Gets the Uniform Resource Locator (URL) linked to the element.
100 * @return The URL linked to the element
102 Tizen::Base::String GetUrl(void) const;
105 * Gets the image if the element is an image element.
111 const Tizen::Graphics::Bitmap* GetImage(void) const;
114 * Checks whether the element is an image element.
118 * @return @c true if the element is an image element, @n
121 bool HasImage(void) const;
124 * Checks whether the element has a URL linked to it.
128 * @return @c true if there is a URL linked to the element, @n
131 bool HasUrl(void) const;
135 // This constructor is intentionally declared as private so that only the platform can create an instance.
137 // @remarks This constructor is hidden.
139 HitElementResult(void);
142 // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
144 // @param[in] element The instance of the %HitElementResult class to copy from
145 // @remarks This constructor is hidden.
147 HitElementResult(const HitElementResult& element);
150 // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
152 // @param[in] source The instance of the %HitElementResult class to assign from
153 // @remarks This operator is hidden.
155 HitElementResult& operator =(const HitElementResult& source);
158 _HitElementResultImpl* __pHitElementResultImpl;
160 friend class _HitElementResultImpl;
162 friend class _WebImpl;
163 }; // HitElementResult
165 }}} // Tizen::Web::Controls
166 #endif // _FWEB_CTRL_HIT_ELEMENT_RESULT_H_