You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
7423 lines
255 KiB
Rust
7423 lines
255 KiB
Rust
4 years ago
|
/* automatically generated by rust-bindgen 0.54.1 */
|
||
|
|
||
|
pub const _TIME_H: u32 = 1;
|
||
|
pub const _FEATURES_H: u32 = 1;
|
||
|
pub const __GLIBC_USE_ISOC2X: u32 = 0;
|
||
|
pub const __USE_ISOC11: u32 = 1;
|
||
|
pub const __USE_ISOC99: u32 = 1;
|
||
|
pub const __USE_ISOC95: u32 = 1;
|
||
|
pub const _POSIX_SOURCE: u32 = 1;
|
||
|
pub const _POSIX_C_SOURCE: u32 = 2;
|
||
|
pub const __USE_POSIX_IMPLICITLY: u32 = 1;
|
||
|
pub const __USE_POSIX: u32 = 1;
|
||
|
pub const __USE_POSIX2: u32 = 1;
|
||
|
pub const __USE_XOPEN: u32 = 1;
|
||
|
pub const __USE_FORTIFY_LEVEL: u32 = 0;
|
||
|
pub const __GLIBC_USE_DEPRECATED_GETS: u32 = 0;
|
||
|
pub const __GLIBC_USE_DEPRECATED_SCANF: u32 = 0;
|
||
|
pub const _STDC_PREDEF_H: u32 = 1;
|
||
|
pub const __STDC_IEC_559__: u32 = 1;
|
||
|
pub const __STDC_IEC_559_COMPLEX__: u32 = 1;
|
||
|
pub const __STDC_ISO_10646__: u32 = 201706;
|
||
|
pub const __GNU_LIBRARY__: u32 = 6;
|
||
|
pub const __GLIBC__: u32 = 2;
|
||
|
pub const __GLIBC_MINOR__: u32 = 31;
|
||
|
pub const _SYS_CDEFS_H: u32 = 1;
|
||
|
pub const __glibc_c99_flexarr_available: u32 = 1;
|
||
|
pub const __WORDSIZE: u32 = 64;
|
||
|
pub const __WORDSIZE_TIME64_COMPAT32: u32 = 1;
|
||
|
pub const __SYSCALL_WORDSIZE: u32 = 64;
|
||
|
pub const __LONG_DOUBLE_USES_FLOAT128: u32 = 0;
|
||
|
pub const __HAVE_GENERIC_SELECTION: u32 = 1;
|
||
|
pub const _BITS_TIME_H: u32 = 1;
|
||
|
pub const _BITS_TYPES_H: u32 = 1;
|
||
|
pub const __TIMESIZE: u32 = 64;
|
||
|
pub const _BITS_TYPESIZES_H: u32 = 1;
|
||
|
pub const __OFF_T_MATCHES_OFF64_T: u32 = 1;
|
||
|
pub const __INO_T_MATCHES_INO64_T: u32 = 1;
|
||
|
pub const __RLIM_T_MATCHES_RLIM64_T: u32 = 1;
|
||
|
pub const __STATFS_MATCHES_STATFS64: u32 = 1;
|
||
|
pub const __FD_SETSIZE: u32 = 1024;
|
||
|
pub const _BITS_TIME64_H: u32 = 1;
|
||
|
pub const __clock_t_defined: u32 = 1;
|
||
|
pub const __time_t_defined: u32 = 1;
|
||
|
pub const __struct_tm_defined: u32 = 1;
|
||
|
pub const _STRUCT_TIMESPEC: u32 = 1;
|
||
|
pub const _BITS_ENDIAN_H: u32 = 1;
|
||
|
pub const __LITTLE_ENDIAN: u32 = 1234;
|
||
|
pub const __BIG_ENDIAN: u32 = 4321;
|
||
|
pub const __PDP_ENDIAN: u32 = 3412;
|
||
|
pub const _BITS_ENDIANNESS_H: u32 = 1;
|
||
|
pub const __BYTE_ORDER: u32 = 1234;
|
||
|
pub const __FLOAT_WORD_ORDER: u32 = 1234;
|
||
|
pub const TIME_UTC: u32 = 1;
|
||
|
pub const _UCHAR_H: u32 = 1;
|
||
|
pub const __mbstate_t_defined: u32 = 1;
|
||
|
pub const ____mbstate_t_defined: u32 = 1;
|
||
|
pub const _CTYPE_H: u32 = 1;
|
||
|
pub const _WCHAR_H: u32 = 1;
|
||
|
pub const __GLIBC_USE_LIB_EXT2: u32 = 0;
|
||
|
pub const __GLIBC_USE_IEC_60559_BFP_EXT: u32 = 0;
|
||
|
pub const __GLIBC_USE_IEC_60559_BFP_EXT_C2X: u32 = 0;
|
||
|
pub const __GLIBC_USE_IEC_60559_FUNCS_EXT: u32 = 0;
|
||
|
pub const __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X: u32 = 0;
|
||
|
pub const __GLIBC_USE_IEC_60559_TYPES_EXT: u32 = 0;
|
||
|
pub const __HAVE_FLOAT128: u32 = 0;
|
||
|
pub const __HAVE_DISTINCT_FLOAT128: u32 = 0;
|
||
|
pub const __HAVE_FLOAT64X: u32 = 1;
|
||
|
pub const __HAVE_FLOAT64X_LONG_DOUBLE: u32 = 1;
|
||
|
pub const __HAVE_FLOAT16: u32 = 0;
|
||
|
pub const __HAVE_FLOAT32: u32 = 1;
|
||
|
pub const __HAVE_FLOAT64: u32 = 1;
|
||
|
pub const __HAVE_FLOAT32X: u32 = 1;
|
||
|
pub const __HAVE_FLOAT128X: u32 = 0;
|
||
|
pub const __HAVE_DISTINCT_FLOAT16: u32 = 0;
|
||
|
pub const __HAVE_DISTINCT_FLOAT32: u32 = 0;
|
||
|
pub const __HAVE_DISTINCT_FLOAT64: u32 = 0;
|
||
|
pub const __HAVE_DISTINCT_FLOAT32X: u32 = 0;
|
||
|
pub const __HAVE_DISTINCT_FLOAT64X: u32 = 0;
|
||
|
pub const __HAVE_DISTINCT_FLOAT128X: u32 = 0;
|
||
|
pub const __HAVE_FLOATN_NOT_TYPEDEF: u32 = 0;
|
||
|
pub const __GNUC_VA_LIST: u32 = 1;
|
||
|
pub const _BITS_WCHAR_H: u32 = 1;
|
||
|
pub const __wint_t_defined: u32 = 1;
|
||
|
pub const _WINT_T: u32 = 1;
|
||
|
pub const ____FILE_defined: u32 = 1;
|
||
|
pub const WEOF: u32 = 4294967295;
|
||
|
pub const _BITS_WCTYPE_WCHAR_H: u32 = 1;
|
||
|
pub const _STDIO_H: u32 = 1;
|
||
|
pub const _____fpos_t_defined: u32 = 1;
|
||
|
pub const _____fpos64_t_defined: u32 = 1;
|
||
|
pub const __FILE_defined: u32 = 1;
|
||
|
pub const __struct_FILE_defined: u32 = 1;
|
||
|
pub const _IO_EOF_SEEN: u32 = 16;
|
||
|
pub const _IO_ERR_SEEN: u32 = 32;
|
||
|
pub const _IO_USER_LOCK: u32 = 32768;
|
||
|
pub const _IOFBF: u32 = 0;
|
||
|
pub const _IOLBF: u32 = 1;
|
||
|
pub const _IONBF: u32 = 2;
|
||
|
pub const BUFSIZ: u32 = 8192;
|
||
|
pub const EOF: i32 = -1;
|
||
|
pub const SEEK_SET: u32 = 0;
|
||
|
pub const SEEK_CUR: u32 = 1;
|
||
|
pub const SEEK_END: u32 = 2;
|
||
|
pub const P_tmpdir: &'static [u8; 5usize] = b"/tmp\0";
|
||
|
pub const _BITS_STDIO_LIM_H: u32 = 1;
|
||
|
pub const L_tmpnam: u32 = 20;
|
||
|
pub const TMP_MAX: u32 = 238328;
|
||
|
pub const FILENAME_MAX: u32 = 4096;
|
||
|
pub const L_ctermid: u32 = 9;
|
||
|
pub const L_cuserid: u32 = 9;
|
||
|
pub const FOPEN_MAX: u32 = 16;
|
||
|
pub const _GETOPT_POSIX_H: u32 = 1;
|
||
|
pub const _GETOPT_CORE_H: u32 = 1;
|
||
|
pub const _STDINT_H: u32 = 1;
|
||
|
pub const _BITS_STDINT_INTN_H: u32 = 1;
|
||
|
pub const _BITS_STDINT_UINTN_H: u32 = 1;
|
||
|
pub const INT8_MIN: i32 = -128;
|
||
|
pub const INT16_MIN: i32 = -32768;
|
||
|
pub const INT32_MIN: i32 = -2147483648;
|
||
|
pub const INT8_MAX: u32 = 127;
|
||
|
pub const INT16_MAX: u32 = 32767;
|
||
|
pub const INT32_MAX: u32 = 2147483647;
|
||
|
pub const UINT8_MAX: u32 = 255;
|
||
|
pub const UINT16_MAX: u32 = 65535;
|
||
|
pub const UINT32_MAX: u32 = 4294967295;
|
||
|
pub const INT_LEAST8_MIN: i32 = -128;
|
||
|
pub const INT_LEAST16_MIN: i32 = -32768;
|
||
|
pub const INT_LEAST32_MIN: i32 = -2147483648;
|
||
|
pub const INT_LEAST8_MAX: u32 = 127;
|
||
|
pub const INT_LEAST16_MAX: u32 = 32767;
|
||
|
pub const INT_LEAST32_MAX: u32 = 2147483647;
|
||
|
pub const UINT_LEAST8_MAX: u32 = 255;
|
||
|
pub const UINT_LEAST16_MAX: u32 = 65535;
|
||
|
pub const UINT_LEAST32_MAX: u32 = 4294967295;
|
||
|
pub const INT_FAST8_MIN: i32 = -128;
|
||
|
pub const INT_FAST16_MIN: i64 = -9223372036854775808;
|
||
|
pub const INT_FAST32_MIN: i64 = -9223372036854775808;
|
||
|
pub const INT_FAST8_MAX: u32 = 127;
|
||
|
pub const INT_FAST16_MAX: u64 = 9223372036854775807;
|
||
|
pub const INT_FAST32_MAX: u64 = 9223372036854775807;
|
||
|
pub const UINT_FAST8_MAX: u32 = 255;
|
||
|
pub const UINT_FAST16_MAX: i32 = -1;
|
||
|
pub const UINT_FAST32_MAX: i32 = -1;
|
||
|
pub const INTPTR_MIN: i64 = -9223372036854775808;
|
||
|
pub const INTPTR_MAX: u64 = 9223372036854775807;
|
||
|
pub const UINTPTR_MAX: i32 = -1;
|
||
|
pub const PTRDIFF_MIN: i64 = -9223372036854775808;
|
||
|
pub const PTRDIFF_MAX: u64 = 9223372036854775807;
|
||
|
pub const SIG_ATOMIC_MIN: i32 = -2147483648;
|
||
|
pub const SIG_ATOMIC_MAX: u32 = 2147483647;
|
||
|
pub const SIZE_MAX: i32 = -1;
|
||
|
pub const WINT_MIN: u32 = 0;
|
||
|
pub const WINT_MAX: u32 = 4294967295;
|
||
|
pub const _STDLIB_H: u32 = 1;
|
||
|
pub const WNOHANG: u32 = 1;
|
||
|
pub const WUNTRACED: u32 = 2;
|
||
|
pub const __WNOTHREAD: u32 = 536870912;
|
||
|
pub const __WALL: u32 = 1073741824;
|
||
|
pub const __WCLONE: u32 = 2147483648;
|
||
|
pub const __W_CONTINUED: u32 = 65535;
|
||
|
pub const __WCOREFLAG: u32 = 128;
|
||
|
pub const __ldiv_t_defined: u32 = 1;
|
||
|
pub const __lldiv_t_defined: u32 = 1;
|
||
|
pub const RAND_MAX: u32 = 2147483647;
|
||
|
pub const EXIT_FAILURE: u32 = 1;
|
||
|
pub const EXIT_SUCCESS: u32 = 0;
|
||
|
pub const _STRING_H: u32 = 1;
|
||
|
pub const _BITS_SIGNUM_H: u32 = 1;
|
||
|
pub const _BITS_SIGNUM_GENERIC_H: u32 = 1;
|
||
|
pub const SIGINT: u32 = 2;
|
||
|
pub const SIGILL: u32 = 4;
|
||
|
pub const SIGABRT: u32 = 6;
|
||
|
pub const SIGFPE: u32 = 8;
|
||
|
pub const SIGSEGV: u32 = 11;
|
||
|
pub const SIGTERM: u32 = 15;
|
||
|
pub const SIGHUP: u32 = 1;
|
||
|
pub const SIGQUIT: u32 = 3;
|
||
|
pub const SIGTRAP: u32 = 5;
|
||
|
pub const SIGKILL: u32 = 9;
|
||
|
pub const SIGBUS: u32 = 10;
|
||
|
pub const SIGSYS: u32 = 12;
|
||
|
pub const SIGPIPE: u32 = 13;
|
||
|
pub const SIGALRM: u32 = 14;
|
||
|
pub const SIGURG: u32 = 16;
|
||
|
pub const SIGSTOP: u32 = 17;
|
||
|
pub const SIGTSTP: u32 = 18;
|
||
|
pub const SIGCONT: u32 = 19;
|
||
|
pub const SIGCHLD: u32 = 20;
|
||
|
pub const SIGTTIN: u32 = 21;
|
||
|
pub const SIGTTOU: u32 = 22;
|
||
|
pub const SIGPOLL: u32 = 23;
|
||
|
pub const SIGXCPU: u32 = 24;
|
||
|
pub const SIGXFSZ: u32 = 25;
|
||
|
pub const SIGVTALRM: u32 = 26;
|
||
|
pub const SIGPROF: u32 = 27;
|
||
|
pub const SIGUSR1: u32 = 30;
|
||
|
pub const SIGUSR2: u32 = 31;
|
||
|
pub const SIGWINCH: u32 = 28;
|
||
|
pub const SIGIO: u32 = 23;
|
||
|
pub const SIGIOT: u32 = 6;
|
||
|
pub const SIGCLD: u32 = 20;
|
||
|
pub const __SIGRTMIN: u32 = 32;
|
||
|
pub const __SIGRTMAX: u32 = 32;
|
||
|
pub const _NSIG: u32 = 33;
|
||
|
pub const SIGSTKFLT: u32 = 16;
|
||
|
pub const SIGPWR: u32 = 30;
|
||
|
pub const __sig_atomic_t_defined: u32 = 1;
|
||
|
pub const __sigset_t_defined: u32 = 1;
|
||
|
pub const _BITS_SIGACTION_H: u32 = 1;
|
||
|
pub const SA_NOCLDSTOP: u32 = 1;
|
||
|
pub const SA_NOCLDWAIT: u32 = 2;
|
||
|
pub const SA_SIGINFO: u32 = 4;
|
||
|
pub const SIG_BLOCK: u32 = 0;
|
||
|
pub const SIG_UNBLOCK: u32 = 1;
|
||
|
pub const SIG_SETMASK: u32 = 2;
|
||
|
pub const _LIBC_LIMITS_H_: u32 = 1;
|
||
|
pub const MB_LEN_MAX: u32 = 16;
|
||
|
pub const _BITS_POSIX1_LIM_H: u32 = 1;
|
||
|
pub const _POSIX_AIO_LISTIO_MAX: u32 = 2;
|
||
|
pub const _POSIX_AIO_MAX: u32 = 1;
|
||
|
pub const _POSIX_ARG_MAX: u32 = 4096;
|
||
|
pub const _POSIX_CHILD_MAX: u32 = 6;
|
||
|
pub const _POSIX_DELAYTIMER_MAX: u32 = 32;
|
||
|
pub const _POSIX_HOST_NAME_MAX: u32 = 255;
|
||
|
pub const _POSIX_LINK_MAX: u32 = 8;
|
||
|
pub const _POSIX_LOGIN_NAME_MAX: u32 = 9;
|
||
|
pub const _POSIX_MAX_CANON: u32 = 255;
|
||
|
pub const _POSIX_MAX_INPUT: u32 = 255;
|
||
|
pub const _POSIX_MQ_OPEN_MAX: u32 = 8;
|
||
|
pub const _POSIX_MQ_PRIO_MAX: u32 = 32;
|
||
|
pub const _POSIX_NAME_MAX: u32 = 14;
|
||
|
pub const _POSIX_NGROUPS_MAX: u32 = 0;
|
||
|
pub const _POSIX_OPEN_MAX: u32 = 16;
|
||
|
pub const _POSIX_FD_SETSIZE: u32 = 16;
|
||
|
pub const _POSIX_PATH_MAX: u32 = 256;
|
||
|
pub const _POSIX_PIPE_BUF: u32 = 512;
|
||
|
pub const _POSIX_RE_DUP_MAX: u32 = 255;
|
||
|
pub const _POSIX_RTSIG_MAX: u32 = 8;
|
||
|
pub const _POSIX_SEM_NSEMS_MAX: u32 = 256;
|
||
|
pub const _POSIX_SEM_VALUE_MAX: u32 = 32767;
|
||
|
pub const _POSIX_SIGQUEUE_MAX: u32 = 32;
|
||
|
pub const _POSIX_SSIZE_MAX: u32 = 32767;
|
||
|
pub const _POSIX_STREAM_MAX: u32 = 8;
|
||
|
pub const _POSIX_SYMLINK_MAX: u32 = 255;
|
||
|
pub const _POSIX_SYMLOOP_MAX: u32 = 8;
|
||
|
pub const _POSIX_TIMER_MAX: u32 = 32;
|
||
|
pub const _POSIX_TTY_NAME_MAX: u32 = 9;
|
||
|
pub const _POSIX_TZNAME_MAX: u32 = 3;
|
||
|
pub const _POSIX_QLIMIT: u32 = 1;
|
||
|
pub const _POSIX_HIWAT: u32 = 512;
|
||
|
pub const _POSIX_UIO_MAXIOV: u32 = 16;
|
||
|
pub const _POSIX_CLOCKRES_MIN: u32 = 20000000;
|
||
|
pub const NR_OPEN: u32 = 1024;
|
||
|
pub const NGROUPS_MAX: u32 = 65536;
|
||
|
pub const ARG_MAX: u32 = 131072;
|
||
|
pub const LINK_MAX: u32 = 127;
|
||
|
pub const MAX_CANON: u32 = 255;
|
||
|
pub const MAX_INPUT: u32 = 255;
|
||
|
pub const NAME_MAX: u32 = 255;
|
||
|
pub const PATH_MAX: u32 = 4096;
|
||
|
pub const PIPE_BUF: u32 = 4096;
|
||
|
pub const XATTR_NAME_MAX: u32 = 255;
|
||
|
pub const XATTR_SIZE_MAX: u32 = 65536;
|
||
|
pub const XATTR_LIST_MAX: u32 = 65536;
|
||
|
pub const RTSIG_MAX: u32 = 32;
|
||
|
pub const _POSIX_THREAD_KEYS_MAX: u32 = 128;
|
||
|
pub const PTHREAD_KEYS_MAX: u32 = 1024;
|
||
|
pub const _POSIX_THREAD_DESTRUCTOR_ITERATIONS: u32 = 4;
|
||
|
pub const PTHREAD_DESTRUCTOR_ITERATIONS: u32 = 4;
|
||
|
pub const _POSIX_THREAD_THREADS_MAX: u32 = 64;
|
||
|
pub const AIO_PRIO_DELTA_MAX: u32 = 20;
|
||
|
pub const PTHREAD_STACK_MIN: u32 = 16384;
|
||
|
pub const DELAYTIMER_MAX: u32 = 2147483647;
|
||
|
pub const TTY_NAME_MAX: u32 = 32;
|
||
|
pub const LOGIN_NAME_MAX: u32 = 256;
|
||
|
pub const HOST_NAME_MAX: u32 = 64;
|
||
|
pub const MQ_PRIO_MAX: u32 = 32768;
|
||
|
pub const SEM_VALUE_MAX: u32 = 2147483647;
|
||
|
pub const _BITS_POSIX2_LIM_H: u32 = 1;
|
||
|
pub const _POSIX2_BC_BASE_MAX: u32 = 99;
|
||
|
pub const _POSIX2_BC_DIM_MAX: u32 = 2048;
|
||
|
pub const _POSIX2_BC_SCALE_MAX: u32 = 99;
|
||
|
pub const _POSIX2_BC_STRING_MAX: u32 = 1000;
|
||
|
pub const _POSIX2_COLL_WEIGHTS_MAX: u32 = 2;
|
||
|
pub const _POSIX2_EXPR_NEST_MAX: u32 = 32;
|
||
|
pub const _POSIX2_LINE_MAX: u32 = 2048;
|
||
|
pub const _POSIX2_RE_DUP_MAX: u32 = 255;
|
||
|
pub const _POSIX2_CHARCLASS_NAME_MAX: u32 = 14;
|
||
|
pub const BC_BASE_MAX: u32 = 99;
|
||
|
pub const BC_DIM_MAX: u32 = 2048;
|
||
|
pub const BC_SCALE_MAX: u32 = 99;
|
||
|
pub const BC_STRING_MAX: u32 = 1000;
|
||
|
pub const COLL_WEIGHTS_MAX: u32 = 255;
|
||
|
pub const EXPR_NEST_MAX: u32 = 32;
|
||
|
pub const LINE_MAX: u32 = 2048;
|
||
|
pub const CHARCLASS_NAME_MAX: u32 = 2048;
|
||
|
pub const RE_DUP_MAX: u32 = 32767;
|
||
|
pub const _XOPEN_LIM_H: u32 = 1;
|
||
|
pub const _XOPEN_IOV_MAX: u32 = 16;
|
||
|
pub const _BITS_UIO_LIM_H: u32 = 1;
|
||
|
pub const __IOV_MAX: u32 = 1024;
|
||
|
pub const IOV_MAX: u32 = 1024;
|
||
|
pub const NL_ARGMAX: u32 = 4096;
|
||
|
pub const NL_LANGMAX: u32 = 2048;
|
||
|
pub const NZERO: u32 = 20;
|
||
|
pub const WORD_BIT: u32 = 32;
|
||
|
pub const LONG_BIT: u32 = 64;
|
||
|
pub const true_: u32 = 1;
|
||
|
pub const false_: u32 = 0;
|
||
|
pub const __bool_true_false_are_defined: u32 = 1;
|
||
|
pub const _ERRNO_H: u32 = 1;
|
||
|
pub const _BITS_ERRNO_H: u32 = 1;
|
||
|
pub const EPERM: u32 = 1;
|
||
|
pub const ENOENT: u32 = 2;
|
||
|
pub const ESRCH: u32 = 3;
|
||
|
pub const EINTR: u32 = 4;
|
||
|
pub const EIO: u32 = 5;
|
||
|
pub const ENXIO: u32 = 6;
|
||
|
pub const E2BIG: u32 = 7;
|
||
|
pub const ENOEXEC: u32 = 8;
|
||
|
pub const EBADF: u32 = 9;
|
||
|
pub const ECHILD: u32 = 10;
|
||
|
pub const EAGAIN: u32 = 11;
|
||
|
pub const ENOMEM: u32 = 12;
|
||
|
pub const EACCES: u32 = 13;
|
||
|
pub const EFAULT: u32 = 14;
|
||
|
pub const ENOTBLK: u32 = 15;
|
||
|
pub const EBUSY: u32 = 16;
|
||
|
pub const EEXIST: u32 = 17;
|
||
|
pub const EXDEV: u32 = 18;
|
||
|
pub const ENODEV: u32 = 19;
|
||
|
pub const ENOTDIR: u32 = 20;
|
||
|
pub const EISDIR: u32 = 21;
|
||
|
pub const EINVAL: u32 = 22;
|
||
|
pub const ENFILE: u32 = 23;
|
||
|
pub const EMFILE: u32 = 24;
|
||
|
pub const ENOTTY: u32 = 25;
|
||
|
pub const ETXTBSY: u32 = 26;
|
||
|
pub const EFBIG: u32 = 27;
|
||
|
pub const ENOSPC: u32 = 28;
|
||
|
pub const ESPIPE: u32 = 29;
|
||
|
pub const EROFS: u32 = 30;
|
||
|
pub const EMLINK: u32 = 31;
|
||
|
pub const EPIPE: u32 = 32;
|
||
|
pub const EDOM: u32 = 33;
|
||
|
pub const ERANGE: u32 = 34;
|
||
|
pub const EDEADLK: u32 = 35;
|
||
|
pub const ENAMETOOLONG: u32 = 36;
|
||
|
pub const ENOLCK: u32 = 37;
|
||
|
pub const ENOSYS: u32 = 38;
|
||
|
pub const ENOTEMPTY: u32 = 39;
|
||
|
pub const ELOOP: u32 = 40;
|
||
|
pub const EWOULDBLOCK: u32 = 11;
|
||
|
pub const ENOMSG: u32 = 42;
|
||
|
pub const EIDRM: u32 = 43;
|
||
|
pub const ECHRNG: u32 = 44;
|
||
|
pub const EL2NSYNC: u32 = 45;
|
||
|
pub const EL3HLT: u32 = 46;
|
||
|
pub const EL3RST: u32 = 47;
|
||
|
pub const ELNRNG: u32 = 48;
|
||
|
pub const EUNATCH: u32 = 49;
|
||
|
pub const ENOCSI: u32 = 50;
|
||
|
pub const EL2HLT: u32 = 51;
|
||
|
pub const EBADE: u32 = 52;
|
||
|
pub const EBADR: u32 = 53;
|
||
|
pub const EXFULL: u32 = 54;
|
||
|
pub const ENOANO: u32 = 55;
|
||
|
pub const EBADRQC: u32 = 56;
|
||
|
pub const EBADSLT: u32 = 57;
|
||
|
pub const EDEADLOCK: u32 = 35;
|
||
|
pub const EBFONT: u32 = 59;
|
||
|
pub const ENOSTR: u32 = 60;
|
||
|
pub const ENODATA: u32 = 61;
|
||
|
pub const ETIME: u32 = 62;
|
||
|
pub const ENOSR: u32 = 63;
|
||
|
pub const ENONET: u32 = 64;
|
||
|
pub const ENOPKG: u32 = 65;
|
||
|
pub const EREMOTE: u32 = 66;
|
||
|
pub const ENOLINK: u32 = 67;
|
||
|
pub const EADV: u32 = 68;
|
||
|
pub const ESRMNT: u32 = 69;
|
||
|
pub const ECOMM: u32 = 70;
|
||
|
pub const EPROTO: u32 = 71;
|
||
|
pub const EMULTIHOP: u32 = 72;
|
||
|
pub const EDOTDOT: u32 = 73;
|
||
|
pub const EBADMSG: u32 = 74;
|
||
|
pub const EOVERFLOW: u32 = 75;
|
||
|
pub const ENOTUNIQ: u32 = 76;
|
||
|
pub const EBADFD: u32 = 77;
|
||
|
pub const EREMCHG: u32 = 78;
|
||
|
pub const ELIBACC: u32 = 79;
|
||
|
pub const ELIBBAD: u32 = 80;
|
||
|
pub const ELIBSCN: u32 = 81;
|
||
|
pub const ELIBMAX: u32 = 82;
|
||
|
pub const ELIBEXEC: u32 = 83;
|
||
|
pub const EILSEQ: u32 = 84;
|
||
|
pub const ERESTART: u32 = 85;
|
||
|
pub const ESTRPIPE: u32 = 86;
|
||
|
pub const EUSERS: u32 = 87;
|
||
|
pub const ENOTSOCK: u32 = 88;
|
||
|
pub const EDESTADDRREQ: u32 = 89;
|
||
|
pub const EMSGSIZE: u32 = 90;
|
||
|
pub const EPROTOTYPE: u32 = 91;
|
||
|
pub const ENOPROTOOPT: u32 = 92;
|
||
|
pub const EPROTONOSUPPORT: u32 = 93;
|
||
|
pub const ESOCKTNOSUPPORT: u32 = 94;
|
||
|
pub const EOPNOTSUPP: u32 = 95;
|
||
|
pub const EPFNOSUPPORT: u32 = 96;
|
||
|
pub const EAFNOSUPPORT: u32 = 97;
|
||
|
pub const EADDRINUSE: u32 = 98;
|
||
|
pub const EADDRNOTAVAIL: u32 = 99;
|
||
|
pub const ENETDOWN: u32 = 100;
|
||
|
pub const ENETUNREACH: u32 = 101;
|
||
|
pub const ENETRESET: u32 = 102;
|
||
|
pub const ECONNABORTED: u32 = 103;
|
||
|
pub const ECONNRESET: u32 = 104;
|
||
|
pub const ENOBUFS: u32 = 105;
|
||
|
pub const EISCONN: u32 = 106;
|
||
|
pub const ENOTCONN: u32 = 107;
|
||
|
pub const ESHUTDOWN: u32 = 108;
|
||
|
pub const ETOOMANYREFS: u32 = 109;
|
||
|
pub const ETIMEDOUT: u32 = 110;
|
||
|
pub const ECONNREFUSED: u32 = 111;
|
||
|
pub const EHOSTDOWN: u32 = 112;
|
||
|
pub const EHOSTUNREACH: u32 = 113;
|
||
|
pub const EALREADY: u32 = 114;
|
||
|
pub const EINPROGRESS: u32 = 115;
|
||
|
pub const ESTALE: u32 = 116;
|
||
|
pub const EUCLEAN: u32 = 117;
|
||
|
pub const ENOTNAM: u32 = 118;
|
||
|
pub const ENAVAIL: u32 = 119;
|
||
|
pub const EISNAM: u32 = 120;
|
||
|
pub const EREMOTEIO: u32 = 121;
|
||
|
pub const EDQUOT: u32 = 122;
|
||
|
pub const ENOMEDIUM: u32 = 123;
|
||
|
pub const EMEDIUMTYPE: u32 = 124;
|
||
|
pub const ECANCELED: u32 = 125;
|
||
|
pub const ENOKEY: u32 = 126;
|
||
|
pub const EKEYEXPIRED: u32 = 127;
|
||
|
pub const EKEYREVOKED: u32 = 128;
|
||
|
pub const EKEYREJECTED: u32 = 129;
|
||
|
pub const EOWNERDEAD: u32 = 130;
|
||
|
pub const ENOTRECOVERABLE: u32 = 131;
|
||
|
pub const ERFKILL: u32 = 132;
|
||
|
pub const EHWPOISON: u32 = 133;
|
||
|
pub const ENOTSUP: u32 = 95;
|
||
|
pub const NCCHANNEL_ALPHA_MASK: u32 = 805306368;
|
||
|
pub const CELL_ALPHA_HIGHCONTRAST: u32 = 805306368;
|
||
|
pub const CELL_ALPHA_TRANSPARENT: u32 = 536870912;
|
||
|
pub const CELL_ALPHA_BLEND: u32 = 268435456;
|
||
|
pub const CELL_ALPHA_OPAQUE: u32 = 0;
|
||
|
pub const CELL_WIDEASIAN_MASK: i64 = -9223372036854775808;
|
||
|
pub const CELL_NOBACKGROUND_MASK: u64 = 288230376151711744;
|
||
|
pub const CELL_BGDEFAULT_MASK: u32 = 1073741824;
|
||
|
pub const CELL_FGDEFAULT_MASK: u64 = 4611686018427387904;
|
||
|
pub const CELL_BG_RGB_MASK: u32 = 16777215;
|
||
|
pub const CELL_FG_RGB_MASK: u64 = 72057589742960640;
|
||
|
pub const CELL_BG_PALETTE: u32 = 134217728;
|
||
|
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_STANDOUT: u32 = 128;
|
||
|
pub const NCSTYLE_UNDERLINE: u32 = 64;
|
||
|
pub const NCSTYLE_REVERSE: u32 = 32;
|
||
|
pub const NCSTYLE_BLINK: u32 = 16;
|
||
|
pub const NCSTYLE_DIM: u32 = 8;
|
||
|
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_NONE: u32 = 0;
|
||
|
pub const NCOPTION_INHIBIT_SETLOCALE: u32 = 1;
|
||
|
pub const NCOPTION_VERIFY_SIXEL: u32 = 2;
|
||
|
pub const NCOPTION_NO_WINCH_SIGHANDLER: u32 = 4;
|
||
|
pub const NCOPTION_NO_QUIT_SIGHANDLERS: u32 = 8;
|
||
|
pub const NCOPTION_RETAIN_CURSOR: u32 = 16;
|
||
|
pub const NCOPTION_SUPPRESS_BANNERS: u32 = 32;
|
||
|
pub const NCOPTION_NO_ALTERNATE_SCREEN: u32 = 64;
|
||
|
pub const NCOPTION_NO_FONT_CHANGES: u32 = 128;
|
||
|
pub const WCHAR_MAX_UTF8BYTES: u32 = 6;
|
||
|
pub const NCBOXMASK_TOP: u32 = 1;
|
||
|
pub const NCBOXMASK_RIGHT: u32 = 2;
|
||
|
pub const NCBOXMASK_BOTTOM: u32 = 4;
|
||
|
pub const NCBOXMASK_LEFT: u32 = 8;
|
||
|
pub const NCBOXGRAD_TOP: u32 = 16;
|
||
|
pub const NCBOXGRAD_RIGHT: u32 = 32;
|
||
|
pub const NCBOXGRAD_BOTTOM: u32 = 64;
|
||
|
pub const NCBOXGRAD_LEFT: u32 = 128;
|
||
|
pub const NCBOXCORNER_MASK: u32 = 768;
|
||
|
pub const NCBOXCORNER_SHIFT: u32 = 8;
|
||
|
pub const NCVISUAL_OPTION_NODEGRADE: u32 = 1;
|
||
|
pub const NCVISUAL_OPTION_BLEND: u32 = 2;
|
||
|
pub const NCREEL_OPTION_INFINITESCROLL: u32 = 1;
|
||
|
pub const NCREEL_OPTION_CIRCULAR: u32 = 2;
|
||
|
pub const PREFIXCOLUMNS: u32 = 7;
|
||
|
pub const IPREFIXCOLUMNS: u32 = 8;
|
||
|
pub const BPREFIXCOLUMNS: u32 = 9;
|
||
|
pub const PREFIXSTRLEN: u32 = 8;
|
||
|
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 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 NCREADER_OPTION_HORSCROLL: u32 = 1;
|
||
|
pub const NCREADER_OPTION_VERSCROLL: u32 = 2;
|
||
|
pub type size_t = cty::c_ulong;
|
||
|
#[doc = " Convenience types."]
|
||
|
pub type __u_char = cty::c_uchar;
|
||
|
pub type __u_short = cty::c_ushort;
|
||
|
pub type __u_int = cty::c_uint;
|
||
|
pub type __u_long = cty::c_ulong;
|
||
|
#[doc = " Fixed-size types, underlying types depend on word size and compiler."]
|
||
|
pub type __int8_t = cty::c_schar;
|
||
|
pub type __uint8_t = cty::c_uchar;
|
||
|
pub type __int16_t = cty::c_short;
|
||
|
pub type __uint16_t = cty::c_ushort;
|
||
|
pub type __int32_t = cty::c_int;
|
||
|
pub type __uint32_t = cty::c_uint;
|
||
|
pub type __int64_t = cty::c_long;
|
||
|
pub type __uint64_t = cty::c_ulong;
|
||
|
#[doc = " Smallest types with at least a given width."]
|
||
|
pub type __int_least8_t = __int8_t;
|
||
|
pub type __uint_least8_t = __uint8_t;
|
||
|
pub type __int_least16_t = __int16_t;
|
||
|
pub type __uint_least16_t = __uint16_t;
|
||
|
pub type __int_least32_t = __int32_t;
|
||
|
pub type __uint_least32_t = __uint32_t;
|
||
|
pub type __int_least64_t = __int64_t;
|
||
|
pub type __uint_least64_t = __uint64_t;
|
||
|
pub type __quad_t = cty::c_long;
|
||
|
pub type __u_quad_t = cty::c_ulong;
|
||
|
pub type __intmax_t = cty::c_long;
|
||
|
pub type __uintmax_t = cty::c_ulong;
|
||
|
pub type __dev_t = cty::c_ulong;
|
||
|
pub type __uid_t = cty::c_uint;
|
||
|
pub type __gid_t = cty::c_uint;
|
||
|
pub type __ino_t = cty::c_ulong;
|
||
|
pub type __ino64_t = cty::c_ulong;
|
||
|
pub type __mode_t = cty::c_uint;
|
||
|
pub type __nlink_t = cty::c_ulong;
|
||
|
pub type __off_t = cty::c_long;
|
||
|
pub type __off64_t = cty::c_long;
|
||
|
pub type __pid_t = cty::c_int;
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct __fsid_t {
|
||
|
pub __val: [cty::c_int; 2usize],
|
||
|
}
|
||
|
#[test]
|
||
|
fn bindgen_test_layout___fsid_t() {
|
||
|
assert_eq!(
|
||
|
::core::mem::size_of::<__fsid_t>(),
|
||
|
8usize,
|
||
|
concat!("Size of: ", stringify!(__fsid_t))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
::core::mem::align_of::<__fsid_t>(),
|
||
|
4usize,
|
||
|
concat!("Alignment of ", stringify!(__fsid_t))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<__fsid_t>())).__val as *const _ as usize },
|
||
|
0usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(__fsid_t),
|
||
|
"::",
|
||
|
stringify!(__val)
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
pub type __clock_t = cty::c_long;
|
||
|
pub type __rlim_t = cty::c_ulong;
|
||
|
pub type __rlim64_t = cty::c_ulong;
|
||
|
pub type __id_t = cty::c_uint;
|
||
|
pub type __time_t = cty::c_long;
|
||
|
pub type __useconds_t = cty::c_uint;
|
||
|
pub type __suseconds_t = cty::c_long;
|
||
|
pub type __daddr_t = cty::c_int;
|
||
|
pub type __key_t = cty::c_int;
|
||
|
pub type __clockid_t = cty::c_int;
|
||
|
pub type __timer_t = *mut cty::c_void;
|
||
|
pub type __blksize_t = cty::c_long;
|
||
|
pub type __blkcnt_t = cty::c_long;
|
||
|
pub type __blkcnt64_t = cty::c_long;
|
||
|
pub type __fsblkcnt_t = cty::c_ulong;
|
||
|
pub type __fsblkcnt64_t = cty::c_ulong;
|
||
|
pub type __fsfilcnt_t = cty::c_ulong;
|
||
|
pub type __fsfilcnt64_t = cty::c_ulong;
|
||
|
pub type __fsword_t = cty::c_long;
|
||
|
pub type __ssize_t = cty::c_long;
|
||
|
pub type __syscall_slong_t = cty::c_long;
|
||
|
pub type __syscall_ulong_t = cty::c_ulong;
|
||
|
#[doc = " These few don't really vary by system, they always correspond"]
|
||
|
#[doc = "to one of the other defined types."]
|
||
|
pub type __loff_t = __off64_t;
|
||
|
pub type __caddr_t = *mut cty::c_char;
|
||
|
pub type __intptr_t = cty::c_long;
|
||
|
pub type __socklen_t = cty::c_uint;
|
||
|
#[doc = " C99: An integer type that can be accessed as an atomic entity,"]
|
||
|
#[doc = "even in the presence of asynchronous interrupts."]
|
||
|
#[doc = "It is not currently necessary for this to be machine-specific."]
|
||
|
pub type __sig_atomic_t = cty::c_int;
|
||
|
extern "C" {
|
||
|
#[doc = " Even though CLOCKS_PER_SEC has such a strange value CLK_TCK"]
|
||
|
#[doc = "presents the real value for clock ticks per second for the system."]
|
||
|
pub fn __sysconf(arg1: cty::c_int) -> cty::c_long;
|
||
|
}
|
||
|
#[doc = " Returned by `clock'."]
|
||
|
pub type clock_t = __clock_t;
|
||
|
#[doc = " Returned by `time'."]
|
||
|
pub type time_t = __time_t;
|
||
|
#[doc = " ISO C `broken-down time' structure."]
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct tm {
|
||
|
#[doc = " Seconds.\t[0-60] (1 leap second)"]
|
||
|
pub tm_sec: cty::c_int,
|
||
|
#[doc = " Minutes.\t[0-59]"]
|
||
|
pub tm_min: cty::c_int,
|
||
|
#[doc = " Hours.\t[0-23]"]
|
||
|
pub tm_hour: cty::c_int,
|
||
|
#[doc = " Day.\t\t[1-31]"]
|
||
|
pub tm_mday: cty::c_int,
|
||
|
#[doc = " Month.\t[0-11]"]
|
||
|
pub tm_mon: cty::c_int,
|
||
|
#[doc = " Year\t- 1900."]
|
||
|
pub tm_year: cty::c_int,
|
||
|
#[doc = " Day of week.\t[0-6]"]
|
||
|
pub tm_wday: cty::c_int,
|
||
|
#[doc = " Days in year.[0-365]"]
|
||
|
pub tm_yday: cty::c_int,
|
||
|
#[doc = " DST.\t\t[-1/0/1]"]
|
||
|
pub tm_isdst: cty::c_int,
|
||
|
#[doc = " Seconds east of UTC."]
|
||
|
pub __tm_gmtoff: cty::c_long,
|
||
|
#[doc = " Timezone abbreviation."]
|
||
|
pub __tm_zone: *const cty::c_char,
|
||
|
}
|
||
|
#[test]
|
||
|
fn bindgen_test_layout_tm() {
|
||
|
assert_eq!(
|
||
|
::core::mem::size_of::<tm>(),
|
||
|
56usize,
|
||
|
concat!("Size of: ", stringify!(tm))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
::core::mem::align_of::<tm>(),
|
||
|
8usize,
|
||
|
concat!("Alignment of ", stringify!(tm))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<tm>())).tm_sec as *const _ as usize },
|
||
|
0usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(tm),
|
||
|
"::",
|
||
|
stringify!(tm_sec)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<tm>())).tm_min as *const _ as usize },
|
||
|
4usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(tm),
|
||
|
"::",
|
||
|
stringify!(tm_min)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<tm>())).tm_hour as *const _ as usize },
|
||
|
8usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(tm),
|
||
|
"::",
|
||
|
stringify!(tm_hour)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<tm>())).tm_mday as *const _ as usize },
|
||
|
12usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(tm),
|
||
|
"::",
|
||
|
stringify!(tm_mday)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<tm>())).tm_mon as *const _ as usize },
|
||
|
16usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(tm),
|
||
|
"::",
|
||
|
stringify!(tm_mon)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<tm>())).tm_year as *const _ as usize },
|
||
|
20usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(tm),
|
||
|
"::",
|
||
|
stringify!(tm_year)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<tm>())).tm_wday as *const _ as usize },
|
||
|
24usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(tm),
|
||
|
"::",
|
||
|
stringify!(tm_wday)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<tm>())).tm_yday as *const _ as usize },
|
||
|
28usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(tm),
|
||
|
"::",
|
||
|
stringify!(tm_yday)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<tm>())).tm_isdst as *const _ as usize },
|
||
|
32usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(tm),
|
||
|
"::",
|
||
|
stringify!(tm_isdst)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<tm>())).__tm_gmtoff as *const _ as usize },
|
||
|
40usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(tm),
|
||
|
"::",
|
||
|
stringify!(__tm_gmtoff)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<tm>())).__tm_zone as *const _ as usize },
|
||
|
48usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(tm),
|
||
|
"::",
|
||
|
stringify!(__tm_zone)
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
#[doc = " POSIX.1b structure for a time value. This is like a `struct timeval' but"]
|
||
|
#[doc = "has nanoseconds instead of microseconds."]
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct timespec {
|
||
|
#[doc = " Seconds."]
|
||
|
pub tv_sec: __time_t,
|
||
|
#[doc = " Nanoseconds."]
|
||
|
pub tv_nsec: __syscall_slong_t,
|
||
|
}
|
||
|
#[test]
|
||
|
fn bindgen_test_layout_timespec() {
|
||
|
assert_eq!(
|
||
|
::core::mem::size_of::<timespec>(),
|
||
|
16usize,
|
||
|
concat!("Size of: ", stringify!(timespec))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
::core::mem::align_of::<timespec>(),
|
||
|
8usize,
|
||
|
concat!("Alignment of ", stringify!(timespec))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<timespec>())).tv_sec as *const _ as usize },
|
||
|
0usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(timespec),
|
||
|
"::",
|
||
|
stringify!(tv_sec)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<timespec>())).tv_nsec as *const _ as usize },
|
||
|
8usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(timespec),
|
||
|
"::",
|
||
|
stringify!(tv_nsec)
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Time used by the program so far (user time + system time)."]
|
||
|
#[doc = "The result / CLOCKS_PER_SEC is program time in seconds."]
|
||
|
pub fn clock() -> clock_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the current time and put it in *TIMER if TIMER is not NULL."]
|
||
|
pub fn time(__timer: *mut time_t) -> time_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the difference between TIME1 and TIME0."]
|
||
|
pub fn difftime(__time1: time_t, __time0: time_t) -> f64;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the `time_t' representation of TP and normalize TP."]
|
||
|
pub fn mktime(__tp: *mut tm) -> time_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Format TP into S according to FORMAT."]
|
||
|
#[doc = "Write no more than MAXSIZE characters and return the number"]
|
||
|
#[doc = "of characters written, or 0 if it would exceed MAXSIZE."]
|
||
|
pub fn strftime(
|
||
|
__s: *mut cty::c_char,
|
||
|
__maxsize: size_t,
|
||
|
__format: *const cty::c_char,
|
||
|
__tp: *const tm,
|
||
|
) -> size_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Parse S according to FORMAT and store binary time information in TP."]
|
||
|
#[doc = "The return value is a pointer to the first unparsed character in S."]
|
||
|
pub fn strptime(
|
||
|
__s: *const cty::c_char,
|
||
|
__fmt: *const cty::c_char,
|
||
|
__tp: *mut tm,
|
||
|
) -> *mut cty::c_char;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the `struct tm' representation of *TIMER"]
|
||
|
#[doc = "in Universal Coordinated Time (aka Greenwich Mean Time)."]
|
||
|
pub fn gmtime(__timer: *const time_t) -> *mut tm;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the `struct tm' representation"]
|
||
|
#[doc = "of *TIMER in the local timezone."]
|
||
|
pub fn localtime(__timer: *const time_t) -> *mut tm;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the `struct tm' representation of *TIMER in UTC,"]
|
||
|
#[doc = "using *TP to store the result."]
|
||
|
pub fn gmtime_r(__timer: *const time_t, __tp: *mut tm) -> *mut tm;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the `struct tm' representation of *TIMER in local time,"]
|
||
|
#[doc = "using *TP to store the result."]
|
||
|
pub fn localtime_r(__timer: *const time_t, __tp: *mut tm) -> *mut tm;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return a string of the form \"Day Mon dd hh:mm:ss yyyy\\n\""]
|
||
|
#[doc = "that is the representation of TP in this format."]
|
||
|
pub fn asctime(__tp: *const tm) -> *mut cty::c_char;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Equivalent to `asctime (localtime (timer))'."]
|
||
|
pub fn ctime(__timer: *const time_t) -> *mut cty::c_char;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return in BUF a string of the form \"Day Mon dd hh:mm:ss yyyy\\n\""]
|
||
|
#[doc = "that is the representation of TP in this format."]
|
||
|
pub fn asctime_r(__tp: *const tm, __buf: *mut cty::c_char) -> *mut cty::c_char;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Equivalent to `asctime_r (localtime_r (timer, *TMP*), buf)'."]
|
||
|
pub fn ctime_r(__timer: *const time_t, __buf: *mut cty::c_char) -> *mut cty::c_char;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub static mut __tzname: [*mut cty::c_char; 2usize];
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub static mut __daylight: cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub static mut __timezone: cty::c_long;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub static mut tzname: [*mut cty::c_char; 2usize];
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Set time conversion information from the TZ environment variable."]
|
||
|
#[doc = "If TZ is not defined, a locale-dependent default is used."]
|
||
|
pub fn tzset();
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub static mut daylight: cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub static mut timezone: cty::c_long;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Set TS to calendar time based in time base BASE."]
|
||
|
pub fn timespec_get(__ts: *mut timespec, __base: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
#[doc = " Conversion state information."]
|
||
|
#[repr(C)]
|
||
|
#[derive(Copy, Clone)]
|
||
|
pub struct __mbstate_t {
|
||
|
pub __count: cty::c_int,
|
||
|
#[doc = " Value so far."]
|
||
|
pub __value: __mbstate_t__bindgen_ty_1,
|
||
|
}
|
||
|
#[repr(C)]
|
||
|
#[derive(Copy, Clone)]
|
||
|
pub union __mbstate_t__bindgen_ty_1 {
|
||
|
pub __wch: cty::c_uint,
|
||
|
pub __wchb: [cty::c_char; 4usize],
|
||
|
_bindgen_union_align: u32,
|
||
|
}
|
||
|
#[test]
|
||
|
fn bindgen_test_layout___mbstate_t__bindgen_ty_1() {
|
||
|
assert_eq!(
|
||
|
::core::mem::size_of::<__mbstate_t__bindgen_ty_1>(),
|
||
|
4usize,
|
||
|
concat!("Size of: ", stringify!(__mbstate_t__bindgen_ty_1))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
::core::mem::align_of::<__mbstate_t__bindgen_ty_1>(),
|
||
|
4usize,
|
||
|
concat!("Alignment of ", stringify!(__mbstate_t__bindgen_ty_1))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe {
|
||
|
&(*(::core::ptr::null::<__mbstate_t__bindgen_ty_1>())).__wch as *const _ as usize
|
||
|
},
|
||
|
0usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(__mbstate_t__bindgen_ty_1),
|
||
|
"::",
|
||
|
stringify!(__wch)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe {
|
||
|
&(*(::core::ptr::null::<__mbstate_t__bindgen_ty_1>())).__wchb as *const _ as usize
|
||
|
},
|
||
|
0usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(__mbstate_t__bindgen_ty_1),
|
||
|
"::",
|
||
|
stringify!(__wchb)
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
#[test]
|
||
|
fn bindgen_test_layout___mbstate_t() {
|
||
|
assert_eq!(
|
||
|
::core::mem::size_of::<__mbstate_t>(),
|
||
|
8usize,
|
||
|
concat!("Size of: ", stringify!(__mbstate_t))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
::core::mem::align_of::<__mbstate_t>(),
|
||
|
4usize,
|
||
|
concat!("Alignment of ", stringify!(__mbstate_t))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<__mbstate_t>())).__count as *const _ as usize },
|
||
|
0usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(__mbstate_t),
|
||
|
"::",
|
||
|
stringify!(__count)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<__mbstate_t>())).__value as *const _ as usize },
|
||
|
4usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(__mbstate_t),
|
||
|
"::",
|
||
|
stringify!(__value)
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
pub type mbstate_t = __mbstate_t;
|
||
|
#[doc = " Define the 16-bit and 32-bit character types."]
|
||
|
pub type char16_t = __uint_least16_t;
|
||
|
pub type char32_t = __uint_least32_t;
|
||
|
extern "C" {
|
||
|
#[doc = " Write char16_t representation of multibyte character pointed"]
|
||
|
#[doc = "to by S to PC16."]
|
||
|
pub fn mbrtoc16(
|
||
|
__pc16: *mut char16_t,
|
||
|
__s: *const cty::c_char,
|
||
|
__n: size_t,
|
||
|
__p: *mut mbstate_t,
|
||
|
) -> size_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Write multibyte representation of char16_t C16 to S."]
|
||
|
pub fn c16rtomb(__s: *mut cty::c_char, __c16: char16_t, __ps: *mut mbstate_t) -> size_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Write char32_t representation of multibyte character pointed"]
|
||
|
#[doc = "to by S to PC32."]
|
||
|
pub fn mbrtoc32(
|
||
|
__pc32: *mut char32_t,
|
||
|
__s: *const cty::c_char,
|
||
|
__n: size_t,
|
||
|
__p: *mut mbstate_t,
|
||
|
) -> size_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Write multibyte representation of char32_t C32 to S."]
|
||
|
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;
|
||
|
#[doc = " lowercase."]
|
||
|
pub const _ISlower: _bindgen_ty_1 = 512;
|
||
|
#[doc = " Alphabetic."]
|
||
|
pub const _ISalpha: _bindgen_ty_1 = 1024;
|
||
|
#[doc = " Numeric."]
|
||
|
pub const _ISdigit: _bindgen_ty_1 = 2048;
|
||
|
#[doc = " Hexadecimal numeric."]
|
||
|
pub const _ISxdigit: _bindgen_ty_1 = 4096;
|
||
|
#[doc = " Whitespace."]
|
||
|
pub const _ISspace: _bindgen_ty_1 = 8192;
|
||
|
#[doc = " Printing."]
|
||
|
pub const _ISprint: _bindgen_ty_1 = 16384;
|
||
|
#[doc = " Graphical."]
|
||
|
pub const _ISgraph: _bindgen_ty_1 = 32768;
|
||
|
#[doc = " Blank (usually SPC and TAB)."]
|
||
|
pub const _ISblank: _bindgen_ty_1 = 1;
|
||
|
#[doc = " Control character."]
|
||
|
pub const _IScntrl: _bindgen_ty_1 = 2;
|
||
|
#[doc = " Punctuation."]
|
||
|
pub const _ISpunct: _bindgen_ty_1 = 4;
|
||
|
#[doc = " Alphanumeric."]
|
||
|
pub const _ISalnum: _bindgen_ty_1 = 8;
|
||
|
pub type _bindgen_ty_1 = u32;
|
||
|
extern "C" {
|
||
|
#[doc = " These are defined in ctype-info.c."]
|
||
|
#[doc = "The declarations here must match those in localeinfo.h."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "In the thread-specific locale model (see `uselocale' in <locale.h>)"]
|
||
|
#[doc = "we cannot use global variables for these as was done in the past."]
|
||
|
#[doc = "Instead, the following accessor functions return the address of"]
|
||
|
#[doc = "each variable, which is local to the current thread if multithreaded."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "These point into arrays of 384, so they can be indexed by any `unsigned"]
|
||
|
#[doc = "char' value [0,255]; by EOF (-1); or by any `signed char' value"]
|
||
|
#[doc = "[-128,-1). ISO C requires that the ctype functions work for `unsigned"]
|
||
|
#[doc = "char' values and for EOF; we also support negative `signed char' values"]
|
||
|
#[doc = "for broken old programs. The case conversion arrays are of `int's"]
|
||
|
#[doc = "rather than `unsigned char's because tolower (EOF) must be EOF, which"]
|
||
|
#[doc = "doesn't fit into an `unsigned char'. But today more important is that"]
|
||
|
#[doc = "the arrays are also used for multi-byte character sets."]
|
||
|
pub fn __ctype_b_loc() -> *mut *const cty::c_ushort;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn __ctype_tolower_loc() -> *mut *const __int32_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn __ctype_toupper_loc() -> *mut *const __int32_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn isalnum(arg1: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn isalpha(arg1: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn iscntrl(arg1: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn isdigit(arg1: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn islower(arg1: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn isgraph(arg1: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn isprint(arg1: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ispunct(arg1: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn isspace(arg1: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn isupper(arg1: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn isxdigit(arg1: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the lowercase version of C."]
|
||
|
pub fn tolower(__c: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the uppercase version of C."]
|
||
|
pub fn toupper(__c: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn isblank(arg1: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return nonzero iff C is in the ASCII set"]
|
||
|
#[doc = "(i.e., is no more than 7 bits wide)."]
|
||
|
pub fn isascii(__c: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the part of C that is in the ASCII set"]
|
||
|
#[doc = "(i.e., the low-order 7 bits of C)."]
|
||
|
pub fn toascii(__c: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn _toupper(arg1: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn _tolower(arg1: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
pub type _Float32 = f32;
|
||
|
pub type _Float64 = f64;
|
||
|
pub type _Float32x = f64;
|
||
|
pub type _Float64x = u128;
|
||
|
pub type wchar_t = cty::c_int;
|
||
|
pub type va_list = __builtin_va_list;
|
||
|
pub type __gnuc_va_list = __builtin_va_list;
|
||
|
pub type wint_t = cty::c_uint;
|
||
|
pub type __FILE = _IO_FILE;
|
||
|
#[doc = " Scalar type that can hold values which represent locale-specific"]
|
||
|
#[doc = "character classifications."]
|
||
|
pub type wctype_t = cty::c_ulong;
|
||
|
#[doc = " UPPERCASE."]
|
||
|
pub const __ISwupper: _bindgen_ty_2 = 0;
|
||
|
#[doc = " lowercase."]
|
||
|
pub const __ISwlower: _bindgen_ty_2 = 1;
|
||
|
#[doc = " Alphabetic."]
|
||
|
pub const __ISwalpha: _bindgen_ty_2 = 2;
|
||
|
#[doc = " Numeric."]
|
||
|
pub const __ISwdigit: _bindgen_ty_2 = 3;
|
||
|
#[doc = " Hexadecimal numeric."]
|
||
|
pub const __ISwxdigit: _bindgen_ty_2 = 4;
|
||
|
#[doc = " Whitespace."]
|
||
|
pub const __ISwspace: _bindgen_ty_2 = 5;
|
||
|
#[doc = " Printing."]
|
||
|
pub const __ISwprint: _bindgen_ty_2 = 6;
|
||
|
#[doc = " Graphical."]
|
||
|
pub const __ISwgraph: _bindgen_ty_2 = 7;
|
||
|
#[doc = " Blank (usually SPC and TAB)."]
|
||
|
pub const __ISwblank: _bindgen_ty_2 = 8;
|
||
|
#[doc = " Control character."]
|
||
|
pub const __ISwcntrl: _bindgen_ty_2 = 9;
|
||
|
#[doc = " Punctuation."]
|
||
|
pub const __ISwpunct: _bindgen_ty_2 = 10;
|
||
|
#[doc = " Alphanumeric."]
|
||
|
pub const __ISwalnum: _bindgen_ty_2 = 11;
|
||
|
#[doc = " UPPERCASE."]
|
||
|
pub const _ISwupper: _bindgen_ty_2 = 16777216;
|
||
|
#[doc = " lowercase."]
|
||
|
pub const _ISwlower: _bindgen_ty_2 = 33554432;
|
||
|
#[doc = " Alphabetic."]
|
||
|
pub const _ISwalpha: _bindgen_ty_2 = 67108864;
|
||
|
#[doc = " Numeric."]
|
||
|
pub const _ISwdigit: _bindgen_ty_2 = 134217728;
|
||
|
#[doc = " Hexadecimal numeric."]
|
||
|
pub const _ISwxdigit: _bindgen_ty_2 = 268435456;
|
||
|
#[doc = " Whitespace."]
|
||
|
pub const _ISwspace: _bindgen_ty_2 = 536870912;
|
||
|
#[doc = " Printing."]
|
||
|
pub const _ISwprint: _bindgen_ty_2 = 1073741824;
|
||
|
#[doc = " Graphical."]
|
||
|
pub const _ISwgraph: _bindgen_ty_2 = -2147483648;
|
||
|
#[doc = " Blank (usually SPC and TAB)."]
|
||
|
pub const _ISwblank: _bindgen_ty_2 = 65536;
|
||
|
#[doc = " Control character."]
|
||
|
pub const _ISwcntrl: _bindgen_ty_2 = 131072;
|
||
|
#[doc = " Punctuation."]
|
||
|
pub const _ISwpunct: _bindgen_ty_2 = 262144;
|
||
|
#[doc = " Alphanumeric."]
|
||
|
pub const _ISwalnum: _bindgen_ty_2 = 524288;
|
||
|
pub type _bindgen_ty_2 = i32;
|
||
|
extern "C" {
|
||
|
#[doc = " Test for any wide character for which `iswalpha' or `iswdigit' is"]
|
||
|
#[doc = "true."]
|
||
|
pub fn iswalnum(__wc: wint_t) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Test for any wide character for which `iswupper' or 'iswlower' is"]
|
||
|
#[doc = "true, or any wide character that is one of a locale-specific set of"]
|
||
|
#[doc = "wide-characters for which none of `iswcntrl', `iswdigit',"]
|
||
|
#[doc = "`iswpunct', or `iswspace' is true."]
|
||
|
pub fn iswalpha(__wc: wint_t) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Test for any control wide character."]
|
||
|
pub fn iswcntrl(__wc: wint_t) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Test for any wide character that corresponds to a decimal-digit"]
|
||
|
#[doc = "character."]
|
||
|
pub fn iswdigit(__wc: wint_t) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Test for any wide character for which `iswprint' is true and"]
|
||
|
#[doc = "`iswspace' is false."]
|
||
|
pub fn iswgraph(__wc: wint_t) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Test for any wide character that corresponds to a lowercase letter"]
|
||
|
#[doc = "or is one of a locale-specific set of wide characters for which"]
|
||
|
#[doc = "none of `iswcntrl', `iswdigit', `iswpunct', or `iswspace' is true."]
|
||
|
pub fn iswlower(__wc: wint_t) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Test for any printing wide character."]
|
||
|
pub fn iswprint(__wc: wint_t) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Test for any printing wide character that is one of a"]
|
||
|
#[doc = "locale-specific et of wide characters for which neither `iswspace'"]
|
||
|
#[doc = "nor `iswalnum' is true."]
|
||
|
pub fn iswpunct(__wc: wint_t) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Test for any wide character that corresponds to a locale-specific"]
|
||
|
#[doc = "set of wide characters for which none of `iswalnum', `iswgraph', or"]
|
||
|
#[doc = "`iswpunct' is true."]
|
||
|
pub fn iswspace(__wc: wint_t) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Test for any wide character that corresponds to an uppercase letter"]
|
||
|
#[doc = "or is one of a locale-specific set of wide character for which none"]
|
||
|
#[doc = "of `iswcntrl', `iswdigit', `iswpunct', or `iswspace' is true."]
|
||
|
pub fn iswupper(__wc: wint_t) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Test for any wide character that corresponds to a hexadecimal-digit"]
|
||
|
#[doc = "character equivalent to that performed be the functions described"]
|
||
|
#[doc = "in the previous subclause."]
|
||
|
pub fn iswxdigit(__wc: wint_t) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn iswblank(__wc: wint_t) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Construct value that describes a class of wide characters identified"]
|
||
|
#[doc = "by the string argument PROPERTY."]
|
||
|
pub fn wctype(__property: *const cty::c_char) -> wctype_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Determine whether the wide-character WC has the property described by"]
|
||
|
#[doc = "DESC."]
|
||
|
pub fn iswctype(__wc: wint_t, __desc: wctype_t) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Converts an uppercase letter to the corresponding lowercase letter."]
|
||
|
pub fn towlower(__wc: wint_t) -> wint_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Converts an lowercase letter to the corresponding uppercase letter."]
|
||
|
pub fn towupper(__wc: wint_t) -> wint_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Copy SRC to DEST."]
|
||
|
pub fn wcscpy(__dest: *mut wchar_t, __src: *const wchar_t) -> *mut wchar_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Copy no more than N wide-characters of SRC to DEST."]
|
||
|
pub fn wcsncpy(__dest: *mut wchar_t, __src: *const wchar_t, __n: size_t) -> *mut wchar_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Append SRC onto DEST."]
|
||
|
pub fn wcscat(__dest: *mut wchar_t, __src: *const wchar_t) -> *mut wchar_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Append no more than N wide-characters of SRC onto DEST."]
|
||
|
pub fn wcsncat(__dest: *mut wchar_t, __src: *const wchar_t, __n: size_t) -> *mut wchar_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Compare S1 and S2."]
|
||
|
pub fn wcscmp(__s1: *const cty::c_int, __s2: *const cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Compare N wide-characters of S1 and S2."]
|
||
|
pub fn wcsncmp(
|
||
|
__s1: *const cty::c_int,
|
||
|
__s2: *const cty::c_int,
|
||
|
__n: cty::c_ulong,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Compare S1 and S2, both interpreted as appropriate to the"]
|
||
|
#[doc = "LC_COLLATE category of the current locale."]
|
||
|
pub fn wcscoll(__s1: *const wchar_t, __s2: *const wchar_t) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Transform S2 into array pointed to by S1 such that if wcscmp is"]
|
||
|
#[doc = "applied to two transformed strings the result is the as applying"]
|
||
|
#[doc = "`wcscoll' to the original strings."]
|
||
|
pub fn wcsxfrm(__s1: *mut wchar_t, __s2: *const wchar_t, __n: size_t) -> size_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn wcschr(__wcs: *const cty::c_int, __wc: cty::c_int) -> *mut cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn wcsrchr(__wcs: *const wchar_t, __wc: wchar_t) -> *mut wchar_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the length of the initial segmet of WCS which"]
|
||
|
#[doc = "consists entirely of wide characters not in REJECT."]
|
||
|
pub fn wcscspn(__wcs: *const wchar_t, __reject: *const wchar_t) -> size_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the length of the initial segmet of WCS which"]
|
||
|
#[doc = "consists entirely of wide characters in ACCEPT."]
|
||
|
pub fn wcsspn(__wcs: *const wchar_t, __accept: *const wchar_t) -> size_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn wcspbrk(__wcs: *const wchar_t, __accept: *const wchar_t) -> *mut wchar_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn wcsstr(__haystack: *const wchar_t, __needle: *const wchar_t) -> *mut wchar_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Divide WCS into tokens separated by characters in DELIM."]
|
||
|
pub fn wcstok(
|
||
|
__s: *mut wchar_t,
|
||
|
__delim: *const wchar_t,
|
||
|
__ptr: *mut *mut wchar_t,
|
||
|
) -> *mut wchar_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the number of wide characters in S."]
|
||
|
pub fn wcslen(__s: *const cty::c_int) -> cty::c_ulong;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn wcswcs(__haystack: *const wchar_t, __needle: *const wchar_t) -> *mut wchar_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn wmemchr(__s: *const cty::c_int, __c: cty::c_int, __n: cty::c_ulong) -> *mut cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Compare N wide characters of S1 and S2."]
|
||
|
pub fn wmemcmp(
|
||
|
__s1: *const cty::c_int,
|
||
|
__s2: *const cty::c_int,
|
||
|
__n: cty::c_ulong,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Copy N wide characters of SRC to DEST."]
|
||
|
pub fn wmemcpy(
|
||
|
__s1: *mut cty::c_int,
|
||
|
__s2: *const cty::c_int,
|
||
|
__n: cty::c_ulong,
|
||
|
) -> *mut cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Copy N wide characters of SRC to DEST, guaranteeing"]
|
||
|
#[doc = "correct behavior for overlapping strings."]
|
||
|
pub fn wmemmove(
|
||
|
__s1: *mut cty::c_int,
|
||
|
__s2: *const cty::c_int,
|
||
|
__n: cty::c_ulong,
|
||
|
) -> *mut cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Set N wide characters of S to C."]
|
||
|
pub fn wmemset(__s: *mut wchar_t, __c: wchar_t, __n: size_t) -> *mut wchar_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Determine whether C constitutes a valid (one-byte) multibyte"]
|
||
|
#[doc = "character."]
|
||
|
pub fn btowc(__c: cty::c_int) -> wint_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Determine whether C corresponds to a member of the extended"]
|
||
|
#[doc = "character set whose multibyte representation is a single byte."]
|
||
|
pub fn wctob(__c: wint_t) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Determine whether PS points to an object representing the initial"]
|
||
|
#[doc = "state."]
|
||
|
pub fn mbsinit(__ps: *const mbstate_t) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Write wide character representation of multibyte character pointed"]
|
||
|
#[doc = "to by S to PWC."]
|
||
|
pub fn mbrtowc(
|
||
|
__pwc: *mut wchar_t,
|
||
|
__s: *const cty::c_char,
|
||
|
__n: size_t,
|
||
|
__p: *mut mbstate_t,
|
||
|
) -> size_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Write multibyte representation of wide character WC to S."]
|
||
|
pub fn wcrtomb(__s: *mut cty::c_char, __wc: wchar_t, __ps: *mut mbstate_t) -> size_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return number of bytes in multibyte character pointed to by S."]
|
||
|
pub fn __mbrlen(__s: *const cty::c_char, __n: size_t, __ps: *mut mbstate_t) -> size_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn mbrlen(__s: *const cty::c_char, __n: size_t, __ps: *mut mbstate_t) -> size_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Write wide character representation of multibyte character string"]
|
||
|
#[doc = "SRC to DST."]
|
||
|
pub fn mbsrtowcs(
|
||
|
__dst: *mut wchar_t,
|
||
|
__src: *mut *const cty::c_char,
|
||
|
__len: size_t,
|
||
|
__ps: *mut mbstate_t,
|
||
|
) -> size_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Write multibyte character representation of wide character string"]
|
||
|
#[doc = "SRC to DST."]
|
||
|
pub fn wcsrtombs(
|
||
|
__dst: *mut cty::c_char,
|
||
|
__src: *mut *const wchar_t,
|
||
|
__len: size_t,
|
||
|
__ps: *mut mbstate_t,
|
||
|
) -> size_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Determine number of column positions required for C."]
|
||
|
pub fn wcwidth(__c: wchar_t) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Determine number of column positions required for first N wide"]
|
||
|
#[doc = "characters (or fewer if S ends before this) in S."]
|
||
|
pub fn wcswidth(__s: *const wchar_t, __n: size_t) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Convert initial portion of the wide string NPTR to `double'"]
|
||
|
#[doc = "representation."]
|
||
|
pub fn wcstod(__nptr: *const wchar_t, __endptr: *mut *mut wchar_t) -> f64;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Likewise for `float' and `long double' sizes of floating-point numbers."]
|
||
|
pub fn wcstof(__nptr: *const wchar_t, __endptr: *mut *mut wchar_t) -> f32;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Convert initial portion of wide string NPTR to `long int'"]
|
||
|
#[doc = "representation."]
|
||
|
pub fn wcstol(
|
||
|
__nptr: *const wchar_t,
|
||
|
__endptr: *mut *mut wchar_t,
|
||
|
__base: cty::c_int,
|
||
|
) -> cty::c_long;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Convert initial portion of wide string NPTR to `unsigned long int'"]
|
||
|
#[doc = "representation."]
|
||
|
pub fn wcstoul(
|
||
|
__nptr: *const wchar_t,
|
||
|
__endptr: *mut *mut wchar_t,
|
||
|
__base: cty::c_int,
|
||
|
) -> cty::c_ulong;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Convert initial portion of wide string NPTR to `long long int'"]
|
||
|
#[doc = "representation."]
|
||
|
pub fn wcstoll(
|
||
|
__nptr: *const wchar_t,
|
||
|
__endptr: *mut *mut wchar_t,
|
||
|
__base: cty::c_int,
|
||
|
) -> cty::c_longlong;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Convert initial portion of wide string NPTR to `unsigned long long int'"]
|
||
|
#[doc = "representation."]
|
||
|
pub fn wcstoull(
|
||
|
__nptr: *const wchar_t,
|
||
|
__endptr: *mut *mut wchar_t,
|
||
|
__base: cty::c_int,
|
||
|
) -> cty::c_ulonglong;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Select orientation for stream."]
|
||
|
pub fn fwide(__fp: *mut __FILE, __mode: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Write formatted output to STREAM."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn fwprintf(__stream: *mut __FILE, __format: *const wchar_t, ...) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Write formatted output to stdout."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn wprintf(__format: *const wchar_t, ...) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Write formatted output of at most N characters to S."]
|
||
|
pub fn swprintf(__s: *mut wchar_t, __n: size_t, __format: *const wchar_t, ...) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Write formatted output to S from argument list ARG."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn vfwprintf(
|
||
|
__s: *mut __FILE,
|
||
|
__format: *const wchar_t,
|
||
|
__arg: *mut __va_list_tag,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Write formatted output to stdout from argument list ARG."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn vwprintf(__format: *const wchar_t, __arg: *mut __va_list_tag) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Write formatted output of at most N character to S from argument"]
|
||
|
#[doc = "list ARG."]
|
||
|
pub fn vswprintf(
|
||
|
__s: *mut wchar_t,
|
||
|
__n: size_t,
|
||
|
__format: *const wchar_t,
|
||
|
__arg: *mut __va_list_tag,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Read formatted input from STREAM."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn fwscanf(__stream: *mut __FILE, __format: *const wchar_t, ...) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Read formatted input from stdin."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn wscanf(__format: *const wchar_t, ...) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Read formatted input from S."]
|
||
|
pub fn swscanf(__s: *const wchar_t, __format: *const wchar_t, ...) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Read formatted input from STREAM."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
#[link_name = "\u{1}__isoc99_fwscanf"]
|
||
|
pub fn fwscanf1(__stream: *mut __FILE, __format: *const wchar_t, ...) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Read formatted input from stdin."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
#[link_name = "\u{1}__isoc99_wscanf"]
|
||
|
pub fn wscanf1(__format: *const wchar_t, ...) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Read formatted input from S."]
|
||
|
#[link_name = "\u{1}__isoc99_swscanf"]
|
||
|
pub fn swscanf1(__s: *const wchar_t, __format: *const wchar_t, ...) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Read formatted input from S into argument list ARG."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn vfwscanf(
|
||
|
__s: *mut __FILE,
|
||
|
__format: *const wchar_t,
|
||
|
__arg: *mut __va_list_tag,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Read formatted input from stdin into argument list ARG."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn vwscanf(__format: *const wchar_t, __arg: *mut __va_list_tag) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Read formatted input from S into argument list ARG."]
|
||
|
pub fn vswscanf(
|
||
|
__s: *const wchar_t,
|
||
|
__format: *const wchar_t,
|
||
|
__arg: *mut __va_list_tag,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Read a character from STREAM."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "These functions are possible cancellation points and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn fgetwc(__stream: *mut __FILE) -> wint_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn getwc(__stream: *mut __FILE) -> wint_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Read a character from stdin."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn getwchar() -> wint_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Write a character to STREAM."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "These functions are possible cancellation points and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn fputwc(__wc: wchar_t, __stream: *mut __FILE) -> wint_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn putwc(__wc: wchar_t, __stream: *mut __FILE) -> wint_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Write a character to stdout."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn putwchar(__wc: wchar_t) -> wint_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Get a newline-terminated wide character string of finite length"]
|
||
|
#[doc = "from STREAM."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn fgetws(__ws: *mut wchar_t, __n: cty::c_int, __stream: *mut __FILE) -> *mut wchar_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Write a string to STREAM."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn fputws(__ws: *const wchar_t, __stream: *mut __FILE) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Push a character back onto the input buffer of STREAM."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn ungetwc(__wc: wint_t, __stream: *mut __FILE) -> wint_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Format TP into S according to FORMAT."]
|
||
|
#[doc = "Write no more than MAXSIZE wide characters and return the number"]
|
||
|
#[doc = "of wide characters written, or 0 if it would exceed MAXSIZE."]
|
||
|
pub fn wcsftime(
|
||
|
__s: *mut wchar_t,
|
||
|
__maxsize: size_t,
|
||
|
__format: *const wchar_t,
|
||
|
__tp: *const tm,
|
||
|
) -> size_t;
|
||
|
}
|
||
|
#[doc = " The tag name of this struct is _G_fpos_t to preserve historic"]
|
||
|
#[doc = "C++ mangled names for functions taking fpos_t arguments."]
|
||
|
#[doc = "That name should not be used in new code."]
|
||
|
#[repr(C)]
|
||
|
#[derive(Copy, Clone)]
|
||
|
pub struct _G_fpos_t {
|
||
|
pub __pos: __off_t,
|
||
|
pub __state: __mbstate_t,
|
||
|
}
|
||
|
#[test]
|
||
|
fn bindgen_test_layout__G_fpos_t() {
|
||
|
assert_eq!(
|
||
|
::core::mem::size_of::<_G_fpos_t>(),
|
||
|
16usize,
|
||
|
concat!("Size of: ", stringify!(_G_fpos_t))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
::core::mem::align_of::<_G_fpos_t>(),
|
||
|
8usize,
|
||
|
concat!("Alignment of ", stringify!(_G_fpos_t))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<_G_fpos_t>())).__pos as *const _ as usize },
|
||
|
0usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(_G_fpos_t),
|
||
|
"::",
|
||
|
stringify!(__pos)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<_G_fpos_t>())).__state as *const _ as usize },
|
||
|
8usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(_G_fpos_t),
|
||
|
"::",
|
||
|
stringify!(__state)
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
#[doc = " The tag name of this struct is _G_fpos_t to preserve historic"]
|
||
|
#[doc = "C++ mangled names for functions taking fpos_t arguments."]
|
||
|
#[doc = "That name should not be used in new code."]
|
||
|
pub type __fpos_t = _G_fpos_t;
|
||
|
#[doc = " The tag name of this struct is _G_fpos64_t to preserve historic"]
|
||
|
#[doc = "C++ mangled names for functions taking fpos_t and/or fpos64_t"]
|
||
|
#[doc = "arguments. That name should not be used in new code."]
|
||
|
#[repr(C)]
|
||
|
#[derive(Copy, Clone)]
|
||
|
pub struct _G_fpos64_t {
|
||
|
pub __pos: __off64_t,
|
||
|
pub __state: __mbstate_t,
|
||
|
}
|
||
|
#[test]
|
||
|
fn bindgen_test_layout__G_fpos64_t() {
|
||
|
assert_eq!(
|
||
|
::core::mem::size_of::<_G_fpos64_t>(),
|
||
|
16usize,
|
||
|
concat!("Size of: ", stringify!(_G_fpos64_t))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
::core::mem::align_of::<_G_fpos64_t>(),
|
||
|
8usize,
|
||
|
concat!("Alignment of ", stringify!(_G_fpos64_t))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<_G_fpos64_t>())).__pos as *const _ as usize },
|
||
|
0usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(_G_fpos64_t),
|
||
|
"::",
|
||
|
stringify!(__pos)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<_G_fpos64_t>())).__state as *const _ as usize },
|
||
|
8usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(_G_fpos64_t),
|
||
|
"::",
|
||
|
stringify!(__state)
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
#[doc = " The tag name of this struct is _G_fpos64_t to preserve historic"]
|
||
|
#[doc = "C++ mangled names for functions taking fpos_t and/or fpos64_t"]
|
||
|
#[doc = "arguments. That name should not be used in new code."]
|
||
|
pub type __fpos64_t = _G_fpos64_t;
|
||
|
#[doc = " The opaque type of streams. This is the definition used elsewhere."]
|
||
|
pub type FILE = _IO_FILE;
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct _IO_marker {
|
||
|
_unused: [u8; 0],
|
||
|
}
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct _IO_codecvt {
|
||
|
_unused: [u8; 0],
|
||
|
}
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct _IO_wide_data {
|
||
|
_unused: [u8; 0],
|
||
|
}
|
||
|
pub type _IO_lock_t = cty::c_void;
|
||
|
#[doc = " The tag name of this struct is _IO_FILE to preserve historic"]
|
||
|
#[doc = "C++ mangled names for functions taking FILE* arguments."]
|
||
|
#[doc = "That name should not be used in new code."]
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct _IO_FILE {
|
||
|
#[doc = " High-order word is _IO_MAGIC; rest is flags."]
|
||
|
pub _flags: cty::c_int,
|
||
|
#[doc = " Current read pointer"]
|
||
|
pub _IO_read_ptr: *mut cty::c_char,
|
||
|
#[doc = " End of get area."]
|
||
|
pub _IO_read_end: *mut cty::c_char,
|
||
|
#[doc = " Start of putback+get area."]
|
||
|
pub _IO_read_base: *mut cty::c_char,
|
||
|
#[doc = " Start of put area."]
|
||
|
pub _IO_write_base: *mut cty::c_char,
|
||
|
#[doc = " Current put pointer."]
|
||
|
pub _IO_write_ptr: *mut cty::c_char,
|
||
|
#[doc = " End of put area."]
|
||
|
pub _IO_write_end: *mut cty::c_char,
|
||
|
#[doc = " Start of reserve area."]
|
||
|
pub _IO_buf_base: *mut cty::c_char,
|
||
|
#[doc = " End of reserve area."]
|
||
|
pub _IO_buf_end: *mut cty::c_char,
|
||
|
#[doc = " Pointer to start of non-current get area."]
|
||
|
pub _IO_save_base: *mut cty::c_char,
|
||
|
#[doc = " Pointer to first valid character of backup area"]
|
||
|
pub _IO_backup_base: *mut cty::c_char,
|
||
|
#[doc = " Pointer to end of non-current get area."]
|
||
|
pub _IO_save_end: *mut cty::c_char,
|
||
|
pub _markers: *mut _IO_marker,
|
||
|
pub _chain: *mut _IO_FILE,
|
||
|
pub _fileno: cty::c_int,
|
||
|
pub _flags2: cty::c_int,
|
||
|
#[doc = " This used to be _offset but it's too small."]
|
||
|
pub _old_offset: __off_t,
|
||
|
#[doc = " 1+column number of pbase(); 0 is unknown."]
|
||
|
pub _cur_column: cty::c_ushort,
|
||
|
pub _vtable_offset: cty::c_schar,
|
||
|
pub _shortbuf: [cty::c_char; 1usize],
|
||
|
pub _lock: *mut _IO_lock_t,
|
||
|
pub _offset: __off64_t,
|
||
|
#[doc = " Wide character stream stuff."]
|
||
|
pub _codecvt: *mut _IO_codecvt,
|
||
|
pub _wide_data: *mut _IO_wide_data,
|
||
|
pub _freeres_list: *mut _IO_FILE,
|
||
|
pub _freeres_buf: *mut cty::c_void,
|
||
|
pub __pad5: size_t,
|
||
|
pub _mode: cty::c_int,
|
||
|
#[doc = " Make sure we don't get into trouble again."]
|
||
|
pub _unused2: [cty::c_char; 20usize],
|
||
|
}
|
||
|
#[test]
|
||
|
fn bindgen_test_layout__IO_FILE() {
|
||
|
assert_eq!(
|
||
|
::core::mem::size_of::<_IO_FILE>(),
|
||
|
216usize,
|
||
|
concat!("Size of: ", stringify!(_IO_FILE))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
::core::mem::align_of::<_IO_FILE>(),
|
||
|
8usize,
|
||
|
concat!("Alignment of ", stringify!(_IO_FILE))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._flags as *const _ as usize },
|
||
|
0usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(_IO_FILE),
|
||
|
"::",
|
||
|
stringify!(_flags)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._IO_read_ptr as *const _ as usize },
|
||
|
8usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(_IO_FILE),
|
||
|
"::",
|
||
|
stringify!(_IO_read_ptr)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._IO_read_end as *const _ as usize },
|
||
|
16usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(_IO_FILE),
|
||
|
"::",
|
||
|
stringify!(_IO_read_end)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._IO_read_base as *const _ as usize },
|
||
|
24usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(_IO_FILE),
|
||
|
"::",
|
||
|
stringify!(_IO_read_base)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._IO_write_base as *const _ as usize },
|
||
|
32usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(_IO_FILE),
|
||
|
"::",
|
||
|
stringify!(_IO_write_base)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._IO_write_ptr as *const _ as usize },
|
||
|
40usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(_IO_FILE),
|
||
|
"::",
|
||
|
stringify!(_IO_write_ptr)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._IO_write_end as *const _ as usize },
|
||
|
48usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(_IO_FILE),
|
||
|
"::",
|
||
|
stringify!(_IO_write_end)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._IO_buf_base as *const _ as usize },
|
||
|
56usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(_IO_FILE),
|
||
|
"::",
|
||
|
stringify!(_IO_buf_base)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._IO_buf_end as *const _ as usize },
|
||
|
64usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(_IO_FILE),
|
||
|
"::",
|
||
|
stringify!(_IO_buf_end)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._IO_save_base as *const _ as usize },
|
||
|
72usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(_IO_FILE),
|
||
|
"::",
|
||
|
stringify!(_IO_save_base)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._IO_backup_base as *const _ as usize },
|
||
|
80usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(_IO_FILE),
|
||
|
"::",
|
||
|
stringify!(_IO_backup_base)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._IO_save_end as *const _ as usize },
|
||
|
88usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(_IO_FILE),
|
||
|
"::",
|
||
|
stringify!(_IO_save_end)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._markers as *const _ as usize },
|
||
|
96usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(_IO_FILE),
|
||
|
"::",
|
||
|
stringify!(_markers)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._chain as *const _ as usize },
|
||
|
104usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(_IO_FILE),
|
||
|
"::",
|
||
|
stringify!(_chain)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._fileno as *const _ as usize },
|
||
|
112usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(_IO_FILE),
|
||
|
"::",
|
||
|
stringify!(_fileno)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._flags2 as *const _ as usize },
|
||
|
116usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(_IO_FILE),
|
||
|
"::",
|
||
|
stringify!(_flags2)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._old_offset as *const _ as usize },
|
||
|
120usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(_IO_FILE),
|
||
|
"::",
|
||
|
stringify!(_old_offset)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._cur_column as *const _ as usize },
|
||
|
128usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(_IO_FILE),
|
||
|
"::",
|
||
|
stringify!(_cur_column)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._vtable_offset as *const _ as usize },
|
||
|
130usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(_IO_FILE),
|
||
|
"::",
|
||
|
stringify!(_vtable_offset)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._shortbuf as *const _ as usize },
|
||
|
131usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(_IO_FILE),
|
||
|
"::",
|
||
|
stringify!(_shortbuf)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._lock as *const _ as usize },
|
||
|
136usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(_IO_FILE),
|
||
|
"::",
|
||
|
stringify!(_lock)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._offset as *const _ as usize },
|
||
|
144usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(_IO_FILE),
|
||
|
"::",
|
||
|
stringify!(_offset)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._codecvt as *const _ as usize },
|
||
|
152usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(_IO_FILE),
|
||
|
"::",
|
||
|
stringify!(_codecvt)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._wide_data as *const _ as usize },
|
||
|
160usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(_IO_FILE),
|
||
|
"::",
|
||
|
stringify!(_wide_data)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._freeres_list as *const _ as usize },
|
||
|
168usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(_IO_FILE),
|
||
|
"::",
|
||
|
stringify!(_freeres_list)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._freeres_buf as *const _ as usize },
|
||
|
176usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(_IO_FILE),
|
||
|
"::",
|
||
|
stringify!(_freeres_buf)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<_IO_FILE>())).__pad5 as *const _ as usize },
|
||
|
184usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(_IO_FILE),
|
||
|
"::",
|
||
|
stringify!(__pad5)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._mode as *const _ as usize },
|
||
|
192usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(_IO_FILE),
|
||
|
"::",
|
||
|
stringify!(_mode)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<_IO_FILE>()))._unused2 as *const _ as usize },
|
||
|
196usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(_IO_FILE),
|
||
|
"::",
|
||
|
stringify!(_unused2)
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
pub type fpos_t = __fpos_t;
|
||
|
extern "C" {
|
||
|
pub static mut stdin: *mut FILE;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub static mut stdout: *mut FILE;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub static mut stderr: *mut FILE;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Remove file FILENAME."]
|
||
|
pub fn remove(__filename: *const cty::c_char) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Rename file OLD to NEW."]
|
||
|
pub fn rename(__old: *const cty::c_char, __new: *const cty::c_char) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn tmpfile() -> *mut FILE;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Generate a temporary filename."]
|
||
|
pub fn tmpnam(__s: *mut cty::c_char) -> *mut cty::c_char;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Generate a unique temporary filename using up to five characters of PFX"]
|
||
|
#[doc = "if it is not NULL. The directory to put this file in is searched for"]
|
||
|
#[doc = "as follows: First the environment variable \"TMPDIR\" is checked."]
|
||
|
#[doc = "If it contains the name of a writable directory, that directory is used."]
|
||
|
#[doc = "If not and if DIR is not NULL, that value is checked. If that fails,"]
|
||
|
#[doc = "P_tmpdir is tried and finally \"/tmp\". The storage for the filename"]
|
||
|
#[doc = "is allocated by `malloc'."]
|
||
|
pub fn tempnam(__dir: *const cty::c_char, __pfx: *const cty::c_char) -> *mut cty::c_char;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Close STREAM."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn fclose(__stream: *mut FILE) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Flush STREAM, or all streams if STREAM is NULL."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn fflush(__stream: *mut FILE) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Open a file and create a new stream for it."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn fopen(__filename: *const cty::c_char, __modes: *const cty::c_char) -> *mut FILE;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Open a file, replacing an existing stream with it."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn freopen(
|
||
|
__filename: *const cty::c_char,
|
||
|
__modes: *const cty::c_char,
|
||
|
__stream: *mut FILE,
|
||
|
) -> *mut FILE;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Create a new stream that refers to an existing system file descriptor."]
|
||
|
pub fn fdopen(__fd: cty::c_int, __modes: *const cty::c_char) -> *mut FILE;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " If BUF is NULL, make STREAM unbuffered."]
|
||
|
#[doc = "Else make it use buffer BUF, of size BUFSIZ."]
|
||
|
pub fn setbuf(__stream: *mut FILE, __buf: *mut cty::c_char);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Make STREAM use buffering mode MODE."]
|
||
|
#[doc = "If BUF is not NULL, use N bytes of it for buffering;"]
|
||
|
#[doc = "else allocate an internal buffer N bytes long."]
|
||
|
pub fn setvbuf(
|
||
|
__stream: *mut FILE,
|
||
|
__buf: *mut cty::c_char,
|
||
|
__modes: cty::c_int,
|
||
|
__n: size_t,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Write formatted output to STREAM."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn fprintf(__stream: *mut FILE, __format: *const cty::c_char, ...) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Write formatted output to stdout."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn printf(__format: *const cty::c_char, ...) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Write formatted output to S."]
|
||
|
pub fn sprintf(__s: *mut cty::c_char, __format: *const cty::c_char, ...) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Write formatted output to S from argument list ARG."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn vfprintf(
|
||
|
__s: *mut FILE,
|
||
|
__format: *const cty::c_char,
|
||
|
__arg: *mut __va_list_tag,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Write formatted output to stdout from argument list ARG."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn vprintf(__format: *const cty::c_char, __arg: *mut __va_list_tag) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Write formatted output to S from argument list ARG."]
|
||
|
pub fn vsprintf(
|
||
|
__s: *mut cty::c_char,
|
||
|
__format: *const cty::c_char,
|
||
|
__arg: *mut __va_list_tag,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Maximum chars of output to write in MAXLEN."]
|
||
|
pub fn snprintf(
|
||
|
__s: *mut cty::c_char,
|
||
|
__maxlen: cty::c_ulong,
|
||
|
__format: *const cty::c_char,
|
||
|
...
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn vsnprintf(
|
||
|
__s: *mut cty::c_char,
|
||
|
__maxlen: cty::c_ulong,
|
||
|
__format: *const cty::c_char,
|
||
|
__arg: *mut __va_list_tag,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Read formatted input from STREAM."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn fscanf(__stream: *mut FILE, __format: *const cty::c_char, ...) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Read formatted input from stdin."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn scanf(__format: *const cty::c_char, ...) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Read formatted input from S."]
|
||
|
pub fn sscanf(__s: *const cty::c_char, __format: *const cty::c_char, ...) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Read formatted input from STREAM."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
#[link_name = "\u{1}__isoc99_fscanf"]
|
||
|
pub fn fscanf1(__stream: *mut FILE, __format: *const cty::c_char, ...) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Read formatted input from stdin."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
#[link_name = "\u{1}__isoc99_scanf"]
|
||
|
pub fn scanf1(__format: *const cty::c_char, ...) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Read formatted input from S."]
|
||
|
#[link_name = "\u{1}__isoc99_sscanf"]
|
||
|
pub fn sscanf1(__s: *const cty::c_char, __format: *const cty::c_char, ...) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Read formatted input from S into argument list ARG."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn vfscanf(
|
||
|
__s: *mut FILE,
|
||
|
__format: *const cty::c_char,
|
||
|
__arg: *mut __va_list_tag,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Read formatted input from stdin into argument list ARG."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn vscanf(__format: *const cty::c_char, __arg: *mut __va_list_tag) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Read formatted input from S into argument list ARG."]
|
||
|
pub fn vsscanf(
|
||
|
__s: *const cty::c_char,
|
||
|
__format: *const cty::c_char,
|
||
|
__arg: *mut __va_list_tag,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Read formatted input from S into argument list ARG."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
#[link_name = "\u{1}__isoc99_vfscanf"]
|
||
|
pub fn vfscanf1(
|
||
|
__s: *mut FILE,
|
||
|
__format: *const cty::c_char,
|
||
|
__arg: *mut __va_list_tag,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Read formatted input from stdin into argument list ARG."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
#[link_name = "\u{1}__isoc99_vscanf"]
|
||
|
pub fn vscanf1(__format: *const cty::c_char, __arg: *mut __va_list_tag) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Read formatted input from S into argument list ARG."]
|
||
|
#[link_name = "\u{1}__isoc99_vsscanf"]
|
||
|
pub fn vsscanf1(
|
||
|
__s: *const cty::c_char,
|
||
|
__format: *const cty::c_char,
|
||
|
__arg: *mut __va_list_tag,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Read a character from STREAM."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "These functions are possible cancellation points and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn fgetc(__stream: *mut FILE) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn getc(__stream: *mut FILE) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Read a character from stdin."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn getchar() -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Write a character to STREAM."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "These functions are possible cancellation points and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "These functions is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn fputc(__c: cty::c_int, __stream: *mut FILE) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn putc(__c: cty::c_int, __stream: *mut FILE) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Write a character to stdout."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn putchar(__c: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Get a word (int) from STREAM."]
|
||
|
pub fn getw(__stream: *mut FILE) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Write a word (int) to STREAM."]
|
||
|
pub fn putw(__w: cty::c_int, __stream: *mut FILE) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Get a newline-terminated string of finite length from STREAM."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn fgets(__s: *mut cty::c_char, __n: cty::c_int, __stream: *mut FILE) -> *mut cty::c_char;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Write a string to STREAM."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn fputs(__s: *const cty::c_char, __stream: *mut FILE) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Write a string, followed by a newline, to stdout."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn puts(__s: *const cty::c_char) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Push a character back onto the input buffer of STREAM."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn ungetc(__c: cty::c_int, __stream: *mut FILE) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Read chunks of generic data from STREAM."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn fread(
|
||
|
__ptr: *mut cty::c_void,
|
||
|
__size: cty::c_ulong,
|
||
|
__n: cty::c_ulong,
|
||
|
__stream: *mut FILE,
|
||
|
) -> cty::c_ulong;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Write chunks of generic data to STREAM."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn fwrite(
|
||
|
__ptr: *const cty::c_void,
|
||
|
__size: cty::c_ulong,
|
||
|
__n: cty::c_ulong,
|
||
|
__s: *mut FILE,
|
||
|
) -> cty::c_ulong;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Seek to a certain position on STREAM."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn fseek(__stream: *mut FILE, __off: cty::c_long, __whence: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the current position of STREAM."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn ftell(__stream: *mut FILE) -> cty::c_long;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Rewind to the beginning of STREAM."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn rewind(__stream: *mut FILE);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Get STREAM's position."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn fgetpos(__stream: *mut FILE, __pos: *mut fpos_t) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Set STREAM's position."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn fsetpos(__stream: *mut FILE, __pos: *const fpos_t) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Clear the error and EOF indicators for STREAM."]
|
||
|
pub fn clearerr(__stream: *mut FILE);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the EOF indicator for STREAM."]
|
||
|
pub fn feof(__stream: *mut FILE) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the error indicator for STREAM."]
|
||
|
pub fn ferror(__stream: *mut FILE) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Print a message describing the meaning of the value of errno."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn perror(__s: *const cty::c_char);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the system file descriptor for STREAM."]
|
||
|
pub fn fileno(__stream: *mut FILE) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Create a new stream connected to a pipe running the given command."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn popen(__command: *const cty::c_char, __modes: *const cty::c_char) -> *mut FILE;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Close a stream opened by popen and return the status of its child."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a possible cancellation point and therefore not"]
|
||
|
#[doc = "marked with __THROW."]
|
||
|
pub fn pclose(__stream: *mut FILE) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the name of the controlling terminal."]
|
||
|
pub fn ctermid(__s: *mut cty::c_char) -> *mut cty::c_char;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the name of the current user."]
|
||
|
pub fn cuserid(__s: *mut cty::c_char) -> *mut cty::c_char;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub static mut optarg: *mut cty::c_char;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub static mut optind: cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub static mut opterr: cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub static mut optopt: cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Get definitions and prototypes for functions to process the"]
|
||
|
#[doc = "arguments in ARGV (ARGC of them, minus the program name) for"]
|
||
|
#[doc = "options given in OPTS."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "Return the option character from OPTS just read. Return -1 when"]
|
||
|
#[doc = "there are no more options. For unrecognized options, or options"]
|
||
|
#[doc = "missing arguments, 'optopt' is set to the option letter, and '?' is"]
|
||
|
#[doc = "returned."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "The OPTS string is a list of characters which are recognized option"]
|
||
|
#[doc = "letters, optionally followed by colons, specifying that that letter"]
|
||
|
#[doc = "takes an argument, to be placed in 'optarg'."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "If a letter in OPTS is followed by two colons, its argument is"]
|
||
|
#[doc = "optional. This behavior is specific to the GNU 'getopt'."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "The argument '--' causes premature termination of argument"]
|
||
|
#[doc = "scanning, explicitly telling 'getopt' that there are no more"]
|
||
|
#[doc = "options."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "If OPTS begins with '-', then non-option arguments are treated as"]
|
||
|
#[doc = "arguments to the option '\\1'. This behavior is specific to the GNU"]
|
||
|
#[doc = "'getopt'. If OPTS begins with '+', or POSIXLY_CORRECT is set in"]
|
||
|
#[doc = "the environment, then do not permute arguments."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "For standards compliance, the 'argv' argument has the type"]
|
||
|
#[doc = "char *const *, but this is inaccurate; if argument permutation is"]
|
||
|
#[doc = "enabled, the argv array (not the strings it points to) must be"]
|
||
|
#[doc = "writable."]
|
||
|
pub fn getopt(
|
||
|
___argc: cty::c_int,
|
||
|
___argv: *const *mut cty::c_char,
|
||
|
__shortopts: *const cty::c_char,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Slow-path routines used by the optimized inline functions in"]
|
||
|
#[doc = "bits/stdio.h."]
|
||
|
pub fn __uflow(arg1: *mut FILE) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn __overflow(arg1: *mut FILE, arg2: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
#[doc = " Signed."]
|
||
|
pub type int_least8_t = __int_least8_t;
|
||
|
pub type int_least16_t = __int_least16_t;
|
||
|
pub type int_least32_t = __int_least32_t;
|
||
|
pub type int_least64_t = __int_least64_t;
|
||
|
#[doc = " Unsigned."]
|
||
|
pub type uint_least8_t = __uint_least8_t;
|
||
|
pub type uint_least16_t = __uint_least16_t;
|
||
|
pub type uint_least32_t = __uint_least32_t;
|
||
|
pub type uint_least64_t = __uint_least64_t;
|
||
|
#[doc = " Signed."]
|
||
|
pub type int_fast8_t = cty::c_schar;
|
||
|
pub type int_fast16_t = cty::c_long;
|
||
|
pub type int_fast32_t = cty::c_long;
|
||
|
pub type int_fast64_t = cty::c_long;
|
||
|
#[doc = " Unsigned."]
|
||
|
pub type uint_fast8_t = cty::c_uchar;
|
||
|
pub type uint_fast16_t = cty::c_ulong;
|
||
|
pub type uint_fast32_t = cty::c_ulong;
|
||
|
pub type uint_fast64_t = cty::c_ulong;
|
||
|
#[doc = " Largest integral types."]
|
||
|
pub type intmax_t = __intmax_t;
|
||
|
pub type uintmax_t = __uintmax_t;
|
||
|
#[doc = " Returned by `div'."]
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct div_t {
|
||
|
#[doc = " Quotient."]
|
||
|
pub quot: cty::c_int,
|
||
|
#[doc = " Remainder."]
|
||
|
pub rem: cty::c_int,
|
||
|
}
|
||
|
#[test]
|
||
|
fn bindgen_test_layout_div_t() {
|
||
|
assert_eq!(
|
||
|
::core::mem::size_of::<div_t>(),
|
||
|
8usize,
|
||
|
concat!("Size of: ", stringify!(div_t))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
::core::mem::align_of::<div_t>(),
|
||
|
4usize,
|
||
|
concat!("Alignment of ", stringify!(div_t))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<div_t>())).quot as *const _ as usize },
|
||
|
0usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(div_t),
|
||
|
"::",
|
||
|
stringify!(quot)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<div_t>())).rem as *const _ as usize },
|
||
|
4usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(div_t),
|
||
|
"::",
|
||
|
stringify!(rem)
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct ldiv_t {
|
||
|
#[doc = " Quotient."]
|
||
|
pub quot: cty::c_long,
|
||
|
#[doc = " Remainder."]
|
||
|
pub rem: cty::c_long,
|
||
|
}
|
||
|
#[test]
|
||
|
fn bindgen_test_layout_ldiv_t() {
|
||
|
assert_eq!(
|
||
|
::core::mem::size_of::<ldiv_t>(),
|
||
|
16usize,
|
||
|
concat!("Size of: ", stringify!(ldiv_t))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
::core::mem::align_of::<ldiv_t>(),
|
||
|
8usize,
|
||
|
concat!("Alignment of ", stringify!(ldiv_t))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ldiv_t>())).quot as *const _ as usize },
|
||
|
0usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ldiv_t),
|
||
|
"::",
|
||
|
stringify!(quot)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ldiv_t>())).rem as *const _ as usize },
|
||
|
8usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ldiv_t),
|
||
|
"::",
|
||
|
stringify!(rem)
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
#[doc = " Returned by `lldiv'."]
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct lldiv_t {
|
||
|
#[doc = " Quotient."]
|
||
|
pub quot: cty::c_longlong,
|
||
|
#[doc = " Remainder."]
|
||
|
pub rem: cty::c_longlong,
|
||
|
}
|
||
|
#[test]
|
||
|
fn bindgen_test_layout_lldiv_t() {
|
||
|
assert_eq!(
|
||
|
::core::mem::size_of::<lldiv_t>(),
|
||
|
16usize,
|
||
|
concat!("Size of: ", stringify!(lldiv_t))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
::core::mem::align_of::<lldiv_t>(),
|
||
|
8usize,
|
||
|
concat!("Alignment of ", stringify!(lldiv_t))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<lldiv_t>())).quot as *const _ as usize },
|
||
|
0usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(lldiv_t),
|
||
|
"::",
|
||
|
stringify!(quot)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<lldiv_t>())).rem as *const _ as usize },
|
||
|
8usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(lldiv_t),
|
||
|
"::",
|
||
|
stringify!(rem)
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn __ctype_get_mb_cur_max() -> size_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Convert a string to a floating-point number."]
|
||
|
pub fn atof(__nptr: *const cty::c_char) -> f64;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Convert a string to an integer."]
|
||
|
pub fn atoi(__nptr: *const cty::c_char) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Convert a string to a long integer."]
|
||
|
pub fn atol(__nptr: *const cty::c_char) -> cty::c_long;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Convert a string to a long long integer."]
|
||
|
pub fn atoll(__nptr: *const cty::c_char) -> cty::c_longlong;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Convert a string to a floating-point number."]
|
||
|
pub fn strtod(__nptr: *const cty::c_char, __endptr: *mut *mut cty::c_char) -> f64;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Likewise for `float' and `long double' sizes of floating-point numbers."]
|
||
|
pub fn strtof(__nptr: *const cty::c_char, __endptr: *mut *mut cty::c_char) -> f32;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Convert a string to a long integer."]
|
||
|
pub fn strtol(
|
||
|
__nptr: *const cty::c_char,
|
||
|
__endptr: *mut *mut cty::c_char,
|
||
|
__base: cty::c_int,
|
||
|
) -> cty::c_long;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Convert a string to an unsigned long integer."]
|
||
|
pub fn strtoul(
|
||
|
__nptr: *const cty::c_char,
|
||
|
__endptr: *mut *mut cty::c_char,
|
||
|
__base: cty::c_int,
|
||
|
) -> cty::c_ulong;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Convert a string to a quadword integer."]
|
||
|
pub fn strtoll(
|
||
|
__nptr: *const cty::c_char,
|
||
|
__endptr: *mut *mut cty::c_char,
|
||
|
__base: cty::c_int,
|
||
|
) -> cty::c_longlong;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Convert a string to an unsigned quadword integer."]
|
||
|
pub fn strtoull(
|
||
|
__nptr: *const cty::c_char,
|
||
|
__endptr: *mut *mut cty::c_char,
|
||
|
__base: cty::c_int,
|
||
|
) -> cty::c_ulonglong;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return a random integer between 0 and RAND_MAX inclusive."]
|
||
|
pub fn rand() -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Seed the random number generator with the given number."]
|
||
|
pub fn srand(__seed: cty::c_uint);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return non-negative, double-precision floating-point value in [0.0,1.0)."]
|
||
|
pub fn drand48() -> f64;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn erand48(__xsubi: *mut cty::c_ushort) -> f64;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return non-negative, long integer in [0,2^31)."]
|
||
|
pub fn lrand48() -> cty::c_long;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn nrand48(__xsubi: *mut cty::c_ushort) -> cty::c_long;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return signed, long integers in [-2^31,2^31)."]
|
||
|
pub fn mrand48() -> cty::c_long;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn jrand48(__xsubi: *mut cty::c_ushort) -> cty::c_long;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Seed random number generator."]
|
||
|
pub fn srand48(__seedval: cty::c_long);
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn seed48(__seed16v: *mut cty::c_ushort) -> *mut cty::c_ushort;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn lcong48(__param: *mut cty::c_ushort);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Allocate SIZE bytes of memory."]
|
||
|
pub fn malloc(__size: cty::c_ulong) -> *mut cty::c_void;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Allocate NMEMB elements of SIZE bytes each, all initialized to 0."]
|
||
|
pub fn calloc(__nmemb: cty::c_ulong, __size: cty::c_ulong) -> *mut cty::c_void;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Re-allocate the previously allocated block"]
|
||
|
#[doc = "in PTR, making the new block SIZE bytes long. */"]
|
||
|
#[doc = "the same pointer that was passed to it, aliasing needs to be allowed"]
|
||
|
#[doc = "between objects pointed by the old and new pointers."]
|
||
|
pub fn realloc(__ptr: *mut cty::c_void, __size: cty::c_ulong) -> *mut cty::c_void;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Free a block allocated by `malloc', `realloc' or `calloc'."]
|
||
|
pub fn free(__ptr: *mut cty::c_void);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " ISO C variant of aligned allocation."]
|
||
|
pub fn aligned_alloc(__alignment: size_t, __size: size_t) -> *mut cty::c_void;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Abort execution and generate a core-dump."]
|
||
|
pub fn abort();
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Register a function to be called when `exit' is called."]
|
||
|
pub fn atexit(__func: ::core::option::Option<unsafe extern "C" fn()>) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn at_quick_exit(__func: ::core::option::Option<unsafe extern "C" fn()>) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Call all functions registered with `atexit' and `on_exit',"]
|
||
|
#[doc = "in the reverse of the order in which they were registered,"]
|
||
|
#[doc = "perform stdio cleanup, and terminate program execution with STATUS."]
|
||
|
pub fn exit(__status: cty::c_int);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Call all functions registered with `at_quick_exit' in the reverse"]
|
||
|
#[doc = "of the order in which they were registered and terminate program"]
|
||
|
#[doc = "execution with STATUS."]
|
||
|
pub fn quick_exit(__status: cty::c_int);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Terminate the program with STATUS without calling any of the"]
|
||
|
#[doc = "functions registered with `atexit' or `on_exit'."]
|
||
|
pub fn _Exit(__status: cty::c_int);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the value of envariable NAME, or NULL if it doesn't exist."]
|
||
|
pub fn getenv(__name: *const cty::c_char) -> *mut cty::c_char;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " The SVID says this is in <stdio.h>, but this seems a better place.\t*/"]
|
||
|
#[doc = "If there is no `=', remove NAME from the environment."]
|
||
|
pub fn putenv(__string: *mut cty::c_char) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Execute the given line as a shell command."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a cancellation point and therefore not marked with"]
|
||
|
#[doc = "__THROW."]
|
||
|
pub fn system(__command: *const cty::c_char) -> cty::c_int;
|
||
|
}
|
||
|
pub type __compar_fn_t = ::core::option::Option<
|
||
|
unsafe extern "C" fn(arg1: *const cty::c_void, arg2: *const cty::c_void) -> cty::c_int,
|
||
|
>;
|
||
|
extern "C" {
|
||
|
#[doc = " Do a binary search for KEY in BASE, which consists of NMEMB elements"]
|
||
|
#[doc = "of SIZE bytes each, using COMPAR to perform the comparisons."]
|
||
|
pub fn bsearch(
|
||
|
__key: *const cty::c_void,
|
||
|
__base: *const cty::c_void,
|
||
|
__nmemb: size_t,
|
||
|
__size: size_t,
|
||
|
__compar: __compar_fn_t,
|
||
|
) -> *mut cty::c_void;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Sort NMEMB elements of BASE, of SIZE bytes each,"]
|
||
|
#[doc = "using COMPAR to perform the comparisons."]
|
||
|
pub fn qsort(
|
||
|
__base: *mut cty::c_void,
|
||
|
__nmemb: size_t,
|
||
|
__size: size_t,
|
||
|
__compar: __compar_fn_t,
|
||
|
);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the absolute value of X."]
|
||
|
pub fn abs(__x: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn labs(__x: cty::c_long) -> cty::c_long;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn llabs(__x: cty::c_longlong) -> cty::c_longlong;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the `div_t', `ldiv_t' or `lldiv_t' representation"]
|
||
|
#[doc = "of the value of NUMER over DENOM. */"]
|
||
|
pub fn div(__numer: cty::c_int, __denom: cty::c_int) -> div_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ldiv(__numer: cty::c_long, __denom: cty::c_long) -> ldiv_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn lldiv(__numer: cty::c_longlong, __denom: cty::c_longlong) -> lldiv_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the length of the multibyte character"]
|
||
|
#[doc = "in S, which is no longer than N."]
|
||
|
pub fn mblen(__s: *const cty::c_char, __n: size_t) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the length of the given multibyte character,"]
|
||
|
#[doc = "putting its `wchar_t' representation in *PWC."]
|
||
|
pub fn mbtowc(__pwc: *mut wchar_t, __s: *const cty::c_char, __n: size_t) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Put the multibyte character represented"]
|
||
|
#[doc = "by WCHAR in S, returning its length."]
|
||
|
pub fn wctomb(__s: *mut cty::c_char, __wchar: wchar_t) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Convert a multibyte string to a wide char string."]
|
||
|
pub fn mbstowcs(__pwcs: *mut wchar_t, __s: *const cty::c_char, __n: size_t) -> size_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Convert a wide char string to multibyte string."]
|
||
|
pub fn wcstombs(__s: *mut cty::c_char, __pwcs: *const wchar_t, __n: size_t) -> size_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Copy N bytes of SRC to DEST."]
|
||
|
pub fn memcpy(
|
||
|
__dest: *mut cty::c_void,
|
||
|
__src: *const cty::c_void,
|
||
|
__n: cty::c_ulong,
|
||
|
) -> *mut cty::c_void;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Copy N bytes of SRC to DEST, guaranteeing"]
|
||
|
#[doc = "correct behavior for overlapping strings."]
|
||
|
pub fn memmove(
|
||
|
__dest: *mut cty::c_void,
|
||
|
__src: *const cty::c_void,
|
||
|
__n: cty::c_ulong,
|
||
|
) -> *mut cty::c_void;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn memccpy(
|
||
|
__dest: *mut cty::c_void,
|
||
|
__src: *const cty::c_void,
|
||
|
__c: cty::c_int,
|
||
|
__n: cty::c_ulong,
|
||
|
) -> *mut cty::c_void;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Set N bytes of S to C."]
|
||
|
pub fn memset(__s: *mut cty::c_void, __c: cty::c_int, __n: cty::c_ulong) -> *mut cty::c_void;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Compare N bytes of S1 and S2."]
|
||
|
pub fn memcmp(
|
||
|
__s1: *const cty::c_void,
|
||
|
__s2: *const cty::c_void,
|
||
|
__n: cty::c_ulong,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn memchr(__s: *const cty::c_void, __c: cty::c_int, __n: cty::c_ulong) -> *mut cty::c_void;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Copy SRC to DEST."]
|
||
|
pub fn strcpy(__dest: *mut cty::c_char, __src: *const cty::c_char) -> *mut cty::c_char;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Copy no more than N characters of SRC to DEST."]
|
||
|
pub fn strncpy(
|
||
|
__dest: *mut cty::c_char,
|
||
|
__src: *const cty::c_char,
|
||
|
__n: cty::c_ulong,
|
||
|
) -> *mut cty::c_char;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Append SRC onto DEST."]
|
||
|
pub fn strcat(__dest: *mut cty::c_char, __src: *const cty::c_char) -> *mut cty::c_char;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Append no more than N characters from SRC onto DEST."]
|
||
|
pub fn strncat(
|
||
|
__dest: *mut cty::c_char,
|
||
|
__src: *const cty::c_char,
|
||
|
__n: cty::c_ulong,
|
||
|
) -> *mut cty::c_char;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Compare S1 and S2."]
|
||
|
pub fn strcmp(__s1: *const cty::c_char, __s2: *const cty::c_char) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Compare N characters of S1 and S2."]
|
||
|
pub fn strncmp(
|
||
|
__s1: *const cty::c_char,
|
||
|
__s2: *const cty::c_char,
|
||
|
__n: cty::c_ulong,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Compare the collated forms of S1 and S2."]
|
||
|
pub fn strcoll(__s1: *const cty::c_char, __s2: *const cty::c_char) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Put a transformation of SRC into no more than N bytes of DEST."]
|
||
|
pub fn strxfrm(
|
||
|
__dest: *mut cty::c_char,
|
||
|
__src: *const cty::c_char,
|
||
|
__n: cty::c_ulong,
|
||
|
) -> cty::c_ulong;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn strchr(__s: *const cty::c_char, __c: cty::c_int) -> *mut cty::c_char;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn strrchr(__s: *const cty::c_char, __c: cty::c_int) -> *mut cty::c_char;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the length of the initial segment of S which"]
|
||
|
#[doc = "consists entirely of characters not in REJECT."]
|
||
|
pub fn strcspn(__s: *const cty::c_char, __reject: *const cty::c_char) -> cty::c_ulong;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the length of the initial segment of S which"]
|
||
|
#[doc = "consists entirely of characters in ACCEPT."]
|
||
|
pub fn strspn(__s: *const cty::c_char, __accept: *const cty::c_char) -> cty::c_ulong;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn strpbrk(__s: *const cty::c_char, __accept: *const cty::c_char) -> *mut cty::c_char;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn strstr(__haystack: *const cty::c_char, __needle: *const cty::c_char)
|
||
|
-> *mut cty::c_char;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Divide S into tokens separated by characters in DELIM."]
|
||
|
pub fn strtok(__s: *mut cty::c_char, __delim: *const cty::c_char) -> *mut cty::c_char;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Divide S into tokens separated by characters in DELIM. Information"]
|
||
|
#[doc = "passed between calls are stored in SAVE_PTR."]
|
||
|
pub fn __strtok_r(
|
||
|
__s: *mut cty::c_char,
|
||
|
__delim: *const cty::c_char,
|
||
|
__save_ptr: *mut *mut cty::c_char,
|
||
|
) -> *mut cty::c_char;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn strtok_r(
|
||
|
__s: *mut cty::c_char,
|
||
|
__delim: *const cty::c_char,
|
||
|
__save_ptr: *mut *mut cty::c_char,
|
||
|
) -> *mut cty::c_char;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the length of S."]
|
||
|
pub fn strlen(__s: *const cty::c_char) -> cty::c_ulong;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return a string describing the meaning of the `errno' code in ERRNUM."]
|
||
|
pub fn strerror(__errnum: cty::c_int) -> *mut cty::c_char;
|
||
|
}
|
||
|
#[doc = " An integral type that can be modified atomically, without the"]
|
||
|
#[doc = "possibility of a signal arriving in the middle of the operation."]
|
||
|
pub type sig_atomic_t = __sig_atomic_t;
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct __sigset_t {
|
||
|
pub __val: [cty::c_ulong; 16usize],
|
||
|
}
|
||
|
#[test]
|
||
|
fn bindgen_test_layout___sigset_t() {
|
||
|
assert_eq!(
|
||
|
::core::mem::size_of::<__sigset_t>(),
|
||
|
128usize,
|
||
|
concat!("Size of: ", stringify!(__sigset_t))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
::core::mem::align_of::<__sigset_t>(),
|
||
|
8usize,
|
||
|
concat!("Alignment of ", stringify!(__sigset_t))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<__sigset_t>())).__val as *const _ as usize },
|
||
|
0usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(__sigset_t),
|
||
|
"::",
|
||
|
stringify!(__val)
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
#[doc = " A set of signals to be blocked, unblocked, or waited for."]
|
||
|
pub type sigset_t = __sigset_t;
|
||
|
pub type pid_t = __pid_t;
|
||
|
pub type uid_t = __uid_t;
|
||
|
#[doc = " Type of a signal handler."]
|
||
|
pub type __sighandler_t = ::core::option::Option<unsafe extern "C" fn(arg1: cty::c_int)>;
|
||
|
extern "C" {
|
||
|
#[doc = " The X/Open definition of `signal' specifies the SVID semantic. Use"]
|
||
|
#[doc = "the additional function `sysv_signal' when X/Open compatibility is"]
|
||
|
#[doc = "requested."]
|
||
|
pub fn __sysv_signal(__sig: cty::c_int, __handler: __sighandler_t) -> __sighandler_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn kill(__pid: __pid_t, __sig: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Raise signal SIG, i.e., send SIG to yourself."]
|
||
|
pub fn raise(__sig: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Clear all signals from SET."]
|
||
|
pub fn sigemptyset(__set: *mut sigset_t) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Set all signals in SET."]
|
||
|
pub fn sigfillset(__set: *mut sigset_t) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Add SIGNO to SET."]
|
||
|
pub fn sigaddset(__set: *mut sigset_t, __signo: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Remove SIGNO from SET."]
|
||
|
pub fn sigdelset(__set: *mut sigset_t, __signo: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return 1 if SIGNO is in SET, 0 if not."]
|
||
|
pub fn sigismember(__set: *const sigset_t, __signo: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
#[doc = " Structure describing the action to be taken when a signal arrives."]
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct sigaction {
|
||
|
pub sa_handler: __sighandler_t,
|
||
|
#[doc = " Additional set of signals to be blocked."]
|
||
|
pub sa_mask: __sigset_t,
|
||
|
#[doc = " Special flags."]
|
||
|
pub sa_flags: cty::c_int,
|
||
|
#[doc = " Restore handler."]
|
||
|
pub sa_restorer: ::core::option::Option<unsafe extern "C" fn()>,
|
||
|
}
|
||
|
#[test]
|
||
|
fn bindgen_test_layout_sigaction() {
|
||
|
assert_eq!(
|
||
|
::core::mem::size_of::<sigaction>(),
|
||
|
152usize,
|
||
|
concat!("Size of: ", stringify!(sigaction))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
::core::mem::align_of::<sigaction>(),
|
||
|
8usize,
|
||
|
concat!("Alignment of ", stringify!(sigaction))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<sigaction>())).sa_handler as *const _ as usize },
|
||
|
0usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(sigaction),
|
||
|
"::",
|
||
|
stringify!(sa_handler)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<sigaction>())).sa_mask as *const _ as usize },
|
||
|
8usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(sigaction),
|
||
|
"::",
|
||
|
stringify!(sa_mask)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<sigaction>())).sa_flags as *const _ as usize },
|
||
|
136usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(sigaction),
|
||
|
"::",
|
||
|
stringify!(sa_flags)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<sigaction>())).sa_restorer as *const _ as usize },
|
||
|
144usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(sigaction),
|
||
|
"::",
|
||
|
stringify!(sa_restorer)
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Get and/or change the set of blocked signals."]
|
||
|
pub fn sigprocmask(
|
||
|
__how: cty::c_int,
|
||
|
__set: *const sigset_t,
|
||
|
__oset: *mut sigset_t,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Change the set of blocked signals to SET,"]
|
||
|
#[doc = "wait until a signal arrives, and restore the set of blocked signals."]
|
||
|
#[doc = ""]
|
||
|
#[doc = "This function is a cancellation point and therefore not marked with"]
|
||
|
#[doc = "__THROW."]
|
||
|
pub fn sigsuspend(__set: *const sigset_t) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Get and/or set the action for signal SIG."]
|
||
|
pub fn sigaction(
|
||
|
__sig: cty::c_int,
|
||
|
__act: *const sigaction,
|
||
|
__oact: *mut sigaction,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Put in SET all signals that are blocked and waiting to be delivered."]
|
||
|
pub fn sigpending(__set: *mut sigset_t) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return number of available real-time signal with highest priority."]
|
||
|
pub fn __libc_current_sigrtmin() -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return number of available real-time signal with lowest priority."]
|
||
|
pub fn __libc_current_sigrtmax() -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " The error code set by various library functions."]
|
||
|
pub fn __errno_location() -> *mut cty::c_int;
|
||
|
}
|
||
|
pub const nc_err_e_NCERR_SUCCESS: nc_err_e = 0;
|
||
|
pub const nc_err_e_NCERR_NOMEM: nc_err_e = 12;
|
||
|
#[doc = " matches AVERROR_EOF"]
|
||
|
pub const nc_err_e_NCERR_EOF: nc_err_e = 541478725;
|
||
|
pub const nc_err_e_NCERR_DECODE: nc_err_e = 541478726;
|
||
|
pub const nc_err_e_NCERR_SYSTEM: nc_err_e = 541478727;
|
||
|
pub const nc_err_e_NCERR_INVALID_ARG: nc_err_e = 541478728;
|
||
|
pub const nc_err_e_NCERR_UNIMPLEMENTED: nc_err_e = 541478729;
|
||
|
#[doc = " Error values for more granular problem indication. We map to POSIX error"]
|
||
|
#[doc = " codes when possible. We need at least the union of POSIX (errno) and FFMpeg"]
|
||
|
#[doc = " (AVERROR) codes that we might see."]
|
||
|
pub type nc_err_e = u32;
|
||
|
extern "C" {
|
||
|
#[doc = " Get a human-readable string describing the running notcurses version."]
|
||
|
pub fn notcurses_version() -> *const cty::c_char;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Cannot be inline, as we want to get the versions of the actual notcurses"]
|
||
|
#[doc = " library we loaded, not what we compile against."]
|
||
|
pub fn notcurses_version_components(
|
||
|
major: *mut cty::c_int,
|
||
|
minor: *mut cty::c_int,
|
||
|
patch: *mut cty::c_int,
|
||
|
tweak: *mut cty::c_int,
|
||
|
);
|
||
|
}
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct notcurses {
|
||
|
_unused: [u8; 0],
|
||
|
}
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct ncplane {
|
||
|
_unused: [u8; 0],
|
||
|
}
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct ncvisual {
|
||
|
_unused: [u8; 0],
|
||
|
}
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct ncuplot {
|
||
|
_unused: [u8; 0],
|
||
|
}
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct ncdplot {
|
||
|
_unused: [u8; 0],
|
||
|
}
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct ncfdplane {
|
||
|
_unused: [u8; 0],
|
||
|
}
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct ncsubproc {
|
||
|
_unused: [u8; 0],
|
||
|
}
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct ncselector {
|
||
|
_unused: [u8; 0],
|
||
|
}
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct ncmultiselector {
|
||
|
_unused: [u8; 0],
|
||
|
}
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct ncreader {
|
||
|
_unused: [u8; 0],
|
||
|
}
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct ncfadectx {
|
||
|
_unused: [u8; 0],
|
||
|
}
|
||
|
#[doc = " let the ncvisual pick"]
|
||
|
pub const ncblitter_e_NCBLIT_DEFAULT: ncblitter_e = 0;
|
||
|
#[doc = " full block █"]
|
||
|
pub const ncblitter_e_NCBLIT_1x1: ncblitter_e = 1;
|
||
|
#[doc = " upper half + 1x1 ▀█"]
|
||
|
pub const ncblitter_e_NCBLIT_2x1: ncblitter_e = 2;
|
||
|
#[doc = " shaded full blocks ▓▒░█"]
|
||
|
pub const ncblitter_e_NCBLIT_1x1x4: ncblitter_e = 3;
|
||
|
#[doc = " quadrants + 2x1 ▗▐ ▖▀▟▌▙█"]
|
||
|
pub const ncblitter_e_NCBLIT_2x2: ncblitter_e = 4;
|
||
|
#[doc = " four vertical levels █▆▄▂"]
|
||
|
pub const ncblitter_e_NCBLIT_4x1: ncblitter_e = 5;
|
||
|
#[doc = " 4 rows, 2 cols (braille) ⡀⡄⡆⡇⢀⣀⣄⣆⣇⢠⣠⣤⣦⣧⢰⣰⣴⣶⣷⢸⣸⣼⣾⣿"]
|
||
|
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"]
|
||
|
pub const ncblitter_e_NCBLIT_SIXEL: ncblitter_e = 8;
|
||
|
#[doc = " each has the empty cell in addition to the product of its dimensions. i.e."]
|
||
|
#[doc = " NCBLIT_1x1 has two states: empty and full block. NCBLIT_1x1x4 has five"]
|
||
|
#[doc = " states: empty, the three shaded blocks, and the full block."]
|
||
|
pub type ncblitter_e = u32;
|
||
|
pub const ncalign_e_NCALIGN_LEFT: ncalign_e = 0;
|
||
|
pub const ncalign_e_NCALIGN_CENTER: ncalign_e = 1;
|
||
|
pub const ncalign_e_NCALIGN_RIGHT: ncalign_e = 2;
|
||
|
#[doc = " Alignment within a plane or terminal. Left/right-justified, or centered."]
|
||
|
pub type ncalign_e = u32;
|
||
|
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;
|
||
|
#[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 = " A cell 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"]
|
||
|
#[doc = " color, a background color, and an attribute set. Valid grapheme cluster"]
|
||
|
#[doc = " contents include:"]
|
||
|
#[doc = ""]
|
||
|
#[doc = " * A NUL terminator,"]
|
||
|
#[doc = " * A single control character, followed by a NUL terminator,"]
|
||
|
#[doc = " * At most one spacing character, followed by zero or more nonspacing"]
|
||
|
#[doc = " characters, followed by a NUL terminator."]
|
||
|
#[doc = ""]
|
||
|
#[doc = " Multi-column characters can only have a single style/color throughout."]
|
||
|
#[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 = ""]
|
||
|
#[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 = ""]
|
||
|
#[doc = " Each cell 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."]
|
||
|
#[doc = ""]
|
||
|
#[doc = " We implement some small alpha compositing. Foreground and background both"]
|
||
|
#[doc = " have two bits of inverted alpha. The actual grapheme written to a cell is"]
|
||
|
#[doc = " the topmost non-zero grapheme. If its alpha is 00, its foreground color is"]
|
||
|
#[doc = " used unchanged. If its alpha is 10, its foreground color is derived entirely"]
|
||
|
#[doc = " from cells underneath it. Otherwise, the result will be a composite."]
|
||
|
#[doc = " Likewise for the background. If the bottom of a coordinate's zbuffer is"]
|
||
|
#[doc = " reached with a cumulative alpha of zero, the default is used. In this way,"]
|
||
|
#[doc = " a terminal configured with transparent background can be supported through"]
|
||
|
#[doc = " multiple occluding ncplanes. A foreground alpha of 11 requests high-contrast"]
|
||
|
#[doc = " text (relative to the computed background). A background alpha of 11 is"]
|
||
|
#[doc = " currently forbidden."]
|
||
|
#[doc = ""]
|
||
|
#[doc = " Default color takes precedence over palette or RGB, and cannot be used with"]
|
||
|
#[doc = " transparency. Indexed palette takes precedence over RGB. It cannot"]
|
||
|
#[doc = " meaningfully set transparency, but it can be mixed into a cascading color."]
|
||
|
#[doc = " RGB is used if neither default terminal colors nor palette indexing are in"]
|
||
|
#[doc = " play, and fully supports all transparency options."]
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct cell {
|
||
|
#[doc = " 4B → 4B"]
|
||
|
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 = " 2B → 8B (16 bits of NCSTYLE_* attributes)"]
|
||
|
pub stylemask: u16,
|
||
|
#[doc = " + 8B == 16B"]
|
||
|
pub channels: u64,
|
||
|
}
|
||
|
#[test]
|
||
|
fn bindgen_test_layout_cell() {
|
||
|
assert_eq!(
|
||
|
::core::mem::size_of::<cell>(),
|
||
|
16usize,
|
||
|
concat!("Size of: ", stringify!(cell))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
::core::mem::align_of::<cell>(),
|
||
|
8usize,
|
||
|
concat!("Alignment of ", stringify!(cell))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<cell>())).gcluster as *const _ as usize },
|
||
|
0usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(cell),
|
||
|
"::",
|
||
|
stringify!(gcluster)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<cell>())).gcluster_backstop as *const _ as usize },
|
||
|
4usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(cell),
|
||
|
"::",
|
||
|
stringify!(gcluster_backstop)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<cell>())).reserved as *const _ as usize },
|
||
|
5usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(cell),
|
||
|
"::",
|
||
|
stringify!(reserved)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<cell>())).stylemask as *const _ as usize },
|
||
|
6usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(cell),
|
||
|
"::",
|
||
|
stringify!(stylemask)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<cell>())).channels as *const _ as usize },
|
||
|
8usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(cell),
|
||
|
"::",
|
||
|
stringify!(channels)
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
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;
|
||
|
}
|
||
|
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;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Release resources held by the cell 'c'."]
|
||
|
pub fn cell_release(n: *mut ncplane, c: *mut cell);
|
||
|
}
|
||
|
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!"]
|
||
|
#[doc = " works on both simple and non-simple cells."]
|
||
|
pub fn cell_extended_gcluster(n: *const ncplane, c: *const cell) -> *const cty::c_char;
|
||
|
}
|
||
|
#[doc = " default. print nothing once fullscreen service begins"]
|
||
|
pub const ncloglevel_e_NCLOGLEVEL_SILENT: ncloglevel_e = 0;
|
||
|
#[doc = " print diagnostics immediately related to crashing"]
|
||
|
pub const ncloglevel_e_NCLOGLEVEL_PANIC: ncloglevel_e = 1;
|
||
|
#[doc = " we're hanging around, but we've had a horrible fault"]
|
||
|
pub const ncloglevel_e_NCLOGLEVEL_FATAL: ncloglevel_e = 2;
|
||
|
#[doc = " we can't keep doin' this, but we can do other things"]
|
||
|
pub const ncloglevel_e_NCLOGLEVEL_ERROR: ncloglevel_e = 3;
|
||
|
#[doc = " you probably don't want what's happening to happen"]
|
||
|
pub const ncloglevel_e_NCLOGLEVEL_WARNING: ncloglevel_e = 4;
|
||
|
#[doc = " \"standard information\""]
|
||
|
pub const ncloglevel_e_NCLOGLEVEL_INFO: ncloglevel_e = 5;
|
||
|
#[doc = " \"detailed information\""]
|
||
|
pub const ncloglevel_e_NCLOGLEVEL_VERBOSE: ncloglevel_e = 6;
|
||
|
#[doc = " this is honestly a bit much"]
|
||
|
pub const ncloglevel_e_NCLOGLEVEL_DEBUG: ncloglevel_e = 7;
|
||
|
#[doc = " there's probably a better way to do what you want"]
|
||
|
pub const ncloglevel_e_NCLOGLEVEL_TRACE: ncloglevel_e = 8;
|
||
|
#[doc = " These log levels consciously map cleanly to those of libav; notcurses itself"]
|
||
|
#[doc = " does not use this full granularity. The log level does not affect the opening"]
|
||
|
#[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;
|
||
|
#[doc = " Configuration for notcurses_init()."]
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct notcurses_options {
|
||
|
#[doc = " The name of the terminfo database entry describing this terminal. If NULL,"]
|
||
|
#[doc = " the environment variable TERM is used. Failure to open the terminal"]
|
||
|
#[doc = " definition will result in failure to initialize notcurses."]
|
||
|
pub termtype: *const cty::c_char,
|
||
|
#[doc = " If non-NULL, notcurses_render() will write each rendered frame to this"]
|
||
|
#[doc = " FILE* in addition to outfp. This is used primarily for debugging."]
|
||
|
pub renderfp: *mut FILE,
|
||
|
#[doc = " Progressively higher log levels result in more logging to stderr. By"]
|
||
|
#[doc = " default, nothing is printed to stderr once fullscreen service begins."]
|
||
|
pub loglevel: ncloglevel_e,
|
||
|
#[doc = " Desirable margins. If all are 0 (default), we will render to the entirety"]
|
||
|
#[doc = " of the screen. If the screen is too small, we do what we can--this is"]
|
||
|
#[doc = " strictly best-effort. Absolute coordinates are relative to the rendering"]
|
||
|
#[doc = " area ((0, 0) is always the origin of the rendering area)."]
|
||
|
pub margin_t: cty::c_int,
|
||
|
#[doc = " Desirable margins. If all are 0 (default), we will render to the entirety"]
|
||
|
#[doc = " of the screen. If the screen is too small, we do what we can--this is"]
|
||
|
#[doc = " strictly best-effort. Absolute coordinates are relative to the rendering"]
|
||
|
#[doc = " area ((0, 0) is always the origin of the rendering area)."]
|
||
|
pub margin_r: cty::c_int,
|
||
|
#[doc = " Desirable margins. If all are 0 (default), we will render to the entirety"]
|
||
|
#[doc = " of the screen. If the screen is too small, we do what we can--this is"]
|
||
|
#[doc = " strictly best-effort. Absolute coordinates are relative to the rendering"]
|
||
|
#[doc = " area ((0, 0) is always the origin of the rendering area)."]
|
||
|
pub margin_b: cty::c_int,
|
||
|
#[doc = " Desirable margins. If all are 0 (default), we will render to the entirety"]
|
||
|
#[doc = " of the screen. If the screen is too small, we do what we can--this is"]
|
||
|
#[doc = " strictly best-effort. Absolute coordinates are relative to the rendering"]
|
||
|
#[doc = " area ((0, 0) is always the origin of the rendering area)."]
|
||
|
pub margin_l: cty::c_int,
|
||
|
#[doc = " General flags; see NCOPTION_*. This is expressed as a bitfield so that"]
|
||
|
#[doc = " future options can be added without reshaping the struct. Undefined bits"]
|
||
|
#[doc = " must be set to 0."]
|
||
|
pub flags: u64,
|
||
|
}
|
||
|
#[test]
|
||
|
fn bindgen_test_layout_notcurses_options() {
|
||
|
assert_eq!(
|
||
|
::core::mem::size_of::<notcurses_options>(),
|
||
|
48usize,
|
||
|
concat!("Size of: ", stringify!(notcurses_options))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
::core::mem::align_of::<notcurses_options>(),
|
||
|
8usize,
|
||
|
concat!("Alignment of ", stringify!(notcurses_options))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<notcurses_options>())).termtype as *const _ as usize },
|
||
|
0usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(notcurses_options),
|
||
|
"::",
|
||
|
stringify!(termtype)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<notcurses_options>())).renderfp as *const _ as usize },
|
||
|
8usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(notcurses_options),
|
||
|
"::",
|
||
|
stringify!(renderfp)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<notcurses_options>())).loglevel as *const _ as usize },
|
||
|
16usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(notcurses_options),
|
||
|
"::",
|
||
|
stringify!(loglevel)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<notcurses_options>())).margin_t as *const _ as usize },
|
||
|
20usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(notcurses_options),
|
||
|
"::",
|
||
|
stringify!(margin_t)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<notcurses_options>())).margin_r as *const _ as usize },
|
||
|
24usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(notcurses_options),
|
||
|
"::",
|
||
|
stringify!(margin_r)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<notcurses_options>())).margin_b as *const _ as usize },
|
||
|
28usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(notcurses_options),
|
||
|
"::",
|
||
|
stringify!(margin_b)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<notcurses_options>())).margin_l as *const _ as usize },
|
||
|
32usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(notcurses_options),
|
||
|
"::",
|
||
|
stringify!(margin_l)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<notcurses_options>())).flags as *const _ as usize },
|
||
|
40usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(notcurses_options),
|
||
|
"::",
|
||
|
stringify!(flags)
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Lex a margin argument according to the standard notcurses definition. There"]
|
||
|
#[doc = " can be either a single number, which will define all margins equally, or"]
|
||
|
#[doc = " there can be four numbers separated by commas."]
|
||
|
pub fn notcurses_lex_margins(
|
||
|
op: *const cty::c_char,
|
||
|
opts: *mut notcurses_options,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Lex a blitter."]
|
||
|
pub fn notcurses_lex_blitter(op: *const cty::c_char, blitter: *mut ncblitter_e) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Get the name of a blitter."]
|
||
|
pub fn notcurses_str_blitter(blitter: ncblitter_e) -> *const cty::c_char;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Lex a visual scaling mode (one of \"none\", \"stretch\", or \"scale\")."]
|
||
|
pub fn notcurses_lex_scalemode(op: *const cty::c_char, scalemode: *mut ncscale_e)
|
||
|
-> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Get the name of a scaling mode."]
|
||
|
pub fn notcurses_str_scalemode(scalemode: ncscale_e) -> *const cty::c_char;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Initialize a notcurses context on the connected terminal at 'fp'. 'fp' must"]
|
||
|
#[doc = " be a tty. You'll usually want stdout. NULL can be supplied for 'fp', in"]
|
||
|
#[doc = " which case /dev/tty will be opened. Returns NULL on error, including any"]
|
||
|
#[doc = " failure initializing terminfo."]
|
||
|
pub fn notcurses_init(opts: *const notcurses_options, fp: *mut FILE) -> *mut notcurses;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Destroy a notcurses context."]
|
||
|
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()."]
|
||
|
pub fn notcurses_render(nc: *mut notcurses) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Write the last rendered frame, in its entirety, to 'fp'. If"]
|
||
|
#[doc = " notcurses_render() has not yet been called, nothing will be written."]
|
||
|
pub fn notcurses_render_to_file(nc: *mut notcurses, fp: *mut FILE) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the topmost ncplane, of which there is always at least one."]
|
||
|
pub fn notcurses_top(n: *mut notcurses) -> *mut ncplane;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Destroy all ncplanes other than the stdplane."]
|
||
|
pub fn notcurses_drop_planes(nc: *mut notcurses);
|
||
|
}
|
||
|
#[doc = " An input event. Cell coordinates are currently defined only for mouse events."]
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct ncinput {
|
||
|
#[doc = " identifier. Unicode codepoint or synthesized NCKEY event"]
|
||
|
pub id: char32_t,
|
||
|
#[doc = " y cell coordinate of event, -1 for undefined"]
|
||
|
pub y: cty::c_int,
|
||
|
#[doc = " x cell coordinate of event, -1 for undefined"]
|
||
|
pub x: cty::c_int,
|
||
|
#[doc = " was alt held?"]
|
||
|
pub alt: bool,
|
||
|
#[doc = " was shift held?"]
|
||
|
pub shift: bool,
|
||
|
#[doc = " was ctrl held?"]
|
||
|
pub ctrl: bool,
|
||
|
#[doc = " input event number"]
|
||
|
pub seqnum: u64,
|
||
|
}
|
||
|
#[test]
|
||
|
fn bindgen_test_layout_ncinput() {
|
||
|
assert_eq!(
|
||
|
::core::mem::size_of::<ncinput>(),
|
||
|
24usize,
|
||
|
concat!("Size of: ", stringify!(ncinput))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
::core::mem::align_of::<ncinput>(),
|
||
|
8usize,
|
||
|
concat!("Alignment of ", stringify!(ncinput))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncinput>())).id as *const _ as usize },
|
||
|
0usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncinput),
|
||
|
"::",
|
||
|
stringify!(id)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncinput>())).y as *const _ as usize },
|
||
|
4usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncinput),
|
||
|
"::",
|
||
|
stringify!(y)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncinput>())).x as *const _ as usize },
|
||
|
8usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncinput),
|
||
|
"::",
|
||
|
stringify!(x)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncinput>())).alt as *const _ as usize },
|
||
|
12usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncinput),
|
||
|
"::",
|
||
|
stringify!(alt)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncinput>())).shift as *const _ as usize },
|
||
|
13usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncinput),
|
||
|
"::",
|
||
|
stringify!(shift)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncinput>())).ctrl as *const _ as usize },
|
||
|
14usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncinput),
|
||
|
"::",
|
||
|
stringify!(ctrl)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncinput>())).seqnum as *const _ as usize },
|
||
|
16usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncinput),
|
||
|
"::",
|
||
|
stringify!(seqnum)
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " See ppoll(2) for more detail. Provide a NULL 'ts' to block at length, a 'ts'"]
|
||
|
#[doc = " of 0 for non-blocking operation, and otherwise a timespec to bound blocking."]
|
||
|
#[doc = " Signals in sigmask (less several we handle internally) will be atomically"]
|
||
|
#[doc = " masked and unmasked per ppoll(2). It should generally contain all signals."]
|
||
|
#[doc = " Returns a single Unicode code point, or (char32_t)-1 on error. 'sigmask' may"]
|
||
|
#[doc = " be NULL. Returns 0 on a timeout. If an event is processed, the return value"]
|
||
|
#[doc = " is the 'id' field from that event. 'ni' may be NULL."]
|
||
|
pub fn notcurses_getc(
|
||
|
n: *mut notcurses,
|
||
|
ts: *const timespec,
|
||
|
sigmask: *mut sigset_t,
|
||
|
ni: *mut ncinput,
|
||
|
) -> char32_t;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Get a file descriptor suitable for input event poll()ing. When this"]
|
||
|
#[doc = " descriptor becomes available, you can call notcurses_getc_nblock(),"]
|
||
|
#[doc = " and input ought be ready. This file descriptor is *not* necessarily"]
|
||
|
#[doc = " the file descriptor associated with stdin (but it might be!)."]
|
||
|
pub fn notcurses_inputready_fd(n: *mut notcurses) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Enable the mouse in \"button-event tracking\" mode with focus detection and"]
|
||
|
#[doc = " UTF8-style extended coordinates. On failure, -1 is returned. On success, 0"]
|
||
|
#[doc = " is returned, and mouse events will be published to notcurses_getc()."]
|
||
|
pub fn notcurses_mouse_enable(n: *mut notcurses) -> cty::c_int;
|
||
|
}
|
||
|
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 = " 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"]
|
||
|
#[doc = " primarily useful if the screen is externally corrupted, or if an"]
|
||
|
#[doc = " NCKEY_RESIZE event has been read and you're not yet ready to render."]
|
||
|
pub fn notcurses_refresh(
|
||
|
n: *mut notcurses,
|
||
|
y: *mut cty::c_int,
|
||
|
x: *mut cty::c_int,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Extract the notcurses context to which this plane is attached."]
|
||
|
pub fn ncplane_notcurses(n: *mut ncplane) -> *mut notcurses;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncplane_notcurses_const(n: *const ncplane) -> *const notcurses;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the dimensions of this ncplane."]
|
||
|
pub fn ncplane_dim_yx(n: *const ncplane, y: *mut cty::c_int, x: *mut cty::c_int);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Get a reference to the standard plane (one matching our current idea of the"]
|
||
|
#[doc = " terminal size) for this terminal. The standard plane always exists, and its"]
|
||
|
#[doc = " origin is always at the uppermost, leftmost cell of the terminal."]
|
||
|
pub fn notcurses_stdplane(nc: *mut notcurses) -> *mut ncplane;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn notcurses_stdplane_const(nc: *const notcurses) -> *const ncplane;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Retrieve the contents of the specified cell as last rendered. Returns the EGC"]
|
||
|
#[doc = " or NULL on error. This EGC must be free()d by the caller. The stylemask and"]
|
||
|
#[doc = " channels are written to 'stylemask' and 'channels', respectively."]
|
||
|
pub fn notcurses_at_yx(
|
||
|
nc: *mut notcurses,
|
||
|
yoff: cty::c_int,
|
||
|
xoff: cty::c_int,
|
||
|
stylemask: *mut u16,
|
||
|
channels: *mut u64,
|
||
|
) -> *mut cty::c_char;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Create a new ncplane at the specified offset (relative to the standard plane)"]
|
||
|
#[doc = " and the specified size. The number of rows and columns must both be positive."]
|
||
|
#[doc = " This plane is initially at the top of the z-buffer, as if ncplane_move_top()"]
|
||
|
#[doc = " had been called on it. The void* 'opaque' can be retrieved (and reset) later."]
|
||
|
pub fn ncplane_new(
|
||
|
nc: *mut notcurses,
|
||
|
rows: cty::c_int,
|
||
|
cols: cty::c_int,
|
||
|
yoff: cty::c_int,
|
||
|
xoff: cty::c_int,
|
||
|
opaque: *mut cty::c_void,
|
||
|
) -> *mut ncplane;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Create a named plane ala ncplane_new(). Names are only used for debugging."]
|
||
|
pub fn ncplane_new_named(
|
||
|
nc: *mut notcurses,
|
||
|
rows: cty::c_int,
|
||
|
cols: cty::c_int,
|
||
|
yoff: cty::c_int,
|
||
|
xoff: cty::c_int,
|
||
|
opaque: *mut cty::c_void,
|
||
|
name: *const cty::c_char,
|
||
|
) -> *mut ncplane;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Create a plane bound to plane 'n'. Being bound to 'n' means that 'yoff' and"]
|
||
|
#[doc = " 'xoff' are interpreted relative to that plane's origin, and that if that"]
|
||
|
#[doc = " plane is moved later, this new plane is moved by the same amount."]
|
||
|
pub fn ncplane_bound(
|
||
|
n: *mut ncplane,
|
||
|
rows: cty::c_int,
|
||
|
cols: cty::c_int,
|
||
|
yoff: cty::c_int,
|
||
|
xoff: cty::c_int,
|
||
|
opaque: *mut cty::c_void,
|
||
|
) -> *mut ncplane;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Create a named plane ala ncplane_bound(). Names are used only for debugging."]
|
||
|
pub fn ncplane_bound_named(
|
||
|
n: *mut ncplane,
|
||
|
rows: cty::c_int,
|
||
|
cols: cty::c_int,
|
||
|
yoff: cty::c_int,
|
||
|
xoff: cty::c_int,
|
||
|
opaque: *mut cty::c_void,
|
||
|
name: *const cty::c_char,
|
||
|
) -> *mut ncplane;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Create a plane bound to 'n', and aligned relative to it using 'align'."]
|
||
|
pub fn ncplane_aligned(
|
||
|
n: *mut ncplane,
|
||
|
rows: cty::c_int,
|
||
|
cols: cty::c_int,
|
||
|
yoff: cty::c_int,
|
||
|
align: ncalign_e,
|
||
|
opaque: *mut cty::c_void,
|
||
|
) -> *mut ncplane;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Create a named plane ala ncplane_aligned(). Names are used only for debugging."]
|
||
|
pub fn ncplane_aligned_named(
|
||
|
n: *mut ncplane,
|
||
|
rows: cty::c_int,
|
||
|
cols: cty::c_int,
|
||
|
yoff: cty::c_int,
|
||
|
align: ncalign_e,
|
||
|
opaque: *mut cty::c_void,
|
||
|
name: *const cty::c_char,
|
||
|
) -> *mut ncplane;
|
||
|
}
|
||
|
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."]
|
||
|
pub fn ncplane_reparent(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."]
|
||
|
pub fn ncplane_dup(n: *const ncplane, opaque: *mut cty::c_void) -> *mut ncplane;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " provided a coordinate relative to the origin of 'src', map it to the same"]
|
||
|
#[doc = " absolute coordinate relative to thte origin of 'dst'. either or both of 'y'"]
|
||
|
#[doc = " and 'x' may be NULL. if 'dst' is NULL, it is taken to be the standard plane."]
|
||
|
pub fn ncplane_translate(
|
||
|
src: *const ncplane,
|
||
|
dst: *const ncplane,
|
||
|
y: *mut cty::c_int,
|
||
|
x: *mut cty::c_int,
|
||
|
);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Fed absolute 'y'/'x' coordinates, determine whether that coordinate is"]
|
||
|
#[doc = " within the ncplane 'n'. If not, return false. If so, return true. Either"]
|
||
|
#[doc = " way, translate the absolute coordinates relative to 'n'. If the point is not"]
|
||
|
#[doc = " within 'n', these coordinates will not be within the dimensions of the plane."]
|
||
|
pub fn ncplane_translate_abs(n: *const ncplane, y: *mut cty::c_int, x: *mut cty::c_int)
|
||
|
-> bool;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " All planes are created with scrolling disabled. Scrolling can be dynamically"]
|
||
|
#[doc = " controlled with ncplane_set_scrolling(). Returns true if scrolling was"]
|
||
|
#[doc = " previously enabled, or false if it was disabled."]
|
||
|
pub fn ncplane_set_scrolling(n: *mut ncplane, scrollp: bool) -> bool;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Returns a 16-bit bitmask of supported curses-style attributes"]
|
||
|
#[doc = " (NCSTYLE_UNDERLINE, NCSTYLE_BOLD, etc.) The attribute is only"]
|
||
|
#[doc = " indicated as supported if the terminal can support it together with color."]
|
||
|
#[doc = " For more information, see the \"ncv\" capability in terminfo(5)."]
|
||
|
pub fn notcurses_supported_styles(nc: *const notcurses) -> cty::c_uint;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Returns the number of simultaneous colors claimed to be supported, or 1 if"]
|
||
|
#[doc = " there is no color support. Note that several terminal emulators advertise"]
|
||
|
#[doc = " more colors than they actually support, downsampling internally."]
|
||
|
pub fn notcurses_palette_size(nc: *const notcurses) -> cty::c_uint;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Can we directly specify RGB values per cell, or only use palettes?"]
|
||
|
pub fn notcurses_cantruecolor(nc: *const notcurses) -> bool;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Can we fade? Fading requires either the \"rgb\" or \"ccc\" terminfo capability."]
|
||
|
pub fn notcurses_canfade(nc: *const notcurses) -> bool;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Can we set the \"hardware\" palette? Requires the \"ccc\" terminfo capability."]
|
||
|
pub fn notcurses_canchangecolor(nc: *const notcurses) -> bool;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Can we load images? This requires being built against FFmpeg/OIIO."]
|
||
|
pub fn notcurses_canopen_images(nc: *const notcurses) -> bool;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Can we load videos? This requires being built against FFmpeg."]
|
||
|
pub fn notcurses_canopen_videos(nc: *const notcurses) -> bool;
|
||
|
}
|
||
|
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 blit to Sixel?"]
|
||
|
pub fn notcurses_cansixel(nc: *const notcurses) -> bool;
|
||
|
}
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct ncstats {
|
||
|
#[doc = " number of successful notcurses_render() runs"]
|
||
|
pub renders: u64,
|
||
|
#[doc = " number of aborted renders, should be 0"]
|
||
|
pub failed_renders: u64,
|
||
|
#[doc = " bytes emitted to ttyfp"]
|
||
|
pub render_bytes: u64,
|
||
|
#[doc = " max bytes emitted for a frame"]
|
||
|
pub render_max_bytes: i64,
|
||
|
#[doc = " min bytes emitted for a frame"]
|
||
|
pub render_min_bytes: i64,
|
||
|
#[doc = " nanoseconds spent in notcurses_render()"]
|
||
|
pub render_ns: u64,
|
||
|
#[doc = " max ns spent in notcurses_render()"]
|
||
|
pub render_max_ns: i64,
|
||
|
#[doc = " min ns spent in successful notcurses_render()"]
|
||
|
pub render_min_ns: i64,
|
||
|
#[doc = " cells we elided entirely thanks to damage maps"]
|
||
|
pub cellelisions: u64,
|
||
|
#[doc = " cells we emitted due to inferred damage"]
|
||
|
pub cellemissions: u64,
|
||
|
#[doc = " RGB fg elision count"]
|
||
|
pub fgelisions: u64,
|
||
|
#[doc = " RGB fg emissions"]
|
||
|
pub fgemissions: u64,
|
||
|
#[doc = " RGB bg elision count"]
|
||
|
pub bgelisions: u64,
|
||
|
#[doc = " RGB bg emissions"]
|
||
|
pub bgemissions: u64,
|
||
|
#[doc = " default color was emitted"]
|
||
|
pub defaultelisions: u64,
|
||
|
#[doc = " default color was elided"]
|
||
|
pub defaultemissions: u64,
|
||
|
#[doc = " total bytes devoted to all active framebuffers"]
|
||
|
pub fbbytes: u64,
|
||
|
#[doc = " number of planes currently in existence"]
|
||
|
pub planes: cty::c_uint,
|
||
|
}
|
||
|
#[test]
|
||
|
fn bindgen_test_layout_ncstats() {
|
||
|
assert_eq!(
|
||
|
::core::mem::size_of::<ncstats>(),
|
||
|
144usize,
|
||
|
concat!("Size of: ", stringify!(ncstats))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
::core::mem::align_of::<ncstats>(),
|
||
|
8usize,
|
||
|
concat!("Alignment of ", stringify!(ncstats))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncstats>())).renders as *const _ as usize },
|
||
|
0usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncstats),
|
||
|
"::",
|
||
|
stringify!(renders)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncstats>())).failed_renders as *const _ as usize },
|
||
|
8usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncstats),
|
||
|
"::",
|
||
|
stringify!(failed_renders)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncstats>())).render_bytes as *const _ as usize },
|
||
|
16usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncstats),
|
||
|
"::",
|
||
|
stringify!(render_bytes)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncstats>())).render_max_bytes as *const _ as usize },
|
||
|
24usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncstats),
|
||
|
"::",
|
||
|
stringify!(render_max_bytes)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncstats>())).render_min_bytes as *const _ as usize },
|
||
|
32usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncstats),
|
||
|
"::",
|
||
|
stringify!(render_min_bytes)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncstats>())).render_ns as *const _ as usize },
|
||
|
40usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncstats),
|
||
|
"::",
|
||
|
stringify!(render_ns)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncstats>())).render_max_ns as *const _ as usize },
|
||
|
48usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncstats),
|
||
|
"::",
|
||
|
stringify!(render_max_ns)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncstats>())).render_min_ns as *const _ as usize },
|
||
|
56usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncstats),
|
||
|
"::",
|
||
|
stringify!(render_min_ns)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncstats>())).cellelisions as *const _ as usize },
|
||
|
64usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncstats),
|
||
|
"::",
|
||
|
stringify!(cellelisions)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncstats>())).cellemissions as *const _ as usize },
|
||
|
72usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncstats),
|
||
|
"::",
|
||
|
stringify!(cellemissions)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncstats>())).fgelisions as *const _ as usize },
|
||
|
80usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncstats),
|
||
|
"::",
|
||
|
stringify!(fgelisions)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncstats>())).fgemissions as *const _ as usize },
|
||
|
88usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncstats),
|
||
|
"::",
|
||
|
stringify!(fgemissions)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncstats>())).bgelisions as *const _ as usize },
|
||
|
96usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncstats),
|
||
|
"::",
|
||
|
stringify!(bgelisions)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncstats>())).bgemissions as *const _ as usize },
|
||
|
104usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncstats),
|
||
|
"::",
|
||
|
stringify!(bgemissions)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncstats>())).defaultelisions as *const _ as usize },
|
||
|
112usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncstats),
|
||
|
"::",
|
||
|
stringify!(defaultelisions)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncstats>())).defaultemissions as *const _ as usize },
|
||
|
120usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncstats),
|
||
|
"::",
|
||
|
stringify!(defaultemissions)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncstats>())).fbbytes as *const _ as usize },
|
||
|
128usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncstats),
|
||
|
"::",
|
||
|
stringify!(fbbytes)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncstats>())).planes as *const _ as usize },
|
||
|
136usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncstats),
|
||
|
"::",
|
||
|
stringify!(planes)
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Acquire an atomic snapshot of the notcurses object's stats."]
|
||
|
pub fn notcurses_stats(nc: *const notcurses, stats: *mut ncstats);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Reset all cumulative stats (immediate ones, such as fbbytes, are not reset)."]
|
||
|
pub fn notcurses_reset_stats(nc: *mut notcurses, stats: *mut ncstats);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Resize the specified ncplane. The four parameters 'keepy', 'keepx',"]
|
||
|
#[doc = " 'keepleny', and 'keeplenx' define a subset of the ncplane to keep,"]
|
||
|
#[doc = " unchanged. This may be a section of size 0, though none of these four"]
|
||
|
#[doc = " parameters may be negative. 'keepx' and 'keepy' are relative to the ncplane."]
|
||
|
#[doc = " They must specify a coordinate within the ncplane's totality. 'yoff' and"]
|
||
|
#[doc = " 'xoff' are relative to 'keepy' and 'keepx', and place the upper-left corner"]
|
||
|
#[doc = " of the resized ncplane. Finally, 'ylen' and 'xlen' are the dimensions of the"]
|
||
|
#[doc = " ncplane after resizing. 'ylen' must be greater than or equal to 'keepleny',"]
|
||
|
#[doc = " and 'xlen' must be greater than or equal to 'keeplenx'. It is an error to"]
|
||
|
#[doc = " attempt to resize the standard plane. If either of 'keepleny' or 'keeplenx'"]
|
||
|
#[doc = " is non-zero, both must be non-zero."]
|
||
|
#[doc = ""]
|
||
|
#[doc = " Essentially, the kept material does not move. It serves to anchor the"]
|
||
|
#[doc = " resized plane. If there is no kept material, the plane can move freely."]
|
||
|
pub fn ncplane_resize(
|
||
|
n: *mut ncplane,
|
||
|
keepy: cty::c_int,
|
||
|
keepx: cty::c_int,
|
||
|
keepleny: cty::c_int,
|
||
|
keeplenx: cty::c_int,
|
||
|
yoff: cty::c_int,
|
||
|
xoff: cty::c_int,
|
||
|
ylen: cty::c_int,
|
||
|
xlen: cty::c_int,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Destroy the specified ncplane. None of its contents will be visible after"]
|
||
|
#[doc = " the next call to notcurses_render(). It is an error to attempt to destroy"]
|
||
|
#[doc = " the standard plane."]
|
||
|
pub fn ncplane_destroy(ncp: *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 = " does not reset the base cell; this function must be called with a zero 'c'."]
|
||
|
pub fn ncplane_set_base_cell(ncp: *mut ncplane, c: *const cell) -> 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 = " does not reset the base cell; this function must be called with an empty"]
|
||
|
#[doc = " 'egc'. 'egc' must be a single extended grapheme cluster."]
|
||
|
pub fn ncplane_set_base(
|
||
|
ncp: *mut ncplane,
|
||
|
egc: *const cty::c_char,
|
||
|
stylemask: u32,
|
||
|
channels: u64,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Extract the ncplane's base cell into 'c'. The reference is invalidated if"]
|
||
|
#[doc = " 'ncp' is destroyed."]
|
||
|
pub fn ncplane_base(ncp: *mut ncplane, c: *mut cell) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Move this plane relative to the standard plane, or the plane to which it is"]
|
||
|
#[doc = " bound (if it is bound to a plane). It is an error to attempt to move the"]
|
||
|
#[doc = " standard plane."]
|
||
|
pub fn ncplane_move_yx(n: *mut ncplane, y: cty::c_int, x: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Get the origin of this plane relative to the standard plane, or the plane to"]
|
||
|
#[doc = " which it is bound (if it is bound to a plane)."]
|
||
|
pub fn ncplane_yx(n: *const ncplane, y: *mut cty::c_int, x: *mut cty::c_int);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Get the plane to which the plane 'n' is bound, if any."]
|
||
|
pub fn ncplane_parent(n: *mut ncplane) -> *mut ncplane;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncplane_parent_const(n: *const ncplane) -> *const ncplane;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Splice ncplane 'n' out of the z-buffer, and reinsert it at the top or bottom."]
|
||
|
pub fn ncplane_move_top(n: *mut ncplane);
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncplane_move_bottom(n: *mut ncplane);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Splice ncplane 'n' out of the z-buffer, and reinsert it above 'above'."]
|
||
|
#[doc = " Returns non-zero if 'n' is already in the desired location. 'n' and"]
|
||
|
#[doc = " 'above' must not be the same plane."]
|
||
|
pub fn ncplane_move_above(n: *mut ncplane, above: *mut ncplane) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Splice ncplane 'n' out of the z-buffer, and reinsert it below 'below'."]
|
||
|
#[doc = " Returns non-zero if 'n' is already in the desired location. 'n' and"]
|
||
|
#[doc = " 'below' must not be the same plane."]
|
||
|
pub fn ncplane_move_below(n: *mut ncplane, below: *mut ncplane) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the plane below this one, or NULL if this is at the bottom."]
|
||
|
pub fn ncplane_below(n: *mut ncplane) -> *mut ncplane;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Rotate the plane π/2 radians clockwise or counterclockwise. This cannot"]
|
||
|
#[doc = " be performed on arbitrary planes, because glyphs cannot be arbitrarily"]
|
||
|
#[doc = " rotated. The glyphs which can be rotated are limited: line-drawing"]
|
||
|
#[doc = " characters, spaces, half blocks, and full blocks. The plane must have"]
|
||
|
#[doc = " an even number of columns. Use the ncvisual rotation for a more"]
|
||
|
#[doc = " flexible approach."]
|
||
|
pub fn ncplane_rotate_cw(n: *mut ncplane) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncplane_rotate_ccw(n: *mut ncplane) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Retrieve the current contents of the cell under the cursor. The EGC is"]
|
||
|
#[doc = " returned, or NULL on error. This EGC must be free()d by the caller. The"]
|
||
|
#[doc = " stylemask and channels are written to 'stylemask' and 'channels', respectively."]
|
||
|
pub fn ncplane_at_cursor(
|
||
|
n: *mut ncplane,
|
||
|
stylemask: *mut u16,
|
||
|
channels: *mut u64,
|
||
|
) -> *mut cty::c_char;
|
||
|
}
|
||
|
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"]
|
||
|
#[doc = " channels are written to 'stylemask' and 'channels', respectively."]
|
||
|
pub fn ncplane_at_yx(
|
||
|
n: *const ncplane,
|
||
|
y: cty::c_int,
|
||
|
x: cty::c_int,
|
||
|
stylemask: *mut u16,
|
||
|
channels: *mut u64,
|
||
|
) -> *mut cty::c_char;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Create a flat string from the EGCs of the selected region of the ncplane"]
|
||
|
#[doc = " 'nc'. Start at the plane's 'begy'x'begx' coordinate (which must lie on the"]
|
||
|
#[doc = " plane), continuing for 'leny'x'lenx' cells. Either or both of 'leny' and"]
|
||
|
#[doc = " 'lenx' can be specified as -1 to go through the boundary of the plane."]
|
||
|
pub fn ncplane_contents(
|
||
|
nc: *const ncplane,
|
||
|
begy: cty::c_int,
|
||
|
begx: cty::c_int,
|
||
|
leny: cty::c_int,
|
||
|
lenx: cty::c_int,
|
||
|
) -> *mut cty::c_char;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Manipulate the opaque user pointer associated with this plane."]
|
||
|
#[doc = " ncplane_set_userptr() returns the previous userptr after replacing"]
|
||
|
#[doc = " it with 'opaque'. the others simply return the userptr."]
|
||
|
pub fn ncplane_set_userptr(n: *mut ncplane, opaque: *mut cty::c_void) -> *mut cty::c_void;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncplane_userptr(n: *mut ncplane) -> *mut cty::c_void;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncplane_center_abs(n: *const ncplane, y: *mut cty::c_int, x: *mut cty::c_int);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Move the cursor to the specified position (the cursor needn't be visible)."]
|
||
|
#[doc = " Returns -1 on error, including negative parameters, or ones exceeding the"]
|
||
|
#[doc = " plane's dimensions."]
|
||
|
pub fn ncplane_cursor_move_yx(n: *mut ncplane, y: cty::c_int, x: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Move the cursor to 0, 0. Can't fail."]
|
||
|
pub fn ncplane_home(n: *mut ncplane);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Get the current position of the cursor within n. y and/or x may be NULL."]
|
||
|
pub fn ncplane_cursor_yx(n: *const ncplane, y: *mut cty::c_int, x: *mut cty::c_int);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Get the current channels or attribute word for ncplane 'n'."]
|
||
|
pub fn ncplane_channels(n: *const ncplane) -> u64;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the current styling for this ncplane."]
|
||
|
pub fn ncplane_attr(n: *const ncplane) -> u16;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncplane_styles(n: *const ncplane) -> cty::c_uint;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Replace the cell at the specified coordinates with the provided cell 'c',"]
|
||
|
#[doc = " and advance the cursor by the width of the cell (but not past the end of the"]
|
||
|
#[doc = " plane). On success, returns the number of columns the cursor was advanced."]
|
||
|
#[doc = " On failure, -1 is returned."]
|
||
|
pub fn ncplane_putc_yx(
|
||
|
n: *mut ncplane,
|
||
|
y: cty::c_int,
|
||
|
x: cty::c_int,
|
||
|
c: *const cell,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Replace the EGC underneath us, but retain the styling. The current styling"]
|
||
|
#[doc = " of the plane will not be changed."]
|
||
|
pub fn ncplane_putsimple_stainable(n: *mut ncplane, c: cty::c_char) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Replace the cell at the specified coordinates with the provided EGC, and"]
|
||
|
#[doc = " advance the cursor by the width of the cluster (but not past the end of the"]
|
||
|
#[doc = " plane). On success, returns the number of columns the cursor was advanced."]
|
||
|
#[doc = " On failure, -1 is returned. The number of bytes converted from gclust is"]
|
||
|
#[doc = " written to 'sbytes' if non-NULL."]
|
||
|
pub fn ncplane_putegc_yx(
|
||
|
n: *mut ncplane,
|
||
|
y: cty::c_int,
|
||
|
x: cty::c_int,
|
||
|
gclust: *const cty::c_char,
|
||
|
sbytes: *mut cty::c_int,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Replace the EGC underneath us, but retain the styling. The current styling"]
|
||
|
#[doc = " of the plane will not be changed."]
|
||
|
pub fn ncplane_putegc_stainable(
|
||
|
n: *mut ncplane,
|
||
|
gclust: *const cty::c_char,
|
||
|
sbytes: *mut cty::c_int,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Replace the EGC underneath us, but retain the styling. The current styling"]
|
||
|
#[doc = " of the plane will not be changed."]
|
||
|
pub fn ncplane_putwegc_stainable(
|
||
|
n: *mut ncplane,
|
||
|
gclust: *const wchar_t,
|
||
|
sbytes: *mut cty::c_int,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Write a series of EGCs to the current location, using the current style."]
|
||
|
#[doc = " They will be interpreted as a series of columns (according to the definition"]
|
||
|
#[doc = " of ncplane_putc()). Advances the cursor by some positive number of columns"]
|
||
|
#[doc = " (though not beyond the end of the plane); this number is returned on success."]
|
||
|
#[doc = " On error, a non-positive number is returned, indicating the number of columns"]
|
||
|
#[doc = " which were written before the error."]
|
||
|
pub fn ncplane_putstr_yx(
|
||
|
n: *mut ncplane,
|
||
|
y: cty::c_int,
|
||
|
x: cty::c_int,
|
||
|
gclusters: *const cty::c_char,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncplane_putstr_aligned(
|
||
|
n: *mut ncplane,
|
||
|
y: cty::c_int,
|
||
|
align: ncalign_e,
|
||
|
s: *const cty::c_char,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Replace a string's worth of glyphs at the current cursor location, but"]
|
||
|
#[doc = " retain the styling. The current styling of the plane will not be changed."]
|
||
|
pub fn ncplane_putstr_stainable(n: *mut ncplane, s: *const cty::c_char) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Write a series of EGCs to the current location, using the current style."]
|
||
|
#[doc = " They will be interpreted as a series of columns (according to the definition"]
|
||
|
#[doc = " of ncplane_putc()). Advances the cursor by some positive number of columns"]
|
||
|
#[doc = " (though not beyond the end of the plane); this number is returned on success."]
|
||
|
#[doc = " On error, a non-positive number is returned, indicating the number of columns"]
|
||
|
#[doc = " which were written before the error. No more than 's' bytes will be written."]
|
||
|
pub fn ncplane_putnstr_yx(
|
||
|
n: *mut ncplane,
|
||
|
y: cty::c_int,
|
||
|
x: cty::c_int,
|
||
|
s: size_t,
|
||
|
gclusters: *const cty::c_char,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncplane_putnstr_aligned(
|
||
|
n: *mut ncplane,
|
||
|
y: cty::c_int,
|
||
|
align: ncalign_e,
|
||
|
s: size_t,
|
||
|
gclustarr: *const cty::c_char,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " The ncplane equivalents of printf(3) and vprintf(3)."]
|
||
|
pub fn ncplane_vprintf_aligned(
|
||
|
n: *mut ncplane,
|
||
|
y: cty::c_int,
|
||
|
align: ncalign_e,
|
||
|
format: *const cty::c_char,
|
||
|
ap: *mut __va_list_tag,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncplane_vprintf_yx(
|
||
|
n: *mut ncplane,
|
||
|
y: cty::c_int,
|
||
|
x: cty::c_int,
|
||
|
format: *const cty::c_char,
|
||
|
ap: *mut __va_list_tag,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncplane_vprintf_stainable(
|
||
|
n: *mut ncplane,
|
||
|
format: *const cty::c_char,
|
||
|
ap: *mut __va_list_tag,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Write the specified text to the plane, breaking lines sensibly, beginning at"]
|
||
|
#[doc = " the specified line. Returns the number of columns written. When breaking a"]
|
||
|
#[doc = " line, the line will be cleared to the end of the plane (the last line will"]
|
||
|
#[doc = " *not* be so cleared). The number of bytes written from the input is written"]
|
||
|
#[doc = " to '*bytes' if it is not NULL. Cleared columns are included in the return"]
|
||
|
#[doc = " value, but *not* included in the number of bytes written. Leaves the cursor"]
|
||
|
#[doc = " at the end of output. A partial write will be accomplished as far as it can;"]
|
||
|
#[doc = " determine whether the write completed by inspecting '*bytes'. Can output to"]
|
||
|
#[doc = " multiple rows even in the absence of scrolling, but not more rows than are"]
|
||
|
#[doc = " available. With scrolling enabled, arbitrary amounts of data can be emitted."]
|
||
|
#[doc = " All provided whitespace is preserved -- ncplane_puttext() followed by an"]
|
||
|
#[doc = " appropriate ncplane_contents() will read back the original output."]
|
||
|
#[doc = ""]
|
||
|
#[doc = " If 'y' is -1, the first row of output is taken relative to the current"]
|
||
|
#[doc = " cursor: it will be left-, right-, or center-aligned in whatever remains"]
|
||
|
#[doc = " of the row. On subsequent rows -- or if 'y' is not -1 -- the entire row can"]
|
||
|
#[doc = " be used, and alignment works normally."]
|
||
|
#[doc = ""]
|
||
|
#[doc = " A newline at any point will move the cursor to the next row."]
|
||
|
pub fn ncplane_puttext(
|
||
|
n: *mut ncplane,
|
||
|
y: cty::c_int,
|
||
|
align: ncalign_e,
|
||
|
text: *const cty::c_char,
|
||
|
bytes: *mut size_t,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Draw horizontal or vertical lines using the specified cell, starting at the"]
|
||
|
#[doc = " current cursor position. The cursor will end at the cell following the last"]
|
||
|
#[doc = " cell output (even, perhaps counter-intuitively, when drawing vertical"]
|
||
|
#[doc = " lines), just as if ncplane_putc() was called at that spot. Return the"]
|
||
|
#[doc = " number of cells drawn on success. On error, return the negative number of"]
|
||
|
#[doc = " cells drawn."]
|
||
|
pub fn ncplane_hline_interp(
|
||
|
n: *mut ncplane,
|
||
|
c: *const cell,
|
||
|
len: cty::c_int,
|
||
|
c1: u64,
|
||
|
c2: u64,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncplane_vline_interp(
|
||
|
n: *mut ncplane,
|
||
|
c: *const cell,
|
||
|
len: cty::c_int,
|
||
|
c1: u64,
|
||
|
c2: u64,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Draw a box with its upper-left corner at the current cursor position, and its"]
|
||
|
#[doc = " lower-right corner at 'ystop'x'xstop'. The 6 cells provided are used to draw the"]
|
||
|
#[doc = " upper-left, ur, ll, and lr corners, then the horizontal and vertical lines."]
|
||
|
#[doc = " 'ctlword' is defined in the least significant byte, where bits [7, 4] are a"]
|
||
|
#[doc = " gradient mask, and [3, 0] are a border mask:"]
|
||
|
#[doc = " * 7, 3: top"]
|
||
|
#[doc = " * 6, 2: right"]
|
||
|
#[doc = " * 5, 1: bottom"]
|
||
|
#[doc = " * 4, 0: left"]
|
||
|
#[doc = " If the gradient bit is not set, the styling from the hl/vl cells is used for"]
|
||
|
#[doc = " the horizontal and vertical lines, respectively. If the gradient bit is set,"]
|
||
|
#[doc = " the color is linearly interpolated between the two relevant corner cells."]
|
||
|
#[doc = ""]
|
||
|
#[doc = " By default, vertexes are drawn whether their connecting edges are drawn or"]
|
||
|
#[doc = " not. The value of the bits corresponding to NCBOXCORNER_MASK control this,"]
|
||
|
#[doc = " and are interpreted as the number of connecting edges necessary to draw a"]
|
||
|
#[doc = " given corner. At 0 (the default), corners are always drawn. At 3, corners"]
|
||
|
#[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,
|
||
|
ystop: cty::c_int,
|
||
|
xstop: cty::c_int,
|
||
|
ctlword: cty::c_uint,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Starting at the specified coordinate, if its glyph is different from that of"]
|
||
|
#[doc = " 'c', 'c' is copied into it, and the original glyph is considered the fill"]
|
||
|
#[doc = " target. We do the same to all cardinally-connected cells having this same"]
|
||
|
#[doc = " fill target. Returns the number of cells polyfilled. An invalid initial y, x"]
|
||
|
#[doc = " is an error. Returns the number of cells filled, or -1 on error."]
|
||
|
pub fn ncplane_polyfill_yx(
|
||
|
n: *mut ncplane,
|
||
|
y: cty::c_int,
|
||
|
x: cty::c_int,
|
||
|
c: *const cell,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Draw a gradient with its upper-left corner at the current cursor position,"]
|
||
|
#[doc = " stopping at 'ystop'x'xstop'. The glyph composed of 'egc' and 'stylemask' is"]
|
||
|
#[doc = " used for all cells. The channels specified by 'ul', 'ur', 'll', and 'lr'"]
|
||
|
#[doc = " are composed into foreground and background gradients. To do a vertical"]
|
||
|
#[doc = " gradient, 'ul' ought equal 'ur' and 'll' ought equal 'lr'. To do a"]
|
||
|
#[doc = " horizontal gradient, 'ul' ought equal 'll' and 'ur' ought equal 'ul'. To"]
|
||
|
#[doc = " color everything the same, all four channels should be equivalent. The"]
|
||
|
#[doc = " resulting alpha values are equal to incoming alpha values. Returns the"]
|
||
|
#[doc = " number of cells filled on success, or -1 on failure."]
|
||
|
#[doc = ""]
|
||
|
#[doc = " Palette-indexed color is not supported."]
|
||
|
#[doc = ""]
|
||
|
#[doc = " Preconditions for gradient operations (error otherwise):"]
|
||
|
#[doc = ""]
|
||
|
#[doc = " all: only RGB colors, unless all four channels match as default"]
|
||
|
#[doc = " all: all alpha values must be the same"]
|
||
|
#[doc = " 1x1: all four colors must be the same"]
|
||
|
#[doc = " 1xN: both top and both bottom colors must be the same (vertical gradient)"]
|
||
|
#[doc = " Nx1: both left and both right colors must be the same (horizontal gradient)"]
|
||
|
pub fn ncplane_gradient(
|
||
|
n: *mut ncplane,
|
||
|
egc: *const cty::c_char,
|
||
|
stylemask: u32,
|
||
|
ul: u64,
|
||
|
ur: u64,
|
||
|
ll: u64,
|
||
|
lr: u64,
|
||
|
ystop: cty::c_int,
|
||
|
xstop: cty::c_int,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Do a high-resolution gradient using upper blocks and synced backgrounds."]
|
||
|
#[doc = " This doubles the number of vertical gradations, but restricts you to"]
|
||
|
#[doc = " half blocks (appearing to be full blocks). Returns the number of cells"]
|
||
|
#[doc = " filled on success, or -1 on error."]
|
||
|
pub fn ncplane_highgradient(
|
||
|
n: *mut ncplane,
|
||
|
ul: u32,
|
||
|
ur: u32,
|
||
|
ll: u32,
|
||
|
lr: u32,
|
||
|
ystop: cty::c_int,
|
||
|
xstop: cty::c_int,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " ncplane_gradent_sized() meets ncplane_highgradient()."]
|
||
|
pub fn ncplane_highgradient_sized(
|
||
|
n: *mut ncplane,
|
||
|
ul: u32,
|
||
|
ur: u32,
|
||
|
ll: u32,
|
||
|
lr: u32,
|
||
|
ylen: cty::c_int,
|
||
|
xlen: cty::c_int,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Set the given style throughout the specified region, keeping content and"]
|
||
|
#[doc = " channels unchanged. Returns the number of cells set, or -1 on failure."]
|
||
|
pub fn ncplane_format(
|
||
|
n: *mut ncplane,
|
||
|
ystop: cty::c_int,
|
||
|
xstop: cty::c_int,
|
||
|
stylemask: u32,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Set the given channels throughout the specified region, keeping content and"]
|
||
|
#[doc = " attributes unchanged. Returns the number of cells set, or -1 on failure."]
|
||
|
pub fn ncplane_stain(
|
||
|
n: *mut ncplane,
|
||
|
ystop: cty::c_int,
|
||
|
xstop: cty::c_int,
|
||
|
ul: u64,
|
||
|
ur: u64,
|
||
|
ll: u64,
|
||
|
lr: u64,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " If 'src' does not intersect with 'dst', 'dst' will not be changed, but it is"]
|
||
|
#[doc = " not an error. If 'dst' is NULL, the operation will target the standard plane."]
|
||
|
pub fn ncplane_mergedown_simple(src: *const ncplane, dst: *mut ncplane) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Merge the ncplane 'src' down onto the ncplane 'dst'. This is most rigorously"]
|
||
|
#[doc = " defined as \"write to 'dst' the frame that would be rendered were the entire"]
|
||
|
#[doc = " stack made up only of the specified subregion of 'src' and, below it, the"]
|
||
|
#[doc = " subregion of 'dst' having the specified origin. Merging is independent of"]
|
||
|
#[doc = " the position of 'src' viz 'dst' on the z-axis. It is an error to define a"]
|
||
|
#[doc = " subregion of zero area, or that is not entirely contained within 'src'. It"]
|
||
|
#[doc = " is an error to define a target origin such that the projected subregion is"]
|
||
|
#[doc = " not entirely contained within 'dst'. Behavior is undefined if 'src' and"]
|
||
|
#[doc = " 'dst' are equivalent. 'dst' is modified, but 'src' remains unchanged."]
|
||
|
pub fn ncplane_mergedown(
|
||
|
src: *const ncplane,
|
||
|
dst: *mut ncplane,
|
||
|
begsrcy: cty::c_int,
|
||
|
begsrcx: cty::c_int,
|
||
|
leny: cty::c_int,
|
||
|
lenx: cty::c_int,
|
||
|
dsty: cty::c_int,
|
||
|
dstx: cty::c_int,
|
||
|
) -> 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."]
|
||
|
pub fn ncplane_erase(n: *mut ncplane);
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncplane_set_channels(nc: *mut ncplane, channels: u64);
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncplane_set_attr(n: *mut ncplane, stylebits: cty::c_uint);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Set the specified style bits for the ncplane 'n', whether they're actively"]
|
||
|
#[doc = " supported or not."]
|
||
|
pub fn ncplane_styles_set(n: *mut ncplane, stylebits: cty::c_uint);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Add the specified styles to the ncplane's existing spec."]
|
||
|
pub fn ncplane_styles_on(n: *mut ncplane, stylebits: cty::c_uint);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Remove the specified styles from the ncplane's existing spec."]
|
||
|
pub fn ncplane_styles_off(n: *mut ncplane, stylebits: cty::c_uint);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Set the current fore/background color using RGB specifications. If the"]
|
||
|
#[doc = " terminal does not support directly-specified 3x8b cells (24-bit \"TrueColor\","]
|
||
|
#[doc = " indicated by the \"RGB\" terminfo capability), the provided values will be"]
|
||
|
#[doc = " interpreted in some lossy fashion. None of r, g, or b may exceed 255."]
|
||
|
#[doc = " \"HP-like\" terminals require setting foreground and background at the same"]
|
||
|
#[doc = " time using \"color pairs\"; notcurses will manage color pairs transparently."]
|
||
|
pub fn ncplane_set_fg_rgb(
|
||
|
n: *mut ncplane,
|
||
|
r: cty::c_int,
|
||
|
g: cty::c_int,
|
||
|
b: cty::c_int,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncplane_set_bg_rgb(
|
||
|
n: *mut ncplane,
|
||
|
r: cty::c_int,
|
||
|
g: cty::c_int,
|
||
|
b: cty::c_int,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Same, but clipped to [0..255]."]
|
||
|
pub fn ncplane_set_bg_rgb_clipped(n: *mut ncplane, r: cty::c_int, g: cty::c_int, b: cty::c_int);
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncplane_set_fg_rgb_clipped(n: *mut ncplane, r: cty::c_int, g: cty::c_int, b: cty::c_int);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Same, but with rgb assembled into a channel (i.e. lower 24 bits)."]
|
||
|
pub fn ncplane_set_fg(n: *mut ncplane, channel: cty::c_uint) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncplane_set_bg(n: *mut ncplane, channel: cty::c_uint) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Use the default color for the foreground/background."]
|
||
|
pub fn ncplane_set_fg_default(n: *mut ncplane);
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncplane_set_bg_default(n: *mut ncplane);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Set the ncplane's foreground palette index, set the foreground palette index"]
|
||
|
#[doc = " bit, set it foreground-opaque, and clear the foreground default color bit."]
|
||
|
pub fn ncplane_set_fg_palindex(n: *mut ncplane, idx: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncplane_set_bg_palindex(n: *mut ncplane, idx: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Set the alpha parameters for ncplane 'n'."]
|
||
|
pub fn ncplane_set_fg_alpha(n: *mut ncplane, alpha: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncplane_set_bg_alpha(n: *mut ncplane, alpha: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
#[doc = " Called for each fade iteration on 'ncp'. If anything but 0 is returned,"]
|
||
|
#[doc = " the fading operation ceases immediately, and that value is propagated out."]
|
||
|
#[doc = " The recommended absolute display time target is passed in 'tspec'."]
|
||
|
pub type fadecb = ::core::option::Option<
|
||
|
unsafe extern "C" fn(
|
||
|
nc: *mut notcurses,
|
||
|
ncp: *mut ncplane,
|
||
|
arg1: *const timespec,
|
||
|
curry: *mut cty::c_void,
|
||
|
) -> cty::c_int,
|
||
|
>;
|
||
|
extern "C" {
|
||
|
#[doc = " Fade the ncplane out over the provided time, calling 'fader' at each"]
|
||
|
#[doc = " iteration. Requires a terminal which supports truecolor, or at least palette"]
|
||
|
#[doc = " modification (if the terminal uses a palette, our ability to fade planes is"]
|
||
|
#[doc = " limited, and affected by the complexity of the rest of the screen)."]
|
||
|
pub fn ncplane_fadeout(
|
||
|
n: *mut ncplane,
|
||
|
ts: *const timespec,
|
||
|
fader: fadecb,
|
||
|
curry: *mut cty::c_void,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Fade the ncplane in over the specified time. Load the ncplane with the"]
|
||
|
#[doc = " target cells without rendering, then call this function. When it's done, the"]
|
||
|
#[doc = " ncplane will have reached the target levels, starting from zeroes."]
|
||
|
pub fn ncplane_fadein(
|
||
|
n: *mut ncplane,
|
||
|
ts: *const timespec,
|
||
|
fader: fadecb,
|
||
|
curry: *mut cty::c_void,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Rather than the simple ncplane_fade{in/out}(), ncfadectx_setup() can be"]
|
||
|
#[doc = " paired with a loop over ncplane_fade{in/out}_iteration() + ncfadectx_free()."]
|
||
|
pub fn ncfadectx_setup(n: *mut ncplane) -> *mut ncfadectx;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the number of iterations through which 'nctx' will fade."]
|
||
|
pub fn ncfadectx_iterations(nctx: *const ncfadectx) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Fade out through 'iter' iterations, where"]
|
||
|
#[doc = " 'iter' < 'ncfadectx_iterations(nctx)'."]
|
||
|
pub fn ncplane_fadeout_iteration(
|
||
|
n: *mut ncplane,
|
||
|
nctx: *mut ncfadectx,
|
||
|
iter: cty::c_int,
|
||
|
fader: fadecb,
|
||
|
curry: *mut cty::c_void,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Fade in through 'iter' iterations, where"]
|
||
|
#[doc = " 'iter' < 'ncfadectx_iterations(nctx)'."]
|
||
|
pub fn ncplane_fadein_iteration(
|
||
|
n: *mut ncplane,
|
||
|
nctx: *mut ncfadectx,
|
||
|
iter: cty::c_int,
|
||
|
fader: fadecb,
|
||
|
curry: *mut cty::c_void,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Pulse the plane in and out until the callback returns non-zero, relying on"]
|
||
|
#[doc = " the callback 'fader' to initiate rendering. 'ts' defines the half-period"]
|
||
|
#[doc = " (i.e. the transition from black to full brightness, or back again). Proper"]
|
||
|
#[doc = " use involves preparing (but not rendering) an ncplane, then calling"]
|
||
|
#[doc = " ncplane_pulse(), which will fade in from black to the specified colors."]
|
||
|
pub fn ncplane_pulse(
|
||
|
n: *mut ncplane,
|
||
|
ts: *const timespec,
|
||
|
fader: fadecb,
|
||
|
curry: *mut cty::c_void,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Release the resources associated with 'nctx'."]
|
||
|
pub fn ncfadectx_free(nctx: *mut ncfadectx);
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn cells_rounded_box(
|
||
|
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,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn cells_double_box(
|
||
|
n: *mut ncplane,
|
||
|
attr: u32,
|
||
|
channels: u64,
|
||
|
ul: *mut cell,
|
||
|
ur: *mut cell,
|
||
|
ll: *mut cell,
|
||
|
lr: *mut cell,
|
||
|
hl: *mut cell,
|
||
|
vl: *mut cell,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Open a visual at 'file', extract a codec and parameters, decode the first"]
|
||
|
#[doc = " image to memory."]
|
||
|
pub fn ncvisual_from_file(file: *const cty::c_char, ncerr: *mut nc_err_e) -> *mut ncvisual;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Prepare an ncvisual, and its underlying plane, based off RGBA content in"]
|
||
|
#[doc = " memory at 'rgba'. 'rgba' must be a flat array of 32-bit 8bpc RGBA pixels."]
|
||
|
#[doc = " These must be arranged in 'rowstride' lines, where the first 'cols' * 4b"]
|
||
|
#[doc = " are actual data. There must be 'rows' lines. The total size of 'rgba'"]
|
||
|
#[doc = " must thus be at least (rows * rowstride) bytes, of which (rows * cols * 4)"]
|
||
|
#[doc = " bytes are actual data. Resulting planes are ceil('rows' / 2) x 'cols'."]
|
||
|
pub fn ncvisual_from_rgba(
|
||
|
rgba: *const cty::c_void,
|
||
|
rows: cty::c_int,
|
||
|
rowstride: cty::c_int,
|
||
|
cols: cty::c_int,
|
||
|
) -> *mut ncvisual;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " ncvisual_from_rgba(), but 'bgra' is arranged as BGRA."]
|
||
|
pub fn ncvisual_from_bgra(
|
||
|
rgba: *const cty::c_void,
|
||
|
rows: cty::c_int,
|
||
|
rowstride: cty::c_int,
|
||
|
cols: cty::c_int,
|
||
|
) -> *mut ncvisual;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Promote an ncplane 'n' to an ncvisual. The plane may contain only spaces,"]
|
||
|
#[doc = " half blocks, and full blocks. The latter will be checked, and any other"]
|
||
|
#[doc = " glyph will result in a NULL being returned. This function exists so that"]
|
||
|
#[doc = " planes can be subjected to ncvisual transformations. If possible, it's"]
|
||
|
#[doc = " better to create the ncvisual from memory using ncvisual_from_rgba()."]
|
||
|
pub fn ncvisual_from_plane(
|
||
|
n: *const ncplane,
|
||
|
blit: ncblitter_e,
|
||
|
begy: cty::c_int,
|
||
|
begx: cty::c_int,
|
||
|
leny: cty::c_int,
|
||
|
lenx: cty::c_int,
|
||
|
) -> *mut ncvisual;
|
||
|
}
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct ncvisual_options {
|
||
|
#[doc = " if no ncplane is provided, one will be created using the exact size"]
|
||
|
#[doc = " necessary to render the source with perfect fidelity (this might be"]
|
||
|
#[doc = " smaller or larger than the rendering area). if provided, style is"]
|
||
|
#[doc = " taken into account, relative to the provided ncplane."]
|
||
|
pub n: *mut ncplane,
|
||
|
#[doc = " the style is ignored if no ncplane is provided (it ought be NCSCALE_NONE"]
|
||
|
#[doc = " in this case). otherwise, the source is stretched/scaled relative to the"]
|
||
|
#[doc = " provided ncplane."]
|
||
|
pub scaling: ncscale_e,
|
||
|
#[doc = " if an ncplane is provided, y and x specify where the visual will be"]
|
||
|
#[doc = " rendered on that plane. otherwise, they specify where the created ncplane"]
|
||
|
#[doc = " will be placed."]
|
||
|
pub y: cty::c_int,
|
||
|
#[doc = " if an ncplane is provided, y and x specify where the visual will be"]
|
||
|
#[doc = " rendered on that plane. otherwise, they specify where the created ncplane"]
|
||
|
#[doc = " will be placed."]
|
||
|
pub x: cty::c_int,
|
||
|
#[doc = " origin of rendered section"]
|
||
|
pub begy: cty::c_int,
|
||
|
#[doc = " origin of rendered section"]
|
||
|
pub begx: cty::c_int,
|
||
|
#[doc = " size of rendered section"]
|
||
|
pub leny: cty::c_int,
|
||
|
#[doc = " size of rendered section"]
|
||
|
pub lenx: cty::c_int,
|
||
|
#[doc = " glyph set to use (maps input to output cells)"]
|
||
|
pub blitter: ncblitter_e,
|
||
|
#[doc = " bitmask over NCVISUAL_OPTION_*"]
|
||
|
pub flags: u64,
|
||
|
}
|
||
|
#[test]
|
||
|
fn bindgen_test_layout_ncvisual_options() {
|
||
|
assert_eq!(
|
||
|
::core::mem::size_of::<ncvisual_options>(),
|
||
|
48usize,
|
||
|
concat!("Size of: ", stringify!(ncvisual_options))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
::core::mem::align_of::<ncvisual_options>(),
|
||
|
8usize,
|
||
|
concat!("Alignment of ", stringify!(ncvisual_options))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncvisual_options>())).n as *const _ as usize },
|
||
|
0usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncvisual_options),
|
||
|
"::",
|
||
|
stringify!(n)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncvisual_options>())).scaling as *const _ as usize },
|
||
|
8usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncvisual_options),
|
||
|
"::",
|
||
|
stringify!(scaling)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncvisual_options>())).y as *const _ as usize },
|
||
|
12usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncvisual_options),
|
||
|
"::",
|
||
|
stringify!(y)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncvisual_options>())).x as *const _ as usize },
|
||
|
16usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncvisual_options),
|
||
|
"::",
|
||
|
stringify!(x)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncvisual_options>())).begy as *const _ as usize },
|
||
|
20usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncvisual_options),
|
||
|
"::",
|
||
|
stringify!(begy)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncvisual_options>())).begx as *const _ as usize },
|
||
|
24usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncvisual_options),
|
||
|
"::",
|
||
|
stringify!(begx)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncvisual_options>())).leny as *const _ as usize },
|
||
|
28usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncvisual_options),
|
||
|
"::",
|
||
|
stringify!(leny)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncvisual_options>())).lenx as *const _ as usize },
|
||
|
32usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncvisual_options),
|
||
|
"::",
|
||
|
stringify!(lenx)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncvisual_options>())).blitter as *const _ as usize },
|
||
|
36usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncvisual_options),
|
||
|
"::",
|
||
|
stringify!(blitter)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncvisual_options>())).flags as *const _ as usize },
|
||
|
40usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncvisual_options),
|
||
|
"::",
|
||
|
stringify!(flags)
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Create an RGBA flat array from the selected region of the ncplane 'nc'."]
|
||
|
#[doc = " Start at the plane's 'begy'x'begx' coordinate (which must lie on the"]
|
||
|
#[doc = " plane), continuing for 'leny'x'lenx' cells. Either or both of 'leny' and"]
|
||
|
#[doc = " 'lenx' can be specified as -1 to go through the boundary of the plane."]
|
||
|
#[doc = " Only glyphs from the specified blitset may be present."]
|
||
|
pub fn ncplane_rgba(
|
||
|
nc: *const ncplane,
|
||
|
blit: ncblitter_e,
|
||
|
begy: cty::c_int,
|
||
|
begx: cty::c_int,
|
||
|
leny: cty::c_int,
|
||
|
lenx: cty::c_int,
|
||
|
) -> *mut u32;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Get the size and ratio of ncvisual pixels to output cells along the y"]
|
||
|
#[doc = " ('toy') and x ('tox') axes. A ncvisual of '*y'X'*x' pixels will require"]
|
||
|
#[doc = " ('*y' * '*toy')X('x' * 'tox') cells for full output. Returns non-zero"]
|
||
|
#[doc = " for an invalid 'vopts->blitter'. Scaling is taken into consideration."]
|
||
|
pub fn ncvisual_geom(
|
||
|
nc: *const notcurses,
|
||
|
n: *const ncvisual,
|
||
|
vopts: *const ncvisual_options,
|
||
|
y: *mut cty::c_int,
|
||
|
x: *mut cty::c_int,
|
||
|
toy: *mut cty::c_int,
|
||
|
tox: *mut cty::c_int,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Destroy an ncvisual. Rendered elements will not be disrupted, but the visual"]
|
||
|
#[doc = " can be neither decoded nor rendered any further."]
|
||
|
pub fn ncvisual_destroy(ncv: *mut ncvisual);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " extract the next frame from an ncvisual. returns NCERR_EOF on end of file,"]
|
||
|
#[doc = " and NCERR_SUCCESS on success, otherwise some other NCERR."]
|
||
|
pub fn ncvisual_decode(nc: *mut ncvisual) -> nc_err_e;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Rotate the visual 'rads' radians. Only M_PI/2 and -M_PI/2 are"]
|
||
|
#[doc = " supported at the moment, but this will change FIXME."]
|
||
|
pub fn ncvisual_rotate(n: *mut ncvisual, rads: f64) -> nc_err_e;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Resize the visual so that it is 'rows' X 'columns'. This is a lossy"]
|
||
|
#[doc = " transformation, unless the size is unchanged."]
|
||
|
pub fn ncvisual_resize(n: *mut ncvisual, rows: cty::c_int, cols: cty::c_int) -> nc_err_e;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Polyfill at the specified location within the ncvisual 'n', using 'rgba'."]
|
||
|
pub fn ncvisual_polyfill_yx(
|
||
|
n: *mut ncvisual,
|
||
|
y: cty::c_int,
|
||
|
x: cty::c_int,
|
||
|
rgba: u32,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Get the specified pixel from the specified ncvisual."]
|
||
|
pub fn ncvisual_at_yx(
|
||
|
n: *const ncvisual,
|
||
|
y: cty::c_int,
|
||
|
x: cty::c_int,
|
||
|
pixel: *mut u32,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Set the specified pixel in the specified ncvisual."]
|
||
|
pub fn ncvisual_set_yx(
|
||
|
n: *const ncvisual,
|
||
|
y: cty::c_int,
|
||
|
x: cty::c_int,
|
||
|
pixel: u32,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Render the decoded frame to the specified ncplane (if one is not provided,"]
|
||
|
#[doc = " one will be created, having the exact size necessary to display the visual."]
|
||
|
#[doc = " In this case, 'style' must be NCSTYLE_NONE). A subregion of the visual can"]
|
||
|
#[doc = " be rendered using 'begx', 'begy', 'lenx', and 'leny'. Negative values for"]
|
||
|
#[doc = " 'begy' or 'begx' are an error. It is an error to specify any region beyond"]
|
||
|
#[doc = " the boundaries of the frame. Returns the plane to which we drew (if ncv->n"]
|
||
|
#[doc = " is NULL, a new plane will be created)."]
|
||
|
pub fn ncvisual_render(
|
||
|
nc: *mut notcurses,
|
||
|
ncv: *mut ncvisual,
|
||
|
vopts: *const ncvisual_options,
|
||
|
) -> *mut ncplane;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " If a subtitle ought be displayed at this time, return a heap-allocated copy"]
|
||
|
#[doc = " of the UTF8 text."]
|
||
|
pub fn ncvisual_subtitle(ncv: *const ncvisual) -> *mut cty::c_char;
|
||
|
}
|
||
|
#[doc = " Called for each frame rendered from 'ncv'. If anything but 0 is returned,"]
|
||
|
#[doc = " the streaming operation ceases immediately, and that value is propagated out."]
|
||
|
#[doc = " The recommended absolute display time target is passed in 'tspec'."]
|
||
|
pub type streamcb = ::core::option::Option<
|
||
|
unsafe extern "C" fn(
|
||
|
arg1: *mut ncvisual,
|
||
|
arg2: *mut ncvisual_options,
|
||
|
arg3: *const timespec,
|
||
|
arg4: *mut cty::c_void,
|
||
|
) -> cty::c_int,
|
||
|
>;
|
||
|
extern "C" {
|
||
|
#[doc = " Shut up and display my frames! Provide as an argument to ncvisual_stream()."]
|
||
|
#[doc = " If you'd like subtitles to be decoded, provide an ncplane as the curry. If the"]
|
||
|
#[doc = " curry is NULL, subtitles will not be displayed."]
|
||
|
pub fn ncvisual_simple_streamer(
|
||
|
ncv: *mut ncvisual,
|
||
|
vopts: *mut ncvisual_options,
|
||
|
tspec: *const timespec,
|
||
|
curry: *mut cty::c_void,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Stream the entirety of the media, according to its own timing. Blocking,"]
|
||
|
#[doc = " obviously. streamer may be NULL; it is otherwise called for each frame, and"]
|
||
|
#[doc = " its return value handled as outlined for streamcb. If streamer() returns"]
|
||
|
#[doc = " non-zero, the stream is aborted, and that value is returned. By convention,"]
|
||
|
#[doc = " return a positive number to indicate intentional abort from within"]
|
||
|
#[doc = " streamer(). 'timescale' allows the frame duration time to be scaled. For a"]
|
||
|
#[doc = " visual naturally running at 30FPS, a 'timescale' of 0.1 will result in"]
|
||
|
#[doc = " 300FPS, and a 'timescale' of 10 will result in 3FPS. It is an error to"]
|
||
|
#[doc = " supply 'timescale' less than or equal to 0."]
|
||
|
pub fn ncvisual_stream(
|
||
|
nc: *mut notcurses,
|
||
|
ncv: *mut ncvisual,
|
||
|
ncerr: *mut nc_err_e,
|
||
|
timescale: f32,
|
||
|
streamer: streamcb,
|
||
|
vopts: *const ncvisual_options,
|
||
|
curry: *mut cty::c_void,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Blit a flat array 'data' of RGBA 32-bit values to the ncplane 'vopts->n',"]
|
||
|
#[doc = " which mustn't be NULL. the blit begins at 'vopts->y' and 'vopts->x' relative"]
|
||
|
#[doc = " to the specified plane. Each source row ought occupy 'linesize' bytes (this"]
|
||
|
#[doc = " might be greater than 'vopts->lenx' * 4 due to padding or partial blits). A"]
|
||
|
#[doc = " subregion of the input can be specified with the 'begy'x'begx' and"]
|
||
|
#[doc = " 'leny'x'lenx' fields from 'vopts'. Returns the number of pixels blitted, or"]
|
||
|
#[doc = " -1 on error."]
|
||
|
pub fn ncblit_rgba(
|
||
|
data: *const cty::c_void,
|
||
|
linesize: cty::c_int,
|
||
|
vopts: *const ncvisual_options,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Same as ncblit_rgba(), but for BGRx."]
|
||
|
pub fn ncblit_bgrx(
|
||
|
data: *const cty::c_void,
|
||
|
linesize: cty::c_int,
|
||
|
vopts: *const ncvisual_options,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct ncreel_options {
|
||
|
#[doc = " bitfield; 1s will not be drawn (see bordermaskbits)"]
|
||
|
pub bordermask: cty::c_uint,
|
||
|
#[doc = " attributes used for ncreel border"]
|
||
|
pub borderchan: u64,
|
||
|
#[doc = " bitfield; same as bordermask but for tablet borders"]
|
||
|
pub tabletmask: cty::c_uint,
|
||
|
#[doc = " tablet border styling channel"]
|
||
|
pub tabletchan: u64,
|
||
|
#[doc = " focused tablet border styling channel"]
|
||
|
pub focusedchan: u64,
|
||
|
#[doc = " background colors"]
|
||
|
pub bgchannel: u64,
|
||
|
#[doc = " bitfield over NCREEL_OPTION_*"]
|
||
|
pub flags: u64,
|
||
|
}
|
||
|
#[test]
|
||
|
fn bindgen_test_layout_ncreel_options() {
|
||
|
assert_eq!(
|
||
|
::core::mem::size_of::<ncreel_options>(),
|
||
|
56usize,
|
||
|
concat!("Size of: ", stringify!(ncreel_options))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
::core::mem::align_of::<ncreel_options>(),
|
||
|
8usize,
|
||
|
concat!("Alignment of ", stringify!(ncreel_options))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncreel_options>())).bordermask as *const _ as usize },
|
||
|
0usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncreel_options),
|
||
|
"::",
|
||
|
stringify!(bordermask)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncreel_options>())).borderchan as *const _ as usize },
|
||
|
8usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncreel_options),
|
||
|
"::",
|
||
|
stringify!(borderchan)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncreel_options>())).tabletmask as *const _ as usize },
|
||
|
16usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncreel_options),
|
||
|
"::",
|
||
|
stringify!(tabletmask)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncreel_options>())).tabletchan as *const _ as usize },
|
||
|
24usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncreel_options),
|
||
|
"::",
|
||
|
stringify!(tabletchan)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncreel_options>())).focusedchan as *const _ as usize },
|
||
|
32usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncreel_options),
|
||
|
"::",
|
||
|
stringify!(focusedchan)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncreel_options>())).bgchannel as *const _ as usize },
|
||
|
40usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncreel_options),
|
||
|
"::",
|
||
|
stringify!(bgchannel)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncreel_options>())).flags as *const _ as usize },
|
||
|
48usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncreel_options),
|
||
|
"::",
|
||
|
stringify!(flags)
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct nctablet {
|
||
|
_unused: [u8; 0],
|
||
|
}
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct ncreel {
|
||
|
_unused: [u8; 0],
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Take over the ncplane 'nc' and use it to draw a reel according to 'popts'."]
|
||
|
#[doc = " The plane will be destroyed by ncreel_destroy(); this transfers ownership."]
|
||
|
pub fn ncreel_create(nc: *mut ncplane, popts: *const ncreel_options) -> *mut ncreel;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Returns the ncplane on which this ncreel lives."]
|
||
|
pub fn ncreel_plane(pr: *mut ncreel) -> *mut ncplane;
|
||
|
}
|
||
|
#[doc = " Tablet draw callback, provided a tablet (from which the ncplane and userptr"]
|
||
|
#[doc = " may be extracted), and a bool indicating whether output ought be drawn from"]
|
||
|
#[doc = " the top (true) or bottom (false). Returns non-negative count of output lines,"]
|
||
|
#[doc = " which must be less than or equal to ncplane_dim_y(nctablet_plane(t))."]
|
||
|
pub type tabletcb =
|
||
|
::core::option::Option<unsafe extern "C" fn(t: *mut nctablet, drawfromtop: bool) -> cty::c_int>;
|
||
|
extern "C" {
|
||
|
#[doc = " Add a new nctablet to the provided ncreel, having the callback object"]
|
||
|
#[doc = " opaque. Neither, either, or both of after and before may be specified. If"]
|
||
|
#[doc = " neither is specified, the new tablet can be added anywhere on the reel. If"]
|
||
|
#[doc = " one or the other is specified, the tablet will be added before or after the"]
|
||
|
#[doc = " specified tablet. If both are specified, the tablet will be added to the"]
|
||
|
#[doc = " resulting location, assuming it is valid (after->next == before->prev); if"]
|
||
|
#[doc = " it is not valid, or there is any other error, NULL will be returned."]
|
||
|
pub fn ncreel_add(
|
||
|
pr: *mut ncreel,
|
||
|
after: *mut nctablet,
|
||
|
before: *mut nctablet,
|
||
|
cb: tabletcb,
|
||
|
opaque: *mut cty::c_void,
|
||
|
) -> *mut nctablet;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the number of nctablets in the ncreel."]
|
||
|
pub fn ncreel_tabletcount(pr: *const ncreel) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Delete the tablet specified by t from the ncreel specified by pr. Returns"]
|
||
|
#[doc = " -1 if the tablet cannot be found."]
|
||
|
pub fn ncreel_del(pr: *mut ncreel, t: *mut nctablet) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Redraw the ncreel in its entirety."]
|
||
|
pub fn ncreel_redraw(pr: *mut ncreel) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Offer the input to the ncreel. If it's relevant, this function returns"]
|
||
|
#[doc = " true, and the input ought not be processed further. If it's irrelevant to"]
|
||
|
#[doc = " the reel, false is returned. Relevant inputs include:"]
|
||
|
#[doc = " * a mouse click on a tablet (focuses tablet)"]
|
||
|
#[doc = " * a mouse scrollwheel event (rolls reel)"]
|
||
|
#[doc = " * up, down, pgup, or pgdown (navigates among items)"]
|
||
|
pub fn ncreel_offer_input(n: *mut ncreel, nc: *const ncinput) -> bool;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the focused tablet, if any tablets are present. This is not a copy;"]
|
||
|
#[doc = " be careful to use it only for the duration of a critical section."]
|
||
|
pub fn ncreel_focused(pr: *mut ncreel) -> *mut nctablet;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Change focus to the next tablet, if one exists"]
|
||
|
pub fn ncreel_next(pr: *mut ncreel) -> *mut nctablet;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Change focus to the previous tablet, if one exists"]
|
||
|
pub fn ncreel_prev(pr: *mut ncreel) -> *mut nctablet;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Destroy an ncreel allocated with ncreel_create(). Returns non-zero on failure."]
|
||
|
pub fn ncreel_destroy(pr: *mut ncreel) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Returns a pointer to a user pointer associated with this nctablet."]
|
||
|
pub fn nctablet_userptr(t: *mut nctablet) -> *mut cty::c_void;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Access the ncplane associated with this nctablet, if one exists."]
|
||
|
pub fn nctablet_ncplane(t: *mut nctablet) -> *mut ncplane;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Takes an arbitrarily large number, and prints it into a fixed-size buffer by"]
|
||
|
#[doc = " adding the necessary SI suffix. Usually, pass a |[IB]PREFIXSTRLEN+1|-sized"]
|
||
|
#[doc = " buffer to generate up to |[IB]PREFIXCOLUMNS| columns' worth of EGCs. The"]
|
||
|
#[doc = " characteristic can occupy up through |mult-1| characters (3 for 1000, 4 for"]
|
||
|
#[doc = " 1024). The mantissa can occupy either zero or two characters."]
|
||
|
#[doc = ""]
|
||
|
#[doc = " Floating-point is never used, because an IEEE758 double can only losslessly"]
|
||
|
#[doc = " represent integers through 2^53-1."]
|
||
|
#[doc = ""]
|
||
|
#[doc = " 2^64-1 is 18446744073709551615, 18.45E(xa). KMGTPEZY thus suffice to handle"]
|
||
|
#[doc = " an 89-bit uintmax_t. Beyond Z(etta) and Y(otta) lie lands unspecified by SI."]
|
||
|
#[doc = " 2^-63 is 0.000000000000000000108, 1.08a(tto)."]
|
||
|
#[doc = " val: value to print"]
|
||
|
#[doc = " decimal: scaling. '1' if none has taken place."]
|
||
|
#[doc = " buf: buffer in which string will be generated"]
|
||
|
#[doc = " omitdec: inhibit printing of all-0 decimal portions"]
|
||
|
#[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)."]
|
||
|
pub fn ncmetric(
|
||
|
val: uintmax_t,
|
||
|
decimal: uintmax_t,
|
||
|
buf: *mut cty::c_char,
|
||
|
omitdec: cty::c_int,
|
||
|
mult: uintmax_t,
|
||
|
uprefix: cty::c_int,
|
||
|
) -> *const cty::c_char;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn notcurses_cursor_enable(nc: *mut notcurses);
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn notcurses_cursor_disable(nc: *mut notcurses);
|
||
|
}
|
||
|
#[doc = " Palette API. Some terminals only support 256 colors, but allow the full"]
|
||
|
#[doc = " palette to be specified with arbitrary RGB colors. In all cases, it's more"]
|
||
|
#[doc = " performant to use indexed colors, since it's much less data to write to the"]
|
||
|
#[doc = " terminal. If you can limit yourself to 256 colors, that's probably best."]
|
||
|
#[repr(C)]
|
||
|
#[derive(Copy, Clone)]
|
||
|
pub struct palette256 {
|
||
|
#[doc = " We store the RGB values as a regular ol' channel"]
|
||
|
pub chans: [u32; 256usize],
|
||
|
}
|
||
|
#[test]
|
||
|
fn bindgen_test_layout_palette256() {
|
||
|
assert_eq!(
|
||
|
::core::mem::size_of::<palette256>(),
|
||
|
1024usize,
|
||
|
concat!("Size of: ", stringify!(palette256))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
::core::mem::align_of::<palette256>(),
|
||
|
4usize,
|
||
|
concat!("Alignment of ", stringify!(palette256))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<palette256>())).chans as *const _ as usize },
|
||
|
0usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(palette256),
|
||
|
"::",
|
||
|
stringify!(chans)
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Create a new palette store. It will be initialized with notcurses' best"]
|
||
|
#[doc = " knowledge of the currently configured palette."]
|
||
|
pub fn palette256_new(nc: *mut notcurses) -> *mut palette256;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Attempt to configure the terminal with the provided palette 'p'. Does not"]
|
||
|
#[doc = " transfer ownership of 'p'; palette256_free() can still be called."]
|
||
|
pub fn palette256_use(nc: *mut notcurses, p: *const palette256) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Free the palette store 'p'."]
|
||
|
pub fn palette256_free(p: *mut palette256);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Convert the plane's content to greyscale."]
|
||
|
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 = ""]
|
||
|
#[doc = " At all times, exactly one item is selected."]
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct ncselector_item {
|
||
|
pub option: *mut cty::c_char,
|
||
|
pub desc: *mut cty::c_char,
|
||
|
#[doc = " filled in by library"]
|
||
|
pub opcolumns: size_t,
|
||
|
#[doc = " filled in by library"]
|
||
|
pub desccolumns: size_t,
|
||
|
}
|
||
|
#[test]
|
||
|
fn bindgen_test_layout_ncselector_item() {
|
||
|
assert_eq!(
|
||
|
::core::mem::size_of::<ncselector_item>(),
|
||
|
32usize,
|
||
|
concat!("Size of: ", stringify!(ncselector_item))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
::core::mem::align_of::<ncselector_item>(),
|
||
|
8usize,
|
||
|
concat!("Alignment of ", stringify!(ncselector_item))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncselector_item>())).option as *const _ as usize },
|
||
|
0usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncselector_item),
|
||
|
"::",
|
||
|
stringify!(option)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncselector_item>())).desc as *const _ as usize },
|
||
|
8usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncselector_item),
|
||
|
"::",
|
||
|
stringify!(desc)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncselector_item>())).opcolumns as *const _ as usize },
|
||
|
16usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncselector_item),
|
||
|
"::",
|
||
|
stringify!(opcolumns)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncselector_item>())).desccolumns as *const _ as usize },
|
||
|
24usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncselector_item),
|
||
|
"::",
|
||
|
stringify!(desccolumns)
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct ncselector_options {
|
||
|
#[doc = " title may be NULL, inhibiting riser, saving two rows."]
|
||
|
pub title: *mut cty::c_char,
|
||
|
#[doc = " secondary may be NULL"]
|
||
|
pub secondary: *mut cty::c_char,
|
||
|
#[doc = " footer may be NULL"]
|
||
|
pub footer: *mut cty::c_char,
|
||
|
#[doc = " initial items and descriptions"]
|
||
|
pub items: *mut ncselector_item,
|
||
|
#[doc = " default item (selected at start), must be < itemcount unless itemcount is"]
|
||
|
#[doc = " 0, in which case 'defidx' must also be 0"]
|
||
|
pub defidx: cty::c_uint,
|
||
|
#[doc = " maximum number of options to display at once, 0 to use all available space"]
|
||
|
pub maxdisplay: cty::c_uint,
|
||
|
#[doc = " option channels"]
|
||
|
pub opchannels: u64,
|
||
|
#[doc = " description channels"]
|
||
|
pub descchannels: u64,
|
||
|
#[doc = " title channels"]
|
||
|
pub titlechannels: u64,
|
||
|
#[doc = " secondary and footer channels"]
|
||
|
pub footchannels: u64,
|
||
|
#[doc = " border channels"]
|
||
|
pub boxchannels: u64,
|
||
|
#[doc = " background channels, used only in body"]
|
||
|
pub bgchannels: u64,
|
||
|
#[doc = " bitfield of NCSELECTOR_OPTION_*"]
|
||
|
pub flags: u64,
|
||
|
}
|
||
|
#[test]
|
||
|
fn bindgen_test_layout_ncselector_options() {
|
||
|
assert_eq!(
|
||
|
::core::mem::size_of::<ncselector_options>(),
|
||
|
96usize,
|
||
|
concat!("Size of: ", stringify!(ncselector_options))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
::core::mem::align_of::<ncselector_options>(),
|
||
|
8usize,
|
||
|
concat!("Alignment of ", stringify!(ncselector_options))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncselector_options>())).title as *const _ as usize },
|
||
|
0usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncselector_options),
|
||
|
"::",
|
||
|
stringify!(title)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncselector_options>())).secondary as *const _ as usize },
|
||
|
8usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncselector_options),
|
||
|
"::",
|
||
|
stringify!(secondary)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncselector_options>())).footer as *const _ as usize },
|
||
|
16usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncselector_options),
|
||
|
"::",
|
||
|
stringify!(footer)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncselector_options>())).items as *const _ as usize },
|
||
|
24usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncselector_options),
|
||
|
"::",
|
||
|
stringify!(items)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncselector_options>())).defidx as *const _ as usize },
|
||
|
32usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncselector_options),
|
||
|
"::",
|
||
|
stringify!(defidx)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncselector_options>())).maxdisplay as *const _ as usize },
|
||
|
36usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncselector_options),
|
||
|
"::",
|
||
|
stringify!(maxdisplay)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncselector_options>())).opchannels as *const _ as usize },
|
||
|
40usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncselector_options),
|
||
|
"::",
|
||
|
stringify!(opchannels)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe {
|
||
|
&(*(::core::ptr::null::<ncselector_options>())).descchannels as *const _ as usize
|
||
|
},
|
||
|
48usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncselector_options),
|
||
|
"::",
|
||
|
stringify!(descchannels)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe {
|
||
|
&(*(::core::ptr::null::<ncselector_options>())).titlechannels as *const _ as usize
|
||
|
},
|
||
|
56usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncselector_options),
|
||
|
"::",
|
||
|
stringify!(titlechannels)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe {
|
||
|
&(*(::core::ptr::null::<ncselector_options>())).footchannels as *const _ as usize
|
||
|
},
|
||
|
64usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncselector_options),
|
||
|
"::",
|
||
|
stringify!(footchannels)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncselector_options>())).boxchannels as *const _ as usize },
|
||
|
72usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncselector_options),
|
||
|
"::",
|
||
|
stringify!(boxchannels)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncselector_options>())).bgchannels as *const _ as usize },
|
||
|
80usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncselector_options),
|
||
|
"::",
|
||
|
stringify!(bgchannels)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncselector_options>())).flags as *const _ as usize },
|
||
|
88usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncselector_options),
|
||
|
"::",
|
||
|
stringify!(flags)
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncselector_create(
|
||
|
n: *mut ncplane,
|
||
|
y: cty::c_int,
|
||
|
x: cty::c_int,
|
||
|
opts: *const ncselector_options,
|
||
|
) -> *mut ncselector;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncselector_additem(n: *mut ncselector, item: *const ncselector_item) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncselector_delitem(n: *mut ncselector, item: *const cty::c_char) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return reference to the selected option, or NULL if there are no items."]
|
||
|
pub fn ncselector_selected(n: *const ncselector) -> *const cty::c_char;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return a reference to the ncselector's underlying ncplane."]
|
||
|
pub fn ncselector_plane(n: *mut ncselector) -> *mut ncplane;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Move up or down in the list. A reference to the newly-selected item is"]
|
||
|
#[doc = " returned, or NULL if there are no items in the list."]
|
||
|
pub fn ncselector_previtem(n: *mut ncselector) -> *const cty::c_char;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncselector_nextitem(n: *mut ncselector) -> *const cty::c_char;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Offer the input to the ncselector. If it's relevant, this function returns"]
|
||
|
#[doc = " true, and the input ought not be processed further. If it's irrelevant to"]
|
||
|
#[doc = " the selector, false is returned. Relevant inputs include:"]
|
||
|
#[doc = " * a mouse click on an item"]
|
||
|
#[doc = " * a mouse scrollwheel event"]
|
||
|
#[doc = " * a mouse click on the scrolling arrows"]
|
||
|
#[doc = " * up, down, pgup, or pgdown on an unrolled menu (navigates among items)"]
|
||
|
pub fn ncselector_offer_input(n: *mut ncselector, nc: *const ncinput) -> bool;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Destroy the ncselector. If 'item' is not NULL, the last selected option will"]
|
||
|
#[doc = " be strdup()ed and assigned to '*item' (and must be free()d by the caller)."]
|
||
|
pub fn ncselector_destroy(n: *mut ncselector, item: *mut *mut cty::c_char);
|
||
|
}
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct ncmselector_item {
|
||
|
pub option: *mut cty::c_char,
|
||
|
pub desc: *mut cty::c_char,
|
||
|
pub selected: bool,
|
||
|
}
|
||
|
#[test]
|
||
|
fn bindgen_test_layout_ncmselector_item() {
|
||
|
assert_eq!(
|
||
|
::core::mem::size_of::<ncmselector_item>(),
|
||
|
24usize,
|
||
|
concat!("Size of: ", stringify!(ncmselector_item))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
::core::mem::align_of::<ncmselector_item>(),
|
||
|
8usize,
|
||
|
concat!("Alignment of ", stringify!(ncmselector_item))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncmselector_item>())).option as *const _ as usize },
|
||
|
0usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncmselector_item),
|
||
|
"::",
|
||
|
stringify!(option)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncmselector_item>())).desc as *const _ as usize },
|
||
|
8usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncmselector_item),
|
||
|
"::",
|
||
|
stringify!(desc)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncmselector_item>())).selected as *const _ as usize },
|
||
|
16usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncmselector_item),
|
||
|
"::",
|
||
|
stringify!(selected)
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
#[doc = " multiselection widget -- a selector supporting multiple selections."]
|
||
|
#[doc = ""]
|
||
|
#[doc = " ╭────────────────────────────────────────────────────────────────╮"]
|
||
|
#[doc = " │ this is truly an awfully long example of a MULTISELECTOR title │"]
|
||
|
#[doc = "╭─────┴─────────────────────────────pick one (you will die regardless)─┤"]
|
||
|
#[doc = "│ ↑ │"]
|
||
|
#[doc = "│ ☐ 1 Across the Atlantic Ocean, there was a place called North America│"]
|
||
|
#[doc = "│ ☐ 2 Discovered by an Italian in the employ of the queen of Spain │"]
|
||
|
#[doc = "│ ☐ 3 Colonized extensively by the Spanish and the French │"]
|
||
|
#[doc = "│ ☐ 4 Developed into a rich nation by Dutch-supplied African slaves │"]
|
||
|
#[doc = "│ ☐ 5 And thus became the largest English-speaking nation on earth │"]
|
||
|
#[doc = "│ ☐ 6 Namely, the United States of America │"]
|
||
|
#[doc = "│ ☐ 7 The inhabitants of the United States called themselves Yankees │"]
|
||
|
#[doc = "│ ☐ 8 For some reason │"]
|
||
|
#[doc = "│ ☐ 9 And, eventually noticing the rest of the world was there, │"]
|
||
|
#[doc = "│ ☐ 10 Decided to rule it. │"]
|
||
|
#[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)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct ncmultiselector_options {
|
||
|
#[doc = " title may be NULL, inhibiting riser, saving two rows."]
|
||
|
pub title: *mut cty::c_char,
|
||
|
#[doc = " secondary may be NULL"]
|
||
|
pub secondary: *mut cty::c_char,
|
||
|
#[doc = " footer may be NULL"]
|
||
|
pub footer: *mut cty::c_char,
|
||
|
#[doc = " initial items, descriptions, and statuses"]
|
||
|
pub items: *mut ncmselector_item,
|
||
|
#[doc = " maximum number of options to display at once, 0 to use all available space"]
|
||
|
pub maxdisplay: cty::c_uint,
|
||
|
#[doc = " option channels"]
|
||
|
pub opchannels: u64,
|
||
|
#[doc = " description channels"]
|
||
|
pub descchannels: u64,
|
||
|
#[doc = " title channels"]
|
||
|
pub titlechannels: u64,
|
||
|
#[doc = " secondary and footer channels"]
|
||
|
pub footchannels: u64,
|
||
|
#[doc = " border channels"]
|
||
|
pub boxchannels: u64,
|
||
|
#[doc = " background channels, used only in body"]
|
||
|
pub bgchannels: u64,
|
||
|
#[doc = " bitfield of NCMULTISELECTOR_OPTION_*"]
|
||
|
pub flags: u64,
|
||
|
}
|
||
|
#[test]
|
||
|
fn bindgen_test_layout_ncmultiselector_options() {
|
||
|
assert_eq!(
|
||
|
::core::mem::size_of::<ncmultiselector_options>(),
|
||
|
96usize,
|
||
|
concat!("Size of: ", stringify!(ncmultiselector_options))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
::core::mem::align_of::<ncmultiselector_options>(),
|
||
|
8usize,
|
||
|
concat!("Alignment of ", stringify!(ncmultiselector_options))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncmultiselector_options>())).title as *const _ as usize },
|
||
|
0usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncmultiselector_options),
|
||
|
"::",
|
||
|
stringify!(title)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe {
|
||
|
&(*(::core::ptr::null::<ncmultiselector_options>())).secondary as *const _ as usize
|
||
|
},
|
||
|
8usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncmultiselector_options),
|
||
|
"::",
|
||
|
stringify!(secondary)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncmultiselector_options>())).footer as *const _ as usize },
|
||
|
16usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncmultiselector_options),
|
||
|
"::",
|
||
|
stringify!(footer)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncmultiselector_options>())).items as *const _ as usize },
|
||
|
24usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncmultiselector_options),
|
||
|
"::",
|
||
|
stringify!(items)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe {
|
||
|
&(*(::core::ptr::null::<ncmultiselector_options>())).maxdisplay as *const _ as usize
|
||
|
},
|
||
|
32usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncmultiselector_options),
|
||
|
"::",
|
||
|
stringify!(maxdisplay)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe {
|
||
|
&(*(::core::ptr::null::<ncmultiselector_options>())).opchannels as *const _ as usize
|
||
|
},
|
||
|
40usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncmultiselector_options),
|
||
|
"::",
|
||
|
stringify!(opchannels)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe {
|
||
|
&(*(::core::ptr::null::<ncmultiselector_options>())).descchannels as *const _ as usize
|
||
|
},
|
||
|
48usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncmultiselector_options),
|
||
|
"::",
|
||
|
stringify!(descchannels)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe {
|
||
|
&(*(::core::ptr::null::<ncmultiselector_options>())).titlechannels as *const _ as usize
|
||
|
},
|
||
|
56usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncmultiselector_options),
|
||
|
"::",
|
||
|
stringify!(titlechannels)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe {
|
||
|
&(*(::core::ptr::null::<ncmultiselector_options>())).footchannels as *const _ as usize
|
||
|
},
|
||
|
64usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncmultiselector_options),
|
||
|
"::",
|
||
|
stringify!(footchannels)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe {
|
||
|
&(*(::core::ptr::null::<ncmultiselector_options>())).boxchannels as *const _ as usize
|
||
|
},
|
||
|
72usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncmultiselector_options),
|
||
|
"::",
|
||
|
stringify!(boxchannels)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe {
|
||
|
&(*(::core::ptr::null::<ncmultiselector_options>())).bgchannels as *const _ as usize
|
||
|
},
|
||
|
80usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncmultiselector_options),
|
||
|
"::",
|
||
|
stringify!(bgchannels)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncmultiselector_options>())).flags as *const _ as usize },
|
||
|
88usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncmultiselector_options),
|
||
|
"::",
|
||
|
stringify!(flags)
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncmultiselector_create(
|
||
|
n: *mut ncplane,
|
||
|
y: cty::c_int,
|
||
|
x: cty::c_int,
|
||
|
opts: *const ncmultiselector_options,
|
||
|
) -> *mut ncmultiselector;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return selected vector. An array of bools must be provided, along with its"]
|
||
|
#[doc = " length. If that length doesn't match the itemcount, it is an error."]
|
||
|
pub fn ncmultiselector_selected(
|
||
|
n: *mut ncmultiselector,
|
||
|
selected: *mut bool,
|
||
|
count: cty::c_uint,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return a reference to the ncmultiselector's underlying ncplane."]
|
||
|
pub fn ncmultiselector_plane(n: *mut ncmultiselector) -> *mut ncplane;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Offer the input to the ncmultiselector. If it's relevant, this function"]
|
||
|
#[doc = " returns true, and the input ought not be processed further. If it's"]
|
||
|
#[doc = " irrelevant to the multiselector, false is returned. Relevant inputs include:"]
|
||
|
#[doc = " * a mouse click on an item"]
|
||
|
#[doc = " * a mouse scrollwheel event"]
|
||
|
#[doc = " * a mouse click on the scrolling arrows"]
|
||
|
#[doc = " * up, down, pgup, or pgdown on an unrolled menu (navigates among items)"]
|
||
|
pub fn ncmultiselector_offer_input(n: *mut ncmultiselector, nc: *const ncinput) -> bool;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Destroy the ncmultiselector."]
|
||
|
pub fn ncmultiselector_destroy(n: *mut ncmultiselector);
|
||
|
}
|
||
|
#[doc = " Menus. Horizontal menu bars are supported, on the top and/or bottom rows."]
|
||
|
#[doc = " If the menu bar is longer than the screen, it will be only partially"]
|
||
|
#[doc = " visible. Menus may be either visible or invisible by default. In the event of"]
|
||
|
#[doc = " a screen resize, menus will be automatically moved/resized. Elements can be"]
|
||
|
#[doc = " dynamically enabled or disabled at all levels (menu, section, and item),"]
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct ncmenu_item {
|
||
|
#[doc = " utf-8 menu item, NULL for horizontal separator"]
|
||
|
pub desc: *mut cty::c_char,
|
||
|
#[doc = " shortcut, all should be distinct"]
|
||
|
pub shortcut: ncinput,
|
||
|
}
|
||
|
#[test]
|
||
|
fn bindgen_test_layout_ncmenu_item() {
|
||
|
assert_eq!(
|
||
|
::core::mem::size_of::<ncmenu_item>(),
|
||
|
32usize,
|
||
|
concat!("Size of: ", stringify!(ncmenu_item))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
::core::mem::align_of::<ncmenu_item>(),
|
||
|
8usize,
|
||
|
concat!("Alignment of ", stringify!(ncmenu_item))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncmenu_item>())).desc as *const _ as usize },
|
||
|
0usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncmenu_item),
|
||
|
"::",
|
||
|
stringify!(desc)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncmenu_item>())).shortcut as *const _ as usize },
|
||
|
8usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncmenu_item),
|
||
|
"::",
|
||
|
stringify!(shortcut)
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct ncmenu_section {
|
||
|
#[doc = " utf-8 c string"]
|
||
|
pub name: *mut cty::c_char,
|
||
|
pub itemcount: cty::c_int,
|
||
|
pub items: *mut ncmenu_item,
|
||
|
#[doc = " shortcut, will be underlined if present in name"]
|
||
|
pub shortcut: ncinput,
|
||
|
}
|
||
|
#[test]
|
||
|
fn bindgen_test_layout_ncmenu_section() {
|
||
|
assert_eq!(
|
||
|
::core::mem::size_of::<ncmenu_section>(),
|
||
|
48usize,
|
||
|
concat!("Size of: ", stringify!(ncmenu_section))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
::core::mem::align_of::<ncmenu_section>(),
|
||
|
8usize,
|
||
|
concat!("Alignment of ", stringify!(ncmenu_section))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncmenu_section>())).name as *const _ as usize },
|
||
|
0usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncmenu_section),
|
||
|
"::",
|
||
|
stringify!(name)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncmenu_section>())).itemcount as *const _ as usize },
|
||
|
8usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncmenu_section),
|
||
|
"::",
|
||
|
stringify!(itemcount)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncmenu_section>())).items as *const _ as usize },
|
||
|
16usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncmenu_section),
|
||
|
"::",
|
||
|
stringify!(items)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncmenu_section>())).shortcut as *const _ as usize },
|
||
|
24usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncmenu_section),
|
||
|
"::",
|
||
|
stringify!(shortcut)
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct ncmenu_options {
|
||
|
#[doc = " array of 'sectioncount' menu_sections"]
|
||
|
pub sections: *mut ncmenu_section,
|
||
|
#[doc = " must be positive"]
|
||
|
pub sectioncount: cty::c_int,
|
||
|
#[doc = " styling for header"]
|
||
|
pub headerchannels: u64,
|
||
|
#[doc = " styling for sections"]
|
||
|
pub sectionchannels: u64,
|
||
|
#[doc = " flag word of NCMENU_OPTION_*"]
|
||
|
pub flags: u64,
|
||
|
}
|
||
|
#[test]
|
||
|
fn bindgen_test_layout_ncmenu_options() {
|
||
|
assert_eq!(
|
||
|
::core::mem::size_of::<ncmenu_options>(),
|
||
|
40usize,
|
||
|
concat!("Size of: ", stringify!(ncmenu_options))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
::core::mem::align_of::<ncmenu_options>(),
|
||
|
8usize,
|
||
|
concat!("Alignment of ", stringify!(ncmenu_options))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncmenu_options>())).sections as *const _ as usize },
|
||
|
0usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncmenu_options),
|
||
|
"::",
|
||
|
stringify!(sections)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncmenu_options>())).sectioncount as *const _ as usize },
|
||
|
8usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncmenu_options),
|
||
|
"::",
|
||
|
stringify!(sectioncount)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncmenu_options>())).headerchannels as *const _ as usize },
|
||
|
16usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncmenu_options),
|
||
|
"::",
|
||
|
stringify!(headerchannels)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncmenu_options>())).sectionchannels as *const _ as usize },
|
||
|
24usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncmenu_options),
|
||
|
"::",
|
||
|
stringify!(sectionchannels)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncmenu_options>())).flags as *const _ as usize },
|
||
|
32usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncmenu_options),
|
||
|
"::",
|
||
|
stringify!(flags)
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct ncmenu {
|
||
|
_unused: [u8; 0],
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Create a menu with the specified options. Menus are currently bound to an"]
|
||
|
#[doc = " overall notcurses object (as opposed to a particular plane), and are"]
|
||
|
#[doc = " implemented as ncplanes kept atop other ncplanes."]
|
||
|
pub fn ncmenu_create(nc: *mut ncplane, opts: *const ncmenu_options) -> *mut ncmenu;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Unroll the specified menu section, making the menu visible if it was"]
|
||
|
#[doc = " invisible, and rolling up any menu section that is already unrolled."]
|
||
|
pub fn ncmenu_unroll(n: *mut ncmenu, sectionidx: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Roll up any unrolled menu section, and hide the menu if using hiding."]
|
||
|
pub fn ncmenu_rollup(n: *mut ncmenu) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Unroll the previous/next section (relative to current unrolled). If no"]
|
||
|
#[doc = " section is unrolled, the first section will be unrolled."]
|
||
|
pub fn ncmenu_nextsection(n: *mut ncmenu) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncmenu_prevsection(n: *mut ncmenu) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Move to the previous/next item within the currently unrolled section. If no"]
|
||
|
#[doc = " section is unrolled, the first section will be unrolled."]
|
||
|
pub fn ncmenu_nextitem(n: *mut ncmenu) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncmenu_previtem(n: *mut ncmenu) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the selected item description, or NULL if no section is unrolled. If"]
|
||
|
#[doc = " 'ni' is not NULL, and the selected item has a shortcut, 'ni' will be filled"]
|
||
|
#[doc = " in with that shortcut--this can allow faster matching."]
|
||
|
pub fn ncmenu_selected(n: *const ncmenu, ni: *mut ncinput) -> *const cty::c_char;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the item description corresponding to the mouse click 'click'. The"]
|
||
|
#[doc = " item must be on an actively unrolled section, and the click must be in the"]
|
||
|
#[doc = " area of a valid item. If 'ni' is not NULL, and the selected item has a"]
|
||
|
#[doc = " shortcut, 'ni' will be filled in with the shortcut."]
|
||
|
pub fn ncmenu_mouse_selected(
|
||
|
n: *const ncmenu,
|
||
|
click: *const ncinput,
|
||
|
ni: *mut ncinput,
|
||
|
) -> *const cty::c_char;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return the ncplane backing this ncmenu."]
|
||
|
pub fn ncmenu_plane(n: *mut ncmenu) -> *mut ncplane;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Offer the input to the ncmenu. If it's relevant, this function returns true,"]
|
||
|
#[doc = " and the input ought not be processed further. If it's irrelevant to the"]
|
||
|
#[doc = " menu, false is returned. Relevant inputs include:"]
|
||
|
#[doc = " * mouse movement over a hidden menu"]
|
||
|
#[doc = " * a mouse click on a menu section (the section is unrolled)"]
|
||
|
#[doc = " * a mouse click outside of an unrolled menu (the menu is rolled up)"]
|
||
|
#[doc = " * left or right on an unrolled menu (navigates among sections)"]
|
||
|
#[doc = " * up or down on an unrolled menu (navigates among items)"]
|
||
|
#[doc = " * escape on an unrolled menu (the menu is rolled up)"]
|
||
|
pub fn ncmenu_offer_input(n: *mut ncmenu, nc: *const ncinput) -> bool;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Destroy a menu created with ncmenu_create()."]
|
||
|
pub fn ncmenu_destroy(n: *mut ncmenu) -> cty::c_int;
|
||
|
}
|
||
|
#[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."]
|
||
|
pub maxchannel: u64,
|
||
|
pub minchannel: u64,
|
||
|
#[doc = " styling used for the legend, if NCPLOT_OPTION_LABELTICKSD is set"]
|
||
|
pub legendstyle: u16,
|
||
|
#[doc = " number of \"pixels\" per row x column"]
|
||
|
pub gridtype: ncblitter_e,
|
||
|
#[doc = " independent variable can either be a contiguous range, or a finite set"]
|
||
|
#[doc = " of keys. for a time range, say the previous hour sampled with second"]
|
||
|
#[doc = " resolution, the independent variable would be the range [0..3600): 3600."]
|
||
|
#[doc = " if rangex is 0, it is dynamically set to the number of columns."]
|
||
|
pub rangex: cty::c_int,
|
||
|
#[doc = " bitfield over NCPLOT_OPTION_*"]
|
||
|
pub flags: u64,
|
||
|
}
|
||
|
#[test]
|
||
|
fn bindgen_test_layout_ncplot_options() {
|
||
|
assert_eq!(
|
||
|
::core::mem::size_of::<ncplot_options>(),
|
||
|
40usize,
|
||
|
concat!("Size of: ", stringify!(ncplot_options))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
::core::mem::align_of::<ncplot_options>(),
|
||
|
8usize,
|
||
|
concat!("Alignment of ", stringify!(ncplot_options))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncplot_options>())).maxchannel as *const _ as usize },
|
||
|
0usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncplot_options),
|
||
|
"::",
|
||
|
stringify!(maxchannel)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncplot_options>())).minchannel as *const _ as usize },
|
||
|
8usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncplot_options),
|
||
|
"::",
|
||
|
stringify!(minchannel)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncplot_options>())).legendstyle as *const _ as usize },
|
||
|
16usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncplot_options),
|
||
|
"::",
|
||
|
stringify!(legendstyle)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncplot_options>())).gridtype as *const _ as usize },
|
||
|
20usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncplot_options),
|
||
|
"::",
|
||
|
stringify!(gridtype)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncplot_options>())).rangex as *const _ as usize },
|
||
|
24usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncplot_options),
|
||
|
"::",
|
||
|
stringify!(rangex)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncplot_options>())).flags as *const _ as usize },
|
||
|
32usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncplot_options),
|
||
|
"::",
|
||
|
stringify!(flags)
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
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."]
|
||
|
pub fn ncuplot_create(
|
||
|
n: *mut ncplane,
|
||
|
opts: *const ncplot_options,
|
||
|
miny: u64,
|
||
|
maxy: u64,
|
||
|
) -> *mut ncuplot;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncdplot_create(
|
||
|
n: *mut ncplane,
|
||
|
opts: *const ncplot_options,
|
||
|
miny: f64,
|
||
|
maxy: f64,
|
||
|
) -> *mut ncdplot;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Return a reference to the ncplot's underlying ncplane."]
|
||
|
pub fn ncuplot_plane(n: *mut ncuplot) -> *mut ncplane;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncdplot_plane(n: *mut ncdplot) -> *mut ncplane;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Add to or set the value corresponding to this x. If x is beyond the current"]
|
||
|
#[doc = " x window, the x window is advanced to include x, and values passing beyond"]
|
||
|
#[doc = " the window are lost. The first call will place the initial window. The plot"]
|
||
|
#[doc = " will be redrawn, but notcurses_render() is not called."]
|
||
|
pub fn ncuplot_add_sample(n: *mut ncuplot, x: u64, y: u64) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncdplot_add_sample(n: *mut ncdplot, x: u64, y: f64) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncuplot_set_sample(n: *mut ncuplot, x: u64, y: u64) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncdplot_set_sample(n: *mut ncdplot, x: u64, y: f64) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncuplot_sample(n: *const ncuplot, x: u64, y: *mut u64) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncdplot_sample(n: *const ncdplot, x: u64, y: *mut f64) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncuplot_destroy(n: *mut ncuplot);
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncdplot_destroy(n: *mut ncdplot);
|
||
|
}
|
||
|
pub type ncfdplane_callback = ::core::option::Option<
|
||
|
unsafe extern "C" fn(
|
||
|
n: *mut ncfdplane,
|
||
|
buf: *const cty::c_void,
|
||
|
s: size_t,
|
||
|
curry: *mut cty::c_void,
|
||
|
) -> cty::c_int,
|
||
|
>;
|
||
|
pub type ncfdplane_done_cb = ::core::option::Option<
|
||
|
unsafe extern "C" fn(
|
||
|
n: *mut ncfdplane,
|
||
|
fderrno: cty::c_int,
|
||
|
curry: *mut cty::c_void,
|
||
|
) -> cty::c_int,
|
||
|
>;
|
||
|
#[doc = " read from an fd until EOF (or beyond, if follow is set), invoking the user's"]
|
||
|
#[doc = " callback each time. runs in its own context. on EOF or error, the finalizer"]
|
||
|
#[doc = " callback will be invoked, and the user ought destroy the ncfdplane. the"]
|
||
|
#[doc = " data is *not* guaranteed to be nul-terminated, and may contain arbitrary"]
|
||
|
#[doc = " zeroes."]
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct ncfdplane_options {
|
||
|
#[doc = " parameter provided to callbacks"]
|
||
|
pub curry: *mut cty::c_void,
|
||
|
#[doc = " keep reading after hitting end? (think tail -f)"]
|
||
|
pub follow: bool,
|
||
|
#[doc = " bitfield over NCOPTION_FDPLANE_*"]
|
||
|
pub flags: u64,
|
||
|
}
|
||
|
#[test]
|
||
|
fn bindgen_test_layout_ncfdplane_options() {
|
||
|
assert_eq!(
|
||
|
::core::mem::size_of::<ncfdplane_options>(),
|
||
|
24usize,
|
||
|
concat!("Size of: ", stringify!(ncfdplane_options))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
::core::mem::align_of::<ncfdplane_options>(),
|
||
|
8usize,
|
||
|
concat!("Alignment of ", stringify!(ncfdplane_options))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncfdplane_options>())).curry as *const _ as usize },
|
||
|
0usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncfdplane_options),
|
||
|
"::",
|
||
|
stringify!(curry)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncfdplane_options>())).follow as *const _ as usize },
|
||
|
8usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncfdplane_options),
|
||
|
"::",
|
||
|
stringify!(follow)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncfdplane_options>())).flags as *const _ as usize },
|
||
|
16usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncfdplane_options),
|
||
|
"::",
|
||
|
stringify!(flags)
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Create an ncfdplane around the fd 'fd'. Consider this function to take"]
|
||
|
#[doc = " ownership of the file descriptor, which will be closed in ncfdplane_destroy()."]
|
||
|
pub fn ncfdplane_create(
|
||
|
n: *mut ncplane,
|
||
|
opts: *const ncfdplane_options,
|
||
|
fd: cty::c_int,
|
||
|
cbfxn: ncfdplane_callback,
|
||
|
donecbfxn: ncfdplane_done_cb,
|
||
|
) -> *mut ncfdplane;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncfdplane_plane(n: *mut ncfdplane) -> *mut ncplane;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncfdplane_destroy(n: *mut ncfdplane) -> cty::c_int;
|
||
|
}
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct ncsubproc_options {
|
||
|
pub curry: *mut cty::c_void,
|
||
|
#[doc = " restart this many seconds after an exit (watch)"]
|
||
|
pub restart_period: u64,
|
||
|
#[doc = " bitfield over NCOPTION_SUBPROC_*"]
|
||
|
pub flags: u64,
|
||
|
}
|
||
|
#[test]
|
||
|
fn bindgen_test_layout_ncsubproc_options() {
|
||
|
assert_eq!(
|
||
|
::core::mem::size_of::<ncsubproc_options>(),
|
||
|
24usize,
|
||
|
concat!("Size of: ", stringify!(ncsubproc_options))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
::core::mem::align_of::<ncsubproc_options>(),
|
||
|
8usize,
|
||
|
concat!("Alignment of ", stringify!(ncsubproc_options))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncsubproc_options>())).curry as *const _ as usize },
|
||
|
0usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncsubproc_options),
|
||
|
"::",
|
||
|
stringify!(curry)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe {
|
||
|
&(*(::core::ptr::null::<ncsubproc_options>())).restart_period as *const _ as usize
|
||
|
},
|
||
|
8usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncsubproc_options),
|
||
|
"::",
|
||
|
stringify!(restart_period)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncsubproc_options>())).flags as *const _ as usize },
|
||
|
16usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncsubproc_options),
|
||
|
"::",
|
||
|
stringify!(flags)
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " see exec(2). p-types use $PATH. e-type passes environment vars."]
|
||
|
pub fn ncsubproc_createv(
|
||
|
n: *mut ncplane,
|
||
|
opts: *const ncsubproc_options,
|
||
|
bin: *const cty::c_char,
|
||
|
arg: *const *mut cty::c_char,
|
||
|
cbfxn: ncfdplane_callback,
|
||
|
donecbfxn: ncfdplane_done_cb,
|
||
|
) -> *mut ncsubproc;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncsubproc_createvp(
|
||
|
n: *mut ncplane,
|
||
|
opts: *const ncsubproc_options,
|
||
|
bin: *const cty::c_char,
|
||
|
arg: *const *mut cty::c_char,
|
||
|
cbfxn: ncfdplane_callback,
|
||
|
donecbfxn: ncfdplane_done_cb,
|
||
|
) -> *mut ncsubproc;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncsubproc_createvpe(
|
||
|
n: *mut ncplane,
|
||
|
opts: *const ncsubproc_options,
|
||
|
bin: *const cty::c_char,
|
||
|
arg: *const *mut cty::c_char,
|
||
|
env: *const *mut cty::c_char,
|
||
|
cbfxn: ncfdplane_callback,
|
||
|
donecbfxn: ncfdplane_done_cb,
|
||
|
) -> *mut ncsubproc;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncsubproc_plane(n: *mut ncsubproc) -> *mut ncplane;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncsubproc_destroy(n: *mut ncsubproc) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Draw a QR code at the current position on the plane. If there is insufficient"]
|
||
|
#[doc = " room to draw the code here, or there is any other error, non-zero will be"]
|
||
|
#[doc = " returned. Otherwise, the QR code \"version\" (size) is returned. The QR code"]
|
||
|
#[doc = " is (version * 4 + 17) columns wide, and ⌈version * 4 + 17⌉ rows tall (the"]
|
||
|
#[doc = " properly-scaled values are written back to '*ymax' and '*xmax')."]
|
||
|
pub fn ncplane_qrcode(
|
||
|
n: *mut ncplane,
|
||
|
blitter: ncblitter_e,
|
||
|
ymax: *mut cty::c_int,
|
||
|
xmax: *mut cty::c_int,
|
||
|
data: *const cty::c_void,
|
||
|
len: size_t,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct ncreader_options {
|
||
|
#[doc = " channels used for input"]
|
||
|
pub tchannels: u64,
|
||
|
#[doc = " channels used for empty space"]
|
||
|
pub echannels: u64,
|
||
|
#[doc = " attributes used for input"]
|
||
|
pub tattrword: u32,
|
||
|
#[doc = " attributes used for empty space"]
|
||
|
pub eattrword: u32,
|
||
|
#[doc = " egc used for empty space"]
|
||
|
pub egc: *const cty::c_char,
|
||
|
pub physrows: cty::c_int,
|
||
|
pub physcols: cty::c_int,
|
||
|
#[doc = " bitfield of NCREADER_OPTION_*"]
|
||
|
pub flags: u64,
|
||
|
}
|
||
|
#[test]
|
||
|
fn bindgen_test_layout_ncreader_options() {
|
||
|
assert_eq!(
|
||
|
::core::mem::size_of::<ncreader_options>(),
|
||
|
48usize,
|
||
|
concat!("Size of: ", stringify!(ncreader_options))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
::core::mem::align_of::<ncreader_options>(),
|
||
|
8usize,
|
||
|
concat!("Alignment of ", stringify!(ncreader_options))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncreader_options>())).tchannels as *const _ as usize },
|
||
|
0usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncreader_options),
|
||
|
"::",
|
||
|
stringify!(tchannels)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncreader_options>())).echannels as *const _ as usize },
|
||
|
8usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncreader_options),
|
||
|
"::",
|
||
|
stringify!(echannels)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncreader_options>())).tattrword as *const _ as usize },
|
||
|
16usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncreader_options),
|
||
|
"::",
|
||
|
stringify!(tattrword)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncreader_options>())).eattrword as *const _ as usize },
|
||
|
20usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncreader_options),
|
||
|
"::",
|
||
|
stringify!(eattrword)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncreader_options>())).egc as *const _ as usize },
|
||
|
24usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncreader_options),
|
||
|
"::",
|
||
|
stringify!(egc)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncreader_options>())).physrows as *const _ as usize },
|
||
|
32usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncreader_options),
|
||
|
"::",
|
||
|
stringify!(physrows)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncreader_options>())).physcols as *const _ as usize },
|
||
|
36usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncreader_options),
|
||
|
"::",
|
||
|
stringify!(physcols)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<ncreader_options>())).flags as *const _ as usize },
|
||
|
40usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(ncreader_options),
|
||
|
"::",
|
||
|
stringify!(flags)
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " ncreaders provide freeform input in a (possibly multiline) region,"]
|
||
|
#[doc = " supporting readline keybindings. 'rows' and 'cols' both must be negative."]
|
||
|
#[doc = " there are no restrictions on 'y' or 'x'. creates its own plane."]
|
||
|
pub fn ncreader_create(
|
||
|
nc: *mut ncplane,
|
||
|
y: cty::c_int,
|
||
|
x: cty::c_int,
|
||
|
opts: *const ncreader_options,
|
||
|
) -> *mut ncreader;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " empty the ncreader of any user input, and home the cursor."]
|
||
|
pub fn ncreader_clear(n: *mut ncreader) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncreader_plane(n: *mut ncreader) -> *mut ncplane;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Offer the input to the ncreader. If it's relevant, this function returns"]
|
||
|
#[doc = " true, and the input ought not be processed further. Almost all inputs"]
|
||
|
#[doc = " are relevant to an ncreader, save synthesized ones."]
|
||
|
pub fn ncreader_offer_input(n: *mut ncreader, ni: *const ncinput) -> bool;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " return a heap-allocated copy of the current (UTF-8) contents."]
|
||
|
pub fn ncreader_contents(n: *const ncreader) -> *mut cty::c_char;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " destroy the reader and its bound plane. if 'contents' is not NULL, the"]
|
||
|
#[doc = " UTF-8 input will be heap-duplicated and written to 'contents'."]
|
||
|
pub fn ncreader_destroy(n: *mut ncreader, contents: *mut *mut cty::c_char);
|
||
|
}
|
||
|
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."]
|
||
|
pub fn notcurses_debug(nc: *mut notcurses, debugfp: *mut FILE);
|
||
|
}
|
||
|
#[doc = " a system for rendering RGBA pixels as text glyphs"]
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
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 = " 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."]
|
||
|
pub egcs: *const wchar_t,
|
||
|
pub blit: ::core::option::Option<
|
||
|
unsafe extern "C" fn(
|
||
|
nc: *mut ncplane,
|
||
|
placey: cty::c_int,
|
||
|
placex: cty::c_int,
|
||
|
linesize: cty::c_int,
|
||
|
data: *const cty::c_void,
|
||
|
begy: cty::c_int,
|
||
|
begx: cty::c_int,
|
||
|
leny: cty::c_int,
|
||
|
lenx: cty::c_int,
|
||
|
bgr: bool,
|
||
|
blendcolors: bool,
|
||
|
) -> cty::c_int,
|
||
|
>,
|
||
|
pub name: *const cty::c_char,
|
||
|
pub fill: bool,
|
||
|
}
|
||
|
#[test]
|
||
|
fn bindgen_test_layout_blitset() {
|
||
|
assert_eq!(
|
||
|
::core::mem::size_of::<blitset>(),
|
||
|
48usize,
|
||
|
concat!("Size of: ", stringify!(blitset))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
::core::mem::align_of::<blitset>(),
|
||
|
8usize,
|
||
|
concat!("Alignment of ", stringify!(blitset))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<blitset>())).geom as *const _ as usize },
|
||
|
0usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(blitset),
|
||
|
"::",
|
||
|
stringify!(geom)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<blitset>())).width as *const _ as usize },
|
||
|
4usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(blitset),
|
||
|
"::",
|
||
|
stringify!(width)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<blitset>())).height as *const _ as usize },
|
||
|
8usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(blitset),
|
||
|
"::",
|
||
|
stringify!(height)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<blitset>())).egcs as *const _ as usize },
|
||
|
16usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(blitset),
|
||
|
"::",
|
||
|
stringify!(egcs)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<blitset>())).blit as *const _ as usize },
|
||
|
24usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(blitset),
|
||
|
"::",
|
||
|
stringify!(blit)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<blitset>())).name as *const _ as usize },
|
||
|
32usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(blitset),
|
||
|
"::",
|
||
|
stringify!(name)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<blitset>())).fill as *const _ as usize },
|
||
|
40usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(blitset),
|
||
|
"::",
|
||
|
stringify!(fill)
|
||
|
)
|
||
|
);
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub static mut notcurses_blitters: [blitset; 0usize];
|
||
|
}
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
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 = " 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. Returns NULL on error,"]
|
||
|
#[doc = " including any failure initializing terminfo."]
|
||
|
pub fn ncdirect_init(termtype: *const cty::c_char, fp: *mut FILE) -> *mut ncdirect;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Direct mode. This API can be used to colorize and stylize output generated"]
|
||
|
#[doc = " outside of notcurses, without ever calling notcurses_render(). These should"]
|
||
|
#[doc = " not be intermixed with standard notcurses rendering."]
|
||
|
pub fn ncdirect_fg(nc: *mut ncdirect, rgb: cty::c_uint) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncdirect_bg(nc: *mut ncdirect, rgb: cty::c_uint) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncdirect_fg_palindex(nc: *mut ncdirect, pidx: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncdirect_bg_palindex(nc: *mut ncdirect, pidx: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Returns the number of simultaneous colors claimed to be supported, or 1 if"]
|
||
|
#[doc = " there is no color support. Note that several terminal emulators advertise"]
|
||
|
#[doc = " more colors than they actually support, downsampling internally."]
|
||
|
pub fn ncdirect_palette_size(nc: *const ncdirect) -> cty::c_uint;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Output the string |utf8| according to the channels |channels|. Note that"]
|
||
|
#[doc = " ncdirect_putstr() does not explicitly flush output buffers, so it will not"]
|
||
|
#[doc = " necessarily be immediately visible."]
|
||
|
pub fn ncdirect_putstr(
|
||
|
nc: *mut ncdirect,
|
||
|
channels: u64,
|
||
|
utf8: *const cty::c_char,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Force a flush. Returns 0 on success, -1 on failure."]
|
||
|
pub fn ncdirect_flush(nc: *mut ncdirect) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncdirect_fg_default(nc: *mut ncdirect) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncdirect_bg_default(nc: *mut ncdirect) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Get the current number of columns/rows."]
|
||
|
pub fn ncdirect_dim_x(nc: *const ncdirect) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncdirect_dim_y(nc: *const ncdirect) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " ncplane_styles_*() analogues"]
|
||
|
pub fn ncdirect_styles_set(n: *mut ncdirect, stylebits: cty::c_uint) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncdirect_styles_on(n: *mut ncdirect, stylebits: cty::c_uint) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncdirect_styles_off(n: *mut ncdirect, stylebits: cty::c_uint) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Move the cursor in direct mode. -1 to retain current location on that axis."]
|
||
|
pub fn ncdirect_cursor_move_yx(n: *mut ncdirect, y: cty::c_int, x: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncdirect_cursor_enable(nc: *mut ncdirect) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncdirect_cursor_disable(nc: *mut ncdirect) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncdirect_cursor_up(nc: *mut ncdirect, num: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncdirect_cursor_left(nc: *mut ncdirect, num: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncdirect_cursor_right(nc: *mut ncdirect, num: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncdirect_cursor_down(nc: *mut ncdirect, num: cty::c_int) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Get the cursor position, when supported. This requires writing to the"]
|
||
|
#[doc = " terminal, and then reading from it. If the terminal doesn't reply, or"]
|
||
|
#[doc = " doesn't reply in a way we understand, the results might be deleterious."]
|
||
|
pub fn ncdirect_cursor_yx(
|
||
|
n: *mut ncdirect,
|
||
|
y: *mut cty::c_int,
|
||
|
x: *mut cty::c_int,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Push or pop the cursor location to the terminal's stack. The depth of this"]
|
||
|
#[doc = " stack, and indeed its existence, is terminal-dependent."]
|
||
|
pub fn ncdirect_cursor_push(n: *mut ncdirect) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncdirect_cursor_pop(n: *mut ncdirect) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Formatted printing (plus alignment relative to the terminal)."]
|
||
|
pub fn ncdirect_printf_aligned(
|
||
|
n: *mut ncdirect,
|
||
|
y: cty::c_int,
|
||
|
align: ncalign_e,
|
||
|
fmt: *const cty::c_char,
|
||
|
...
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
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."]
|
||
|
pub fn ncdirect_render_image(
|
||
|
n: *mut ncdirect,
|
||
|
filename: *const cty::c_char,
|
||
|
align: ncalign_e,
|
||
|
blitter: ncblitter_e,
|
||
|
scale: ncscale_e,
|
||
|
) -> nc_err_e;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Clear the screen."]
|
||
|
pub fn ncdirect_clear(nc: *mut ncdirect) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Can we load images? This requires being built against FFmpeg/OIIO."]
|
||
|
pub fn ncdirect_canopen_images(n: *const ncdirect) -> bool;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Is our encoding UTF-8? Requires LANG being set to a UTF8 locale."]
|
||
|
pub fn ncdirect_canutf8(n: *const ncdirect) -> bool;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Draw horizontal/vertical lines using the specified channels, interpolating"]
|
||
|
#[doc = " between them as we go. The EGC may not use more than one column. For a"]
|
||
|
#[doc = " horizontal line, |len| cannot exceed the screen width minus the cursor's"]
|
||
|
#[doc = " offset. For a vertical line, it may be as long as you'd like; the screen"]
|
||
|
#[doc = " will scroll as necessary. All lines start at the current cursor position."]
|
||
|
pub fn ncdirect_hline_interp(
|
||
|
n: *mut ncdirect,
|
||
|
egc: *const cty::c_char,
|
||
|
len: cty::c_int,
|
||
|
h1: u64,
|
||
|
h2: u64,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
pub fn ncdirect_vline_interp(
|
||
|
n: *mut ncdirect,
|
||
|
egc: *const cty::c_char,
|
||
|
len: cty::c_int,
|
||
|
h1: u64,
|
||
|
h2: u64,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " Draw a box with its upper-left corner at the current cursor position, having"]
|
||
|
#[doc = " dimensions |ylen|x|xlen|. See ncplane_box() for more information. The"]
|
||
|
#[doc = " minimum box size is 2x2, and it cannot be drawn off-screen. |wchars| is an"]
|
||
|
#[doc = " array of 6 wide characters: UL, UR, LL, LR, HL, VL."]
|
||
|
pub fn ncdirect_box(
|
||
|
n: *mut ncdirect,
|
||
|
ul: u64,
|
||
|
ur: u64,
|
||
|
ll: u64,
|
||
|
lr: u64,
|
||
|
wchars: *const wchar_t,
|
||
|
ylen: cty::c_int,
|
||
|
xlen: cty::c_int,
|
||
|
ctlword: cty::c_uint,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " ncdirect_box() with the rounded box-drawing characters"]
|
||
|
pub fn ncdirect_rounded_box(
|
||
|
n: *mut ncdirect,
|
||
|
ul: u64,
|
||
|
ur: u64,
|
||
|
ll: u64,
|
||
|
lr: u64,
|
||
|
ylen: cty::c_int,
|
||
|
xlen: cty::c_int,
|
||
|
ctlword: cty::c_uint,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
extern "C" {
|
||
|
#[doc = " ncdirect_box() with the double box-drawing characters"]
|
||
|
pub fn ncdirect_double_box(
|
||
|
n: *mut ncdirect,
|
||
|
ul: u64,
|
||
|
ur: u64,
|
||
|
ll: u64,
|
||
|
lr: u64,
|
||
|
ylen: cty::c_int,
|
||
|
xlen: cty::c_int,
|
||
|
ctlword: cty::c_uint,
|
||
|
) -> cty::c_int;
|
||
|
}
|
||
|
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;
|
||
|
}
|
||
|
pub type __builtin_va_list = [__va_list_tag; 1usize];
|
||
|
#[repr(C)]
|
||
|
#[derive(Debug, Copy, Clone)]
|
||
|
pub struct __va_list_tag {
|
||
|
pub gp_offset: cty::c_uint,
|
||
|
pub fp_offset: cty::c_uint,
|
||
|
pub overflow_arg_area: *mut cty::c_void,
|
||
|
pub reg_save_area: *mut cty::c_void,
|
||
|
}
|
||
|
#[test]
|
||
|
fn bindgen_test_layout___va_list_tag() {
|
||
|
assert_eq!(
|
||
|
::core::mem::size_of::<__va_list_tag>(),
|
||
|
24usize,
|
||
|
concat!("Size of: ", stringify!(__va_list_tag))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
::core::mem::align_of::<__va_list_tag>(),
|
||
|
8usize,
|
||
|
concat!("Alignment of ", stringify!(__va_list_tag))
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<__va_list_tag>())).gp_offset as *const _ as usize },
|
||
|
0usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(__va_list_tag),
|
||
|
"::",
|
||
|
stringify!(gp_offset)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<__va_list_tag>())).fp_offset as *const _ as usize },
|
||
|
4usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(__va_list_tag),
|
||
|
"::",
|
||
|
stringify!(fp_offset)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe {
|
||
|
&(*(::core::ptr::null::<__va_list_tag>())).overflow_arg_area as *const _ as usize
|
||
|
},
|
||
|
8usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(__va_list_tag),
|
||
|
"::",
|
||
|
stringify!(overflow_arg_area)
|
||
|
)
|
||
|
);
|
||
|
assert_eq!(
|
||
|
unsafe { &(*(::core::ptr::null::<__va_list_tag>())).reg_save_area as *const _ as usize },
|
||
|
16usize,
|
||
|
concat!(
|
||
|
"Offset of field: ",
|
||
|
stringify!(__va_list_tag),
|
||
|
"::",
|
||
|
stringify!(reg_save_area)
|
||
|
)
|
||
|
);
|
||
|
}
|