2 * Copyright (C) 2012 Samsung Electronics
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public License
15 * along with this library; see the file COPYING.LIB. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
23 #if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)
27 #include <WebCore/IntPoint.h>
28 #include <WebCore/IntRect.h>
29 #include <wtf/PassOwnPtr.h>
35 static PassOwnPtr<FocusRing> create(EwkViewImpl* viewImpl)
37 return adoptPtr(new FocusRing(viewImpl));
41 void setImageDrawing(bool);
43 void requestToShow(const WebCore::IntPoint&);
45 void show(const WebCore::IntRect&, const bool includeOnlyImage = false);
46 void hide(bool = true);
48 void updateScrollAndScale(const WebCore::IntPoint&, float);
50 const WebCore::IntRect& rect() { return m_rect; }
51 WebCore::IntPoint centerPointInScreen();
54 static const int s_showTimerTime = 100;
55 static Eina_Bool showTimerCallback(void* data);
57 static const int s_imageOuterWidth;
58 static const int s_imageInnerWidth;
61 FocusRing(EwkViewImpl* viewImpl);
62 void internalShow(bool, const WebCore::IntRect&);
64 EwkViewImpl* m_viewImpl;
66 Evas_Object* m_focusRingObject;
67 bool m_isImageDrawing;
69 Ecore_Timer* m_showTimer;
70 WebCore::IntPoint m_position;
72 WebCore::IntRect m_rect;
75 #endif // #if ENABLE(TIZEN_WEBKIT2_FOCUS_RING)