unibilium.h(3)

✨ unibilium.h ✨ β€” the manual, bestie edition πŸ’–

unibilium.h β€” ncurses terminfo parser and utility functions 🫢


🌈 NAME 🌈

unibilium.h β€” a header that gives you ncurses terminfo parsing plus a whole lil toolkit of utility functions. iykyk πŸ’…


🌸 SYNOPSIS 🌸

#include <unibilium.h>

πŸ’œ DESCRIPTION πŸ’œ

okay so listen. this library hands you functions and types so you can go poke at terminal descriptions living in the terminfo database β€” yes, the one in the format ncurses uses, no cap.

it can do three whole things and they're all iconic:

  • parse compiled terminfo entries β€” from memory or from files, dealer's choice ✨
  • access and modify their capabilities β€” read 'em, change 'em, whatever
  • generate brand new terminfo entries β€” yes bestie, you can make them πŸ‘‘

πŸŽ€ Types πŸŽ€

here's the type lineup, and every single one of them ate:

unibi_term

the main character. πŸ’… it represents one terminfo entry, and most functions take a pointer to this structure. so like… get familiar.

unibi_var_t

this one represents the values that show up in format string operations, and those values are either integers or strings. its exact representation is unspecified β€” do not come for its internal layout, it's mysterious on purpose πŸ™ˆ

see unibi_var_from_num(3), unibi_var_from_str(3), unibi_num_from_var(3), and unibi_str_from_var(3) for how to actually use values of this type.

but here's a guarantee that slays: zero-initializing a unibi_var_t is equivalent to unibi_var_from_num(0). periodt.

enum unibi_boolean

an enumeration of boolean capabilities. it has these elements, and there are a lot of them, so buckle up buttercup πŸ¦‹:

  • unibi_auto_left_margin
  • unibi_auto_right_margin
  • unibi_no_esc_ctlc
  • unibi_ceol_standout_glitch
  • unibi_eat_newline_glitch
  • unibi_erase_overstrike
  • unibi_generic_type
  • unibi_hard_copy
  • unibi_has_meta_key
  • unibi_has_status_line
  • unibi_insert_null_glitch
  • unibi_memory_above
  • unibi_memory_below
  • unibi_move_insert_mode
  • unibi_move_standout_mode
  • unibi_over_strike
  • unibi_status_line_esc_ok
  • unibi_dest_tabs_magic_smso
  • unibi_tilde_glitch
  • unibi_transparent_underline
  • unibi_xon_xoff
  • unibi_needs_xon_xoff
  • unibi_prtr_silent
  • unibi_hard_cursor
  • unibi_non_rev_rmcup
  • unibi_no_pad_char
  • unibi_non_dest_scroll_region
  • unibi_can_change
  • unibi_back_color_erase
  • unibi_hue_lightness_saturation
  • unibi_col_addr_glitch
  • unibi_cr_cancels_micro_mode
  • unibi_has_print_wheel
  • unibi_row_addr_glitch
  • unibi_semi_auto_right_margin
  • unibi_cpi_changes_res
  • unibi_lpi_changes_res
  • unibi_backspaces_with_bs
  • unibi_crt_no_scrolling
  • unibi_no_correctly_working_cr
  • unibi_gnu_has_meta_key
  • unibi_linefeed_is_newline
  • unibi_has_hardware_tabs
  • unibi_return_does_clr_eol

and then there are two special values, unibi_boolean_begin_ and unibi_boolean_end_, and they exist purely to make your life easier when you want to loop over every boolean capability. the way that works: every single enum value listed up there is greater than unibi_boolean_begin_ and less than unibi_boolean_end_. loop away bestie πŸ”

enum unibi_numeric

an enumeration of numeric capabilities. here's the full roster, no skipping πŸ’–:

  • unibi_columns
  • unibi_init_tabs
  • unibi_lines
  • unibi_lines_of_memory
  • unibi_magic_cookie_glitch
  • unibi_padding_baud_rate
  • unibi_virtual_terminal
  • unibi_width_status_line
  • unibi_num_labels
  • unibi_label_height
  • unibi_label_width
  • unibi_max_attributes
  • unibi_maximum_windows
  • unibi_max_colors
  • unibi_max_pairs
  • unibi_no_color_video
  • unibi_buffer_capacity
  • unibi_dot_vert_spacing
  • unibi_dot_horz_spacing
  • unibi_max_micro_address
  • unibi_max_micro_jump
  • unibi_micro_col_size
  • unibi_micro_line_size
  • unibi_number_of_pins
  • unibi_output_res_char
  • unibi_output_res_line
  • unibi_output_res_horz_inch
  • unibi_output_res_vert_inch
  • unibi_print_rate
  • unibi_wide_char_size
  • unibi_buttons
  • unibi_bit_image_entwining
  • unibi_bit_image_type
  • unibi_magic_cookie_glitch_ul
  • unibi_carriage_return_delay
  • unibi_new_line_delay
  • unibi_backspace_delay
  • unibi_horizontal_tab_delay
  • unibi_number_of_function_keys

same deal as the booleans, because symmetry is everything: the special values unibi_numeric_begin_ and unibi_numeric_end_ are there so programs can loop over all numeric capabilities. all of the enum values above are greater than unibi_numeric_begin_ and less than unibi_numeric_end_. chef's kiss πŸ‘¨β€πŸ³πŸ’‹

enum unibi_string

an enumeration of string capabilities. it has the following elements, and bestie… it's giving long, so here we go 🌈:


πŸŒ€ the OGs: movement, tabs & screen stuff

  • unibi_back_tab
  • unibi_bell
  • unibi_carriage_return
  • unibi_change_scroll_region
  • unibi_clear_all_tabs
  • unibi_clear_screen
  • unibi_clr_eol
  • unibi_clr_eos
  • unibi_column_address
  • unibi_command_character
  • unibi_cursor_address
  • unibi_cursor_down
  • unibi_cursor_home
  • unibi_cursor_invisible
  • unibi_cursor_left
  • unibi_cursor_mem_address
  • unibi_cursor_normal
  • unibi_cursor_right
  • unibi_cursor_to_ll
  • unibi_cursor_up
  • unibi_cursor_visible

like, the absolute foundation of terminal life πŸ’– every cursor that ever slid across your screen owes these ones a thank-you note.

βœ‚οΈ editing the screen, deleting & inserting

  • unibi_delete_character
  • unibi_delete_line
  • unibi_dis_status_line
  • unibi_down_half_line

short lil group, but so important β€” this is where the screen starts changing instead of just moving around πŸŽ€

πŸ’… enter the modes (the glow-up era)

  • unibi_enter_alt_charset_mode
  • unibi_enter_blink_mode
  • unibi_enter_bold_mode
  • unibi_enter_ca_mode
  • unibi_enter_delete_mode
  • unibi_enter_dim_mode
  • unibi_enter_insert_mode
  • unibi_enter_secure_mode
  • unibi_enter_protected_mode
  • unibi_enter_reverse_mode
  • unibi_enter_standout_mode
  • unibi_enter_underline_mode

bold, blink, underline, reverse, dim… it's giving makeover montage 🌈 all the ways a terminal can serve lewks, bestie.

πŸšͺ exit the modes (leaving the party)

  • unibi_erase_chars
  • unibi_exit_alt_charset_mode
  • unibi_exit_attribute_mode
  • unibi_exit_ca_mode
  • unibi_exit_delete_mode
  • unibi_exit_insert_mode
  • unibi_exit_standout_mode
  • unibi_exit_underline_mode
  • unibi_flash_screen
  • unibi_form_feed
  • unibi_from_status_line

you can't stay in the club forever πŸ’€ every enter has an exit, that's the law. also unibi_flash_screen is exactly the dramatic one you think it is 😭

πŸ”„ init & reset (the "get ready" era)

  • unibi_init_1string
  • unibi_init_2string
  • unibi_init_3string
  • unibi_init_file
  • unibi_insert_character
  • unibi_insert_line
  • unibi_insert_padding

the numbered ones (1string, 2string, 3string) are literally the setup sequence, in order, no skipping ✨

