Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- { name: "gio", features: "v2_84", nightly: "--all-features", test_sys: true }
- { name: "glib", features: "v2_84,log", nightly: "--all-features", test_sys: true }
- { name: "graphene", features: "v1_12", nightly: "", test_sys: true }
- { name: "pango", features: "v1_56", nightly: "--all-features", test_sys: true }
- { name: "pango", features: "v1_56", nightly: "", test_sys: true }
- { name: "pangocairo", features: "", nightly: "--all-features", test_sys: true }
steps:
- uses: actions/checkout@v5
Expand Down
4 changes: 2 additions & 2 deletions gdk-pixbuf/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 59e3912ac141)
from gir-files (https://github.com/gtk-rs/gir-files @ a79d23cd6a42)
Generated by gir (https://github.com/gtk-rs/gir @ 35461d70ac74)
from gir-files (https://github.com/gtk-rs/gir-files @ fcba74747d79)
4 changes: 2 additions & 2 deletions gdk-pixbuf/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 59e3912ac141)
from gir-files (https://github.com/gtk-rs/gir-files @ a79d23cd6a42)
Generated by gir (https://github.com/gtk-rs/gir @ 35461d70ac74)
from gir-files (https://github.com/gtk-rs/gir-files @ fcba74747d79)
4 changes: 2 additions & 2 deletions gio/src/auto/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -471,12 +471,12 @@ impl DBusError {
//}

//#[doc(alias = "g_dbus_error_set_dbus_error")]
//pub fn set_dbus_error(error: &mut glib::Error, dbus_error_name: &str, dbus_error_message: &str, format: Option<&str>, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) {
//pub fn set_dbus_error(dbus_error_name: &str, dbus_error_message: &str, format: Option<&str>, : /*Unknown conversion*//*Unimplemented*/Basic: VarArgs) -> Option<glib::Error> {
// unsafe { TODO: call ffi:g_dbus_error_set_dbus_error() }
//}

//#[doc(alias = "g_dbus_error_set_dbus_error_valist")]
//pub fn set_dbus_error_valist(error: &mut glib::Error, dbus_error_name: &str, dbus_error_message: &str, format: Option<&str>, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) {
//pub fn set_dbus_error_valist(dbus_error_name: &str, dbus_error_message: &str, format: Option<&str>, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) -> Option<glib::Error> {
// unsafe { TODO: call ffi:g_dbus_error_set_dbus_error_valist() }
//}

Expand Down
4 changes: 2 additions & 2 deletions gio/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 59e3912ac141)
from gir-files (https://github.com/gtk-rs/gir-files @ a79d23cd6a42)
Generated by gir (https://github.com/gtk-rs/gir @ 35461d70ac74)
from gir-files (https://github.com/gtk-rs/gir-files @ fcba74747d79)
4 changes: 2 additions & 2 deletions gio/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 59e3912ac141)
from gir-files (https://github.com/gtk-rs/gir-files @ a79d23cd6a42)
Generated by gir (https://github.com/gtk-rs/gir @ 35461d70ac74)
from gir-files (https://github.com/gtk-rs/gir-files @ fcba74747d79)
2 changes: 1 addition & 1 deletion gir-files
4 changes: 2 additions & 2 deletions glib/gobject-sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 59e3912ac141)
from gir-files (https://github.com/gtk-rs/gir-files @ a79d23cd6a42)
Generated by gir (https://github.com/gtk-rs/gir @ 35461d70ac74)
from gir-files (https://github.com/gtk-rs/gir-files @ fcba74747d79)
4 changes: 2 additions & 2 deletions glib/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 59e3912ac141)
from gir-files (https://github.com/gtk-rs/gir-files @ a79d23cd6a42)
Generated by gir (https://github.com/gtk-rs/gir @ 35461d70ac74)
from gir-files (https://github.com/gtk-rs/gir-files @ fcba74747d79)
4 changes: 2 additions & 2 deletions glib/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 59e3912ac141)
from gir-files (https://github.com/gtk-rs/gir-files @ a79d23cd6a42)
Generated by gir (https://github.com/gtk-rs/gir @ 35461d70ac74)
from gir-files (https://github.com/gtk-rs/gir-files @ fcba74747d79)
4 changes: 2 additions & 2 deletions graphene/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 59e3912ac141)
from gir-files (https://github.com/gtk-rs/gir-files @ a79d23cd6a42)
Generated by gir (https://github.com/gtk-rs/gir @ 35461d70ac74)
from gir-files (https://github.com/gtk-rs/gir-files @ fcba74747d79)
4 changes: 2 additions & 2 deletions graphene/sys/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 59e3912ac141)
from gir-files (https://github.com/gtk-rs/gir-files @ a79d23cd6a42)
Generated by gir (https://github.com/gtk-rs/gir @ 35461d70ac74)
from gir-files (https://github.com/gtk-rs/gir-files @ fcba74747d79)
1 change: 1 addition & 0 deletions pango/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ v1_50 = ["v1_48", "pango-sys/v1_50"]
v1_52 = ["v1_50", "pango-sys/v1_52"]
v1_54 = ["v1_52", "pango-sys/v1_54"]
v1_56 = ["v1_54", "pango-sys/v1_56"]
v1_57 = ["v1_56", "pango-sys/v1_57"]

[dependencies]
pango-sys.workspace = true
Expand Down
1 change: 1 addition & 0 deletions pango/Gir.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ generate = [
"Pango.CoverageLevel",
"Pango.Direction",
"Pango.EllipsizeMode",
"Pango.FontColor",
"Pango.FontFace",
"Pango.FontMask",
"Pango.FontMetrics",
Expand Down
114 changes: 114 additions & 0 deletions pango/src/auto/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,120 @@ impl From<EllipsizeMode> for glib::Value {
}
}

#[cfg(feature = "v1_57")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_57")))]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
#[non_exhaustive]
#[doc(alias = "PangoFontColor")]
pub enum FontColor {
#[doc(alias = "PANGO_FONT_COLOR_FORBIDDEN")]
Forbidden,
#[doc(alias = "PANGO_FONT_COLOR_REQUIRED")]
Required,
#[doc(alias = "PANGO_FONT_COLOR_DONT_CARE")]
DontCare,
#[doc(hidden)]
__Unknown(i32),
}

#[cfg(feature = "v1_57")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_57")))]
#[doc(hidden)]
impl IntoGlib for FontColor {
type GlibType = ffi::PangoFontColor;

#[inline]
fn into_glib(self) -> ffi::PangoFontColor {
match self {
Self::Forbidden => ffi::PANGO_FONT_COLOR_FORBIDDEN,
Self::Required => ffi::PANGO_FONT_COLOR_REQUIRED,
Self::DontCare => ffi::PANGO_FONT_COLOR_DONT_CARE,
Self::__Unknown(value) => value,
}
}
}

#[cfg(feature = "v1_57")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_57")))]
#[doc(hidden)]
impl FromGlib<ffi::PangoFontColor> for FontColor {
#[inline]
unsafe fn from_glib(value: ffi::PangoFontColor) -> Self {
match value {
ffi::PANGO_FONT_COLOR_FORBIDDEN => Self::Forbidden,
ffi::PANGO_FONT_COLOR_REQUIRED => Self::Required,
ffi::PANGO_FONT_COLOR_DONT_CARE => Self::DontCare,
value => Self::__Unknown(value),
}
}
}

#[cfg(feature = "v1_57")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_57")))]
impl StaticType for FontColor {
#[inline]
#[doc(alias = "pango_font_color_get_type")]
fn static_type() -> glib::Type {
unsafe { from_glib(ffi::pango_font_color_get_type()) }
}
}

#[cfg(feature = "v1_57")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_57")))]
impl glib::HasParamSpec for FontColor {
type ParamSpec = glib::ParamSpecEnum;
type SetValue = Self;
type BuilderFn = fn(&str, Self) -> glib::ParamSpecEnumBuilder<Self>;

fn param_spec_builder() -> Self::BuilderFn {
Self::ParamSpec::builder_with_default
}
}

#[cfg(feature = "v1_57")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_57")))]
impl glib::value::ValueType for FontColor {
type Type = Self;
}

#[cfg(feature = "v1_57")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_57")))]
unsafe impl<'a> glib::value::FromValue<'a> for FontColor {
type Checker = glib::value::GenericValueTypeChecker<Self>;

#[inline]
unsafe fn from_value(value: &'a glib::Value) -> Self {
from_glib(glib::gobject_ffi::g_value_get_enum(value.to_glib_none().0))
}
}

#[cfg(feature = "v1_57")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_57")))]
impl ToValue for FontColor {
#[inline]
fn to_value(&self) -> glib::Value {
let mut value = glib::Value::for_value_type::<Self>();
unsafe {
glib::gobject_ffi::g_value_set_enum(value.to_glib_none_mut().0, self.into_glib());
}
value
}

#[inline]
fn value_type(&self) -> glib::Type {
Self::static_type()
}
}

#[cfg(feature = "v1_57")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_57")))]
impl From<FontColor> for glib::Value {
#[inline]
fn from(v: FontColor) -> Self {
ToValue::to_value(&v)
}
}

#[cfg(feature = "v1_50")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))]
#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)]
Expand Down
4 changes: 4 additions & 0 deletions pango/src/auto/flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ bitflags! {
#[cfg_attr(docsrs, doc(cfg(feature = "v1_56")))]
#[doc(alias = "PANGO_FONT_MASK_FEATURES")]
const FEATURES = ffi::PANGO_FONT_MASK_FEATURES as _;
#[cfg(feature = "v1_57")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_57")))]
#[doc(alias = "PANGO_FONT_MASK_COLOR")]
const COLOR = ffi::PANGO_FONT_MASK_COLOR as _;
}
}

Expand Down
20 changes: 20 additions & 0 deletions pango/src/auto/font_description.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT

#[cfg(feature = "v1_57")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_57")))]
use crate::FontColor;
use crate::{ffi, FontMask, Gravity, Stretch, Style, Variant, Weight};
use glib::translate::*;

Expand Down Expand Up @@ -47,6 +50,14 @@ impl FontDescription {
}
}

#[cfg(feature = "v1_57")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_57")))]
#[doc(alias = "pango_font_description_get_color")]
#[doc(alias = "get_color")]
pub fn color(&self) -> FontColor {
unsafe { from_glib(ffi::pango_font_description_get_color(self.to_glib_none().0)) }
}

#[doc(alias = "pango_font_description_get_family")]
#[doc(alias = "get_family")]
pub fn family(&self) -> Option<glib::GString> {
Expand Down Expand Up @@ -176,6 +187,15 @@ impl FontDescription {
}
}

#[cfg(feature = "v1_57")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_57")))]
#[doc(alias = "pango_font_description_set_color")]
pub fn set_color(&mut self, color: FontColor) {
unsafe {
ffi::pango_font_description_set_color(self.to_glib_none_mut().0, color.into_glib());
}
}

#[doc(alias = "pango_font_description_set_family")]
pub fn set_family(&mut self, family: &str) {
unsafe {
Expand Down
3 changes: 3 additions & 0 deletions pango/src/auto/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ pub use self::enums::BidiType;
pub use self::enums::CoverageLevel;
pub use self::enums::Direction;
pub use self::enums::EllipsizeMode;
#[cfg(feature = "v1_57")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_57")))]
pub use self::enums::FontColor;
#[cfg(feature = "v1_50")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_50")))]
pub use self::enums::FontScale;
Expand Down
4 changes: 2 additions & 2 deletions pango/src/auto/versions.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 59e3912ac141)
from gir-files (https://github.com/gtk-rs/gir-files @ a79d23cd6a42)
Generated by gir (https://github.com/gtk-rs/gir @ 35461d70ac74)
from gir-files (https://github.com/gtk-rs/gir-files @ fcba74747d79)
4 changes: 4 additions & 0 deletions pango/sys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ v1_50 = ["v1_48"]
v1_52 = ["v1_50"]
v1_54 = ["v1_52"]
v1_56 = ["v1_54"]
v1_57 = ["v1_56"]

[lib]
name = "pango_sys"
Expand Down Expand Up @@ -85,6 +86,9 @@ version = "1.54"
[package.metadata.system-deps.pango.v1_56]
version = "1.55"

[package.metadata.system-deps.pango.v1_57]
version = "1.57"

[package.metadata.docs.rs]
rustc-args = ["--cfg", "docsrs"]
rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"]
Expand Down
21 changes: 21 additions & 0 deletions pango/sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ pub const PANGO_ELLIPSIZE_START: PangoEllipsizeMode = 1;
pub const PANGO_ELLIPSIZE_MIDDLE: PangoEllipsizeMode = 2;
pub const PANGO_ELLIPSIZE_END: PangoEllipsizeMode = 3;

pub type PangoFontColor = c_int;
pub const PANGO_FONT_COLOR_FORBIDDEN: PangoFontColor = 0;
pub const PANGO_FONT_COLOR_REQUIRED: PangoFontColor = 1;
pub const PANGO_FONT_COLOR_DONT_CARE: PangoFontColor = 2;

pub type PangoFontScale = c_int;
pub const PANGO_FONT_SCALE_NONE: PangoFontScale = 0;
pub const PANGO_FONT_SCALE_SUPERSCRIPT: PangoFontScale = 1;
Expand Down Expand Up @@ -378,6 +383,9 @@ pub const PANGO_FONT_MASK_VARIATIONS: PangoFontMask = 128;
#[cfg(feature = "v1_56")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_56")))]
pub const PANGO_FONT_MASK_FEATURES: PangoFontMask = 256;
#[cfg(feature = "v1_57")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_57")))]
pub const PANGO_FONT_MASK_COLOR: PangoFontMask = 512;

pub type PangoLayoutDeserializeFlags = c_uint;
pub const PANGO_LAYOUT_DESERIALIZE_DEFAULT: PangoLayoutDeserializeFlags = 0;
Expand Down Expand Up @@ -1449,6 +1457,13 @@ extern "C" {
//=========================================================================
pub fn pango_ellipsize_mode_get_type() -> GType;

//=========================================================================
// PangoFontColor
//=========================================================================
#[cfg(feature = "v1_57")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_57")))]
pub fn pango_font_color_get_type() -> GType;

//=========================================================================
// PangoFontScale
//=========================================================================
Expand Down Expand Up @@ -1767,6 +1782,9 @@ extern "C" {
desc2: *const PangoFontDescription,
) -> gboolean;
pub fn pango_font_description_free(desc: *mut PangoFontDescription);
#[cfg(feature = "v1_57")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_57")))]
pub fn pango_font_description_get_color(desc: *const PangoFontDescription) -> PangoFontColor;
pub fn pango_font_description_get_family(desc: *const PangoFontDescription) -> *const c_char;
#[cfg(feature = "v1_56")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_56")))]
Expand Down Expand Up @@ -1803,6 +1821,9 @@ extern "C" {
desc: *mut PangoFontDescription,
size: c_double,
);
#[cfg(feature = "v1_57")]
#[cfg_attr(docsrs, doc(cfg(feature = "v1_57")))]
pub fn pango_font_description_set_color(desc: *mut PangoFontDescription, color: PangoFontColor);
pub fn pango_font_description_set_family(
desc: *mut PangoFontDescription,
family: *const c_char,
Expand Down
11 changes: 11 additions & 0 deletions pango/sys/tests/abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,13 @@ const RUST_LAYOUTS: &[(&str, Layout)] = &[
alignment: align_of::<PangoFontClass>(),
},
),
(
"PangoFontColor",
Layout {
size: size_of::<PangoFontColor>(),
alignment: align_of::<PangoFontColor>(),
},
),
(
"PangoFontFace",
Layout {
Expand Down Expand Up @@ -746,6 +753,10 @@ const RUST_CONSTANTS: &[(&str, &str)] = &[
("(gint) PANGO_ELLIPSIZE_MIDDLE", "2"),
("(gint) PANGO_ELLIPSIZE_NONE", "0"),
("(gint) PANGO_ELLIPSIZE_START", "1"),
("(gint) PANGO_FONT_COLOR_DONT_CARE", "2"),
("(gint) PANGO_FONT_COLOR_FORBIDDEN", "0"),
("(gint) PANGO_FONT_COLOR_REQUIRED", "1"),
("(guint) PANGO_FONT_MASK_COLOR", "512"),
("(guint) PANGO_FONT_MASK_FAMILY", "1"),
("(guint) PANGO_FONT_MASK_FEATURES", "256"),
("(guint) PANGO_FONT_MASK_GRAVITY", "64"),
Expand Down
4 changes: 4 additions & 0 deletions pango/sys/tests/constant.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ int main() {
PRINT_CONSTANT((gint) PANGO_ELLIPSIZE_MIDDLE);
PRINT_CONSTANT((gint) PANGO_ELLIPSIZE_NONE);
PRINT_CONSTANT((gint) PANGO_ELLIPSIZE_START);
PRINT_CONSTANT((gint) PANGO_FONT_COLOR_DONT_CARE);
PRINT_CONSTANT((gint) PANGO_FONT_COLOR_FORBIDDEN);
PRINT_CONSTANT((gint) PANGO_FONT_COLOR_REQUIRED);
PRINT_CONSTANT((guint) PANGO_FONT_MASK_COLOR);
PRINT_CONSTANT((guint) PANGO_FONT_MASK_FAMILY);
PRINT_CONSTANT((guint) PANGO_FONT_MASK_FEATURES);
PRINT_CONSTANT((guint) PANGO_FONT_MASK_GRAVITY);
Expand Down
1 change: 1 addition & 0 deletions pango/sys/tests/layout.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ int main() {
printf("%s;%zu;%zu\n", "PangoEllipsizeMode", sizeof(PangoEllipsizeMode), alignof(PangoEllipsizeMode));
printf("%s;%zu;%zu\n", "PangoFont", sizeof(PangoFont), alignof(PangoFont));
printf("%s;%zu;%zu\n", "PangoFontClass", sizeof(PangoFontClass), alignof(PangoFontClass));
printf("%s;%zu;%zu\n", "PangoFontColor", sizeof(PangoFontColor), alignof(PangoFontColor));
printf("%s;%zu;%zu\n", "PangoFontFace", sizeof(PangoFontFace), alignof(PangoFontFace));
printf("%s;%zu;%zu\n", "PangoFontFaceClass", sizeof(PangoFontFaceClass), alignof(PangoFontFaceClass));
printf("%s;%zu;%zu\n", "PangoFontFamily", sizeof(PangoFontFamily), alignof(PangoFontFamily));
Expand Down
Loading
Loading