OLD | NEW |
| (Empty) |
1 // Copyright (c) 2012 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_GTK_SCOPED_REGION_H_ | |
6 #define UI_BASE_GTK_SCOPED_REGION_H_ | |
7 | |
8 #include "base/basictypes.h" | |
9 #include "ui/base/ui_base_export.h" | |
10 | |
11 typedef struct _GdkRegion GdkRegion; | |
12 | |
13 namespace ui { | |
14 | |
15 // Wraps a GdkRegion. This class provides the same methods as ScopedGDIObject in | |
16 // base/win/scoped_gdi_object.h. | |
17 class UI_BASE_EXPORT ScopedRegion { | |
18 public: | |
19 ScopedRegion(); | |
20 explicit ScopedRegion(GdkRegion* region); | |
21 | |
22 ~ScopedRegion(); | |
23 | |
24 void Set(GdkRegion* region); | |
25 | |
26 GdkRegion* Get(); | |
27 | |
28 GdkRegion* release(); | |
29 | |
30 private: | |
31 void Close(); | |
32 | |
33 GdkRegion* region_; | |
34 | |
35 DISALLOW_COPY_AND_ASSIGN(ScopedRegion); | |
36 }; | |
37 | |
38 } // namespace ui | |
39 | |
40 #endif // UI_BASE_GTK_SCOPED_REGION_H_ | |
OLD | NEW |