File: exec.h

package info (click to toggle)
notion 4.0.2%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 4,676 kB
  • sloc: ansic: 47,508; sh: 2,096; makefile: 603; perl: 270
file content (59 lines) | stat: -rw-r--r-- 1,357 bytes parent folder | download | duplicates (3)
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
/*
 * ion/ioncore/exec.h
 *
 * Copyright (c) Tuomo Valkonen 1999-2007.
 *
 * See the included file LICENSE for details.
 */

#ifndef ION_IONCORE_EXEC_H
#define ION_IONCORE_EXEC_H

#include <libextl/extl.h>
#include <libmainloop/hooks.h>
#include "common.h"
#include "rootwin.h"

enum{
    IONCORE_SM_RESIGN,
    IONCORE_SM_SHUTDOWN,
    IONCORE_SM_RESTART,
    IONCORE_SM_RESTART_OTHER,
    IONCORE_SM_SNAPSHOT
};


INTRSTRUCT(WExecP);

DECLSTRUCT(WExecP){
    WRegion *target;
    const char *cmd;
    const char *wd;
};


extern bool ioncore_exec(const char *cmd);
extern int ioncore_do_exec_on(WRegion *reg, const char *cmd, const char *wd,
                              ExtlFn errh);
extern bool ioncore_popen_bgread(const char *cmd, ExtlFn h, ExtlFn errh);
extern void ioncore_setup_environ(const WExecP *p);
extern void ioncore_setup_display(int xscr);

extern bool ioncore_set_smhook(void (*fn)(int what));

extern void ioncore_restart_other(const char *cmd);
extern void ioncore_restart();
extern void ioncore_shutdown();
extern void ioncore_resign();
extern void ioncore_snapshot();

extern void ioncore_do_exit();
extern void ioncore_do_restart();
extern bool ioncore_do_snapshot(bool save_layout);

extern void ioncore_emergency_snapshot();

/* const WExecP* parameter */
extern WHook *ioncore_exec_environ_hook;

#endif /* ION_IONCORE_EXEC_H */