]> gitweb.factorcode.org Git - factor.git/commitdiff
ui.pixel-formats,ui.backend.*: removing the (pixel-format-attribute) generic
authorBjörn Lindqvist <bjourne@gmail.com>
Mon, 30 Jan 2017 04:07:28 +0000 (05:07 +0100)
committerBjörn Lindqvist <bjourne@gmail.com>
Mon, 30 Jan 2017 04:07:28 +0000 (05:07 +0100)
It appears to be unused code.

basis/ui/backend/cocoa/cocoa.factor
basis/ui/backend/gtk/gtk.factor
basis/ui/backend/windows/windows.factor
basis/ui/backend/x11/x11.factor
basis/ui/pixel-formats/pixel-formats.factor

index 5c6189fc6f2b3e3383d3ecf45408ab4082b01cd6..3a26cfb0dc91c43da5e719cba7404116cc16ed7b 100644 (file)
@@ -49,15 +49,6 @@ M: cocoa-ui-backend (make-pixel-format)
 M: cocoa-ui-backend (free-pixel-format)
     handle>> -> release ;
 
-M: cocoa-ui-backend (pixel-format-attribute)
-    [ handle>> ] [ >NSOpenGLPFA ] bi*
-    [ drop f ]
-    [
-        first
-        { int } [ swap 0 -> getValues:forAttribute:forVirtualScreen: ]
-        with-out-parameters
-    ] if-empty ;
-
 TUPLE: pasteboard handle ;
 
 C: <pasteboard> pasteboard
index 5445f9bb63e3e2ab789f0940c8b6f7f0f695200a..819d7afe4c3fe1f8a017dd4f731ea00e48b766ba 100644 (file)
@@ -1,12 +1,11 @@
 ! Copyright (C) 2010, 2011 Anton Gorenko, Philipp Bruschweiler.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors alien.accessors alien.c-types alien.data
-alien.strings arrays assocs classes.struct combinators continuations
-destructors environment gdk.ffi gdk.gl.ffi gdk.pixbuf.ffi glib.ffi
-gobject-introspection.standard-types gobject.ffi gtk.ffi gtk.gl.ffi
-io.encodings.binary io.encodings.utf8 io.files io.pathnames kernel
-libc literals locals math math.bitwise math.vectors namespaces
-sequences strings system threads ui ui.backend
+USING: accessors alien.accessors alien.c-types alien.strings arrays
+assocs classes.struct combinators continuations destructors
+environment gdk.ffi gdk.gl.ffi gdk.pixbuf.ffi glib.ffi gobject.ffi
+gtk.ffi gtk.gl.ffi io.encodings.binary io.encodings.utf8 io.files
+io.pathnames kernel libc literals locals math math.bitwise
+math.vectors namespaces sequences strings system threads ui ui.backend
 ui.backend.gtk.input-methods ui.backend.gtk.io ui.backend.x11.keys
 ui.clipboards ui.event-loop ui.gadgets ui.gadgets.private
 ui.gadgets.worlds ui.gestures ui.pixel-formats
@@ -394,11 +393,6 @@ M: gtk-ui-backend (make-pixel-format)
 M: gtk-ui-backend (free-pixel-format)
     handle>> g_object_unref ;
 
-M: gtk-ui-backend (pixel-format-attribute)
-    [ handle>> ] [ >gl-config-attribs ] bi*
-    { gint } [ gdk_gl_config_get_attrib drop ]
-    with-out-parameters ;
-
 M: window-handle select-gl-context ( handle -- )
     drawable>>
     [ gtk_widget_get_gl_window ] [ gtk_widget_get_gl_context ] bi
