mirror of
https://github.com/dankamongmen/notcurses.git
synced 2024-11-02 09:40:15 +00:00
Merge branch 'master' of github.com:dankamongmen/notcurses
This commit is contained in:
commit
1b4d346fb1
@ -1020,18 +1020,24 @@ impl NcPlane {
|
||||
"NcPlane.move_below(NcPlane)"
|
||||
]
|
||||
}
|
||||
|
||||
/// Merges `source` down onto this NcPlane.
|
||||
/// Merge the NcPlane `source` down onto the current NcPlane (`self`).
|
||||
///
|
||||
/// Merging is independent of the position of both NcPlanes on the z-axis.
|
||||
/// This is most rigorously defined as "write to `self` the frame that would
|
||||
/// be rendered were the entire stack made up only of the specified subregion
|
||||
/// of `source` and, below it, the subregion of `self` having the specified
|
||||
/// origin.
|
||||
///
|
||||
/// Merging is independent of the position of both planes on the z-axis.
|
||||
///
|
||||
/// It is an error to define a subregion of zero area, or that is not
|
||||
/// entirely contained within `source`.
|
||||
/// entirely contained within `source`. It is an error to define a target
|
||||
/// origin such that the projected subregion is not entirely contained
|
||||
/// within `self`.
|
||||
///
|
||||
/// It is an error to define a target origin such that the projected
|
||||
/// subregion is not entirely contained within 'dst'.
|
||||
/// Behavior is undefined if both planes are equivalent. `self` is modified,
|
||||
/// but `source` remains unchanged.
|
||||
///
|
||||
/// Behavior is undefined if both NcPlanes are equivalent.
|
||||
/// neither `source` nor `self` may have sprixels.
|
||||
///
|
||||
/// *C style function: [ncplane_mergedown()][crate::ncplane_mergedown].*
|
||||
pub fn mergedown(
|
||||
|
@ -13,11 +13,7 @@ pub type NcResizeCbUnsafe = unsafe extern "C" fn(*mut NcPlane) -> NcIntResult;
|
||||
|
||||
/// Converts [NcResizeCbUnsafe] to [NcResizeCb].
|
||||
pub fn ncresizecb_to_rust(resizecb: Option<NcResizeCbUnsafe>) -> Option<NcResizeCb> {
|
||||
if let Some(cb) = resizecb {
|
||||
Some(unsafe { core::mem::transmute(cb) })
|
||||
} else {
|
||||
None
|
||||
}
|
||||
resizecb.map(|cb| unsafe { core::mem::transmute(cb) })
|
||||
}
|
||||
|
||||
/// Converts [NcResizeCb] to [NcResizeCbUnsafe].
|
||||
@ -25,11 +21,7 @@ pub fn ncresizecb_to_rust(resizecb: Option<NcResizeCbUnsafe>) -> Option<NcResize
|
||||
// waiting for https://github.com/rust-lang/rust/issues/53605
|
||||
// to make this function const, and then NcPlaneOptions constructors.
|
||||
pub fn ncresizecb_to_c(resizecb: Option<NcResizeCb>) -> Option<NcResizeCbUnsafe> {
|
||||
if let Some(cb) = resizecb {
|
||||
Some(unsafe { core::mem::transmute(cb) })
|
||||
} else {
|
||||
None
|
||||
}
|
||||
resizecb.map(|cb| unsafe { core::mem::transmute(cb) })
|
||||
}
|
||||
|
||||
/// Enables the [NcResizeCb] methods.
|
||||
|
Loading…
Reference in New Issue
Block a user