mirror of
https://github.com/tmux/tmux.git
synced 2026-08-03 14:08:59 +00:00
Change time return.
This commit is contained in:
@@ -28,25 +28,25 @@
|
||||
|
||||
/* Event payload item. */
|
||||
struct event_payload_item {
|
||||
char *name;
|
||||
enum event_payload_type type;
|
||||
char *name;
|
||||
enum event_payload_type type;
|
||||
|
||||
union {
|
||||
char *string;
|
||||
time_t time;
|
||||
struct client *client;
|
||||
struct session *session;
|
||||
struct window *window;
|
||||
u_int pane;
|
||||
char *string;
|
||||
time_t time;
|
||||
struct client *client;
|
||||
struct session *session;
|
||||
struct window *window;
|
||||
u_int pane;
|
||||
struct {
|
||||
u_int session;
|
||||
u_int window;
|
||||
int idx;
|
||||
u_int session;
|
||||
u_int window;
|
||||
int idx;
|
||||
} winlink;
|
||||
struct {
|
||||
void *ptr;
|
||||
event_payload_free_cb free_cb;
|
||||
event_payload_print_cb print_cb;
|
||||
void *ptr;
|
||||
event_payload_free_cb free_cb;
|
||||
event_payload_print_cb print_cb;
|
||||
} pointer;
|
||||
};
|
||||
|
||||
@@ -412,17 +412,15 @@ event_payload_log(struct event_payload *ep, const char *fmt, ...)
|
||||
}
|
||||
|
||||
/* Get a time item. */
|
||||
int
|
||||
event_payload_get_time(struct event_payload *ep, const char *name,
|
||||
time_t *value)
|
||||
time_t
|
||||
event_payload_get_time(struct event_payload *ep, const char *name)
|
||||
{
|
||||
struct event_payload_item *epi;
|
||||
|
||||
epi = event_payload_find(ep, name);
|
||||
if (epi == NULL || epi->type != EVENT_PAYLOAD_TIME)
|
||||
return (0);
|
||||
*value = epi->time;
|
||||
return (1);
|
||||
return (epi->time);
|
||||
}
|
||||
|
||||
/* Get a client item. */
|
||||
|
||||
25
tmux.h
25
tmux.h
@@ -2686,29 +2686,22 @@ void event_payload_set_pane(struct event_payload *, const char *,
|
||||
struct window_pane *);
|
||||
void event_payload_set_winlink(struct event_payload *, const char *,
|
||||
struct winlink *);
|
||||
void event_payload_set_pointer(struct event_payload *, const char *,
|
||||
void *, event_payload_free_cb, event_payload_print_cb);
|
||||
const char *event_payload_get_string(struct event_payload *,
|
||||
const char *);
|
||||
void event_payload_set_pointer(struct event_payload *, const char *, void *,
|
||||
event_payload_free_cb, event_payload_print_cb);
|
||||
const char *event_payload_get_string(struct event_payload *, const char *);
|
||||
char *event_payload_print(struct event_payload *, const char *);
|
||||
struct event_payload_item *event_payload_first(struct event_payload *);
|
||||
struct event_payload_item *event_payload_next(struct event_payload_item *);
|
||||
const char *event_payload_item_name(struct event_payload_item *);
|
||||
enum event_payload_type event_payload_item_type(struct event_payload_item *);
|
||||
int event_payload_get_time(struct event_payload *, const char *,
|
||||
time_t *);
|
||||
struct client *event_payload_get_client(struct event_payload *,
|
||||
const char *);
|
||||
struct session *event_payload_get_session(struct event_payload *,
|
||||
const char *);
|
||||
struct window *event_payload_get_window(struct event_payload *,
|
||||
const char *);
|
||||
time_t event_payload_get_time(struct event_payload *, const char *);
|
||||
struct client *event_payload_get_client(struct event_payload *, const char *);
|
||||
struct session *event_payload_get_session(struct event_payload *, const char *);
|
||||
struct window *event_payload_get_window(struct event_payload *, const char *);
|
||||
struct window_pane *event_payload_get_pane(struct event_payload *,
|
||||
const char *);
|
||||
struct winlink *event_payload_get_winlink(struct event_payload *,
|
||||
const char *);
|
||||
void *event_payload_get_pointer(struct event_payload *,
|
||||
const char *);
|
||||
struct winlink *event_payload_get_winlink(struct event_payload *, const char *);
|
||||
void *event_payload_get_pointer(struct event_payload *, const char *);
|
||||
|
||||
/* events.c */
|
||||
typedef void (*events_cb)(const char *, struct event_payload *, void *);
|
||||
|
||||
Reference in New Issue
Block a user