Clean menu -- made to use standart GNOME menu entries
[midnight-commander.git] / src / background.h
blob27954b9ddf4802113157a7cfae7e9f8d2d49043e
1 #ifndef __BACKGROUND_H
2 #define __BACKGROUND_H
4 /* Background code requires socketpair to be available */
5 /* Do not add the background code if it is not supported */
6 #ifdef USE_NETCODE
7 # define WITH_BACKGROUND
8 #endif
10 /* Used for parent/child communication. These are numbers that
11 * could not possible be a routine address.
13 enum {
14 MSG_CHILD_EXITING
17 enum ReturnType {
18 Return_String,
19 Return_Integer
22 enum TaskState {
23 Task_Running,
24 Task_Stopped
27 typedef struct TaskList {
28 int fd;
29 pid_t pid;
30 int state;
31 char *info;
32 struct TaskList *next;
33 } TaskList;
35 extern struct TaskList *task_list;
37 extern int background_wait;
39 int do_background (FileOpContext *ctx, char *info);
40 void tell_parent (int msg);
41 int parent_call (void *routine, FileOpContext *ctx, int argc, ...);
43 void unregister_task_running (pid_t, int fd);
45 /* stubs */
46 void message_1s (int flags, char *title, char *str1);
47 void message_2s (int flags, char *title, char *str1, char *str2);
48 void message_3s (int flags, char *title, char *str1, char *str2, const char *str3);
49 void message_1s1d (int flags, char *title, char *str, int d);
51 #endif