2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / boehm-gc / cord / de_win.h
blob57a47b45c4170d0ef8eadd0c1c07d3027a0a9a1a
1 /*
2 * Copyright (c) 1994 by Xerox Corporation. All rights reserved.
4 * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
5 * OR IMPLIED. ANY USE IS AT YOUR OWN RISK.
7 * Permission is hereby granted to use or copy this program
8 * for any purpose, provided the above notices are retained on all copies.
9 * Permission to modify the code and to distribute modified code is granted,
10 * provided the above notices are retained, and a notice that the code was
11 * modified is included with the above copyright notice.
13 /* Boehm, May 19, 1994 2:25 pm PDT */
15 /* cord.h, de_cmds.h, and windows.h should be included before this. */
18 # define OTHER_FLAG 0x100
19 # define EDIT_CMD_FLAG 0x200
20 # define REPEAT_FLAG 0x400
22 # define CHAR_CMD(i) ((i) & 0xff)
24 /* MENU: DE */
25 #define IDM_FILESAVE (EDIT_CMD_FLAG + WRITE)
26 #define IDM_FILEEXIT (OTHER_FLAG + 1)
27 #define IDM_HELPABOUT (OTHER_FLAG + 2)
28 #define IDM_HELPCONTENTS (OTHER_FLAG + 3)
30 #define IDM_EDITPDOWN (REPEAT_FLAG + EDIT_CMD_FLAG + DOWN)
31 #define IDM_EDITPUP (REPEAT_FLAG + EDIT_CMD_FLAG + UP)
32 #define IDM_EDITUNDO (EDIT_CMD_FLAG + UNDO)
33 #define IDM_EDITLOCATE (EDIT_CMD_FLAG + LOCATE)
34 #define IDM_EDITDOWN (EDIT_CMD_FLAG + DOWN)
35 #define IDM_EDITUP (EDIT_CMD_FLAG + UP)
36 #define IDM_EDITLEFT (EDIT_CMD_FLAG + LEFT)
37 #define IDM_EDITRIGHT (EDIT_CMD_FLAG + RIGHT)
38 #define IDM_EDITBS (EDIT_CMD_FLAG + BS)
39 #define IDM_EDITDEL (EDIT_CMD_FLAG + DEL)
40 #define IDM_EDITREPEAT (EDIT_CMD_FLAG + REPEAT)
41 #define IDM_EDITTOP (EDIT_CMD_FLAG + TOP)
46 /* Windows UI stuff */
48 LRESULT CALLBACK WndProc (HWND hwnd, UINT message,
49 UINT wParam, LONG lParam);
51 LRESULT CALLBACK AboutBox( HWND hDlg, UINT message,
52 UINT wParam, LONG lParam );
55 /* Screen dimensions. Maintained by de_win.c. */
56 extern int LINES;
57 extern int COLS;
59 /* File being edited. */
60 extern char * arg_file_name;
62 /* Current display position in file. Maintained by de.c */
63 extern int dis_line;
64 extern int dis_col;
66 /* Current cursor position in file. */
67 extern int line;
68 extern int col;
71 * Calls from de_win.c to de.c
74 CORD retrieve_screen_line(int i);
75 /* Get the contents of i'th screen line. */
76 /* Relies on COLS. */
78 void set_position(int x, int y);
79 /* Set column, row. Upper left of window = (0,0). */
81 void do_command(int);
82 /* Execute an editor command. */
83 /* Agument is a command character or one */
84 /* of the IDM_ commands. */
86 void generic_init(void);
87 /* OS independent initialization */
91 * Calls from de.c to de_win.c
94 void move_cursor(int column, int line);
95 /* Physically move the cursor on the display, */
96 /* so that it appears at */
97 /* (column, line). */
99 void invalidate_line(int line);
100 /* Invalidate line i on the screen. */
102 void de_error(char *s);
103 /* Display error message. */