1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-03 20:42:48 -05:00

Change uxsel_input_add's return type from int to pointer.

In case a front end needs to store more than an integer id to be
returned to uxsel_input_remove, we now return a pointer to a
frontend-defined structure.
This commit is contained in:
Simon Tatham
2015-08-16 12:50:46 +01:00
parent 0413cc856c
commit b5423b51d4
6 changed files with 25 additions and 14 deletions

View File

@ -118,6 +118,7 @@ void premsg(struct termios *);
void postmsg(struct termios *);
/* The interface used by uxsel.c */
typedef struct uxsel_id uxsel_id;
void uxsel_init(void);
typedef int (*uxsel_callback_fn)(int fd, int event);
void uxsel_set(int fd, int rwx, uxsel_callback_fn callback);
@ -126,8 +127,8 @@ int select_result(int fd, int event);
int first_fd(int *state, int *rwx);
int next_fd(int *state, int *rwx);
/* The following are expected to be provided _to_ uxsel.c by the frontend */
int uxsel_input_add(int fd, int rwx); /* returns an id */
void uxsel_input_remove(int id);
uxsel_id *uxsel_input_add(int fd, int rwx); /* returns an id */
void uxsel_input_remove(uxsel_id *id);
/* uxcfg.c */
struct controlbox;