mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 10:50:00 +00:00
swrenderer: Put the rotation feature behind a freature gate
We're not ready to make the API public as we want to have the API as part of the Window rather than part of the renderer
This commit is contained in:
parent
414a9e85e7
commit
b88a3caacd
12 changed files with 81 additions and 33 deletions
|
@ -336,9 +336,7 @@ mod software_renderer {
|
|||
use super::*;
|
||||
type SoftwareRendererOpaque = *const c_void;
|
||||
use i_slint_core::graphics::{IntRect, Rgb8Pixel};
|
||||
use i_slint_core::software_renderer::{
|
||||
RepaintBufferType, Rgb565Pixel, SoftwareRenderer, WindowRotation,
|
||||
};
|
||||
use i_slint_core::software_renderer::{RepaintBufferType, Rgb565Pixel, SoftwareRenderer};
|
||||
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn slint_software_renderer_new(
|
||||
|
@ -387,11 +385,13 @@ mod software_renderer {
|
|||
i_slint_core::graphics::euclid::rect(orig.x, orig.y, size.width as i32, size.height as i32)
|
||||
}
|
||||
|
||||
#[cfg(feature = "experimental")]
|
||||
#[no_mangle]
|
||||
pub unsafe extern "C" fn slint_software_renderer_set_window_rotation(
|
||||
r: SoftwareRendererOpaque,
|
||||
rotation: i32,
|
||||
) {
|
||||
use i_slint_core::software_renderer::WindowRotation;
|
||||
let renderer = &*(r as *const SoftwareRenderer);
|
||||
renderer.set_window_rotation(match rotation {
|
||||
90 => WindowRotation::Rotate90,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue