Rename WindowRotation to RenderingRotation in the software renderer (#4181)

Same term as we're going to use in the linuxkms backend.
This commit is contained in:
Simon Hausmann 2023-12-19 08:47:55 +01:00 committed by GitHub
parent 3b51c8e30a
commit 95044c3a09
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 62 additions and 56 deletions

View file

@ -387,17 +387,17 @@ mod software_renderer {
#[cfg(feature = "experimental")]
#[no_mangle]
pub unsafe extern "C" fn slint_software_renderer_set_window_rotation(
pub unsafe extern "C" fn slint_software_renderer_set_rendering_rotation(
r: SoftwareRendererOpaque,
rotation: i32,
) {
use i_slint_core::software_renderer::WindowRotation;
use i_slint_core::software_renderer::RenderingRotation;
let renderer = &*(r as *const SoftwareRenderer);
renderer.set_window_rotation(match rotation {
90 => WindowRotation::Rotate90,
180 => WindowRotation::Rotate180,
270 => WindowRotation::Rotate270,
_ => WindowRotation::NoRotation,
renderer.set_rendering_rotation(match rotation {
90 => RenderingRotation::Rotate90,
180 => RenderingRotation::Rotate180,
270 => RenderingRotation::Rotate270,
_ => RenderingRotation::NoRotation,
});
}