OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef UI_BASE_X_ROOT_WINDOW_PROPERTY_WATCHER_X_H_ |
| 6 #define UI_BASE_X_ROOT_WINDOW_PROPERTY_WATCHER_X_H_ |
| 7 #pragma once |
| 8 |
| 9 #include <gdk/gdk.h> |
| 10 |
| 11 #include "base/memory/singleton.h" |
| 12 #include "ui/base/gtk/gtk_signal.h" |
| 13 #include "ui/base/ui_export.h" |
| 14 |
| 15 namespace ui { |
| 16 |
| 17 namespace internal { |
| 18 |
| 19 // This class keeps track of changes to properties on the root window. This is |
| 20 // not to be used directly. Implement a watcher for the specific property you're |
| 21 // interested in. |
| 22 class RootWindowPropertyWatcherX { |
| 23 public: |
| 24 static RootWindowPropertyWatcherX* GetInstance(); |
| 25 |
| 26 private: |
| 27 friend struct DefaultSingletonTraits<RootWindowPropertyWatcherX>; |
| 28 |
| 29 RootWindowPropertyWatcherX(); |
| 30 ~RootWindowPropertyWatcherX(); |
| 31 |
| 32 // Callback for PropertyChange XEvents. |
| 33 CHROMEG_CALLBACK_1(RootWindowPropertyWatcherX, GdkFilterReturn, |
| 34 OnWindowXEvent, GdkXEvent*, GdkEvent*); |
| 35 |
| 36 DISALLOW_COPY_AND_ASSIGN(RootWindowPropertyWatcherX); |
| 37 }; |
| 38 |
| 39 } // namespace internal |
| 40 |
| 41 } // namespace ui |
| 42 |
| 43 #endif // UI_BASE_X_ROOT_WINDOW_PROPERTY_WATCHER_X_H_ |
OLD | NEW |