Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add curses soft-label-key (slk_*) functions #152263

Description

@serhiy-storchaka

The curses module does not yet wrap the soft-label-key functions from X/Open Curses. Soft labels are a row of labels displayed along the bottom line of the screen, conventionally used to label a row of function keys; the terminfo capabilities permitting, curses manages and refreshes them independently of the standard window.

The following functions are missing:

  • slk_init(fmt=0) — reserve a screen line for the labels and choose their layout (3-2-3, 4-4, and, where supported, 4-4-4 and 4-4-4 with an index line). Must be called before initscr() or newterm().
  • slk_set(labnum, label, justify) / slk_label(labnum) — set and query the text of a label.
  • slk_refresh(), slk_noutrefresh(), slk_clear(), slk_restore(), slk_touch() — manage the labels on the screen.
  • slk_attron(attr), slk_attroff(attr), slk_attrset(attr), slk_attr() — the chtype attribute functions.
  • slk_attr_on(attr), slk_attr_off(attr), slk_attr_set(attr, pair=0), slk_color(pair) — the attr_t/color-pair attribute functions.

Linked PRs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    extension-modulesC modules in the Modules dirtype-featureA feature request or enhancement

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions