2005-09-15 09:58:31 -04:00
|
|
|
#ifndef EL__OSDEP_OSDEP_H
|
|
|
|
#define EL__OSDEP_OSDEP_H
|
|
|
|
|
|
|
|
#include "osdep/beos/beos.h"
|
2022-05-09 12:53:36 -04:00
|
|
|
#include "osdep/dos/dos.h"
|
2005-09-15 09:58:31 -04:00
|
|
|
#include "osdep/os2/os2.h"
|
|
|
|
#include "osdep/riscos/riscos.h"
|
|
|
|
#include "osdep/unix/unix.h"
|
|
|
|
#include "osdep/win32/win32.h"
|
|
|
|
|
2020-10-05 14:14:55 -04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2006-07-02 10:30:41 -04:00
|
|
|
#ifndef CHAR_DIR_SEP
|
|
|
|
#define CHAR_DIR_SEP '/'
|
|
|
|
#endif
|
|
|
|
|
2006-07-02 02:44:52 -04:00
|
|
|
#ifndef STRING_DIR_SEP
|
|
|
|
#define STRING_DIR_SEP "/"
|
|
|
|
#endif
|
|
|
|
|
2005-09-15 09:58:31 -04:00
|
|
|
int get_system_env(void);
|
2022-02-17 15:28:45 -05:00
|
|
|
int get_e(const char *env);
|
2005-09-15 09:58:31 -04:00
|
|
|
int is_xterm(void);
|
|
|
|
int is_twterm(void);
|
|
|
|
void get_terminal_size(int, int *, int *);
|
|
|
|
void handle_terminal_resize(int, void (*)(void));
|
|
|
|
void unhandle_terminal_resize(int);
|
|
|
|
void set_bin(int);
|
|
|
|
int c_pipe(int *);
|
|
|
|
int get_input_handle(void);
|
|
|
|
int get_output_handle(void);
|
|
|
|
int get_ctl_handle(void);
|
|
|
|
void want_draw(void);
|
|
|
|
void done_draw(void);
|
|
|
|
void init_osdep(void);
|
|
|
|
void terminate_osdep(void);
|
2021-01-02 10:20:27 -05:00
|
|
|
void *handle_mouse(int, void (*)(void *, char *, int), void *);
|
2005-09-15 09:58:31 -04:00
|
|
|
void unhandle_mouse(void *);
|
|
|
|
void suspend_mouse(void *);
|
|
|
|
void resume_mouse(void *);
|
|
|
|
int start_thread(void (*)(void *, int), void *, int);
|
2021-01-02 10:20:27 -05:00
|
|
|
char *get_clipboard_text(void);
|
|
|
|
void set_clipboard_text(char *);
|
2022-01-30 12:12:38 -05:00
|
|
|
void set_window_title(const char *, int codepage);
|
2021-01-02 10:20:27 -05:00
|
|
|
char *get_window_title(int codepage);
|
2005-09-15 09:58:31 -04:00
|
|
|
void block_stdin(void);
|
|
|
|
void unblock_stdin(void);
|
2021-01-02 10:20:27 -05:00
|
|
|
int exe(char *);
|
2021-03-19 19:49:56 -04:00
|
|
|
int exe_no_stdin(char *);
|
2005-09-15 09:58:31 -04:00
|
|
|
int resize_window(int, int, int, int);
|
|
|
|
int can_resize_window(int);
|
|
|
|
int can_open_os_shell(int);
|
|
|
|
void set_highpri(void);
|
2022-04-22 15:47:52 -04:00
|
|
|
#ifndef WIN32
|
2022-02-21 10:49:59 -05:00
|
|
|
char *tempname(const char *dir, const char *pfx, char *suff);
|
2022-04-22 15:47:52 -04:00
|
|
|
#endif
|
2005-09-15 09:58:31 -04:00
|
|
|
|
|
|
|
#ifdef USE_OPEN_PREALLOC
|
|
|
|
int open_prealloc(char *, int, int, off_t);
|
|
|
|
void prealloc_truncate(int, off_t);
|
|
|
|
#else
|
|
|
|
static inline void prealloc_truncate(int x, int y) { }
|
|
|
|
#endif
|
|
|
|
|
2022-02-21 10:41:48 -05:00
|
|
|
const char *get_system_str(int);
|
2005-09-15 09:58:31 -04:00
|
|
|
|
|
|
|
int set_nonblocking_fd(int);
|
|
|
|
int set_blocking_fd(int);
|
|
|
|
void set_ip_tos_throughput(int socket);
|
|
|
|
|
2021-01-02 10:20:27 -05:00
|
|
|
char *get_cwd(void);
|
|
|
|
void set_cwd(char *);
|
2005-09-15 09:58:31 -04:00
|
|
|
|
2022-02-20 07:52:47 -05:00
|
|
|
const char *get_shell(void);
|
2005-09-15 09:58:31 -04:00
|
|
|
|
2020-10-05 14:14:55 -04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2005-09-15 09:58:31 -04:00
|
|
|
#ifdef HAVE_TERMIOS_H
|
|
|
|
#include <termios.h>
|
|
|
|
#endif
|
|
|
|
|
2020-10-05 14:14:55 -04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2005-09-15 09:58:31 -04:00
|
|
|
/* We define own cfmakeraw() wrapper because cfmakeraw() is broken on AIX,
|
|
|
|
* thus we fix it right away. We can also emulate cfmakeraw() if it is not
|
|
|
|
* available at all. Face it, we are just cool. */
|
|
|
|
void elinks_cfmakeraw(struct termios *t);
|
|
|
|
|
2007-07-17 17:27:08 -04:00
|
|
|
#ifndef user_appdata_directory
|
|
|
|
#define user_appdata_directory() NULL
|
|
|
|
#endif
|
|
|
|
|
2020-10-05 14:14:55 -04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2005-09-15 09:58:31 -04:00
|
|
|
#endif
|