forked from awesomeWM/awesome
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathewindow.h
More file actions
127 lines (112 loc) · 3.93 KB
/
Copy pathewindow.h
File metadata and controls
127 lines (112 loc) · 3.93 KB
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
120
121
122
123
124
125
126
127
/*
* ewindow.h - Extended window object header
*
* Copyright © 2009 Julien Danjou <julien@danjou.info>
*
* 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 3 of the License, 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.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef AWESOME_OBJECTS_EWINDOW_H
#define AWESOME_OBJECTS_EWINDOW_H
#include "strut.h"
#include "objects/window.h"
#include "color.h"
#include "common/luaclass.h"
/* Needed to avoid loop between ewindow and tag :-( */
typedef struct tag tag_t;
ARRAY_TYPE(tag_t *, tag)
/** ewindows type */
typedef enum
{
EWINDOW_TYPE_NORMAL = 0,
EWINDOW_TYPE_DESKTOP,
EWINDOW_TYPE_DOCK,
EWINDOW_TYPE_SPLASH,
EWINDOW_TYPE_DIALOG,
/* The ones below may have TRANSIENT_FOR, but are not plain dialogs.
* They were purposefully placed below DIALOG.
*/
EWINDOW_TYPE_MENU,
EWINDOW_TYPE_TOOLBAR,
EWINDOW_TYPE_UTILITY,
/* This ones are usually set on override-redirect windows. */
EWINDOW_TYPE_DROPDOWN_MENU,
EWINDOW_TYPE_POPUP_MENU,
EWINDOW_TYPE_TOOLTIP,
EWINDOW_TYPE_NOTIFICATION,
EWINDOW_TYPE_COMBO,
EWINDOW_TYPE_DND
} ewindow_type_t;
#define EWINDOW_OBJECT_HEADER \
WINDOW_OBJECT_HEADER \
/** Opacity */ \
double opacity; \
/** Strut */ \
strut_t strut; \
/** Border color */ \
xcolor_t border_color; \
/** Border width */ \
uint16_t border_width; \
/** Window tags */ \
tag_array_t tags; \
/** True if the window is sticky */ \
bool sticky; \
/** True if the client is minimized */ \
bool minimized; \
/** True if the client is fullscreen */ \
bool fullscreen; \
/** True if the client is maximized horizontally */ \
bool maximized_horizontal; \
/** True if the client is maximized vertically */ \
bool maximized_vertical; \
/** True if the client is above others */ \
bool above; \
/** True if the client is below others */ \
bool below; \
/** True if the client is modal */ \
bool modal; \
/** True if the client is on top */ \
bool ontop; \
/** The window type */ \
ewindow_type_t type;
typedef struct ewindow_t ewindow_t;
/** Window structure */
struct ewindow_t
{
EWINDOW_OBJECT_HEADER
};
DO_ARRAY(ewindow_t *, ewindow, DO_NOTHING)
DO_BARRAY(ewindow_t *, ewindow_binary, DO_NOTHING, window_cmp)
/** All managed ewindows */
ewindow_binary_array_t _G_ewindows;
lua_interface_window_t ewindow_class;
void ewindow_class_setup(lua_State *);
bool ewindow_isvisible(ewindow_t *);
ewindow_t *ewindow_getbywin(xcb_window_t);
void ewindow_set_opacity(lua_State *, ewindow_t *, double);
void ewindow_set_border_width(lua_State *, ewindow_t *, int);
void ewindow_set_sticky(lua_State *, ewindow_t *, bool);
void ewindow_set_above(lua_State *, ewindow_t *, bool);
void ewindow_set_below(lua_State *, ewindow_t *, bool);
void ewindow_set_modal(lua_State *, ewindow_t *, bool);
void ewindow_set_ontop(lua_State *, ewindow_t *, bool);
void ewindow_set_fullscreen(lua_State *, ewindow_t *, bool);
void ewindow_set_maximized_horizontal(lua_State *, ewindow_t *, bool);
void ewindow_set_maximized_vertical(lua_State *, ewindow_t *, bool);
void ewindow_set_minimized(lua_State *, ewindow_t *, bool);
void ewindow_set_type(lua_State *, ewindow_t *, ewindow_type_t);
int luaA_ewindow_get_transient_for(lua_State *, ewindow_t *);
int luaA_ewindow_get_type(lua_State *, ewindow_t *);
#endif
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80