Yet another round of fixing the Emacs manual
[emacs.git] / src / msdos.h
blob6b91338f433e3036f676eecb75992d771fe36af2
1 /* MS-DOS specific C utilities, interface.
2 Copyright (C) 1993, 2001-2018 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 <https://www.gnu.org/licenses/>. */
19 #ifndef EMACS_MSDOS_H
20 #define EMACS_MSDOS_H
22 #include <dpmi.h>
24 #include "termhooks.h" /* struct terminal */
26 int dos_ttraw (struct tty_display_info *);
27 int dos_ttcooked (void);
28 int dos_get_saved_screen (char **, int *, int *);
29 int dos_set_keyboard (int, int);
30 void dos_set_window_size (int *, int *);
32 int getdefdir (int, char*);
33 void unixtodos_filename (char *);
34 void dostounix_filename (char *);
35 char *rootrelativepath (char *);
36 void init_environment (int, char **, int);
37 void internal_terminal_init (void);
38 void initialize_msdos_display (struct terminal *);
40 extern int have_mouse;
41 void mouse_init (void);
42 void mouse_on (void);
43 void mouse_off (void);
44 void mouse_moveto (int, int);
46 void IT_set_frame_parameters (struct frame *, Lisp_Object);
48 #include <sys/types.h>
49 #include <sys/stat.h>
50 #include <pc.h>
51 #include <signal.h>
53 #if __DJGPP__ == 2 && __DJGPP_MINOR__ < 4
54 int readlink (const char *, char *, size_t);
55 #endif
56 ssize_t readlinkat (int, const char *, char *, size_t);
57 int fstatat (int, char const *, struct stat *, int);
58 int unsetenv (const char *);
59 int faccessat (int, const char *, int, int);
60 void msdos_fatal_signal (int);
61 void syms_of_msdos (void);
62 int pthread_sigmask (int, const sigset_t *, sigset_t *);
63 int dos_keysns (void);
64 int dos_keyread (void);
65 int run_msdos_command (char **, const char *, int, int, int, char **);
67 void syms_of_win16select (void);
70 /* Constants. */
71 #define EINPROGRESS 112
72 #define ENOTSUP ENOSYS
73 /* Gnulib sets O_CLOEXEC to O_NOINHERIT, which gets in the way when we
74 need to redirect standard handles for subprocesses using temporary
75 files created by mkostemp, see callproc.c. */
76 #ifdef O_CLOEXEC
77 # undef O_CLOEXEC
78 #endif
79 #define O_CLOEXEC 0
82 #ifndef HAVE_X_WINDOWS
83 /* Dummy types. */
84 typedef int XFontStruct;
85 typedef int GC;
86 typedef int Pixmap;
87 typedef int Display;
88 typedef int Window;
89 typedef int XRectangle;
90 #define PIX_TYPE unsigned long
91 #define XDISPLAY
93 typedef struct tty_display_info Display_Info;
95 extern struct tty_display_info the_only_display_info;
97 #define FRAME_X_DISPLAY(f) ((Display *) 0)
98 #define FRAME_FONT(f) ((f)->output_data.tty->font)
99 #define FRAME_DISPLAY_INFO(f) (&the_only_display_info)
101 /* Prototypes. */
103 /* Forward declarations for prototypes. */
104 struct frame;
105 struct window;
107 /* Defined in xfns.c; emulated on msdos.c */
109 extern void x_set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object);
111 #define XFreeGC (void)
112 #define x_destroy_bitmap(p1,p2)
113 #define XGetGeometry(p1,p2,p3,p4,p5,p6,p7,p8,p9)
114 #define DisplayWidth(p1,p2) (SELECTED_FRAME()->text_cols)
115 #define DisplayHeight(p1,p2) (SELECTED_FRAME()->text_lines)
116 #define XMenuSetAEQ (void)
117 #define XMenuSetFreeze (void)
118 #define XMenuRecompute (void)
119 #define XM_FAILURE -1
120 #define XM_SUCCESS 1
121 #define XM_NO_SELECT 2
122 #define XM_IA_SELECT 3
123 #define ButtonReleaseMask 0
125 typedef struct x_menu_struct
127 int count;
128 char **text;
129 struct x_menu_struct **submenu;
130 int *panenumber; /* Also used as enable. */
131 int allocated;
132 int panecount;
133 int width;
134 const char **help_text;
135 } XMenu;
137 XMenu *XMenuCreate (Display *, Window, char *);
138 int XMenuAddPane (Display *, XMenu *, char const *, int);
139 int XMenuAddSelection (Display *, XMenu *, int, int, char *, int, char const *);
140 void XMenuLocate (Display *, XMenu *, int, int, int, int,
141 int *, int *, int *, int *);
142 int XMenuActivate (Display *, XMenu *, int *, int *, int, int, unsigned,
143 char **, void (*callback)(char const *, int, int));
144 void XMenuDestroy (Display *, XMenu *);
146 #endif /* not HAVE_X_WINDOWS */
148 #endif /* not EMACS_MSDOS_H */