Function libnotcurses_sys::ffi::nctabbed_add[][src]

pub unsafe extern "C" fn nctabbed_add(
    nt: *mut nctabbed,
    after: *mut nctab,
    before: *mut nctab,
    tcb: tabcb,
    name: *const c_char,
    opaque: *mut c_void
) -> *mut nctab
Expand description

Add a new tab to ‘nt’ with the given tab callback, name, and user pointer. If both ‘before’ and ‘after’ are NULL, the tab is inserted after the selected tab. Otherwise, it gets put after ‘after’ (if not NULL) and before ‘before’ (if not NULL). If both ‘after’ and ‘before’ are given, they must be two neighboring tabs (the tab list is circular, so the last tab is immediately before the leftmost tab), otherwise the function returns NULL. If ‘name’ is NULL or a string containing illegal characters, the function returns NULL. On all other failures the function also returns NULL. If it returns NULL, none of the arguments are modified, and the widget state is not altered.