]> git.sur5r.net Git - i3/i3/blob - include/startup.h
555a11914a054603343311aa0352edb0e04f8249
[i3/i3] / include / startup.h
1 /*
2  * vim:ts=4:sw=4:expandtab
3  *
4  * i3 - an improved dynamic tiling window manager
5  *
6  * © 2009-2011 Michael Stapelberg and contributors
7  *
8  * See file LICENSE for license information.
9  *
10  */
11 #ifndef _STARTUP_H
12 #define _STARTUP_H
13
14 #define SN_API_NOT_YET_FROZEN 1
15 #include <libsn/sn-monitor.h>
16
17 /**
18  * Starts the given application by passing it through a shell. We use double
19  * fork to avoid zombie processes. As the started application’s parent exits
20  * (immediately), the application is reparented to init (process-id 1), which
21  * correctly handles childs, so we don’t have to do it :-).
22  *
23  * The shell is determined by looking for the SHELL environment variable. If
24  * it does not exist, /bin/sh is used.
25  *
26  */
27 void start_application(const char *command);
28
29 /**
30  * Called by libstartup-notification when something happens
31  *
32  */
33 void startup_monitor_event(SnMonitorEvent *event, void *userdata);
34
35 /**
36  * Checks if the given window belongs to a startup notification by checking if
37  * the _NET_STARTUP_ID property is set on the window (or on its leader, if it’s
38  * unset).
39  *
40  * If so, returns the workspace on which the startup was initiated.
41  * Returns NULL otherwise.
42  *
43  */
44 char *startup_workspace_for_window(i3Window *cwindow, xcb_get_property_reply_t *startup_id_reply);
45
46 #endif