1 /* -*-c-*- */
2 /* Copyright (C) 2001  Olivier Chapuis */
3 
4 #ifndef FVWM_EWMH_H
5 #define FVWM_EWMH_H
6 
7 #include "fvwm.h"
8 #include "execcontext.h"
9 
10 /* Extended window manager hints support */
11 
12 /* ewmh_conf.c */
13 Bool EWMH_BugOpts(char *opt, Bool toggle);
14 void CMD_EwmhNumberOfDesktops(F_CMD_ARGS);
15 void CMD_EwmhBaseStrut(F_CMD_ARGS);
16 Bool EWMH_CMD_Style(char *token, window_style *ptmpstyle, int on);
17 
18 /* for maximize and placement ewmh style */
19 #define EWMH_IGNORE_WORKING_AREA      0
20 #define EWMH_USE_WORKING_AREA         1
21 #define EWMH_USE_DYNAMIC_WORKING_AREA 2
22 #define EWMH_WORKING_AREA_MASK        3
23 
24 /* Extended window manager hints support */
25 
26 #include "libs/FScreen.h"
27 
28 void EWMH_SetCurrentDesktop(struct monitor *);
29 void EWMH_SetNumberOfDesktops(struct monitor *);
30 void EWMH_SetDesktopViewPort(struct monitor *);
31 void EWMH_SetDesktopGeometry(struct monitor *);
32 
33 void EWMH_SetActiveWindow(Window w);
34 void EWMH_SetWMDesktop(FvwmWindow *fw);
35 void EWMH_SetWMState(FvwmWindow *fw, Bool do_restore);
36 
37 int EWMH_IsKdeSysTrayWindow(Window w);
38 void EWMH_ManageKdeSysTray(Window w, int type);
39 void EWMH_SetClientList(struct monitor *);
40 void EWMH_SetClientListStacking(struct monitor *);
41 void EWMH_UpdateWorkArea(struct monitor *);
42 void EWMH_GetWorkAreaIntersection(
43 	FvwmWindow *fw, int *x, int *y, int *w, int *h, int type);
44 float EWMH_GetBaseStrutIntersection(struct monitor *m,
45 	int x11, int y11, int x12, int y12, Bool use_percent);
46 float EWMH_GetStrutIntersection(struct monitor *m,
47 	int x11, int y11, int x12, int y12, Bool use_percent);
48 void EWMH_SetFrameStrut(FvwmWindow *fw);
49 void EWMH_SetAllowedActions(FvwmWindow *fw);
50 
51 void EWMH_GetIconGeometry(FvwmWindow *fw, rectangle *icon_rect);
52 
53 void EWMH_GetStyle(FvwmWindow *fw, window_style *style);
54 void EWMH_WindowInit(FvwmWindow *fw);
55 void EWMH_RestoreInitialStates(FvwmWindow *fw, int event_type);
56 void EWMH_DestroyWindow(FvwmWindow *fw);
57 void EWMH_WindowDestroyed(void);
58 
59 void EWMH_Init(struct monitor *);
60 void EWMH_ExitStuff(void);
61 
62 /* ewmh_conf.c */
63 void set_ewmhc_strut_values(struct monitor *, int *);
64 
65 /* ewmh_events.c */
66 Bool EWMH_ProcessClientMessage(const exec_context_t *exc);
67 void EWMH_ProcessPropertyNotify(const exec_context_t *exc);
68 
69 /* ewmh_icon.c */
70 void EWMH_DeleteWmIcon(FvwmWindow *fw, Bool mini_icon, Bool icon);
71 int EWMH_SetIconFromWMIcon(
72 	FvwmWindow *fw, CARD32 *list, int size, Bool is_mini_icon);
73 void EWMH_DoUpdateWmIcon(FvwmWindow *fw, Bool mini_icon, Bool icon);
74 
75 /* ewmh_name.c */
76 void EWMH_SetVisibleName(FvwmWindow *fw, Bool is_icon_name);
77 int EWMH_WMName(
78 	FvwmWindow *fw, XEvent *ev, window_style *style, unsigned long any);
79 int EWMH_WMIconName(
80 	FvwmWindow *fw, XEvent *ev, window_style *style, unsigned long any);
81 void EWMH_SetDesktopNames(struct monitor *);
82 void EWMH_fullscreen(FvwmWindow *fw);
83 
84 #endif /* FVWM_EWMH_H */
85