ELinks 0.16.1.1
window Struct Reference

A window in the terminal screen. More...

#include <window.h>

Collaboration diagram for window:

Data Fields

void * magic1
struct windownext
struct windowprev
void * magic2
enum window_type type
 Whether this is a normal window or a tab window.
window_handler_Thandler
 The window event handler.
void * data
 For tab windows the session is stored in data.
struct terminalterm
 The terminal (and screen) that hosts the window.
int xpos
 For WINDOW_TAB, the position and size in the tab bar.
int width
int x
 The position of something that has focus in the window.
int y
unsigned int resize:1
 For delayed tab resizing.

Detailed Description

A window in the terminal screen.

This structure does not know the position and size of the window, and no functions are provided for drawing into a window. Instead, when window.handler draws the window, it should decide the position and size of the window, and then draw directly to the terminal, taking care not to draw outside the window. Windows generally do not have their own coordinate systems; they get mouse events in the coordinate system of the terminal.

Field Documentation

◆ data

void* window::data

For tab windows the session is stored in data.

For normal windows it can contain dialog data. It is free()'d by delete_window()

◆ handler

window_handler_T* window::handler

The window event handler.

◆ magic1

void* window::magic1

◆ magic2

void* window::magic2

terminal.windows is the sentinel.

◆ next

struct window* window::next

◆ prev

struct window* window::prev

◆ resize

unsigned int window::resize

For delayed tab resizing.

◆ term

struct terminal* window::term

The terminal (and screen) that hosts the window.

◆ type

enum window_type window::type

Whether this is a normal window or a tab window.

◆ width

int window::width

◆ x

int window::x

The position of something that has focus in the window.

Any popup menus are drawn near this position. In tab windows, during NAVIGATE_CURSOR_ROUTING, this is also the position of the cursor that the user can move; there is no separate cursor position for each frame. In dialog boxes, this is typically the top left corner of the focused widget, while the cursor is somewhere within the widget.

See also
set_window_ptr, get_parent_ptr, set_cursor

◆ xpos

int window::xpos

For WINDOW_TAB, the position and size in the tab bar.

Updated while the tab bar is being drawn, and read if the user clicks there with the mouse.

◆ y

int window::y

The documentation for this struct was generated from the following file: