From c86bef70c968eff87df19f1478c2fed1e9196fe9 Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Fri, 18 Sep 2009 19:12:31 -0500 Subject: [PATCH] update windows.types structs --- basis/ui/backend/windows/windows.factor | 2 +- basis/windows/types/types.factor | 91 ++++++++++++------------- 2 files changed, 46 insertions(+), 47 deletions(-) diff --git a/basis/ui/backend/windows/windows.factor b/basis/ui/backend/windows/windows.factor index 5e2c25ea30..1e01f889dc 100755 --- a/basis/ui/backend/windows/windows.factor +++ b/basis/ui/backend/windows/windows.factor @@ -653,7 +653,7 @@ M: windows-ui-backend do-events : init-win32-ui ( -- ) V{ } clone nc-buttons set-global - "MSG" malloc-object msg-obj set-global + MSG malloc-struct msg-obj set-global GetDoubleClickTime milliseconds double-click-timeout set-global ; : cleanup-win32-ui ( -- ) diff --git a/basis/windows/types/types.factor b/basis/windows/types/types.factor index 544abb69a8..fa043b8033 100755 --- a/basis/windows/types/types.factor +++ b/basis/windows/types/types.factor @@ -250,14 +250,13 @@ STRUCT: RECT { right LONG } { bottom LONG } ; -C-STRUCT: PAINTSTRUCT - { "HDC" " hdc" } - { "BOOL" "fErase" } - { "RECT" "rcPaint" } - { "BOOL" "fRestore" } - { "BOOL" "fIncUpdate" } - { "BYTE[32]" "rgbReserved" } -; +STRUCT: PAINTSTRUCT + { hdc HDC } + { fErase BOOL } + { rcPaint RECT } + { fRestore BOOL } + { fIncUpdate BOOL } + { rgbReserved BYTE[32] } ; STRUCT: BITMAPINFOHEADER { biSize DWORD } @@ -285,21 +284,21 @@ STRUCT: BITMAPINFO TYPEDEF: void* LPPAINTSTRUCT TYPEDEF: void* PAINTSTRUCT -C-STRUCT: POINT - { "LONG" "x" } - { "LONG" "y" } ; +STRUCT: POINT + { x LONG } + { y LONG } ; STRUCT: SIZE { cx LONG } { cy LONG } ; -C-STRUCT: MSG - { "HWND" "hWnd" } - { "UINT" "message" } - { "WPARAM" "wParam" } - { "LPARAM" "lParam" } - { "DWORD" "time" } - { "POINT" "pt" } ; +STRUCT: MSG + { hWnd HWND } + { message UINT } + { wParam WPARAM } + { lParam LPARAM } + { time DWORD } + { pt POINT } ; TYPEDEF: MSG* LPMSG @@ -341,34 +340,34 @@ TYPEDEF: PFD* LPPFD TYPEDEF: HANDLE HGLRC TYPEDEF: HANDLE HRGN -C-STRUCT: LVITEM - { "uint" "mask" } - { "int" "iItem" } - { "int" "iSubItem" } - { "uint" "state" } - { "uint" "stateMask" } - { "void*" "pszText" } - { "int" "cchTextMax" } - { "int" "iImage" } - { "long" "lParam" } - { "int" "iIndent" } - { "int" "iGroupId" } - { "uint" "cColumns" } - { "uint*" "puColumns" } - { "int*" "piColFmt" } - { "int" "iGroup" } ; - -C-STRUCT: LVFINDINFO - { "uint" "flags" } - { "char*" "psz" } - { "long" "lParam" } - { "POINT" "pt" } - { "uint" "vkDirection" } ; - -C-STRUCT: ACCEL - { "BYTE" "fVirt" } - { "WORD" "key" } - { "WORD" "cmd" } ; +STRUCT: LVITEM + { mask uint } + { iItem int } + { iSubItem int } + { state uint } + { stateMask uint } + { pszText void* } + { cchTextMax int } + { iImage int } + { lParam long } + { iIndent int } + { iGroupId int } + { cColumns uint } + { puColumns uint* } + { piColFmt int* } + { iGroup int } ; + +STRUCT: LVFINDINFO + { flags uint } + { psz char* } + { lParam long } + { pt POINT } + { vkDirection uint } ; + +STRUCT: ACCEL + { fVirt BYTE } + { key WORD } + { cmd WORD } ; TYPEDEF: ACCEL* LPACCEL TYPEDEF: DWORD COLORREF -- 2.34.1