root/gc/cord/de_win.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


   1 /*
   2  * Copyright (c) 1994 by Xerox Corporation.  All rights reserved.
   3  *
   4  * THIS MATERIAL IS PROVIDED AS IS, WITH ABSOLUTELY NO WARRANTY EXPRESSED
   5  * OR IMPLIED.  ANY USE IS AT YOUR OWN RISK.
   6  *
   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.
  12  */
  13 /* Boehm, May 19, 1994 2:25 pm PDT */
  14 
  15 /* cord.h, de_cmds.h, and windows.h should be included before this. */
  16 
  17 
  18 # define OTHER_FLAG     0x100
  19 # define EDIT_CMD_FLAG  0x200
  20 # define REPEAT_FLAG    0x400
  21 
  22 # define CHAR_CMD(i) ((i) & 0xff)
  23 
  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)
  29 
  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)
  42 
  43 
  44 
  45 
  46 /* Windows UI stuff     */
  47 
  48 LRESULT CALLBACK WndProc (HWND hwnd, UINT message,
  49                           UINT wParam, LONG lParam);
  50 
  51 LRESULT CALLBACK AboutBox( HWND hDlg, UINT message,
  52                            UINT wParam, LONG lParam );
  53 
  54 
  55 /* Screen dimensions.  Maintained by de_win.c.  */
  56 extern int LINES;
  57 extern int COLS;
  58 
  59 /* File being edited.   */
  60 extern char * arg_file_name;
  61 
  62 /* Current display position in file.  Maintained by de.c        */
  63 extern int dis_line;
  64 extern int dis_col;
  65 
  66 /* Current cursor position in file.                             */
  67 extern int line;
  68 extern int col;
  69 
  70 /*
  71  *  Calls from de_win.c to de.c
  72  */
  73   
  74 CORD retrieve_screen_line(int i);
  75                         /* Get the contents of i'th screen line.        */
  76                         /* Relies on COLS.                              */
  77 
  78 void set_position(int x, int y);
  79                         /* Set column, row.  Upper left of window = (0,0). */
  80 
  81 void do_command(int);
  82                         /* Execute an editor command.                   */
  83                         /* Agument is a command character or one        */
  84                         /* of the IDM_ commands.                        */
  85 
  86 void generic_init(void);
  87                         /* OS independent initialization */
  88 
  89 
  90 /*
  91  * Calls from de.c to de_win.c
  92  */
  93  
  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).                              */
  98 
  99 void invalidate_line(int line);
 100                         /* Invalidate line i on the screen.     */
 101 
 102 void de_error(char *s);

/* [<][>][^][v][top][bottom][index][help] */