3
3
4
4
import WinSDK
5
5
6
- extension HFONT__ : HandleValue {
7
- typealias HandleType = HFONT
8
- internal static func release( _ hFont : HandleType ? ) {
9
- if let hFont = hFont {
10
- DeleteObject ( hFont )
6
+ extension HBITMAP__ : HandleValue {
7
+ typealias HandleType = HBITMAP
8
+ internal static func release( _ hBitmap : HandleType ? ) {
9
+ if let hBitmap = hBitmap {
10
+ DeleteObject ( hBitmap )
11
11
}
12
12
}
13
13
}
14
14
15
- internal typealias FontHandle = ManagedHandle < HFONT__ >
15
+ internal typealias BitmapHandle = ManagedHandle < HBITMAP__ >
16
+
17
+ extension HBRUSH__ : HandleValue {
18
+ typealias HandleType = HBRUSH
19
+ internal static func release( _ hBrush: HandleType ? ) {
20
+ if let hBrush = hBrush {
21
+ DeleteObject ( hBrush)
22
+ }
23
+ }
24
+ }
25
+
26
+ internal typealias BrushHandle = ManagedHandle < HBRUSH__ >
16
27
17
28
extension HDC__ : HandleValue {
18
29
typealias HandleType = HDC
@@ -25,15 +36,16 @@ extension HDC__: HandleValue {
25
36
26
37
internal typealias DeviceContextHandle = ManagedHandle < HDC__ >
27
38
28
- extension HBITMAP__ : HandleValue {
29
- typealias HandleType = HBITMAP
30
- internal static func release( _ hBitmap : HandleType ? ) {
31
- if let hBitmap = hBitmap {
32
- DeleteObject ( hBitmap )
39
+ extension HFONT__ : HandleValue {
40
+ typealias HandleType = HFONT
41
+ internal static func release( _ hFont : HandleType ? ) {
42
+ if let hFont = hFont {
43
+ DeleteObject ( hFont )
33
44
}
34
45
}
35
46
}
36
- internal typealias BitmapHandle = ManagedHandle < HBITMAP__ >
47
+
48
+ internal typealias FontHandle = ManagedHandle < HFONT__ >
37
49
38
50
extension HMENU : HandleValue {
39
51
typealias HandleType = HMENU
0 commit comments