comparison dwt/dnd/Clipboard.d @ 212:ab60f3309436

reverted the char[] to String and use the an alias.
author Frank Benoit <benoit@tionex.de>
date Mon, 05 May 2008 00:12:38 +0200
parents 242e33c0e383
children 36f5cb12e1a2
comparison
equal deleted inserted replaced
211:ff59aeb96cac 212:ab60f3309436
106 * @exception DWTException <ul> 106 * @exception DWTException <ul>
107 * <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li> 107 * <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li>
108 * </ul> 108 * </ul>
109 */ 109 */
110 protected void checkSubclass () { 110 protected void checkSubclass () {
111 char[] name = this.classinfo.name; 111 String name = this.classinfo.name;
112 char[] validName = Clipboard.classinfo.name; 112 String validName = Clipboard.classinfo.name;
113 if (validName!=/*eq*/name) { 113 if (validName!=/*eq*/name) {
114 DND.error (DWT.ERROR_INVALID_SUBCLASS); 114 DND.error (DWT.ERROR_INVALID_SUBCLASS);
115 } 115 }
116 } 116 }
117 117
719 * @exception DWTException <ul> 719 * @exception DWTException <ul>
720 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 720 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
721 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> 721 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
722 * </ul> 722 * </ul>
723 */ 723 */
724 public char[][] getAvailableTypeNames() { 724 public String[] getAvailableTypeNames() {
725 checkWidget(); 725 checkWidget();
726 FORMATETC*[] types = _getAvailableTypes(); 726 FORMATETC*[] types = _getAvailableTypes();
727 char[][] names = new char[][](types.length); 727 String[] names = new String[](types.length);
728 int maxSize = 128; 728 int maxSize = 128;
729 for (int i = 0; i < types.length; i++){ 729 for (int i = 0; i < types.length; i++){
730 TCHAR[] buffer = NewTCHARs(0, maxSize); 730 TCHAR[] buffer = NewTCHARs(0, maxSize);
731 int size = OS.GetClipboardFormatName(types[i].cfFormat, buffer.ptr, maxSize); 731 int size = OS.GetClipboardFormatName(types[i].cfFormat, buffer.ptr, maxSize);
732 if (size !is 0) { 732 if (size !is 0) {