Ibuffer: Erase output buffer before shell commands
[emacs.git] / src / msdos.h
blobf4312c5c86d7f066f3fae5771318cd5f6f65dcb7
1 /* MS-DOS specific C utilities, interface.
2 Copyright (C) 1993, 2001-2017 Free Software Foundation, Inc.
4 This file is part of GNU Emacs.
6 GNU Emacs is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or (at
9 your option) any later version.
11 GNU Emacs is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
19 #ifndef EMACS_MSDOS_H
20 #define EMACS_MSDOS_H
22 #include <dpmi.h>
24 int dos_ttraw (struct tty_display_info *);
25 int dos_ttcooked (void);
26 int dos_get_saved_screen (char **, int *, int *);
27 int dos_set_keyboard (int, int);
28 void dos_set_window_size (int *, int *);
30 int getdefdir (int, char*);
31 void unixtodos_filename (char *);
32 void dostounix_filename (char *);
33 char *rootrelativepath (char *);
34 void init_environment (int, char **, int);
35 void internal_terminal_init (void);
36 void initialize_msdos_display (struct terminal *);
38 extern int have_mouse;
39 void mouse_init (void);
40 void mouse_on (void);
41 void mouse_off (void);
42 void mouse_moveto (int, int);
44 void IT_set_frame_parameters (struct frame *, Lisp_Object);
46 #include <sys/types.h>
47 #include <sys/stat.h>
48 #include <pc.h>
49 #include <signal.h>
51 #if __DJGPP__ == 2 && __DJGPP_MINOR__ < 4
52 int readlink (const char *, char *, size_t);
53 #endif
54 ssize_t readlinkat (int, const char *, char *, size_t);
55 int fstatat (int, char const *, struct stat *, int);
56 int unsetenv (const char *);
57 int faccessat (int, const char *, int, int);
58 void msdos_fatal_signal (int);
59 void syms_of_msdos (void);
60 int pthread_sigmask (int, const sigset_t *, sigset_t *);
61 int dos_keysns (void);
62 int dos_keyread (void);
63 int run_msdos_command (char **, const char *, int, int, int, char **);
65 void syms_of_win16select (void);
68 /* Constants. */
69 #define EINPROGRESS 112
70 /* Gnulib sets O_CLOEXEC to O_NOINHERIT, which gets in the way when we
71 need to redirect standard handles for subprocesses using temporary
72 files created by mkostemp, see callproc.c. */
73 #ifdef O_CLOEXEC
74 # undef O_CLOEXEC
75 #endif
76 #define O_CLOEXEC 0
79 #ifndef HAVE_X_WINDOWS
80 /* Dummy types. */
81 typedef int XFontStruct;
82 typedef int GC;
83 typedef int Pixmap;
84 typedef int Display;
85 typedef int Window;
86 typedef int XRectangle;
87 #define PIX_TYPE unsigned long
88 #define XDISPLAY
90 typedef struct tty_display_info Display_Info;
92 extern struct tty_display_info the_only_display_info;
94 #define FRAME_X_DISPLAY(f) ((Display *) 0)
95 #define FRAME_FONT(f) ((f)->output_data.tty->font)
96 #define FRAME_DISPLAY_INFO(f) (&the_only_display_info)
98 /* Prototypes. */
100 /* Forward declarations for prototypes. */
101 struct frame;
102 struct window;
104 /* Defined in xfns.c; emulated on msdos.c */
106 extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
108 #define XFreeGC (void)
109 #define x_destroy_bitmap(p1,p2)
110 #define XGetGeometry(p1,p2,p3,p4,p5,p6,p7,p8,p9)
111 #define DisplayWidth(p1,p2) (SELECTED_FRAME()->text_cols)
112 #define DisplayHeight(p1,p2) (SELECTED_FRAME()->text_lines)
113 #define XMenuSetAEQ (void)
114 #define XMenuSetFreeze (void)
115 #define XMenuRecompute (void)
116 #define XM_FAILURE -1
117 #define XM_SUCCESS 1
118 #define XM_NO_SELECT 2
119 #define XM_IA_SELECT 3
120 #define ButtonReleaseMask 0
122 typedef struct x_menu_struct
124 int count;
125 char **text;
126 struct x_menu_struct **submenu;
127 int *panenumber; /* Also used as enable. */
128 int allocated;
129 int panecount;
130 int width;
131 const char **help_text;
132 } XMenu;
134 XMenu *XMenuCreate (Display *, Window, char *);
135 int XMenuAddPane (Display *, XMenu *, char const *, int);
136 int XMenuAddSelection (Display *, XMenu *, int, int, char *, int, char const *);
137 void XMenuLocate (Display *, XMenu *, int, int, int, int,
138 int *, int *, int *, int *);
139 int XMenuActivate (Display *, XMenu *, int *, int *, int, int, unsigned,
140 char **, void (*callback)(char const *, int, int));
141 void XMenuDestroy (Display *, XMenu *);
143 #endif /* not HAVE_X_WINDOWS */
145 #endif /* not EMACS_MSDOS_H */