x11.*: auto string to alien conversion for XOpenDisplay
parent
acb4dec55d
commit
36966c1a7d
|
@ -23,7 +23,6 @@ SYMBOL: root
|
|||
|
||||
: init-x ( display-string -- )
|
||||
init-locale
|
||||
dup [ ascii string>alien ] when
|
||||
XOpenDisplay check-display dpy set-global
|
||||
dpy get XDefaultScreen scr set-global
|
||||
dpy get scr get XRootWindow root set-global
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
!
|
||||
! https://www.x.org/releases/X11R7.6/doc/libX11/specs/libX11/libX11.html
|
||||
USING: accessors alien.c-types alien.data alien.syntax classes.struct
|
||||
kernel literals math x11.syntax x11.X ;
|
||||
io.encodings.ascii kernel literals math x11.X x11.syntax ;
|
||||
FROM: alien.c-types => short ;
|
||||
IN: x11.xlib
|
||||
|
||||
|
@ -51,7 +51,7 @@ STRUCT: Display
|
|||
{ free_funcs void* }
|
||||
{ fd int } ;
|
||||
|
||||
X-FUNCTION: Display* XOpenDisplay ( void* display_name )
|
||||
X-FUNCTION: Display* XOpenDisplay ( c-string[ascii] display_name )
|
||||
|
||||
! 2.2 Obtaining Information about the Display, Image Formats, or Screens
|
||||
|
||||
|
|
Loading…
Reference in New Issue