OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_COMMON_GFX_CHROME_PATH_H__ | 5 #ifndef CHROME_COMMON_GFX_CHROME_PATH_H_ |
6 #define CHROME_COMMON_GFX_CHROME_PATH_H__ | 6 #define CHROME_COMMON_GFX_CHROME_PATH_H_ |
7 | |
8 #include <windows.h> | |
9 | 7 |
10 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 |
| 10 #if defined(OS_WIN) |
| 11 #include <windows.h> |
| 12 #elif defined(OS_LINUX) |
| 13 typedef struct _GdkRegion GdkRegion; |
| 14 #endif |
| 15 |
11 #include "SkPath.h" | 16 #include "SkPath.h" |
12 | 17 |
13 namespace gfx { | 18 namespace gfx { |
14 | 19 |
15 class Path : public SkPath { | 20 class Path : public SkPath { |
16 public: | 21 public: |
17 Path(); | 22 Path() : SkPath() { moveTo(0, 0); } |
18 | 23 |
| 24 #if defined(OS_WIN) |
19 // Creates a HRGN from the path. The caller is responsible for freeing | 25 // Creates a HRGN from the path. The caller is responsible for freeing |
20 // resources used by this region. | 26 // resources used by this region. |
21 HRGN CreateHRGN() const; | 27 HRGN CreateHRGN() const; |
| 28 #elif defined(OS_LINUX) |
| 29 // Creates a Gdkregion from the path. The caller is responsible for freeing |
| 30 // resources used by this region. |
| 31 GdkRegion* CreateGdkRegion() const; |
| 32 #endif |
22 | 33 |
23 private: | 34 private: |
24 DISALLOW_EVIL_CONSTRUCTORS(Path); | 35 DISALLOW_COPY_AND_ASSIGN(Path); |
25 }; | 36 }; |
26 | 37 |
27 } | 38 } |
28 | 39 |
29 #endif // #ifndef CHROME_COMMON_GFX_CHROME_PATH_H__ | 40 #endif // #ifndef CHROME_COMMON_GFX_CHROME_PATH_H_ |
30 | |
OLD | NEW |