Drawing gradients in X11 and transparent windows - Linux

This is a discussion on Drawing gradients in X11 and transparent windows - Linux ; I would like to improve the appearence of my application. For the gradient: Is there any fast way other then doing it myself in a client side image. And transparent windows - well how at all can i do it ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: Drawing gradients in X11 and transparent windows

  1. Drawing gradients in X11 and transparent windows

    I would like to improve the appearence of my application.

    For the gradient: Is there any fast way other then doing it myself in
    a client side image.

    And transparent windows - well how at all can i do it and how portable
    is it?


  2. Re: Drawing gradients in X11 and transparent windows

    Hi there,

    I can't answer the questions about the gradient fills, but I can offer
    some help on transparent windows - depending upon what it is you are
    trying to achieve.

    First of all, you will need to be running a composite window manager -
    such as beryl.... These window managers allow access to and obey the
    alpha byte if you create you windows as ARGB 32-bit. You can then
    directly manipulate the alpha channel (Using XGetImage/XPutImage to
    access the data --- or shared memory extensions).

    If you are wanting to set the transparency of your entire window, you
    simply need to set a window property that the composite window manager
    will honor --- its a really simply 2 line process. I'm not at work
    right now so I can't remember what the property is called. When I get
    to work tomorrow, I will post some code to do this ( and also a
    function to tell you if you are even running a composite window
    manager).

    Hope this helps some --- I will try and be more helpful tomorrow :-)


    Regards,

    Tim


    On 22 Jul, 14:01, llothar wrote:
    > I would like to improve the appearence of my application.
    >
    > For the gradient: Is there any fast way other then doing it myself in
    > a client side image.
    >
    > And transparent windows - well how at all can i do it and how portable
    > is it?




  3. Re: Drawing gradients in X11 and transparent windows

    On 2007-07-22, llothar wrote:
    > I would like to improve the appearence of my application.
    >
    > For the gradient: Is there any fast way other then doing it myself in
    > a client side image.
    >
    > And transparent windows - well how at all can i do it and how portable
    > is it?


    shaped windows have been around since atleast the early 90s (eg: xeyes uses a
    shaped window) another example, of more recent origin, would be xosd

    Bye.
    Jasen

  4. Re: Drawing gradients in X11 and transparent windows

    On 23 Jul., 16:28, Jasen Betts wrote:

    > shaped windows have been around since atleast the early 90s (eg: xeyes uses a
    > shaped window) another example, of more recent origin, would be xosd


    I know about shaped windows. But i'm asking about alpha transparent
    ones say 50% opaque. Sorry thought that this is clear from the wording.


  5. Re: Drawing gradients in X11 and transparent windows

    Sorry for the delayed response, was very busy with something else.

    > If you are wanting to set the transparency of your entire window, you
    > simply need to set a window property that the composite window manager
    > will honor --- its a really simply 2 line process. I'm not at work
    > right now so I can't remember what the property is called. When I get
    > to work tomorrow, I will post some code to do this ( and also a
    > function to tell you if you are even running a composite window
    > manager).


    Yes this is exactly what i want. I have done this on windows and there
    it is also a 2 lines code. Would be very nice from you if would help
    me here. It seems i can't come up with the right google words to find
    the answer.

    By the way, how can i find out if the window manager is a composite
    window manager?
    Is there same property i can check.




  6. Re: Drawing gradients in X11 and transparent windows

    I really, really sorry --- have been snowed under at work and no time
    to post the functions.

    A way to find the code is to download the GTK/GDK source and look
    through it -- have a look at the function gdk_window_set_opacity
    ( http://developer.gnome.org/doc/API/2...ow-set-opacity)
    as a start. Trace that through the code and it will show you how to
    set the opacity of the window --- and also how to tell if the user is
    running a composite window manager. Remember - GDK is your friend -
    its just a wrapper ( a good one ) around native X code.

    If you cant find the relevant code, I promise I will post it on Monday
    when I get back into work :-)

    regards,

    Tim



    On 27 Jul, 20:16, llothar wrote:
    > Sorry for the delayed response, was very busy with something else.
    >
    > > If you are wanting to set the transparency of your entire window, you
    > > simply need to set a window property that the composite window manager
    > > will honor --- its a really simply 2 line process. I'm not at work
    > > right now so I can't remember what the property is called. When I get
    > > to work tomorrow, I will post some code to do this ( and also a
    > > function to tell you if you are even running a composite window
    > > manager).

    >
    > Yes this is exactly what i want. I have done this on windows and there
    > it is also a 2 lines code. Would be very nice from you if would help
    > me here. It seems i can't come up with the right google words to find
    > the answer.
    >
    > By the way, how can i find out if the window manager is a composite
    > window manager?
    > Is there same property i can check.




  7. Re: Drawing gradients in X11 and transparent windows

    > A way to find the code is to download the GTK/GDK source and look
    > through it -- have a look at the function gdk_window_set_opacity
    > (http://developer.gnome.org/doc/API/2...html#gdk-windo...)
    > as a start. Trace that through the code and it will show you how to
    > set the opacity of the window --- and also how to tell if the user is
    > running a composite window manager. Remember - GDK is your friend -
    > its just a wrapper ( a good one ) around native X code.


    Thanks i think i can find it now.

    I will be able to work again with Linux in about 10 days, btw. never
    buy ASROCK mainboards if you live in a country with high air humidity.

    And one more question: Does the Beryl WM work with old Matrox G450
    cards? I never needed more then this but now i want to add some nice
    transparent shaped windows for Drag operations to my application. Pure
    eye candy but who don't like candies?


+ Reply to Thread