mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-18 03:25:55 +00:00
update rust for halign/valign #1468
This commit is contained in:
parent
86de98c5d2
commit
fc79dcd77a
@ -116,14 +116,13 @@
|
||||
//W ncplane_y
|
||||
//W ncplane_yx
|
||||
//
|
||||
// functions manually reimplemented: 39
|
||||
// functions manually reimplemented: 40
|
||||
// ------------------------------------------
|
||||
// (X) wont: 9
|
||||
// (+) done: 32 / 0
|
||||
// (W) wrap: 24
|
||||
// (+) done: 33 / 0
|
||||
// (W) wrap: 25
|
||||
// (#) test: 5
|
||||
// ------------------------------------------
|
||||
//W+ ncplane_align
|
||||
//W+ ncplane_bchannel
|
||||
//W+ ncplane_bg_alpha
|
||||
//W# ncplane_bg_default_p
|
||||
@ -140,6 +139,7 @@
|
||||
//W+ ncplane_fg_rgb
|
||||
//W+ ncplane_fg_rgb8
|
||||
//W+ ncplane_gradient_sized
|
||||
//W+ ncplane_halign
|
||||
// + ncplane_hline
|
||||
//W+ ncplane_perimeter
|
||||
//W+ ncplane_perimeter_double
|
||||
@ -161,6 +161,7 @@
|
||||
//W# ncplane_resize_simple
|
||||
// + ncplane_rounded_box
|
||||
// + ncplane_rounded_box_sized
|
||||
//W+ ncplane_halign
|
||||
// + ncplane_vline
|
||||
// + ncplane_vprintf
|
||||
//
|
||||
|
@ -247,10 +247,22 @@ pub fn ncplane_resize_simple(plane: &mut NcPlane, y_len: NcDim, x_len: NcDim) ->
|
||||
/// Returns `-`[`NCRESULT_MAX`][crate::NCRESULT_MAX] if
|
||||
/// [NCALIGN_UNALIGNED][crate::NCALIGN_UNALIGNED] or invalid [NcAlign].
|
||||
///
|
||||
/// *Method: NcPlane.[align()][NcPlane#method.align].*
|
||||
/// *Method: NcPlane.[halign()][NcPlane#method.halign].*
|
||||
#[inline]
|
||||
pub fn ncplane_align(plane: &NcPlane, align: NcAlign, cols: NcDim) -> NcIntResult {
|
||||
crate::notcurses_align(ncplane_dim_x(plane), align, cols)
|
||||
pub fn ncplane_halign(plane: &NcPlane, align: NcAlign, cols: NcDim) -> NcIntResult {
|
||||
crate::notcurses_halign(ncplane_dim_x(plane), align, cols)
|
||||
}
|
||||
|
||||
/// Returns the row at which `rows` rows ought start in order to be aligned
|
||||
/// according to `align` within this NcPlane.
|
||||
///
|
||||
/// Returns `-`[`NCRESULT_MAX`][crate::NCRESULT_MAX] if
|
||||
/// [NCALIGN_UNALIGNED][crate::NCALIGN_UNALIGNED] or invalid [NcAlign].
|
||||
///
|
||||
/// *Method: NcPlane.[valign()][NcPlane#method.valign].*
|
||||
#[inline]
|
||||
pub fn ncplane_valign(plane: &NcPlane, align: NcAlign, rows: NcDim) -> NcIntResult {
|
||||
crate::notcurses_valign(ncplane_dim_y(plane), align, rows)
|
||||
}
|
||||
|
||||
// line ------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user