/* * This file is part of firk's window manager for x11 (fwm) * Copyright (C) 2016-2021, 2023 firk * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifndef _FWM_WINLIST_H #define _FWM_WINLIST_H typedef struct WInfo { struct { struct WInfo * self; struct WList * list; /* 1) freelist link for free entries; 2) hashtable link for used entries */ struct WInfo * next; /* only for non-minimized used entries: z-order links; others = NULL */ struct WInfo * to_top; struct WInfo * to_bottom; } wdb; Window window; unsigned int flags; /* 1=interested in FWM_THEMESET */ char fwm_wclass[32]; /* [0] is WCLASS_ constant, [1..30] is possible ASCII */ unsigned int cat; /* 0=default, 1+=may be multiple workspaces, 50000=tray icons, 50001=widgets */ unsigned int cpos; char title[256]; char newtitle[256]; int x0, y0, w, h; int save_x0, save_y0, save_w, save_h, is_maximized; int is_active; int raised; int ontop; int mark; int specstate; unsigned long spec1ticks; int spec1x, spec1y; int spec2x, spec2y; } WInfo; typedef struct WList { WInfo * top; WInfo * bottom; } WList; #define WI_NEED_THEMESET 1 extern WInfo * WInfo_new(Window window); extern WInfo * WInfo_search(Window window); extern void WInfo_delete(WInfo * wi); extern int WInfo_foreach(int (*cb)(WInfo * wi, void *udata), void *udata); extern void WList_raise_window(WList * wl, WInfo * wi); extern void WList_remove_window(WList * wl, WInfo * wi); extern void WList_activate(WList * wl, Window top, Window bottom); #endif