1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
|
/*
* Matchbox Window Manager - A lightweight window manager not for the
* desktop.
*
* Authored By Matthew Allum <mallum@o-hand.com>
*
* Copyright (c) 2002, 2004 OpenedHand Ltd - http://o-hand.com
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* 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.
*
*/
#ifndef _EWMH_H_
#define _EWMH_H_
#include "structs.h"
#include "wm.h"
/* Number of failed pending pings to kill a ping supporting app on */
#define PING_PENDING_MAX 2
/* Time in seconds between each hung app check */
#define PING_CHECK_FREQ 2
/* Max num of pings to send to an app - used only when in aggresive mode */
#define PING_CHECK_DURATION 5
/* Non aton defines */
#define _NET_WM_STATE_REMOVE 0 /* remove/unset property */
#define _NET_WM_STATE_ADD 1 /* add/set property */
#define _NET_WM_STATE_TOGGLE 2 /* toggle property */
void
ewmh_init (Wm *w);
void
ewmh_init_props (Wm *w);
void
ewmh_update_lists(Wm *w);
void
ewmh_update_desktop_hint(Wm *w);
void
ewmh_update_rects(Wm *w);
void
ewmh_set_active (Wm *w);
void
ewmh_set_current_app_window(Wm *w);
int
ewmh_handle_root_message (Wm *w, XClientMessageEvent *e);
unsigned char *
ewmh_get_utf8_prop (Wm *w, Window win, Atom req_atom);
void
ewmh_state_set(Client *c);
Bool
ewmh_state_check (Client *c, Atom atom_state_wanted);
int
ewmh_get_user_time (Client *c);
void
ewmh_set_allowed_actions (Wm *w, Client *c);
void
ewmh_ping_client_start (Client *c);
void
ewmh_ping_client_stop (Client *c);
void
ewmh_hung_app_check (Wm *w);
#ifndef REDUCE_BLOAT
unsigned long *
ewmh_get_icon_prop_data (Wm *w, Window win);
#endif
int
ewmh_utf8_len(unsigned char *str);
int
ewmh_utf8_get_byte_cnt(unsigned char *str, int num_chars);
Bool
ewmh_utf8_validate(unsigned char *str, int max_len);
#ifdef USE_XSYNC
void
ewmh_sync_init(Wm *w);
void
ewmh_sync_handle_event(Wm *w, XSyncAlarmNotifyEvent *ev);
Bool
ewmh_sync_client_move_resize(Client *client);
Bool
ewmh_sync_client_init_counter(Client *client);
#endif /* USE_XSYNC */
#endif
|