diff dwt/graphics/Device.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 184ab53b7785
children 36f5cb12e1a2
line wrap: on
line diff
--- a/dwt/graphics/Device.d	Sat Apr 26 10:01:48 2008 +0200
+++ b/dwt/graphics/Device.d	Mon May 05 00:12:38 2008 +0200
@@ -457,7 +457,7 @@
  *    <li>ERROR_DEVICE_DISPOSED - if the receiver has been disposed</li>
  * </ul>
  */
-public FontData [] getFontList (char[] faceName, bool scalable) {
+public FontData [] getFontList (String faceName, bool scalable) {
     checkDevice ();
 
     /* Create the callback */
@@ -538,21 +538,21 @@
     return result;
 }
 
-char[] getLastError () {
+String getLastError () {
     int error = OS.GetLastError();
     if (error is 0) return ""; //$NON-NLS-1$
     return " [GetLastError=0x" ~ .toHex(error) ~ "]"; //$NON-NLS-1$ //$NON-NLS-2$
 }
 
-char[] getLastErrorText () {
+String getLastErrorText () {
     int error = OS.GetLastError();
     if (error is 0) return ""; //$NON-NLS-1$
     TCHAR* buffer = null;
     int dwFlags = OS.FORMAT_MESSAGE_ALLOCATE_BUFFER | OS.FORMAT_MESSAGE_FROM_SYSTEM | OS.FORMAT_MESSAGE_IGNORE_INSERTS;
     int length = OS.FormatMessage(dwFlags, null, error, OS.LANG_USER_DEFAULT, cast(TCHAR*)&buffer, 0, null);
-    char[] errorNum = ("[GetLastError=") ~ .toHex(error) ~ "] ";
+    String errorNum = ("[GetLastError=") ~ .toHex(error) ~ "] ";
     if (length == 0) return errorNum;
-    char[] buffer1 = .TCHARzToStr(buffer, length);
+    String buffer1 = .TCHARzToStr(buffer, length);
     if ( *buffer != 0)
         OS.LocalFree(cast(HLOCAL)buffer);
     return errorNum ~ buffer1;
@@ -791,7 +791,7 @@
  *
  * @since 3.3
  */
-public bool loadFont (char[] path) {
+public bool loadFont (String path) {
     checkDevice();
     if (path is null) DWT.error (DWT.ERROR_NULL_ARGUMENT);
     if (OS.IsWinNT && OS.WIN32_VERSION >= OS.VERSION (4, 10)) {