index 23b237ab7e88e103b0b38aeb022d91a47db803f1..d2efe5e80056c39ca77ed2bcc07843917967fdbb 100755 (executable)
@@ -60,15 +60,6 @@ PIXEL-FORMAT-ATTRIBUTE-TABLE: WGL_ARB { $ WGL_SUPPORT_OPENGL_ARB 1 } H{
     [ handle>> hDC>> ] dip >WGL_ARB-int-array f 1 { c:int c:int }
     [ wglChoosePixelFormatARB win32-error=0/f ] with-out-parameters drop ;
 
-: arb-pixel-format-attribute ( pixel-format attribute -- value )
-    >WGL_ARB
-    [ drop f ] [
-        [ [ world>> handle>> hDC>> ] [ handle>> ] bi 0 1 ] dip
-        first c:int <ref> { c:int }
-        [ wglGetPixelFormatAttribivARB win32-error=0/f ]
-        with-out-parameters
-    ] if-empty ;
-
 CONSTANT: pfd-flag-map H{
     { double-buffered $ PFD_DOUBLEBUFFER }
     { stereo $ PFD_STEREO }
@@ -117,42 +108,6 @@ CONSTANT: pfd-flag-map H{
     [ handle>> hDC>> ] [ >pfd ] bi*
     ChoosePixelFormat dup win32-error=0/f ;
 
-: get-pfd ( pixel-format -- pfd )
-    [ world>> handle>> hDC>> ] [ handle>> ] bi
-    PIXELFORMATDESCRIPTOR c:heap-size
-    PIXELFORMATDESCRIPTOR <struct>
-    [ DescribePixelFormat win32-error=0/f ] keep ;
-
-: pfd-flag? ( pfd flag -- ? )
-    [ dwFlags>> ] dip bitand c:c-bool> ;
-
-: (pfd-pixel-format-attribute) ( pfd attribute -- value )
-    {
-        { double-buffered [ PFD_DOUBLEBUFFER pfd-flag? ] }
-        { stereo [ PFD_STEREO pfd-flag? ] }
-        { offscreen [ PFD_DRAW_TO_BITMAP pfd-flag? ] }
-        { fullscreen [ PFD_DRAW_TO_WINDOW pfd-flag? ] }
-        { windowed [ PFD_DRAW_TO_WINDOW pfd-flag? ] }
-        { software-rendered [ PFD_GENERIC_FORMAT pfd-flag? ] }
-        { color-bits [ cColorBits>> ] }
-        { red-bits [ cRedBits>> ] }
-        { green-bits [ cGreenBits>> ] }
-        { blue-bits [ cBlueBits>> ] }
-        { alpha-bits [ cAlphaBits>> ] }
-        { accum-bits [ cAccumBits>> ] }
-        { accum-red-bits [ cAccumRedBits>> ] }
-        { accum-green-bits [ cAccumGreenBits>> ] }
-        { accum-blue-bits [ cAccumBlueBits>> ] }
-        { accum-alpha-bits [ cAccumAlphaBits>> ] }
-        { depth-bits [ cDepthBits>> ] }
-        { stencil-bits [ cStencilBits>> ] }
-        { aux-buffers [ cAuxBuffers>> ] }
-        [ 2drop f ]
-    } case ;
-
-: pfd-pixel-format-attribute ( pixel-format attribute -- value )
-    [ get-pfd ] dip (pfd-pixel-format-attribute) ;
-
 M: windows-ui-backend (make-pixel-format)
     over has-wglChoosePixelFormatARB?
     [ arb-make-pixel-format ] [ pfd-make-pixel-format ] if ;
@@ -160,10 +115,6 @@ M: windows-ui-backend (make-pixel-format)
 M: windows-ui-backend (free-pixel-format)
     drop ;
 
-M: windows-ui-backend (pixel-format-attribute)
-    over world>> has-wglChoosePixelFormatARB?
-    [ arb-pixel-format-attribute ] [ pfd-pixel-format-attribute ] if ;
-
 PRIVATE>
 
 : GET_APPCOMMAND_LPARAM ( lParam -- appCommand )
index a61bd2fe9fda00091902fd27fd3afd96a82a40d5..2b97e36d350a871f90dc42afeaea6fc87c4a201c 100644 (file)
@@ -94,14 +94,6 @@ M: x11-ui-backend (make-pixel-format)
 M: x11-ui-backend (free-pixel-format)
     handle>> XFree ;
 
-M: x11-ui-backend (pixel-format-attribute)
-    [ dpy get ] 2dip
-    [ handle>> ] [ >glx-visual ] bi*
-    [ 2drop f ] [
-        first
-        { int } [ glXGetConfig drop ] with-out-parameters
-    ] if-empty ;
-
 : key-code ( code -- string/f action? )
     code>sym [ dup integer? [ 1string ] when ] dip ;
 
index 5c0d47b08c5d048b93d0bb383b63be8f8618c54d..97f8dc6a3fe65eeb0e0cfaa220f61bd41a523737 100644 (file)
@@ -14,7 +14,7 @@ SYMBOLS:
     software-rendered
     backing-store
     multisampled
-    supersampled 
+    supersampled
     sample-alpha
     color-float ;
 
@@ -43,7 +43,6 @@ TUPLE: samples < pixel-format-attribute ;
 
 HOOK: (make-pixel-format) ui-backend ( world attributes -- pixel-format-handle )
 HOOK: (free-pixel-format) ui-backend ( pixel-format -- )
-HOOK: (pixel-format-attribute) ui-backend ( pixel-format attribute-name -- value )
 
 ERROR: invalid-pixel-format-attributes world attributes ;