Angband
ui-output.h
Go to the documentation of this file.
1 
19 #ifndef INCLUDED_UI_OUTPUT_H
20 #define INCLUDED_UI_OUTPUT_H
21 
22 #include "ui-event.h"
23 #include "ui-term.h"
24 #include "z-textblock.h"
25 
33 typedef struct region region;
34 
35 struct region {
36  int col; /* x-coordinate of upper right corner */
37  int row; /* y-coord of upper right coordinate */
38  int width; /* width of display area. 1 - use system default. */
39  /* non-positive - rel to right of screen */
40  int page_rows; /* non-positive value is relative to the bottom of the screen */
41 };
42 
46 static const region SCREEN_REGION = {0, 0, 0, 0};
47 
51 void region_erase(const region *loc);
52 
56 void region_erase_bordered(const region *loc);
57 
62 
66 bool region_inside(const region *loc, const ui_event *key);
67 
68 
74 void textui_textblock_show(textblock *tb, region orig_area, const char *header);
75 void textui_textblock_place(textblock *tb, region orig_area, const char *header);
76 
81 void text_out_to_screen(byte a, const char *str);
82 
87 void c_put_str(byte attr, const char *str, int row, int col);
88 void put_str(const char *str, int row, int col);
89 void c_prt(byte attr, const char *str, int row, int col);
90 void prt(const char *str, int row, int col);
91 
96 extern s16b screen_save_depth;
97 void screen_save(void);
98 void screen_load(void);
99 bool textui_map_is_visible(void);
100 
101 
106 void window_make(int origin_x, int origin_y, int end_x, int end_y);
107 bool panel_should_modify(term *t, int wy, int wx);
108 bool modify_panel(term *t, int wy, int wx);
109 bool change_panel(int dir);
110 void verify_panel(void);
111 void center_panel(void);
112 void textui_get_panel(int *min_y, int *min_x, int *max_y, int *max_x);
113 bool textui_panel_contains(unsigned int y, unsigned int x);
114 
115 #endif /* INCLUDED_UI_OUTPUT_H */
png_bytepp row
Definition: libpng12/png.h:1784
void put_str(const char *str, int row, int col)
As above, but in white.
Definition: ui-output.c:370
Text output bugger (?NRM) code.
Definition: z-type.h:24
void c_put_str(byte attr, const char *str, int row, int col)
Simple text display
Definition: ui-output.c:361
void screen_save(void)
Save the screen, and increase the "icky" depth.
Definition: ui-output.c:418
static char header[80]
Definition: ui-object.c:577
uint8_t byte
Definition: h-basic.h:167
bool change_panel(int dir)
Change the current panel to the panel lying in the given direction.
Definition: ui-output.c:603
int page_rows
Definition: ui-output.h:40
Copyright (c) 1997 Ben Harrison.
void region_erase_bordered(const region *loc)
Erase the contents of a region + 1 char each way.
Definition: ui-output.c:54
void center_panel(void)
Definition: ui-output.c:653
void textui_textblock_show(textblock *tb, region orig_area, const char *header)
Text display
Definition: ui-output.c:156
void window_make(int origin_x, int origin_y, int end_x, int end_y)
Miscellaneous things
Definition: ui-output.c:454
bool modify_panel(term *t, int wy, int wx)
Modify the current panel to the given coordinates, adjusting only to ensure the coordinates are legal...
Definition: ui-output.c:510
bool textui_panel_contains(unsigned int y, unsigned int x)
Definition: ui-output.c:670
int16_t s16b
Definition: h-basic.h:170
void verify_panel(void)
Verify the current panel (relative to the player location).
Definition: ui-output.c:648
void c_prt(byte attr, const char *str, int row, int col)
Display a string on the screen using an attribute, and clear to the end of the line.
Definition: ui-output.c:378
bool textui_map_is_visible(void)
Definition: ui-output.c:441
int width
Definition: ui-output.h:38
Definition: ui-term.h:162
region region_calculate(region loc)
Given a region with relative values, make them absolute.
Definition: ui-output.c:37
void textui_textblock_place(textblock *tb, region orig_area, const char *header)
Plonk a textblock on the screen in a certain bounding box.
Definition: ui-output.c:126
void prt(const char *str, int row, int col)
As above, but in white.
Definition: ui-output.c:389
bool region_inside(const region *loc, const ui_event *key)
Check whether a (mouse) event is inside a region.
Definition: ui-output.c:77
static const region SCREEN_REGION
Region that defines the full screen.
Definition: ui-output.h:46
void region_erase(const region *loc)
Erase the contents of a region.
Definition: ui-output.c:68
Utility functions relating to UI events.
int col
Definition: ui-output.h:36
Union type to hold information about any given event.
Definition: ui-event.h:191
void text_out_to_screen(byte a, const char *str)
text_out hook for screen display
Definition: ui-output.c:245
bool panel_should_modify(term *t, int wy, int wx)
Definition: ui-output.c:482
void textui_get_panel(int *min_y, int *min_x, int *max_y, int *max_x)
Definition: ui-output.c:658
s16b screen_save_depth
Screen loading/saving
Definition: ui-output.c:25
Definition: ui-output.h:35
void screen_load(void)
Load the screen, and decrease the "icky" depth.
Definition: ui-output.c:430
Definition: z-textblock.c:33
int row
Definition: ui-output.h:37