aboutsummaryrefslogtreecommitdiff
path: root/view.h
diff options
context:
space:
mode:
authorRandy Palamar <randy@rnpnr.xyz>2024-05-23 22:21:40 -0600
committerRandy Palamar <randy@rnpnr.xyz>2024-05-24 15:23:41 -0600
commit70fa1e8594be04c203179e8249a27ae648a81e71 (patch)
treee4160703953dfef02ba74df0f78840088e46c91c /view.h
parent66c7dfeec6367eac5f7b0f9eff451a0577d8eae7 (diff)
downloadvis-70fa1e8594be04c203179e8249a27ae648a81e71.tar.gz
vis-70fa1e8594be04c203179e8249a27ae648a81e71.tar.xz
combine Win and UiWin
These are not seperate things and keeping them this way makes gives this convoluted mess where both Wins and UiWins must have linked lists to the other Wins and UiWins in the program despite the fact that neither of them can exist in isolation. This, like my previous cleanup commits, is part of a larger goal of properly isolating the various subsystems in vis. Doing so is required if we ever want to be able to have a vis-server and a vis-client.
Diffstat (limited to 'view.h')
-rw-r--r--view.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/view.h b/view.h
index ba7f0da..9717465 100644
--- a/view.h
+++ b/view.h
@@ -49,7 +49,6 @@ typedef struct Selection {
typedef struct View {
Text *text; /* underlying text management */
char *textbuf; /* scratch buffer used for drawing */
- UiWin *ui; /* corresponding ui window */
int width, height; /* size of display area */
size_t start, end; /* currently displayed area [start, end] in bytes from the start of the file */
size_t start_last; /* previously used start of visible area, used to update the mark */
@@ -82,7 +81,7 @@ typedef struct View {
* @defgroup view_life
* @{
*/
-bool view_init(View*, Text*);
+bool view_init(struct Win*, Text*);
void view_free(View*);
void view_reload(View*, Text*);
/**
@@ -339,13 +338,13 @@ bool view_regions_save(View*, Filerange*, SelectionRegion*);
* @defgroup view_style
* @{
*/
-void view_options_set(View*, enum UiOption options);
+void win_options_set(struct Win *, enum UiOption);
bool view_breakat_set(View*, const char *breakat);
/** Set how many spaces are used to display a tab `\t` character. */
void view_tabwidth_set(View*, int tabwidth);
/** Apply a style to a text range. */
-void view_style(View*, enum UiStyle, size_t start, size_t end);
+void win_style(struct Win*, enum UiStyle, size_t start, size_t end);
/** @} */