Ar an fichiú lá de mí na Samhain, scríobh Zajcev Evgeny:
"Stephen J. Turnbull" <stephen(a)xemacs.org> writes:
> Aidan Kehoe writes:
>
> > They look reasonable to me. They should return strings, though,
>
> An alternative would be a cons of two integers, as in the time
> functions.
>
> I wonder how/if xlib.el deals with this?
it uses floats afaik, or just pretends that xemacsen integers have 32
bits ;)
BTW, my first reply wasn't delivered to xemacs-beta@
because of invalid from address i used, so i will repost it.
Here is example how you could use it to access desktop information:
(let ((xdpy (XOpenDisplay (getenv "DISPLAY"))))
(unwind-protect
(XGetWindowProperty
xdpy (XDefaultRootWindow xdpy)
(XInternAtom xdpy "_NET_CURRENT_DESKTOP")
nil nil nil XA-cardinal)
(XCloseDisplay xdpy)))
That’s not workable for implementing what Jonathan wants to do, though. This
is from one of my current sessions, started in a screen(1) pseudo-tty, with
a gnuclient X11 window:
(getenv "DISPLAY")
=> nil ;; This means we can’t trust getenv
(selected-device)
=> #<x-device on ":0.0" 0x1400f016>
(XOpenDisplay (device-connection (selected-device)))
=> (error "Network error: connection failed, \"Connection refused\",
\"bonbon\", \"X-bonbon:0\"")
;; That was because the connection wasn’t a TCP connection, it was a local
;; unix connection.
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghé, que tuvo que huir
precipitadamente de la aldea por culpa de la escasez de rinocerontes?
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta