mirror of
https://github.com/irssi/irssi.git
synced 2026-08-11 04:43:34 +02:00
Added PROCESS_REC to fe-exec.h and perl support for it. "exec new" and
"exec remove" sends PROCESS_REC as first argument. Added "exec input" signal to perl. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1212 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
ea4dea38c0
commit
f4aef7c706
4 changed files with 70 additions and 40 deletions
45
src/fe-common/core/fe-exec.h
Normal file
45
src/fe-common/core/fe-exec.h
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
#ifndef __FE_EXEC_H
|
||||
#define __FE_EXEC_H
|
||||
|
||||
#include "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 "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;
|
||||
|
||||
char *target; /* send text with /msg <target> ... */
|
||||
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" */
|
||||
};
|
||||
|
||||
void fe_exec_init(void);
|
||||
void fe_exec_deinit(void);
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue