From b6fcd2783d962f30a381309017800b1db0368642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?joseLu=C3=ADs?= Date: Sun, 27 Dec 2020 19:57:49 +0100 Subject: [PATCH] tools: update funtion-summary.sh & generated data --- ...indgen_20201102.rs => bindgen_20201227.rs} | 812 +++++++++++------- tools/function-summary/function-summary.sh | 4 +- .../out-20201102/static/ncvisual | 1 - .../{out-20201102 => out-20201227}/STATS | 18 +- .../bindgen/_NON_FILTERED | 0 .../bindgen/cell | 0 .../bindgen/channel | 0 .../bindgen/ncblit | 0 .../bindgen/ncdirect | 2 + .../bindgen/ncdplot | 0 .../bindgen/ncfadectx | 0 .../bindgen/ncfdplane | 0 .../bindgen/nckey | 0 .../bindgen/ncmenu | 0 .../bindgen/ncmetric | 0 .../bindgen/ncmultiselector | 0 .../out-20201227/bindgen/ncpile | 5 + .../bindgen/ncpixel | 0 .../bindgen/ncplane | 6 + .../out-20201227/bindgen/ncprogbar | 5 + .../bindgen/ncreader | 0 .../bindgen/ncreel | 0 .../bindgen/ncselector | 0 .../bindgen/ncsubproc | 0 .../bindgen/nctablet | 0 .../bindgen/ncuplot | 0 .../bindgen/ncvisual | 1 + .../bindgen/notcurses | 3 + .../bindgen/palette | 0 .../static/_NON_FILTERED | 0 .../static/cell | 1 + .../static/channel | 0 .../static/ncblit | 0 .../static/ncdirect | 0 .../static/ncdplot | 0 .../static/ncfadectx | 0 .../static/ncfdplane | 0 .../static/nckey | 0 .../static/ncmenu | 0 .../static/ncmetric | 0 .../static/ncmultiselector | 0 .../ncreader => out-20201227/static/ncpile} | 0 .../static/ncpixel | 0 .../static/ncplane | 3 +- .../ncreel => out-20201227/static/ncprogbar} | 0 .../static/ncreader} | 0 .../ncsubproc => out-20201227/static/ncreel} | 0 .../static/ncselector} | 0 .../ncuplot => out-20201227/static/ncsubproc} | 0 .../out-20201227/static/nctablet | 0 .../out-20201227/static/ncuplot | 0 .../out-20201227/static/ncvisual | 0 .../static/notcurses | 0 .../static/palette | 0 54 files changed, 528 insertions(+), 333 deletions(-) rename tools/function-summary/{bindgen_20201102.rs => bindgen_20201227.rs} (93%) delete mode 100644 tools/function-summary/out-20201102/static/ncvisual rename tools/function-summary/{out-20201102 => out-20201227}/STATS (59%) rename tools/function-summary/{out-20201102 => out-20201227}/bindgen/_NON_FILTERED (100%) rename tools/function-summary/{out-20201102 => out-20201227}/bindgen/cell (100%) rename tools/function-summary/{out-20201102 => out-20201227}/bindgen/channel (100%) rename tools/function-summary/{out-20201102 => out-20201227}/bindgen/ncblit (100%) rename tools/function-summary/{out-20201102 => out-20201227}/bindgen/ncdirect (94%) rename tools/function-summary/{out-20201102 => out-20201227}/bindgen/ncdplot (100%) rename tools/function-summary/{out-20201102 => out-20201227}/bindgen/ncfadectx (100%) rename tools/function-summary/{out-20201102 => out-20201227}/bindgen/ncfdplane (100%) rename tools/function-summary/{out-20201102 => out-20201227}/bindgen/nckey (100%) rename tools/function-summary/{out-20201102 => out-20201227}/bindgen/ncmenu (100%) rename tools/function-summary/{out-20201102 => out-20201227}/bindgen/ncmetric (100%) rename tools/function-summary/{out-20201102 => out-20201227}/bindgen/ncmultiselector (100%) create mode 100644 tools/function-summary/out-20201227/bindgen/ncpile rename tools/function-summary/{out-20201102 => out-20201227}/bindgen/ncpixel (100%) rename tools/function-summary/{out-20201102 => out-20201227}/bindgen/ncplane (93%) create mode 100644 tools/function-summary/out-20201227/bindgen/ncprogbar rename tools/function-summary/{out-20201102 => out-20201227}/bindgen/ncreader (100%) rename tools/function-summary/{out-20201102 => out-20201227}/bindgen/ncreel (100%) rename tools/function-summary/{out-20201102 => out-20201227}/bindgen/ncselector (100%) rename tools/function-summary/{out-20201102 => out-20201227}/bindgen/ncsubproc (100%) rename tools/function-summary/{out-20201102 => out-20201227}/bindgen/nctablet (100%) rename tools/function-summary/{out-20201102 => out-20201227}/bindgen/ncuplot (100%) rename tools/function-summary/{out-20201102 => out-20201227}/bindgen/ncvisual (92%) rename tools/function-summary/{out-20201102 => out-20201227}/bindgen/notcurses (91%) rename tools/function-summary/{out-20201102 => out-20201227}/bindgen/palette (100%) rename tools/function-summary/{out-20201102 => out-20201227}/static/_NON_FILTERED (100%) rename tools/function-summary/{out-20201102 => out-20201227}/static/cell (97%) rename tools/function-summary/{out-20201102 => out-20201227}/static/channel (100%) rename tools/function-summary/{out-20201102 => out-20201227}/static/ncblit (100%) rename tools/function-summary/{out-20201102 => out-20201227}/static/ncdirect (100%) rename tools/function-summary/{out-20201102 => out-20201227}/static/ncdplot (100%) rename tools/function-summary/{out-20201102 => out-20201227}/static/ncfadectx (100%) rename tools/function-summary/{out-20201102 => out-20201227}/static/ncfdplane (100%) rename tools/function-summary/{out-20201102 => out-20201227}/static/nckey (100%) rename tools/function-summary/{out-20201102 => out-20201227}/static/ncmenu (100%) rename tools/function-summary/{out-20201102 => out-20201227}/static/ncmetric (100%) rename tools/function-summary/{out-20201102 => out-20201227}/static/ncmultiselector (100%) rename tools/function-summary/{out-20201102/static/ncreader => out-20201227/static/ncpile} (100%) rename tools/function-summary/{out-20201102 => out-20201227}/static/ncpixel (100%) rename tools/function-summary/{out-20201102 => out-20201227}/static/ncplane (94%) rename tools/function-summary/{out-20201102/static/ncreel => out-20201227/static/ncprogbar} (100%) rename tools/function-summary/{out-20201102/static/ncselector => out-20201227/static/ncreader} (100%) rename tools/function-summary/{out-20201102/static/ncsubproc => out-20201227/static/ncreel} (100%) rename tools/function-summary/{out-20201102/static/nctablet => out-20201227/static/ncselector} (100%) rename tools/function-summary/{out-20201102/static/ncuplot => out-20201227/static/ncsubproc} (100%) create mode 100644 tools/function-summary/out-20201227/static/nctablet create mode 100644 tools/function-summary/out-20201227/static/ncuplot create mode 100644 tools/function-summary/out-20201227/static/ncvisual rename tools/function-summary/{out-20201102 => out-20201227}/static/notcurses (100%) rename tools/function-summary/{out-20201102 => out-20201227}/static/palette (100%) diff --git a/tools/function-summary/bindgen_20201102.rs b/tools/function-summary/bindgen_20201227.rs similarity index 93% rename from tools/function-summary/bindgen_20201102.rs rename to tools/function-summary/bindgen_20201227.rs index 92bbce05b..8450f2703 100644 --- a/tools/function-summary/bindgen_20201102.rs +++ b/tools/function-summary/bindgen_20201227.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.54.1 */ +/* automatically generated by rust-bindgen 0.56.0 */ #[repr(C)] #[derive(Default)] @@ -641,7 +641,7 @@ pub const NCPALETTESIZE: u32 = 256; pub const CELL_FG_PALETTE: u64 = 576460752303423488; pub const CELL_BG_ALPHA_MASK: u32 = 805306368; pub const CELL_FG_ALPHA_MASK: u64 = 3458764513820540928; -pub const NCSTYLE_MASK: u32 = 65535; +pub const NCSTYLE_MASK: u32 = 1023; pub const NCSTYLE_STANDOUT: u32 = 128; pub const NCSTYLE_UNDERLINE: u32 = 64; pub const NCSTYLE_REVERSE: u32 = 32; @@ -651,6 +651,7 @@ pub const NCSTYLE_BOLD: u32 = 4; pub const NCSTYLE_INVIS: u32 = 2; pub const NCSTYLE_PROTECT: u32 = 1; pub const NCSTYLE_ITALIC: u32 = 256; +pub const NCSTYLE_STRUCK: u32 = 512; pub const NCSTYLE_NONE: u32 = 0; pub const NCOPTION_INHIBIT_SETLOCALE: u32 = 1; pub const NCOPTION_VERIFY_SIXEL: u32 = 2; @@ -683,11 +684,13 @@ pub const IPREFIXSTRLEN: u32 = 9; pub const BPREFIXSTRLEN: u32 = 10; pub const NCMENU_OPTION_BOTTOM: u32 = 1; pub const NCMENU_OPTION_HIDING: u32 = 2; +pub const NCPROGBAR_OPTION_RETROGRADE: u32 = 1; pub const NCPLOT_OPTION_LABELTICKSD: u32 = 1; pub const NCPLOT_OPTION_EXPONENTIALD: u32 = 2; pub const NCPLOT_OPTION_VERTICALI: u32 = 4; pub const NCPLOT_OPTION_NODEGRADE: u32 = 8; pub const NCPLOT_OPTION_DETECTMAXONLY: u32 = 16; +pub const NCPLOT_OPTION_PRINTSAMPLE: u32 = 32; pub const NCREADER_OPTION_HORSCROLL: u32 = 1; pub const NCREADER_OPTION_VERSCROLL: u32 = 2; pub const NCREADER_OPTION_NOCMDKEYS: u32 = 4; @@ -1214,30 +1217,30 @@ extern "C" { pub fn c32rtomb(__s: *mut cty::c_char, __c32: char32_t, __ps: *mut mbstate_t) -> size_t; } #[doc = " UPPERCASE."] -pub const _ISupper: _bindgen_ty_1 = 256; +pub const _ISupper: cty::c_uint = 256; #[doc = " lowercase."] -pub const _ISlower: _bindgen_ty_1 = 512; +pub const _ISlower: cty::c_uint = 512; #[doc = " Alphabetic."] -pub const _ISalpha: _bindgen_ty_1 = 1024; +pub const _ISalpha: cty::c_uint = 1024; #[doc = " Numeric."] -pub const _ISdigit: _bindgen_ty_1 = 2048; +pub const _ISdigit: cty::c_uint = 2048; #[doc = " Hexadecimal numeric."] -pub const _ISxdigit: _bindgen_ty_1 = 4096; +pub const _ISxdigit: cty::c_uint = 4096; #[doc = " Whitespace."] -pub const _ISspace: _bindgen_ty_1 = 8192; +pub const _ISspace: cty::c_uint = 8192; #[doc = " Printing."] -pub const _ISprint: _bindgen_ty_1 = 16384; +pub const _ISprint: cty::c_uint = 16384; #[doc = " Graphical."] -pub const _ISgraph: _bindgen_ty_1 = 32768; +pub const _ISgraph: cty::c_uint = 32768; #[doc = " Blank (usually SPC and TAB)."] -pub const _ISblank: _bindgen_ty_1 = 1; +pub const _ISblank: cty::c_uint = 1; #[doc = " Control character."] -pub const _IScntrl: _bindgen_ty_1 = 2; +pub const _IScntrl: cty::c_uint = 2; #[doc = " Punctuation."] -pub const _ISpunct: _bindgen_ty_1 = 4; +pub const _ISpunct: cty::c_uint = 4; #[doc = " Alphanumeric."] -pub const _ISalnum: _bindgen_ty_1 = 8; -pub type _bindgen_ty_1 = u32; +pub const _ISalnum: cty::c_uint = 8; +pub type _bindgen_ty_1 = cty::c_uint; extern "C" { #[doc = " These are defined in ctype-info.c."] #[doc = "The declarations here must match those in localeinfo.h."] @@ -1336,54 +1339,54 @@ pub type __FILE = _IO_FILE; #[doc = "character classifications."] pub type wctype_t = cty::c_ulong; #[doc = " UPPERCASE."] -pub const __ISwupper: _bindgen_ty_2 = 0; +pub const __ISwupper: cty::c_int = 0; #[doc = " lowercase."] -pub const __ISwlower: _bindgen_ty_2 = 1; +pub const __ISwlower: cty::c_int = 1; #[doc = " Alphabetic."] -pub const __ISwalpha: _bindgen_ty_2 = 2; +pub const __ISwalpha: cty::c_int = 2; #[doc = " Numeric."] -pub const __ISwdigit: _bindgen_ty_2 = 3; +pub const __ISwdigit: cty::c_int = 3; #[doc = " Hexadecimal numeric."] -pub const __ISwxdigit: _bindgen_ty_2 = 4; +pub const __ISwxdigit: cty::c_int = 4; #[doc = " Whitespace."] -pub const __ISwspace: _bindgen_ty_2 = 5; +pub const __ISwspace: cty::c_int = 5; #[doc = " Printing."] -pub const __ISwprint: _bindgen_ty_2 = 6; +pub const __ISwprint: cty::c_int = 6; #[doc = " Graphical."] -pub const __ISwgraph: _bindgen_ty_2 = 7; +pub const __ISwgraph: cty::c_int = 7; #[doc = " Blank (usually SPC and TAB)."] -pub const __ISwblank: _bindgen_ty_2 = 8; +pub const __ISwblank: cty::c_int = 8; #[doc = " Control character."] -pub const __ISwcntrl: _bindgen_ty_2 = 9; +pub const __ISwcntrl: cty::c_int = 9; #[doc = " Punctuation."] -pub const __ISwpunct: _bindgen_ty_2 = 10; +pub const __ISwpunct: cty::c_int = 10; #[doc = " Alphanumeric."] -pub const __ISwalnum: _bindgen_ty_2 = 11; +pub const __ISwalnum: cty::c_int = 11; #[doc = " UPPERCASE."] -pub const _ISwupper: _bindgen_ty_2 = 16777216; +pub const _ISwupper: cty::c_int = 16777216; #[doc = " lowercase."] -pub const _ISwlower: _bindgen_ty_2 = 33554432; +pub const _ISwlower: cty::c_int = 33554432; #[doc = " Alphabetic."] -pub const _ISwalpha: _bindgen_ty_2 = 67108864; +pub const _ISwalpha: cty::c_int = 67108864; #[doc = " Numeric."] -pub const _ISwdigit: _bindgen_ty_2 = 134217728; +pub const _ISwdigit: cty::c_int = 134217728; #[doc = " Hexadecimal numeric."] -pub const _ISwxdigit: _bindgen_ty_2 = 268435456; +pub const _ISwxdigit: cty::c_int = 268435456; #[doc = " Whitespace."] -pub const _ISwspace: _bindgen_ty_2 = 536870912; +pub const _ISwspace: cty::c_int = 536870912; #[doc = " Printing."] -pub const _ISwprint: _bindgen_ty_2 = 1073741824; +pub const _ISwprint: cty::c_int = 1073741824; #[doc = " Graphical."] -pub const _ISwgraph: _bindgen_ty_2 = -2147483648; +pub const _ISwgraph: cty::c_int = -2147483648; #[doc = " Blank (usually SPC and TAB)."] -pub const _ISwblank: _bindgen_ty_2 = 65536; +pub const _ISwblank: cty::c_int = 65536; #[doc = " Control character."] -pub const _ISwcntrl: _bindgen_ty_2 = 131072; +pub const _ISwcntrl: cty::c_int = 131072; #[doc = " Punctuation."] -pub const _ISwpunct: _bindgen_ty_2 = 262144; +pub const _ISwpunct: cty::c_int = 262144; #[doc = " Alphanumeric."] -pub const _ISwalnum: _bindgen_ty_2 = 524288; -pub type _bindgen_ty_2 = i32; +pub const _ISwalnum: cty::c_int = 524288; +pub type _bindgen_ty_2 = cty::c_int; extern "C" { #[doc = " Test for any wide character for which `iswalpha' or `iswdigit' is"] #[doc = "true."] @@ -3589,7 +3592,7 @@ pub const __socket_type_SOCK_CLOEXEC: __socket_type = 524288; #[doc = "non-blocking."] pub const __socket_type_SOCK_NONBLOCK: __socket_type = 2048; #[doc = " Types of sockets."] -pub type __socket_type = u32; +pub type __socket_type = cty::c_uint; #[doc = " POSIX.1g specifies this type name for the `sa_family' member."] pub type sa_family_t = cty::c_ushort; #[doc = " Structure describing a generic socket address."] @@ -3685,47 +3688,47 @@ fn bindgen_test_layout_sockaddr_storage() { ); } #[doc = " Process out-of-band data."] -pub const MSG_OOB: _bindgen_ty_3 = 1; +pub const MSG_OOB: cty::c_uint = 1; #[doc = " Peek at incoming messages."] -pub const MSG_PEEK: _bindgen_ty_3 = 2; +pub const MSG_PEEK: cty::c_uint = 2; #[doc = " Don't use local routing."] -pub const MSG_DONTROUTE: _bindgen_ty_3 = 4; +pub const MSG_DONTROUTE: cty::c_uint = 4; #[doc = " Control data lost before delivery."] -pub const MSG_CTRUNC: _bindgen_ty_3 = 8; +pub const MSG_CTRUNC: cty::c_uint = 8; #[doc = " Supply or ask second address."] -pub const MSG_PROXY: _bindgen_ty_3 = 16; -pub const MSG_TRUNC: _bindgen_ty_3 = 32; +pub const MSG_PROXY: cty::c_uint = 16; +pub const MSG_TRUNC: cty::c_uint = 32; #[doc = " Nonblocking IO."] -pub const MSG_DONTWAIT: _bindgen_ty_3 = 64; +pub const MSG_DONTWAIT: cty::c_uint = 64; #[doc = " End of record."] -pub const MSG_EOR: _bindgen_ty_3 = 128; +pub const MSG_EOR: cty::c_uint = 128; #[doc = " Wait for a full request."] -pub const MSG_WAITALL: _bindgen_ty_3 = 256; -pub const MSG_FIN: _bindgen_ty_3 = 512; -pub const MSG_SYN: _bindgen_ty_3 = 1024; +pub const MSG_WAITALL: cty::c_uint = 256; +pub const MSG_FIN: cty::c_uint = 512; +pub const MSG_SYN: cty::c_uint = 1024; #[doc = " Confirm path validity."] -pub const MSG_CONFIRM: _bindgen_ty_3 = 2048; -pub const MSG_RST: _bindgen_ty_3 = 4096; +pub const MSG_CONFIRM: cty::c_uint = 2048; +pub const MSG_RST: cty::c_uint = 4096; #[doc = " Fetch message from error queue."] -pub const MSG_ERRQUEUE: _bindgen_ty_3 = 8192; +pub const MSG_ERRQUEUE: cty::c_uint = 8192; #[doc = " Do not generate SIGPIPE."] -pub const MSG_NOSIGNAL: _bindgen_ty_3 = 16384; +pub const MSG_NOSIGNAL: cty::c_uint = 16384; #[doc = " Sender will send more."] -pub const MSG_MORE: _bindgen_ty_3 = 32768; +pub const MSG_MORE: cty::c_uint = 32768; #[doc = " Wait for at least one packet to return."] -pub const MSG_WAITFORONE: _bindgen_ty_3 = 65536; +pub const MSG_WAITFORONE: cty::c_uint = 65536; #[doc = " sendmmsg: more messages coming."] -pub const MSG_BATCH: _bindgen_ty_3 = 262144; +pub const MSG_BATCH: cty::c_uint = 262144; #[doc = " Use user data in kernel path."] -pub const MSG_ZEROCOPY: _bindgen_ty_3 = 67108864; +pub const MSG_ZEROCOPY: cty::c_uint = 67108864; #[doc = " Send data in TCP SYN."] -pub const MSG_FASTOPEN: _bindgen_ty_3 = 536870912; +pub const MSG_FASTOPEN: cty::c_uint = 536870912; #[doc = " Set close_on_exit for file"] #[doc = "descriptor received through"] #[doc = "SCM_RIGHTS."] -pub const MSG_CMSG_CLOEXEC: _bindgen_ty_3 = 1073741824; +pub const MSG_CMSG_CLOEXEC: cty::c_uint = 1073741824; #[doc = " Bits in the FLAGS argument to `send', `recv', et al."] -pub type _bindgen_ty_3 = u32; +pub type _bindgen_ty_3 = cty::c_uint; #[doc = " Structure describing messages sent by"] #[doc = "`sendmsg' and received by `recvmsg'."] #[repr(C)] @@ -3906,10 +3909,10 @@ extern "C" { pub fn __cmsg_nxthdr(__mhdr: *mut msghdr, __cmsg: *mut cmsghdr) -> *mut cmsghdr; } #[doc = " Transfer file descriptors."] -pub const SCM_RIGHTS: _bindgen_ty_4 = 1; +pub const SCM_RIGHTS: cty::c_uint = 1; #[doc = " Socket level message types. This must match the definitions in"] #[doc = "."] -pub type _bindgen_ty_4 = u32; +pub type _bindgen_ty_4 = cty::c_uint; #[doc = " Structure used to manipulate the SO_LINGER option."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -3953,14 +3956,14 @@ fn bindgen_test_layout_linger() { ); } #[doc = " No more receptions."] -pub const SHUT_RD: _bindgen_ty_5 = 0; +pub const SHUT_RD: cty::c_uint = 0; #[doc = " No more transmissions."] -pub const SHUT_WR: _bindgen_ty_5 = 1; +pub const SHUT_WR: cty::c_uint = 1; #[doc = " No more receptions or transmissions."] -pub const SHUT_RDWR: _bindgen_ty_5 = 2; +pub const SHUT_RDWR: cty::c_uint = 2; #[doc = " The following constants should be used for the second parameter of"] #[doc = "`shutdown'."] -pub type _bindgen_ty_5 = u32; +pub type _bindgen_ty_5 = cty::c_uint; extern "C" { #[doc = " Create a new socket of type TYPE in domain DOMAIN, using"] #[doc = "protocol PROTOCOL. If PROTOCOL is zero, one is chosen automatically."] @@ -4168,124 +4171,124 @@ fn bindgen_test_layout_in_addr() { ); } #[doc = " Dummy protocol for TCP."] -pub const IPPROTO_IP: _bindgen_ty_6 = 0; +pub const IPPROTO_IP: cty::c_uint = 0; #[doc = " Internet Control Message Protocol."] -pub const IPPROTO_ICMP: _bindgen_ty_6 = 1; +pub const IPPROTO_ICMP: cty::c_uint = 1; #[doc = " Internet Group Management Protocol."] -pub const IPPROTO_IGMP: _bindgen_ty_6 = 2; +pub const IPPROTO_IGMP: cty::c_uint = 2; #[doc = " IPIP tunnels (older KA9Q tunnels use 94)."] -pub const IPPROTO_IPIP: _bindgen_ty_6 = 4; +pub const IPPROTO_IPIP: cty::c_uint = 4; #[doc = " Transmission Control Protocol."] -pub const IPPROTO_TCP: _bindgen_ty_6 = 6; +pub const IPPROTO_TCP: cty::c_uint = 6; #[doc = " Exterior Gateway Protocol."] -pub const IPPROTO_EGP: _bindgen_ty_6 = 8; +pub const IPPROTO_EGP: cty::c_uint = 8; #[doc = " PUP protocol."] -pub const IPPROTO_PUP: _bindgen_ty_6 = 12; +pub const IPPROTO_PUP: cty::c_uint = 12; #[doc = " User Datagram Protocol."] -pub const IPPROTO_UDP: _bindgen_ty_6 = 17; +pub const IPPROTO_UDP: cty::c_uint = 17; #[doc = " XNS IDP protocol."] -pub const IPPROTO_IDP: _bindgen_ty_6 = 22; +pub const IPPROTO_IDP: cty::c_uint = 22; #[doc = " SO Transport Protocol Class 4."] -pub const IPPROTO_TP: _bindgen_ty_6 = 29; +pub const IPPROTO_TP: cty::c_uint = 29; #[doc = " Datagram Congestion Control Protocol."] -pub const IPPROTO_DCCP: _bindgen_ty_6 = 33; +pub const IPPROTO_DCCP: cty::c_uint = 33; #[doc = " IPv6 header."] -pub const IPPROTO_IPV6: _bindgen_ty_6 = 41; +pub const IPPROTO_IPV6: cty::c_uint = 41; #[doc = " Reservation Protocol."] -pub const IPPROTO_RSVP: _bindgen_ty_6 = 46; +pub const IPPROTO_RSVP: cty::c_uint = 46; #[doc = " General Routing Encapsulation."] -pub const IPPROTO_GRE: _bindgen_ty_6 = 47; +pub const IPPROTO_GRE: cty::c_uint = 47; #[doc = " encapsulating security payload."] -pub const IPPROTO_ESP: _bindgen_ty_6 = 50; +pub const IPPROTO_ESP: cty::c_uint = 50; #[doc = " authentication header."] -pub const IPPROTO_AH: _bindgen_ty_6 = 51; +pub const IPPROTO_AH: cty::c_uint = 51; #[doc = " Multicast Transport Protocol."] -pub const IPPROTO_MTP: _bindgen_ty_6 = 92; +pub const IPPROTO_MTP: cty::c_uint = 92; #[doc = " IP option pseudo header for BEET."] -pub const IPPROTO_BEETPH: _bindgen_ty_6 = 94; +pub const IPPROTO_BEETPH: cty::c_uint = 94; #[doc = " Encapsulation Header."] -pub const IPPROTO_ENCAP: _bindgen_ty_6 = 98; +pub const IPPROTO_ENCAP: cty::c_uint = 98; #[doc = " Protocol Independent Multicast."] -pub const IPPROTO_PIM: _bindgen_ty_6 = 103; +pub const IPPROTO_PIM: cty::c_uint = 103; #[doc = " Compression Header Protocol."] -pub const IPPROTO_COMP: _bindgen_ty_6 = 108; +pub const IPPROTO_COMP: cty::c_uint = 108; #[doc = " Stream Control Transmission Protocol."] -pub const IPPROTO_SCTP: _bindgen_ty_6 = 132; +pub const IPPROTO_SCTP: cty::c_uint = 132; #[doc = " UDP-Lite protocol."] -pub const IPPROTO_UDPLITE: _bindgen_ty_6 = 136; +pub const IPPROTO_UDPLITE: cty::c_uint = 136; #[doc = " MPLS in IP."] -pub const IPPROTO_MPLS: _bindgen_ty_6 = 137; +pub const IPPROTO_MPLS: cty::c_uint = 137; #[doc = " Raw IP packets."] -pub const IPPROTO_RAW: _bindgen_ty_6 = 255; -pub const IPPROTO_MAX: _bindgen_ty_6 = 256; +pub const IPPROTO_RAW: cty::c_uint = 255; +pub const IPPROTO_MAX: cty::c_uint = 256; #[doc = " Standard well-defined IP protocols."] -pub type _bindgen_ty_6 = u32; +pub type _bindgen_ty_6 = cty::c_uint; #[doc = " IPv6 Hop-by-Hop options."] -pub const IPPROTO_HOPOPTS: _bindgen_ty_7 = 0; +pub const IPPROTO_HOPOPTS: cty::c_uint = 0; #[doc = " IPv6 routing header."] -pub const IPPROTO_ROUTING: _bindgen_ty_7 = 43; +pub const IPPROTO_ROUTING: cty::c_uint = 43; #[doc = " IPv6 fragmentation header."] -pub const IPPROTO_FRAGMENT: _bindgen_ty_7 = 44; +pub const IPPROTO_FRAGMENT: cty::c_uint = 44; #[doc = " ICMPv6."] -pub const IPPROTO_ICMPV6: _bindgen_ty_7 = 58; +pub const IPPROTO_ICMPV6: cty::c_uint = 58; #[doc = " IPv6 no next header."] -pub const IPPROTO_NONE: _bindgen_ty_7 = 59; +pub const IPPROTO_NONE: cty::c_uint = 59; #[doc = " IPv6 destination options."] -pub const IPPROTO_DSTOPTS: _bindgen_ty_7 = 60; +pub const IPPROTO_DSTOPTS: cty::c_uint = 60; #[doc = " IPv6 mobility header."] -pub const IPPROTO_MH: _bindgen_ty_7 = 135; -pub type _bindgen_ty_7 = u32; +pub const IPPROTO_MH: cty::c_uint = 135; +pub type _bindgen_ty_7 = cty::c_uint; #[doc = " Type to represent a port."] pub type in_port_t = u16; #[doc = " Echo service."] -pub const IPPORT_ECHO: _bindgen_ty_8 = 7; +pub const IPPORT_ECHO: cty::c_uint = 7; #[doc = " Discard transmissions service."] -pub const IPPORT_DISCARD: _bindgen_ty_8 = 9; +pub const IPPORT_DISCARD: cty::c_uint = 9; #[doc = " System status service."] -pub const IPPORT_SYSTAT: _bindgen_ty_8 = 11; +pub const IPPORT_SYSTAT: cty::c_uint = 11; #[doc = " Time of day service."] -pub const IPPORT_DAYTIME: _bindgen_ty_8 = 13; +pub const IPPORT_DAYTIME: cty::c_uint = 13; #[doc = " Network status service."] -pub const IPPORT_NETSTAT: _bindgen_ty_8 = 15; +pub const IPPORT_NETSTAT: cty::c_uint = 15; #[doc = " File Transfer Protocol."] -pub const IPPORT_FTP: _bindgen_ty_8 = 21; +pub const IPPORT_FTP: cty::c_uint = 21; #[doc = " Telnet protocol."] -pub const IPPORT_TELNET: _bindgen_ty_8 = 23; +pub const IPPORT_TELNET: cty::c_uint = 23; #[doc = " Simple Mail Transfer Protocol."] -pub const IPPORT_SMTP: _bindgen_ty_8 = 25; +pub const IPPORT_SMTP: cty::c_uint = 25; #[doc = " Timeserver service."] -pub const IPPORT_TIMESERVER: _bindgen_ty_8 = 37; +pub const IPPORT_TIMESERVER: cty::c_uint = 37; #[doc = " Domain Name Service."] -pub const IPPORT_NAMESERVER: _bindgen_ty_8 = 42; +pub const IPPORT_NAMESERVER: cty::c_uint = 42; #[doc = " Internet Whois service."] -pub const IPPORT_WHOIS: _bindgen_ty_8 = 43; -pub const IPPORT_MTP: _bindgen_ty_8 = 57; +pub const IPPORT_WHOIS: cty::c_uint = 43; +pub const IPPORT_MTP: cty::c_uint = 57; #[doc = " Trivial File Transfer Protocol."] -pub const IPPORT_TFTP: _bindgen_ty_8 = 69; -pub const IPPORT_RJE: _bindgen_ty_8 = 77; +pub const IPPORT_TFTP: cty::c_uint = 69; +pub const IPPORT_RJE: cty::c_uint = 77; #[doc = " Finger service."] -pub const IPPORT_FINGER: _bindgen_ty_8 = 79; -pub const IPPORT_TTYLINK: _bindgen_ty_8 = 87; +pub const IPPORT_FINGER: cty::c_uint = 79; +pub const IPPORT_TTYLINK: cty::c_uint = 87; #[doc = " SUPDUP protocol."] -pub const IPPORT_SUPDUP: _bindgen_ty_8 = 95; +pub const IPPORT_SUPDUP: cty::c_uint = 95; #[doc = " execd service."] -pub const IPPORT_EXECSERVER: _bindgen_ty_8 = 512; +pub const IPPORT_EXECSERVER: cty::c_uint = 512; #[doc = " rlogind service."] -pub const IPPORT_LOGINSERVER: _bindgen_ty_8 = 513; -pub const IPPORT_CMDSERVER: _bindgen_ty_8 = 514; -pub const IPPORT_EFSSERVER: _bindgen_ty_8 = 520; +pub const IPPORT_LOGINSERVER: cty::c_uint = 513; +pub const IPPORT_CMDSERVER: cty::c_uint = 514; +pub const IPPORT_EFSSERVER: cty::c_uint = 520; #[doc = " UDP ports."] -pub const IPPORT_BIFFUDP: _bindgen_ty_8 = 512; +pub const IPPORT_BIFFUDP: cty::c_uint = 512; #[doc = " UDP ports."] -pub const IPPORT_WHOSERVER: _bindgen_ty_8 = 513; +pub const IPPORT_WHOSERVER: cty::c_uint = 513; #[doc = " UDP ports."] -pub const IPPORT_ROUTESERVER: _bindgen_ty_8 = 520; +pub const IPPORT_ROUTESERVER: cty::c_uint = 520; #[doc = " Ports less than this value are reserved for privileged processes."] -pub const IPPORT_RESERVED: _bindgen_ty_8 = 1024; +pub const IPPORT_RESERVED: cty::c_uint = 1024; #[doc = " Ports greater this value are reserved for (non-privileged) servers."] -pub const IPPORT_USERRESERVED: _bindgen_ty_8 = 5000; +pub const IPPORT_USERRESERVED: cty::c_uint = 5000; #[doc = " Standard well-known ports."] -pub type _bindgen_ty_8 = u32; +pub type _bindgen_ty_8 = cty::c_uint; #[doc = " IPv6 address"] #[repr(C)] #[derive(Copy, Clone)] @@ -4595,32 +4598,37 @@ extern "C" { ); } #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug)] pub struct notcurses { _unused: [u8; 0], } #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug)] pub struct ncplane { _unused: [u8; 0], } #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug)] pub struct ncvisual { _unused: [u8; 0], } #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug)] pub struct ncuplot { _unused: [u8; 0], } #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug)] pub struct ncdplot { _unused: [u8; 0], } #[repr(C)] #[derive(Debug, Copy, Clone)] +pub struct ncprogbar { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug)] pub struct ncfdplane { _unused: [u8; 0], } @@ -4630,17 +4638,17 @@ pub struct ncsubproc { _unused: [u8; 0], } #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug)] pub struct ncselector { _unused: [u8; 0], } #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug)] pub struct ncmultiselector { _unused: [u8; 0], } #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug)] pub struct ncreader { _unused: [u8; 0], } @@ -4665,25 +4673,29 @@ pub const ncblitter_e_NCBLIT_4x1: ncblitter_e = 5; pub const ncblitter_e_NCBLIT_BRAILLE: ncblitter_e = 6; #[doc = " eight vertical levels █▇▆▅▄▃▂▁"] pub const ncblitter_e_NCBLIT_8x1: ncblitter_e = 7; -#[doc = " 6 rows, 1 col (RGB), spotty support among terminals"] +#[doc = " not yet implemented"] pub const ncblitter_e_NCBLIT_SIXEL: ncblitter_e = 8; #[doc = " we never blit full blocks, but instead spaces (more efficient) with the"] #[doc = " background set to the desired foreground."] -pub type ncblitter_e = u32; +pub type ncblitter_e = cty::c_uint; pub const ncalign_e_NCALIGN_UNALIGNED: ncalign_e = 0; pub const ncalign_e_NCALIGN_LEFT: ncalign_e = 1; pub const ncalign_e_NCALIGN_CENTER: ncalign_e = 2; pub const ncalign_e_NCALIGN_RIGHT: ncalign_e = 3; #[doc = " Alignment within a plane or terminal. Left/right-justified, or centered."] -pub type ncalign_e = u32; +pub type ncalign_e = cty::c_uint; pub const ncscale_e_NCSCALE_NONE: ncscale_e = 0; pub const ncscale_e_NCSCALE_SCALE: ncscale_e = 1; pub const ncscale_e_NCSCALE_STRETCH: ncscale_e = 2; +pub const ncscale_e_NCSCALE_NONE_HIRES: ncscale_e = 3; +pub const ncscale_e_NCSCALE_SCALE_HIRES: ncscale_e = 4; #[doc = " How to scale an ncvisual during rendering. NCSCALE_NONE will apply no"] #[doc = " scaling. NCSCALE_SCALE scales a visual to the plane's size, maintaining"] #[doc = " aspect ratio. NCSCALE_STRETCH stretches and scales the image in an"] -#[doc = " attempt to fill the entirety of the plane."] -pub type ncscale_e = u32; +#[doc = " attempt to fill the entirety of the plane. NCSCALE_NONE_HIRES and"] +#[doc = " NCSCALE_SCALE_HIRES behave like their counterparts, but admit blitters"] +#[doc = " which don't preserve aspect ratio."] +pub type ncscale_e = cty::c_uint; extern "C" { #[doc = " Returns the number of columns occupied by a multibyte (UTF-8) string, or"] #[doc = " -1 if a non-printable/illegal character is encountered."] @@ -4702,7 +4714,7 @@ extern "C" { buflen: size_t, ) -> cty::c_int; } -#[doc = " A cell corresponds to a single character cell on some plane, which can be"] +#[doc = " An nccell corresponds to a single character cell on some plane, which can be"] #[doc = " occupied by a single grapheme cluster (some root spacing glyph, along with"] #[doc = " possible combining characters, which might span multiple columns). At any"] #[doc = " cell, we can have a theoretically arbitrarily long UTF-8 string, a foreground"] @@ -4718,17 +4730,16 @@ extern "C" { #[doc = " Existence is suffering, and thus wcwidth() is not reliable. It's just"] #[doc = " quoting whether or not the EGC contains a \"Wide Asian\" double-width"] #[doc = " character. This is set for some things, like most emoji, and not set for"] -#[doc = " other things, like cuneiform. Fucccccck. True display width is a *property"] -#[doc = " of the font*. Fuccccccccckkkkk. Among the longest Unicode codepoints is"] +#[doc = " other things, like cuneiform. True display width is a *function of the"] +#[doc = " font and terminal*. Among the longest Unicode codepoints is"] #[doc = ""] #[doc = " U+FDFD ARABIC LIGATURE BISMILLAH AR-RAHMAN AR-RAHEEM ﷽"] #[doc = ""] -#[doc = " wcwidth() rather optimistically claims this suicide bomber of a glyph to"] -#[doc = " occupy a single column, right before it explodes in your diner. BiDi text"] -#[doc = " is too complicated for me to even get into here. It sucks ass. Be assured"] -#[doc = " there are no easy answers. Allah, the All-Powerful, has fucked us again!"] +#[doc = " wcwidth() rather optimistically claims this most exalted glyph to occupy"] +#[doc = " a single column. BiDi text is too complicated for me to even get into here."] +#[doc = " Be assured there are no easy answers; ours is indeed a disturbing Universe."] #[doc = ""] -#[doc = " Each cell occupies 16 static bytes (128 bits). The surface is thus ~1.6MB"] +#[doc = " Each nccell occupies 16 static bytes (128 bits). The surface is thus ~1.6MB"] #[doc = " for a (pretty large) 500x200 terminal. At 80x43, it's less than 64KB."] #[doc = " Dynamic requirements (the egcpool) can add up to 16MB to an ncplane, but"] #[doc = " such large pools are unlikely in common use."] @@ -4752,99 +4763,101 @@ extern "C" { #[doc = " play, and fully supports all transparency options."] #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct cell { - #[doc = " 4B → 4B"] +pub struct nccell { + #[doc = " 4B → 4B little endian EGC"] pub gcluster: u32, #[doc = " 1B → 5B (8 bits of zero)"] pub gcluster_backstop: u8, - #[doc = " 1B → 6B (8 reserved bits, ought be zero)"] - pub reserved: u8, + #[doc = " 1B → 6B (8 bits of EGC width, bias-1)"] + pub width: u8, #[doc = " 2B → 8B (16 bits of NCSTYLE_* attributes)"] pub stylemask: u16, #[doc = " + 8B == 16B"] pub channels: u64, } #[test] -fn bindgen_test_layout_cell() { +fn bindgen_test_layout_nccell() { assert_eq!( - ::core::mem::size_of::(), + ::core::mem::size_of::(), 16usize, - concat!("Size of: ", stringify!(cell)) + concat!("Size of: ", stringify!(nccell)) ); assert_eq!( - ::core::mem::align_of::(), + ::core::mem::align_of::(), 8usize, - concat!("Alignment of ", stringify!(cell)) + concat!("Alignment of ", stringify!(nccell)) ); assert_eq!( - unsafe { &(*(::core::ptr::null::())).gcluster as *const _ as usize }, + unsafe { &(*(::core::ptr::null::())).gcluster as *const _ as usize }, 0usize, concat!( "Offset of field: ", - stringify!(cell), + stringify!(nccell), "::", stringify!(gcluster) ) ); assert_eq!( - unsafe { &(*(::core::ptr::null::())).gcluster_backstop as *const _ as usize }, + unsafe { &(*(::core::ptr::null::())).gcluster_backstop as *const _ as usize }, 4usize, concat!( "Offset of field: ", - stringify!(cell), + stringify!(nccell), "::", stringify!(gcluster_backstop) ) ); assert_eq!( - unsafe { &(*(::core::ptr::null::())).reserved as *const _ as usize }, + unsafe { &(*(::core::ptr::null::())).width as *const _ as usize }, 5usize, concat!( "Offset of field: ", - stringify!(cell), + stringify!(nccell), "::", - stringify!(reserved) + stringify!(width) ) ); assert_eq!( - unsafe { &(*(::core::ptr::null::())).stylemask as *const _ as usize }, + unsafe { &(*(::core::ptr::null::())).stylemask as *const _ as usize }, 6usize, concat!( "Offset of field: ", - stringify!(cell), + stringify!(nccell), "::", stringify!(stylemask) ) ); assert_eq!( - unsafe { &(*(::core::ptr::null::())).channels as *const _ as usize }, + unsafe { &(*(::core::ptr::null::())).channels as *const _ as usize }, 8usize, concat!( "Offset of field: ", - stringify!(cell), + stringify!(nccell), "::", stringify!(channels) ) ); } +pub type cell = nccell; extern "C" { - #[doc = " Breaks the UTF-8 string in 'gcluster' down, setting up the cell 'c'. Returns"] - #[doc = " the number of bytes copied out of 'gcluster', or -1 on failure. The styling"] - #[doc = " of the cell is left untouched, but any resources are released."] - pub fn cell_load(n: *mut ncplane, c: *mut cell, gcluster: *const cty::c_char) -> cty::c_int; + #[doc = " Breaks the UTF-8 string in 'gcluster' down, setting up the nccell 'c'."] + #[doc = " Returns the number of bytes copied out of 'gcluster', or -1 on failure. The"] + #[doc = " styling of the cell is left untouched, but any resources are released."] + pub fn cell_load(n: *mut ncplane, c: *mut nccell, gcluster: *const cty::c_char) -> cty::c_int; } extern "C" { - #[doc = " Duplicate 'c' into 'targ'; both must be/will be bound to 'n'."] - pub fn cell_duplicate(n: *mut ncplane, targ: *mut cell, c: *const cell) -> cty::c_int; + #[doc = " Duplicate 'c' into 'targ'; both must be/will be bound to 'n'. Returns -1 on"] + #[doc = " failure, and 0 on success."] + pub fn cell_duplicate(n: *mut ncplane, targ: *mut nccell, c: *const nccell) -> cty::c_int; } extern "C" { - #[doc = " Release resources held by the cell 'c'."] - pub fn cell_release(n: *mut ncplane, c: *mut cell); + #[doc = " Release resources held by the nccell 'c'."] + pub fn cell_release(n: *mut ncplane, c: *mut nccell); } extern "C" { #[doc = " return a pointer to the NUL-terminated EGC referenced by 'c'. this pointer"] #[doc = " can be invalidated by any further operation on the plane 'n', so...watch out!"] - pub fn cell_extended_gcluster(n: *const ncplane, c: *const cell) -> *const cty::c_char; + pub fn cell_extended_gcluster(n: *const ncplane, c: *const nccell) -> *const cty::c_char; } #[doc = " default. print nothing once fullscreen service begins"] pub const ncloglevel_e_NCLOGLEVEL_SILENT: ncloglevel_e = 0; @@ -4869,7 +4882,7 @@ pub const ncloglevel_e_NCLOGLEVEL_TRACE: ncloglevel_e = 8; #[doc = " and closing banners, which can be disabled via the notcurses_option struct's"] #[doc = " 'suppress_banner'. Note that if stderr is connected to the same terminal on"] #[doc = " which we're rendering, any kind of logging will disrupt the output."] -pub type ncloglevel_e = u32; +pub type ncloglevel_e = cty::c_uint; #[doc = " Configuration for notcurses_init()."] #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -5040,9 +5053,26 @@ extern "C" { pub fn notcurses_stop(nc: *mut notcurses) -> cty::c_int; } extern "C" { - #[doc = " Make the physical screen match the virtual screen. Changes made to the"] - #[doc = " virtual screen (i.e. most other calls) will not be visible until after a"] - #[doc = " successful call to notcurses_render()."] + #[doc = " Return the topmost plane of the pile containing 'n'."] + pub fn ncpile_top(n: *mut ncplane) -> *mut ncplane; +} +extern "C" { + #[doc = " Return the bottommost plane of the pile containing 'n'."] + pub fn ncpile_bottom(n: *mut ncplane) -> *mut ncplane; +} +extern "C" { + #[doc = " Renders the pile of which 'n' is a part. Rendering this pile again will blow"] + #[doc = " away the render. To actually write out the render, call ncpile_rasterize()."] + pub fn ncpile_render(n: *mut ncplane) -> cty::c_int; +} +extern "C" { + #[doc = " Make the physical screen match the last rendered frame from the pile of"] + #[doc = " which 'n' is a part. This is a blocking call. Don't call this before the"] + #[doc = " pile has been rendered (doing so will likely result in a blank screen)."] + pub fn ncpile_rasterize(n: *mut ncplane) -> cty::c_int; +} +extern "C" { + #[doc = " Renders and rasterizes the standard pile in one shot. Blocking call."] pub fn notcurses_render(nc: *mut notcurses) -> cty::c_int; } extern "C" { @@ -5207,6 +5237,16 @@ extern "C" { #[doc = " Disable mouse events. Any events in the input queue can still be delivered."] pub fn notcurses_mouse_disable(n: *mut notcurses) -> cty::c_int; } +extern "C" { + #[doc = " Disable signals originating from the terminal's line discipline, i.e."] + #[doc = " SIGINT (^C), SIGQUIT (^\\), and SIGTSTP (^Z). They are enabled by default."] + pub fn notcurses_linesigs_disable(n: *mut notcurses) -> cty::c_int; +} +extern "C" { + #[doc = " Restore signals originating from the terminal's line discipline, i.e."] + #[doc = " SIGINT (^C), SIGQUIT (^\\), and SIGTSTP (^Z), if disabled."] + pub fn notcurses_linesigs_enable(n: *mut notcurses) -> cty::c_int; +} extern "C" { #[doc = " Refresh the physical screen to match what was last rendered (i.e., without"] #[doc = " reflecting any changes since the last call to notcurses_render()). This is"] @@ -5251,12 +5291,12 @@ extern "C" { ) -> *mut cty::c_char; } #[repr(C)] -#[derive(Copy, Clone)] +#[derive(Debug, Copy, Clone)] pub struct ncplane_options { #[doc = " vertical placement relative to parent plane"] pub y: cty::c_int, #[doc = " horizontal placement relative to parent plane"] - pub horiz: ncplane_options__bindgen_ty_1, + pub x: cty::c_int, #[doc = " number of rows, must be positive"] pub rows: cty::c_int, #[doc = " number of columns, must be positive"] @@ -5270,50 +5310,6 @@ pub struct ncplane_options { #[doc = " closure over NCPLANE_OPTION_*"] pub flags: u64, } -#[repr(C)] -#[derive(Copy, Clone)] -pub union ncplane_options__bindgen_ty_1 { - pub x: cty::c_int, - pub align: ncalign_e, - _bindgen_union_align: u32, -} -#[test] -fn bindgen_test_layout_ncplane_options__bindgen_ty_1() { - assert_eq!( - ::core::mem::size_of::(), - 4usize, - concat!("Size of: ", stringify!(ncplane_options__bindgen_ty_1)) - ); - assert_eq!( - ::core::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(ncplane_options__bindgen_ty_1)) - ); - assert_eq!( - unsafe { - &(*(::core::ptr::null::())).x as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ncplane_options__bindgen_ty_1), - "::", - stringify!(x) - ) - ); - assert_eq!( - unsafe { - &(*(::core::ptr::null::())).align as *const _ as usize - }, - 0usize, - concat!( - "Offset of field: ", - stringify!(ncplane_options__bindgen_ty_1), - "::", - stringify!(align) - ) - ); -} #[test] fn bindgen_test_layout_ncplane_options() { assert_eq!( @@ -5337,13 +5333,13 @@ fn bindgen_test_layout_ncplane_options() { ) ); assert_eq!( - unsafe { &(*(::core::ptr::null::())).horiz as *const _ as usize }, + unsafe { &(*(::core::ptr::null::())).x as *const _ as usize }, 4usize, concat!( "Offset of field: ", stringify!(ncplane_options), "::", - stringify!(horiz) + stringify!(x) ) ); assert_eq!( @@ -5408,7 +5404,7 @@ fn bindgen_test_layout_ncplane_options() { ); } extern "C" { - #[doc = " Create a new ncplane bound to plane 'n', at THE OFFset 'y'x'x' (relative to"] + #[doc = " Create a new ncplane bound to plane 'n', at the offset 'y'x'x' (relative to"] #[doc = " the origin of 'n') and the specified size. The number of 'rows' and 'cols'"] #[doc = " must both be positive. This plane is initially at the top of the z-buffer,"] #[doc = " as if ncplane_move_top() had been called on it. The void* 'userptr' can be"] @@ -5416,8 +5412,13 @@ extern "C" { pub fn ncplane_create(n: *mut ncplane, nopts: *const ncplane_options) -> *mut ncplane; } extern "C" { - #[doc = " This function will be marked deprecated in 2.0 in favor of ncplane_create()."] - #[doc = " It persists only for backwards compatibility."] + #[doc = " Same as ncplane_create(), but creates a new pile. The returned plane will"] + #[doc = " be the top, bottom, and root of this new pile."] + pub fn ncpile_create(nc: *mut notcurses, nopts: *const ncplane_options) -> *mut ncplane; +} +extern "C" { + #[doc = " This function will be removed in 3.0 in favor of ncplane_create()."] + #[doc = " It persists in 2.0 only for backwards compatibility."] pub fn ncplane_new( n: *mut ncplane, rows: cty::c_int, @@ -5429,19 +5430,50 @@ extern "C" { ) -> *mut ncplane; } extern "C" { - #[doc = " Suitable for use as a `resizecb`. This will realign the plane 'n' against its"] - #[doc = " parent, using the alignment specified at ncplane_create()-time."] + #[doc = " Suitable for use as a 'resizecb', this will resize the plane to the visual"] + #[doc = " region's size. It is used for the standard plane."] + pub fn ncplane_resize_maximize(n: *mut ncplane) -> cty::c_int; +} +extern "C" { + #[doc = " Suitable for use as a 'resizecb'. This will realign the plane 'n' against"] + #[doc = " its parent, using the alignment specified at ncplane_create()-time."] pub fn ncplane_resize_realign(n: *mut ncplane) -> cty::c_int; } extern "C" { - #[doc = " Plane 'n' will be unbound from its parent plane, if it is currently bound,"] - #[doc = " and will be made a bound child of 'newparent', if 'newparent' is not NULL."] + #[doc = " Replace the ncplane's existing resizecb with 'resizecb' (which may be NULL)."] + #[doc = " The standard plane's resizecb may not be changed."] + pub fn ncplane_set_resizecb( + n: *mut ncplane, + resizecb: ::core::option::Option cty::c_int>, + ); +} +extern "C" { + #[doc = " Returns the ncplane's current resize callback."] + pub fn ncplane_resizecb( + n: *const ncplane, + ) -> ::core::option::Option cty::c_int>; +} +extern "C" { + #[doc = " Plane 'n' will be unbound from its parent plane, and will be made a bound"] + #[doc = " child of 'newparent'. It is an error if 'n' or 'newparent' are NULL. If"] + #[doc = " 'newparent' is equal to 'n', 'n' becomes the root of a new pile, unless 'n'"] + #[doc = " is already the root of a pile, in which case this is a no-op. Returns 'n'."] + #[doc = " The standard plane cannot be reparented. Any planes bound to 'n' are"] + #[doc = " reparented to the previous parent of 'n'."] pub fn ncplane_reparent(n: *mut ncplane, newparent: *mut ncplane) -> *mut ncplane; } +extern "C" { + #[doc = " The same as ncplane_reparent(), except any planes bound to 'n' come along"] + #[doc = " with it to its new destination. Their z-order is maintained. If 'newparent'"] + #[doc = " is an ancestor of 'n', NULL is returned, and no changes are made."] + pub fn ncplane_reparent_family(n: *mut ncplane, newparent: *mut ncplane) -> *mut ncplane; +} extern "C" { #[doc = " Duplicate an existing ncplane. The new plane will have the same geometry,"] #[doc = " will duplicate all content, and will start with the same rendering state."] - #[doc = " The new plane will be immediately above the old one on the z axis."] + #[doc = " The new plane will be immediately above the old one on the z axis, and will"] + #[doc = " be bound to the same parent. Bound planes are *not* duplicated; the new"] + #[doc = " plane is bound to the parent of 'n', but has no bound planes."] pub fn ncplane_dup(n: *const ncplane, opaque: *mut cty::c_void) -> *mut ncplane; } extern "C" { @@ -5506,6 +5538,10 @@ extern "C" { #[doc = " Is our encoding UTF-8? Requires LANG being set to a UTF8 locale."] pub fn notcurses_canutf8(nc: *const notcurses) -> bool; } +extern "C" { + #[doc = " Can we reliably use Unicode 13 sextants?"] + pub fn notcurses_cansextant(nc: *const notcurses) -> bool; +} extern "C" { #[doc = " Can we blit to Sixel?"] pub fn notcurses_cansixel(nc: *const notcurses) -> bool; @@ -5551,6 +5587,8 @@ pub struct ncstats { pub defaultelisions: u64, #[doc = " default color was elided"] pub defaultemissions: u64, + #[doc = " refresh requests (non-optimized redraw)"] + pub refreshes: u64, #[doc = " total bytes devoted to all active framebuffers"] pub fbbytes: u64, #[doc = " number of planes currently in existence"] @@ -5560,7 +5598,7 @@ pub struct ncstats { fn bindgen_test_layout_ncstats() { assert_eq!( ::core::mem::size_of::(), - 168usize, + 176usize, concat!("Size of: ", stringify!(ncstats)) ); assert_eq!( @@ -5759,8 +5797,18 @@ fn bindgen_test_layout_ncstats() { ) ); assert_eq!( - unsafe { &(*(::core::ptr::null::())).fbbytes as *const _ as usize }, + unsafe { &(*(::core::ptr::null::())).refreshes as *const _ as usize }, 152usize, + concat!( + "Offset of field: ", + stringify!(ncstats), + "::", + stringify!(refreshes) + ) + ); + assert_eq!( + unsafe { &(*(::core::ptr::null::())).fbbytes as *const _ as usize }, + 160usize, concat!( "Offset of field: ", stringify!(ncstats), @@ -5770,7 +5818,7 @@ fn bindgen_test_layout_ncstats() { ); assert_eq!( unsafe { &(*(::core::ptr::null::())).planes as *const _ as usize }, - 160usize, + 168usize, concat!( "Offset of field: ", stringify!(ncstats), @@ -5826,13 +5874,13 @@ extern "C" { pub fn ncplane_destroy(n: *mut ncplane) -> cty::c_int; } extern "C" { - #[doc = " Set the ncplane's base cell to this cell. It will be used for purposes of"] - #[doc = " rendering anywhere that the ncplane's gcluster is 0. Erasing the ncplane"] + #[doc = " Set the ncplane's base nccell to this nccell. It will be used for purposes"] + #[doc = " of rendering anywhere that the ncplane's gcluster is 0. Erasing the ncplane"] #[doc = " does not reset the base cell; this function must be called with a zero 'c'."] - pub fn ncplane_set_base_cell(n: *mut ncplane, c: *const cell) -> cty::c_int; + pub fn ncplane_set_base_cell(n: *mut ncplane, c: *const nccell) -> cty::c_int; } extern "C" { - #[doc = " Set the ncplane's base cell to this cell. It will be used for purposes of"] + #[doc = " Set the ncplane's base nccell to this cell. It will be used for purposes of"] #[doc = " rendering anywhere that the ncplane's gcluster is 0. Erasing the ncplane"] #[doc = " does not reset the base cell; this function must be called with an empty"] #[doc = " 'egc'. 'egc' must be a single extended grapheme cluster."] @@ -5844,9 +5892,9 @@ extern "C" { ) -> cty::c_int; } extern "C" { - #[doc = " Extract the ncplane's base cell into 'c'. The reference is invalidated if"] + #[doc = " Extract the ncplane's base nccell into 'c'. The reference is invalidated if"] #[doc = " 'ncp' is destroyed."] - pub fn ncplane_base(n: *mut ncplane, c: *mut cell) -> cty::c_int; + pub fn ncplane_base(n: *mut ncplane, c: *mut nccell) -> cty::c_int; } extern "C" { #[doc = " Move this plane relative to the standard plane, or the plane to which it is"] @@ -5920,6 +5968,12 @@ extern "C" { channels: *mut u64, ) -> *mut cty::c_char; } +extern "C" { + #[doc = " Retrieve the current contents of the cell under the cursor into 'c'. This"] + #[doc = " cell is invalidated if the associated plane is destroyed. Returns the number"] + #[doc = " of bytes in the EGC, or -1 on error."] + pub fn ncplane_at_cursor_cell(n: *mut ncplane, c: *mut nccell) -> cty::c_int; +} extern "C" { #[doc = " Retrieve the current contents of the specified cell. The EGC is returned, or"] #[doc = " NULL on error. This EGC must be free()d by the caller. The stylemask and"] @@ -5932,6 +5986,17 @@ extern "C" { channels: *mut u64, ) -> *mut cty::c_char; } +extern "C" { + #[doc = " Retrieve the current contents of the specified cell into 'c'. This cell is"] + #[doc = " invalidated if the associated plane is destroyed. Returns the number of"] + #[doc = " bytes in the EGC, or -1 on error."] + pub fn ncplane_at_yx_cell( + n: *mut ncplane, + y: cty::c_int, + x: cty::c_int, + c: *mut nccell, + ) -> cty::c_int; +} extern "C" { #[doc = " Create a flat string from the EGCs of the selected region of the ncplane"] #[doc = " 'n'. Start at the plane's 'begy'x'begx' coordinate (which must lie on the"] @@ -5988,7 +6053,7 @@ extern "C" { n: *mut ncplane, y: cty::c_int, x: cty::c_int, - c: *const cell, + c: *const nccell, ) -> cty::c_int; } extern "C" { @@ -6145,7 +6210,7 @@ extern "C" { #[doc = " cells drawn."] pub fn ncplane_hline_interp( n: *mut ncplane, - c: *const cell, + c: *const nccell, len: cty::c_int, c1: u64, c2: u64, @@ -6154,7 +6219,7 @@ extern "C" { extern "C" { pub fn ncplane_vline_interp( n: *mut ncplane, - c: *const cell, + c: *const nccell, len: cty::c_int, c1: u64, c2: u64, @@ -6181,12 +6246,12 @@ extern "C" { #[doc = " are never drawn (since at most 2 edges can touch a box's corner)."] pub fn ncplane_box( n: *mut ncplane, - ul: *const cell, - ur: *const cell, - ll: *const cell, - lr: *const cell, - hline: *const cell, - vline: *const cell, + ul: *const nccell, + ur: *const nccell, + ll: *const nccell, + lr: *const nccell, + hline: *const nccell, + vline: *const nccell, ystop: cty::c_int, xstop: cty::c_int, ctlword: cty::c_uint, @@ -6202,7 +6267,7 @@ extern "C" { n: *mut ncplane, y: cty::c_int, x: cty::c_int, - c: *const cell, + c: *const nccell, ) -> cty::c_int; } extern "C" { @@ -6314,10 +6379,10 @@ extern "C" { ) -> cty::c_int; } extern "C" { - #[doc = " Erase every cell in the ncplane, resetting all attributes to normal, all"] - #[doc = " colors to the default color, and all cells to undrawn. All cells associated"] - #[doc = " with this ncplane is invalidated, and must not be used after the call,"] - #[doc = " *excluding* the base cell. The cursor is homed."] + #[doc = " Erase every cell in the ncplane (each cell is initialized to the null glyph"] + #[doc = " and the default channels/styles). All cells associated with this ncplane are"] + #[doc = " invalidated, and must not be used after the call, *excluding* the base cell."] + #[doc = " The cursor is homed. The plane's active attributes are unaffected."] pub fn ncplane_erase(n: *mut ncplane); } extern "C" { @@ -6394,10 +6459,10 @@ extern "C" { } extern "C" { #[doc = " Same, but with rgb assembled into a channel (i.e. lower 24 bits)."] - pub fn ncplane_set_fg_rgb(n: *mut ncplane, channel: cty::c_uint) -> cty::c_int; + pub fn ncplane_set_fg_rgb(n: *mut ncplane, channel: u32) -> cty::c_int; } extern "C" { - pub fn ncplane_set_bg_rgb(n: *mut ncplane, channel: cty::c_uint) -> cty::c_int; + pub fn ncplane_set_bg_rgb(n: *mut ncplane, channel: u32) -> cty::c_int; } extern "C" { #[doc = " Use the default color for the foreground/background."] @@ -6508,12 +6573,12 @@ extern "C" { n: *mut ncplane, styles: u32, channels: u64, - ul: *mut cell, - ur: *mut cell, - ll: *mut cell, - lr: *mut cell, - hl: *mut cell, - vl: *mut cell, + ul: *mut nccell, + ur: *mut nccell, + ll: *mut nccell, + lr: *mut nccell, + hl: *mut nccell, + vl: *mut nccell, ) -> cty::c_int; } extern "C" { @@ -6521,12 +6586,12 @@ extern "C" { n: *mut ncplane, styles: u32, channels: u64, - ul: *mut cell, - ur: *mut cell, - ll: *mut cell, - lr: *mut cell, - hl: *mut cell, - vl: *mut cell, + ul: *mut nccell, + ur: *mut nccell, + ll: *mut nccell, + lr: *mut nccell, + hl: *mut nccell, + vl: *mut nccell, ) -> cty::c_int; } extern "C" { @@ -6759,7 +6824,7 @@ extern "C" { } extern "C" { #[doc = " decode the next frame ala ncvisual_decode(), but if we have reached the end,"] - #[doc = " rewind to the first frame of the ncvisual. a subsequent `ncvisual_render()`"] + #[doc = " rewind to the first frame of the ncvisual. a subsequent 'ncvisual_render()'"] #[doc = " will render the first frame, as if the ncvisual had been closed and reopened."] #[doc = " the return values remain the same as those of ncvisual_decode()."] pub fn ncvisual_decode_loop(nc: *mut ncvisual) -> cty::c_int; @@ -6978,7 +7043,7 @@ pub struct nctablet { _unused: [u8; 0], } #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug)] pub struct ncreel { _unused: [u8; 0], } @@ -7086,6 +7151,8 @@ extern "C" { #[doc = " mult: base of suffix system (almost always 1000 or 1024)"] #[doc = " uprefix: character to print following suffix ('i' for kibibytes basically)."] #[doc = " only printed if suffix is actually printed (input >= mult)."] + #[doc = ""] + #[doc = " You are encouraged to consult notcurses_metric(3)."] pub fn ncmetric( val: uintmax_t, decimal: uintmax_t, @@ -7157,20 +7224,7 @@ extern "C" { pub fn ncplane_greyscale(n: *mut ncplane); } #[doc = " selection widget -- an ncplane with a title header and a body section. the"] -#[doc = " body section supports infinite scrolling up and down. the widget looks like:"] -#[doc = ""] -#[doc = " ╭──────────────────────────╮"] -#[doc = " │This is the primary header│"] -#[doc = " ╭──────────────────────this is the secondary header──────╮"] -#[doc = " │ ↑ │"] -#[doc = " │ option1 Long text #1 │"] -#[doc = " │ option2 Long text #2 │"] -#[doc = " │ option3 Long text #3 │"] -#[doc = " │ option4 Long text #4 │"] -#[doc = " │ option5 Long text #5 │"] -#[doc = " │ option6 Long text #6 │"] -#[doc = " │ ↓ │"] -#[doc = " ╰────────────────────────────────────here's the footer───╯"] +#[doc = " body section supports infinite scrolling up and down."] #[doc = ""] #[doc = " At all times, exactly one item is selected."] #[repr(C)] @@ -7498,23 +7552,6 @@ fn bindgen_test_layout_ncmselector_item() { } #[doc = " multiselection widget -- a selector supporting multiple selections."] #[doc = ""] -#[doc = " ╭───────────────────╮"] -#[doc = " │ short round title │"] -#[doc = "╭now this secondary is also very, very, very outlandishly long, you see┤"] -#[doc = "│ ↑ │"] -#[doc = "│ ☐ Pa231 Protactinium-231 (162kg) │"] -#[doc = "│ ☐ U233 Uranium-233 (15kg) │"] -#[doc = "│ ☐ U235 Uranium-235 (50kg) │"] -#[doc = "│ ☐ Np236 Neptunium-236 (7kg) │"] -#[doc = "│ ☐ Np237 Neptunium-237 (60kg) │"] -#[doc = "│ ☐ Pu238 Plutonium-238 (10kg) │"] -#[doc = "│ ☐ Pu239 Plutonium-239 (10kg) │"] -#[doc = "│ ☐ Pu240 Plutonium-240 (40kg) │"] -#[doc = "│ ☐ Pu241 Plutonium-241 (13kg) │"] -#[doc = "│ ☐ Am241 Americium-241 (100kg) │"] -#[doc = "│ ↓ │"] -#[doc = "╰────────────────────────press q to exit (there is sartrev(\"no exit\"))─╯"] -#[doc = ""] #[doc = " Unlike the selector widget, zero to all of the items can be selected, but"] #[doc = " also the widget does not support adding or removing items at runtime."] #[repr(C)] @@ -7900,7 +7937,7 @@ fn bindgen_test_layout_ncmenu_options() { ); } #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug)] pub struct ncmenu { _unused: [u8; 0], } @@ -7983,6 +8020,103 @@ extern "C" { } #[repr(C)] #[derive(Debug, Copy, Clone)] +pub struct ncprogbar_options { + #[doc = " upper-left channel. in the context of a progress bar,"] + pub ulchannel: u32, + #[doc = " \"up\" is the direction we are progressing towards, and"] + pub urchannel: u32, + #[doc = " \"bottom\" is the direction of origin. for monochromatic"] + pub blchannel: u32, + #[doc = " bar, all four channels ought be the same."] + pub brchannel: u32, + pub flags: u64, +} +#[test] +fn bindgen_test_layout_ncprogbar_options() { + assert_eq!( + ::core::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(ncprogbar_options)) + ); + assert_eq!( + ::core::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(ncprogbar_options)) + ); + assert_eq!( + unsafe { &(*(::core::ptr::null::())).ulchannel as *const _ as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(ncprogbar_options), + "::", + stringify!(ulchannel) + ) + ); + assert_eq!( + unsafe { &(*(::core::ptr::null::())).urchannel as *const _ as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(ncprogbar_options), + "::", + stringify!(urchannel) + ) + ); + assert_eq!( + unsafe { &(*(::core::ptr::null::())).blchannel as *const _ as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(ncprogbar_options), + "::", + stringify!(blchannel) + ) + ); + assert_eq!( + unsafe { &(*(::core::ptr::null::())).brchannel as *const _ as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(ncprogbar_options), + "::", + stringify!(brchannel) + ) + ); + assert_eq!( + unsafe { &(*(::core::ptr::null::())).flags as *const _ as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(ncprogbar_options), + "::", + stringify!(flags) + ) + ); +} +extern "C" { + #[doc = " Takes ownership of the ncplane 'n', which will be destroyed by"] + #[doc = " ncprogbar_destroy(). The progress bar is initially at 0%."] + pub fn ncprogbar_create(n: *mut ncplane, opts: *const ncprogbar_options) -> *mut ncprogbar; +} +extern "C" { + #[doc = " Return a reference to the ncprogbar's underlying ncplane."] + pub fn ncprogbar_plane(n: *mut ncprogbar) -> *mut ncplane; +} +extern "C" { + #[doc = " Set the progress bar's completion, a double 0 <= 'p' <= 1."] + pub fn ncprogbar_set_progress(n: *mut ncprogbar, p: f64) -> cty::c_int; +} +extern "C" { + #[doc = " Get the progress bar's completion, a double on [0, 1]."] + pub fn ncprogbar_progress(n: *const ncprogbar) -> f64; +} +extern "C" { + #[doc = " Destroy the progress bar and its underlying ncplane."] + pub fn ncprogbar_destroy(n: *mut ncprogbar); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] pub struct ncplot_options { #[doc = " channels for the maximum and minimum levels. linear or exponential"] #[doc = " interpolation will be applied across the domain between these two."] @@ -8086,9 +8220,10 @@ fn bindgen_test_layout_ncplot_options() { ); } extern "C" { - #[doc = " Use the provided plane 'n' for plotting according to the options 'opts'."] - #[doc = " The plot will make free use of the entirety of the plane."] - #[doc = " for domain autodiscovery, set miny == maxy == 0."] + #[doc = " Use the provided plane 'n' for plotting according to the options 'opts'. The"] + #[doc = " plot will make free use of the entirety of the plane. For domain"] + #[doc = " autodiscovery, set miny == maxy == 0. ncuplot holds uint64_ts, while"] + #[doc = " ncdplot holds doubles."] pub fn ncuplot_create( n: *mut ncplane, opts: *const ncplot_options, @@ -8438,7 +8573,7 @@ extern "C" { } extern "C" { #[doc = " Dump selected Notcurses state to the supplied 'debugfp'. Output is freeform,"] - #[doc = " and subject to change. It includes geometry of all planes."] + #[doc = " and subject to change. It includes geometry of all planes, from all piles."] pub fn notcurses_debug(nc: *mut notcurses, debugfp: *mut FILE); } #[doc = " a system for rendering RGBA pixels as text glyphs"] @@ -8448,7 +8583,7 @@ pub struct blitset { pub geom: ncblitter_e, pub width: cty::c_int, pub height: cty::c_int, - #[doc = " the EGCs which form the various levels of a given geometry. if the geometry"] + #[doc = " the EGCs which form the various levels of a given plotset. if the geometry"] #[doc = " is wide, things are arranged with the rightmost side increasing most"] #[doc = " quickly, i.e. it can be indexed as height arrays of 1 + height glyphs. i.e."] #[doc = " the first five braille EGCs are all 0 on the left, [0..4] on the right."] @@ -8556,14 +8691,26 @@ fn bindgen_test_layout_blitset() { extern "C" { pub static mut notcurses_blitters: [blitset; 0usize]; } +extern "C" { + #[doc = " Get the default *media* (not plot) blitter for this environment when using"] + #[doc = " the specified scaling method. Currently, this means:"] + #[doc = " - if lacking UTF-8, NCBLIT_1x1"] + #[doc = " - otherwise, if not NCSCALE_STRETCH, NCBLIT_2x1"] + #[doc = " - otherwise, if sextants are not known to be good, NCBLIT_2x2"] + #[doc = " - otherwise NCBLIT_3x2"] + #[doc = " NCBLIT_2x2 and NCBLIT_3x2 both distort the original aspect ratio, thus"] + #[doc = " NCBLIT_2x1 is used outside of NCSCALE_STRETCH."] + pub fn ncvisual_media_defblitter(nc: *const notcurses, scale: ncscale_e) -> ncblitter_e; +} +pub type ncdirectv = ncplane; #[repr(C)] -#[derive(Debug, Copy, Clone)] +#[derive(Debug)] pub struct ncdirect { _unused: [u8; 0], } extern "C" { #[doc = " Initialize a direct-mode Notcurses context on the connected terminal at 'fp'."] - #[doc = " 'fp' must be a tty. You'll usually want stdout. Direct mode supportes a"] + #[doc = " 'fp' must be a tty. You'll usually want stdout. Direct mode supports a"] #[doc = " limited subset of Notcurses routines which directly affect 'fp', and neither"] #[doc = " supports nor requires notcurses_render(). This can be used to add color and"] #[doc = " styling to text in the standard output paradigm. 'flags' is a bitmask over"] @@ -8683,7 +8830,8 @@ extern "C" { extern "C" { #[doc = " Display an image using the specified blitter and scaling. The image may"] #[doc = " be arbitrarily many rows -- the output will scroll -- but will only occupy"] - #[doc = " the column of the cursor, and those to the right."] + #[doc = " the column of the cursor, and those to the right. The render/raster process"] + #[doc = " can be split by using ncdirect_render_frame() and ncdirect_raster_frame()."] pub fn ncdirect_render_image( n: *mut ncdirect, filename: *const cty::c_char, @@ -8796,6 +8944,30 @@ extern "C" { #[doc = " Release 'nc' and any associated resources. 0 on success, non-0 on failure."] pub fn ncdirect_stop(nc: *mut ncdirect) -> cty::c_int; } +extern "C" { + #[doc = " Render an image using the specified blitter and scaling, but do not write"] + #[doc = " the result. The image may be arbitrarily many rows -- the output will scroll"] + #[doc = " -- but will only occupy the column of the cursor, and those to the right."] + #[doc = " To actually write (and free) this, invoke ncdirect_raster_frame()."] + pub fn ncdirect_render_frame( + n: *mut ncdirect, + filename: *const cty::c_char, + blitter: ncblitter_e, + scale: ncscale_e, + ) -> *mut ncdirectv; +} +extern "C" { + #[doc = " Takes the result of ncdirect_render_frame() and writes it to the output. The"] + #[doc = " 'align', 'blitter', and 'scale' arguments must be the same as those passed"] + #[doc = " to ncdirect_render_frame()."] + pub fn ncdirect_raster_frame( + n: *mut ncdirect, + faken: *mut ncdirectv, + align: ncalign_e, + blitter: ncblitter_e, + scale: ncscale_e, + ) -> cty::c_int; +} pub type __builtin_va_list = [__va_list_tag; 1usize]; #[repr(C)] #[derive(Debug, Copy, Clone)] diff --git a/tools/function-summary/function-summary.sh b/tools/function-summary/function-summary.sh index e6ba62c2f..55ae1901b 100755 --- a/tools/function-summary/function-summary.sh +++ b/tools/function-summary/function-summary.sh @@ -16,11 +16,11 @@ PATH_SOURCE_FILE="../../include/notcurses/notcurses.h" # this is the path to the latest bindgen generated rust sources # TODO: retrieve it automatically, from the target folder, the most recently created/updated) -PATH_BINDGEN_LATEST="bindgen_20201126.rs" +PATH_BINDGEN_LATEST="bindgen_20201227.rs" # these are the main function prefixes used in notcurses (before the first `_`) for STATS_FILE # NOTE: updated manually -PREFIX_LIST="cell channel ncblit ncdirect ncdplot ncfadectx ncfdplane nckey ncmenu ncmetric ncmultiselector ncpixel ncpile ncplane ncreader ncreel ncselector ncsubproc nctablet ncuplot ncvisual notcurses palette" +PREFIX_LIST="cell channel ncblit ncdirect ncdplot ncfadectx ncfdplane nckey ncmenu ncmetric ncmultiselector ncpile ncpixel ncplane ncprogbar ncreader ncreel ncselector ncsubproc nctablet ncuplot ncvisual notcurses palette" OUTPUT_DIR="out-$(date +%Y%m%d)" diff --git a/tools/function-summary/out-20201102/static/ncvisual b/tools/function-summary/out-20201102/static/ncvisual deleted file mode 100644 index 6b1b660ae..000000000 --- a/tools/function-summary/out-20201102/static/ncvisual +++ /dev/null @@ -1 +0,0 @@ -ncvisual_default_blitter diff --git a/tools/function-summary/out-20201102/STATS b/tools/function-summary/out-20201227/STATS similarity index 59% rename from tools/function-summary/out-20201102/STATS rename to tools/function-summary/out-20201227/STATS index f70552222..743a82b1e 100644 --- a/tools/function-summary/out-20201102/STATS +++ b/tools/function-summary/out-20201227/STATS @@ -1,17 +1,17 @@ GENERAL ------- -bindgen generated functions (bg): 577 -static inline functions (si): 157 +bindgen generated functions (bg): 599 +static inline functions (si): 158 grouped by the following prefixes: -cell channel ncblit ncdirect ncdplot ncfadectx ncfdplane nckey ncmenu ncmetric ncmultiselector ncpixel ncplane ncreader ncreel ncselector ncsubproc nctablet ncuplot ncvisual notcurses palette +cell channel ncblit ncdirect ncdplot ncfadectx ncfdplane nckey ncmenu ncmetric ncmultiselector ncpile ncpixel ncplane ncprogbar ncreader ncreel ncselector ncsubproc nctablet ncuplot ncvisual notcurses palette -------------------------- (bg, si) -cell: (6, 42) +cell: (6, 43) channel: (0, 39) ncblit: (2, 0) -ncdirect: (38, 0) +ncdirect: (40, 0) ncdplot: (6, 0) ncfadectx: (3, 0) ncfdplane: (3, 0) @@ -19,16 +19,18 @@ nckey: (0, 2) ncmenu: (13, 0) ncmetric: (1, 0) ncmultiselec(5, 0) +ncpile: (5, 0) ncpixel: (0, 10) -ncplane: (97, 42) +ncplane: (103, 41) +ncprogbar: (5, 0) ncreader: (11, 0) ncreel: (11, 0) ncselector: (9, 0) ncsubproc: (5, 0) nctablet: (3, 0) ncuplot: (6, 0) -ncvisual: (17, 1) -notcurses: (39, 6) +ncvisual: (18, 0) +notcurses: (42, 6) palette: (3, 3) rest of the functions (bg/si):(4, 299) diff --git a/tools/function-summary/out-20201102/bindgen/_NON_FILTERED b/tools/function-summary/out-20201227/bindgen/_NON_FILTERED similarity index 100% rename from tools/function-summary/out-20201102/bindgen/_NON_FILTERED rename to tools/function-summary/out-20201227/bindgen/_NON_FILTERED diff --git a/tools/function-summary/out-20201102/bindgen/cell b/tools/function-summary/out-20201227/bindgen/cell similarity index 100% rename from tools/function-summary/out-20201102/bindgen/cell rename to tools/function-summary/out-20201227/bindgen/cell diff --git a/tools/function-summary/out-20201102/bindgen/channel b/tools/function-summary/out-20201227/bindgen/channel similarity index 100% rename from tools/function-summary/out-20201102/bindgen/channel rename to tools/function-summary/out-20201227/bindgen/channel diff --git a/tools/function-summary/out-20201102/bindgen/ncblit b/tools/function-summary/out-20201227/bindgen/ncblit similarity index 100% rename from tools/function-summary/out-20201102/bindgen/ncblit rename to tools/function-summary/out-20201227/bindgen/ncblit diff --git a/tools/function-summary/out-20201102/bindgen/ncdirect b/tools/function-summary/out-20201227/bindgen/ncdirect similarity index 94% rename from tools/function-summary/out-20201102/bindgen/ncdirect rename to tools/function-summary/out-20201227/bindgen/ncdirect index 446cc5196..719b4aad1 100644 --- a/tools/function-summary/out-20201102/bindgen/ncdirect +++ b/tools/function-summary/out-20201227/bindgen/ncdirect @@ -29,6 +29,8 @@ ncdirect_inputready_fd ncdirect_palette_size ncdirect_printf_aligned ncdirect_putstr +ncdirect_raster_frame +ncdirect_render_frame ncdirect_render_image ncdirect_rounded_box ncdirect_stop diff --git a/tools/function-summary/out-20201102/bindgen/ncdplot b/tools/function-summary/out-20201227/bindgen/ncdplot similarity index 100% rename from tools/function-summary/out-20201102/bindgen/ncdplot rename to tools/function-summary/out-20201227/bindgen/ncdplot diff --git a/tools/function-summary/out-20201102/bindgen/ncfadectx b/tools/function-summary/out-20201227/bindgen/ncfadectx similarity index 100% rename from tools/function-summary/out-20201102/bindgen/ncfadectx rename to tools/function-summary/out-20201227/bindgen/ncfadectx diff --git a/tools/function-summary/out-20201102/bindgen/ncfdplane b/tools/function-summary/out-20201227/bindgen/ncfdplane similarity index 100% rename from tools/function-summary/out-20201102/bindgen/ncfdplane rename to tools/function-summary/out-20201227/bindgen/ncfdplane diff --git a/tools/function-summary/out-20201102/bindgen/nckey b/tools/function-summary/out-20201227/bindgen/nckey similarity index 100% rename from tools/function-summary/out-20201102/bindgen/nckey rename to tools/function-summary/out-20201227/bindgen/nckey diff --git a/tools/function-summary/out-20201102/bindgen/ncmenu b/tools/function-summary/out-20201227/bindgen/ncmenu similarity index 100% rename from tools/function-summary/out-20201102/bindgen/ncmenu rename to tools/function-summary/out-20201227/bindgen/ncmenu diff --git a/tools/function-summary/out-20201102/bindgen/ncmetric b/tools/function-summary/out-20201227/bindgen/ncmetric similarity index 100% rename from tools/function-summary/out-20201102/bindgen/ncmetric rename to tools/function-summary/out-20201227/bindgen/ncmetric diff --git a/tools/function-summary/out-20201102/bindgen/ncmultiselector b/tools/function-summary/out-20201227/bindgen/ncmultiselector similarity index 100% rename from tools/function-summary/out-20201102/bindgen/ncmultiselector rename to tools/function-summary/out-20201227/bindgen/ncmultiselector diff --git a/tools/function-summary/out-20201227/bindgen/ncpile b/tools/function-summary/out-20201227/bindgen/ncpile new file mode 100644 index 000000000..4e63a6804 --- /dev/null +++ b/tools/function-summary/out-20201227/bindgen/ncpile @@ -0,0 +1,5 @@ +ncpile_bottom +ncpile_create +ncpile_rasterize +ncpile_render +ncpile_top diff --git a/tools/function-summary/out-20201102/bindgen/ncpixel b/tools/function-summary/out-20201227/bindgen/ncpixel similarity index 100% rename from tools/function-summary/out-20201102/bindgen/ncpixel rename to tools/function-summary/out-20201227/bindgen/ncpixel diff --git a/tools/function-summary/out-20201102/bindgen/ncplane b/tools/function-summary/out-20201227/bindgen/ncplane similarity index 93% rename from tools/function-summary/out-20201102/bindgen/ncplane rename to tools/function-summary/out-20201227/bindgen/ncplane index 2ccfa2729..bc21046e6 100644 --- a/tools/function-summary/out-20201102/bindgen/ncplane +++ b/tools/function-summary/out-20201227/bindgen/ncplane @@ -1,6 +1,8 @@ ncplane_above ncplane_at_cursor +ncplane_at_cursor_cell ncplane_at_yx +ncplane_at_yx_cell ncplane_base ncplane_below ncplane_box @@ -55,7 +57,10 @@ ncplane_putwegc_stained ncplane_putwstr_stained ncplane_qrcode ncplane_reparent +ncplane_reparent_family ncplane_resize +ncplane_resizecb +ncplane_resize_maximize ncplane_resize_realign ncplane_rgba ncplane_rotate_ccw @@ -77,6 +82,7 @@ ncplane_set_fg_palindex ncplane_set_fg_rgb ncplane_set_fg_rgb8 ncplane_set_fg_rgb8_clipped +ncplane_set_resizecb ncplane_set_scrolling ncplane_set_styles ncplane_set_userptr diff --git a/tools/function-summary/out-20201227/bindgen/ncprogbar b/tools/function-summary/out-20201227/bindgen/ncprogbar new file mode 100644 index 000000000..2d0e434d7 --- /dev/null +++ b/tools/function-summary/out-20201227/bindgen/ncprogbar @@ -0,0 +1,5 @@ +ncprogbar_create +ncprogbar_destroy +ncprogbar_plane +ncprogbar_progress +ncprogbar_set_progress diff --git a/tools/function-summary/out-20201102/bindgen/ncreader b/tools/function-summary/out-20201227/bindgen/ncreader similarity index 100% rename from tools/function-summary/out-20201102/bindgen/ncreader rename to tools/function-summary/out-20201227/bindgen/ncreader diff --git a/tools/function-summary/out-20201102/bindgen/ncreel b/tools/function-summary/out-20201227/bindgen/ncreel similarity index 100% rename from tools/function-summary/out-20201102/bindgen/ncreel rename to tools/function-summary/out-20201227/bindgen/ncreel diff --git a/tools/function-summary/out-20201102/bindgen/ncselector b/tools/function-summary/out-20201227/bindgen/ncselector similarity index 100% rename from tools/function-summary/out-20201102/bindgen/ncselector rename to tools/function-summary/out-20201227/bindgen/ncselector diff --git a/tools/function-summary/out-20201102/bindgen/ncsubproc b/tools/function-summary/out-20201227/bindgen/ncsubproc similarity index 100% rename from tools/function-summary/out-20201102/bindgen/ncsubproc rename to tools/function-summary/out-20201227/bindgen/ncsubproc diff --git a/tools/function-summary/out-20201102/bindgen/nctablet b/tools/function-summary/out-20201227/bindgen/nctablet similarity index 100% rename from tools/function-summary/out-20201102/bindgen/nctablet rename to tools/function-summary/out-20201227/bindgen/nctablet diff --git a/tools/function-summary/out-20201102/bindgen/ncuplot b/tools/function-summary/out-20201227/bindgen/ncuplot similarity index 100% rename from tools/function-summary/out-20201102/bindgen/ncuplot rename to tools/function-summary/out-20201227/bindgen/ncuplot diff --git a/tools/function-summary/out-20201102/bindgen/ncvisual b/tools/function-summary/out-20201227/bindgen/ncvisual similarity index 92% rename from tools/function-summary/out-20201102/bindgen/ncvisual rename to tools/function-summary/out-20201227/bindgen/ncvisual index 47562fb85..2c8f95786 100644 --- a/tools/function-summary/out-20201102/bindgen/ncvisual +++ b/tools/function-summary/out-20201227/bindgen/ncvisual @@ -7,6 +7,7 @@ ncvisual_from_file ncvisual_from_plane ncvisual_from_rgba ncvisual_geom +ncvisual_media_defblitter ncvisual_polyfill_yx ncvisual_render ncvisual_resize diff --git a/tools/function-summary/out-20201102/bindgen/notcurses b/tools/function-summary/out-20201227/bindgen/notcurses similarity index 91% rename from tools/function-summary/out-20201102/bindgen/notcurses rename to tools/function-summary/out-20201227/bindgen/notcurses index 803afe2cc..264d25a86 100644 --- a/tools/function-summary/out-20201102/bindgen/notcurses +++ b/tools/function-summary/out-20201227/bindgen/notcurses @@ -4,6 +4,7 @@ notcurses_canchangecolor notcurses_canfade notcurses_canopen_images notcurses_canopen_videos +notcurses_cansextant notcurses_cansixel notcurses_cantruecolor notcurses_canutf8 @@ -17,6 +18,8 @@ notcurses_inputready_fd notcurses_lex_blitter notcurses_lex_margins notcurses_lex_scalemode +notcurses_linesigs_disable +notcurses_linesigs_enable notcurses_mouse_disable notcurses_mouse_enable notcurses_palette_size diff --git a/tools/function-summary/out-20201102/bindgen/palette b/tools/function-summary/out-20201227/bindgen/palette similarity index 100% rename from tools/function-summary/out-20201102/bindgen/palette rename to tools/function-summary/out-20201227/bindgen/palette diff --git a/tools/function-summary/out-20201102/static/_NON_FILTERED b/tools/function-summary/out-20201227/static/_NON_FILTERED similarity index 100% rename from tools/function-summary/out-20201102/static/_NON_FILTERED rename to tools/function-summary/out-20201227/static/_NON_FILTERED diff --git a/tools/function-summary/out-20201102/static/cell b/tools/function-summary/out-20201227/static/cell similarity index 97% rename from tools/function-summary/out-20201102/static/cell rename to tools/function-summary/out-20201227/static/cell index 6a2c19833..0c8444923 100644 --- a/tools/function-summary/out-20201102/static/cell +++ b/tools/function-summary/out-20201227/static/cell @@ -17,6 +17,7 @@ cell_fg_rgb cell_fg_rgb8 cell_init cell_load_char +cell_load_egc32 cell_off_styles cell_on_styles cell_prime diff --git a/tools/function-summary/out-20201102/static/channel b/tools/function-summary/out-20201227/static/channel similarity index 100% rename from tools/function-summary/out-20201102/static/channel rename to tools/function-summary/out-20201227/static/channel diff --git a/tools/function-summary/out-20201102/static/ncblit b/tools/function-summary/out-20201227/static/ncblit similarity index 100% rename from tools/function-summary/out-20201102/static/ncblit rename to tools/function-summary/out-20201227/static/ncblit diff --git a/tools/function-summary/out-20201102/static/ncdirect b/tools/function-summary/out-20201227/static/ncdirect similarity index 100% rename from tools/function-summary/out-20201102/static/ncdirect rename to tools/function-summary/out-20201227/static/ncdirect diff --git a/tools/function-summary/out-20201102/static/ncdplot b/tools/function-summary/out-20201227/static/ncdplot similarity index 100% rename from tools/function-summary/out-20201102/static/ncdplot rename to tools/function-summary/out-20201227/static/ncdplot diff --git a/tools/function-summary/out-20201102/static/ncfadectx b/tools/function-summary/out-20201227/static/ncfadectx similarity index 100% rename from tools/function-summary/out-20201102/static/ncfadectx rename to tools/function-summary/out-20201227/static/ncfadectx diff --git a/tools/function-summary/out-20201102/static/ncfdplane b/tools/function-summary/out-20201227/static/ncfdplane similarity index 100% rename from tools/function-summary/out-20201102/static/ncfdplane rename to tools/function-summary/out-20201227/static/ncfdplane diff --git a/tools/function-summary/out-20201102/static/nckey b/tools/function-summary/out-20201227/static/nckey similarity index 100% rename from tools/function-summary/out-20201102/static/nckey rename to tools/function-summary/out-20201227/static/nckey diff --git a/tools/function-summary/out-20201102/static/ncmenu b/tools/function-summary/out-20201227/static/ncmenu similarity index 100% rename from tools/function-summary/out-20201102/static/ncmenu rename to tools/function-summary/out-20201227/static/ncmenu diff --git a/tools/function-summary/out-20201102/static/ncmetric b/tools/function-summary/out-20201227/static/ncmetric similarity index 100% rename from tools/function-summary/out-20201102/static/ncmetric rename to tools/function-summary/out-20201227/static/ncmetric diff --git a/tools/function-summary/out-20201102/static/ncmultiselector b/tools/function-summary/out-20201227/static/ncmultiselector similarity index 100% rename from tools/function-summary/out-20201102/static/ncmultiselector rename to tools/function-summary/out-20201227/static/ncmultiselector diff --git a/tools/function-summary/out-20201102/static/ncreader b/tools/function-summary/out-20201227/static/ncpile similarity index 100% rename from tools/function-summary/out-20201102/static/ncreader rename to tools/function-summary/out-20201227/static/ncpile diff --git a/tools/function-summary/out-20201102/static/ncpixel b/tools/function-summary/out-20201227/static/ncpixel similarity index 100% rename from tools/function-summary/out-20201102/static/ncpixel rename to tools/function-summary/out-20201227/static/ncpixel diff --git a/tools/function-summary/out-20201102/static/ncplane b/tools/function-summary/out-20201227/static/ncplane similarity index 94% rename from tools/function-summary/out-20201102/static/ncplane rename to tools/function-summary/out-20201227/static/ncplane index 07da40dd0..9f112c4ff 100644 --- a/tools/function-summary/out-20201102/static/ncplane +++ b/tools/function-summary/out-20201227/static/ncplane @@ -1,12 +1,11 @@ ncplane_align -ncplane_at_cursor_cell -ncplane_at_yx_cell ncplane_bchannel ncplane_bg_alpha ncplane_bg_default_p ncplane_bg_rgb ncplane_bg_rgb8 ncplane_box_sized +ncplane_descendant_p ncplane_dim_x ncplane_dim_y ncplane_double_box diff --git a/tools/function-summary/out-20201102/static/ncreel b/tools/function-summary/out-20201227/static/ncprogbar similarity index 100% rename from tools/function-summary/out-20201102/static/ncreel rename to tools/function-summary/out-20201227/static/ncprogbar diff --git a/tools/function-summary/out-20201102/static/ncselector b/tools/function-summary/out-20201227/static/ncreader similarity index 100% rename from tools/function-summary/out-20201102/static/ncselector rename to tools/function-summary/out-20201227/static/ncreader diff --git a/tools/function-summary/out-20201102/static/ncsubproc b/tools/function-summary/out-20201227/static/ncreel similarity index 100% rename from tools/function-summary/out-20201102/static/ncsubproc rename to tools/function-summary/out-20201227/static/ncreel diff --git a/tools/function-summary/out-20201102/static/nctablet b/tools/function-summary/out-20201227/static/ncselector similarity index 100% rename from tools/function-summary/out-20201102/static/nctablet rename to tools/function-summary/out-20201227/static/ncselector diff --git a/tools/function-summary/out-20201102/static/ncuplot b/tools/function-summary/out-20201227/static/ncsubproc similarity index 100% rename from tools/function-summary/out-20201102/static/ncuplot rename to tools/function-summary/out-20201227/static/ncsubproc diff --git a/tools/function-summary/out-20201227/static/nctablet b/tools/function-summary/out-20201227/static/nctablet new file mode 100644 index 000000000..e69de29bb diff --git a/tools/function-summary/out-20201227/static/ncuplot b/tools/function-summary/out-20201227/static/ncuplot new file mode 100644 index 000000000..e69de29bb diff --git a/tools/function-summary/out-20201227/static/ncvisual b/tools/function-summary/out-20201227/static/ncvisual new file mode 100644 index 000000000..e69de29bb diff --git a/tools/function-summary/out-20201102/static/notcurses b/tools/function-summary/out-20201227/static/notcurses similarity index 100% rename from tools/function-summary/out-20201102/static/notcurses rename to tools/function-summary/out-20201227/static/notcurses diff --git a/tools/function-summary/out-20201102/static/palette b/tools/function-summary/out-20201227/static/palette similarity index 100% rename from tools/function-summary/out-20201102/static/palette rename to tools/function-summary/out-20201227/static/palette