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

Side by Side Diff: base/message_pump_glib_x_dispatch.h

Issue 5110011: A non-GTK version of menus for touchui. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: fix compile for touch on chromeos Created 10 years 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
« no previous file with comments | « base/message_pump_glib_x.cc ('k') | chrome/browser/chromeos/views/native_menu_domui.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 BASE_MESSAGE_PUMP_GLIB_X_DISPATCH_H 5 #ifndef BASE_MESSAGE_PUMP_GLIB_X_DISPATCH_H
6 #define BASE_MESSAGE_PUMP_GLIB_X_DISPATCH_H 6 #define BASE_MESSAGE_PUMP_GLIB_X_DISPATCH_H
7 7
8 #include "base/message_pump.h" 8 #include "base/message_pump.h"
9 #include "base/message_pump_glib.h" 9 #include "base/message_pump_glib.h"
10 10
11 typedef union _XEvent XEvent; 11 typedef union _XEvent XEvent;
12 12
13 namespace base { 13 namespace base {
14 14
15 // The message pump used for TOUCH_UI on linux is MessagePumpGlibX, which can 15 // The message pump used for TOUCH_UI on linux is MessagePumpGlibX, which can
16 // dispatch both GdkEvents* and XEvents* captured directly from X. 16 // dispatch both GdkEvents* and XEvents* captured directly from X.
17 // MessagePumpForUI::Dispatcher provides the mechanism for dispatching 17 // MessagePumpForUI::Dispatcher provides the mechanism for dispatching
18 // GdkEvents. This class provides additional mechanism for dispatching XEvents. 18 // GdkEvents. This class provides additional mechanism for dispatching XEvents.
19 class MessagePumpGlibXDispatcher : public MessagePumpForUI::Dispatcher { 19 class MessagePumpGlibXDispatcher : public MessagePumpForUI::Dispatcher {
20 public: 20 public:
21 // Dispatches the event. If true is returned processing continues as 21
22 // normal. If false is returned, the nested loop exits immediately. 22 typedef enum {
23 virtual bool Dispatch(XEvent* xevent) = 0; 23 EVENT_IGNORED, // The event was not processed.
24 EVENT_PROCESSED, // The event has been processed.
25 EVENT_QUIT // The event was processed and the message-loop should
26 // terminate.
27 } DispatchStatus;
28
29 // Dispatches the event. EVENT_IGNORED is returned if the event was ignored
30 // (i.e. not processed). EVENT_PROCESSED is returned if the event was
31 // processed. The nested loop exits immediately if EVENT_QUIT is returned.
32 virtual DispatchStatus Dispatch(XEvent* xevent) = 0;
24 }; 33 };
25 34
26 } // namespace base 35 } // namespace base
27 36
28 #endif // BASE_MESSAGE_PUMP_GLIB_X_DISPATCH_H 37 #endif // BASE_MESSAGE_PUMP_GLIB_X_DISPATCH_H
OLDNEW
« no previous file with comments | « base/message_pump_glib_x.cc ('k') | chrome/browser/chromeos/views/native_menu_domui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698