libera/#commonlisp - IRC Chatlog
Search
21:52:05
piethesailor
I've missed practically the last hour of the feed. Anyone make advancements on the screenshot situation?
22:05:27
Nilby
But you may be get a copy of a window. I was able to get a copy of a window I created under Xwayland.
22:12:32
Nilby
I would guess getting the window of another process/connection might be blocked too but I haven't tried that yet.
8:30:09
Guest86
May someone take a look at https://plaster.tymoon.eu/view/3813#3813 and suggest something? :]
8:39:30
beach
If you want to try things interactively, I suggest you use the CLIM listener. Then you can just issue calls to drawing functions, using *STANDARD-OUTPUT* as the stream.
8:44:57
Guest86
beach thank you for your suggestion to use CLIM listener but I would like to figure out things this way for the time being.
8:49:10
pve
Hi! I'd like to wrap the lambda expression I give to make-method-lambda with symbol-macrolet, like (symbol-macrolet (...) (lambda (...) ...)), but apparently this can't be done. Is there some standard way that I could manually trigger the symbol-macrolet expansion and end up with a lambda expression that I could then give to make-method-lambda?
8:51:29
beach
Guest86: Normally, your pane will be erased for each command in the command loop, so you need to define yourself a display function in which you do the drawing.
8:58:11
jackdaniel
Guest86: try (clime:with-output-to-drawing-stream (stream nil nil :width 800 :height 600) (draw-line* stream 10 10 90 90))
8:59:14
jackdaniel
in principle you may return the stream from the body and use it later for drawing, but remember to call finish-output on the stream to ensure some actual output
9:01:11
jackdaniel
if you want to have the real frame, then set :display-time nil as the argument to the application pane, and define a method that performs drawing, then execute it with execute-frame-command (which is thread-safe)
9:04:07
jackdaniel
you need to go through execute-frame-command because this function takes care of potential race conditions
9:05:00
pve
ok, i tried instead to do (funcall (compile nil `(lambda () (symbol-macrolet (...) ,method-lambda)))) on the resulting method-lambda, and it seems I can make a method instance using that :)
9:05:15
Guest86
beach, jackdaniel you are too fast on your replies, thank you for, but I need some time to think (defclass my-stream
9:14:38
Guest86
beach >your pane will be erased for each command in the command loop, so you need to define yourself a display function in which you do the drawing. May you write an example code that defines a display function in which the drawing is done?
9:26:03
jackdaniel
there's that, and there is also a tool called grep to find numerous examples that make use of handle-repaint