⌨️ KEYS β€” the whole entire keyboard basically

  • unibi_key_backspace
  • unibi_key_catab
  • unibi_key_clear
  • unibi_key_ctab
  • unibi_key_dc
  • unibi_key_dl
  • unibi_key_down
  • unibi_key_eic
  • unibi_key_eol
  • unibi_key_eos
  • unibi_key_f0
  • unibi_key_f1
  • unibi_key_f10
  • unibi_key_f2
  • unibi_key_f3
  • unibi_key_f4
  • unibi_key_f5
  • unibi_key_f6
  • unibi_key_f7
  • unibi_key_f8
  • unibi_key_f9
  • unibi_key_home
  • unibi_key_ic
  • unibi_key_il
  • unibi_key_left
  • unibi_key_ll
  • unibi_key_npage
  • unibi_key_ppage
  • unibi_key_right
  • unibi_key_sf
  • unibi_key_sr
  • unibi_key_stab
  • unibi_key_up
  • unibi_keypad_local
  • unibi_keypad_xmit

and yes, unibi_key_f0 is right there vibing before unibi_key_f1, because that's how the list goes and we do not argue with the list πŸ™ˆ

🏷️ the label crew

  • unibi_lab_f0
  • unibi_lab_f1
  • unibi_lab_f10
  • unibi_lab_f2
  • unibi_lab_f3
  • unibi_lab_f4
  • unibi_lab_f5
  • unibi_lab_f6
  • unibi_lab_f7
  • unibi_lab_f8
  • unibi_lab_f9

yeah f10 comes before f2, don't look at me, I didn't write the terminfo tables πŸ’…

🫢 odds & ends (meta, newline, padding)

  • unibi_meta_off
  • unibi_meta_on
  • unibi_newline
  • unibi_pad_char

πŸŽ›οΈ the parm_* squad (parameterized, main character energy)

  • unibi_parm_dch
  • unibi_parm_delete_line
  • unibi_parm_down_cursor
  • unibi_parm_ich
  • unibi_parm_index
  • unibi_parm_insert_line
  • unibi_parm_left_cursor
  • unibi_parm_right_cursor
  • unibi_parm_rindex
  • unibi_parm_up_cursor

these are the ones that take an argument β€” like "go down N" instead of just "go down once". they're the flexible besties of the group ✨

πŸ–¨οΈ printing & the printer era

  • unibi_pkey_key
  • unibi_pkey_local
  • unibi_pkey_xmit
  • unibi_print_screen
  • unibi_prtr_off
  • unibi_prtr_on
  • unibi_repeat_char
  • unibi_reset_1string
  • unibi_reset_2string
  • unibi_reset_3string
  • unibi_reset_file
  • unibi_restore_cursor
  • unibi_row_address
  • unibi_save_cursor
  • unibi_scroll_forward
  • unibi_scroll_reverse
  • unibi_set_attributes
  • unibi_set_tab
  • unibi_set_window
  • unibi_tab
  • unibi_to_status_line
  • unibi_underline_char
  • unibi_up_half_line
  • unibi_init_prog

(yes unibi_init_prog is chilling way down here, all by itself, and that's just where it lives πŸ¦‹)

πŸ”€ the stragglers that joined later

  • unibi_key_a1
  • unibi_key_a3
  • unibi_key_b2
  • unibi_key_c1
  • unibi_key_c3
  • unibi_prtr_non
  • unibi_char_padding
  • unibi_acs_chars
  • unibi_plab_norm
  • unibi_key_btab
  • unibi_enter_xon_mode
  • unibi_exit_xon_mode
  • unibi_enter_am_mode
  • unibi_exit_am_mode
  • unibi_xon_character
  • unibi_xoff_character
  • unibi_ena_acs
  • unibi_label_on
  • unibi_label_off

πŸ–±οΈ the function-key-name keys (round two, electric boogaloo)

  • unibi_key_beg
  • unibi_key_cancel
  • unibi_key_close
  • unibi_key_command
  • unibi_key_copy
  • unibi_key_create
  • unibi_key_end
  • unibi_key_enter
  • unibi_key_exit
  • unibi_key_find
  • unibi_key_help
  • unibi_key_mark
  • unibi_key_message
  • unibi_key_move
  • unibi_key_next
  • unibi_key_open
  • unibi_key_options
  • unibi_key_previous
  • unibi_key_print
  • unibi_key_redo
  • unibi_key_reference
  • unibi_key_refresh
  • unibi_key_replace
  • unibi_key_restart
  • unibi_key_resume
  • unibi_key_save
  • unibi_key_suspend
  • unibi_key_undo

🩷 and the shift versions of basically all of those

  • unibi_key_sbeg
  • unibi_key_scancel
  • unibi_key_scommand
  • unibi_key_scopy
  • unibi_key_screate
  • unibi_key_sdc
  • unibi_key_sdl
  • unibi_key_select
  • unibi_key_send
  • unibi_key_seol
  • unibi_key_sexit
  • unibi_key_sfind
  • unibi_key_shelp
  • unibi_key_shome
  • unibi_key_sic
  • unibi_key_sleft
  • unibi_key_smessage
  • unibi_key_smove
  • unibi_key_snext
  • unibi_key_soptions
  • unibi_key_sprevious
  • unibi_key_sprint
  • unibi_key_sredo
  • unibi_key_sreplace
  • unibi_key_sright
  • unibi_key_srsume
  • unibi_key_ssave
  • unibi_key_ssuspend
  • unibi_key_sundo
  • unibi_req_for_input

πŸ’€ f11 through f63. all of them. count if you want.

  • unibi_key_f11
  • unibi_key_f12
  • unibi_key_f13
  • unibi_key_f14
  • unibi_key_f15
  • unibi_key_f16
  • unibi_key_f17
  • unibi_key_f18
  • unibi_key_f19
  • unibi_key_f20
  • unibi_key_f21
  • unibi_key_f22
  • unibi_key_f23
  • unibi_key_f24
  • unibi_key_f25
  • unibi_key_f26
  • unibi_key_f27
  • unibi_key_f28
  • unibi_key_f29
  • unibi_key_f30
  • unibi_key_f31
  • unibi_key_f32
  • unibi_key_f33
  • unibi_key_f34
  • unibi_key_f35
  • unibi_key_f36
  • unibi_key_f37
  • unibi_key_f38
  • unibi_key_f39
  • unibi_key_f40
  • unibi_key_f41
  • unibi_key_f42
  • unibi_key_f43
  • unibi_key_f44
  • unibi_key_f45
  • unibi_key_f46
  • unibi_key_f47
  • unibi_key_f48
  • unibi_key_f49
  • unibi_key_f50
  • unibi_key_f51
  • unibi_key_f52
  • unibi_key_f53
  • unibi_key_f54
  • unibi_key_f55
  • unibi_key_f56
  • unibi_key_f57
  • unibi_key_f58
  • unibi_key_f59
  • unibi_key_f60
  • unibi_key_f61
  • unibi_key_f62
  • unibi_key_f63

ngl bestie, the dedication? immaculate. whoever typed these out one by one deserves a nap and a snack πŸ“

πŸ“ margins, labels, clocks & windows

  • unibi_clr_bol
  • unibi_clear_margins
  • unibi_set_left_margin
  • unibi_set_right_margin
  • unibi_label_format
  • unibi_set_clock
  • unibi_display_clock
  • unibi_remove_clock
  • unibi_create_window
  • unibi_goto_window
  • unibi_hangup
  • unibi_dial_phone
  • unibi_quick_dial
  • unibi_tone
  • unibi_pulse
  • unibi_flash_hook
  • unibi_fixed_pause
  • unibi_wait_tone
  • unibi_user0
  • unibi_user1
  • unibi_user2
  • unibi_user3
  • unibi_user4
  • unibi_user5
  • unibi_user6
  • unibi_user7
  • unibi_user8
  • unibi_user9

okay the phone-dialing ones (unibi_dial_phone, unibi_quick_dial, unibi_hangup, unibi_flash_hook) are genuinely sending me 😭 like this library was ready for your landline era, periodt.

🎨 colors, color pairs & the whole palette situation

  • unibi_orig_pair
  • unibi_orig_colors
  • unibi_initialize_color
  • unibi_initialize_pair
  • unibi_set_color_pair
  • unibi_set_foreground
  • unibi_set_background

πŸ–¨οΈβœ¨ printer / font / micro-mode arc (a LOT of these)

  • unibi_change_char_pitch
  • unibi_change_line_pitch
  • unibi_change_res_horz
  • unibi_change_res_vert
  • unibi_define_char
  • unibi_enter_doublewide_mode
  • unibi_enter_draft_quality
  • unibi_enter_italics_mode
  • unibi_enter_leftward_mode
  • unibi_enter_micro_mode
  • unibi_enter_near_letter_quality
  • unibi_enter_normal_quality
  • unibi_enter_shadow_mode
  • unibi_enter_subscript_mode
  • unibi_enter_superscript_mode
  • unibi_enter_upward_mode
  • unibi_exit_doublewide_mode
  • unibi_exit_italics_mode
  • unibi_exit_leftward_mode
  • unibi_exit_micro_mode
  • unibi_exit_shadow_mode
  • unibi_exit_subscript_mode
  • unibi_exit_superscript_mode
  • unibi_exit_upward_mode
  • unibi_micro_column_address
  • unibi_micro_down
  • unibi_micro_left
  • unibi_micro_right
  • unibi_micro_row_address
  • unibi_micro_up
  • unibi_order_of_pins
  • unibi_parm_down_micro
  • unibi_parm_left_micro
  • unibi_parm_right_micro
  • unibi_parm_up_micro
  • unibi_select_char_set
  • unibi_set_bottom_margin
  • unibi_set_bottom_margin_parm
  • unibi_set_left_margin_parm
  • unibi_set_right_margin_parm
  • unibi_set_top_margin
  • unibi_set_top_margin_parm
  • unibi_start_bit_image
  • unibi_start_char_set_def
  • unibi_stop_bit_image
  • unibi_stop_char_set_def
  • unibi_subscript_characters
  • unibi_superscript_characters
  • unibi_these_cause_cr
  • unibi_zero_motion
  • unibi_char_set_names
  • unibi_key_mouse
  • unibi_mouse_info
  • unibi_req_mouse_pos
  • unibi_get_mouse
  • unibi_set_a_foreground
  • unibi_set_a_background
  • unibi_pkey_plab
  • unibi_device_type
  • unibi_code_set_init
  • unibi_set0_des_seq
  • unibi_set1_des_seq
  • unibi_set2_des_seq
  • unibi_set3_des_seq
  • unibi_set_lr_margin
  • unibi_set_tb_margin
  • unibi_bit_image_repeat
  • unibi_bit_image_newline
  • unibi_bit_image_carriage_return
  • unibi_color_names
  • unibi_define_bit_image_region
  • unibi_end_bit_image_region
  • unibi_set_color_band
  • unibi_set_page_length
  • unibi_display_pc_char
  • unibi_enter_pc_charset_mode
  • unibi_exit_pc_charset_mode
  • unibi_enter_scancode_mode
  • unibi_exit_scancode_mode
  • unibi_pc_term_options
  • unibi_scancode_escape
  • unibi_alt_scancode_esc

look at all these, bestie β€” bit images, scancodes, char sets, the mouse ones, all of it, slaying in alphabetical-ish order πŸ’œ no cap, this list is the whole vibe of "terminals can do so much more than you think".

  • unibi_enter_horizontal_hl_mode
  • unibi_enter_left_hl_mode
  • unibi_enter_low_hl_mode
  • unibi_enter_right_hl_mode
  • unibi_enter_top_hl_mode
  • unibi_enter_vertical_hl_mode
  • unibi_set_a_attributes
  • unibi_set_pglen_inch
  • unibi_termcap_init2
  • unibi_termcap_reset
  • unibi_linefeed_if_not_lf
  • unibi_backspace_if_not_bs
  • unibi_other_non_function_keys
  • unibi_arrow_key_map
  • unibi_acs_ulcorner
  • unibi_acs_llcorner
  • unibi_acs_urcorner
  • unibi_acs_lrcorner
  • unibi_acs_ltee
  • unibi_acs_rtee
  • unibi_acs_btee
  • unibi_acs_ttee
  • unibi_acs_hline
  • unibi_acs_vline
  • unibi_acs_plus
  • unibi_memory_lock
  • unibi_memory_unlock
  • unibi_box_chars_1

like… that's the whole roster, we're done, breathe 🫢


And okay, here's the bit that makes looping actually possible instead of a nightmare: there are two special values, unibi_string_begin_ and unibi_string_end_, and they exist specifically so your program can just cruise through every single string capability without hardcoding a list. Every one of the enum values listed above is greater than unibi_string_begin_ and less than unibi_string_end_. So like… it's giving for loop, bestie. It's giving range. πŸ’…

🌈 SEE ALSO 🌈

go read these too, they're all part of the same little family:


and that's a wrap on the whole page!! πŸŽ€ This one ships as unibilium-2.1.4, dated 2026-09-07, and it lives in section 3 of the manual β€” so you'll find it filed under unibilium.h(3). go forth and make terminals pretty βœ¨πŸ’–πŸ¦‹

πŸ“¦ where this page comes from