summaryrefslogtreecommitdiff
path: root/libmdock/app-id.h
blob: d2abe92df1babbb89939a6150f3bade81974ca12 (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
/*
 * Copyright 2015 Javier S. Pedro <dev.git@javispedro.com>
 *
 * This file is part of MDock.
 *
 * MDock 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.
 *
 * MDock 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 General Public License
 * along with MDock.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef _MDOCK_APPID_H_
#define _MDOCK_APPID_H_

#include <glib.h>
#define WNCK_I_KNOW_THIS_IS_UNSTABLE 1
#include <libwnck/libwnck.h>

typedef struct _AppId {
	gchar *host;
	gint uid;
	gchar *executable;
	gchar *wm_class_class;
	gchar *wm_class_name;
} AppId;

AppId * app_id_new();
AppId * app_id_create(const gchar *host, gint uid, const gchar *executable, const gchar *wm_class_class, const gchar *wm_class_name);
void app_id_destroy(AppId *appid);

guint app_id_hash(gconstpointer appid);
gboolean app_id_equal(gconstpointer ap, gconstpointer bp);

AppId * app_id_from_window(WnckWindow *window);

gboolean app_id_is_local_user(AppId *appid);

#endif /* _MDOCK_APPID_H_ */