Skip to content
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.

Use final types pango::Context, pango::Layout without IsA #48

Merged
merged 1 commit into from May 20, 2019
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion gir
Submodule gir updated 118 files
2 changes: 1 addition & 1 deletion gir-files
32 changes: 16 additions & 16 deletions src/auto/functions.rs
Expand Up @@ -9,29 +9,29 @@ use pango;
use pango_cairo_sys;


pub fn context_get_resolution<P: IsA<pango::Context>>(context: &P) -> f64 {
pub fn context_get_resolution(context: &pango::Context) -> f64 {
unsafe {
pango_cairo_sys::pango_cairo_context_get_resolution(context.as_ref().to_glib_none().0)
pango_cairo_sys::pango_cairo_context_get_resolution(context.to_glib_none().0)
}
}

//pub fn context_get_shape_renderer<P: IsA<pango::Context>>(context: &P, data: /*Unimplemented*/Option<Fundamental: Pointer>) -> /*Unimplemented*/Fn(&cairo::Context, /*Ignored*/pango::AttrShape, bool, /*Unimplemented*/Fundamental: Pointer) {
//pub fn context_get_shape_renderer(context: &pango::Context, data: /*Unimplemented*/Option<Fundamental: Pointer>) -> /*Unimplemented*/Fn(&cairo::Context, /*Ignored*/pango::AttrShape, bool, /*Unimplemented*/Option<Fundamental: Pointer>) {
// unsafe { TODO: call pango_cairo_sys:pango_cairo_context_get_shape_renderer() }
//}

pub fn context_set_font_options<P: IsA<pango::Context>>(context: &P, options: Option<&cairo::FontOptions>) {
pub fn context_set_font_options(context: &pango::Context, options: Option<&cairo::FontOptions>) {
unsafe {
pango_cairo_sys::pango_cairo_context_set_font_options(context.as_ref().to_glib_none().0, options.to_glib_none().0);
pango_cairo_sys::pango_cairo_context_set_font_options(context.to_glib_none().0, options.to_glib_none().0);
}
}

pub fn context_set_resolution<P: IsA<pango::Context>>(context: &P, dpi: f64) {
pub fn context_set_resolution(context: &pango::Context, dpi: f64) {
unsafe {
pango_cairo_sys::pango_cairo_context_set_resolution(context.as_ref().to_glib_none().0, dpi);
pango_cairo_sys::pango_cairo_context_set_resolution(context.to_glib_none().0, dpi);
}
}

//pub fn context_set_shape_renderer<P: IsA<pango::Context>>(context: &P, func: /*Unimplemented*/Fn(&cairo::Context, /*Ignored*/pango::AttrShape, bool, /*Unimplemented*/Fundamental: Pointer), data: /*Unimplemented*/Option<Fundamental: Pointer>) {
//pub fn context_set_shape_renderer(context: &pango::Context, func: /*Unimplemented*/Fn(&cairo::Context, /*Ignored*/pango::AttrShape, bool, /*Unimplemented*/Option<Fundamental: Pointer>), data: /*Unimplemented*/Option<Fundamental: Pointer>) {
// unsafe { TODO: call pango_cairo_sys:pango_cairo_context_set_shape_renderer() }
//}

Expand Down Expand Up @@ -65,9 +65,9 @@ pub fn layout_line_path(cr: &cairo::Context, line: &pango::LayoutLine) {
}
}

pub fn layout_path<P: IsA<pango::Layout>>(cr: &cairo::Context, layout: &P) {
pub fn layout_path(cr: &cairo::Context, layout: &pango::Layout) {
unsafe {
pango_cairo_sys::pango_cairo_layout_path(mut_override(cr.to_glib_none().0), layout.as_ref().to_glib_none().0);
pango_cairo_sys::pango_cairo_layout_path(mut_override(cr.to_glib_none().0), layout.to_glib_none().0);
}
}

Expand All @@ -89,9 +89,9 @@ pub fn show_glyph_string<P: IsA<pango::Font>>(cr: &cairo::Context, font: &P, gly
}
}

pub fn show_layout<P: IsA<pango::Layout>>(cr: &cairo::Context, layout: &P) {
pub fn show_layout(cr: &cairo::Context, layout: &pango::Layout) {
unsafe {
pango_cairo_sys::pango_cairo_show_layout(mut_override(cr.to_glib_none().0), layout.as_ref().to_glib_none().0);
pango_cairo_sys::pango_cairo_show_layout(mut_override(cr.to_glib_none().0), layout.to_glib_none().0);
}
}

Expand All @@ -101,14 +101,14 @@ pub fn show_layout_line(cr: &cairo::Context, line: &pango::LayoutLine) {
}
}

pub fn update_context<P: IsA<pango::Context>>(cr: &cairo::Context, context: &P) {
pub fn update_context(cr: &cairo::Context, context: &pango::Context) {
unsafe {
pango_cairo_sys::pango_cairo_update_context(mut_override(cr.to_glib_none().0), context.as_ref().to_glib_none().0);
pango_cairo_sys::pango_cairo_update_context(mut_override(cr.to_glib_none().0), context.to_glib_none().0);
}
}

pub fn update_layout<P: IsA<pango::Layout>>(cr: &cairo::Context, layout: &P) {
pub fn update_layout(cr: &cairo::Context, layout: &pango::Layout) {
unsafe {
pango_cairo_sys::pango_cairo_update_layout(mut_override(cr.to_glib_none().0), layout.as_ref().to_glib_none().0);
pango_cairo_sys::pango_cairo_update_layout(mut_override(cr.to_glib_none().0), layout.to_glib_none().0);
}
}
4 changes: 2 additions & 2 deletions src/auto/versions.txt
@@ -1,2 +1,2 @@
Generated by gir (https://github.com/gtk-rs/gir @ 914ca73)
from gir-files (https://github.com/gtk-rs/gir-files @ 02dfee2)
Generated by gir (https://github.com/gtk-rs/gir @ a2958cc)
from gir-files (https://github.com/gtk-rs/gir-files @ 617a344)