| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 // xserver that |w| has been mapped; StructureNotifyMask events on |w| are | 60 // xserver that |w| has been mapped; StructureNotifyMask events on |w| are |
| 61 // pulled out from the queue and dispatched out of order. | 61 // pulled out from the queue and dispatched out of order. |
| 62 // | 62 // |
| 63 // For those that know X11, this is really a wrapper around XWindowEvent | 63 // For those that know X11, this is really a wrapper around XWindowEvent |
| 64 // which still makes sure the preempted event is dispatched instead of | 64 // which still makes sure the preempted event is dispatched instead of |
| 65 // dropped on the floor. This method exists because mapping a window is | 65 // dropped on the floor. This method exists because mapping a window is |
| 66 // asynchronous (and we receive an XEvent when mapped), while there are also | 66 // asynchronous (and we receive an XEvent when mapped), while there are also |
| 67 // functions which require a mapped window. | 67 // functions which require a mapped window. |
| 68 void BlockUntilWindowMapped(XID window); | 68 void BlockUntilWindowMapped(XID window); |
| 69 | 69 |
| 70 void BlockUntilWindowUnmapped(XID window); | |
| 71 | |
| 72 XDisplay* display() { return display_; } | 70 XDisplay* display() { return display_; } |
| 73 | 71 |
| 74 // Returns the timestamp of the event currently being dispatched. Falls back | 72 // Returns the timestamp of the event currently being dispatched. Falls back |
| 75 // on GetCurrentServerTime() if there's no event being dispatched, or if the | 73 // on GetCurrentServerTime() if there's no event being dispatched, or if the |
| 76 // current event does not have a timestamp. | 74 // current event does not have a timestamp. |
| 77 Time GetTimestamp(); | 75 Time GetTimestamp(); |
| 78 | 76 |
| 79 void StopCurrentEventStream(); | 77 void StopCurrentEventStream(); |
| 80 void OnDispatcherListChanged(); | 78 void OnDispatcherListChanged(); |
| 81 | 79 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 bool continue_stream_ = true; | 115 bool continue_stream_ = true; |
| 118 | 116 |
| 119 std::unique_ptr<X11HotplugEventHandler> hotplug_event_handler_; | 117 std::unique_ptr<X11HotplugEventHandler> hotplug_event_handler_; |
| 120 | 118 |
| 121 DISALLOW_COPY_AND_ASSIGN(X11EventSource); | 119 DISALLOW_COPY_AND_ASSIGN(X11EventSource); |
| 122 }; | 120 }; |
| 123 | 121 |
| 124 } // namespace ui | 122 } // namespace ui |
| 125 | 123 |
| 126 #endif // UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_H_ | 124 #endif // UI_EVENTS_PLATFORM_X11_X11_EVENT_SOURCE_H_ |
| OLD | NEW |