summaryrefslogtreecommitdiff
path: root/vapi/xcb-icccm.vapi
blob: fd4cb79942e1e71c2d7d3e8d46d9f6be94fbe5eb (plain)
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
/* xcb-icccm.vapi
 *
 * Copyright (C) 2013  Sergio Costas
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 *
 * Author:
 *  Sergio Costas <raster@rastersoft.com>
 */

using Xcb;

[Version (deprecated_since = "vala-0.26", replacement = "bindings distributed with vala-extra-vapis")]
namespace Xcb {

	[CCode (lower_case_cprefix = "xcb_icccm_", cheader_filename = "xcb/xcb_icccm.h")]
	namespace Icccm {

		/**
		 * A factory method that creates an Icccm object. It allows to call the Xcb Icccm methods
		 * @param conn The current Xcb connection
		 * @return the new Icccm object
		 */
		public static Icccm new(Xcb.Connection conn) {
			unowned Xcb.Icccm.Icccm retval = (Xcb.Icccm.Icccm)conn;
			return retval;
		}

		// The Icccm class is, in fact, a Xcb.Connection class in disguise
		[Compact, CCode (cname = "xcb_connection_t", cprefix = "xcb_icccm_")]
		public class Icccm : Xcb.Connection {
			public GetPropertyCookie get_wm_class(Window window);
			public GetPropertyCookie get_wm_class_unchecked(Window window);
		}

		[SimpleType]
		[CCode (cname = "xcb_icccm_get_wm_class_reply_t", has_type_id = false)]
		public struct GetWmClassFromReply {
			unowned string instance_name;
			unowned string class_name;
		}

		public void get_wm_class_from_reply(out GetWmClassFromReply reply, GetPropertyReply input);
	}
}