
* src/complete.c: obsolete hack for OS/2 and NT removed. Completion works for NT now (not very good) * src/main.c: HOME variable is respected by NT and OS/2 versions. If it is missing, we use LIBDIR on OS2_NT and "/" on Unix. * src/key.h: SHIFT_PRESSED is set to 0x0010 on NT. This value doesn't conflict with definitions for ALT and CTRL, but it is SDK-compatible. * vfs/vfs.h: Minor changes for OS/2. EMX defines mkdir with 2 arguments * vfs/tcputil,c, vfs/utilvfs.c: signal.h was includes twice. * vfs/Makefile.in: undelfs.h is not used and should disapper * slang/slos2tty.c: new file, copied from SLang-0.99.38, needed for OS/2 port * slang/Makefile.in: added slos2tty.c * vfs/extfs/README: annoying spell errors corrected * src/main.c: --termcap disabled for OS2_NT because it doesn't (and cannot) work. ARCH_FLAGS is not needed anymore. * src/text.c: most includes removed. Added a warning is someone compiles this file with HAVE_X. Improved color scheme for consoles with 16 background colors (e.g. OS/2). Hack for OS/2 removed. * src/util.c, src/util.h: STRCOMP and MC_ARCH_FLAGS are moved to util.h. It may be useful to use them for filenames' completion on OS2_NT
86 строки
1.9 KiB
C
86 строки
1.9 KiB
C
#ifndef __KEY_H
|
|
#define __KEY_H
|
|
|
|
void init_key (void);
|
|
void init_key_input_fd (void);
|
|
void done_key (void);
|
|
int get_event (Gpm_Event *event, int redo_event, int block);
|
|
int is_idle (void);
|
|
int ctrl_pressed ();
|
|
|
|
#ifndef PORT_HAS_GETCH
|
|
int mi_getch (void);
|
|
#endif
|
|
/* Possible return values from get_event: */
|
|
#define EV_MOUSE -2
|
|
#define EV_NONE -1
|
|
|
|
/* Used to get the modifier information */
|
|
/* Currently, it just works on the Linux console */
|
|
#ifdef _OS_NT
|
|
# ifndef SHIFT_PRESSED
|
|
# define SHIFT_PRESSED 0x0010
|
|
# endif
|
|
#else
|
|
# define SHIFT_PRESSED 1
|
|
#endif
|
|
#define ALTR_PRESSED 2
|
|
#define CONTROL_PRESSED 4
|
|
#define ALTL_PRESSED 8
|
|
int get_modifier ();
|
|
|
|
extern int double_click_speed;
|
|
extern int old_esc_mode;
|
|
extern int irix_fn_keys;
|
|
extern int use_8th_bit_as_meta;
|
|
|
|
/* While waiting for input, the program can select on more than one file */
|
|
|
|
typedef int (*select_fn)(int fd, void *info);
|
|
|
|
/* Channel manipulation */
|
|
void add_select_channel (int fd, select_fn callback, void *info);
|
|
void delete_select_channel (int fd);
|
|
void remove_select_channel (int fd);
|
|
|
|
/* Activate/deactivate the channel checking */
|
|
void channels_up (void);
|
|
void channels_down (void);
|
|
|
|
/* Abort/Quit chars */
|
|
int is_abort_char (int c);
|
|
int is_quit_char (int c);
|
|
|
|
#define XCTRL(x) ((x) & 31)
|
|
#define ALT(x) (0x200 | (x))
|
|
|
|
/* To define sequences and return codes */
|
|
#define MCKEY_NOACTION 0
|
|
#define MCKEY_ESCAPE 1
|
|
|
|
/* Return code for the mouse sequence */
|
|
#define MCKEY_MOUSE -2
|
|
|
|
void do_define_key (int code, char *strcap);
|
|
void define_sequence (int code, char *seq, int action);
|
|
|
|
/* Learn a single key */
|
|
char *learn_key (void);
|
|
|
|
/* Returns a key code (interpreted) */
|
|
int get_key_code (int nodelay);
|
|
|
|
typedef struct {
|
|
int code;
|
|
char *name;
|
|
char *longname;
|
|
} key_code_name_t;
|
|
|
|
extern key_code_name_t key_name_conv_tab [];
|
|
extern int we_are_background;
|
|
|
|
#ifdef HAVE_GNOME
|
|
#endif
|
|
|
|
#endif /* __KEY_H */
|