Re: A Proposal For The Addition Of Color-Reactiveness To The GNOME Desktop
- From: raster redhat com
- To: peter idonex se
- cc: bjp primenet com, gnome-list gnome org, gnome-gui-list gnome org
- Subject: Re: A Proposal For The Addition Of Color-Reactiveness To The GNOME Desktop
- Date: Wed, 20 May 1998 20:33:49 -0400 (EDT)
On 21 May, Peter Bortas shouted:
-> Bowie Poag <bjp@primenet.com> writes:
->
-> > > nonono.. not what i meant.. the application ets a hint on its window
-> > > "i'm idle" beofr eit goes into its idel loop or when it starts
-> > > processing schanges the hint to "i'm busy" if tid wousloding as it goes
-> > > ti changes the hints to be "0%" "10%" "20%" etc... the widnow manager
-> > > will get an event every time these hints change.. ti sees a new app
-> > > state hint. it hen looks upt its own list of whihc icon matches that
-> > > hint number (lets say 0 is clean, 1 is idel, 2 is busy, 3 is
-> > > downloading etc..) and thu all "busy" apps display the same busy
-> > > icon... all "idel": apps dsiplay the same idle icon. you have perfect
-> > > consistency. :)
-> >
-> > Ahhhhh, okay. I see. Yeah, I can agree with that.. But i'd still prefer to
-> > keep things purely color-oriented, instead of having different icon
-> > "looks". A lamp is a lamp is a lamp, in my book, but I will admit there is
-> > an added degree of flexibility with your spin on it.
->
-> Colors will be fine, and I'll probably keep my setup "lamps only", but
-> some people (i.e. color blind or less advanced users) might want to use
-> bitmaps to makes things clearer. Notice that the colors could still
-> be used in those pictures to keep consistency if the user choose to
-> change to a "lamps only" setup later.
->
-> I just broke my amiwm trying to add some support for this. If anyone
-> has an idea how this should be added to the Amiga look and feel
-> without it coming out absurd, please tell me. :)
->
-> Raster: What WM-hints are you planning to use? I'd like to get amiwm
-> Gnome-aware, and these lamps would be a fun, although very much
-> optional, addition. :-P
see attached file (gnome.c form E 0.14)
you can almost steal the code verbaitm (you just have to put the info
int he right data structs for amiwm windows.. :) )
--
--------------- Codito, ergo sum - "I code, therefore I am" --------------------
raster@rasterman.com /\___ /\ ___/||\___ ____/|/\___ raster@redhat.com
Carsten Haitzler | _ //__\\ __||_ __\\ ___|| _ / Red Hat Advanced
218/21 Conner Drive || // __ \\_ \ | | \ _/_|| / Development Labs
Chapel Hill NC 27514 USA ||\\\/ \//__/ |_| /___/||\\ 919 547 0012 ext 282
+1 (919) 929 9443, 801 4392 For pure Enlightenmenthttp://www.rasterman.com/
#include "E.h"
#define EXTENDED_HINT_STICKY (1<<0)
#define EXTENDED_HINT_ONTOP (1<<1)
#define EXTENDED_HINT_ONBOTTOM (1<<2)
#define EXTENDED_HINT_NEVER_USE_AREA (1<<3)
#define EXTENDED_HINT_DESKTOP (1<<4)
#define EXTENDED_HINT_MASKS (1<<5)
#define EXTENDED_HINT_LAYER (1<<6)
#define EXTENDED_HINT_STATE (1<<7)
#define EXTENDER_HINT_LAYER_DESKTOP 0
#define EXTENDER_HINT_LAYER_BELOW 1
#define EXTENDER_HINT_LAYER_NORMAL 2
#define EXTENDER_HINT_LAYER_ONTOP 4
#define EXTENDER_HINT_LAYER_DOCK 6
#define EXTENDER_HINT_STATE_NORMAL 0
#define EXTENDER_HINT_STATE_MAXIMIZED 1
#define EXTENDER_HINT_STATE_SHADED 2
typedef struct _extended_hints
{
/* flags whihc members are used - some flags hve no members and are */
/* states on their own */
CARD32 flags;
/* a sinmple desktop number for those who dont want to exist on */
/* multiple desktops */
CARD32 desktop;
/* a desktop mask 1 exists there, 0 doesnt. there is room for */
/* 128 desktops here :) LSB of desktop_mask0is desktop 0, MSB is 32 */
/* LSB desktop_mask1 is 33 etc. */
CARD32 desktop_mask0;
CARD32 desktop_mask1;
CARD32 desktop_mask2;
CARD32 desktop_mask3;
/* the layer the window exists in.. mroe fine-grained control than the */
/* ontop and onbottom flags */
CARD32 layer;
/* extra states for a window to be in */
CARD32 state;
/* possible icons to use - everal sizes 8x8, 12x12, 16x16 etc. up to */
/* 128x128 (the number at the end is the XxX size) If the mask ID is */
/* 0 then there is no mask, i the pixmap Id is 0 there is no pixmap */
/* defined for that size */
Pixmap pixmap8, mask8;
Pixmap pixmap12, mask12;
Pixmap pixmap16, mask16;
Pixmap pixmap20, mask20;
Pixmap pixmap24, mask24;
Pixmap pixmap32, mask32;
Pixmap pixmap40, mask40;
Pixmap pixmap48, mask48;
Pixmap pixmap64, mask64;
Pixmap pixmap96, mask96;
Pixmap pixmap128, mask128;
}
ExtendedHints;
#define EXTENDER_HINT_APP_STATE_NONE 0
#define EXTENDER_HINT_APP_STATE_ACTIVE1 1
#define EXTENDER_HINT_APP_STATE_ACTIVE2 2
#define EXTENDER_HINT_APP_STATE_ERROR1 3
#define EXTENDER_HINT_APP_STATE_ERROR2 4
#define EXTENDER_HINT_APP_STATE_FATAL_ERROR1 5
#define EXTENDER_HINT_APP_STATE_FATAL_ERROR2 6
#define EXTENDER_HINT_APP_STATE_IDLE1 7
#define EXTENDER_HINT_APP_STATE_IDLE2 8
#define EXTENDER_HINT_APP_STATE_WAITING1 9
#define EXTENDER_HINT_APP_STATE_WAITING2 10
#define EXTENDER_HINT_APP_STATE_WORKING1 11
#define EXTENDER_HINT_APP_STATE_WORKING2 12
#define EXTENDER_HINT_APP_STATE_NEED_USER_INPUT1 13
#define EXTENDER_HINT_APP_STATE_NEED_USER_INPUT2 14
#define EXTENDER_HINT_APP_STATE_STRUGGLING1 15
#define EXTENDER_HINT_APP_STATE_STRUGGLING2 16
#define EXTENDER_HINT_APP_STATE_DISK_TRAFFIC1 17
#define EXTENDER_HINT_APP_STATE_DISK_TRAFFIC2 18
#define EXTENDER_HINT_APP_STATE_NETWORK_TRAFFIC1 19
#define EXTENDER_HINT_APP_STATE_NETWORK_TRAFFIC2 20
#define EXTENDER_HINT_APP_STATE_OVERLOADED1 21
#define EXTENDER_HINT_APP_STATE_OVERLOADED2 22
#define EXTENDER_HINT_APP_STATE_PERCENT000_1 23
#define EXTENDER_HINT_APP_STATE_PERCENT000_2 24
#define EXTENDER_HINT_APP_STATE_PERCENT010_1 25
#define EXTENDER_HINT_APP_STATE_PERCENT010_2 26
#define EXTENDER_HINT_APP_STATE_PERCENT020_1 27
#define EXTENDER_HINT_APP_STATE_PERCENT020_2 28
#define EXTENDER_HINT_APP_STATE_PERCENT030_1 29
#define EXTENDER_HINT_APP_STATE_PERCENT030_2 30
#define EXTENDER_HINT_APP_STATE_PERCENT040_1 31
#define EXTENDER_HINT_APP_STATE_PERCENT040_2 32
#define EXTENDER_HINT_APP_STATE_PERCENT050_1 33
#define EXTENDER_HINT_APP_STATE_PERCENT050_2 34
#define EXTENDER_HINT_APP_STATE_PERCENT060_1 35
#define EXTENDER_HINT_APP_STATE_PERCENT060_2 36
#define EXTENDER_HINT_APP_STATE_PERCENT070_1 37
#define EXTENDER_HINT_APP_STATE_PERCENT070_2 38
#define EXTENDER_HINT_APP_STATE_PERCENT080_1 39
#define EXTENDER_HINT_APP_STATE_PERCENT080_2 40
#define EXTENDER_HINT_APP_STATE_PERCENT090_1 41
#define EXTENDER_HINT_APP_STATE_PERCENT090_2 42
#define EXTENDER_HINT_APP_STATE_PERCENT100_1 43
#define EXTENDER_HINT_APP_STATE_PERCENT100_2 44
void
GNOME_GetHints(EWin * ewin)
{
Atom a1, a3;
unsigned long lnum, ldummy;
int dummy;
ExtendedHints *eh;
unsigned int *state;
a1 = XInternAtom(disp, "WM_EXTENDED_HINTS", False);
eh = NULL;
XGetWindowProperty(disp, ewin->client.win, a1, 0, sizeof(ExtendedHints) /
sizeof(unsigned long), False, a1, &a3, &dummy, &lnum,
&ldummy, (unsigned char **)&eh);
if (eh)
{
if (eh->flags & EXTENDED_HINT_STICKY)
ewin->sticky = 1;
if (eh->flags & EXTENDED_HINT_ONTOP)
ewin->ontop = 1;
if (eh->flags & EXTENDED_HINT_ONBOTTOM)
ewin->onbottom = 1;
if (eh->flags & EXTENDED_HINT_NEVER_USE_AREA)
ewin->never_use_area = 1;
if (eh->flags & EXTENDED_HINT_DESKTOP)
ewin->desktop = eh->desktop & 0x1f;
XFree(eh);
}
a1 = XInternAtom(disp, "WM_EXTENDED_APP_STATE", False);
state = NULL;
XGetWindowProperty(disp, ewin->client.win, a1, 0, 1,
False, XA_CARDINAL, &a3, &dummy, &lnum,
&ldummy, (unsigned char **)&state);
if (state)
{
ewin->client.app_state = state;
XFree(state);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]