First attempt at a Unix port of Plink. Seems to basically work;
[u/mdw/putty] / unix / unix.h
CommitLineData
f7f27309 1#ifndef PUTTY_UNIX_H
2#define PUTTY_UNIX_H
3
4typedef void *Context; /* FIXME: probably needs changing */
5
1709795f 6extern Backend pty_backend;
7
e6346999 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
0f351587 19/*
20 * Under X, copying to the clipboard terminates lines with just LF.
21 */
22#define SEL_NL { 10 }
23
f7f27309 24/* Simple wraparound timer function */
25unsigned long getticks(void); /* based on gettimeofday(2) */
26#define GETTICKCOUNT getticks
27#define TICKSPERSEC 1000000 /* gettimeofday returns microseconds */
215a9fd9 28#define CURSORBLINK 450000 /* no standard way to set this */
f7f27309 29
30#define WCHAR wchar_t
31#define BYTE unsigned char
32
e9aef757 33/* Things pty.c needs from pterm.c */
a8327734 34char *get_x_display(void *frontend);
35int font_dimension(void *frontend, int which);/* 0 for width, 1 for height */
755a6d84 36
faec60ed 37/* Things uxstore.c needs from pterm.c */
c5e438ec 38char *x_get_default(char *key);
faec60ed 39
0ac15bdc 40/* Things uxstore.c provides to pterm.c */
41void provide_xrm_string(char *string);
42
c5e438ec 43/* Things uxnet.c provides to the front end */
44int select_result(int fd, int event);
45int first_socket(int *state, int *rwx);
46int next_socket(int *state, int *rwx);
47
f7f27309 48#define DEFAULT_CODEPAGE 0 /* FIXME: no idea how to do this */
49
68a49acb 50#define strnicmp strncasecmp
51#define stricmp strcasecmp
52
f7f27309 53#endif