Module vpe.app_ui_support

Application level user interface support.

Currently this only works on X.Org based desktops.

AppWin

class vpe.app_ui_support.AppWin(dims_pixels, dims_cells, corners, borders, cell_size)

Information about Vim’s application window.

Parameters

dims_pixels

A sequence (w, h) giving the window’s undecorated size in pixels.

dims_cells

A sequence (w, h) giving the window’s undecorated size in character cells.

dims_corners

A sequence of pixel coordiates for the windows corners, in the order TL, TR, BR, BL. For TR and BR the X value is with repect to the right hand edge of the display. For BL and BR the Y value is with repect to the lower edge of the display.

borders

The pixel sizes of the window decoration borders in the order, left, right, top, bottom.

cell_size

The size of a character cell, in pixels.

Attributes

borders

The pixel sizes of the window decoration borders in the order, left, right, top, bottom.

cell_size

The size of a character cell, in pixels.

dims_cells

A sequence (w, h) giving the window’s undecorated size in character cells.

dims_corners

A sequence of pixel coordiates for the windows corners, in the order TL, TR, BR, BL. For TR and BR the X value is with repect to the right hand edge of the display. For BL and BR the Y value is with repect to the lower edge of the display.

dims_pixels

A sequence (w, h) giving the window’s undecorated size in pixels.

Properties

property columns

The calculated number of columns for this window.

This should be the same as the columns option value.

property decor_dimsTuple[int, int]

The windows dimension in pixels including window decoration.

Display

class vpe.app_ui_support.Display(w, h, x, y)

Information about a single display (physical screen).

Parameters

w

The width in pixels.

h

The height in pixels.

x

The X coordinate, in pixels, of the top left corner.

y

The Y coordinate, in pixels, of the top left corner.

Attributes

h

The height in pixels.

w

The width in pixels.

x

The X coordinate, in pixels, of the top left corner.

y

The Y coordinate, in pixels, of the top left corner.

Displays

class vpe.app_ui_support.Displays

Information about the available displays (physical screens).

Attributes

displays

A sequence of Display instances.

Methods

add(display)

Add a display.

find_display_for_window(w: AppWin)Optional[Display]

Find which display a given Window is on.

The position of the windows top-left corner is used for the determination.

Parameters

w: AppWin

The window bein searched for.

get_app_win_info

vpe.app_ui_support.get_app_win_info()Optional[AppWin]

Get information about the Vim application window.

get_display_info

vpe.app_ui_support.get_display_info()Displays

Get information about the displays (screens).