I imagine its possible but I haven't a clue to know even where to beg in looking. Is it possible to write to the root window in X (i386 Linux)? I'd like to manipulate some images and write them there.
THX - Jon

Mailing lists / lazarus / 2010-05
5 messages · 4 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
I imagine its possible but I haven't a clue to know even where to beg in looking. Is it possible to write to the root window in X (i386 Linux)? I'd like to manipulate some images and write them there.
THX - Jon
i think i came across something in the past probably for KDE3.5. might me desktop specific.
looking at kde/gnome/freedesktop API might be helpfull
- V
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20100525/9a8638f9/attachment.html>
I imagine its possible but I haven't a clue to know even where to beg in looking. Is it…
Jon Foster wroteI imagine its possible but I haven't a clue to know even where to beg in looking. Is it possible to write to the root window in X (i386 Linux)? I'd like to manipulate some images and write them there.
No idea how to do it via LCL, but here is a small sample of code I use for a fpGUI utility application which draws a rectangular outline around components/windows (of any X11 application) under the mouse pointer.
The trick is to draw to the DefaultRootWindow(display) result of whatever display you are working with.
-------------------------
procedure TMainForm.DrawOutline;
begin
if not FOutlineDrawn then
begin
XSync(fpgApplication.Display, False);
XDrawRectangle(
fpgApplication.Display,
DefaultRootWindow(fpgApplication.Display),
FOutlineGC,
newrect.Left, newrect.Top, newrect.Width, newrect.Height);
lastrect := newrect;
FOutlineDrawn := True;
lblPos.Text := Format('(%d,%d)', [newrect.Left, newRect.Top]);
lblSize.Text := Format('(%d,%d)', [newrect.Width, newRect.Height]);
lblHandle.Text := IntToHex(last_child, 6);
end;
end;
-------------------------I imagine its possible but I haven't a clue to know even where to beg in looking. Is it…
Jon Foster wroteI imagine its possible but I haven't a clue to know even where to beg in looking. Is it possible to write to the root window in X (i386 Linux)? I'd like to manipulate some images and write them there.
I can't remember if writing is supported, but DC := GetDC(0);
will give you a root device context.Marc
Thanks! I'll have to give it a shot when I get a chance.
-Jon