| 1 | #ifndef PUTTY_UNIX_H |
| 2 | #define PUTTY_UNIX_H |
| 3 | |
| 4 | typedef void *Context; /* FIXME: probably needs changing */ |
| 5 | |
| 6 | extern Backend pty_backend; |
| 7 | |
| 8 | /* |
| 9 | * Under GTK, we send MA_CLICK _and_ MA_2CLK, or MA_CLICK _and_ |
| 10 | * MA_3CLK, when a button is pressed for the second or third time. |
| 11 | */ |
| 12 | #define MULTICLICK_ONLY_EVENT 0 |
| 13 | |
| 14 | /* |
| 15 | * Under X, selection data must not be NUL-terminated. |
| 16 | */ |
| 17 | #define SELECTION_NUL_TERMINATED 0 |
| 18 | |
| 19 | /* |
| 20 | * Under X, copying to the clipboard terminates lines with just LF. |
| 21 | */ |
| 22 | #define SEL_NL { 10 } |
| 23 | |
| 24 | /* Simple wraparound timer function */ |
| 25 | unsigned long getticks(void); /* based on gettimeofday(2) */ |
| 26 | #define GETTICKCOUNT getticks |
| 27 | #define TICKSPERSEC 1000000 /* gettimeofday returns microseconds */ |
| 28 | #define CURSORBLINK 450000 /* no standard way to set this */ |
| 29 | |
| 30 | #define WCHAR wchar_t |
| 31 | #define BYTE unsigned char |
| 32 | |
| 33 | GLOBAL void *logctx; |
| 34 | |
| 35 | /* Things pty.c needs from pterm.c */ |
| 36 | char *get_x_display(void *frontend); |
| 37 | int font_dimension(void *frontend, int which);/* 0 for width, 1 for height */ |
| 38 | |
| 39 | /* Things uxstore.c needs from pterm.c */ |
| 40 | char *x_get_default(char *key); |
| 41 | |
| 42 | /* Things uxstore.c provides to pterm.c */ |
| 43 | void provide_xrm_string(char *string); |
| 44 | |
| 45 | /* Things uxnet.c provides to the front end */ |
| 46 | int select_result(int fd, int event); |
| 47 | int first_socket(int *state, int *rwx); |
| 48 | int next_socket(int *state, int *rwx); |
| 49 | |
| 50 | #define DEFAULT_CODEPAGE 0 /* FIXME: no idea how to do this */ |
| 51 | |
| 52 | #define strnicmp strncasecmp |
| 53 | #define stricmp strcasecmp |
| 54 | |
| 55 | /* BSD-semantics version of signal() */ |
| 56 | void (*putty_signal(int sig, void (*func)(int)))(int); |
| 57 | |
| 58 | #endif |