windows: FOO>bar is a section end FOO>, so use \FOO>bar for now.

modern-harvey2
Doug Coleman 2017-10-27 20:22:22 -05:00
parent 0319ff7920
commit 1fda1f7525
6 changed files with 12 additions and 12 deletions

View File

@ -44,8 +44,8 @@ MEMO:: (cache-font) ( name size bold? italic? -- HFONT )
\ windows-fonts reset-memoized \ windows-fonts reset-memoized
] "windows.fonts" add-startup-hook ] "windows.fonts" add-startup-hook
: TEXTMETRIC>metrics ( TEXTMETRIC -- metrics ) : \TEXTMETRIC>metrics ( TEXTMETRIC -- metrics )
[ metrics new 0 >>width ] dip { [ metrics new 0 >>width ] dip {
[ tmHeight>> >>height ] [ tmHeight>> >>height ]
[ tmAscent>> >>ascent ] [ tmAscent>> >>ascent ]
[ tmDescent>> >>descent ] [ tmDescent>> >>descent ]

View File

@ -137,7 +137,7 @@ TUPLE: registry-enum-key ;
max-value uint deref max-value uint deref
max-value-data uint deref max-value-data uint deref
security-descriptor uint deref security-descriptor uint deref
last-write-time FILETIME>timestamp last-write-time \FILETIME>timestamp
registry-info boa registry-info boa
] [ ] [
ret n>win32-error-string ret n>win32-error-string

View File

@ -2,6 +2,6 @@ USING: calendar calendar.windows kernel tools.test
windows.time ; windows.time ;
IN: windows.time.tests IN: windows.time.tests
[ t ] [ windows-1601 [ timestamp>FILETIME FILETIME>timestamp ] keep = ] unit-test [ t ] [ windows-1601 [ timestamp>FILETIME \FILETIME>timestamp ] keep = ] unit-test
[ t ] [ windows-time [ windows-time>FILETIME FILETIME>windows-time ] keep = ] unit-test [ t ] [ windows-time [ windows-time>FILETIME \FILETIME>windows-time ] keep = ] unit-test
[ t ] [ windows-1601 400 years time+ [ timestamp>FILETIME FILETIME>timestamp ] keep = ] unit-test [ t ] [ windows-1601 400 years time+ [ timestamp>FILETIME \FILETIME>timestamp ] keep = ] unit-test

View File

@ -10,7 +10,7 @@ IN: windows.time
: windows-1601 ( -- timestamp ) 1601 <year-gmt> ; : windows-1601 ( -- timestamp ) 1601 <year-gmt> ;
: FILETIME>windows-time ( FILETIME -- n ) : \FILETIME>windows-time ( FILETIME -- n )
[ dwLowDateTime>> ] [ dwHighDateTime>> ] bi >64bit ; [ dwLowDateTime>> ] [ dwHighDateTime>> ] bi >64bit ;
: windows-time>timestamp ( n -- timestamp ) : windows-time>timestamp ( n -- timestamp )
@ -18,7 +18,7 @@ IN: windows.time
: windows-time ( -- n ) : windows-time ( -- n )
FILETIME <struct> [ GetSystemTimeAsFileTime ] keep FILETIME <struct> [ GetSystemTimeAsFileTime ] keep
FILETIME>windows-time ; \FILETIME>windows-time ;
: timestamp>windows-time ( timestamp -- n ) : timestamp>windows-time ( timestamp -- n )
! 64bit number representing # of nanoseconds since Jan 1, 1601 (UTC) ! 64bit number representing # of nanoseconds since Jan 1, 1601 (UTC)
@ -31,5 +31,5 @@ IN: windows.time
: timestamp>FILETIME ( timestamp -- FILETIME/f ) : timestamp>FILETIME ( timestamp -- FILETIME/f )
dup [ >gmt timestamp>windows-time windows-time>FILETIME ] when ; dup [ >gmt timestamp>windows-time windows-time>FILETIME ] when ;
: FILETIME>timestamp ( FILETIME -- timestamp/f ) : \FILETIME>timestamp ( FILETIME -- timestamp/f )
FILETIME>windows-time windows-time>timestamp ; \FILETIME>windows-time windows-time>timestamp ;

View File

@ -375,7 +375,7 @@ TYPEDEF: DWORD* LPCOLORREF
: color>RGB ( color -- COLORREF ) : color>RGB ( color -- COLORREF )
>rgba-components drop [ 255 * >integer ] tri@ RGB ; >rgba-components drop [ 255 * >integer ] tri@ RGB ;
: RGB>color ( COLORREF -- color ) : \RGB>color ( COLORREF -- color )
>RGB< [ 1/255. * >float ] tri@ 1.0 <rgba> ; >RGB< [ 1/255. * >float ] tri@ 1.0 <rgba> ;
STRUCT: TEXTMETRICW STRUCT: TEXTMETRICW

View File

@ -83,7 +83,7 @@ CONSTANT: ssa-dwFlags flags{ SSA_GLYPHS SSA_FALLBACK SSA_TAB }
: dc-metrics ( dc -- metrics ) : dc-metrics ( dc -- metrics )
TEXTMETRICW <struct> TEXTMETRICW <struct>
[ GetTextMetrics drop ] keep [ GetTextMetrics drop ] keep
TEXTMETRIC>metrics ; \TEXTMETRIC>metrics ;
! DC limit is default soft-limited to 10,000 per process. ! DC limit is default soft-limited to 10,000 per process.
: <script-string> ( font string -- script-string ) : <script-string> ( font string -- script-string )