Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: views/native_types.h

Issue 7464027: Wayland support for views. views_desktop on Wayland. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Updated files to latest and fixed changes for dependent CLs Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef VIEWS_NATIVE_TYPES_H_ 5 #ifndef VIEWS_NATIVE_TYPES_H_
6 #define VIEWS_NATIVE_TYPES_H_ 6 #define VIEWS_NATIVE_TYPES_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ui/gfx/native_widget_types.h" 9 #include "ui/gfx/native_widget_types.h"
10 10
11 #if defined(OS_LINUX) 11 #if defined(OS_LINUX)
12 typedef union _GdkEvent GdkEvent; 12 typedef union _GdkEvent GdkEvent;
13 #endif 13 #endif
14 #if defined(USE_X11) 14 #if defined(USE_X11)
15 typedef union _XEvent XEvent; 15 typedef union _XEvent XEvent;
16 #endif 16 #endif
17 #if defined(USE_WAYLAND)
18 namespace ui {
19 union WaylandEvent;
20 }
21 #endif
17 22
18 namespace views { 23 namespace views {
19 24
20 // A note about NativeEvent and NativeEvent2. 25 // A note about NativeEvent and NativeEvent2.
21 // 1. Eventually TOOLKIT_VIEWS will converge on using XEvent as we remove 26 // 1. Eventually TOOLKIT_VIEWS will converge on using XEvent as we remove
22 // Gtk/Gdk from the stack. 27 // Gtk/Gdk from the stack.
23 // 2. TOUCH_UI needs XEvents now for certain event types. 28 // 2. TOUCH_UI needs XEvents now for certain event types.
24 // 3. TOUCH_UI also needs GdkEvents for certain event types. 29 // 3. TOUCH_UI also needs GdkEvents for certain event types.
25 // 30 //
26 // => NativeEvent and NativeEvent2. 31 // => NativeEvent and NativeEvent2.
27 // 32 //
28 // Once we replace usage of Gtk/Gdk types with Xlib types across the board in 33 // Once we replace usage of Gtk/Gdk types with Xlib types across the board in
29 // views, we can remove NativeEvent2 and typedef XEvent* to NativeEvent. The 34 // views, we can remove NativeEvent2 and typedef XEvent* to NativeEvent. The
30 // world will then be beautiful(ish). 35 // world will then be beautiful(ish).
31 36
32 #if defined(OS_WIN) 37 #if defined(OS_WIN)
33 typedef MSG NativeEvent; 38 typedef MSG NativeEvent;
34 #endif 39 #endif
35 #if defined(OS_LINUX) 40 #if defined(OS_LINUX)
41 #if defined(USE_WAYLAND)
42 typedef ui::WaylandEvent* NativeEvent;
43 #else
36 typedef GdkEvent* NativeEvent; 44 typedef GdkEvent* NativeEvent;
37 #endif 45 #endif
46 #endif
38 #if defined(USE_X11) 47 #if defined(USE_X11)
39 typedef XEvent* NativeEvent2; 48 typedef XEvent* NativeEvent2;
40 #else 49 #else
41 typedef void* NativeEvent2; 50 typedef void* NativeEvent2;
42 #endif 51 #endif
43 52
44 } // namespace views 53 } // namespace views
45 54
46 #endif // VIEWS_NATIVE_TYPES_H_ 55 #endif // VIEWS_NATIVE_TYPES_H_
47 56
OLDNEW
« views/mouse_watcher.cc ('K') | « views/mouse_watcher.cc ('k') | views/view_wayland.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698