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

Side by Side Diff: views/events/event.h

Issue 7065042: Hook up more of the NativeWidgetViews. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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_EVENTS_EVENT_H_ 5 #ifndef VIEWS_EVENTS_EVENT_H_
6 #define VIEWS_EVENTS_EVENT_H_ 6 #define VIEWS_EVENTS_EVENT_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/time.h" 10 #include "base/time.h"
11 #include "ui/base/events.h" 11 #include "ui/base/events.h"
12 #include "ui/base/keycodes/keyboard_codes.h" 12 #include "ui/base/keycodes/keyboard_codes.h"
13 #include "ui/gfx/point.h" 13 #include "ui/gfx/point.h"
14 #include "views/native_types.h" 14 #include "views/native_types.h"
15 15
16 #if defined(TOUCH_UI) 16 #if defined(TOUCH_UI)
17 typedef union _XEvent XEvent; 17 typedef union _XEvent XEvent;
18 #endif 18 #endif
19 19
20 namespace ui { 20 namespace ui {
21 class OSExchangeData; 21 class OSExchangeData;
22 } 22 }
23 using ui::OSExchangeData; 23 using ui::OSExchangeData;
24 24
25 namespace views { 25 namespace views {
26 26
27 class View; 27 class View;
28 28
29 namespace internal { 29 namespace internal {
30 class NativeWidgetView;
30 class RootView; 31 class RootView;
31 } 32 }
32 33
33 #if defined(OS_WIN) 34 #if defined(OS_WIN)
34 bool IsClientMouseEvent(const views::NativeEvent& native_event); 35 bool IsClientMouseEvent(const views::NativeEvent& native_event);
35 bool IsNonClientMouseEvent(const views::NativeEvent& native_event); 36 bool IsNonClientMouseEvent(const views::NativeEvent& native_event);
36 #endif 37 #endif
37 38
38 //////////////////////////////////////////////////////////////////////////////// 39 ////////////////////////////////////////////////////////////////////////////////
39 // 40 //
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 bool IsRightMouseButton() const { 228 bool IsRightMouseButton() const {
228 return (flags() & ui::EF_RIGHT_BUTTON_DOWN) != 0; 229 return (flags() & ui::EF_RIGHT_BUTTON_DOWN) != 0;
229 } 230 }
230 231
231 protected: 232 protected:
232 MouseEvent(const MouseEvent& model, View* root) 233 MouseEvent(const MouseEvent& model, View* root)
233 : LocatedEvent(model, root) { 234 : LocatedEvent(model, root) {
234 } 235 }
235 236
236 private: 237 private:
238 friend class internal::NativeWidgetView;
237 friend class internal::RootView; 239 friend class internal::RootView;
238 240
239 DISALLOW_COPY_AND_ASSIGN(MouseEvent); 241 DISALLOW_COPY_AND_ASSIGN(MouseEvent);
240 }; 242 };
241 243
242 #if defined(TOUCH_UI) 244 #if defined(TOUCH_UI)
243 //////////////////////////////////////////////////////////////////////////////// 245 ////////////////////////////////////////////////////////////////////////////////
244 // 246 //
245 // TouchEvent class 247 // TouchEvent class
246 // 248 //
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 static const int kWheelDelta; 372 static const int kWheelDelta;
371 373
372 explicit MouseWheelEvent(NativeEvent native_event); 374 explicit MouseWheelEvent(NativeEvent native_event);
373 MouseWheelEvent(NativeEvent2 native_event_2, FromNativeEvent2 from_native); 375 MouseWheelEvent(NativeEvent2 native_event_2, FromNativeEvent2 from_native);
374 376
375 // The amount to scroll. This is in multiples of kWheelDelta. 377 // The amount to scroll. This is in multiples of kWheelDelta.
376 int offset() const { return offset_; } 378 int offset() const { return offset_; }
377 379
378 private: 380 private:
379 friend class internal::RootView; 381 friend class internal::RootView;
382 friend class internal::NativeWidgetView;
380 383
381 MouseWheelEvent(const MouseWheelEvent& model, View* root) 384 MouseWheelEvent(const MouseWheelEvent& model, View* root)
382 : MouseEvent(model, root), 385 : MouseEvent(model, root),
383 offset_(model.offset_) { 386 offset_(model.offset_) {
384 } 387 }
385 388
386 int offset_; 389 int offset_;
387 390
388 DISALLOW_COPY_AND_ASSIGN(MouseWheelEvent); 391 DISALLOW_COPY_AND_ASSIGN(MouseWheelEvent);
389 }; 392 };
(...skipping 27 matching lines...) Expand all
417 420
418 // Bitmask of supported ui::DragDropTypes::DragOperation by the source. 421 // Bitmask of supported ui::DragDropTypes::DragOperation by the source.
419 int source_operations_; 422 int source_operations_;
420 423
421 DISALLOW_COPY_AND_ASSIGN(DropTargetEvent); 424 DISALLOW_COPY_AND_ASSIGN(DropTargetEvent);
422 }; 425 };
423 426
424 } // namespace views 427 } // namespace views
425 428
426 #endif // VIEWS_EVENTS_EVENT_H_ 429 #endif // VIEWS_EVENTS_EVENT_H_
OLDNEW
« no previous file with comments | « no previous file | views/examples/native_widget_views_example.cc » ('j') | views/examples/native_widget_views_example.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698