ui.pixel-formats,ui.backend.*: removing the (pixel-format-attribute) generic
It appears to be unused code.char-rename
parent
369f5b6d13
commit
1b1842f62d
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 )
|
||||
|
|
|
@ -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 ;
|
||||
|
||||
|
|
|
@ -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 ;
|
||||
|
||||
|
|
Loading…
Reference in New Issue