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.
17 * @EWK_HIT_TEST_MODE_DEFAULT: link data.
18 * @EWK_HIT_TEST_MODE_NODE_DATA: extra node data(tag name, node value, attribute infomation, etc).
19 * @EWK_HIT_TEST_MODE_IMAGE_DATA: extra image data(image data, image data length, image file name exteionsion, etc).
20 * @EWK_HIT_TEST_MODE_ALL: all data.
22 * Enum values with flags representing the hit test mode.
26 EWK_HIT_TEST_MODE_DEFAULT = 1 << 1,
27 EWK_HIT_TEST_MODE_NODE_DATA = 1 << 2,
28 EWK_HIT_TEST_MODE_IMAGE_DATA = 1 << 3,
29 EWK_HIT_TEST_MODE_ALL = EWK_HIT_TEST_MODE_DEFAULT | EWK_HIT_TEST_MODE_NODE_DATA | EWK_HIT_TEST_MODE_IMAGE_DATA
33 * Ewk_Hit_Test_Result_Context:
34 * @EWK_HIT_TEST_RESULT_CONTEXT_DOCUMENT: anywhere in the document.
35 * @EWK_HIT_TEST_RESULT_CONTEXT_LINK: a hyperlink element.
36 * @EWK_HIT_TEST_RESULT_CONTEXT_IMAGE: an image element.
37 * @EWK_HIT_TEST_RESULT_CONTEXT_MEDIA: a video or audio element.
38 * @EWK_HIT_TEST_RESULT_CONTEXT_SELECTION: the area is selected by the user.
39 * @EWK_HIT_TEST_RESULT_CONTEXT_EDITABLE: the area is editable by the user.
40 * @EWK_HIT_TEST_RESULT_CONTEXT_TEXT: the area is text.
42 * Enum values with flags representing the context of a #Ewk_Hit_Test.
45 EWK_HIT_TEST_RESULT_CONTEXT_DOCUMENT = 1 << 1,
46 EWK_HIT_TEST_RESULT_CONTEXT_LINK = 1 << 2,
47 EWK_HIT_TEST_RESULT_CONTEXT_IMAGE = 1 << 3,
48 EWK_HIT_TEST_RESULT_CONTEXT_MEDIA = 1 << 4,
49 EWK_HIT_TEST_RESULT_CONTEXT_SELECTION = 1 << 5,
50 EWK_HIT_TEST_RESULT_CONTEXT_EDITABLE = 1 << 6,
51 EWK_HIT_TEST_RESULT_CONTEXT_TEXT = 1 << 7
52 } Ewk_Hit_Test_Result_Context;
54 /** Creates a type name for _Ewk_Hit_Test */
55 typedef struct _Ewk_Hit_Test Ewk_Hit_Test;
58 * Frees hit test instance created by ewk_view_hit_test_new().
60 * @param hit_test instance
62 EXPORT_API void ewk_hit_test_free(Ewk_Hit_Test* hit_test);
65 * Gets the context of the hit test
67 * @param hit_test instance
68 * @return a bitmask of the hit test context on success, @c EWK_HIT_TEST_RESULT_CONTEXT_DOCUMENT otherwise.
70 EXPORT_API Ewk_Hit_Test_Result_Context ewk_hit_test_result_context_get(Ewk_Hit_Test* hit_test);
73 * Gets the link uri string of the hit test
75 * @param hit_test instance
76 * @return the URI of the link element in the coordinates of the hit test on success, @c 0 otherwise.
78 EXPORT_API const char* ewk_hit_test_link_uri_get(Ewk_Hit_Test* hit_test);
81 * Gets the link title string of the hit test
83 * @param hit_test instance
84 * @return the title of the link element in the coordinates of the hit test on success, @c 0 otherwise.
86 EXPORT_API const char* ewk_hit_test_link_title_get(Ewk_Hit_Test* hit_test);
89 * Gets the link label string of the hit test
91 * @param hit_test instance
92 * @return the label of the link element in the coordinates of the hit test on success, @c 0 otherwise.
94 EXPORT_API const char* ewk_hit_test_link_label_get(Ewk_Hit_Test* hit_test);
97 * Gets the image uri string of the hit test
99 * @param hit_test instance
100 * @return the URI of the image element in the coordinates of the hit test on success, @c 0 otherwise.
102 EXPORT_API const char* ewk_hit_test_image_uri_get(Ewk_Hit_Test* hit_test);
105 * Gets the media uri string of the hit test
107 * @param hit_test instance
108 * @return the URI of the media element in the coordinates of the hit test on success, @c 0 otherwise.
110 EXPORT_API const char* ewk_hit_test_media_uri_get(Ewk_Hit_Test* hit_test);
113 * Gets the tag name string of hit element of the hit test
115 * @param hit_test instance
116 * @return the tag name of the hit element in the coordinates of the hit test on success, @c 0 otherwise.
118 EXPORT_API const char* ewk_hit_test_tag_name_get(Ewk_Hit_Test* hit_test);
121 * Gets the node value string of hit element of the hit test
123 * @param hit_test instance
124 * @return the node value of the hit element in the coordinates of the hit test on success, @c 0 otherwise.
126 EXPORT_API const char* ewk_hit_test_node_value_get(Ewk_Hit_Test* hit_test);
129 * Gets the attribute data of hit element of the hit test
131 * @param hit_test instance
132 * @return the attribute data of the hit element in the coordinates of the hit test on success, @c 0 otherwise.
134 EXPORT_API Eina_Hash* ewk_hit_test_attribute_hash_get(Ewk_Hit_Test* hit_test);
137 * Gets the image buffer of hit element of the hit test
139 * @param hit_test instance
140 * @return the image buffer of the hit element in the coordinates of the hit test on success, @c 0 otherwise.
142 EXPORT_API void* ewk_hit_test_image_buffer_get(Ewk_Hit_Test* hit_test);
145 * Gets the image buffer length of hit element of the hit test
147 * @param hit_test instance
148 * @return the image buffer length of the hit element in the coordinates of the hit test on success, @c 0 otherwise.
149 * Buffer length is truncated to 32 bit.
151 EXPORT_API unsigned int ewk_hit_test_image_buffer_length_get(Ewk_Hit_Test* hit_test);
154 * Gets the image fiile name extension string of hit element of the hit test
156 * @param hit_test instance
157 * @return the image fiile name extension of the hit element in the coordinates of the hit test on success, @c 0 otherwise.
159 EXPORT_API const char* ewk_hit_test_image_file_name_extension_get(Ewk_Hit_Test* hit_test);
165 #endif // ewk_hit_test_h