@@ -23,8 +23,8 @@ Currently, the minimum supported Rust version is `1.70.0`.
23
23
Most types in the GLib family have [ ` Type ` ] identifiers.
24
24
Their corresponding Rust types implement the [ ` StaticType ` ] trait.
25
25
26
- A dynamically typed [ ` Value ` ] can carry values of any [ ` StaticType ` ] .
27
- [ ` Variant ` ] ( struct@Variant ) s can carry values of [ ` StaticVariantType ` ] .
26
+ A dynamically typed [ ` Value ` ] can carry values of any ` StaticType ` .
27
+ [ Variants ] [ `Variant` ] can carry values of [ ` StaticVariantType ` ] .
28
28
29
29
## Errors
30
30
@@ -35,10 +35,11 @@ carry values from various [error domains](error::ErrorDomain) such as
35
35
## Objects
36
36
37
37
Each class and interface has a corresponding smart pointer struct
38
- representing an instance of that type (e.g. [ ` Object ` ] for ` GObject ` or
39
- ` gtk::Widget ` for ` GtkWidget ` ). They are reference counted and feature
40
- interior mutability similarly to Rust's ` Rc<RefCell<T>> ` idiom.
41
- Consequently, cloning objects is cheap and their methods never require
38
+ representing an instance of that type (e.g. [ ` Object ` ] for [ ` GObject ` ] or
39
+ [ ` gtk4::Widget ` ] for [ ` GtkWidget ` ] ). They are reference counted and feature
40
+ interior mutability similarly to Rust's
41
+ [ ` Rc<RefCell<T>> ` ]
42
+ idiom. Consequently, cloning objects is cheap and their methods never require
42
43
mutable borrows. Two smart pointers are equal if they point to the same
43
44
object.
44
45
@@ -48,7 +49,7 @@ marker trait. The [`Cast`] trait enables upcasting
48
49
and downcasting.
49
50
50
51
Interfaces and non-leaf classes also have corresponding traits (e.g.
51
- [ ` ObjectExt ` ] or ` gtk:: WidgetExt` ), which are blanketly implemented for all
52
+ [ ` ObjectExt ` ] or [ ` WidgetExt ` ] ), which are blanketly implemented for all
52
53
their subtypes.
53
54
54
55
You can create new subclasses of [ ` Object ` ] or other object types. Look at
@@ -60,11 +61,10 @@ GLib-based libraries largely operate on pointers to various boxed or
60
61
reference counted structures so the bindings have to implement corresponding
61
62
smart pointers (wrappers), which encapsulate resource management and safety
62
63
checks. Such wrappers are defined via the
63
- [ ` wrapper ` ] [ `macro@wrapper` ] macro, which uses abstractions
64
- defined in the [ ` wrapper ` ] [ `mod@wrapper` ] , [ ` boxed ` ] [ `mod@boxed` ] ,
65
- [ ` shared ` ] [ `mod@shared` ] and [ ` object ` ] [ `mod@object` ] modules.
66
-
67
- The [ ` translate ` ] [ `mod@translate` ] module defines and partly implements
64
+ [ ` wrapper! ` ] macro, which uses abstractions
65
+ defined in the [ ` wrapper ` ] , [ ` boxed ` ] ,
66
+ [ ` shared ` ] and [ ` object ` ] [ mod@object ] modules.
67
+ The [ ` translate ` ] module defines and partly implements
68
68
conversions between high level Rust types (including the aforementioned
69
69
wrappers) and their FFI counterparts.
70
70
@@ -99,3 +99,26 @@ glib = { git = "https://github.com/gtk-rs/gtk-rs-core.git", package = "glib" }
99
99
## License
100
100
101
101
__ glib__ is available under the MIT License, please refer to it.
102
+
103
+ [ `Type` ] : https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/types/struct.Type.html
104
+ [ `StaticType` ] : https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/types/trait.StaticType.html
105
+ [ `Value` ] : https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/value/struct.Value.html
106
+ [ `Variant` ] : https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/variant/struct.Variant.html
107
+ [ `StaticVariantType` ] : https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/variant/trait.StaticVariantType.html
108
+ [ `Error` ] : https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/error/struct.Error.html
109
+ [ `FileError` ] : https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/enum.FileError.html
110
+ [ `Object` ] : https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/object/struct.Object.html
111
+ [ `GObject` ] : https://docs.gtk.org/gobject/class.Object.html
112
+ [ `gtk4::Widget` ] : https://gtk-rs.org/gtk4-rs/stable/latest/docs/gtk4/struct.Widget.html
113
+ [ `GtkWidget` ] : https://docs.gtk.org/gtk4/class.Widget.html
114
+ [ `Rc<RefCell<T>>` ] : https://doc.rust-lang.org/stable/core/cell/index.html#introducing-mutability-inside-of-something-immutable
115
+ [ `IsA` ] : https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/object/trait.IsA.html
116
+ [ `Cast` ] : https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/object/trait.Cast.html
117
+ [ `ObjectExt` ] : https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/object/trait.ObjectExt.html
118
+ [ `WidgetExt` ] : https://gtk-rs.org/gtk4-rs/stable/latest/docs/gtk4/prelude/trait.WidgetExt.html
119
+ [ `wrapper!` ] : https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/macro.wrapper.html
120
+ [ `wrapper` ] : https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/wrapper/index.html
121
+ [ `boxed` ] : https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/boxed/index.html
122
+ [ `shared` ] : https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/shared/index.html
123
+ [ mod@object ] : https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/object/index.html
124
+ [ `translate` ] : https://gtk-rs.org/gtk-rs-core/stable/latest/docs/glib/translate/index.html
0 commit comments