2005-07-16 09:57:45 -07:00
|
|
|
/*
|
2007-01-13 11:14:29 -08:00
|
|
|
* Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
|
2009-02-01 02:15:13 -08:00
|
|
|
* Copyright (C) 2004-2009 Kim Woelders
|
2005-07-16 09:57:45 -07:00
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
* of this software and associated documentation files (the "Software"), to
|
|
|
|
* deal in the Software without restriction, including without limitation the
|
|
|
|
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
|
|
* sell copies of the Software, and to permit persons to whom the Software is
|
|
|
|
* furnished to do so, subject to the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice shall be included in
|
|
|
|
* all copies of the Software, its documentation and marketing & publicity
|
|
|
|
* materials, and acknowledgment shall be given in the documentation, materials
|
|
|
|
* and software packages that this Software was used.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
|
|
* THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
|
|
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
|
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
*/
|
|
|
|
#ifndef _EWIN_H_
|
|
|
|
#define _EWIN_H_
|
|
|
|
|
2005-09-17 23:35:38 -07:00
|
|
|
#include "eobj.h"
|
2006-04-06 14:20:16 -07:00
|
|
|
#include "etypes.h"
|
2005-09-26 10:32:10 -07:00
|
|
|
#include "xwin.h"
|
2005-09-17 23:35:38 -07:00
|
|
|
|
2005-11-12 11:55:42 -08:00
|
|
|
/* Window operation sources */
|
2006-04-12 08:19:40 -07:00
|
|
|
#define OPSRC_NA 0
|
2005-11-12 11:55:42 -08:00
|
|
|
#define OPSRC_APP 1
|
|
|
|
#define OPSRC_USER 2
|
|
|
|
#define OPSRC_WM 3
|
|
|
|
|
2008-03-23 04:54:24 -07:00
|
|
|
typedef union {
|
2005-11-18 23:39:30 -08:00
|
|
|
unsigned char all:8;
|
2008-03-23 04:54:24 -07:00
|
|
|
struct {
|
2006-01-20 14:04:49 -08:00
|
|
|
unsigned char rsvd:2;
|
|
|
|
unsigned char border:1; /* W */
|
2005-11-18 23:39:30 -08:00
|
|
|
unsigned char close:1; /* AU */
|
|
|
|
unsigned char focus:1; /* WA */
|
|
|
|
unsigned char iconify:1; /* W U */
|
|
|
|
unsigned char move:1; /* AU */
|
|
|
|
unsigned char size:1; /* AU */
|
2005-11-12 09:51:11 -08:00
|
|
|
} b;
|
2005-11-18 23:39:30 -08:00
|
|
|
} EWinInhibit;
|
2005-11-12 09:51:11 -08:00
|
|
|
|
|
|
|
#define EwinInhGetApp(ewin, item) (ewin->inh_app.b.item)
|
|
|
|
#define EwinInhSetApp(ewin, item, on) ewin->inh_app.b.item = (on)
|
|
|
|
#define EwinInhGetUser(ewin, item) (ewin->inh_user.b.item)
|
|
|
|
#define EwinInhSetUser(ewin, item, on) ewin->inh_user.b.item = (on)
|
|
|
|
#define EwinInhGetWM(ewin, item) (ewin->inh_wm.b.item)
|
|
|
|
#define EwinInhSetWM(ewin, item, on) ewin->inh_wm.b.item = (on)
|
|
|
|
|
2008-03-23 04:54:24 -07:00
|
|
|
typedef struct {
|
2007-04-06 14:44:22 -07:00
|
|
|
void (*Init) (EWin * ewin);
|
2006-12-27 08:17:27 -08:00
|
|
|
void (*Layout) (EWin * ewin, int *px, int *py, int *pw,
|
|
|
|
int *ph);
|
|
|
|
void (*MoveResize) (EWin * ewin, int resize);
|
|
|
|
void (*Close) (EWin * ewin);
|
|
|
|
} EWinOps;
|
|
|
|
|
2008-03-23 04:54:24 -07:00
|
|
|
struct _ewin {
|
2005-07-16 09:57:45 -07:00
|
|
|
EObj o;
|
|
|
|
char type;
|
2006-04-29 12:39:21 -07:00
|
|
|
Win win_container;
|
2005-07-16 09:57:45 -07:00
|
|
|
|
2006-04-06 14:20:16 -07:00
|
|
|
const Border *border;
|
|
|
|
const Border *normal_border;
|
|
|
|
EWinBit *bits;
|
2005-07-16 09:57:45 -07:00
|
|
|
|
2008-03-23 04:54:24 -07:00
|
|
|
struct {
|
2006-04-29 12:39:21 -07:00
|
|
|
Win win;
|
2005-07-16 09:57:45 -07:00
|
|
|
int x, y, w, h, bw;
|
2005-10-12 10:20:42 -07:00
|
|
|
Colormap cmap;
|
2005-07-16 09:57:45 -07:00
|
|
|
long event_mask;
|
|
|
|
} client;
|
|
|
|
|
2008-03-23 04:54:24 -07:00
|
|
|
struct {
|
2005-07-16 09:57:45 -07:00
|
|
|
char state;
|
|
|
|
char visibility;
|
2005-10-27 15:26:37 -07:00
|
|
|
char shaped;
|
2005-07-16 09:57:45 -07:00
|
|
|
char shaded;
|
|
|
|
|
2005-10-29 08:35:39 -07:00
|
|
|
unsigned identified:1;
|
2005-07-16 09:57:45 -07:00
|
|
|
unsigned placed:1;
|
2005-10-27 15:26:37 -07:00
|
|
|
unsigned iconified:1;
|
|
|
|
unsigned docked:1;
|
2005-11-12 09:51:11 -08:00
|
|
|
|
2005-10-18 12:21:25 -07:00
|
|
|
unsigned click_grab_isset:1;
|
2005-07-16 09:57:45 -07:00
|
|
|
unsigned maximized_horz:1;
|
|
|
|
unsigned maximized_vert:1;
|
|
|
|
unsigned fullscreen:1;
|
2005-09-03 07:28:39 -07:00
|
|
|
|
|
|
|
unsigned active:1;
|
|
|
|
unsigned modal:1;
|
2005-07-16 09:57:45 -07:00
|
|
|
unsigned attention:1;
|
2005-09-03 07:28:39 -07:00
|
|
|
|
|
|
|
unsigned showingdesk:1; /* Iconified by show desktop */
|
2005-07-16 09:57:45 -07:00
|
|
|
unsigned animated:1;
|
2006-04-02 01:45:40 -08:00
|
|
|
unsigned moving:1;
|
|
|
|
unsigned resizing:1;
|
2005-11-05 09:12:53 -08:00
|
|
|
unsigned show_coords:1;
|
2006-03-30 14:35:20 -08:00
|
|
|
unsigned maximizing:1;
|
2007-03-15 20:56:11 -07:00
|
|
|
unsigned shading:1;
|
2009-04-13 08:52:42 -07:00
|
|
|
unsigned in_action:1;
|
2005-07-16 09:57:45 -07:00
|
|
|
|
|
|
|
/* Derived state flags. Change only in EwinStateUpdate() */
|
|
|
|
unsigned no_border:1;
|
2008-11-15 06:16:28 -08:00
|
|
|
unsigned donthide:1; /* Don't hide on show desktop */
|
2005-07-16 09:57:45 -07:00
|
|
|
|
|
|
|
unsigned inhibit_move:1;
|
|
|
|
unsigned inhibit_resize:1;
|
|
|
|
unsigned inhibit_iconify:1;
|
|
|
|
unsigned inhibit_shade:1;
|
|
|
|
unsigned inhibit_stick:1;
|
|
|
|
unsigned inhibit_max_hor:1;
|
|
|
|
unsigned inhibit_max_ver:1;
|
|
|
|
unsigned inhibit_fullscreeen:1;
|
|
|
|
unsigned inhibit_change_desk:1;
|
|
|
|
unsigned inhibit_close:1;
|
2007-04-17 14:20:34 -07:00
|
|
|
unsigned inhibit_stacking:1;
|
2005-07-16 09:57:45 -07:00
|
|
|
|
|
|
|
unsigned inhibit_actions:1;
|
|
|
|
unsigned inhibit_focus:1;
|
|
|
|
} state;
|
2008-03-23 04:54:24 -07:00
|
|
|
struct {
|
2008-02-10 12:19:39 -08:00
|
|
|
/* User config */
|
|
|
|
unsigned int focused_opacity;
|
2005-11-12 09:51:11 -08:00
|
|
|
unsigned never_use_area:1;
|
|
|
|
unsigned ignorearrange:1;
|
|
|
|
unsigned skip_ext_task:1;
|
|
|
|
unsigned skip_ext_pager:1;
|
|
|
|
unsigned skip_focuslist:1;
|
|
|
|
unsigned skip_winlist:1;
|
|
|
|
unsigned focusclick:1; /* Click to focus */
|
|
|
|
unsigned no_button_grabs:1;
|
2009-02-01 02:15:13 -08:00
|
|
|
unsigned autoshade:1; /* Autoshade on mouse in/out */
|
2008-06-05 10:59:51 -07:00
|
|
|
unsigned no_argb:1; /* Do not use ARGB frame */
|
2008-02-10 12:19:39 -08:00
|
|
|
|
|
|
|
/* Derived from other properties */
|
|
|
|
unsigned no_border:1; /* Never apply border (MWM/netwm type) */
|
|
|
|
unsigned no_resize_h:1; /* ICCCM */
|
|
|
|
unsigned no_resize_v:1; /* ICCCM */
|
|
|
|
|
|
|
|
/* Internal */
|
|
|
|
unsigned autosave:1;
|
2005-07-16 09:57:45 -07:00
|
|
|
unsigned donthide:1; /* Don't hide on show desktop */
|
|
|
|
unsigned vroot:1; /* Virtual root window */
|
2008-02-10 12:19:39 -08:00
|
|
|
unsigned no_actions:1;
|
2005-11-13 04:40:13 -08:00
|
|
|
unsigned focus_when_mapped:1;
|
2005-07-16 09:57:45 -07:00
|
|
|
} props;
|
2005-11-18 23:39:30 -08:00
|
|
|
EWinInhibit inh_app;
|
|
|
|
EWinInhibit inh_user;
|
|
|
|
EWinInhibit inh_wm;
|
2008-03-23 04:54:24 -07:00
|
|
|
struct {
|
2006-11-26 04:42:05 -08:00
|
|
|
char *wm_icon_name;
|
2005-07-16 09:57:45 -07:00
|
|
|
char *wm_role;
|
|
|
|
char *wm_command;
|
|
|
|
char *wm_machine;
|
2005-08-01 10:34:53 -07:00
|
|
|
/* WM_HINTS */
|
|
|
|
char need_input;
|
|
|
|
char start_iconified;
|
|
|
|
Pixmap icon_pmap, icon_mask;
|
|
|
|
Window icon_win;
|
|
|
|
Window group;
|
|
|
|
char urgency;
|
|
|
|
/* WM_PROTOCOLS */
|
|
|
|
char take_focus;
|
|
|
|
char delete_window;
|
|
|
|
/* WM_TRANSIENT_FOR */
|
|
|
|
signed char transient;
|
|
|
|
Window transient_for; /* We are a transient for ... */
|
|
|
|
int transient_count; /* We have <N> transients */
|
|
|
|
/* WM_CLIENT_LEADER */
|
|
|
|
Window client_leader;
|
|
|
|
|
2005-10-12 10:20:42 -07:00
|
|
|
/* WM_NORMAL_HINTS */
|
2008-03-24 02:47:50 -07:00
|
|
|
int width_min, width_max;
|
|
|
|
int height_min, height_max;
|
2005-10-12 10:20:42 -07:00
|
|
|
int base_w, base_h;
|
|
|
|
int w_inc, h_inc;
|
|
|
|
int grav;
|
|
|
|
double aspect_min, aspect_max;
|
|
|
|
|
2005-08-01 10:34:53 -07:00
|
|
|
char is_group_leader;
|
2005-07-16 09:57:45 -07:00
|
|
|
} icccm;
|
2008-03-23 04:54:24 -07:00
|
|
|
struct {
|
2005-07-16 09:57:45 -07:00
|
|
|
unsigned valid:1;
|
|
|
|
unsigned decor_border:1;
|
|
|
|
unsigned decor_resizeh:1;
|
|
|
|
unsigned decor_title:1;
|
|
|
|
unsigned decor_menu:1;
|
|
|
|
unsigned decor_minimize:1;
|
|
|
|
unsigned decor_maximize:1;
|
|
|
|
unsigned func_resize:1;
|
|
|
|
unsigned func_move:1;
|
|
|
|
unsigned func_minimize:1;
|
|
|
|
unsigned func_maximize:1;
|
|
|
|
unsigned func_close:1;
|
|
|
|
} mwm;
|
2008-03-23 04:54:24 -07:00
|
|
|
struct {
|
2005-07-16 09:57:45 -07:00
|
|
|
char *wm_name;
|
|
|
|
char *wm_icon_name;
|
|
|
|
unsigned int *wm_icon, wm_icon_len;
|
|
|
|
unsigned int opacity;
|
2006-02-12 11:14:14 -08:00
|
|
|
#if USE_XSYNC
|
|
|
|
char sync_request_enable;
|
|
|
|
XID sync_request_counter;
|
|
|
|
long long sync_request_count;
|
|
|
|
#endif
|
2008-03-23 04:54:24 -07:00
|
|
|
union {
|
2006-10-26 13:25:30 -07:00
|
|
|
unsigned char all;
|
2008-03-23 04:54:24 -07:00
|
|
|
struct {
|
2006-10-26 13:25:30 -07:00
|
|
|
unsigned desktop:1;
|
|
|
|
unsigned dock:1;
|
|
|
|
unsigned toolbar:1;
|
|
|
|
unsigned menu:1;
|
|
|
|
unsigned utility:1;
|
|
|
|
unsigned splash:1;
|
|
|
|
unsigned dialog:1;
|
|
|
|
unsigned normal:1;
|
|
|
|
} b;
|
|
|
|
} type;
|
2005-07-16 09:57:45 -07:00
|
|
|
} ewmh;
|
2008-03-23 04:54:24 -07:00
|
|
|
struct {
|
2006-04-15 11:32:54 -07:00
|
|
|
signed char gravity;
|
|
|
|
int ax, ay; /* Current placed area */
|
|
|
|
int gx, gy; /* Distance to edge given by gravity */
|
|
|
|
} place;
|
2008-03-23 04:54:24 -07:00
|
|
|
struct {
|
2005-07-16 09:57:45 -07:00
|
|
|
int left, right, top, bottom;
|
|
|
|
} strut;
|
2008-03-23 04:54:24 -07:00
|
|
|
struct {
|
2005-07-16 09:57:45 -07:00
|
|
|
char shape;
|
|
|
|
char border;
|
|
|
|
} update;
|
|
|
|
|
|
|
|
int num_groups;
|
2006-04-06 14:20:16 -07:00
|
|
|
Group **groups;
|
2005-07-16 09:57:45 -07:00
|
|
|
int area_x, area_y;
|
|
|
|
char *session_id;
|
|
|
|
PmapMask mini_pmm;
|
|
|
|
int mini_w, mini_h;
|
|
|
|
|
|
|
|
int shape_x, shape_y, shape_w, shape_h;
|
|
|
|
int req_x, req_y;
|
|
|
|
|
2006-04-06 14:20:16 -07:00
|
|
|
Snapshot *snap;
|
2005-07-16 09:57:45 -07:00
|
|
|
int head; /* Unused? */
|
|
|
|
|
|
|
|
int vx, vy; /* Position in virtual root */
|
2008-03-23 04:54:24 -07:00
|
|
|
struct { /* Saved state before maximization */
|
2007-03-17 08:49:41 -07:00
|
|
|
int x, y; /* Position */
|
|
|
|
int w, h; /* Size */
|
|
|
|
} save_max;
|
2008-03-23 04:54:24 -07:00
|
|
|
struct { /* Saved state before fullscreen */
|
2007-03-17 08:49:41 -07:00
|
|
|
int x, y; /* Position */
|
|
|
|
int w, h; /* Size */
|
|
|
|
int layer; /* Layer */
|
|
|
|
} save_fs;
|
2005-07-16 09:57:45 -07:00
|
|
|
|
|
|
|
void *data; /* Data hook for internal windows */
|
2006-12-27 08:17:27 -08:00
|
|
|
const EWinOps *ops;
|
2009-03-21 13:58:00 -07:00
|
|
|
|
|
|
|
Timer *timer; /* Autoshade timer */
|
2005-07-16 09:57:45 -07:00
|
|
|
};
|
|
|
|
|
2005-08-01 10:34:53 -07:00
|
|
|
#define EWIN_STATE_NEW 0 /* New */
|
|
|
|
#define EWIN_STATE_STARTUP 1 /* New - during startup */
|
|
|
|
#define EWIN_STATE_WITHDRAWN 2
|
|
|
|
#define EWIN_STATE_ICONIC 3
|
|
|
|
#define EWIN_STATE_MAPPED 4
|
|
|
|
|
|
|
|
#define EWIN_TYPE_NORMAL 0x00
|
|
|
|
#define EWIN_TYPE_DIALOG 0x01
|
|
|
|
#define EWIN_TYPE_MENU 0x02
|
|
|
|
#define EWIN_TYPE_ICONBOX 0x04
|
|
|
|
#define EWIN_TYPE_PAGER 0x08
|
2007-04-07 06:19:30 -07:00
|
|
|
#define EWIN_TYPE_MISC 0x10
|
2005-08-01 10:34:53 -07:00
|
|
|
|
2006-04-15 11:32:54 -07:00
|
|
|
#define EWIN_GRAVITY_NW 0
|
|
|
|
#define EWIN_GRAVITY_NE 1
|
|
|
|
#define EWIN_GRAVITY_SW 2
|
|
|
|
#define EWIN_GRAVITY_SE 3
|
|
|
|
|
2005-09-24 17:50:53 -07:00
|
|
|
#define EwinGetDesk(ewin) EoGetDesk(ewin)
|
|
|
|
|
2005-12-07 15:18:27 -08:00
|
|
|
#define EwinIsMapped(ewin) ((ewin)->state.state >= EWIN_STATE_MAPPED)
|
|
|
|
#define EwinIsInternal(ewin) ((ewin)->type != EWIN_TYPE_NORMAL)
|
|
|
|
#define EwinIsTransientChild(ewin) ((ewin)->icccm.transient > 0)
|
|
|
|
#define EwinIsTransient(ewin) ((ewin)->icccm.transient != 0)
|
|
|
|
#define EwinGetTransientFor(ewin) ((ewin)->icccm.transient_for)
|
|
|
|
#define EwinGetTransientCount(ewin) ((ewin)->icccm.transient_count)
|
|
|
|
#define EwinIsWindowGroupLeader(ewin) ((ewin)->icccm.is_group_leader)
|
|
|
|
#define EwinGetWindowGroup(ewin) ((ewin)->icccm.group)
|
2005-08-01 10:34:53 -07:00
|
|
|
|
2006-08-07 13:20:16 -07:00
|
|
|
#define EwinGetClientWin(ewin) ((ewin)->client.win)
|
|
|
|
#define EwinGetContainerWin(ewin) ((ewin)->win_container)
|
2005-08-04 09:02:02 -07:00
|
|
|
|
2006-11-26 06:40:05 -08:00
|
|
|
#define EwinGetIcccmName(ewin) EoGetName(ewin)
|
|
|
|
#define EwinGetIcccmCName(ewin) EoGetCName(ewin)
|
|
|
|
#define EwinGetIcccmClass(ewin) EoGetClass(ewin)
|
2006-11-26 04:42:05 -08:00
|
|
|
|
2006-11-19 13:55:52 -08:00
|
|
|
/* arrange.c */
|
|
|
|
#define ARRANGE_VERBATIM 0
|
|
|
|
#define ARRANGE_BY_SIZE 1
|
|
|
|
#define ARRANGE_BY_POSITION 2
|
|
|
|
|
|
|
|
void SnapEwin(EWin * ewin, int dx, int dy, int *new_dx,
|
|
|
|
int *new_dy);
|
|
|
|
void ArrangeEwin(EWin * ewin);
|
|
|
|
void ArrangeEwinCentered(EWin * ewin);
|
|
|
|
void ArrangeEwinXY(EWin * ewin, int *px, int *py);
|
|
|
|
void ArrangeEwinCenteredXY(EWin * ewin, int *px, int *py);
|
|
|
|
|
|
|
|
void ArrangeEwins(const char *params);
|
|
|
|
|
|
|
|
/* coords.c */
|
|
|
|
void CoordsShow(EWin * ewin);
|
2009-04-13 08:52:42 -07:00
|
|
|
void CoordsShowOpacity(EWin * ewin);
|
2006-11-19 13:55:52 -08:00
|
|
|
void CoordsHide(void);
|
|
|
|
|
|
|
|
/* dock.c */
|
|
|
|
void DockIt(EWin * ewin);
|
|
|
|
|
|
|
|
/* draw.c */
|
|
|
|
void DrawEwinShape(EWin * ewin, int md, int x, int y, int w,
|
2007-06-11 15:28:35 -07:00
|
|
|
int h, int firstlast, int seqno);
|
2006-11-19 13:55:52 -08:00
|
|
|
|
2005-07-16 09:57:45 -07:00
|
|
|
/* ewins.c */
|
|
|
|
#define EWIN_CHANGE_NAME (1<<0)
|
|
|
|
#define EWIN_CHANGE_ICON_NAME (1<<1)
|
|
|
|
#define EWIN_CHANGE_ICON_PMAP (1<<2)
|
|
|
|
#define EWIN_CHANGE_DESKTOP (1<<3)
|
|
|
|
#define EWIN_CHANGE_LAYER (1<<4)
|
|
|
|
#define EWIN_CHANGE_OPACITY (1<<5)
|
|
|
|
#define EWIN_CHANGE_ATTENTION (1<<6)
|
|
|
|
|
2006-08-07 13:26:05 -07:00
|
|
|
Window EwinGetClientXwin(const EWin * ewin);
|
|
|
|
Window EwinGetContainerXwin(const EWin * ewin);
|
|
|
|
|
2005-07-16 09:57:45 -07:00
|
|
|
void EwinShapeSet(EWin * ewin);
|
2006-05-03 13:52:15 -07:00
|
|
|
void EwinRaise(EWin * ewin);
|
|
|
|
void EwinLower(EWin * ewin);
|
|
|
|
void EwinShow(EWin * ewin);
|
|
|
|
void EwinHide(EWin * ewin);
|
2006-05-03 14:04:08 -07:00
|
|
|
void EwinKill(EWin * ewin);
|
2005-07-16 09:57:45 -07:00
|
|
|
void DetermineEwinFloat(EWin * ewin, int dx, int dy);
|
|
|
|
EWin *GetEwinPointerInClient(void);
|
|
|
|
EWin *GetFocusEwin(void);
|
|
|
|
EWin *GetContextEwin(void);
|
|
|
|
void SetContextEwin(EWin * ewin);
|
2008-07-11 12:38:18 -07:00
|
|
|
void EwinGetPosition(const EWin * ewin, int x, int y, int grav,
|
|
|
|
int *px, int *py);
|
2005-07-16 09:57:45 -07:00
|
|
|
void EwinUpdateShapeInfo(EWin * ewin);
|
|
|
|
void EwinPropagateShapes(EWin * ewin);
|
|
|
|
void EwinStateUpdate(EWin * ewin);
|
2006-04-29 12:39:21 -07:00
|
|
|
EWin *AddInternalToFamily(Win win, const char *bname, int type,
|
2007-04-06 14:44:22 -07:00
|
|
|
const EWinOps * ops, void *ptr);
|
2006-04-29 12:39:21 -07:00
|
|
|
void EwinReparent(EWin * ewin, Win parent);
|
2007-05-18 14:18:24 -07:00
|
|
|
void EwinSetTitle(EWin * ewin, const char *title);
|
|
|
|
void EwinSetClass(EWin * ewin, const char *name,
|
|
|
|
const char *clss);
|
2006-11-26 03:30:59 -08:00
|
|
|
const char *EwinGetTitle(const EWin * ewin);
|
2005-07-16 09:57:45 -07:00
|
|
|
const char *EwinGetIconName(const EWin * ewin);
|
2005-12-22 10:43:15 -08:00
|
|
|
const char *EwinBorderGetName(const EWin * ewin);
|
|
|
|
void EwinBorderGetSize(const EWin * ewin, int *bl, int *br,
|
|
|
|
int *bt, int *bb);
|
|
|
|
void EwinBorderUpdateState(EWin * ewin);
|
2005-08-04 09:02:02 -07:00
|
|
|
int EwinIsOnScreen(const EWin * ewin);
|
2005-07-16 09:57:45 -07:00
|
|
|
void EwinRememberPositionSet(EWin * ewin);
|
2006-04-06 14:20:16 -07:00
|
|
|
void EwinRememberPositionGet(EWin * ewin, Desk * dsk,
|
2005-10-27 15:26:37 -07:00
|
|
|
int *px, int *py);
|
2006-04-15 11:32:54 -07:00
|
|
|
void EwinSetPlacementGravity(EWin * ewin, int x, int y);
|
2006-04-15 11:49:29 -07:00
|
|
|
void EwinReposition(EWin * ewin);
|
2008-02-03 09:03:23 -08:00
|
|
|
void EwinFlagsEncode(const EWin * ewin, unsigned int *flags);
|
|
|
|
void EwinFlagsDecode(EWin * ewin, const unsigned int *flags);
|
2006-04-02 01:45:40 -08:00
|
|
|
void EwinUpdateOpacity(EWin * ewin);
|
2005-07-16 09:57:45 -07:00
|
|
|
|
|
|
|
void EwinChange(EWin * ewin, unsigned int flag);
|
|
|
|
|
2008-01-19 05:44:54 -08:00
|
|
|
void EwinWarpTo(EWin * ewin);
|
|
|
|
|
2007-03-04 15:25:11 -08:00
|
|
|
EWin **EwinListTransients(const EWin * ewin, int *num, int group);
|
|
|
|
EWin **EwinListTransientFor(const EWin * ewin, int *num);
|
|
|
|
|
2007-07-11 02:05:43 -07:00
|
|
|
void EwinsManage(void);
|
2005-07-16 09:57:45 -07:00
|
|
|
void EwinsSetFree(void);
|
|
|
|
void EwinsShowDesktop(int on);
|
2006-04-06 14:20:16 -07:00
|
|
|
void EwinsMoveStickyToDesk(Desk * d);
|
2005-07-16 09:57:45 -07:00
|
|
|
|
|
|
|
/* ewin-ops.c */
|
|
|
|
void SlideEwinTo(EWin * ewin, int fx, int fy, int tx, int ty,
|
2007-06-16 01:41:53 -07:00
|
|
|
int speed, int mode);
|
2005-07-16 09:57:45 -07:00
|
|
|
void SlideEwinsTo(EWin ** ewin, int *fx, int *fy, int *tx,
|
2007-06-16 01:41:53 -07:00
|
|
|
int *ty, int num_wins, int speed, int mode);
|
2005-07-16 09:57:45 -07:00
|
|
|
void EwinMove(EWin * ewin, int x, int y);
|
|
|
|
void EwinResize(EWin * ewin, int w, int h);
|
|
|
|
void EwinMoveResize(EWin * ewin, int x, int y, int w, int h);
|
|
|
|
void EwinMoveResizeWithGravity(EWin * ewin, int x, int y, int w,
|
|
|
|
int h, int grav);
|
2006-04-06 14:20:16 -07:00
|
|
|
void EwinMoveToDesktop(EWin * ewin, Desk * d);
|
|
|
|
void EwinMoveToDesktopAt(EWin * ewin, Desk * d, int x, int y);
|
2005-07-16 09:57:45 -07:00
|
|
|
void EwinIconify(EWin * ewin);
|
2008-11-07 11:50:57 -08:00
|
|
|
void EwinAlone(EWin * ewin);
|
2005-07-16 09:57:45 -07:00
|
|
|
void EwinDeIconify(EWin * ewin);
|
|
|
|
void EwinInstantShade(EWin * ewin, int force);
|
|
|
|
void EwinInstantUnShade(EWin * ewin);
|
|
|
|
void EwinShade(EWin * ewin);
|
|
|
|
void EwinUnShade(EWin * ewin);
|
|
|
|
void EwinMoveToArea(EWin * ewin, int ax, int ay);
|
|
|
|
|
2006-02-19 14:23:50 -08:00
|
|
|
void EwinOpMove(EWin * ewin, int source, int x, int y);
|
|
|
|
void EwinOpResize(EWin * ewin, int source, int w, int h);
|
|
|
|
void EwinOpMoveResize(EWin * ewin, int source, int x, int y,
|
|
|
|
int w, int h);
|
2006-04-12 08:19:40 -07:00
|
|
|
void EwinOpMoveToDesktopAt(EWin * ewin, int source, Desk * dsk,
|
|
|
|
int x, int y);
|
|
|
|
void EwinOpFloatAt(EWin * ewin, int source, int x, int y);
|
|
|
|
void EwinOpUnfloatAt(EWin * ewin, int source, Desk * d,
|
|
|
|
int x, int y);
|
2005-11-12 11:55:42 -08:00
|
|
|
void EwinOpClose(EWin * ewin, int source);
|
2007-03-05 19:33:31 -08:00
|
|
|
void EwinOpActivate(EWin * ewin, int source, int raise);
|
2005-11-12 11:55:42 -08:00
|
|
|
void EwinOpKill(EWin * ewin, int source);
|
|
|
|
void EwinOpRaise(EWin * ewin, int source);
|
|
|
|
void EwinOpLower(EWin * ewin, int source);
|
|
|
|
void EwinOpStick(EWin * ewin, int source, int on);
|
|
|
|
void EwinOpSkipLists(EWin * ewin, int source, int skip);
|
|
|
|
void EwinOpIconify(EWin * ewin, int source, int on);
|
|
|
|
void EwinOpShade(EWin * ewin, int source, int on);
|
|
|
|
void EwinOpSetLayer(EWin * ewin, int source, int layer);
|
|
|
|
void EwinOpSetBorder(EWin * ewin, int source, const char *name);
|
|
|
|
void EwinOpSetOpacity(EWin * ewin, int source, int opacity);
|
2006-11-03 15:44:32 -08:00
|
|
|
void EwinOpSetFocusedOpacity(EWin * ewin, int source,
|
|
|
|
int opacity);
|
2006-04-06 14:20:16 -07:00
|
|
|
void EwinOpMoveToDesk(EWin * ewin, int source, Desk * dsk,
|
2005-11-12 11:55:42 -08:00
|
|
|
int inc);
|
2005-11-12 17:22:28 -08:00
|
|
|
void EwinOpFullscreen(EWin * ewin, int source, int on);
|
2005-07-16 09:57:45 -07:00
|
|
|
|
2005-10-29 06:09:31 -07:00
|
|
|
/* finders.c */
|
|
|
|
EWin *EwinFindByPtr(const EWin * ewin);
|
|
|
|
EWin *EwinFindByClient(Window win);
|
|
|
|
EWin *EwinFindByChildren(Window win);
|
2007-03-04 15:25:11 -08:00
|
|
|
EWin **EwinsFindByExpr(const char *match, int *pnum, int *pflags);
|
|
|
|
EWin *EwinFindByExpr(const char *match);
|
2005-10-29 06:09:31 -07:00
|
|
|
|
2006-08-23 12:06:21 -07:00
|
|
|
/* icccm.c (for now) */
|
|
|
|
#if USE_XSYNC
|
|
|
|
int EwinSyncRequestSend(EWin * ewin);
|
|
|
|
void EwinSyncRequestWait(EWin * ewin);
|
|
|
|
#endif
|
|
|
|
|
2006-11-19 13:55:52 -08:00
|
|
|
/* moveresize.c */
|
2009-02-14 03:09:03 -08:00
|
|
|
int ActionMoveStart(EWin * ewin, int kbd, int constrained,
|
|
|
|
int nogroup);
|
|
|
|
int ActionResizeStart(EWin * ewin, int kbd, int hv);
|
2007-09-05 12:12:56 -07:00
|
|
|
|
2006-11-19 13:55:52 -08:00
|
|
|
int ActionsSuspend(void);
|
|
|
|
int ActionsResume(void);
|
2009-02-14 03:09:06 -08:00
|
|
|
void ActionsHandleKey(unsigned int key);
|
2006-11-19 13:55:52 -08:00
|
|
|
void ActionsHandleMotion(void);
|
|
|
|
int ActionsEnd(EWin * ewin);
|
|
|
|
|
2005-11-27 05:11:06 -08:00
|
|
|
/* size.c */
|
2008-06-22 15:23:24 -07:00
|
|
|
void MaxSizeHV(EWin * ewin, const char *resize_type,
|
|
|
|
int hor, int ver);
|
2005-11-27 05:11:06 -08:00
|
|
|
|
2005-08-07 07:06:52 -07:00
|
|
|
/* stacking.c */
|
|
|
|
EWin *const *EwinListStackGet(int *num);
|
|
|
|
EWin *const *EwinListFocusGet(int *num);
|
2006-04-06 14:20:16 -07:00
|
|
|
EWin *const *EwinListGetForDesk(int *num, Desk * d);
|
2005-08-07 07:06:52 -07:00
|
|
|
EWin *const *EwinListOrderGet(int *num);
|
2005-10-20 11:18:13 -07:00
|
|
|
EWin *EwinListStackGetTop(void);
|
|
|
|
int EwinListStackIsRaised(const EWin * ewin);
|
2005-08-07 07:06:52 -07:00
|
|
|
|
|
|
|
#define EwinListGetAll EwinListStackGet
|
|
|
|
|
2005-07-16 09:57:45 -07:00
|
|
|
/* zoom.c */
|
|
|
|
EWin *GetZoomEWin(void);
|
|
|
|
void ReZoom(EWin * ewin);
|
|
|
|
char InZoom(void);
|
|
|
|
void ZoomInit(void);
|
|
|
|
void Zoom(EWin * ewin);
|
|
|
|
|
|
|
|
#endif /* _EWIN_H_ */
|