aboutsummaryrefslogtreecommitdiff
path: root/tmux.h
diff options
context:
space:
mode:
Diffstat (limited to 'tmux.h')
-rw-r--r--tmux.h33
1 files changed, 16 insertions, 17 deletions
diff --git a/tmux.h b/tmux.h
index ff87f502..5ac3c172 100644
--- a/tmux.h
+++ b/tmux.h
@@ -671,8 +671,6 @@ struct job {
pid_t pid;
int status;
- struct client *client;
-
int fd;
struct bufferevent *event;
@@ -680,13 +678,8 @@ struct job {
void (*freefn)(void *);
void *data;
- int flags;
-#define JOB_PERSIST 0x1 /* don't free after callback */
-
- RB_ENTRY(job) entry;
LIST_ENTRY(job) lentry;
};
-RB_HEAD(jobs, job);
LIST_HEAD(joblist, job);
/* Screen selection. */
@@ -1091,6 +1084,15 @@ struct message_entry {
time_t msg_time;
};
+/* Status output data from a job. */
+struct status_out {
+ char *cmd;
+ char *out;
+
+ RB_ENTRY(status_out) entry;
+};
+RB_HEAD(status_out_tree, status_out);
+
/* Client connection. */
struct client {
struct imsgbuf ibuf;
@@ -1120,8 +1122,9 @@ struct client {
struct event repeat_timer;
+ struct status_out_tree status_old;
+ struct status_out_tree status_new;
struct timeval status_timer;
- struct jobs status_jobs;
struct screen status;
#define CLIENT_TERMINAL 0x1
@@ -1363,18 +1366,10 @@ const char *options_table_print_entry(
/* job.c */
extern struct joblist all_jobs;
-int job_cmp(struct job *, struct job *);
-RB_PROTOTYPE(jobs, job, entry, job_cmp);
-void job_tree_init(struct jobs *);
-void job_tree_free(struct jobs *);
-struct job *job_get(struct jobs *, const char *);
-struct job *job_add(struct jobs *, int, struct client *,
+struct job *job_run(
const char *, void (*)(struct job *), void (*)(void *), void *);
-void job_remove(struct jobs *, struct job *);
void job_free(struct job *);
-int job_run(struct job *);
void job_died(struct job *, int);
-void job_kill(struct job *);
/* environ.c */
int environ_cmp(struct environ_entry *, struct environ_entry *);
@@ -1660,6 +1655,10 @@ void server_clear_identify(struct client *);
void server_update_event(struct client *);
/* status.c */
+int status_out_cmp(struct status_out *, struct status_out *);
+RB_PROTOTYPE(status_out_tree, status_out, entry, status_out_cmp);
+void status_free_jobs(struct status_out_tree *);
+void status_update_jobs(struct client *);
int status_redraw(struct client *);
char *status_replace(
struct client *, struct winlink *, const char *, time_t, int);