Mercurial > projects > dwt-mac
comparison dwt/internal/cocoa/NSProcessInfo.d @ 1:8b48be5454ce
The internal cocoa classes compile now
author | Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com> |
---|---|
date | Tue, 19 Aug 2008 17:35:17 +0200 |
parents | 380af2bdd8e5 |
children | f565d3a95c0a |
comparison
equal
deleted
inserted
replaced
0:380af2bdd8e5 | 1:8b48be5454ce |
---|---|
34 super(id); | 34 super(id); |
35 } | 35 } |
36 | 36 |
37 public NSUInteger activeProcessorCount () | 37 public NSUInteger activeProcessorCount () |
38 { | 38 { |
39 return OS.objc_msgSend(this.id, OS.sel_activeProcessorCount); | 39 return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_activeProcessorCount); |
40 } | 40 } |
41 | 41 |
42 public NSArray arguments () | 42 public NSArray arguments () |
43 { | 43 { |
44 objc.id result = OS.objc_msgSend(this.id, OS.sel_arguments); | 44 objc.id result = OS.objc_msgSend(this.id_, OS.sel_arguments); |
45 return result !is null ? new NSArray(result) : null; | 45 return result !is null ? new NSArray(result) : null; |
46 } | 46 } |
47 | 47 |
48 public NSDictionary environment () | 48 public NSDictionary environment () |
49 { | 49 { |
50 objc.id result = OS.objc_msgSend(this.id, OS.sel_environment); | 50 objc.id result = OS.objc_msgSend(this.id_, OS.sel_environment); |
51 return result !is null ? new NSDictionary(result) : null; | 51 return result !is null ? new NSDictionary(result) : null; |
52 } | 52 } |
53 | 53 |
54 public NSString globallyUniqueString () | 54 public NSString globallyUniqueString () |
55 { | 55 { |
56 objc.id result = OS.objc_msgSend(this.id, OS.sel_globallyUniqueString); | 56 objc.id result = OS.objc_msgSend(this.id_, OS.sel_globallyUniqueString); |
57 return result !is null ? new NSString(result) : null; | 57 return result !is null ? new NSString(result) : null; |
58 } | 58 } |
59 | 59 |
60 public NSString hostName () | 60 public NSString hostName () |
61 { | 61 { |
62 objc.id result = OS.objc_msgSend(this.id, OS.sel_hostName); | 62 objc.id result = OS.objc_msgSend(this.id_, OS.sel_hostName); |
63 return result !is null ? new NSString(result) : null; | 63 return result !is null ? new NSString(result) : null; |
64 } | 64 } |
65 | 65 |
66 public uint operatingSystem () | 66 public uint operatingSystem () |
67 { | 67 { |
68 return cast(uint) OS.objc_msgSend(this.id, OS.sel_operatingSystem); | 68 return cast(uint) OS.objc_msgSend(this.id_, OS.sel_operatingSystem); |
69 } | 69 } |
70 | 70 |
71 public NSString operatingSystemName () | 71 public NSString operatingSystemName () |
72 { | 72 { |
73 objc.id result = OS.objc_msgSend(this.id, OS.sel_operatingSystemName); | 73 objc.id result = OS.objc_msgSend(this.id_, OS.sel_operatingSystemName); |
74 return result !is null ? new NSString(result) : null; | 74 return result !is null ? new NSString(result) : null; |
75 } | 75 } |
76 | 76 |
77 public NSString operatingSystemVersionString () | 77 public NSString operatingSystemVersionString () |
78 { | 78 { |
79 objc.id result = OS.objc_msgSend(this.id, OS.sel_operatingSystemVersionString); | 79 objc.id result = OS.objc_msgSend(this.id_, OS.sel_operatingSystemVersionString); |
80 return result !is null ? new NSString(result) : null; | 80 return result !is null ? new NSString(result) : null; |
81 } | 81 } |
82 | 82 |
83 public ulong physicalMemory () | 83 public ulong physicalMemory () |
84 { | 84 { |
85 return cast(ulong) OS.objc_msgSend(this.id, OS.sel_physicalMemory); | 85 return cast(ulong) OS.objc_msgSend(this.id_, OS.sel_physicalMemory); |
86 } | 86 } |
87 | 87 |
88 public int processIdentifier () | 88 public int processIdentifier () |
89 { | 89 { |
90 return cast(int) OS.objc_msgSend(this.id, OS.sel_processIdentifier); | 90 return cast(int) OS.objc_msgSend(this.id_, OS.sel_processIdentifier); |
91 } | 91 } |
92 | 92 |
93 public static NSProcessInfo processInfo () | 93 public static NSProcessInfo processInfo () |
94 { | 94 { |
95 objc.id result = OS.objc_msgSend(OS.class_NSProcessInfo, OS.sel_processInfo); | 95 objc.id result = OS.objc_msgSend(OS.class_NSProcessInfo, OS.sel_processInfo); |
96 return result !is null ? new NSProcessInfo(result) : null; | 96 return result !is null ? new NSProcessInfo(result) : null; |
97 } | 97 } |
98 | 98 |
99 public NSString processName () | 99 public NSString processName () |
100 { | 100 { |
101 objc.id result = OS.objc_msgSend(this.id, OS.sel_processName); | 101 objc.id result = OS.objc_msgSend(this.id_, OS.sel_processName); |
102 return result !is null ? new NSString(result) : null; | 102 return result !is null ? new NSString(result) : null; |
103 } | 103 } |
104 | 104 |
105 public NSUInteger processorCount () | 105 public NSUInteger processorCount () |
106 { | 106 { |
107 return cast(NSUInteger) OS.objc_msgSend(this.id, OS.sel_processorCount); | 107 return cast(NSUInteger) OS.objc_msgSend(this.id_, OS.sel_processorCount); |
108 } | 108 } |
109 | 109 |
110 public void setProcessName (NSString newName) | 110 public void setProcessName (NSString newName) |
111 { | 111 { |
112 OS.objc_msgSend(this.id, OS.sel_setProcessName_1, newName !is null ? newName.id : null); | 112 OS.objc_msgSend(this.id_, OS.sel_setProcessName_1, newName !is null ? newName.id_ : null); |
113 } | 113 } |
114 | 114 |
115 } | 115 } |