#[repr(C)]
pub struct ncinput { pub id: u32, pub y: c_int, pub x: c_int, pub utf8: [c_char; 5], pub alt: bool, pub shift: bool, pub ctrl: bool, pub evtype: ncintype_e, pub modifiers: c_uint, pub ypx: c_int, pub xpx: c_int, }
Expand description

An input event. Cell coordinates are currently defined only for mouse events. It is not guaranteed that we can set the modifiers for a given ncinput. We encompass single Unicode codepoints, not complete EGCs. FIXME for abi4, combine the bools into |modifiers|

Fields

id: u32

Unicode codepoint or synthesized NCKEY event

y: c_int

y/x cell coordinate of event, -1 for undefined

x: c_int

y/x cell coordinate of event, -1 for undefined

utf8: [c_char; 5]

utf8 representation, if one exists

alt: bool

was alt held?

shift: bool

was shift held?

ctrl: bool

was ctrl held?

evtype: ncintype_e

END DEPRECATION

modifiers: c_uint

bitmask over NCKEY_MOD_*

ypx: c_int

pixel offsets within cell, -1 for undefined

xpx: c_int

pixel offsets within cell, -1 for undefined

Implementations

New empty NcInput.

New NcInput.

New NcInput with alt key.

New NcInput with shift key.

New NcInput with ctrl key.

New NcInput, expecting all the arguments (except utf8).

Returns the char from the utf8 representation of the input.

Returns true if there are no modifiers present.

C style function: ncinput_nomod_p().

Returns true if the Shift modifier is present.

C style function: ncinput_shift_p().

Returns true if the Alt modifier is present.

C style function: ncinput_alt_p().

Returns true if the Ctrl modifier is present.

C style function: ncinput_ctrl_p().

Returns true if the Meta modifier is present.

C style function: ncinput_meta_p().

Returns true if the Super modifier is present.

C style function: ncinput_super_p().

Returns true if the Hyper modifier is present.

C style function: ncinput_hyper_p().

Returns true if the CapsLock modifier is present.

C style function: ncinput_capslock_p().

Returns true if the NumLock modifier is present.

C style function: ncinput_numlock_p().

Returns true if both NcInputs are equal.

C style function: ncinput_equal_p().

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Converts to this type from the input type.

Converts to this type from the input type.

Converts to this type from the input type.

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.