Commit c4efd654 authored by eric@webkit.org's avatar eric@webkit.org

2009-08-12 Maxime Simon <simon.maxime@gmail.com>

        Reviewed by Eric Seidel.

        [Haiku] Adding modification to the WebCore/platform/ files to allow
        the Haiku port.
        https://bugs.webkit.org/show_bug.cgi?id=28128

        * platform/ContextMenuItem.h: BMenu is the PlatformMenuItemDescription
        class of Haiku.
        * platform/Cursor.h: BCursor is the Cursor class of Haiku.
        * platform/DragData.h: Use a BMessage as DragDataRef.
        * platform/DragImage.h: Use a BBitmap as DragImageRef.
        * platform/PlatformKeyboardEvent.h: Use BMessage as event vehicle.
        * platform/PlatformMenuDescription.h: BMenu is the
        PlatformMenuDescription class of Haiku.
        * platform/PlatformMouseEvent.h: Use BMessage as event vehicle.
        * platform/PlatformWheelEvent.h: Use BMessage as event vehicle.
        * platform/PopupMenu.h: Adding a m_menu attribute for Haiku.
        * platform/Widget.h: BView is the PlatformWidget class of Haiku.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47145 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 1c3f6321
2009-08-12 Maxime Simon <simon.maxime@gmail.com>
Reviewed by Eric Seidel.
[Haiku] Adding modification to the WebCore/platform/ files to allow
the Haiku port.
https://bugs.webkit.org/show_bug.cgi?id=28128
* platform/ContextMenuItem.h: BMenu is the PlatformMenuItemDescription
class of Haiku.
* platform/Cursor.h: BCursor is the Cursor class of Haiku.
* platform/DragData.h: Use a BMessage as DragDataRef.
* platform/DragImage.h: Use a BBitmap as DragImageRef.
* platform/PlatformKeyboardEvent.h: Use BMessage as event vehicle.
* platform/PlatformMenuDescription.h: BMenu is the
PlatformMenuDescription class of Haiku.
* platform/PlatformMouseEvent.h: Use BMessage as event vehicle.
* platform/PlatformWheelEvent.h: Use BMessage as event vehicle.
* platform/PopupMenu.h: Adding a m_menu attribute for Haiku.
* platform/Widget.h: BView is the PlatformWidget class of Haiku.
2009-08-12 Maxime Simon <simon.maxime@gmail.com>
Reviewed by Eric Seidel.
......@@ -46,6 +46,8 @@ typedef struct _GtkMenuItem GtkMenuItem;
#include <QAction>
#elif PLATFORM(WX)
class wxMenuItem;
#elif PLATFORM(HAIKU)
class BMenuItem;
#endif
namespace WebCore {
......@@ -202,6 +204,8 @@ namespace WebCore {
bool checked;
bool enabled;
};
#elif PLATFORM(HAIKU)
typedef BMenuItem* PlatformMenuItemDescription;
#else
typedef void* PlatformMenuItemDescription;
#endif
......
......@@ -40,6 +40,8 @@ typedef struct _GdkCursor GdkCursor;
#include <QCursor>
#elif PLATFORM(CHROMIUM)
#include "PlatformCursor.h"
#elif PLATFORM(HAIKU)
#include <app/Cursor.h>
#endif
#if PLATFORM(MAC)
......@@ -86,6 +88,9 @@ namespace WebCore {
#elif PLATFORM(CHROMIUM)
// See PlatformCursor.h
typedef void* PlatformCursorHandle;
#elif PLATFORM(HAIKU)
typedef BCursor* PlatformCursor;
typedef BCursor* PlatformCursorHandle;
#else
typedef void* PlatformCursor;
typedef void* PlatformCursorHandle;
......
......@@ -56,6 +56,9 @@ typedef class wxDataObject* DragDataRef;
typedef void* DragDataRef;
#elif PLATFORM(CHROMIUM)
#include "DragDataRef.h"
#elif PLATFORM(HAIKU)
class BMessage;
typedef class BMessage* DragDataRef;
#endif
......
......@@ -48,6 +48,8 @@ class wxDragImage;
#include "DragImageRef.h"
#elif PLATFORM(GTK)
typedef struct _GdkPixbuf GdkPixbuf;
#elif PLATFORM(HAIKU)
class BBitmap;
#endif
//We need to #define YOffset as it needs to be shared with WebKit
......@@ -72,6 +74,8 @@ namespace WebCore {
typedef wxDragImage* DragImageRef;
#elif PLATFORM(GTK)
typedef GdkPixbuf* DragImageRef;
#elif PLATFORM(HAIKU)
typedef BBitmap* DragImageRef;
#endif
IntSize dragImageSize(DragImageRef);
......
......@@ -59,6 +59,10 @@ QT_END_NAMESPACE
class wxKeyEvent;
#endif
#if PLATFORM(HAIKU)
class BMessage;
#endif
namespace WebCore {
class PlatformKeyboardEvent {
......@@ -148,6 +152,10 @@ namespace WebCore {
PlatformKeyboardEvent(wxKeyEvent&);
#endif
#if PLATFORM(HAIKU)
PlatformKeyboardEvent(BMessage*);
#endif
#if PLATFORM(WIN) || PLATFORM(CHROMIUM)
bool isSystemKey() const { return m_isSystemKey; }
#endif
......
......@@ -40,6 +40,8 @@ typedef struct HMENU__* HMENU;
typedef struct _GtkMenu GtkMenu;
#elif PLATFORM(WX)
class wxMenu;
#elif PLATFORM(HAIKU)
class BMenu;
#endif
namespace WebCore {
......@@ -55,6 +57,8 @@ namespace WebCore {
typedef GtkMenu* PlatformMenuDescription;
#elif PLATFORM(WX)
typedef wxMenu* PlatformMenuDescription;
#elif PLATFORM(HAIKU)
typedef BMenu* PlatformMenuDescription;
#else
typedef void* PlatformMenuDescription;
#endif
......
......@@ -50,6 +50,10 @@ typedef long LPARAM;
class wxMouseEvent;
#endif
#if PLATFORM(HAIKU)
class BMessage;
#endif
namespace WebCore {
// These button numbers match the ones used in the DOM API, 0 through 2, except for NoButton which isn't specified.
......@@ -128,6 +132,10 @@ namespace WebCore {
PlatformMouseEvent(const wxMouseEvent&, const wxPoint& globalPoint, int clickCount);
#endif
#if PLATFORM(HAIKU)
PlatformMouseEvent(const BMessage*);
#endif
protected:
IntPoint m_position;
IntPoint m_globalPosition;
......
......@@ -49,6 +49,10 @@ class wxMouseEvent;
class wxPoint;
#endif
#if PLATFORM(HAIKU)
class BMessage;
#endif
namespace WebCore {
class FloatPoint;
......@@ -109,6 +113,10 @@ namespace WebCore {
PlatformWheelEvent(const wxMouseEvent&, const wxPoint&);
#endif
#if PLATFORM(HAIKU)
PlatformWheelEvent(BMessage*);
#endif
protected:
IntPoint m_position;
IntPoint m_globalPosition;
......
......@@ -59,6 +59,8 @@ class wxMenu;
#include <wx/event.h>
#elif PLATFORM(CHROMIUM)
#include "PopupMenuPrivate.h"
#elif PLATFORM(HAIKU)
class BMenu;
#endif
namespace WebCore {
......@@ -177,6 +179,8 @@ private:
void OnMenuItemSelected(wxCommandEvent&);
#elif PLATFORM(CHROMIUM)
PopupMenuPrivate p;
#elif PLATFORM(HAIKU)
BMenu* m_menu;
#endif
};
......
......@@ -65,6 +65,11 @@ class wxWindow;
typedef wxWindow* PlatformWidget;
#endif
#if PLATFORM(HAIKU)
class BView;
typedef BView* PlatformWidget;
#endif
#if PLATFORM(CHROMIUM)
#include "PlatformWidget.h"
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment