blob: 9f00ef2373bf693cbf9d8862ff0aed00f5e50d43 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef WEBKIT_GLUE_EVENT_CONVERSION_H__
#define WEBKIT_GLUE_EVENT_CONVERSION_H__
#pragma warning(push, 0)
#include "PlatformKeyboardEvent.h"
#include "PlatformMouseEvent.h"
#include "PlatformWheelEvent.h"
#pragma warning(pop)
namespace WebCore {
class Widget;
}
class WebMouseEvent;
class WebMouseWheelEvent;
class WebKeyboardEvent;
// These classes are used to convert from WebInputEvent subclasses to
// corresponding WebCore events.
class MakePlatformMouseEvent : public WebCore::PlatformMouseEvent {
public:
MakePlatformMouseEvent(WebCore::Widget* widget, const WebMouseEvent& e);
static void ResetLastClick() {
last_click_time_ = last_click_count_ = 0;
}
private:
static int last_click_count_;
static long last_click_time_;
};
class MakePlatformWheelEvent : public WebCore::PlatformWheelEvent {
public:
MakePlatformWheelEvent(WebCore::Widget* widget, const WebMouseWheelEvent& e);
};
class MakePlatformKeyboardEvent : public WebCore::PlatformKeyboardEvent {
public:
MakePlatformKeyboardEvent(const WebKeyboardEvent& e);
void SetKeyType(Type type);
bool IsCharacterKey() const;
};
#endif // WEBKIT_GLUE_EVENT_CONVERSION_H__
|