Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2008-03

transparent windows on X11

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

Anybody know how to use Xlib API to create transparent windows? This is for use with fpGUI Toolkit. For example. I have a Label component (which is actually a mini window) and have to always specify and paint a background color. If I don't, I see all kinds of rubbish as the background.

I want to place the Label component/window on another window (Form), and only want to see the text of the label. The background window must show through. Any ideas?

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Eduardo Morras
you wrote 7 lines
Hi, Anybody know how to use Xlib API to create transparent windows? This is for use with fpGUI Toolkit. For example. I have a Label component (which is actually a mini window) and have to always specify and paint a background color. If I don't, I see all kinds of rubbish as the background.

I never programmed under X system but perhaps you search this for?

http://lists.freedesktop.org/pipermail/xorg/2005-October/010877.html

I want to place the Label component/window on another window (Form), and only want to see the text of the label. The background window must show through. Any ideas?

Don't know sorry

Show quoted text 10 lines
Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email

ik
to Graeme Geldenhuys: Anybody know how to use Xlib API to create transparent windows? This is for use with…

Copy paste from : http://www.faqs.org/faqs/x-faq/part7/ Subject: 175) How do I create a transparent window?

A completely transparent window is easy to get -- use an InputOnly window. In order to create a window which is *mostly* transparent, you have several choices:
- the SHAPE extension first released with X11R4 offers an easy way to make non-rectangular windows, so you can set the shape of the window to fit the areas where the window should be nontransparent; however, not all servers support the extension.
- a machine-specific method of implementing transparent windows for particular servers is to use an overlay plane supported by the hardware. Note that there is no X notion of a "transparent color index".
- a generally portable solution is to use a large number of tiny windows, but this makes operating on the application as a unit difficult.
- a final answer is to consider whether you really need a transparent window or if you would be satisfied with being able to overlay your application window with information; if so, you can draw into separate bitplanes in colors that will appear properly.

[thanks to der Mouse, , 3/92; see also
The X Journal 1:4 for a more complete answer, including code samples for this last option]

Graeme Geldenhuys wrote 24 lines
Hi, Anybody know how to use Xlib API to create transparent windows? This is for use with fpGUI Toolkit. For example. I have a Label component (which is actually a mini window) and have to always specify and paint a background color. If I don't, I see all kinds of rubbish as the background. I want to place the Label component/window on another window (Form), and only want to see the text of the label. The background window must show through. Any ideas? Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://opensoft.homeip.net/fpgui/ _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email