mirror of
https://github.com/rfivet/uemacs.git
synced 2025-11-23 11:41:15 -05:00
Bindable functions take a boolean as flag.
Emphasize which one always return TRUE. Use mloutfail() to introduce consistency when a function fails with error message.
This commit is contained in:
86
window.h
86
window.h
@@ -1,34 +1,35 @@
|
||||
/* window.h -- window functionality */
|
||||
#ifndef _WINDOW_H_
|
||||
#define _WINDOW_H_
|
||||
|
||||
#include "defines.h" /* COLOR, SCROLLCODE */
|
||||
#include "buffer.h" /* buffer, line */
|
||||
#include "buffer.h" /* buffer_p, line_p */
|
||||
#include "names.h" /* BINDABLE() */
|
||||
|
||||
/*
|
||||
* There is a window structure allocated for every active display window. The
|
||||
* windows are kept in a big list, in top to bottom screen order, with the
|
||||
* listhead at "wheadp". Each window contains its own values of dot and mark.
|
||||
* The flag field contains some bits that are set by commands to guide
|
||||
* redisplay. Although this is a bit of a compromise in terms of decoupling,
|
||||
* the full blown redisplay is just too expensive to run for every input
|
||||
* character.
|
||||
/* There is a window structure allocated for every active display window.
|
||||
The windows are kept in a big list, in top to bottom screen order, with
|
||||
the listhead at "wheadp". Each window contains its own values of dot
|
||||
and mark. The flag field contains some bits that are set by commands to
|
||||
guide redisplay. Although this is a bit of a compromise in terms of
|
||||
decoupling, the full blown redisplay is just too expensive to run for
|
||||
every input character.
|
||||
*/
|
||||
typedef struct window {
|
||||
struct window *w_wndp; /* Next window */
|
||||
struct buffer *w_bufp; /* Buffer displayed in window */
|
||||
buffer_p w_bufp ; /* Buffer displayed in window */
|
||||
line_p w_linep ; /* Top line in the window */
|
||||
line_p w_dotp ; /* Line containing "." */
|
||||
line_p w_markp ; /* Line containing "mark" */
|
||||
int w_doto ; /* Byte offset for "." */
|
||||
int w_marko; /* Byte offset for "mark" */
|
||||
int w_toprow ; /* Origin 0 top row of window */
|
||||
int w_ntrows ; /* # of rows of text in window */
|
||||
char w_force; /* If NZ, forcing row. */
|
||||
char w_flag; /* Flags. */
|
||||
#if COLOR
|
||||
char w_fcolor; /* current forground color */
|
||||
char w_bcolor; /* current background color */
|
||||
#endif
|
||||
int w_marko ; /* Byte offset for "mark" */
|
||||
int w_toprow ; /* Origin 0 top row of window */
|
||||
int w_ntrows ; /* # of rows of text in window */
|
||||
char w_force ; /* If NZ, forcing row. */
|
||||
char w_flag ; /* Flags. */
|
||||
# if COLOR
|
||||
char w_fcolor ; /* current forground color */
|
||||
char w_bcolor ; /* current background color */
|
||||
# endif
|
||||
} *window_p ;
|
||||
|
||||
extern window_p curwp ; /* Current window */
|
||||
@@ -44,31 +45,34 @@ extern window_p wheadp ; /* Head of list of windows */
|
||||
#define WFMODE 0x10 /* Update mode line. */
|
||||
#define WFCOLR 0x20 /* Needs a color change */
|
||||
|
||||
#if SCROLLCODE
|
||||
#define WFKILLS 0x40 /* something was deleted */
|
||||
#define WFINS 0x80 /* something was inserted */
|
||||
#endif
|
||||
# if SCROLLCODE
|
||||
# define WFKILLS 0x40 /* something was deleted */
|
||||
# define WFINS 0x80 /* something was inserted */
|
||||
# endif
|
||||
|
||||
/* Bindable functions */
|
||||
BINDABLE( delwind) ;
|
||||
BINDABLE( enlargewind) ;
|
||||
BINDABLE( mvdnwind) ;
|
||||
BINDABLE( mvupwind) ;
|
||||
BINDABLE( newsize) ;
|
||||
BINDABLE( newwidth) ;
|
||||
BINDABLE( nextwind) ;
|
||||
BINDABLE( onlywind) ;
|
||||
BINDABLE( prevwind) ;
|
||||
TBINDABLE( redraw) ;
|
||||
TBINDABLE( reposition) ;
|
||||
BINDABLE( resize) ;
|
||||
BINDABLE( restwnd) ;
|
||||
BINDABLE( savewnd) ;
|
||||
BINDABLE( scrnextdw) ;
|
||||
BINDABLE( scrnextup) ;
|
||||
BINDABLE( shrinkwind) ;
|
||||
BINDABLE( splitwind) ;
|
||||
|
||||
int reposition( int f, int n);
|
||||
int redraw( int f, int n) ;
|
||||
int nextwind( int f, int n) ;
|
||||
int prevwind( int f, int n) ;
|
||||
int mvdnwind( int f, int n) ;
|
||||
int mvupwind( int f, int n) ;
|
||||
int onlywind( int f, int n) ;
|
||||
int delwind( int f, int n) ;
|
||||
int splitwind( int f, int n) ;
|
||||
int enlargewind( int f, int n) ;
|
||||
int shrinkwind( int f, int n) ;
|
||||
int resize( int f, int n) ;
|
||||
int scrnextup( int f, int n) ;
|
||||
int scrnextdw( int f, int n) ;
|
||||
int savewnd( int f, int n) ;
|
||||
int restwnd( int f, int n) ;
|
||||
int newsize( int f, int n) ;
|
||||
int newwidth( int f, int n) ;
|
||||
int getwpos( void) ;
|
||||
void cknewwindow( void) ;
|
||||
window_p wpopup( void) ; /* Pop up window creation. */
|
||||
|
||||
#endif
|
||||
/* end of window.h */
|
||||
|
||||
Reference in New Issue
Block a user