33
44import WinSDK
55
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 )
1111 }
1212 }
1313}
1414
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__ >
1627
1728extension HDC__ : HandleValue {
1829 typealias HandleType = HDC
@@ -25,15 +36,16 @@ extension HDC__: HandleValue {
2536
2637internal typealias DeviceContextHandle = ManagedHandle < HDC__ >
2738
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 )
3344 }
3445 }
3546}
36- internal typealias BitmapHandle = ManagedHandle < HBITMAP__ >
47+ 48+ internal typealias FontHandle = ManagedHandle < HFONT__ >
3749
3850extension HMENU : HandleValue {
3951 typealias HandleType = HMENU
0 commit comments