/* * This file is part of firk's window manager for x11 (fwm) * Copyright (C) 2016-2021 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 pos; 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; extern WInfo * WInfo_new(Window window); extern WInfo * WInfo_search(Window window); extern void WInfo_delete(WInfo * wi); 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