gstreamer-rs/gstreamer-gl/x11/sys/src/lib.rs
Simonas Kazlauskas 782d84bede Remove the links annotations
The `links` annotation in `Cargo.toml` is intended to ensure that in the
crate graph there's at most one crate that's an implementation of
some sort concept.

This can make sense in some scenarios, most prominent of which is when
the crate defines `#[no_mangle]` symbols (e.g. by compiling a vendored C
library.) In that situation linking a binary that depends on two
versions of the library cannot work because of colliding symbol names.

There does not appear to be a similar reason to impose such a
restriction on the users of `gstreamer-sys` and similar, however. All of
these crates link to a system library, they do not define any
`#[no_mangle]` symbols nor they vendor and build C libraries as part of
their build process. All they do is linking to a system library.  Most
likely all the different versions of the bindings will link to the exact
same library too.

I haven't seen any global resources that these bindings use to ensure
soundness of the library, either.
2021-08-23 16:56:27 +00:00

74 lines
2.2 KiB
Rust

// Generated by gir (https://github.com/gtk-rs/gir @ b193568)
// from gir-files (https://github.com/gtk-rs/gir-files @ 7d95377)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git @ 831b444)
// DO NOT EDIT
#![allow(non_camel_case_types, non_upper_case_globals, non_snake_case)]
#![allow(
clippy::approx_constant,
clippy::type_complexity,
clippy::unreadable_literal,
clippy::upper_case_acronyms
)]
#![cfg_attr(feature = "dox", feature(doc_cfg))]
use glib_sys as glib;
use gstreamer_gl_sys as gst_gl;
#[allow(unused_imports)]
use libc::{
c_char, c_double, c_float, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void,
intptr_t, size_t, ssize_t, time_t, uintptr_t, FILE,
};
#[allow(unused_imports)]
use glib::{gboolean, gconstpointer, gpointer, GType};
// Records
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstGLDisplayX11Class {
pub object_class: gst_gl::GstGLDisplayClass,
pub _padding: [gpointer; 4],
}
impl ::std::fmt::Debug for GstGLDisplayX11Class {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstGLDisplayX11Class @ {:p}", self))
.field("object_class", &self.object_class)
.field("_padding", &self._padding)
.finish()
}
}
// Classes
#[repr(C)]
#[derive(Copy, Clone)]
pub struct GstGLDisplayX11 {
pub parent: gst_gl::GstGLDisplay,
pub name: *mut c_char,
pub display: gpointer,
pub xcb_connection: gpointer,
pub foreign_display: gboolean,
pub _padding: [gpointer; 4],
}
impl ::std::fmt::Debug for GstGLDisplayX11 {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
f.debug_struct(&format!("GstGLDisplayX11 @ {:p}", self))
.finish()
}
}
#[link(name = "gstgl-1.0")]
extern "C" {
//=========================================================================
// GstGLDisplayX11
//=========================================================================
pub fn gst_gl_display_x11_get_type() -> GType;
pub fn gst_gl_display_x11_new(name: *const c_char) -> *mut GstGLDisplayX11;
pub fn gst_gl_display_x11_new_with_display(display: gpointer) -> *mut GstGLDisplayX11;
}