Skip to content

Commit 31930e2

Browse files
gsk: Guard Broadway/Vulkan RendererClass
1 parent aec5952 commit 31930e2

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

gsk4/sys/Gir.toml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@ cfg_condition = "feature = \"broadway\""
2525
[[object.function]]
2626
pattern = "(new|get_type)"
2727
cfg_condition = "feature = \"broadway\""
28-
28+
29+
[[object]]
30+
name = "Gsk.BroadwayRendererClass"
31+
status = "generate"
32+
cfg_condition = "feature = \"broadway\""
33+
2934
[[object]]
3035
name = "Gsk.PathMeasure"
3136
status = "generate"
@@ -38,3 +43,8 @@ cfg_condition = "feature = \"vulkan\""
3843
[[object.function]]
3944
pattern = "(new|get_type)"
4045
cfg_condition = "feature = \"vulkan\""
46+
47+
[[object]]
48+
name = "Gsk.VulkanRendererClass"
49+
status = "generate"
50+
cfg_condition = "feature = \"vulkan\""

gsk4/sys/src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,16 @@ pub type GskPathForeachFunc = Option<
184184
>;
185185

186186
// Records
187+
#[cfg(feature = "broadway")]
188+
#[cfg_attr(docsrs, doc(cfg(feature = "broadway")))]
187189
#[repr(C)]
188190
pub struct _GskBroadwayRendererClass {
189191
_data: [u8; 0],
190192
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
191193
}
192194

195+
#[cfg(feature = "broadway")]
196+
#[cfg_attr(docsrs, doc(cfg(feature = "broadway")))]
193197
pub type GskBroadwayRendererClass = *mut _GskBroadwayRendererClass;
194198

195199
#[repr(C)]
@@ -393,12 +397,16 @@ impl ::std::fmt::Debug for GskTransform {
393397
}
394398
}
395399

400+
#[cfg(feature = "vulkan")]
401+
#[cfg_attr(docsrs, doc(cfg(feature = "vulkan")))]
396402
#[repr(C)]
397403
pub struct _GskVulkanRendererClass {
398404
_data: [u8; 0],
399405
_marker: core::marker::PhantomData<(*mut u8, core::marker::PhantomPinned)>,
400406
}
401407

408+
#[cfg(feature = "vulkan")]
409+
#[cfg_attr(docsrs, doc(cfg(feature = "vulkan")))]
402410
pub type GskVulkanRendererClass = *mut _GskVulkanRendererClass;
403411

404412
// Classes

0 commit comments

Comments
 (0)