diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 20:18:39 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 20:18:39 +0000 |
commit | fff5217f02d91268ce90c8c05665602c059faaef (patch) | |
tree | 2ba24d32dc96eafe7ed0a85269548e76796d849d /src/fe-common/core/fe-exec.h | |
parent | Initial commit. (diff) | |
download | irssi-fff5217f02d91268ce90c8c05665602c059faaef.tar.xz irssi-fff5217f02d91268ce90c8c05665602c059faaef.zip |
Adding upstream version 1.4.5.upstream/1.4.5upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/fe-common/core/fe-exec.h')
-rw-r--r-- | src/fe-common/core/fe-exec.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/fe-common/core/fe-exec.h b/src/fe-common/core/fe-exec.h new file mode 100644 index 0000000..824d3d8 --- /dev/null +++ b/src/fe-common/core/fe-exec.h @@ -0,0 +1,52 @@ +#ifndef IRSSI_FE_COMMON_CORE_FE_EXEC_H +#define IRSSI_FE_COMMON_CORE_FE_EXEC_H + +#include <irssi/src/fe-common/core/fe-windows.h> + +#define EXEC_WI(query) \ + MODULE_CHECK_CAST_MODULE(query, EXEC_WI_REC, type, \ + "WINDOW ITEM TYPE", "EXEC") + +#define IS_EXEC_WI(query) \ + (EXEC_WI(query) ? TRUE : FALSE) + +typedef struct PROCESS_REC PROCESS_REC; + +#define STRUCT_SERVER_REC void +typedef struct { +#include <irssi/src/core/window-item-rec.h> + PROCESS_REC *process; + unsigned int destroying:1; +} EXEC_WI_REC; + +struct PROCESS_REC { + int id; + char *name; + char *args; + + int pid; + GIOChannel *in; + NET_SENDBUF_REC *out; + LINEBUF_REC *databuf; + int read_tag; + + int level; /* what level to use when printing the text */ + char *target; /* send text with /msg <target> ... */ + char *target_server; + WINDOW_REC *target_win; /* print text to this window */ + EXEC_WI_REC *target_item; /* print text to this exec window item */ + + unsigned int shell:1; /* start the program via /bin/sh */ + unsigned int notice:1; /* send text with /notice, not /msg if target is set */ + unsigned int silent:1; /* don't print "process exited with level xx" */ + unsigned int quiet:1; /* don't print process output at all */ + unsigned int target_channel:1; /* target is a channel */ + unsigned int target_nick:1; /* target is a nick */ +}; + +extern GSList *processes; + +void fe_exec_init(void); +void fe_exec_deinit(void); + +#endif |