Fixup update of command line after window resize.
[midnight-commander.git] / src / background.h
blobcf5daac1901871b2beace4be2ac657cbadd5820c
1 /** \file background.h
2 * \brief Header: Background support
3 */
5 #ifndef MC__BACKGROUND_H
6 #define MC__BACKGROUND_H
8 #ifdef WITH_BACKGROUND
10 #include <sys/types.h> /* pid_t */
12 /*** typedefs(not structures) and defined constants **********************************************/
14 enum TaskState
16 Task_Running,
17 Task_Stopped
20 typedef struct TaskList
22 int fd;
23 int to_child_fd;
24 pid_t pid;
25 int state;
26 char *info;
27 struct TaskList *next;
28 } TaskList;
30 struct FileOpContext;
32 /*** enums ***************************************************************************************/
34 /*** structures declarations (and typedefs of structures)*****************************************/
36 /*** global variables defined in .c file *********************************************************/
38 extern struct TaskList *task_list;
40 /*** declarations of public functions ************************************************************/
42 int do_background (struct FileOpContext *ctx, char *info);
43 int parent_call (void *routine, struct FileOpContext *ctx, int argc, ...);
44 char *parent_call_string (void *routine, int argc, ...);
46 void unregister_task_running (pid_t pid, int fd);
47 void unregister_task_with_pid (pid_t pid);
49 gboolean background_parent_call (const gchar * event_group_name, const gchar * event_name,
50 gpointer init_data, gpointer data);
52 gboolean
53 background_parent_call_string (const gchar * event_group_name, const gchar * event_name,
54 gpointer init_data, gpointer data);
56 /*** inline functions ****************************************************************************/
58 #endif /* !WITH_BACKGROUND */
60 #endif /* MC__BACKGROUND_H */