4 #include <stdio.h> /* for FILENAME_MAX */
8 char path[FILENAME_MAX];
10 #define f_open(filename, mode) ( fopen((filename).path, (mode)) )
16 typedef void *Context; /* FIXME: probably needs changing */
18 extern Backend pty_backend;
21 * Under GTK, we send MA_CLICK _and_ MA_2CLK, or MA_CLICK _and_
22 * MA_3CLK, when a button is pressed for the second or third time.
24 #define MULTICLICK_ONLY_EVENT 0
27 * Under GTK, there is no context help available.
29 #define HELPCTX(x) P(NULL)
30 #define FILTER_KEY_FILES NULL /* FIXME */
33 * Under X, selection data must not be NUL-terminated.
35 #define SELECTION_NUL_TERMINATED 0
38 * Under X, copying to the clipboard terminates lines with just LF.
42 /* Simple wraparound timer function */
43 unsigned long getticks(void); /* based on gettimeofday(2) */
44 #define GETTICKCOUNT getticks
45 #define TICKSPERSEC 1000000 /* gettimeofday returns microseconds */
46 #define CURSORBLINK 450000 /* no standard way to set this */
49 #define BYTE unsigned char
53 /* Things pty.c needs from pterm.c */
54 char *get_x_display(void *frontend);
55 int font_dimension(void *frontend, int which);/* 0 for width, 1 for height */
56 long get_windowid(void *frontend);
58 /* Things uxstore.c needs from pterm.c */
59 char *x_get_default(const char *key);
61 /* Things uxstore.c provides to pterm.c */
62 void provide_xrm_string(char *string);
64 /* The interface used by uxsel.c */
65 void uxsel_init(void);
66 typedef int (*uxsel_callback_fn)(int fd, int event);
67 void uxsel_set(int fd, int rwx, uxsel_callback_fn callback);
68 void uxsel_del(int fd);
69 int select_result(int fd, int event);
70 int first_fd(int *state, int *rwx);
71 int next_fd(int *state, int *rwx);
75 void unix_setup_config_box(struct controlbox *b, int midsession);
78 * In the Unix Unicode layer, DEFAULT_CODEPAGE is a special value
79 * which causes mb_to_wc and wc_to_mb to call _libc_ rather than
80 * libcharset. That way, we can interface the various charsets
81 * supported by libcharset with the one supported by mbstowcs and
82 * wcstombs (which will be the character set in which stuff read
83 * from the command line or config files is assumed to be encoded).
85 #define DEFAULT_CODEPAGE 0xFFFF
86 #define CP_UTF8 CS_UTF8 /* from libcharset */
88 #define strnicmp strncasecmp
89 #define stricmp strcasecmp
91 /* BSD-semantics version of signal() */
92 void (*putty_signal(int sig, void (*func)(int)))(int);
95 * Exports from unicode.c.
98 int init_ucs(struct unicode_data *ucsdata,
99 char *line_codepage, int font_charset);
102 * Spare function exported directly from uxnet.c.
104 int sk_getxdmdata(void *sock, unsigned long *ip, int *port);