27#include <X11/extensions/shape.h>
98 ie->y =
new->y +
new->h;
101 new->y =
ie->y +
ie->h;
112 new->next =
ie->next;
115 new->w = (
ie->w - w);
120 ie->x =
new->x +
new->w;
123 new->x =
ie->x +
ie->w;
136 int stepx,
int stepy,
145 if(
Scr->LastRegion) {
148 Scr->LastRegion = ir;
149 if(!
Scr->FirstRegion) {
150 Scr->FirstRegion = ir;
165 ir->
x = ir->
y = ir->
w = ir->
h = 0;
168 (
unsigned int *)&ir->
w, (
unsigned int *)&ir->
h);
171 ir->
x +=
Scr->rootw - ir->
w;
174 ir->
y +=
Scr->rooth - ir->
h;
224 + (
Scr->ShrinkIconTitles ?
tmp_win->icon->width
234 for(ir =
Scr->FirstRegion; ir; ir = ir->
next) {
249 if(
ie->w >= w &&
ie->h >= h) {
268 for(ir =
Scr->FirstRegion; ir; ir = ir->
next) {
275 if(
ie->w >= w &&
ie->h >= h) {
357 if(
Scr->ShrinkIconTitles &&
tmp_win->icon->has_title) {
379 for(ir =
Scr->FirstRegion; ir; ir = ir->
next) {
416 if(
old->y ==
ie->y) {
473 if(
Scr->use3Diconmanagers && !
Scr->BeNiceToColormap) {
559 if(image ==
NULL && !
Scr->ForceIcon) {
565 image =
Scr->UnknownImage;
583 if(
Scr->NoIconTitlebar ||
613 icon->
y = icon->
height +
Scr->IconFont.height +
Scr->IconManagerShadowDepth;
624 icon->
w =
tmp_win->wmhints->icon_window;
646 if((image !=
NULL) &&
651 if(icon->
w ==
None) {
659 if(
Scr->AutoRaiseIcons ||
Scr->ShrinkIconTitles) {
674 if(icon->
width == 0) {
702 if(
Scr->ShrinkIconTitles) {
744 if(
Scr->ShrinkIconTitles && icon->
bm_w) {
756 Scr->IconFont.height - 6 - (2 *
Scr->IconBorderWidth);
885 for(ir =
Scr->FirstRegion; ir; ir = ir->
next) {
886 if(
x >= ir->
x &&
x < (ir->
x + ir->
w) &&
887 y >= ir->
y &&
y < (ir->
y + ir->
h)) {
927 if(
ip &&
ip->used ==
false &&
928 ((
ip->x ==
ie->x &&
ip->w ==
ie->w) ||
929 (
ip->y ==
ie->y &&
ip->h ==
ie->h))) {
936 else if(
in &&
in->used ==
false &&
937 ((
in->x ==
ie->x &&
in->w ==
ie->w) ||
938 (
in->y ==
ie->y &&
in->h ==
ie->h))) {
994 if(
Scr->use3Diconmanagers) {
996 Scr->IconFont.height +
998 Scr->IconManagerShadowDepth, icon->
iconc,
off,
false,
false);
1223 Scr->ForceIcon =
true;
1250 if(
Scr->NoIconTitlebar ||
1260 if(
Scr->SortIconMgr) {
1295 Scr->IconManagerShadowDepth;
1337 if(
Scr->ShrinkIconTitles &&
1380 char *icon_name =
NULL;
1385 if(icon_name !=
NULL) {
1392 if(icon_name !=
NULL) {
1400 if(icon_name !=
NULL) {
1409 icon->
image = image;
#define FB(fix_fore, fix_back)
void Draw3DBorder(Window w, int x, int y, int width, int height, int bw, ColorPair cp, ButtonState state, bool fill, bool forcebw)
Image * EwmhGetIcon(ScreenInfo *scr, TwmWindow *twm_win)
void SortIconManager(IconMgr *ip)
static IconEntry * FindIconEntry(TwmWindow *tmp_win, IconRegion **irp)
name_list ** AddIconRegion(const char *geom, RegGravity grav1, RegGravity grav2, int stepx, int stepy, const char *ijust, const char *just, const char *align)
static void PlaceIcon(TwmWindow *tmp_win, int def_x, int def_y, int *final_x, int *final_y)
static void splitIconRegionEntry(IconEntry *ie, RegGravity grav1, RegGravity grav2, int w, int h)
static int roundUp(int v, int multiple)
static IconEntry * prevIconEntry(IconEntry *ie, IconRegion *ir)
void ReleaseIconImage(Icon *icon)
void DeleteIcon(Icon *icon)
void IconUp(TwmWindow *tmp_win)
void DeleteIconsList(TwmWindow *tmp_win)
void RedoIconName(TwmWindow *win)
void ExpandIconTitle(TwmWindow *tmp_win)
void IconDown(TwmWindow *tmp_win)
static void ReshapeIcon(Icon *icon)
void ShrinkIconTitle(TwmWindow *tmp_win)
void PaintIcon(TwmWindow *tmp_win)
void RedoIcon(TwmWindow *win)
void CreateIconWindow(TwmWindow *tmp_win, int def_x, int def_y)
static Image * LookupIconNameOrClass(TwmWindow *tmp_win, Icon *icon, char **pattern)
static void mergeEntries(IconEntry *old, IconEntry *ie)
int GetIconOffset(Icon *icon)
Image * GetImage(const char *name, ColorPair cp)
void FreeImage(Image *image)
bool GetColorFromList(name_list *list_head, char *name, XClassHint *class, Pixel *ptr)
void * LookInNameList(name_list *list_head, const char *name)
void * LookPatternInList(name_list *list_head, const char *name, XClassHint *class)
void AddToList(name_list **list_head, const char *name, void *ptr)
void * LookInList(name_list *list_head, const char *name, XClassHint *class)
void * LookPatternInNameList(name_list *list_head, const char *name)
void OtpAdd(TwmWindow *twm_win, WinType wintype)
void OtpFreeIcon(TwmWindow *twm_win)
void OtpReassignIcon(TwmWindow *twm_win, Icon *old_icon)
void OtpRaise(TwmWindow *twm_win, WinType wintype)
void twmrc_error_prefix(void)
int ParseIRJustification(const char *s)
int ParseAlignement(const char *s)
int ParseTitleJustification(const char *s)
struct IconEntry * entries
TitleJust TitleJustification
Info and control for every X Window we take over.
char * name
Current window name. Points into TwmWindow::names.
struct Icon * icon
The current icon.
char * icon_name
Current icon name. Points into TwmWindow::names.
bool icon_on
Is the icon visible.
XClassHint class
Window class info. From XGetClassHint().
struct WList * iconmanagerlist
List of the icon managers the window is in.
name_list * iconslist
The current list of potential icons.
bool isicon
Is the window an icon now ?
void GetShadeColors(ColorPair *cp)
Try and create a 'shaded' version of a color for prettier UI.
bool visible(const TwmWindow *tmp_win)
void WMapUpdateIconName(TwmWindow *win)
int RLayoutXParseGeometry(RLayout *layout, const char *geometry, int *x, int *y, unsigned int *width, unsigned int *height)
Parse an X Geometry out to get the positions and sizes.