aboutsummaryrefslogtreecommitdiff
path: root/tmux.h
diff options
context:
space:
mode:
Diffstat (limited to 'tmux.h')
-rw-r--r--tmux.h33
1 files changed, 19 insertions, 14 deletions
diff --git a/tmux.h b/tmux.h
index b84ba3cf..4b3385c6 100644
--- a/tmux.h
+++ b/tmux.h
@@ -592,6 +592,10 @@ struct hook {
};
/* Scheduled job. */
+struct job;
+typedef void (*job_update_cb) (struct job *);
+typedef void (*job_complete_cb) (struct job *);
+typedef void (*job_free_cb) (void *);
struct job {
enum {
JOB_RUNNING,
@@ -599,18 +603,19 @@ struct job {
JOB_CLOSED
} state;
- char *cmd;
- pid_t pid;
- int status;
+ char *cmd;
+ pid_t pid;
+ int status;
- int fd;
- struct bufferevent *event;
+ int fd;
+ struct bufferevent *event;
- void (*callbackfn)(struct job *);
- void (*freefn)(void *);
- void *data;
+ job_update_cb updatecb;
+ job_complete_cb completecb;
+ job_free_cb freecb;
+ void *data;
- LIST_ENTRY(job) lentry;
+ LIST_ENTRY(job) entry;
};
LIST_HEAD(joblist, job);
@@ -1605,10 +1610,10 @@ extern const struct options_table_entry options_table[];
/* job.c */
extern struct joblist all_jobs;
-struct job *job_run(const char *, struct session *, const char *,
- void (*)(struct job *), void (*)(void *), void *);
-void job_free(struct job *);
-void job_died(struct job *, int);
+struct job *job_run(const char *, struct session *, const char *,
+ job_update_cb, job_complete_cb, job_free_cb, void *);
+void job_free(struct job *);
+void job_died(struct job *, int);
/* environ.c */
struct environ *environ_create(void);
@@ -2119,7 +2124,7 @@ int window_pane_outside(struct window_pane *);
int window_pane_visible(struct window_pane *);
char *window_pane_search(struct window_pane *, const char *,
u_int *);
-char *window_printable_flags(struct session *, struct winlink *);
+const char *window_printable_flags(struct winlink *);
struct window_pane *window_pane_find_up(struct window_pane *);
struct window_pane *window_pane_find_down(struct window_pane *);
struct window_pane *window_pane_find_left(struct window_pane *);