C++: add a "std" feature to the slint-cpp crate

And make it no_std otherwise

This is a first step towards getting C++ on MCU (#2136)
This commit is contained in:
Olivier Goffart 2023-07-05 12:49:34 +02:00 committed by Olivier Goffart
parent 9afadf50be
commit aa8ef4e302
7 changed files with 37 additions and 13 deletions

View file

@ -1,6 +1,8 @@
// Copyright © SixtyFPS GmbH <info@slint.dev>
// SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.0 OR LicenseRef-Slint-commercial
use alloc::boxed::Box;
use alloc::rc::Rc;
use core::ffi::c_void;
use i_slint_core::api::{PhysicalSize, Window};
use i_slint_core::graphics::{IntSize, Rgb8Pixel};
@ -10,7 +12,6 @@ use i_slint_core::software_renderer::{RepaintBufferType, SoftwareRenderer};
use i_slint_core::window::ffi::WindowAdapterRcOpaque;
use i_slint_core::window::{WindowAdapter, WindowAdapterInternal};
use raw_window_handle::{RawDisplayHandle, RawWindowHandle};
use std::rc::Rc;
type WindowAdapterUserData = *mut c_void;