transparent windows on X11

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

transparent windows on X11

Graeme Geldenhuys-2
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  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: transparent windows on X11

Eduardo Morras
At 15:17 17/03/2008, you wrote:

>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


>Regards,
>   - Graeme -
>
>
>_______________________________________________
>fpGUI - a cross-platform Free Pascal GUI toolkit
>http://opensoft.homeip.net/fpgui/
>_______________________________________________
>fpc-pascal maillist  -  [hidden email]
>http://lists.freepascal.org/mailman/listinfo/fpc-pascal

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: transparent windows on X11

ik-6
In reply to this post by Graeme Geldenhuys-2
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, [hidden email], 3/92; see also
The X Journal 1:4 for a more complete answer, including code samples for this
last option]


On Mon, Mar 17, 2008 at 4:17 PM, Graeme Geldenhuys
<[hidden email]> wrote:

> 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  -  [hidden email]
>  http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>



--
http://ik.homelinux.org/
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal