From aa142a1b52c2e99487a20430a30b9399e9ed058f Mon Sep 17 00:00:00 2001 From: "U-FROGGER\\erg" Date: Sat, 2 May 2009 20:36:31 -0500 Subject: [PATCH] fix windows ui --- basis/ui/backend/windows/windows.factor | 12 ++++++------ basis/ui/gadgets/worlds/worlds-docs.factor | 2 +- basis/ui/gadgets/worlds/worlds.factor | 0 basis/windows/gdi32/gdi32.factor | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) mode change 100644 => 100755 basis/ui/gadgets/worlds/worlds-docs.factor mode change 100644 => 100755 basis/ui/gadgets/worlds/worlds.factor diff --git a/basis/ui/backend/windows/windows.factor b/basis/ui/backend/windows/windows.factor index eff8db238b..24ae72740f 100755 --- a/basis/ui/backend/windows/windows.factor +++ b/basis/ui/backend/windows/windows.factor @@ -11,7 +11,7 @@ threads libc combinators fry combinators.short-circuit continuations command-line shuffle opengl ui.render ascii math.bitwise locals accessors math.rectangles math.order ascii calendar io.encodings.utf16n windows.errors literals ui.pixel-formats -ui.pixel-formats.private memoize ; +ui.pixel-formats.private memoize classes ; IN: ui.backend.windows SINGLETON: windows-ui-backend @@ -83,7 +83,7 @@ CONSTANT: pfd-flag-map H{ pfd-flag-map at [ ] [ 0 ] if* ; : >pfd-flags ( attributes -- flags ) - [ >pfd-flag ] map [ bitor ] binary-reduce + [ >pfd-flag ] [ bitor ] map-reduce PFD_SUPPORT_OPENGL bitor ; : attr-value ( attributes name -- value ) @@ -632,11 +632,11 @@ M: windows-ui-backend do-events : setup-gl ( world -- ) [ get-dc ] keep - [ swap [ hDC>> set-pixel-format ] [ get-rc ] bi ] + [ swap [ handle>> hDC>> set-pixel-format ] [ get-rc ] bi ] with-world-pixel-format ; M: windows-ui-backend (open-window) ( world -- ) - [ dup create-window f f >>handle setup-gl ] + [ dup create-window [ f f ] dip f f >>handle setup-gl ] [ dup handle>> hWnd>> register-window ] [ handle>> hWnd>> show-window ] tri ; @@ -647,10 +647,10 @@ M: win-base select-gl-context ( handle -- ) M: win-base flush-gl-context ( handle -- ) hDC>> SwapBuffers win32-error=0/f ; -: setup-offscreen-gl ( world -- hDC hRC hBitmap bits ) +: setup-offscreen-gl ( world -- ) dup [ handle>> ] [ dim>> ] bi make-offscreen-dc-and-bitmap [ >>hDC ] [ >>hBitmap ] [ >>bits ] tri* drop [ - swap [ hDC>> set-pixel-format ] [ get-rc ] bi + swap [ handle>> hDC>> set-pixel-format ] [ get-rc ] bi ] with-world-pixel-format ; M: windows-ui-backend (open-offscreen-buffer) ( world -- ) diff --git a/basis/ui/gadgets/worlds/worlds-docs.factor b/basis/ui/gadgets/worlds/worlds-docs.factor old mode 100644 new mode 100755 index ad9f3f8d4f..9d4df189f2 --- a/basis/ui/gadgets/worlds/worlds-docs.factor +++ b/basis/ui/gadgets/worlds/worlds-docs.factor @@ -1,6 +1,6 @@ USING: ui.gadgets ui.render ui.text ui.text.private ui.gestures ui.backend help.markup help.syntax -models opengl sequences strings ui.pixel-formats ; +models opengl sequences strings ; IN: ui.gadgets.worlds HELP: user-input diff --git a/basis/ui/gadgets/worlds/worlds.factor b/basis/ui/gadgets/worlds/worlds.factor old mode 100644 new mode 100755 diff --git a/basis/windows/gdi32/gdi32.factor b/basis/windows/gdi32/gdi32.factor index 9b7cd2e35e..0699c92be3 100755 --- a/basis/windows/gdi32/gdi32.factor +++ b/basis/windows/gdi32/gdi32.factor @@ -1419,7 +1419,7 @@ DESTRUCTOR: DeleteDC ! FUNCTION: DeleteMetaFile FUNCTION: BOOL DeleteObject ( HGDIOBJ hObject ) ; DESTRUCTOR: DeleteObject -! FUNCTION: DescribePixelFormat +FUNCTION: int DescribePixelFormat ( HDC hdc, int iPixelFormat, UINT nBytes, PIXELFORMATDESCRIPTOR* ppfd ) ; ! FUNCTION: DeviceCapabilitiesExA ! FUNCTION: DeviceCapabilitiesExW ! FUNCTION: DPtoLP -- 2.34.1