Changeset 16

Show
Ignore:
Timestamp:
05/23/04 04:40:07 (4 years ago)
Author:
brad
Message:

More work to solve Forward References
Consolidated all structs from internal.win32 to internal.win32.types.d
Added Yuriy's widgets files
Left off trying to compile menuitem.d outside of eclipse.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/0.1/src/dwt/graphics/device.d

    r12 r16  
    2222 
    2323    import dwt.internal.compatibility; 
    24  
     24     
    2525    import dwt.internal.win32.os; 
    26     import dwt.internal.win32.logfont; 
    27     import dwt.internal.win32.textmetric; 
    2826    import dwt.internal.win32.tchar; 
     27    import dwt.internal.win32.types; 
    2928 
    3029    import dwt.util.runnable; 
  • branches/0.1/src/dwt/graphics/font.d

    r15 r16  
    1212private import dwt.graphics.fontdata; 
    1313private import dwt.internal.win32.os; 
    14 private import dwt.internal.win32.logfont
     14private import dwt.internal.win32.types
    1515private import std.string; 
    1616 
  • branches/0.1/src/dwt/graphics/fontdata.d

    r15 r16  
    1111private import dwt.dwt; 
    1212 
    13 private import dwt.internal.win32.logfont; 
     13private import dwt.internal.callback; 
     14 
    1415private import dwt.internal.win32.os; 
    1516private import dwt.internal.win32.tchar; 
    16 private import dwt.internal.callback; 
     17private import dwt.internal.win32.types; 
     18 
    1719private import dwt.util.string; 
     20 
    1821private import std.string; 
    1922 
  • branches/0.1/src/dwt/graphics/fontmetrics.d

    r11 r16  
    77+/ 
    88 
    9 private import dwt.internal.win32.textmetric
     9private import dwt.internal.win32.types
    1010 
    1111/** 
  • branches/0.1/src/dwt/graphics/gc.d

    r15 r16  
    2828    import dwt.internal.compatibility; 
    2929 
    30     import dwt.internal.win32.iconinfo; 
    3130    import dwt.internal.win32.os; 
    32     import dwt.internal.win32.rect; 
    3331    import dwt.internal.win32.tchar; 
    34     import dwt.internal.win32.textmetric; 
    3532    import dwt.internal.win32.types; 
    3633     
  • branches/0.1/src/dwt/graphics/gcdata.d

    r12 r16  
    66+/ 
    77 
    8 private import dwt.internal.win32.paintstruct
     8private import dwt.internal.win32.types
    99 
    1010 
  • branches/0.1/src/dwt/graphics/image.d

    r15 r16  
    2222    import dwt.graphics.rgb; 
    2323 
    24     import dwt.internal.win32.iconinfo; 
    2524    import dwt.internal.win32.os; 
    2625    import dwt.internal.win32.types; 
    27     import dwt.internal.win32.rect; 
    2826 
    2927    import std.string; 
  • branches/0.1/src/dwt/graphics/region.d

    r15 r16  
    1111{ 
    1212    import dwt.dwt; 
    13     import dwt.internal.win32.os; 
    14     import dwt.internal.win32.types; 
    15     import dwt.internal.win32.rect; 
     13 
    1614    import dwt.graphics.device; 
    1715    import dwt.graphics.rectangle; 
    1816    import dwt.graphics.point; 
     17 
     18    import dwt.internal.win32.os; 
     19    import dwt.internal.win32.types; 
     20 
    1921    import dwt.util.string; 
     22 
    2023} 
    2124 
  • branches/0.1/src/dwt/internal/platform.d

    r11 r16  
    66 
    77    import dwt.internal.win32.os; 
    8     import dwt.internal.win32.msg
     8    import dwt.internal.win32.types
    99 
    1010    public class Platform { 
  • branches/0.1/src/dwt/internal/win32/os.d

    r15 r16  
    66    import dwt.internal.library; 
    77 
    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; 
    178    import dwt.internal.win32.tchar; 
    18     import dwt.internal.win32.textmetric; 
    199    import dwt.internal.win32.types; 
    20     import dwt.internal.win32.wndclass; 
    2110} 
    2211 
     
    13861375} 
    13871376 
    1388 /+ 
     1377 
    13891378 
    13901379int 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) { 
     
    14101399} 
    14111400 
     1401 
    14121402int DispatchMessage (MSG lpmsg) { 
    14131403    if (IsUnicode) return DispatchMessageW (lpmsg); 
     
    14281418    return DrawStateA (hdc, hbr, lpOutputFunc, lData, wData, x, y, cx, cy, fuFlags); 
    14291419} 
    1430 +/ 
     1420 
    14311421 
    14321422static int DrawText (int hDC, TCHAR lpString, int nCount, RECT* lpRect, int uFormat) { 
     
    15271517} 
    15281518 
    1529 bit GetClassInfo (int hInstance, TCHAR lpClassName, dwt.internal.win32.wndclass.WNDCLASS* lpWndClass) { 
     1519bit GetClassInfo (int hInstance, TCHAR lpClassName, WNDCLASS* lpWndClass) { 
    15301520    if (IsUnicode) { 
    15311521        wchar* lpClassName1 = w_str(lpClassName); 
     
    16701660} 
    16711661 
    1672 int GetWindowLong (int hWnd, int nIndex) { 
     1662int GetWindowLong (int hWnd, uint nIndex) { 
    16731663    if (IsUnicode) return GetWindowLongW (hWnd, nIndex); 
    16741664    return GetWindowLongA (hWnd, nIndex); 
     
    18161806} 
    18171807 
    1818 /+ 
     1808 
    18191809 
    18201810bit PeekMessage (MSG lpMsg, int hWnd, int wMsgFilterMin, int wMsgFilterMax, int wRemoveMsg) { 
     
    20362026 
    20372027bit 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); 
    20402030} 
    20412031 
     
    20652055 
    20662056 
    2067 +/ 
     2057 
    20682058 
    20692059 
     
    24512441    bit PostThreadMessageW (int idThread, int Msg, int wParam, int lParam); 
    24522442    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); 
    24552445    bit PtInRect (RECT* rect, POINT* pt); 
    24562446    bit PtInRegion (int hrgn, int X, int Y); 
     
    25632553    //int SHBrowseForFolderW (BROWSEINFO* lpbi); 
    25642554    //int SHBrowseForFolderA (BROWSEINFO* lpbi); 
    2565     //bit SHCreateMenuBar(SHMENUBARINFO* pmb); 
     2555    bit SHCreateMenuBar(SHMENUBARINFO* pmb); 
    25662556    //bit SHHandleWMSettingChange (int hwnd, int wParam, int lParam, SHACTIVATEINFO* psai); 
    25672557    //int SHRecognizeGesture(SHRGINFO* shrg); 
  • branches/0.1/src/dwt/internal/win32/types.d

    r11 r16  
    44 * win32 types and junk 
    55 */ 
    6  
    7 private 
    8 { 
    9     import dwt.internal.win32.rect; 
    10 } 
    116 
    127alias void* HINSTANCE; 
     
    1712alias void* HBITMAP; 
    1813 
    19 struct SIZE { 
    20     int width; 
    21     int height; 
     14struct RECT { 
     15    int left; 
     16    int top; 
     17    int right; 
     18    int bottom; 
    2219} 
    2320 
     
    5956} 
    6057 
    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  
    8058struct BITMAP { 
    8159    int bmType; 
     
    129107    uint dsOffset; 
    130108} 
     109 
     110struct 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 
     132struct FILETIME { 
     133    int dwLowDateTime; 
     134    int dwHighDateTime; 
     135} 
     136 
     137struct 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 
     148struct LVHITTESTINFO { 
     149//  POINT pt; 
     150    int x; 
     151    int y; 
     152    int flags; 
     153    int iItem; 
     154    int iSubItem; 
     155} 
     156 
     157struct 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 
     170struct 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 
     194struct SIZE { 
     195    int width; 
     196    int height; 
     197} 
     198 
     199struct TBBUTTON { 
     200    int iBitmap; 
     201    int idCommand; 
     202    byte fsState; 
     203    byte fsStyle; 
     204    int dwData; 
     205    int iString; 
     206} 
     207 
     208 
     209struct 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 
     222struct TCITEM { 
     223    int mask; 
     224    int dwState; 
     225    int dwStateMask; 
     226    int pszText; 
     227    int cchTextMax; 
     228    int iImage; 
     229    int lParam; 
     230} 
     231 
     232struct 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 
     244struct TVHITTESTINFO { 
     245//  POINT pt; 
     246    int x; 
     247    int y; 
     248    int flags; 
     249    int hItem; 
     250} 
     251 
     252struct 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 
     268struct 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 
     281struct 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 
     292struct 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 
     315struct DOCINFO { 
     316    int cbSize;  
     317    int lpszDocName; // LPCTSTR 
     318    int lpszOutput; // LPCTSTR 
     319    int lpszDatatype;// LPCTSTR 
     320    int fwType; // DWORD 
     321} 
     322 
     323struct 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 
     336struct ACCEL { 
     337    byte fVirt; 
     338    short key; 
     339    short cmd; 
     340} 
     341 
     342struct 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 
     353struct 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 
     368struct 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 
     383struct 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 
     398struct DLLVERSIONINFO { 
     399    int cbSize; 
     400    int dwMajorVersion; 
     401    int dwMinorVersion; 
     402    int dwBuildNumber; 
     403    int dwPlatformID; 
     404} 
     405 
     406struct 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 
     419struct ICONINFO { 
     420    bool fIcon; 
     421    int xHotspot; 
     422    int yHotspot; 
     423    int hbmMask; 
     424    int hbmColor; 
     425} 
     426 
     427struct 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 
     444struct 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 
     462struct 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 
     482alias int LRESULT; 
     483 
     484struct 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 
     495struct NMHDR { 
     496    int hwndFrom; 
     497    int idFrom; 
     498    int code; 
     499} 
     500 
     501struct 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 
     513struct 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 
     525class 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 
     538struct OSVERSIONINFO { 
     539    int dwOSVersionInfoSize; 
     540    int dwMajorVersion; 
     541    int dwMinorVersion; 
     542    int dwBuildNumber; 
     543    int dwPlatformId; 
     544} 
     545 
     546struct OSVERSIONINFOA { 
     547    int dwOSVersionInfoSize; 
     548    int dwMajorVersion; 
     549    int dwMinorVersion; 
     550    int dwBuildNumber; 
     551    int dwPlatformId; 
     552    char[128] szCSDVersion; 
     553} 
     554 
     555struct OSVERSIONINFOW { 
     556    int dwOSVersionInfoSize; 
     557    int dwMajorVersion; 
     558    int dwMinorVersion; 
     559    int dwBuildNumber; 
     560    int dwPlatformId; 
     561    wchar[128] szCSDVersion; 
     562} 
     563 
     564struct 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 
     575struct 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 
     586struct 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 
     597struct 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 
     616struct 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 
     640struct 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 
     664struct 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 
     675struct 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 
     688struct 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  
    4444    private import dwt.graphics.point; 
    4545     
    46     private import dwt.internal.win32.drawitemstruct; 
    47     private import dwt.internal.win32.lresult; 
    4846    private import dwt.internal.win32.os; 
    4947    private import dwt.internal.win32.tchar; 
    50     private import dwt.internal.win32.textmetric
     48    private import dwt.internal.win32.types
    5149     
     50    private import dwt.util.util; 
     51 
    5252    private import dwt.widgets.composite; 
    5353 
     
    9393 *    <li>ERROR_NULL_ARGUMENT - if the parent is null</li> 
    9494 * </ul> 
    95  * @exception SWTException <ul> 
     95 * @exception DWTException <ul> 
    9696 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li> 
    9797 *    <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li> 
     
    131131 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li> 
    132132 * </ul> 
    133  * @exception SWTException <ul> 
     133 * @exception DWTException <ul> 
    134134 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 
    135135 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> 
     
    265265 * @return the alignment  
    266266 * 
    267  * @exception SWTException <ul> 
     267 * @exception DWTException <ul> 
    268268 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 
    269269 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> 
     
    297297 * @return the receiver's image 
    298298 * 
    299  * @exception SWTException <ul> 
     299 * @exception DWTException <ul> 
    300300 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 
    301301 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> 
     
    307307} 
    308308 
    309 char[] getNameText () { 
     309String getNameText () { 
    310310    return getText (); 
    311311} 
     
    322322 * @return the selection state 
    323323 * 
    324  * @exception SWTException <ul> 
     324 * @exception DWTException <ul> 
    325325 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 
    326326 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> 
     
    341341 * @return the receiver's text 
    342342 * 
    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 */ 
     348public String getText () { 
    349349    checkWidget (); 
    350350    if ((style & DWT.ARROW) != 0) return ""; 
     
    396396 *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li> 
    397397 * </ul> 
    398  * @exception SWTException <ul> 
     398 * @exception DWTException <ul> 
    399399 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 
    400400 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> 
     
    449449 * @param alignment the new alignment  
    450450 * 
    451  * @exception SWTException <ul> 
     451 * @exception DWTException <ul> 
    452452 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 
    453453 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> 
     
    504504 *    <li>ERROR_INVALID_ARGUMENT - if the image has been disposed</li> 
    505505 * </ul>  
    506  * @exception SWTException <ul> 
     506 * @exception DWTException <ul> 
    507507 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 
    508508 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> 
     
    578578 * @param selected the new selection state 
    579579 * 
    580  * @exception SWTException <ul> 
     580 * @exception DWTException <ul> 
    581581 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> 
    582582 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> 
     
    622622 *    <li>ERROR_NULL_ARGUMENT - if the text is null</li> 
    623623 * </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 */ 
     629public void setText (String string) { 
    630630    checkWidget (); 
    631631    if (string == null) error (DWT.ERROR_NULL_ARGUMENT); 
  • branches/0.1/src/dwt/widgets/canvas.d

    r3 r16  
    44 
    55/+ 
    6 import org.eclipse.swt.internal.win32.*; 
    7 import org.eclipse.swt.*; 
    8 import org.eclipse.swt.graphics.*; 
     6import org.eclipse.DWT.internal.win32.*; 
     7import org.eclipse.DWT.*; 
     8import org.eclipse.DWT.graphics.*; 
    99+/&