[−][src]Crate gtk_fnonce_on_eventloop
This crate contains three macros.
widget_refs!(Structname; widget1 : widget1type, ...)
creates a struct Structname with the given fields. It also implementsFrom<gtk::Builder>
for this struct and a function for each field that returns a.clone()
ed widget.with_gtk!(Structname)
creates some static (thread-local) variables and functions to initialize that storage and to execute closures on the event loop with access to that storage.gtk_refs!(pub mod modulname; struct Structname; widget1 : widget1type, ...)
combines the two other macros and puts them into its own module to prevent polluting your module. It also adds a functioninit_storage_from_builder()
to allow initializing from a glade builder directly.
You probably want to use gtk_refs!.
See the documentation of gtk_refs! for more instructions on how to interact with the generated code. Also take a look at the examples.
Modules
_modexport | Ignore this. Reexports some items from the gtk, glib and lazy_static crates. |
fnbox | Stable Box |
widgetrefs | Contains the macro |
withgtk | Contains the macro |
Macros
gtk_refs | Use this. Generates a new module with thread local storage for references to widgets, a struct to hold these references and a function to execute closures on the gtk event loop that can access these references. |
widget_refs | Create a struct Structname with the given fields. Also
implement From<gtk::Builder> for this struct and
a function for each field that returns a |
with_gtk | Creates some static (thread-local) variables and functions to initialize that storage and to execute closures on the event loop with access to that storage. |