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

Side by Side Diff: views/native_types.h

Issue 7741001: Add Aura support to views: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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 17
18 #if defined(USE_AURA)
19 namespace aura {
20 class Event;
21 }
22 #endif
23
18 namespace views { 24 namespace views {
19 25
20 // A note about NativeEvent and NativeEvent2. 26 // A note about NativeEvent and NativeEvent2.
21 // 1. Eventually TOOLKIT_VIEWS will converge on using XEvent as we remove 27 // 1. Eventually TOOLKIT_VIEWS will converge on using XEvent as we remove
22 // Gtk/Gdk from the stack. 28 // Gtk/Gdk from the stack.
23 // 2. TOUCH_UI needs XEvents now for certain event types. 29 // 2. TOUCH_UI needs XEvents now for certain event types.
24 // 3. TOUCH_UI also needs GdkEvents for certain event types. 30 // 3. TOUCH_UI also needs GdkEvents for certain event types.
25 // 31 //
26 // => NativeEvent and NativeEvent2. 32 // => NativeEvent and NativeEvent2.
27 // 33 //
28 // Once we replace usage of Gtk/Gdk types with Xlib types across the board in 34 // 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 35 // views, we can remove NativeEvent2 and typedef XEvent* to NativeEvent. The
30 // world will then be beautiful(ish). 36 // world will then be beautiful(ish).
31 37
32 #if defined(OS_WIN) 38 #if defined(USE_AURA)
39 typedef aura::Event* NativeEvent;
40 #elif defined(OS_WIN)
33 typedef MSG NativeEvent; 41 typedef MSG NativeEvent;
34 #endif 42 #elif defined(OS_LINUX)
35 #if defined(OS_LINUX)
36 typedef GdkEvent* NativeEvent; 43 typedef GdkEvent* NativeEvent;
37 #endif 44 #endif
45
38 #if defined(USE_X11) 46 #if defined(USE_X11)
39 typedef XEvent* NativeEvent2; 47 typedef XEvent* NativeEvent2;
40 #else 48 #else
41 typedef void* NativeEvent2; 49 typedef void* NativeEvent2;
42 #endif 50 #endif
43 51
44 } // namespace views 52 } // namespace views
45 53
46 #endif // VIEWS_NATIVE_TYPES_H_ 54 #endif // VIEWS_NATIVE_TYPES_H_
47 55
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698