Slashdot Mirror


Fast Alpha-Blending In Your GUI

visnu writes: "I've been waiting for this for 2 years now -- a REAL glass-like windowing system. And yes, it's Microsoft to do it. Ever since W2k came out, and they included alpha-blending in the GDI, I was tempted to write a little tool to turn on any window's transparency, but of course I'm way too lazy to do that. These guys weren't though: glass2k runs in the systray and handles turning on any window's transparency. yes, here's a screenshot. I'm not too sure about the speed in W2k, but in XP w/ the newest Nvidia drivers and a somewhat recent video card, it's hardware accelerated, and yes, you should be drooling." Update: 11/26 19:00 GMT by T : Links updated, so hopefully you'll be able to actually get to the content again :)

7 of 592 comments (clear)

  1. Great for always on top windows by snake_dad · · Score: 4, Insightful

    There are some apps that I would like to run "always on top", but most of the time they get in the way. This would sure be a nice way to still sorta see them .

    Great stuff, now implement it for NT4 and win98 :P

    --
    karma capped .sig seeking available Slashdot poster for long-term relationship.
    1. Re:Great for always on top windows by DaEvOsH · · Score: 5, Insightful

      The required API's needed to do this in any windows than ME or NT4 is not there. It can be done 'manually', but it is very slow, difficult to do well (I have done it in one of my progs but at the end disabled it when the prog detected the alpha api was not there) and brings problems when running with other programs that alter the way a window is shown.

      It is a pretty esy thing to do. For win32 programmers:

      1. Find the window handle you want to alpha blend. (say, hwnd).
      2. Add the WS_EX_LAYERED extended style to the window with this call:
      SetWindowLong (hwnd, GWL_EXSTYLE, GetWindowLong(hwnd, GWL_EXSTYLE) | WS_EX_LAYERED);
      3. Call SetLayeredWindowAttributes. Look up MSDN for the info.

      Also, this API in Win2k does not seem to work well in some video cards - windows which update themselves a lot will cause problems i.e. an opengl window, etc (my program has a few of them).

  2. It's nice and all that... by AltGrendel · · Score: 5, Insightful

    ...but it strikes me as "Not that useful". Most of my users get confused with standard GUI look and feel. I'd hate to think what this would do to their poor little minds.

    --
    The simple truth is that interstellar distances will not fit into the human imagination

    - Douglas Adams

    1. Re:It's nice and all that... by be-fan · · Score: 5, Insightful

      When its on Windows, it's not useful. When its on Linux, its the great, awesome, ground-breaking new technology that Packard dreamed up.

      --
      A deep unwavering belief is a sure sign you're missing something...
  3. Operation Brainfuck by Eloquence · · Score: 4, Insightful
    Overlapping windows were a pretty brain-dead idea to begin with. This is increasingly being realized by developers who add sidebars and "panels" to their applications which can be moved and resized (knode, the KDE newsreader, implements this quite fully, although it's a bit awkward to use). The information below the window you're overlapping is cut in half: A browser window you're overlapping might show you text like

    as not a good idea
    creasingly being interested
    ot to be confused with the

    i.e. noise. The only purpose it serves is to faster identify the window you're dealing with. This has become unnecessary with the invention of the taskbar. Further additions to this concept, like window summarization and application-specific taskbars, make it even easier to use. If you want to view a lot of information simultaneously instead of having everything in full-screen mode, a smart window-manager like ion will rearrange windows automatically in useful tiles. Additional usability can be gained with clever hotkeys for application-switching.

    But while overlapping windows are stupid, transparent windows are really part of a vast right-wing conspiracy to stupidify the masses by making computers incapable of displaying information. The next step will be window-spectific screensavers, which turn on after a specific period of inactivity in a single window. Just you wait. Thanks to transparency:

    • Information becomes unreadable, especially with unfortunate color combinations.
    • Information you think is there is actually part of another window -- have fun editing that picture.
    • When two windows overlap with the wrong alpha-blending setting, you can no longer be sure which one is on top without looking at the taskbar or focus (in this screenshot, thanks to additional braindead color gradients in the title bars, this is especially hard).
    • Even your calculator will use more RAM than Mozilla ..

    If you like eye-candy, you may "drool" over this one and get your brain fucked by the Illuminati. A frontal lobotomy may be a quicker solution though.

  4. Glass and icing by viktor · · Score: 5, Insightful

    There might be a very good reason it's taken two years for the glass-like windowing system. And that would be that it isn't a good idea.

    Sure it looks pretty. It's technically cool. It's very nice eyecandy. But useful? Hardly.

    If our desktops were three-dimensional, there would be a point - in that case you could refocus on a window below your current. When refocusing, the frontmost window would be so blurry to you that it didn't interfere with your view of what was behind it.

    But desktops aren't 3D (and "fake" 3D doesn't work, refocusing requires that your desktop is not displayed on a single plane, as that plane only has one focus), and you can't refocus. What you get is just a blur of all windows that happen to be ontop of one another (and the background if you have a background/wallpaper image).

    I would guess that the only time that transparent windows help is if you have an OS/wm that does not offer workspaces or similar. The transparency might help cram an extra three windows onto the screen. Using workspaces you can just put those extra three on another workspace instead.

    I have yet to see anybody argue how great it would be if all books were printed on plastic rather than paper, so that we could see through them.

  5. Glass windowing on Linux by ortholattice · · Score: 5, Insightful

    Translucent windowing has also been in Linux; here is an example (not mine; look it up on Usenet). (Warning: Partial nudity.) I don't know how it compares since the site referenced in the article has been slashdotted.