mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 10:50:00 +00:00
C++: drops IntSize in favor of Size<T> (#922)
Fixes #909 Since we declare the struct in C++, we don't need to declare it in rust for cbindgen anymore, as long as we expose the Size2D type from euclid to the cbindgen_private namespace
This commit is contained in:
parent
7a735a48db
commit
753784c331
4 changed files with 31 additions and 32 deletions
|
@ -161,7 +161,6 @@ fn gen_corelib(
|
|||
"slint_image_size",
|
||||
"slint_image_path",
|
||||
"TimerMode", // included in generated_public.h
|
||||
"IntSize", // included in generated_public.h
|
||||
"RenderingState", // included in generated_public.h
|
||||
"SetRenderingNotifierError", // included in generated_public.h
|
||||
"GraphicsAPI", // included in generated_public.h
|
||||
|
@ -267,7 +266,6 @@ fn gen_corelib(
|
|||
"slint_color_darker",
|
||||
"slint_image_size",
|
||||
"slint_image_path",
|
||||
"IntSize",
|
||||
]
|
||||
.iter()
|
||||
.filter(|exclusion| !rust_types.iter().any(|inclusion| inclusion == *exclusion))
|
||||
|
@ -317,20 +315,11 @@ fn gen_corelib(
|
|||
public_config.export.exclude.push("Point".into());
|
||||
public_config.export.include = vec![
|
||||
"TimerMode".into(),
|
||||
"IntSize".into(),
|
||||
"RenderingState".into(),
|
||||
"SetRenderingNotifierError".into(),
|
||||
"GraphicsAPI".into(),
|
||||
];
|
||||
|
||||
public_config.export.body.insert(
|
||||
"IntSize".to_owned(),
|
||||
r#"
|
||||
/// Compares this IntSize with \a other and returns true if they are equal; false otherwise.
|
||||
bool operator==(const IntSize &other) const = default;"#
|
||||
.to_owned(),
|
||||
);
|
||||
|
||||
cbindgen::Builder::new()
|
||||
.with_config(public_config)
|
||||
.with_src(crate_dir.join("timers.rs"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue