2
* @file geis_xcb_backend_token.h
3
* @brief GEIS filter token for the XCB-based grail back end
5
* Copyright 2011 Canonical Ltd.
7
* This library is free software; you can redistribute it and/or modify it under
8
* the terms of the GNU Lesser General Public License as published by the Free
9
* Software Foundation; either version 3 of the License, or (at your option) any
12
* This library is distributed in the hope that it will be useful, but WITHOUT
13
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
17
* You should have received a copy of the GNU General Public License
18
* along with this program. If not, see <http://www.gnu.org/licenses/>.
20
#ifndef GEIS_XCB_BACKEND_TOKEN_H_
21
#define GEIS_XCB_BACKEND_TOKEN_H_
23
#include "geis_backend_protected.h"
26
typedef struct XcbBackendToken *XcbBackendToken;
28
GeisBackendToken geis_xcb_token_new(GeisBackend be, GeisBackendTokenInitState);
30
void geis_xcb_token_set_xcb(GeisBackendToken, xcb_connection_t *xcb_connection);
32
GeisStatus geis_xcb_token_add_class_term(GeisBackendToken gbtoken,
35
GeisFilterOperation op,
38
GeisStatus geis_xcb_token_add_device_term(GeisBackendToken gbtoken,
41
GeisFilterOperation op,
44
GeisStatus geis_xcb_token_add_region_term(GeisBackendToken gbtoken,
47
GeisFilterOperation op,
50
GeisStatus geis_xcb_token_add_feature_term(GeisBackendToken gbtoken,
53
GeisFilterOperation op,
58
* Gets the number of devices on a token.
60
uint16_t geis_xcb_token_device_count(XcbBackendToken token);
63
* Gets an indicated device from a tken.
65
uint16_t geis_xcb_token_device(XcbBackendToken token, uint16_t index);
68
* Gets the number of windowids on a token.
70
int geis_xcb_token_window_count(XcbBackendToken token);
73
* Gets an indicated window from a token.
75
xcb_window_t geis_xcb_token_window(XcbBackendToken token, int index);
78
* Gets the size of the grail bitmask on the token.
80
uint16_t geis_xcb_token_grail_mask_len(XcbBackendToken token);
83
* Gets the grail bitmask fro the token.
85
uint32_t* geis_xcb_token_grail_mask(XcbBackendToken token);
87
#endif /* GEIS_XCB_BACKEND_TOKEN_H_ */