Trait libnotcurses_sys::NcChannelsMethods[][src]

pub trait NcChannelsMethods {
Show methods fn new() -> Self;
fn with_default() -> Self;
fn from_rgb(fg_rgb: NcRgb, bg_rgb: NcRgb) -> Self;
fn from_rgb_both(rgb: NcRgb) -> Self;
fn from_rgb_alpha(
        fg_rgb: NcRgb,
        fg_alpha: NcAlphaBits,
        bg_rgb: NcRgb,
        bg_alpha: NcAlphaBits
    ) -> Self;
fn from_rgb_alpha_both(rgb: NcRgb, alpha: NcAlphaBits) -> Self;
fn from_rgb8(
        fg_r: NcComponent,
        fg_g: NcComponent,
        fg_b: NcComponent,
        bg_r: NcComponent,
        bg_g: NcComponent,
        bg_b: NcComponent
    ) -> Self;
fn from_rgb8_both(r: NcComponent, g: NcComponent, b: NcComponent) -> Self;
fn from_rgb8_alpha(
        fg_r: NcComponent,
        fg_g: NcComponent,
        fg_b: NcComponent,
        fg_alpha: NcAlphaBits,
        bg_r: NcComponent,
        bg_g: NcComponent,
        bg_b: NcComponent,
        bg_alpha: NcAlphaBits
    ) -> Self;
fn from_rgb8_alpha_both(
        r: NcComponent,
        g: NcComponent,
        b: NcComponent,
        alpha: NcAlphaBits
    ) -> Self;
fn combine(fchannel: NcChannel, bchannel: NcChannel) -> Self;
fn fchannel(&self) -> NcChannel;
fn bchannel(&self) -> NcChannel;
fn set_fchannel(&mut self, fchannel: NcChannel) -> Self;
fn set_bchannel(&mut self, bchannel: NcChannel) -> Self;
fn fg_alpha(&self) -> NcAlphaBits;
fn bg_alpha(&self) -> NcAlphaBits;
fn set_fg_alpha(&mut self, alpha: NcAlphaBits);
fn set_bg_alpha(&mut self, alpha: NcAlphaBits);
fn fg_rgb(&self) -> NcRgb;
fn bg_rgb(&self) -> NcRgb;
fn set_fg_rgb(&mut self, alpha: NcAlphaBits) -> Self;
fn set_bg_rgb(&mut self, alpha: NcAlphaBits) -> Self;
fn fg_rgb8(&self) -> (NcComponent, NcComponent, NcComponent);
fn bg_rgb8(&self) -> (NcComponent, NcComponent, NcComponent);
fn set_fg_rgb8(
        &mut self,
        r: NcComponent,
        g: NcComponent,
        b: NcComponent
    ) -> Self;
fn set_bg_rgb8(
        &mut self,
        r: NcComponent,
        g: NcComponent,
        b: NcComponent
    ) -> Self;
fn fg_r(&self) -> NcComponent;
fn fg_g(&self) -> NcComponent;
fn fg_b(&self) -> NcComponent;
fn bg_r(&self) -> NcComponent;
fn bg_g(&self) -> NcComponent;
fn bg_b(&self) -> NcComponent;
fn fg_set_r(&mut self, r: NcComponent) -> Self;
fn fg_set_g(&mut self, g: NcComponent) -> Self;
fn fg_set_b(&mut self, b: NcComponent) -> Self;
fn bg_set_r(&mut self, r: NcComponent) -> Self;
fn bg_set_g(&mut self, g: NcComponent) -> Self;
fn bg_set_b(&mut self, b: NcComponent) -> Self;
fn fg_default_p(&self) -> bool;
fn bg_default_p(&self) -> bool;
fn set_fg_default(&mut self) -> Self;
fn set_fg_not_default(&mut self) -> Self;
fn set_bg_default(&mut self) -> Self;
fn set_bg_not_default(&mut self) -> Self;
fn set_default(&mut self) -> Self;
fn set_not_default(&mut self) -> Self;
fn fg_palindex_p(&self) -> bool;
fn bg_palindex_p(&self) -> bool;
fn set_fg_palindex(&mut self, index: NcPaletteIndex) -> Self;
fn set_bg_palindex(&mut self, index: NcPaletteIndex) -> Self;
}
Expand description

Enables the NcChannels methods.

Required methods

