Mercurial > projects > qtd
comparison qt/core/QString.d @ 33:cf8a415f3f32
gui package is fully wrapped now. lots of fixes in the generator
author | eldar |
---|---|
date | Sat, 16 May 2009 17:12:06 +0000 |
parents | e78566595089 |
children | d5a6b6269f44 |
comparison
equal
deleted
inserted
replaced
32:a293cd68d56c | 33:cf8a415f3f32 |
---|---|
7 else | 7 else |
8 { | 8 { |
9 import std.utf : toString = toUTF8; | 9 import std.utf : toString = toUTF8; |
10 } | 10 } |
11 | 11 |
12 class QString | 12 struct QString |
13 { | 13 { |
14 public static QString opCall(void* ptr, bool proxy) { | |
15 QString str; | |
16 str.native_id = ptr; | |
17 return str; | |
18 } | |
19 | |
14 private void* native_id; | 20 private void* native_id; |
15 | 21 |
16 public static final char[] toNativeString(void* qstring) { | 22 public static final char[] toNativeString(void* qstring) { |
17 wchar* arr = __qtd_QString_utf16(qstring); | 23 wchar* arr = __qtd_QString_utf16(qstring); |
18 int size = __qtd_QString_size(qstring); | 24 int size = __qtd_QString_size(qstring); |
21 | 27 |
22 public final char[] toNativeString() { | 28 public final char[] toNativeString() { |
23 return toNativeString(native_id); | 29 return toNativeString(native_id); |
24 } | 30 } |
25 | 31 |
26 public this(void* ptr, bool proxy) { | |
27 native_id = ptr; | |
28 } | |
29 | |
30 public void assign(char[] text) { | 32 public void assign(char[] text) { |
31 __qtd_QString_operatorAssign(native_id, text.ptr, text.length); | 33 __qtd_QString_operatorAssign(native_id, text.ptr, text.length); |
32 } | 34 } |
33 } | 35 } |
34 | 36 |