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