Changeset 16
- Timestamp:
- 05/23/04 04:40:07 (4 years ago)
- Files:
-
- branches/0.1/src/dwt/graphics/device.d (modified) (1 diff)
- branches/0.1/src/dwt/graphics/font.d (modified) (1 diff)
- branches/0.1/src/dwt/graphics/fontdata.d (modified) (1 diff)
- branches/0.1/src/dwt/graphics/fontmetrics.d (modified) (1 diff)
- branches/0.1/src/dwt/graphics/gc.d (modified) (1 diff)
- branches/0.1/src/dwt/graphics/gcdata.d (modified) (1 diff)
- branches/0.1/src/dwt/graphics/image.d (modified) (1 diff)
- branches/0.1/src/dwt/graphics/region.d (modified) (1 diff)
- branches/0.1/src/dwt/internal/platform.d (modified) (1 diff)
- branches/0.1/src/dwt/internal/win32/accel.d (deleted)
- branches/0.1/src/dwt/internal/win32/createstruct.d (deleted)
- branches/0.1/src/dwt/internal/win32/dllversioninfo.d (deleted)
- branches/0.1/src/dwt/internal/win32/drawitemstruct.d (deleted)
- branches/0.1/src/dwt/internal/win32/iconinfo.d (deleted)
- branches/0.1/src/dwt/internal/win32/logfont.d (deleted)
- branches/0.1/src/dwt/internal/win32/lresult.d (deleted)
- branches/0.1/src/dwt/internal/win32/msg.d (deleted)
- branches/0.1/src/dwt/internal/win32/nmhdr.d (deleted)
- branches/0.1/src/dwt/internal/win32/nmttdispinfo.d (deleted)
- branches/0.1/src/dwt/internal/win32/os.d (modified) (11 diffs)
- branches/0.1/src/dwt/internal/win32/osversioninfo.d (deleted)
- branches/0.1/src/dwt/internal/win32/paintstruct.d (deleted)
- branches/0.1/src/dwt/internal/win32/rect.d (deleted)
- branches/0.1/src/dwt/internal/win32/scrollinfo.d (deleted)
- branches/0.1/src/dwt/internal/win32/shactivateinfo.d (deleted)
- branches/0.1/src/dwt/internal/win32/textmetric.d (deleted)
- branches/0.1/src/dwt/internal/win32/types.d (modified) (4 diffs)
- branches/0.1/src/dwt/internal/win32/windowpos.d (deleted)
- branches/0.1/src/dwt/internal/win32/wndclass.d (deleted)
- branches/0.1/src/dwt/widgets/button.d (modified) (13 diffs)
- branches/0.1/src/dwt/widgets/canvas.d (modified) (10 diffs)
- branches/0.1/src/dwt/widgets/caret.d (modified) (1 diff)
- branches/0.1/src/dwt/widgets/composite.d (modified) (1 diff)
- branches/0.1/src/dwt/widgets/control.d (modified) (1 diff)
- branches/0.1/src/dwt/widgets/decorations.d (modified) (11 diffs)
- branches/0.1/src/dwt/widgets/display.d (modified) (2 diffs)
- branches/0.1/src/dwt/widgets/menu.d (modified) (67 diffs)
- branches/0.1/src/dwt/widgets/menuitem.d (modified) (56 diffs)
- branches/0.1/src/dwt/widgets/scrollable.d (modified) (1 diff)
- branches/0.1/src/dwt/widgets/scrollbar.d (modified) (1 diff)
- branches/0.1/src/dwt/widgets/shell.d (modified) (1 diff)
- branches/0.1/src/dwt/widgets/table.d (added)
- branches/0.1/src/dwt/widgets/tablecolumn.d (added)
- branches/0.1/src/dwt/widgets/tableitem.d (added)
- branches/0.1/src/dwt/widgets/text.d (added)
- branches/0.1/src/dwt/widgets/toolbar.d (added)
- branches/0.1/src/dwt/widgets/toolitem.d (added)
- branches/0.1/src/dwt/widgets/tracker.d (added)
- branches/0.1/src/dwt/widgets/tree.d (added)
- branches/0.1/src/dwt/widgets/treeitem.d (added)
- branches/0.1/src/dwt/widgets/widget.d (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/0.1/src/dwt/graphics/device.d
r12 r16 22 22 23 23 import dwt.internal.compatibility; 24 24 25 25 import dwt.internal.win32.os; 26 import dwt.internal.win32.logfont;27 import dwt.internal.win32.textmetric;28 26 import dwt.internal.win32.tchar; 27 import dwt.internal.win32.types; 29 28 30 29 import dwt.util.runnable; branches/0.1/src/dwt/graphics/font.d
r15 r16 12 12 private import dwt.graphics.fontdata; 13 13 private import dwt.internal.win32.os; 14 private import dwt.internal.win32. logfont;14 private import dwt.internal.win32.types; 15 15 private import std.string; 16 16 branches/0.1/src/dwt/graphics/fontdata.d
r15 r16 11 11 private import dwt.dwt; 12 12 13 private import dwt.internal.win32.logfont; 13 private import dwt.internal.callback; 14 14 15 private import dwt.internal.win32.os; 15 16 private import dwt.internal.win32.tchar; 16 private import dwt.internal.callback; 17 private import dwt.internal.win32.types; 18 17 19 private import dwt.util.string; 20 18 21 private import std.string; 19 22 branches/0.1/src/dwt/graphics/fontmetrics.d
r11 r16 7 7 +/ 8 8 9 private import dwt.internal.win32.t extmetric;9 private import dwt.internal.win32.types; 10 10 11 11 /** branches/0.1/src/dwt/graphics/gc.d
r15 r16 28 28 import dwt.internal.compatibility; 29 29 30 import dwt.internal.win32.iconinfo;31 30 import dwt.internal.win32.os; 32 import dwt.internal.win32.rect;33 31 import dwt.internal.win32.tchar; 34 import dwt.internal.win32.textmetric;35 32 import dwt.internal.win32.types; 36 33 branches/0.1/src/dwt/graphics/gcdata.d
r12 r16 6 6 +/ 7 7 8 private import dwt.internal.win32. paintstruct;8 private import dwt.internal.win32.types; 9 9 10 10 branches/0.1/src/dwt/graphics/image.d
r15 r16 22 22 import dwt.graphics.rgb; 23 23 24 import dwt.internal.win32.iconinfo;25 24 import dwt.internal.win32.os; 26 25 import dwt.internal.win32.types; 27 import dwt.internal.win32.rect;28 26 29 27 import std.string; branches/0.1/src/dwt/graphics/region.d
r15 r16 11 11 { 12 12 import dwt.dwt; 13 import dwt.internal.win32.os; 14 import dwt.internal.win32.types; 15 import dwt.internal.win32.rect; 13 16 14 import dwt.graphics.device; 17 15 import dwt.graphics.rectangle; 18 16 import dwt.graphics.point; 17 18 import dwt.internal.win32.os; 19 import dwt.internal.win32.types; 20 19 21 import dwt.util.string; 22 20 23 } 21 24 branches/0.1/src/dwt/internal/platform.d
r11 r16 6 6 7 7 import dwt.internal.win32.os; 8 import dwt.internal.win32. msg;8 import dwt.internal.win32.types; 9 9 10 10 public class Platform { branches/0.1/src/dwt/internal/win32/os.d
r15 r16 6 6 import dwt.internal.library; 7 7 8 import dwt.internal.win32.createstruct;9 import dwt.internal.win32.dllversioninfo;10 import dwt.internal.win32.iconinfo;11 import dwt.internal.win32.logfont;12 import dwt.internal.win32.msg;13 import dwt.internal.win32.nmttdispinfo;14 import dwt.internal.win32.osversioninfo;15 import dwt.internal.win32.paintstruct;16 import dwt.internal.win32.rect;17 8 import dwt.internal.win32.tchar; 18 import dwt.internal.win32.textmetric;19 9 import dwt.internal.win32.types; 20 import dwt.internal.win32.wndclass;21 10 } 22 11 … … 1386 1375 } 1387 1376 1388 /+ 1377 1389 1378 1390 1379 int CreateWindowEx (int dwExStyle, TCHAR lpClassName, TCHAR lpWindowName, int dwStyle, int X, int Y, int nWidth, int nHeight, int hWndParent, int hMenu, int hInstance, CREATESTRUCT lpParam) { … … 1410 1399 } 1411 1400 1401 1412 1402 int DispatchMessage (MSG lpmsg) { 1413 1403 if (IsUnicode) return DispatchMessageW (lpmsg); … … 1428 1418 return DrawStateA (hdc, hbr, lpOutputFunc, lData, wData, x, y, cx, cy, fuFlags); 1429 1419 } 1430 +/ 1420 1431 1421 1432 1422 static int DrawText (int hDC, TCHAR lpString, int nCount, RECT* lpRect, int uFormat) { … … 1527 1517 } 1528 1518 1529 bit GetClassInfo (int hInstance, TCHAR lpClassName, dwt.internal.win32.wndclass.WNDCLASS* lpWndClass) {1519 bit GetClassInfo (int hInstance, TCHAR lpClassName, WNDCLASS* lpWndClass) { 1530 1520 if (IsUnicode) { 1531 1521 wchar* lpClassName1 = w_str(lpClassName); … … 1670 1660 } 1671 1661 1672 int GetWindowLong (int hWnd, int nIndex) {1662 int GetWindowLong (int hWnd, uint nIndex) { 1673 1663 if (IsUnicode) return GetWindowLongW (hWnd, nIndex); 1674 1664 return GetWindowLongA (hWnd, nIndex); … … 1816 1806 } 1817 1807 1818 /+ 1808 1819 1809 1820 1810 bit PeekMessage (MSG lpMsg, int hWnd, int wMsgFilterMin, int wMsgFilterMax, int wRemoveMsg) { … … 2036 2026 2037 2027 bit SystemParametersInfo (int uiAction, int uiParam, NONCLIENTMETRICS pvParam, int fWinIni) { 2038 if (IsUnicode) return SystemParametersInfoW (uiAction, uiParam, (NONCLIENTMETRICSW)pvParam, fWinIni);2039 return SystemParametersInfoA (uiAction, uiParam, (NONCLIENTMETRICSA)pvParam, fWinIni);2028 if (IsUnicode) return SystemParametersInfoW (uiAction, uiParam, cast(NONCLIENTMETRICSW)pvParam, fWinIni); 2029 return SystemParametersInfoA (uiAction, uiParam, cast(NONCLIENTMETRICSA)pvParam, fWinIni); 2040 2030 } 2041 2031 … … 2065 2055 2066 2056 2067 +/ 2057 2068 2058 2069 2059 … … 2451 2441 bit PostThreadMessageW (int idThread, int Msg, int wParam, int lParam); 2452 2442 bit PostThreadMessageA (int idThread, int Msg, int wParam, int lParam); 2453 //bit PrintDlgW (PRINTDLG lppd);2454 //bit PrintDlgA (PRINTDLG lppd);2443 bit PrintDlgW (PRINTDLG lppd); 2444 bit PrintDlgA (PRINTDLG lppd); 2455 2445 bit PtInRect (RECT* rect, POINT* pt); 2456 2446 bit PtInRegion (int hrgn, int X, int Y); … … 2563 2553 //int SHBrowseForFolderW (BROWSEINFO* lpbi); 2564 2554 //int SHBrowseForFolderA (BROWSEINFO* lpbi); 2565 //bit SHCreateMenuBar(SHMENUBARINFO* pmb);2555 bit SHCreateMenuBar(SHMENUBARINFO* pmb); 2566 2556 //bit SHHandleWMSettingChange (int hwnd, int wParam, int lParam, SHACTIVATEINFO* psai); 2567 2557 //int SHRecognizeGesture(SHRGINFO* shrg); branches/0.1/src/dwt/internal/win32/types.d
r11 r16 4 4 * win32 types and junk 5 5 */ 6 7 private8 {9 import dwt.internal.win32.rect;10 }11 6 12 7 alias void* HINSTANCE; … … 17 12 alias void* HBITMAP; 18 13 19 struct SIZE { 20 int width; 21 int height; 14 struct RECT { 15 int left; 16 int top; 17 int right; 18 int bottom; 22 19 } 23 20 … … 59 56 } 60 57 61 struct SCROLLINFO {62 uint cbSize;63 uint fMask;64 int nMin;65 int nMax;66 uint nPage;67 int nPos;68 int nTrackPos;69 }70 71 struct WINDOWPLACEMENT {72 uint length;73 uint flags;74 uint showCmd;75 POINT ptMinPosition;76 POINT ptMaxPosition;77 RECT rcNormalPosition;78 }79 80 58 struct BITMAP { 81 59 int bmType; … … 129 107 uint dsOffset; 130 108 } 109 110 struct PRINTDLG { 111 int lStructSize; // DWORD 112 int hwndOwner; // HWND 113 int hDevMode; // HGLOBAL 114 int hDevNames; // HGLOBAL 115 int hDC; // HDC 116 int Flags; // DWORD 117 short nFromPage; // WORD 118 short nToPage; // WORD 119 short nMinPage; // WORD 120 short nMaxPage; // WORD 121 short nCopies; // WORD 122 int hInstance; // HINSTANCE 123 int lCustData; // LPARAM 124 int lpfnPrintHook; // LPPRINTHOOKPROC 125 int lpfnSetupHook; // LPSETUPHOOKPROC 126 int lpPrintTemplateName; // LPCTSTR 127 int lpSetupTemplateName; // LPCTSTR 128 int hPrintTemplate; // HGLOBAL 129 int hSetupTemplate; // HGLOBAL 130 } 131 132 struct FILETIME { 133 int dwLowDateTime; 134 int dwHighDateTime; 135 } 136 137 struct LVCOLUMN { 138 int mask; 139 int fmt; 140 int cx; 141 int pszText; 142 int cchTextMax; 143 int iSubItem; 144 int iImage; 145 int iOrder; 146 } 147 148 struct LVHITTESTINFO { 149 // POINT pt; 150 int x; 151 int y; 152 int flags; 153 int iItem; 154 int iSubItem; 155 } 156 157 struct LVITEM { 158 int mask; 159 int iItem; 160 int iSubItem; 161 int state; 162 int stateMask; 163 int pszText; 164 int cchTextMax; 165 int iImage; 166 int lParam; 167 int iIndent; 168 } 169 170 struct REBARBANDINFO { 171 int cbSize; 172 int fMask; 173 int fStyle; 174 int clrFore; 175 int clrBack; 176 int lpText; 177 int cch; 178 int iImage; 179 int hwndChild; 180 int cxMinChild; 181 int cyMinChild; 182 int cx; 183 int hbmBack; 184 int wID; 185 int cyChild; 186 int cyMaxChild; 187 int cyIntegral; 188 int cxIdeal; 189 int lParam; 190 int cxHeader; 191 /* Note in WinCE. The field cxHeader is not defined. */ 192 } 193 194 struct SIZE { 195 int width; 196 int height; 197 } 198 199 struct TBBUTTON { 200 int iBitmap; 201 int idCommand; 202 byte fsState; 203 byte fsStyle; 204 int dwData; 205 int iString; 206 } 207 208 209 struct TBBUTTONINFO { 210 int cbSize; 211 int dwMask; 212 int idCommand; 213 int iImage; 214 byte fsState; 215 byte fsStyle; 216 short cx; 217 int lParam; 218 int pszText; 219 int cchText; 220 } 221 222 struct TCITEM { 223 int mask; 224 int dwState; 225 int dwStateMask; 226 int pszText; 227 int cchTextMax; 228 int iImage; 229 int lParam; 230 } 231 232 struct TOOLINFO { 233 int cbSize; 234 int uFlags; 235 int hwnd; 236 int uId; 237 // RECT rect; 238 int left, top, right, bottom; 239 int hinst; 240 int lpszText; 241 int lParam; 242 } 243 244 struct TVHITTESTINFO { 245 // POINT pt; 246 int x; 247 int y; 248 int flags; 249 int hItem; 250 } 251 252 struct TVINSERTSTRUCT { 253 int hParent; 254 int hInsertAfter; 255 // TVITEM item; 256 int mask; 257 int hItem; 258 int state; 259 int stateMask; 260 int pszText; 261 int cchTextMax; 262 int iImage; 263 int iSelectedImage; 264 int cChildren; 265 int lParam; 266 } 267 268 struct TVITEM { 269 int mask; 270 int hItem; 271 int state; 272 int stateMask; 273 int pszText; 274 int cchTextMax; 275 int iImage; 276 int iSelectedImage; 277 int cChildren; 278 int lParam; 279 } 280 281 struct BROWSEINFO { 282 int hwndOwner; 283 int pidlRoot; 284 int pszDisplayName; 285 int lpszTitle; 286 int ulFlags; 287 int lpfn; 288 int lParam; 289 int iImage; 290 } 291 292 struct SHELLEXECUTEINFO { 293 int cbSize; 294 int fMask; 295 int hwnd; 296 int lpVerb; 297 int lpFile; 298 int lpParameters; 299 int lpDirectory; 300 int nShow; 301 int hInstApp; 302 // Optional members 303 int lpIDList; 304 int lpClass; 305 int hkeyClass; 306 int dwHotKey; 307 // union { 308 // HANDLE hIcon; 309 // HANDLE hMonitor; 310 // }; 311 int hIcon; 312 int hProcess; 313 } 314 315 struct DOCINFO { 316 int cbSize; 317 int lpszDocName; // LPCTSTR 318 int lpszOutput; // LPCTSTR 319 int lpszDatatype;// LPCTSTR 320 int fwType; // DWORD 321 } 322 323 struct NONCLIENTMETRICS { 324 int cbSize; 325 int iBorderWidth; 326 int iScrollWidth; 327 int iScrollHeight; 328 int iCaptionWidth; 329 int iCaptionHeight; 330 int iSmCaptionWidth; 331 int iSmCaptionHeight; 332 int iMenuWidth; 333 int iMenuHeight; 334 } 335 336 struct ACCEL { 337 byte fVirt; 338 short key; 339 short cmd; 340 } 341 342 struct SHMENUBARINFO { 343 int cbSize; 344 int hwndParent; 345 int dwFlags; 346 int nToolBarId; 347 int hInstRes; 348 int nBmpId; 349 int cBmpImages; 350 int hwndMB; 351 } 352 353 struct CREATESTRUCT { 354 void* lpCreateParams; 355 HINSTANCE hInstance; 356 HMENU hMenu; 357 HWND hwndParent; 358 int cy; 359 int cx; 360 int y; 361 int x; 362 long style; 363 void* lpszName; 364 void* lpszClass; 365 uint dwExStyle; 366 } 367 368 struct CREATESTRUCTA { 369 void* lpCreateParams; 370 HINSTANCE hInstance; 371 HMENU hMenu; 372 HWND hwndParent; 373 int cy; 374 int cx; 375 int y; 376 int x; 377 long style; 378 char* lpszName; 379 char* lpszClass; 380 uint dwExStyle; 381 } 382 383 struct CREATESTRUCTW { 384 void* lpCreateParams; 385 HINSTANCE hInstance; 386 HMENU hMenu; 387 HWND hwndParent; 388 int cy; 389 int cx; 390 int y; 391 int x; 392 long style; 393 wchar* lpszName; 394 wchar* lpszClass; 395 uint dwExStyle; 396 } 397 398 struct DLLVERSIONINFO { 399 int cbSize; 400 int dwMajorVersion; 401 int dwMinorVersion; 402 int dwBuildNumber; 403 int dwPlatformID; 404 } 405 406 struct DRAWITEMSTRUCT { 407 int CtlType; 408 int CtlID; 409 int itemID; 410 int itemAction; 411 int itemState; 412 int hwndItem; 413 int hDC; 414 // RECT rcItem; 415 int left, top, bottom, right; 416 int itemData; 417 } 418 419 struct ICONINFO { 420 bool fIcon; 421 int xHotspot; 422 int yHotspot; 423 int hbmMask; 424 int hbmColor; 425 } 426 427 struct LOGFONT { 428 int lfHeight; 429 int lfWidth; 430 int lfEscapement; 431 int lfOrientation; 432 int lfWeight; 433 byte lfItalic; 434 byte lfUnderline; 435 byte lfStrikeOut; 436 byte lfCharSet; 437 byte lfOutPrecision; 438 byte lfClipPrecision; 439 byte lfQuality; 440 byte lfPitchAndFamily; 441 // use LOGFONT.size instead of sizeof 442 } 443 444 struct LOGFONTA { 445 int lfHeight; 446 int lfWidth; 447 int lfEscapement; 448 int lfOrientation; 449 int lfWeight; 450 byte lfItalic; 451 byte lfUnderline; 452 byte lfStrikeOut; 453 byte lfCharSet; 454 byte lfOutPrecision; 455 byte lfClipPrecision; 456 byte lfQuality; 457 byte lfPitchAndFamily; 458 //char[OS.LF_FACESIZE] lfFaceName; 459 char[32] lfFaceName; 460 } 461 462 struct LOGFONTW { 463 int lfHeight; 464 int lfWidth; 465 int lfEscapement; 466 int lfOrientation; 467 int lfWeight; 468 byte lfItalic; 469 byte lfUnderline; 470 byte lfStrikeOut; 471 byte lfCharSet; 472 byte lfOutPrecision; 473 byte lfClipPrecision; 474 byte lfQuality; 475 byte lfPitchAndFamily; 476 //wchar[OS.LF_FACESIZE] lfFaceName; 477 wchar[32] lfFaceName; 478 } 479 480 481 // Yay D for not sucking 482 alias int LRESULT; 483 484 struct MSG { 485 int hwnd; 486 int message; 487 int wParam; 488 int lParam; 489 int time; 490 // POINT pt; 491 int x, y; 492 static final int sizeof = 28; 493 } 494 495 struct NMHDR { 496 int hwndFrom; 497 int idFrom; 498 int code; 499 } 500 501 struct NMTTDISPINFO /*: NMHDR*/ { 502 // nmhdr 503 int hwndFrom; 504 int idFrom; 505 int code; 506 507 int lpszText; 508 int hinst; 509 int uFlags; 510 int lParam; 511 } 512 513 struct NMTTDISPINFOA { 514 int hwndFrom; 515 int idFrom; 516 int code; 517 int lpszText; 518 int hinst; 519 int uFlags; 520 int lParam; 521 522 char[80] szText; 523 } 524 525 class NMTTDISPINFOW { 526 // nmhdr 527 int hwndFrom; 528 int idFrom; 529 int code; 530 int lpszText; 531 int hinst; 532 int uFlags; 533 int lParam; 534 535 wchar[80] szText; 536 } 537 538 struct OSVERSIONINFO { 539 int dwOSVersionInfoSize; 540 int dwMajorVersion; 541 int dwMinorVersion; 542 int dwBuildNumber; 543 int dwPlatformId; 544 } 545 546 struct OSVERSIONINFOA { 547 int dwOSVersionInfoSize; 548 int dwMajorVersion; 549 int dwMinorVersion; 550 int dwBuildNumber; 551 int dwPlatformId; 552 char[128] szCSDVersion; 553 } 554 555 struct OSVERSIONINFOW { 556 int dwOSVersionInfoSize; 557 int dwMajorVersion; 558 int dwMinorVersion; 559 int dwBuildNumber; 560 int dwPlatformId; 561 wchar[128] szCSDVersion; 562 } 563 564 struct PAINTSTRUCT { 565 int hdc; 566 bool fErase; 567 // RECT rcPaint; 568 int left, top, right, bottom; 569 570 bool fRestore; 571 bool fIncUpdate; 572 byte[32] rgbReserved; 573 } 574 575 struct SCROLLINFO { 576 int cbSize; 577 int fMask; 578 int nMin; 579 int nMax; 580 int nPage; 581 int nPos; 582 int nTrackPos; 583 static final int sizeof = 28; 584 } 585 586 struct SHACTIVATEINFO { 587 int cbSize; 588 int hwndLastFocus; 589 int fSipUp; // :1 590 int fSipOnDeactivation; // :1 591 int fActive; // :1 592 int fReserved; // :29 593 // use SHACTIVATEINFO.size instead of sizeof 594 } 595 596 597 struct TEXTMETRIC { 598 int tmHeight; 599 int tmAscent; 600 int tmDescent; 601 int tmInternalLeading; 602 int tmExternalLeading; 603 int tmAveCharWidth; 604 int tmMaxCharWidth; 605 int tmWeight; 606 int tmOverhang; 607 int tmDigitizedAspectX; 608 int tmDigitizedAspectY; 609 byte tmItalic; 610 byte tmUnderlined; 611 byte tmStruckOut; 612 byte tmPitchAndFamily; 613 byte tmCharSet; 614 } 615 616 struct TEXTMETRICA { 617 int tmHeight; 618 int tmAscent; 619 int tmDescent; 620 int tmInternalLeading; 621 int tmExternalLeading; 622 int tmAveCharWidth; 623 int tmMaxCharWidth; 624 int tmWeight; 625 int tmOverhang; 626 int tmDigitizedAspectX; 627 int tmDigitizedAspectY; 628 byte tmItalic; 629 byte tmUnderlined; 630 byte tmStruckOut; 631 byte tmPitchAndFamily; 632 byte tmCharSet; 633 634 char tmFirstChar; 635 char tmLastChar; 636 char tmDefaultChar; 637 char tmBreakChar; 638 } 639 640 struct TEXTMETRICW { 641 int tmHeight; 642 int tmAscent; 643 int tmDescent; 644 int tmInternalLeading; 645 int tmExternalLeading; 646 int tmAveCharWidth; 647 int tmMaxCharWidth; 648 int tmWeight; 649 int tmOverhang; 650 int tmDigitizedAspectX; 651 int tmDigitizedAspectY; 652 byte tmItalic; 653 byte tmUnderlined; 654 byte tmStruckOut; 655 byte tmPitchAndFamily; 656 byte tmCharSet; 657 658 wchar tmFirstChar; 659 wchar tmLastChar; 660 wchar tmDefaultChar; 661 wchar tmBreakChar; 662 } 663 664 struct WINDOWPOS { 665 int hwnd; 666 int hwndInsertAfter; 667 int x; 668 int y; 669 int cx; 670 int cy; 671 int flags; 672 static final int sizeof = 28; 673 } 674 675 struct WNDCLASS { 676 int style; 677 int lpfnWndProc; 678 int cbClsExtra; 679 int cbWndExtra; 680 int hInstance; 681 int hIcon; 682 int hCursor; 683 int hbrBackground; 684 int lpszMenuName; 685 int lpszClassName; 686 } 687 688 struct WINDOWPLACEMENT { 689 uint length; 690 uint flags; 691 uint showCmd; 692 POINT ptMinPosition; 693 POINT ptMaxPosition; 694 RECT rcNormalPosition; 695 } 696 697 698 699 700 701 branches/0.1/src/dwt/widgets/button.d
r15 r16 44 44 private import dwt.graphics.point; 45 45 46 private import dwt.internal.win32.drawitemstruct;47 private import dwt.internal.win32.lresult;48 46 private import dwt.internal.win32.os; 49 47 private import dwt.internal.win32.tchar; 50 private import dwt.internal.win32.t extmetric;48 private import dwt.internal.win32.types; 51 49 50 private import dwt.util.util; 51 52 52 private import dwt.widgets.composite; 53 53 … … 93 93 * <li>ERROR_NULL_ARGUMENT - if the parent is null</li> 94 94 * </ul> 95 * @exception SWTException <ul>95 * @exception DWTException <ul> 96 96 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li> 97 97 * <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li> … … 131 131 * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> 132 132 * </ul> 133 * @exception SWTException <ul>133 * @exception DWTException <ul> 134 134 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 135 135 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> … … 265 265 * @return the alignment 266 266 * 267 * @exception SWTException <ul>267 * @exception DWTException <ul> 268 268 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 269 269 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> … … 297 297 * @return the receiver's image 298 298 * 299 * @exception SWTException <ul>299 * @exception DWTException <ul> 300 300 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 301 301 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> … … 307 307 } 308 308 309 char[]getNameText () {309 String getNameText () { 310 310 return getText (); 311 311 } … … 322 322 * @return the selection state 323 323 * 324 * @exception SWTException <ul>324 * @exception DWTException <ul> 325 325 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 326 326 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> … … 341 341 * @return the receiver's text 342 342 * 343 * @exception SWTException <ul>344 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 345 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> 346 * </ul> 347 */ 348 public char[]getText () {343 * @exception DWTException <ul> 344 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 345 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> 346 * </ul> 347 */ 348 public String getText () { 349 349 checkWidget (); 350 350 if ((style & DWT.ARROW) != 0) return ""; … … 396 396 * <li>ERROR_NULL_ARGUMENT - if the listener is null</li> 397 397 * </ul> 398 * @exception SWTException <ul>398 * @exception DWTException <ul> 399 399 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 400 400 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> … … 449 449 * @param alignment the new alignment 450 450 * 451 * @exception SWTException <ul>451 * @exception DWTException <ul> 452 452 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 453 453 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> … … 504 504 * <li>ERROR_INVALID_ARGUMENT - if the image has been disposed</li> 505 505 * </ul> 506 * @exception SWTException <ul>506 * @exception DWTException <ul> 507 507 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 508 508 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> … … 578 578 * @param selected the new selection state 579 579 * 580 * @exception SWTException <ul>580 * @exception DWTException <ul> 581 581 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 582 582 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> … … 622 622 * <li>ERROR_NULL_ARGUMENT - if the text is null</li> 623 623 * </ul> 624 * @exception SWTException <ul>625 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 626 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> 627 * </ul> 628 */ 629 public void setText ( char[]string) {624 * @exception DWTException <ul> 625 * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 626 * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> 627 * </ul> 628 */ 629 public void setText (String string) { 630 630 checkWidget (); 631 631 if (string == null) error (DWT.ERROR_NULL_ARGUMENT); branches/0.1/src/dwt/widgets/canvas.d
r3 r16 4 4 5 5 /+ 6 import org.eclipse. swt.internal.win32.*;7 import org.eclipse. swt.*;8 import org.eclipse. swt.graphics.*;6 import org.eclipse.DWT.internal.win32.*; 7 import org.eclipse.DWT.*; 8 import org.eclipse.DWT.graphics.*; 9 9 +/&
