Check that DJGPP v. 1 is used.
[bpt/emacs.git] / src / msdos.h
CommitLineData
1b94449f
RS
1/* MS-DOS specific C utilities, interface.
2 Copyright (C) 1993 Free Software Foundation, Inc.
3
4This file is part of GNU Emacs.
5
6GNU Emacs is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
cbc07d0a 8the Free Software Foundation; either version 2, or (at your option)
1b94449f
RS
9any later version.
10
11GNU Emacs is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GNU Emacs; see the file COPYING. If not, write to
18the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
19
87485d6f
MW
20#ifndef _MSDOS_H_
21#define _MSDOS_H_
22
1b94449f
RS
23#include <dpmi.h>
24
25int dos_ttraw ();
26int dos_ttcooked ();
27int getdefdir (int, char*);
28void unixtodos_filename (char *);
29void dostounix_filename (char *);
af1b066b 30char *rootrelativepath (char *);
1b94449f
RS
31void init_environment ();
32void internal_terminal_init ();
87485d6f 33#ifdef _stdio_h_
1b94449f
RS
34int internal_flush (FILE *);
35#endif
36void ctrl_break_func (_go32_dpmi_registers *);
37void install_ctrl_break_check ();
38
39extern int have_mouse;
40int mouse_init1 ();
41void mouse_init ();
42void mouse_on ();
43void mouse_off ();
44void mouse_moveto (int, int);
45void mouse_check_moved ();
46int mouse_pressed (int, int *, int *);
47int mouse_released (int, int *, int *);
87485d6f
MW
48\f
49#ifndef HAVE_X_WINDOWS
50/* Dummy types. */
51typedef int XFontStruct;
52typedef int GC;
53typedef int Pixmap;
54typedef int Display;
55typedef int Window;
56#define PIX_TYPE int
57#define XDISPLAY
58
59/* This is a cut-down version of the one in xterm.h, which see. */
60struct x_display
61{
62 int left_pos;
63 int top_pos;
64 int line_height;
65 PIX_TYPE background_pixel;
66 PIX_TYPE foreground_pixel;
67 XFontStruct *font;
68 struct face **param_faces;
69 int n_param_faces;
70 struct face **computed_faces;
71 int n_computed_faces;
72 int size_computed_faces;
73};
74
75extern struct x_display the_only_x_display;
76extern Display *x_current_display;
77
78#define FRAME_PARAM_FACES(f) (the_only_x_display.param_faces)
79#define FRAME_N_PARAM_FACES(f) (the_only_x_display.n_param_faces)
80#define FRAME_DEFAULT_PARAM_FACE(f) (FRAME_PARAM_FACES (f)[0])
81#define FRAME_MODE_LINE_PARAM_FACE(f) (FRAME_PARAM_FACES (f)[1])
82#define FRAME_COMPUTED_FACES(f) (the_only_x_display.computed_faces)
83#define FRAME_N_COMPUTED_FACES(f) (the_only_x_display.n_computed_faces)
84#define FRAME_SIZE_COMPUTED_FACES(f) (the_only_x_display.size_computed_faces)
85#define FRAME_DEFAULT_FACE(f) (the_only_x_display.computed_faces[0])
86#define FRAME_MODE_LINE_FACE(f) (the_only_x_display.computed_faces[1])
87#define FRAME_X_DISPLAY(f) ((Display *) 0)
88#define FRAME_FOREGROUND_PIXEL(f) (the_only_x_display.foreground_pixel)
89#define FRAME_BACKGROUND_PIXEL(f) (the_only_x_display.background_pixel)
90#define FRAME_FONT(f) (the_only_x_display.font)
91
92#define XFreeGC (void)
93#define same_size_fonts(foo,bar) (1)
94#define unload_font(p1,p2)
95#define unload_color(p1,p2)
96#define x_destroy_bitmap(p1,p2)
97#define load_pixmap(p1,p2,p3,p4) (0)
98#define XGetGeometry(p1,p2,p3,p4,p5,p6,p7,p8,p9)
99#define DisplayWidth(p1,p2) (the_only_frame.width)
100#define DisplayHeight(p1,p2) (the_only_frame.height)
101#define XMenuSetAEQ (void)
102#define XMenuSetFreeze (void)
103#define XMenuRecompute (void)
104#define FONT_WIDTH(foo) 1
105/* Function `getcbrk' is the most harmless I can think of right now... */
106#define check_x if (FRAME_TERMCAP_P (bar)) error ("Not running under a windows system."); else getcbrk
cbc07d0a 107#define x_mouse_leave getcbrk
87485d6f
MW
108#define XM_FAILURE -1
109#define XM_SUCCESS 1
110#define XM_NO_SELECT 2
111#define XM_IA_SELECT 3
112#define ButtonReleaseMask 0
113
114typedef struct x_menu_struct
115{
116 int count;
117 char **text;
118 struct x_menu_struct **submenu;
119 int *panenumber; /* Also used as enable. */
120 int allocated;
121 int panecount;
122 int width;
123} XMenu;
124
cbc07d0a
RS
125XMenu *XMenuCreate (Display *, Window, char *);
126int XMenuAddPane (Display *, XMenu *, char *, int);
127int XMenuAddSelection (Display *, XMenu *, int, int, char *, int);
128void XMenuLocate (Display *, XMenu *, int, int, int, int,
129 int *, int *, int *, int *);
130int XMenuActivate (Display *, XMenu *, int *, int *, int, int, unsigned, char **);
131void XMenuDestroy (Display *, XMenu *);
132
87485d6f
MW
133#endif /* not HAVE_X_WINDOWS */
134
135#endif /* not _MSDOS_H_ */