Back to index

plt-scheme  4.2.1
de_win.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 1994 by Xerox Corporation.  All rights reserved.
00003  *
00004  * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
00005  * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
00006  *
00007  * Permission is hereby granted to use or copy this program
00008  * for any purpose,  provided the above notices are retained on all copies.
00009  * Permission to modify the code and to distribute modified code is granted,
00010  * provided the above notices are retained, and a notice that the code was
00011  * modified is included with the above copyright notice.
00012  */
00013 /* Boehm, May 19, 1994 2:25 pm PDT */
00014 
00015 /* cord.h, de_cmds.h, and windows.h should be included before this. */
00016 
00017 
00018 # define OTHER_FLAG  0x100
00019 # define EDIT_CMD_FLAG      0x200
00020 # define REPEAT_FLAG 0x400
00021 
00022 # define CHAR_CMD(i) ((i) & 0xff)
00023 
00024 /* MENU: DE */
00025 #define IDM_FILESAVE        (EDIT_CMD_FLAG + WRITE)
00026 #define IDM_FILEEXIT        (OTHER_FLAG + 1)
00027 #define IDM_HELPABOUT              (OTHER_FLAG + 2)
00028 #define IDM_HELPCONTENTS    (OTHER_FLAG + 3)
00029 
00030 #define IDM_EDITPDOWN              (REPEAT_FLAG + EDIT_CMD_FLAG + DOWN)
00031 #define IDM_EDITPUP         (REPEAT_FLAG + EDIT_CMD_FLAG + UP)
00032 #define IDM_EDITUNDO        (EDIT_CMD_FLAG + UNDO)
00033 #define IDM_EDITLOCATE             (EDIT_CMD_FLAG + LOCATE)
00034 #define IDM_EDITDOWN        (EDIT_CMD_FLAG + DOWN)
00035 #define IDM_EDITUP          (EDIT_CMD_FLAG + UP)
00036 #define IDM_EDITLEFT        (EDIT_CMD_FLAG + LEFT)
00037 #define IDM_EDITRIGHT              (EDIT_CMD_FLAG + RIGHT)
00038 #define IDM_EDITBS          (EDIT_CMD_FLAG + BS)
00039 #define IDM_EDITDEL         (EDIT_CMD_FLAG + DEL)
00040 #define IDM_EDITREPEAT             (EDIT_CMD_FLAG + REPEAT)
00041 #define IDM_EDITTOP         (EDIT_CMD_FLAG + TOP)
00042 
00043 
00044 
00045 
00046 /* Windows UI stuff  */
00047 
00048 LRESULT CALLBACK WndProc (HWND hwnd, UINT message,
00049                        UINT wParam, LONG lParam);
00050 
00051 LRESULT CALLBACK AboutBox( HWND hDlg, UINT message,
00052                         UINT wParam, LONG lParam );
00053 
00054 
00055 /* Screen dimensions.  Maintained by de_win.c.   */
00056 extern int LINES;
00057 extern int COLS;
00058 
00059 /* File being edited.       */
00060 extern char * arg_file_name;
00061 
00062 /* Current display position in file.  Maintained by de.c       */
00063 extern int dis_line;
00064 extern int dis_col;
00065 
00066 /* Current cursor position in file.                            */
00067 extern int line;
00068 extern int col;
00069 
00070 /*
00071  *  Calls from de_win.c to de.c
00072  */
00073   
00074 CORD retrieve_screen_line(int i);
00075                      /* Get the contents of i'th screen line.  */
00076                      /* Relies on COLS.                        */
00077 
00078 void set_position(int x, int y);
00079                      /* Set column, row.  Upper left of window = (0,0). */
00080 
00081 void do_command(int);
00082                      /* Execute an editor command.                    */
00083                      /* Agument is a command character or one  */
00084                      /* of the IDM_ commands.                  */
00085 
00086 void generic_init(void);
00087                      /* OS independent initialization */
00088 
00089 
00090 /*
00091  * Calls from de.c to de_win.c
00092  */
00093  
00094 void move_cursor(int column, int line);
00095                      /* Physically move the cursor on the display,    */
00096                      /* so that it appears at                  */
00097                      /* (column, line).                        */
00098 
00099 void invalidate_line(int line);
00100                      /* Invalidate line i on the screen.       */
00101 
00102 void de_error(char *s);
00103                      /* Display error message.   */