comparison dwt/dwthelper/System.d @ 15:2952d5604c0a

Ported some widgets, added some stuff to the runtime bindings
author Jacob Carlborg <doob@me.com> <jacob.carlborg@gmail.com>
date Fri, 29 Aug 2008 21:46:05 +0200
parents 380af2bdd8e5
children 5b53d338c709
comparison
equal deleted inserted replaced
14:762fbe6f17d3 15:2952d5604c0a
85 dest[destPos..(len+destPos)] = src[srcPos..(len+srcPos)]; 85 dest[destPos..(len+destPos)] = src[srcPos..(len+srcPos)];
86 } 86 }
87 } 87 }
88 } 88 }
89 89
90 struct OutS
91 {
92 static Print!(char) delegate(char[] fmt,...) println;
93 static Print!(char) delegate(char[] fmt,...) print;
94 static this ()
95 {
96 println = &Stdout.formatln;
97 print = &Stdout.format;
98 }
99 }
100
101 struct Err
102 {
103 static Print!(char) delegate(char[] fmt,...) println;
104 static Print!(char) delegate(char[] fmt,...) print;
105 static this ()
106 {
107 println = &Stderr.formatln;
108 print = &Stderr.format;
109 }
110 }
90 111
91 class System { 112 class System {
92 113
93 alias SimpleType!(int).arraycopy arraycopy; 114 alias SimpleType!(int).arraycopy arraycopy;
94 alias SimpleType!(byte).arraycopy arraycopy; 115 alias SimpleType!(byte).arraycopy arraycopy;
139 switch( key ){ 160 switch( key ){
140 case "os.name": return "windows"; 161 case "os.name": return "windows";
141 default: return null; 162 default: return null;
142 } 163 }
143 } 164 }
165
166 static OutS Out;
167 static Err err;
144 } 168 }
145