Giter Site home page Giter Site logo

gobject-subclass's Introduction

gobject-subclass crates.io Build Status

This crate is deprecated and all functionality from in here was merged into glib-rs with the 0.7 release

Infrastructure for writing GObject subclasses in the Rust programming language, and (in the future) bindings for GObject and GIO classes.

Example usage of this can be found here

  • gst-plugin-rs: GStreamer plugin writing infrastructure
  • gtk-subclass: GTK class bindings
  • Listbox Model Data implementation: This is a good, quick example of how to create a GObject conforming struct in Rust. It shows how to make a GObject data class for using with gio::ListStore which is then passed to gtk::ListBox.bind_model()

This is different to gnome-class as it does not require usage of a C#-like DSL in a heavy procedural macro, but instead works directly with Rust traits. Both are built on top of the user-level GLib/GObject/GTK gtk-rs bindings.

It will likely not support all features gnome-class will support. For example it is not easily possible to create new GObject subclasses and expose them to C with the whole instance/class struct and allow adding new virtual methods. Subclassing and overriding of existing GObject virtual methods from C however is perfectly possible.

LICENSE

gobject-subclass and all crates contained in here that are not listed below are licensed under either of

at your option.

GLib/GObject itself is licensed under the Lesser General Public License version 2.1 or (at your option) any later version: https://www.gnu.org/licenses/lgpl-2.1.html

Contribution

Any kinds of contributions are welcome as a pull request.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in gobject-subclass by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

gobject-subclass's People

Contributors

budziq avatar ivanovaleksey avatar jonnor avatar luisbg avatar philn avatar sdroege avatar suhr avatar tsaunier avatar vhdirk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

gobject-subclass's Issues

Add documentation to unsafe traits

There are some unsafe traits. With marking a trait as unsafe you say: "watch out, if the implementation of this trait doesn't fullfill all assumptions, then it can cause undefined behaviour". But which assumptions the implementor must respect isn't mentioned.

Can you add documentation adding the assumptions the implementator must respect to not cause undefined behaviour?

0.1.0 release

CC @vhdirk

I'd like to do a first release of this to crates.io, so we have it available from there already when needed somewhere (like in your application or next time I do a gst-plugin-rs release).

Are there any things we should do before that, any changes you'd like to see before?

Add bindings for GIO

GApplication, GInputStream, GOutputStream, GIOStream at least would seem useful

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.