summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/Widget.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/Widget.h')
-rw-r--r--WebCore/platform/Widget.h69
1 files changed, 56 insertions, 13 deletions
diff --git a/WebCore/platform/Widget.h b/WebCore/platform/Widget.h
index 803bf3b..23d228e 100644
--- a/WebCore/platform/Widget.h
+++ b/WebCore/platform/Widget.h
@@ -21,14 +21,12 @@
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef Widget_h
#define Widget_h
-#include <wtf/Platform.h>
-
#if PLATFORM(MAC)
#ifdef __OBJC__
@class NSView;
@@ -79,6 +77,12 @@ typedef BView* PlatformWidget;
#include "PlatformWidget.h"
#endif
+#if PLATFORM(EFL)
+#include <Ecore_Evas.h>
+#include <Evas.h>
+typedef Evas_Object* PlatformWidget;
+#endif
+
#if PLATFORM(QT)
class QWebPageClient;
typedef QWebPageClient* PlatformPageClient;
@@ -101,6 +105,9 @@ class GraphicsContext;
class PlatformMouseEvent;
class ScrollView;
class WidgetPrivate;
+#if PLATFORM(EFL)
+class String;
+#endif
// The Widget class serves as a base class for three kinds of objects:
// (1) Scrollable areas (ScrollView)
@@ -124,13 +131,20 @@ public:
PlatformWidget platformWidget() const { return m_widget; }
void setPlatformWidget(PlatformWidget widget)
- {
+ {
if (widget != m_widget) {
releasePlatformWidget();
m_widget = widget;
retainPlatformWidget();
}
}
+#if PLATFORM(HAIKU)
+ PlatformWidget topLevelPlatformWidget() const { return m_topLevelPlatformWidget; }
+ void setTopLevelPlatformWidget(PlatformWidget widget)
+ {
+ m_topLevelPlatformWidget = widget;
+ }
+#endif
int x() const { return frameRect().x(); }
int y() const { return frameRect().y(); }
@@ -152,7 +166,7 @@ public:
void invalidate() { invalidateRect(boundsRect()); }
virtual void invalidateRect(const IntRect&) = 0;
- virtual void setFocus();
+ virtual void setFocus(bool);
void setCursor(const Cursor&);
@@ -168,7 +182,7 @@ public:
virtual bool isFrameView() const { return false; }
virtual bool isPluginView() const { return false; }
- // FIXME: The Mac plug-in code should inherit from PluginView. When this happens PluginWidget and PluginView can become one class.
+ // FIXME: The Mac plug-in code should inherit from PluginView. When this happens PluginWidget and PluginView can become one class.
virtual bool isPluginWidget() const { return false; }
virtual bool isScrollbar() const { return false; }
@@ -185,21 +199,38 @@ public:
// when converting window rects.
IntRect convertToContainingWindow(const IntRect&) const;
IntRect convertFromContainingWindow(const IntRect&) const;
-
+
IntPoint convertToContainingWindow(const IntPoint&) const;
IntPoint convertFromContainingWindow(const IntPoint&) const;
- virtual void frameRectsChanged() {}
+ virtual void frameRectsChanged();
+
+ // Notifies this widget that other widgets on the page have been repositioned.
+ virtual void widgetPositionsUpdated() {}
#if PLATFORM(MAC)
NSView* getOuterView() const;
-
+
static void beforeMouseDown(NSView*, Widget*);
static void afterMouseDown(NSView*, Widget*);
void removeFromSuperview();
#endif
+#if PLATFORM(EFL)
+ // FIXME: These should really go to PlatformWidget. They're here currently since
+ // the EFL port considers that Evas_Object (a C object) is a PlatformWidget, but
+ // encapsulating that into a C++ class will make this header clean as it should be.
+ Evas* evas() const;
+
+ void setEvasObject(Evas_Object*);
+ Evas_Object* evasObject() const;
+
+ const String edjeTheme() const;
+ void setEdjeTheme(const String &);
+ const String edjeThemeRecursive() const;
+#endif
+
// Virtual methods to convert points to/from the containing ScrollView
virtual IntRect convertToContainingView(const IntRect&) const;
virtual IntRect convertFromContainingView(const IntRect&) const;
@@ -211,12 +242,12 @@ private:
void releasePlatformWidget();
void retainPlatformWidget();
-
+
// These methods are used to convert from the root widget to the containing window,
// which has behavior that may differ between platforms (e.g. Mac uses flipped window coordinates).
static IntRect convertFromRootToContainingWindow(const Widget* rootWidget, const IntRect&);
static IntRect convertFromContainingWindowToRoot(const Widget* rootWidget, const IntRect&);
-
+
static IntPoint convertFromRootToContainingWindow(const Widget* rootWidget, const IntPoint&);
static IntPoint convertFromContainingWindowToRoot(const Widget* rootWidget, const IntPoint&);
@@ -225,12 +256,24 @@ private:
PlatformWidget m_widget;
bool m_selfVisible;
bool m_parentVisible;
-
+
IntRect m_frame; // Not used when a native widget exists.
-#if PLATFORM(MAC)
+#if PLATFORM(EFL)
+ // FIXME: Please see the previous #if PLATFORM(EFL) block.
+ Ecore_Evas* ecoreEvas() const;
+
+ void applyFallbackCursor();
+ void applyCursor();
+#endif
+
+#if PLATFORM(MAC) || PLATFORM(EFL)
WidgetPrivate* m_data;
#endif
+
+#if PLATFORM(HAIKU)
+ PlatformWidget m_topLevelPlatformWidget;
+#endif
#if PLATFORM(ANDROID)
public:
int screenWidth() const;