1/*
2 * Copyright (C) 2006 Michael Emmel mike.emmel@gmail.com
3 * Copyright (C) 2007 Holger Hans Peter Freyther
4 * Copyright (C) 2008 Kenneth Rohde Christiansen
5 * Copyright (C) 2009-2010 ProFUSION embedded systems
6 * Copyright (C) 2009-2012 Samsung Electronics
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
11 * are met:
12 * 1. Redistributions of source code must retain the above copyright
13 *    notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 *    notice, this list of conditions and the following disclaimer in the
16 *    documentation and/or other materials provided with the distribution.
17 *
18 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
19 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
22 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
25 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
26 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */
30
31
32#include "config.h"
33#include "Widget.h"
34
35#include "ChromeClient.h"
36#include "Cursor.h"
37#include "EflScreenUtilities.h"
38#include "Frame.h"
39#include "FrameView.h"
40#include "GraphicsContext.h"
41#include "IntRect.h"
42#include "NotImplemented.h"
43#include "Page.h"
44
45#include <Ecore.h>
46#include <Evas.h>
47
48namespace WebCore {
49
50Widget::Widget(PlatformWidget widget)
51    : m_parent(0)
52    , m_widget(0)
53    , m_selfVisible(false)
54    , m_parentVisible(false)
55    , m_frame(0, 0, 0, 0)
56    , m_evasObject(0)
57{
58    init(widget);
59}
60
61Widget::~Widget()
62{
63    ASSERT(!parent());
64}
65
66IntRect Widget::frameRect() const
67{
68    return m_frame;
69}
70
71void Widget::setFrameRect(const IntRect& rect)
72{
73    m_frame = rect;
74    Widget::frameRectsChanged();
75}
76
77void Widget::frameRectsChanged()
78{
79    notImplemented();
80}
81
82void Widget::setFocus(bool)
83{
84}
85
86void Widget::setCursor(const Cursor& cursor)
87{
88    ScrollView* view = root();
89    if (!view)
90        return;
91    view->hostWindow()->setCursor(cursor);
92}
93
94void Widget::show()
95{
96    notImplemented();
97}
98
99void Widget::hide()
100{
101    notImplemented();
102}
103
104void Widget::paint(GraphicsContext*, const IntRect&)
105{
106    notImplemented();
107}
108
109void Widget::setIsSelected(bool)
110{
111    notImplemented();
112}
113
114void Widget::setEvasObject(Evas_Object* object)
115{
116    m_evasObject = object;
117}
118
119}
120