diff options
Diffstat (limited to 'base')
-rw-r--r-- | base/base.gypi | 8 | ||||
-rw-r--r-- | base/event_types.h | 10 | ||||
-rw-r--r-- | base/message_loop.h | 4 | ||||
-rw-r--r-- | base/message_pump_wayland.h | 44 | ||||
-rw-r--r-- | base/wayland/wayland_event.h | 117 |
5 files changed, 2 insertions, 181 deletions
diff --git a/base/base.gypi b/base/base.gypi index bc310e6..f9fb0c0 100644 --- a/base/base.gypi +++ b/base/base.gypi @@ -400,7 +400,6 @@ 'nix/mime_util_xdg.h', 'nix/xdg_util.cc', 'nix/xdg_util.h', - 'wayland/wayland_event.h', 'win/accessibility_misc_utils.h', 'win/accessibility_misc_utils.cc', 'win/enum_variant.h', @@ -478,12 +477,6 @@ 'sources!' : [ 'message_pump_gtk.cc', ], 'sources/' : [ [ 'include', '^message_pump_x\\.cc$', ] ], }], - [ 'use_wayland==1', { - 'sources/': [ - [ 'exclude', '^message_pump_gtk\\.cc$',], - [ 'exclude', '^message_pump_x\\.cc$',], - ], - }], [ 'OS != "linux" and os_bsd != 1', { 'sources!': [ # Not automatically excluded by the *linux.cc rules. @@ -783,7 +776,6 @@ 'message_pump_libevent.h', 'message_pump_mac.h', 'message_pump_mac.mm', - 'message_pump_wayland.h', 'metrics/field_trial.cc', 'metrics/field_trial.h', 'string16.cc', diff --git a/base/event_types.h b/base/event_types.h index ed0f02f..3a3b6d2 100644 --- a/base/event_types.h +++ b/base/event_types.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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. @@ -10,12 +10,6 @@ #if defined(OS_WIN) #include <windows.h> -#elif defined(USE_WAYLAND) -namespace base { -namespace wayland { -union WaylandEvent; -} -} #elif defined(USE_X11) typedef union _XEvent XEvent; #elif defined(OS_MACOSX) @@ -31,8 +25,6 @@ namespace base { // Cross platform typedefs for native event types. #if defined(OS_WIN) typedef MSG NativeEvent; -#elif defined(USE_WAYLAND) -typedef wayland::WaylandEvent* NativeEvent; #elif defined(USE_X11) typedef XEvent* NativeEvent; #elif defined(OS_MACOSX) diff --git a/base/message_loop.h b/base/message_loop.h index 0611ad4..4527c5b 100644 --- a/base/message_loop.h +++ b/base/message_loop.h @@ -31,9 +31,7 @@ #include "base/message_pump_libevent.h" #if !defined(OS_MACOSX) && !defined(OS_ANDROID) -#if defined(USE_WAYLAND) -#include "base/message_pump_wayland.h" -#elif defined(USE_AURA) +#if defined(USE_AURA) #include "base/message_pump_x.h" #else #include "base/message_pump_gtk.h" diff --git a/base/message_pump_wayland.h b/base/message_pump_wayland.h deleted file mode 100644 index 89c9b8f..0000000 --- a/base/message_pump_wayland.h +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2011 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 BASE_MESSAGE_PUMP_WAYLAND_H_ -#define BASE_MESSAGE_PUMP_WAYLAND_H_ -#pragma once - -#include "base/memory/scoped_ptr.h" -#include "base/message_pump_glib.h" -#include "base/message_pump_observer.h" - -namespace base { - -namespace wayland { -union WaylandEvent; -} - -// The documentation for this class is in message_pump_glib.h -// -// The nested loop is exited by either posting a quit, or returning false -// from Dispatch. -class MessagePumpDispatcher { - public: - enum DispatchStatus { - EVENT_IGNORED, // The event was not processed. - EVENT_PROCESSED, // The event has been processed. - EVENT_QUIT // The event was processed and the message-loop should - // terminate. - }; - - // Dispatches the event. If true is returned processing continues as - // normal. If false is returned, the nested loop exits immediately. - virtual DispatchStatus Dispatch(wayland::WaylandEvent* event) = 0; - - protected: - virtual ~MessagePumpDispatcher() {} -}; - -typedef MessagePumpGlib MessagePumpForUI; - -} // namespace base - -#endif // BASE_MESSAGE_PUMP_WAYLAND_H_ diff --git a/base/wayland/wayland_event.h b/base/wayland/wayland_event.h deleted file mode 100644 index 1d6808d..0000000 --- a/base/wayland/wayland_event.h +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (c) 2011 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 BASE_WAYLAND_WAYLAND_EVENT_H_ -#define BASE_WAYLAND_WAYLAND_EVENT_H_ - -#include <stdint.h> - -// Wayland event information is being passed in as arguments to the callbacks. -// (See wayland_input_device.{h,cc} for information on the callbacks and how -// events are processed.) -// In order to provide a more generic look for events we wrap these arguments -// in specific event structs. Then define a WaylandEvent as a union of all -// types of events that Wayland will send. -// -// The following fields are common for most event types and their use is -// similar: -// - time: -// The time of the event. This should be monotonically increasing. -// - state: -// The value of the button event as given by evdev. This is 0 if button -// isn't pressed. -// - modifiers: -// Stores all the keyboard modifiers (Ctrl, Alt, Shift, ...) currently -// active. The modifiers are values as defined by xkbcommon. - -namespace base { -namespace wayland { - -// Types of events Wayland will send -enum WaylandEventType { - WAYLAND_BUTTON, - WAYLAND_KEY, - WAYLAND_MOTION, - WAYLAND_POINTER_FOCUS, - WAYLAND_KEYBOARD_FOCUS, - WAYLAND_GEOMETRY_CHANGE, -}; - -struct WaylandEventButton { - WaylandEventType type; - uint32_t time; - // WaylandEventButtonType defines some of the values button can take - uint32_t button; - uint32_t state; - uint32_t modifiers; - int32_t x; - int32_t y; -}; - -struct WaylandEventKey { - WaylandEventType type; - uint32_t time; - // The raw key value that evdev returns. - uint32_t key; - // The key symbol returned by processing the raw key using the xkbcommon - // library. - uint32_t sym; - uint32_t state; - uint32_t modifiers; -}; - -// Triggered when there is a motion event. The motion event is triggered -// only if there is a window under focus. -struct WaylandEventMotion { - WaylandEventType type; - uint32_t time; - uint32_t modifiers; - int32_t x; - int32_t y; -}; - -// Triggered when a window enters/exits pointer focus. The state tells us -// if the window lost focus (state == 0) or gained focus (state != 0). -struct WaylandEventPointerFocus { - WaylandEventType type; - uint32_t time; - uint32_t state; - int32_t x; - int32_t y; -}; - -// Triggered when a window enters/exits keyboard focus. The state tells us -// if the window lost focus (state == 0) or gained focus (state != 0). -struct WaylandEventKeyboardFocus { - WaylandEventType type; - uint32_t time; - uint32_t state; - uint32_t modifiers; -}; - -// Event triggered when a window's geometry changes. The event contains the -// position and dimensions of the window. -struct WaylandEventGeometryChange { - WaylandEventType type; - uint32_t time; - int32_t x; - int32_t y; - int32_t width; - int32_t height; -}; - -union WaylandEvent { - WaylandEventType type; - WaylandEventButton button; - WaylandEventKey key; - WaylandEventMotion motion; - WaylandEventPointerFocus pointer_focus; - WaylandEventKeyboardFocus keyboard_focus; - WaylandEventGeometryChange geometry_change; -}; - -} // namespace wayland -} // namespace base - -#endif // BASE_WAYLAND_WAYLAND_EVENT_H_ |