Disabled touch adjust feature in case of SDK version.
[framework/web/webkit-efl.git] / Tools / DumpRenderTree / gtk / AccessibilityUIElementGtk.cpp
1 /*
2  * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3  * Copyright (C) 2009 Jan Michael Alonzo
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in the
12  *    documentation and/or other materials provided with the distribution.
13  *
14  * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
15  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
18  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
21  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
22  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
25  */
26
27 #include "config.h"
28 #include "AccessibilityUIElement.h"
29
30 #include "WebCoreSupport/DumpRenderTreeSupportGtk.h"
31 #include <JavaScriptCore/JSStringRef.h>
32 #include <atk/atk.h>
33 #include <gtk/gtk.h>
34 #include <wtf/Assertions.h>
35 #include <wtf/gobject/GOwnPtr.h>
36 #include <wtf/gobject/GRefPtr.h>
37
38 AccessibilityUIElement::AccessibilityUIElement(PlatformUIElement element)
39     : m_element(element)
40 {
41 }
42
43 AccessibilityUIElement::AccessibilityUIElement(const AccessibilityUIElement& other)
44     : m_element(other.m_element)
45 {
46 }
47
48 AccessibilityUIElement::~AccessibilityUIElement()
49 {
50 }
51
52 void AccessibilityUIElement::getLinkedUIElements(Vector<AccessibilityUIElement>& elements)
53 {
54     // FIXME: implement
55 }
56
57 void AccessibilityUIElement::getDocumentLinks(Vector<AccessibilityUIElement>&)
58 {
59     // FIXME: implement
60 }
61
62 void AccessibilityUIElement::getChildren(Vector<AccessibilityUIElement>& children)
63 {
64     int count = childrenCount();
65     for (int i = 0; i < count; i++) {
66         AtkObject* child = atk_object_ref_accessible_child(ATK_OBJECT(m_element), i);
67         children.append(AccessibilityUIElement(child));
68     }
69 }
70
71 void AccessibilityUIElement::getChildrenWithRange(Vector<AccessibilityUIElement>& elementVector, unsigned start, unsigned end)
72 {
73     for (unsigned i = start; i < end; i++) {
74         AtkObject* child = atk_object_ref_accessible_child(ATK_OBJECT(m_element), i);
75         elementVector.append(AccessibilityUIElement(child));
76     }
77 }
78
79 int AccessibilityUIElement::rowCount()
80 {
81     if (!m_element)
82         return 0;
83
84     ASSERT(ATK_IS_TABLE(m_element));
85
86     return atk_table_get_n_rows(ATK_TABLE(m_element));
87 }
88
89 int AccessibilityUIElement::columnCount()
90 {
91     if (!m_element)
92         return 0;
93
94     ASSERT(ATK_IS_TABLE(m_element));
95
96     return atk_table_get_n_columns(ATK_TABLE(m_element));
97 }
98
99 int AccessibilityUIElement::childrenCount()
100 {
101     if (!m_element)
102         return 0;
103
104     ASSERT(ATK_IS_OBJECT(m_element));
105
106     return atk_object_get_n_accessible_children(ATK_OBJECT(m_element));
107 }
108
109 AccessibilityUIElement AccessibilityUIElement::elementAtPoint(int x, int y)
110 {
111     // FIXME: implement
112     return 0;
113 }
114
115 AccessibilityUIElement AccessibilityUIElement::linkedUIElementAtIndex(unsigned index)
116 {
117     // FIXME: implement
118     return 0;
119 }
120
121 AccessibilityUIElement AccessibilityUIElement::getChildAtIndex(unsigned index)
122 {
123     Vector<AccessibilityUIElement> children;
124     getChildrenWithRange(children, index, index + 1);
125
126     if (children.size() == 1)
127         return children.at(0);
128
129     return 0;
130 }
131
132 unsigned AccessibilityUIElement::indexOfChild(AccessibilityUIElement* element)
133
134     // FIXME: implement
135     return 0;
136 }
137
138 gchar* attributeSetToString(AtkAttributeSet* attributeSet)
139 {
140     GString* str = g_string_new(0);
141     for (GSList* attributes = attributeSet; attributes; attributes = attributes->next) {
142         AtkAttribute* attribute = static_cast<AtkAttribute*>(attributes->data);
143         GOwnPtr<gchar> attributeData(g_strconcat(attribute->name, ":", attribute->value, NULL));
144         g_string_append(str, attributeData.get());
145         if (attributes->next)
146             g_string_append(str, ", ");
147     }
148
149     return g_string_free(str, FALSE);
150 }
151
152 JSStringRef AccessibilityUIElement::allAttributes()
153 {
154     if (!m_element)
155         return JSStringCreateWithCharacters(0, 0);
156
157     ASSERT(ATK_IS_OBJECT(m_element));
158     GOwnPtr<gchar> attributeData(attributeSetToString(atk_object_get_attributes(ATK_OBJECT(m_element))));
159     return JSStringCreateWithUTF8CString(attributeData.get());
160 }
161
162 JSStringRef AccessibilityUIElement::attributesOfLinkedUIElements()
163 {
164     // FIXME: implement
165     return JSStringCreateWithCharacters(0, 0);
166 }
167
168 JSStringRef AccessibilityUIElement::attributesOfDocumentLinks()
169 {
170     // FIXME: implement
171     return JSStringCreateWithCharacters(0, 0);
172 }
173
174 AccessibilityUIElement AccessibilityUIElement::titleUIElement()
175 {
176     // FIXME: implement
177     return 0;
178 }
179
180 AccessibilityUIElement AccessibilityUIElement::parentElement()
181 {
182     if (!m_element)
183         return 0;
184
185     ASSERT(ATK_IS_OBJECT(m_element));
186
187     AtkObject* parent =  atk_object_get_parent(ATK_OBJECT(m_element));
188     return parent ? AccessibilityUIElement(parent) : 0;
189 }
190
191 JSStringRef AccessibilityUIElement::attributesOfChildren()
192 {
193     // FIXME: implement
194     return JSStringCreateWithCharacters(0, 0);
195 }
196
197 JSStringRef AccessibilityUIElement::parameterizedAttributeNames()
198 {
199     // FIXME: implement
200     return JSStringCreateWithCharacters(0, 0);
201 }
202
203 JSStringRef AccessibilityUIElement::role()
204 {
205     AtkRole role = atk_object_get_role(ATK_OBJECT(m_element));
206
207     if (!role)
208         return JSStringCreateWithCharacters(0, 0);
209
210     const gchar* roleName = atk_role_get_name(role);
211     GOwnPtr<gchar> axRole(g_strdup_printf("AXRole: %s", roleName));
212
213     return JSStringCreateWithUTF8CString(axRole.get());
214 }
215
216 JSStringRef AccessibilityUIElement::subrole()
217 {
218     return 0;
219 }
220
221 JSStringRef AccessibilityUIElement::roleDescription()
222 {
223     return 0;
224 }
225
226 JSStringRef AccessibilityUIElement::title()
227 {
228     const gchar* name = atk_object_get_name(ATK_OBJECT(m_element));
229
230     if (!name)
231         return JSStringCreateWithCharacters(0, 0);
232
233     GOwnPtr<gchar> axTitle(g_strdup_printf("AXTitle: %s", name));
234
235     return JSStringCreateWithUTF8CString(axTitle.get());
236 }
237
238 JSStringRef AccessibilityUIElement::description()
239 {
240     const gchar* description = atk_object_get_description(ATK_OBJECT(m_element));
241
242     if (!description)
243         return JSStringCreateWithCharacters(0, 0);
244
245     GOwnPtr<gchar> axDesc(g_strdup_printf("AXDescription: %s", description));
246
247     return JSStringCreateWithUTF8CString(axDesc.get());
248 }
249
250 JSStringRef AccessibilityUIElement::stringValue()
251 {
252     // FIXME: implement
253     return JSStringCreateWithCharacters(0, 0);
254 }
255
256 JSStringRef AccessibilityUIElement::language()
257 {
258     // FIXME: implement
259     return JSStringCreateWithCharacters(0, 0);
260 }
261
262 JSStringRef AccessibilityUIElement::helpText() const
263 {
264     if (!m_element)
265         return JSStringCreateWithCharacters(0, 0);
266
267     ASSERT(ATK_IS_OBJECT(m_element));
268
269     CString helpText = DumpRenderTreeSupportGtk::accessibilityHelpText(ATK_OBJECT(m_element));
270     GOwnPtr<gchar> axHelpText(g_strdup_printf("AXHelp: %s", helpText.data()));
271     return JSStringCreateWithUTF8CString(axHelpText.get());
272 }
273
274 double AccessibilityUIElement::x()
275 {
276     int x, y;
277
278     atk_component_get_position(ATK_COMPONENT(m_element), &x, &y, ATK_XY_SCREEN);
279
280     return x;
281 }
282
283 double AccessibilityUIElement::y()
284 {
285     int x, y;
286
287     atk_component_get_position(ATK_COMPONENT(m_element), &x, &y, ATK_XY_SCREEN);
288
289     return y;
290 }
291
292 double AccessibilityUIElement::width()
293 {
294     int width, height;
295
296     atk_component_get_size(ATK_COMPONENT(m_element), &width, &height);
297
298     return width;
299 }
300
301 double AccessibilityUIElement::height()
302 {
303     int width, height;
304
305     atk_component_get_size(ATK_COMPONENT(m_element), &width, &height);
306
307     return height;
308 }
309
310 double AccessibilityUIElement::clickPointX()
311 {
312     return 0.f;
313 }
314
315 double AccessibilityUIElement::clickPointY()
316 {
317     return 0.f;
318 }
319
320 JSStringRef AccessibilityUIElement::orientation() const
321 {
322     return 0;
323 }
324
325 double AccessibilityUIElement::intValue() const
326 {
327     GValue value = { 0, { { 0 } } };
328
329     if (!ATK_IS_VALUE(m_element))
330         return 0.0f;
331
332     atk_value_get_current_value(ATK_VALUE(m_element), &value);
333     if (!G_VALUE_HOLDS_FLOAT(&value))
334         return 0.0f;
335     return g_value_get_float(&value);
336 }
337
338 double AccessibilityUIElement::minValue()
339 {
340     GValue value = { 0, { { 0 } } };
341
342     if (!ATK_IS_VALUE(m_element))
343         return 0.0f;
344
345     atk_value_get_minimum_value(ATK_VALUE(m_element), &value);
346     if (!G_VALUE_HOLDS_FLOAT(&value))
347         return 0.0f;
348     return g_value_get_float(&value);
349 }
350
351 double AccessibilityUIElement::maxValue()
352 {
353     GValue value = { 0, { { 0 } } };
354
355     if (!ATK_IS_VALUE(m_element))
356         return 0.0f;
357
358     atk_value_get_maximum_value(ATK_VALUE(m_element), &value);
359     if (!G_VALUE_HOLDS_FLOAT(&value))
360         return 0.0f;
361     return g_value_get_float(&value);
362 }
363
364 JSStringRef AccessibilityUIElement::valueDescription()
365 {
366     // FIXME: implement
367     return JSStringCreateWithCharacters(0, 0);
368 }
369
370 static bool checkElementState(PlatformUIElement element, AtkStateType stateType)
371 {
372     if (!ATK_IS_OBJECT(element))
373          return false;
374
375     GRefPtr<AtkStateSet> stateSet = adoptGRef(atk_object_ref_state_set(ATK_OBJECT(element)));
376     return atk_state_set_contains_state(stateSet.get(), stateType);
377 }
378
379 bool AccessibilityUIElement::isEnabled()
380 {
381     return checkElementState(m_element, ATK_STATE_ENABLED);
382 }
383
384 int AccessibilityUIElement::insertionPointLineNumber()
385 {
386     // FIXME: implement
387     return 0;
388 }
389
390 bool AccessibilityUIElement::isActionSupported(JSStringRef action)
391 {
392     // FIXME: implement
393     return false;
394 }
395
396 bool AccessibilityUIElement::isRequired() const
397 {
398     // FIXME: implement
399     return false;
400 }
401
402 bool AccessibilityUIElement::isFocused() const
403 {
404     if (!ATK_IS_OBJECT(m_element))
405         return false;
406
407     GRefPtr<AtkStateSet> stateSet = adoptGRef(atk_object_ref_state_set(ATK_OBJECT(m_element)));
408     gboolean isFocused = atk_state_set_contains_state(stateSet.get(), ATK_STATE_FOCUSED);
409
410     return isFocused;
411 }
412
413 bool AccessibilityUIElement::isSelected() const
414 {
415     return checkElementState(m_element, ATK_STATE_SELECTED);
416 }
417
418 int AccessibilityUIElement::hierarchicalLevel() const
419 {
420     // FIXME: implement
421     return 0;
422 }
423
424 bool AccessibilityUIElement::ariaIsGrabbed() const
425 {
426     return false;
427 }
428  
429 JSStringRef AccessibilityUIElement::ariaDropEffects() const
430 {   
431     return 0; 
432 }
433
434 bool AccessibilityUIElement::isExpanded() const
435 {
436     if (!ATK_IS_OBJECT(m_element))
437         return false;
438
439     GRefPtr<AtkStateSet> stateSet = adoptGRef(atk_object_ref_state_set(ATK_OBJECT(m_element)));
440     gboolean isExpanded = atk_state_set_contains_state(stateSet.get(), ATK_STATE_EXPANDED);
441
442     return isExpanded;
443 }
444
445 bool AccessibilityUIElement::isChecked() const
446 {
447     if (!ATK_IS_OBJECT(m_element))
448         return false;
449
450     GRefPtr<AtkStateSet> stateSet = adoptGRef(atk_object_ref_state_set(ATK_OBJECT(m_element)));
451     gboolean isChecked = atk_state_set_contains_state(stateSet.get(), ATK_STATE_CHECKED);
452
453     return isChecked;
454 }
455
456 JSStringRef AccessibilityUIElement::attributesOfColumnHeaders()
457 {
458     // FIXME: implement
459     return JSStringCreateWithCharacters(0, 0);
460 }
461
462 JSStringRef AccessibilityUIElement::attributesOfRowHeaders()
463 {
464     // FIXME: implement
465     return JSStringCreateWithCharacters(0, 0);
466 }
467
468 JSStringRef AccessibilityUIElement::attributesOfColumns()
469 {
470     // FIXME: implement
471     return JSStringCreateWithCharacters(0, 0);
472 }
473
474 JSStringRef AccessibilityUIElement::attributesOfRows()
475 {
476     // FIXME: implement
477     return JSStringCreateWithCharacters(0, 0);
478 }
479
480 JSStringRef AccessibilityUIElement::attributesOfVisibleCells()
481 {
482     // FIXME: implement
483     return JSStringCreateWithCharacters(0, 0);
484 }
485
486 JSStringRef AccessibilityUIElement::attributesOfHeader()
487 {
488     // FIXME: implement
489     return JSStringCreateWithCharacters(0, 0);
490 }
491
492 int AccessibilityUIElement::indexInTable()
493 {
494     // FIXME: implement
495     return 0;
496 }
497
498 static JSStringRef indexRangeInTable(PlatformUIElement element, bool isRowRange)
499 {
500     GOwnPtr<gchar> rangeString(g_strdup("{0, 0}"));
501
502     if (!element)
503         return JSStringCreateWithUTF8CString(rangeString.get());
504
505     ASSERT(ATK_IS_OBJECT(element));
506
507     AtkObject* axTable = atk_object_get_parent(ATK_OBJECT(element));
508     if (!axTable || !ATK_IS_TABLE(axTable))
509         return JSStringCreateWithUTF8CString(rangeString.get());
510
511     // Look for the cell in the table.
512     gint indexInParent = atk_object_get_index_in_parent(ATK_OBJECT(element));
513     if (indexInParent == -1)
514         return JSStringCreateWithUTF8CString(rangeString.get());
515
516     int row = -1;
517     int column = -1;
518     row = atk_table_get_row_at_index(ATK_TABLE(axTable), indexInParent);
519     column = atk_table_get_column_at_index(ATK_TABLE(axTable), indexInParent);
520
521     // Get the actual values, if row and columns are valid values.
522     if (row != -1 && column != -1) {
523         int base = 0;
524         int length = 0;
525         if (isRowRange) {
526             base = row;
527             length = atk_table_get_row_extent_at(ATK_TABLE(axTable), row, column);
528         } else {
529             base = column;
530             length = atk_table_get_column_extent_at(ATK_TABLE(axTable), row, column);
531         }
532         rangeString.set(g_strdup_printf("{%d, %d}", base, length));
533     }
534
535     return JSStringCreateWithUTF8CString(rangeString.get());
536 }
537
538 JSStringRef AccessibilityUIElement::rowIndexRange()
539 {
540     // Range in table for rows.
541     return indexRangeInTable(m_element, true);
542 }
543
544 JSStringRef AccessibilityUIElement::columnIndexRange()
545 {
546     // Range in table for columns.
547     return indexRangeInTable(m_element, false);
548 }
549
550 int AccessibilityUIElement::lineForIndex(int)
551 {
552     // FIXME: implement
553     return 0;
554 }
555
556 JSStringRef AccessibilityUIElement::boundsForRange(unsigned location, unsigned length)
557 {
558     // FIXME: implement
559     return JSStringCreateWithCharacters(0, 0);
560 }
561
562 JSStringRef AccessibilityUIElement::stringForRange(unsigned, unsigned) 
563 {
564     // FIXME: implement
565     return JSStringCreateWithCharacters(0, 0);
566
567
568 JSStringRef AccessibilityUIElement::attributedStringForRange(unsigned, unsigned)
569 {
570     // FIXME: implement
571     return JSStringCreateWithCharacters(0, 0);
572 }
573
574 bool AccessibilityUIElement::attributedStringRangeIsMisspelled(unsigned location, unsigned length)
575 {
576     // FIXME: implement
577     return false;
578 }
579
580 AccessibilityUIElement AccessibilityUIElement::uiElementForSearchPredicate(AccessibilityUIElement* startElement, bool isDirectionNext, JSStringRef searchKey, JSStringRef searchText)
581 {
582     // FIXME: implement
583     return 0;
584 }
585
586 AccessibilityUIElement AccessibilityUIElement::cellForColumnAndRow(unsigned column, unsigned row)
587 {
588     if (!m_element)
589         return 0;
590
591     ASSERT(ATK_IS_TABLE(m_element));
592
593     AtkObject* foundCell = atk_table_ref_at(ATK_TABLE(m_element), row, column);
594     return foundCell ? AccessibilityUIElement(foundCell) : 0;
595 }
596
597 JSStringRef AccessibilityUIElement::selectedTextRange()
598 {
599     // FIXME: implement
600     return JSStringCreateWithCharacters(0, 0);
601 }
602
603 void AccessibilityUIElement::setSelectedTextRange(unsigned location, unsigned length)
604 {
605     // FIXME: implement
606 }
607
608 JSStringRef AccessibilityUIElement::stringAttributeValue(JSStringRef attribute)
609 {
610     // FIXME: implement
611     return JSStringCreateWithCharacters(0, 0);
612 }
613
614 double AccessibilityUIElement::numberAttributeValue(JSStringRef attribute)
615 {
616     // FIXME: implement
617     return 0.0f;
618 }
619
620 bool AccessibilityUIElement::boolAttributeValue(JSStringRef attribute)
621 {
622     // FIXME: implement
623     return false;
624 }
625
626 bool AccessibilityUIElement::isAttributeSettable(JSStringRef attribute)
627 {
628     // FIXME: implement
629     return false;
630 }
631
632 bool AccessibilityUIElement::isAttributeSupported(JSStringRef attribute)
633 {
634     return false;
635 }
636
637 static void alterCurrentValue(PlatformUIElement element, int factor)
638 {
639     if (!element)
640         return;
641
642     ASSERT(ATK_IS_VALUE(element));
643
644     GValue currentValue = G_VALUE_INIT;
645     atk_value_get_current_value(ATK_VALUE(element), &currentValue);
646
647     GValue increment = G_VALUE_INIT;
648     atk_value_get_minimum_increment(ATK_VALUE(element), &increment);
649
650     GValue newValue = G_VALUE_INIT;
651     g_value_init(&newValue, G_TYPE_FLOAT);
652
653     g_value_set_float(&newValue, g_value_get_float(&currentValue) + factor * g_value_get_float(&increment));
654     atk_value_set_current_value(ATK_VALUE(element), &newValue);
655
656     g_value_unset(&newValue);
657     g_value_unset(&increment);
658     g_value_unset(&currentValue);
659 }
660
661 void AccessibilityUIElement::increment()
662 {
663     alterCurrentValue(m_element, 1);
664 }
665
666 void AccessibilityUIElement::decrement()
667 {
668     alterCurrentValue(m_element, -1);
669 }
670
671 void AccessibilityUIElement::press()
672 {
673     if (!m_element)
674         return;
675
676     ASSERT(ATK_IS_OBJECT(m_element));
677
678     if (!ATK_IS_ACTION(m_element))
679         return;
680
681     // Only one action per object is supported so far.
682     atk_action_do_action(ATK_ACTION(m_element), 0);
683 }
684
685 void AccessibilityUIElement::showMenu()
686 {
687     // FIXME: implement
688 }
689
690 AccessibilityUIElement AccessibilityUIElement::disclosedRowAtIndex(unsigned index)
691 {
692     return 0;
693 }
694
695 AccessibilityUIElement AccessibilityUIElement::ariaOwnsElementAtIndex(unsigned index)
696 {
697     return 0;
698 }
699
700 AccessibilityUIElement AccessibilityUIElement::ariaFlowToElementAtIndex(unsigned index)
701 {
702     return 0;
703 }
704
705 AccessibilityUIElement AccessibilityUIElement::selectedRowAtIndex(unsigned index)
706 {
707     return 0;
708 }
709
710 AccessibilityUIElement AccessibilityUIElement::rowAtIndex(unsigned index)
711 {
712     return 0;
713 }
714
715 AccessibilityUIElement AccessibilityUIElement::disclosedByRow()
716 {
717     return 0;
718 }
719
720 JSStringRef AccessibilityUIElement::accessibilityValue() const
721 {
722     // FIXME: implement
723     return JSStringCreateWithCharacters(0, 0);
724 }
725
726 JSStringRef AccessibilityUIElement::documentEncoding()
727 {
728     AtkRole role = atk_object_get_role(ATK_OBJECT(m_element));
729     if (role != ATK_ROLE_DOCUMENT_FRAME)
730         return JSStringCreateWithCharacters(0, 0);
731
732     return JSStringCreateWithUTF8CString(atk_document_get_attribute_value(ATK_DOCUMENT(m_element), "Encoding"));
733 }
734
735 JSStringRef AccessibilityUIElement::documentURI()
736 {
737     AtkRole role = atk_object_get_role(ATK_OBJECT(m_element));
738     if (role != ATK_ROLE_DOCUMENT_FRAME)
739         return JSStringCreateWithCharacters(0, 0);
740
741     return JSStringCreateWithUTF8CString(atk_document_get_attribute_value(ATK_DOCUMENT(m_element), "URI"));
742 }
743
744 JSStringRef AccessibilityUIElement::url()
745 {
746     // FIXME: implement
747     return JSStringCreateWithCharacters(0, 0);
748 }
749
750 bool AccessibilityUIElement::addNotificationListener(JSObjectRef functionCallback)
751 {
752     // FIXME: implement
753     return false;
754 }
755
756 void AccessibilityUIElement::removeNotificationListener()
757 {
758     // FIXME: implement
759 }
760
761 bool AccessibilityUIElement::isFocusable() const
762 {
763     if (!ATK_IS_OBJECT(m_element))
764         return false;
765
766     GRefPtr<AtkStateSet> stateSet = adoptGRef(atk_object_ref_state_set(ATK_OBJECT(m_element)));
767     gboolean isFocusable = atk_state_set_contains_state(stateSet.get(), ATK_STATE_FOCUSABLE);
768
769     return isFocusable;
770 }
771
772 bool AccessibilityUIElement::isSelectable() const
773 {
774     // FIXME: implement
775     return false;
776 }
777
778 bool AccessibilityUIElement::isMultiSelectable() const
779 {
780     // FIXME: implement
781     return false;
782 }
783
784 bool AccessibilityUIElement::isSelectedOptionActive() const
785 {
786     // FIXME: implement
787     return false;
788 }
789
790 bool AccessibilityUIElement::isVisible() const
791 {
792     // FIXME: implement
793     return false;
794 }
795
796 bool AccessibilityUIElement::isOffScreen() const
797 {
798     // FIXME: implement
799     return false;
800 }
801
802 bool AccessibilityUIElement::isCollapsed() const
803 {
804     // FIXME: implement
805     return false;
806 }
807
808 bool AccessibilityUIElement::isIgnored() const
809 {
810     // FIXME: implement
811     return false;
812 }
813
814 bool AccessibilityUIElement::hasPopup() const
815 {
816     // FIXME: implement
817     return false;
818 }
819
820 void AccessibilityUIElement::takeFocus()
821 {
822     // FIXME: implement
823 }
824
825 void AccessibilityUIElement::takeSelection()
826 {
827     // FIXME: implement
828 }
829
830 void AccessibilityUIElement::addSelection()
831 {
832     // FIXME: implement
833 }
834
835 void AccessibilityUIElement::removeSelection()
836 {
837     // FIXME: implement
838 }
839
840 void AccessibilityUIElement::scrollToMakeVisible()
841 {
842     // FIXME: implement
843 }
844
845 void AccessibilityUIElement::scrollToMakeVisibleWithSubFocus(int x, int y, int width, int height)
846 {
847     // FIXME: implement
848 }
849
850 void AccessibilityUIElement::scrollToGlobalPoint(int x, int y)
851 {
852     // FIXME: implement
853 }