Mercurial > projects > dynamin
comparison dynamin/gui/clipboard.d @ 106:acdbb30fee7e
Port to D2.
Most of the effort was dealing with immutable and const.
author | Jordan Miner <jminer7@gmail.com> |
---|---|
date | Mon, 17 Dec 2012 23:41:50 -0600 |
parents | 73060bc3f004 |
children |
comparison
equal
deleted
inserted
replaced
105:97997a544ac0 | 106:acdbb30fee7e |
---|---|
39 } | 39 } |
40 | 40 |
41 /** | 41 /** |
42 * Sets the data on the clipboard to the specified _text. | 42 * Sets the data on the clipboard to the specified _text. |
43 */ | 43 */ |
44 void setText(string text) { | 44 void setText(cstring text) { |
45 backend_setText(text); | 45 backend_setText(text); |
46 } | 46 } |
47 alias setText copyText; | 47 alias setText copyText; |
48 /** | 48 /** |
49 * Gets text from the clipboard. If the clipboard does not have any text | 49 * Gets text from the clipboard. If the clipboard does not have any text |
50 * or has an empty string, null is returned. | 50 * or has an empty string, null is returned. |
51 */ | 51 */ |
52 string getText() { | 52 mstring getText() { |
53 return backend_getText(); | 53 return backend_getText(); |
54 } | 54 } |
55 alias getText pasteText; | 55 alias getText pasteText; |
56 // TODO: don't need this? | 56 // TODO: don't need this? |
57 bool containsText() { | 57 bool containsText() { |
73 static: | 73 static: |
74 private: | 74 private: |
75 mixin SelectionBackend; | 75 mixin SelectionBackend; |
76 public: | 76 public: |
77 /// | 77 /// |
78 void setText(string text) { | 78 void setText(cstring text) { |
79 backend_setText(text); | 79 backend_setText(text); |
80 } | 80 } |
81 /// | 81 /// |
82 string getText() { | 82 mstring getText() { |
83 return backend_getText(); | 83 return backend_getText(); |
84 } | 84 } |
85 /// | 85 /// |
86 bool containsText() { | 86 bool containsText() { |
87 return backend_containsText(); | 87 return backend_containsText(); |