OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_H_ | 5 #ifndef UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_H_ |
6 #define UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_H_ | 6 #define UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
57 // | 57 // |
58 // For those that know X11, this is really a wrapper around XWindowEvent | 58 // For those that know X11, this is really a wrapper around XWindowEvent |
59 // which still makes sure the preempted event is dispatched instead of | 59 // which still makes sure the preempted event is dispatched instead of |
60 // dropped on the floor. This method exists because mapping a window is | 60 // dropped on the floor. This method exists because mapping a window is |
61 // asynchronous (and we receive an XEvent when mapped), while there are also | 61 // asynchronous (and we receive an XEvent when mapped), while there are also |
62 // functions which require a mapped window. | 62 // functions which require a mapped window. |
63 void BlockUntilWindowMapped(XID window); | 63 void BlockUntilWindowMapped(XID window); |
64 | 64 |
65 void BlockUntilWindowUnmapped(XID window); | 65 void BlockUntilWindowUnmapped(XID window); |
66 | 66 |
67 // Dispatches a given event immediately. This is to faciliate sequential | |
68 // interaction between the gtk event loop (used for IME) and the | |
69 // main X11 event loop. | |
70 void DispatchEventNow(XEvent* event); | |
Yuki
2016/08/16 09:26:11
nit: We should declare this member function betwee
dtapuska
2016/08/16 14:48:29
Done.
| |
71 | |
67 XDisplay* display() { return display_; } | 72 XDisplay* display() { return display_; } |
68 Time last_seen_server_time() const { return last_seen_server_time_; } | 73 Time last_seen_server_time() const { return last_seen_server_time_; } |
69 | 74 |
70 // Explicitly asks the X11 server for the current timestamp, and updates | 75 // Explicitly asks the X11 server for the current timestamp, and updates |
71 // |last_seen_server_time| with this value. | 76 // |last_seen_server_time| with this value. |
72 Time UpdateLastSeenServerTime(); | 77 Time UpdateLastSeenServerTime(); |
73 | 78 |
74 void StopCurrentEventStream(); | 79 void StopCurrentEventStream(); |
75 void OnDispatcherListChanged(); | 80 void OnDispatcherListChanged(); |
76 | 81 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
108 bool continue_stream_ = true; | 113 bool continue_stream_ = true; |
109 | 114 |
110 std::unique_ptr<X11HotplugEventHandler> hotplug_event_handler_; | 115 std::unique_ptr<X11HotplugEventHandler> hotplug_event_handler_; |
111 | 116 |
112 DISALLOW_COPY_AND_ASSIGN(X11EventSource); | 117 DISALLOW_COPY_AND_ASSIGN(X11EventSource); |
113 }; | 118 }; |
114 | 119 |
115 } // namespace ui | 120 } // namespace ui |
116 | 121 |
117 #endif // UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_H_ | 122 #endif // UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_H_ |
OLD | NEW |