Implementors

New NcChannels, set to black and NOT using the “default color”.

New NcChannels, set to black and using the “default color”.

New NcChannels, expects two separate NcRgbs for the foreground and background channels.

New NcChannels, expects a single NcRgb for both foreground and background channels.

New NcChannels, expects two separate NcRgb & NcAlphaBits for the foreground and background channels.

New NcChannels, expects NcRgb & NcAlphaBits for both channels.

New NcChannels, expects three RGB NcComponent components for each channel.

New NcChannels, expects three RGB NcComponent components for both the foreground and background channels.

New NcChannels, expects three RGB NcComponents and NcAlphaBits, for both the foreground and background channels.

New NcChannel, expects three RGB NcComponents.

Combines two NcChannels into an NcChannels.

C style function: channels_combine().

Extracts the foreground NcChannel.

C style function: channels_fchannel().

Extracts the background NcChannel.

C style function: channels_bchannel().

Sets the foreground NcChannel.

C style function: channels_set_fchannel().

Sets the background NcChannel.

C style function: channels_set_bchannel().

Gets the foreground NcAlphaBits.

C style function: channels_fg_alpha().

Gets the background NcAlphaBits.

C style function: channels_bg_alpha().

Sets the foreground NcAlphaBits.

C style function: channels_set_fg_alpha().

Sets the background NcAlphaBits.

C style function: channels_set_bg_alpha().

Gets the foreground NcRgb.

C style function: channels_fg_rgb().

Gets the background NcRgb.

C style function: channels_bg_rgb().

Sets the foreground NcRgb.

C style function: channels_set_fg_rgb().

Sets the background NcRgb.

C style function: channels_set_bg_rgb().

Gets the three foreground RGB NcComponents (r, g, b).

C style function: channels_fg_rgb8().

Gets the three background RGB NcComponents (r, g, b).

C style function: channels_bg_rgb8().

Sets the three foreground RGB NcComponents (r, g, b), and marks the foreground NcChannel as not using the “default color”.

C style function: channels_set_fg_rgb8().

Sets the three background RGB NcComponents (r, g, b), and marks the background NcChannel as not using the “default color”.

C style function: channels_set_bg_rgb8().

Gets the foreground red NcComponent.

(No equivalent C style function)

Gets the foreground green NcComponent.

(No equivalent C style function)

Gets the foreground blue NcComponent.

(No equivalent C style function)

Gets the background red NcComponent.

(No equivalent C style function)

Gets the background green NcComponent.

(No equivalent C style function)

Gets the background blue NcComponent.

(No equivalent C style function)

Sets the foreground red NcComponent, and returns the new NcChannels.

(No equivalent C style function)

Sets the foreground green NcComponent, and returns the new NcChannels.

(No equivalent C style function)

Sets the foreground blue NcComponent, and returns the new NcChannels.

(No equivalent C style function)

Sets the background red NcComponent, and returns the new NcChannels.

(No equivalent C style function)

Sets the background green NcComponent, and returns the new NcChannels.

(No equivalent C style function)

Sets the background blue NcComponent, and returns the new NcChannels.

(No equivalent C style function)

Is the background using the “default background color”?

C style function: channels_fg_default_p().

Is the background using the “default background color”?

The “default background color” must generally be used to take advantage of terminal-effected transparency.

C style function: channels_bg_default_p().

Marks the foreground as using its “default color”, and returns the new NcChannels.

C style function: channels_set_fg_default().

Marks the background as using its “default color”, and returns the new NcChannels.

C style function: channels_set_bg_default().

Marks the foreground as NOT using its “default color”, and returns the new NcChannels.

C style function: channels_set_fg_default().

Marks the background as NOT using its “default color”, and returns the new NcChannels.

C style function: channels_set_bg_not_default().

Marks both the foreground and background as using its “default color”, and returns the new NcChannels.

Marks both the foreground and background as NOT using its “default color”, and returns the new NcChannels.

Is the foreground of using an indexed NcPalette color?

C style function: channels_fg_palindex_p().

Is the background of using an indexed NcPalette color?

C style function: channels_bg_palindex_p().

Sets the foreground of an NcChannels as using an indexed NcPalette color.

C style function: channels_set_fg_palindex().

Sets the background of an NcChannels as using an indexed NcPalette color.

C style function: channels_set_bg_palindex().