Changeset 26
- Timestamp:
- 06/28/04 00:11:30 (4 years ago)
- Files:
-
- branches/0.1/src/dwt/internal/win32/os.d (modified) (3 diffs)
- branches/0.1/src/dwt/internal/win32/types.d (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/0.1/src/dwt/internal/win32/os.d
r25 r26 29 29 import dwt.internal.win32.types; 30 30 } 31 32 //version = Unicode; 31 33 32 34 public class OS { … … 43 45 static int IsSP; 44 46 static int IsDBLocale; 47 45 48 const int IsUnicode = 1; 49 46 50 static int WIN32_MAJOR, WIN32_MINOR; 47 51 … … 1392 1396 static int CreateFontIndirect (int lplf) { 1393 1397 if (IsUnicode) 1394 return CreateFontIndirectW (cast(LOGFONTW*)lplf);1398 return CreateFontIndirectW (lplf); 1395 1399 else 1396 return CreateFontIndirectA (cast(LOGFONTA*)lplf);1400 return CreateFontIndirectA (lplf); 1397 1401 } 1398 1402 1399 1403 static static int CreateFontIndirect (LOGFONT* lplf) { 1400 1404 if (IsUnicode) 1401 return CreateFontIndirectW (cast(LOGFONTW*)lplf);1405 return CreateFontIndirectW (lplf); 1402 1406 else 1403 return CreateFontIndirectA (cast(LOGFONTA*)lplf);1407 return CreateFontIndirectA (lplf); 1404 1408 } 1405 1409 branches/0.1/src/dwt/internal/win32/types.d
r25 r26 20 20 21 21 module dwt.internal.win32.types; 22 23 version = Unicode; 22 24 23 25 /* … … 177 179 178 180 struct MONITORINFO { 179 int cbSize; 180 RECT rcMonitor; 181 RECT rcWork; 182 int dwFlags; 181 int cbSize; 182 // RECT rcMonitor; 183 int rcMonitor_left; 184 int rcMonitor_top; 185 int rcMonitor_right; 186 int rcMonitor_bottom; 187 // RECT rcWork; 188 int rcWork_left; 189 int rcWork_top; 190 int rcWork_right; 191 int rcWork_bottom; 192 int dwFlags; 183 193 } 184 194 … … 381 391 } 382 392 383 struct NONCLIENTMETRICS {384 int cbSize;385 int iBorderWidth;386 int iScrollWidth;387 int iScrollHeight;388 int iCaptionWidth;389 int iCaptionHeight;390 int iSmCaptionWidth;391 int iSmCaptionHeight;392 int iMenuWidth;393 int iMenuHeight;394 }395 396 393 struct ACCEL { 397 394 byte fVirt; … … 485 482 } 486 483 487 struct LOGFONT { 488 int lfHeight; 489 int lfWidth; 490 int lfEscapement; 491 int lfOrientation; 492 int lfWeight; 493 byte lfItalic; 494 byte lfUnderline; 495 byte lfStrikeOut; 496 byte lfCharSet; 497 byte lfOutPrecision; 498 byte lfClipPrecision; 499 byte lfQuality; 500 byte lfPitchAndFamily; 501 // use LOGFONT.size instead of sizeof 502 bool isValid; 484 version(Unicode) { 485 alias LOGFONTW LOGFONT; 486 } else { 487 alias LOGFONTA LOGFONT; 503 488 } 504 489 … … 519 504 //char[OS.LF_FACESIZE] lfFaceName; 520 505 char[32] lfFaceName; 506 bool isValid; 521 507 } 522 508 … … 537 523 //wchar[OS.LF_FACESIZE] lfFaceName; 538 524 wchar[32] lfFaceName; 525 bool isValid; 539 526 } 540 527 … … 604 591 605 592 wchar[80] szText; 593 } 594 595 /+ With doing the version and alias for LOGFONT, the same thing is not necessary with this struct, as it can now 596 just use LOGFONT. See below the aliases and the A and W (after the end of this comment). 597 version(Unicode) { 598 alias NONCLIENTMETRICSW NONCLIENTMETRICS; 599 } else { 600 alias NONCLIENTMETRICSW NONCLIENTMETRICS; 601 } 602 603 struct NONCLIENTMETRICSA { 604 int cbSize; 605 int iBorderWidth; 606 int iScrollWidth; 607 int iScrollHeight; 608 int iCaptionWidth; 609 int iCaptionHeight; 610 int iSmCaptionWidth; 611 int iSmCaptionHeight; 612 int iMenuWidth; 613 int iMenuHeight; 614 LOGFONTA lfCaptionFont; 615 LOGFONTA lfSmCaptionFont; 616 LOGFONTA lfMenuFont; 617 LOGFONTA lfStatusFont; 618 LOGFONTA lfMessageFont; 619 } 620 621 struct NONCLIENTMETRICSW { 622 int cbSize; 623 int iBorderWidth; 624 int iScrollWidth; 625 int iScrollHeight; 626 int iCaptionWidth; 627 int iCaptionHeight; 628 int iSmCaptionWidth; 629 int iSmCaptionHeight; 630 int iMenuWidth; 631 int iMenuHeight; 632 LOGFONTW lfCaptionFont; 633 LOGFONTW lfSmCaptionFont; 634 LOGFONTW lfMenuFont; 635 LOGFONTW lfStatusFont; 636 LOGFONTW lfMessageFont; 637 } 638 +/ 639 640 struct NONCLIENTMETRICS { 641 int cbSize; 642 int iBorderWidth; 643 int iScrollWidth; 644 int iScrollHeight; 645 int iCaptionWidth; 646 int iCaptionHeight; 647 int iSmCaptionWidth; 648 int iSmCaptionHeight; 649 int iMenuWidth; 650 int iMenuHeight; 651 LOGFONT lfCaptionFont; 652 LOGFONT lfSmCaptionFont; 653 LOGFONT lfMenuFont; 654 LOGFONT lfStatusFont; 655 LOGFONT lfMessageFont; 606 656 } 607 657
