]> gitweb.factorcode.org Git - factor.git/commitdiff
fix windows ui
authorU-FROGGER\erg <erg@frogger.(none)>
Sun, 3 May 2009 01:36:31 +0000 (20:36 -0500)
committerU-FROGGER\erg <erg@frogger.(none)>
Sun, 3 May 2009 01:36:31 +0000 (20:36 -0500)
basis/ui/backend/windows/windows.factor
basis/ui/gadgets/worlds/worlds-docs.factor [changed mode: 0644->0755]
basis/ui/gadgets/worlds/worlds.factor [changed mode: 0644->0755]
basis/windows/gdi32/gdi32.factor

index eff8db238ba3edc65c0d47f1104b47e5ee644d19..24ae72740f10e8626f01951bcc5b6e8ff12b0ddb 100755 (executable)
@@ -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 <win> >>handle setup-gl ]
+    [ dup create-window [ f f ] dip f f <win> >>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 -- )
old mode 100644 (file)
new mode 100755 (executable)
index ad9f3f8..9d4df18
@@ -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
old mode 100644 (file)
new mode 100755 (executable)
index 9b7cd2e35e9dee9c5e5da062f34c4c81ee65d3b6..0699c92be336e8998af9e591fc85080eea3ef2b2 100755 (executable)
@@ -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