Here comes the 4
It’s been a long time since the last release, and, as you can guess, a lot of things happened in this span of time. Let’s start with the most important one:
gtk-rs now provides bindings for GTK4 libraries!
They are all available in the gtk4-rs repository.
We also wrote an introductory book to teach users how to use gtk4-rs. You can read it here. A more detailed blog post about GTK4 will follow in the next days.
New website and new logo §
We used this occasion to completely re-design the website and also make a logo. Since you’re already here, don’t hesitate to go take a look around!
GNOME Circle §
gtk-rs is now part of the GNOME Circle! It allows our contributors to join the GNOME foundation if they want to in addition to some other benefits. Check the website for more details.
Repositories changes §
This release also saw changes to the gtk-rs repositories structure. We now have three main repositories:
- gtk-rs-core: It contains crates which are considered “core” because they are used
by both GTK3 and GTK4, but also by other projects such as gstreamer-rs:
- cairo
- gdk-pixbuf
- gio
- glib
- glib-macros
- graphene
- pango
- pangocairo
- gtk3-rs: Contains crates which are part of the GTK3 ecosystem:
- atk
- gdk
- gdkx11
- gtk3-macros
- gtk4-rs: Contains crates which are part of the GTK4 ecosystem:
- gdk4
- gdk4-wayland
- gdk4-x11
- gsk4
- gtk4
- gtk4-macros
Another important point about this: all crates in one repository share the same version number now. Before it was a bit of a mess so we decided to simplify it. So here are the version numbers for each repository:
- gtk-rs-core: 0.14
- gtk3-rs: 0.14
- gtk4-rs: 0.1
Documentation improvements §
gtk-rs crates use the C documentation, however we improved its rendering a bit to make it even more useful for Rust developers:
- The items’ links are now correctly generated.
- If code examples are not written in Rust, we now add warnings to avoid confusion.
- We added doc aliases, so you can now search signal names and even C function names directly.
- Global functions, builder patterns, constants and statics are now documented as well.
- Arguments which are C specific and therefore not used in the Rust bindings are not rendered anymore.
Dependencies are re-exported §
Instead of a long explanation, let’s take an example. You have a GTK application and you also use
Cairo and GDK. Before this release, you would add all the 3 dependencies to your Cargo.toml
file
to be able to use them. Now, you only need to import GTK and then you can do:
use gtk::{cairo, gdk};
And that’s it! It’ll make your management of dependencies much simpler. To be noted, relevant traits
are also re-exported in the prelude
, so importing it will give you access to them:
use gtk::gdk;
use gtk::prelude::*;
// ...
// This uses the `gdk::prelude::WindowExtManual` trait, through the prelude.
let w = gdk::Window::default_root_window();
Last note about the re-exports: the -sys
crates are also re-exported under the name ffi
:
use gtk::ffi;
// You now have access to all raw C-functions of GTK.
The Value
trait was refactored §
The main change is that for non-nullable types Value::get()
will never ever return None
,
replacing the previous confusing Value::get_some()
.
In addition it is now possible to Value::get()
a nullable type directly without Option
wrapping. If the value was actually None
this would return an Err
. In cases where the value
being None
was unexpected this avoids one layer of unwrapping.
There is also a new generic ValueType
trait that is implemented by all types that can be used
inside a Value
and that allows storing/retrieving types of this value into/from a Value
.
Added GTK composite template support §
For constructing widgets from a UI file, you can either use gtk::Builder
or composite templates.
With the former, you have to keep an instance of gtk::Builder
around. While with composite
templates, you make your custom widget (a subclass of gtk::Widget
) use the template internally and
with the difference of being able to use your CustomWidget
in a different UI file by defining:
<object class="CustomWidget">
<property name="some-property">some-value</property>
</object>
You can now make your CustomWidget
use the #[CompositeTemplate]
derive macro. The work was done
initially for GTK4 Rust bindings, but was backported to GTK3 as well. See
here or
here for examples.
Composite templates also allow you to use methods defined on your CustomWidget
as a callback to a
signal directly from the UI file, even though the macro doesn’t support that for now for both
GTK3/GTK4 bindings… But don’t worry, we’re working on it!
New and improved macros §
In addition to the glib::object_subclass
attribute macro (see link to paragraph about subclassing
improvements), glib
provides a couple of other macros now for making application development
easier and with less boilerplate:
glib::clone!
: This macro allows automatic cloning or creation of weak references plus upgrading for closures and greatly simplifies creation of signal handler closures. The documentation contains a couple of examples. While this macro existed in the last release already, it was completely rewritten and made more powerful and got a companionderive
macroglib::Downgrade
that extends custom types with the required machinery to be used for weak references in the context of theclone!
macro.glib::GBoxed
andglib::GSharedBoxed
: These derive macros allow using custom Rust types insideglib::Value
s, which is required for example for GObject properties and signal parameters/return values or the content of GTK tree views. The first macro always clones the underlying value when necessary while the second makes use of reference counting instead of normal cloning.glib::gflags!
andglib::GEnum
: These macros allow using Rust enums and bitflags to be used insideglib::Value
s. See the subclassing docs for examples.glib::GErrorDomain
: This derive macro allows using a suitable Rust enum to be used as an error domain forglib::Error
s.
See also the subclassing docs for more examples about the glib::GBoxed
, glib::gflags
and glib::GEnum
macros.
Improvements to subclassing §
Implementing a GObject is simpler, thanks to the introduction of the glib::object_subclass derive
macro. Additionally registering properties and signals now requires less boiler plate. Refer to this page for a complete example but a minimal example would look as follows now:
mod imp {
#[derive(Default)]
pub struct MyObject;
#[glib::object_subclass]
impl ObjectSubclass for MyObject {
const NAME: &'static str = "MyObject";
type Type = super::MyObject;
type ParentType = glib::Object;
}
impl ObjectImpl for MyObject {}
}
glib::wrapper! {
pub struct MyObject(ObjectSubclass<imp::MyObject>);
}
impl MyObject {
pub fn new() -> Self {
glib::Object::new(&[]).unwrap()
}
}
Better cairo error handling §
Using cairo is now more ergonomic: functions like fill()
or stroke()
return a Result
instead of requiring to manually check the Context::status()
. Additionally, all internal calls to expect()
on the cairo status were removed, enabling the caller to handle error conditions, rather than causing a panic
.
Gir tutorial §
gtk-rs crates are mostly generated automatically thanks to the gir project. If you also want to generate your own GObject-based crate bindings, you can use it as well! To help you, we started a tutorial book that is available here.
Naming improvements §
We renamed a lot of functions/methods in order to make them more Rust-compliant. Specifically,
getter functions were renamed from get_something()
to just something()
or is_something()
while the setters stayed as set_something()
. In addition GObject property getters/setters lost
their property designation from the name (i.e. set_property_something()
was replaced by
set_something()
).
On this note:
Note to applications developers §
Applications developers should use fix-getters-calls
to ease migration of their applications. Use fix-getters-def
if you also want your get functions definition to comply with the API standards applied in this
release.
Minimum supported versions §
Rust minimum supported version is now 1.51.
- ATK: 2.18
- Cairo: 1.14
- GDK3: 3.18
- GDK4: 4.0
- GDK4-Wayland: 4.0
- GDKX11: 3.18
- GDK4-X11: 4.0
- GDK-Pixbuf: 2.32
- Gio: 2.48
- GLib: 2.48
- Graphene: 1.10
- GSK4: 4.0
- GTK3: 3.20
- GTK4: 4.0
- Pango: 1.38
- PangoCairo: 1.38
Migration to the Rust 2018 edition §
The gtk-rs crates all migrated to the Rust 2018 edition. Just in time because the 2021 edition is getting close!
Changes §
For the interested ones, here is the list of the merged pull requests:
- translate/TryFromGlib: add shortcut function
- Fix typo in function name
- gio: Only assign to
GError**
s if they’re notNULL
- glib: Mark various Variant getter functions correctly as (transfer fu…
- glib: Fix leaks in FromGlibContainer impls for GString
- glib: Implement main context acquire guard type
- glib: bind freeze_notify and thaw_notify
- Add missing doc aliases
- Add doc alias check
- Add missing doc aliases on variants
- Manually bind g_win32_get_package_installation_directory_of_module
- Add more doc aliases on variants
- glib: Allow creating Variants from slices instead of just Vecs
- Add missing binding for pango::Attribute::new_shape
- Expose the type of pango::Attribute
- glib: add a doc alias for GType
- Generate missing doc aliases for newtypes
- Generate new bitfields values and more doc aliases
- Create Boxed(Value) newtype for Boxed GValue
- Generate missing doc aliases
- gio: allow subtypes as item for Listmodels and improved error message
- Fix graphene-sys tests
- glib-macros: add proc_macro_error attribute to clone
- Fix glib re-export detection for macros
- glib-macros: remove KNOWN_GLIB_EXPORTS
- Let cancellable be passed into GioFuture instead of creating it by the closure
- glib: Duplicate some ObjectClass methods to Interface
- Add missing information for glib clone macro
- Remove duplicated doc aliases
- glib: explain why Clone isn’t implemented on SourceId
- misc: update docs links & repos links
- Add gio::TlsBackend
- glib/functions: fix get_charset logic
- glib-macros: Use absolute paths to the StaticType trait
- glib: Add ObjectExt::connect_notify_local()
- glib/translate: take advantage of Rust Option & Result types
- cairo: Update to system-deps 2.0 like everything else
- glib: Implement Clone for glib::GString
- glib: Require all the Value traits to be implemented for ObjectType
- Clone to proc macro
- glib::Binding improvements
- Fix clone macro by allowing returned value with type parameters
- gio/sys: resolve winapi reference
- gio: Add
Settings::bind_with_mapping()
binding - glib: Hook up dispose() in ObjectImpl
- glib: Add an
Object::new_subclass()
function - Rename glib_wrapper! and glib_object_subclass! to wrapper! and object_subclass!
- glib: implement FromGlibContainer for GString
- From glib unsafe
- pango: export Glyph* manual types
- pango: implement FromGlibContainerAsVec for GlyphInfo
- glib: Add documentation for SignalHandlerId
- Fix weird indent in glib/Gir.toml
- Add checks in Date methods
- Add bindings for GTask
- Make DateTime Option returns into Result
- Make gio::File::get_uri_scheme() nullable
- In glib_object_wrapper!, use generic Class type instead defining a struct
- gio: use default methods when possible for ActionGroup
- gio: Add
glib-compile-resources
wrapper, and macro to include - Implement StaticType on ()
- glib-macros: Make
GBoxed
not require importingBoxedType
- gio: Remove unneeded trailing semicolon
- Cairo: make status() public
- gio: Add DBusActionGroup
- Keep glib::clone spans for proc macros
- glib: rename TypeData::interface_data to class_data
- glib: ignore new clippy warnings for now
- cairo: Update system-deps dependency to 3.0
- glib: Correctly mark future returned by ThreadPool::push_future() as …
- gio: Mark ETag out parameter in various GFile functions as nullable
- gio: File::get_child() is not nullable
- SignalId: add missing methods
- glib: rename remaining _generic to _values
- glib: Derive Ord on Type
- glib: Improve the API of Type
- glib-macros: Forward the visibility of the type into the code generated
- connect_unsafe: Refactor, then don’t ignore the return_type for null objects
- glib:
#[object_subclass]
proc macro. - glib: Move
type_data()
andget_type()
to newunsafe trait
- cairo: add doc aliases round 1
- object: Return a pointer from get_qdata, not a reference
- Store class_data/instance_data hashmaps directly instead of boxing an…
- glib: Add _once variants to many methods
- glib: add ObjectExt::connect_id & other variants
- glib: Distinguish between classes and interfaces at the type level
- Add support for async blocks in clone macro
- Update to GLib 2.68.0
- glib: Fix compilation of listbox_model example
- glib: Don’t offset property ids before calling ObjectImpl::set_proper…
- Add a GError derive macro
- glib-macros: Fix typo: domain -> domain
- Fix some clone @default-return handlings
- Fix panic when there is no @default-panic and add more checks for clone macro
- glib: Actually call the function in _once wrappers
- pango: Fix x_to_index docs
- Remove optional $rust_class_name argument from glib_wrapper!
- cairo: don’t include freetype by default
- glib: Implement StaticType, FromValue(Optional)? and SetValue(Optional)? for Value
- glib: add Error::into_raw()
- glib: bind WeakRef::set()
- Improve/fix NULL handling in GString
- glib: add some unit tests for translate
- glib: Remove glib::TypedValue
- glib: add Array wrapper
- glib: glib-macros: add SharedType and Shared derive macro
- glib: mark ParamSpecType trait as unsafe
- glib: Remove un-generatable type UriParamsIter
- Update to proc-macro-crate 1.0
- glib-macros: Try harder to find glib
- glib: Only allow canonical names in property and signal builders
- Fix clone macro docs
- [docs] Some changes to glib intro
- glib-macros: Don’t assume
glib::StaticType
is in scope in the gener… - glib: bind g_signal_has_handler_pending
- glib/value: impl StaticType for Option<T> when applicable
- glib: manually bind g_unix_open_pipe
- ToGlib should take Self
- Impl IntoGlib for Result…
- glib:
From
andTryFrom
implementations for working withChar
- Fix gio file constructors names
- glib-macros: do not export ::type_() for boxed types
- glib: Make use of g_source_set_dispose_function() in 2.64+ to fix a r…
- glib: fix some nullables
- glib: add VariantTy::any()
- gio: Fix callbacks of bus_watch_name
- gio: rename spawnv to plain spawn
- gio: Rename TlsConnectionManualExt to ExtManual and export from prelude
- Add missing gio reexports
- Make cairo error handling slightly better
- Use
Object<T>::as_mut()
without unsafe, and a couple other small things - Fix entry_completion quit shortcut
- Move to edition “2018”
- inet_socket_address: Add std::net::SocketAddr conversions
- Allow log_domain to be null
- Replace all Into impls with the corresponding From impls
- Reexport sys dependencies
- migrate to 2018 edition
- Improve naming
- gtk: backport fix compute_expand vfunc
- Subclassing for GtkButton
- Add composite templates
- Add ListModel subclassing support
- Replace manual enum functions with autogenerated ones
- Regenerate everything with latest gir
- Macro parser improvements
- Add new pango attributes
- Implement derive macro for Downgrade/Upgrade traits
- subclass: Hook up instance_init()
- 2015 cleanup
- Add more aliases
- More checks and add missing license headers
- docs: update per the new macro names
- export deps from gtk
- Consistently re-export subclassing preludes of dependency crates
- Minor type / value improvements
- Reduce external dependencies for futures-related things
- Remove useless badges info
- Regenerate with latest gir/gir-files, remove use_boxed_functions
- add manual doc aliases
- gio: add Windows stream types
- A couple minor improvements
- gtk: Implement Deref for TemplateChild
- add ActionMap/ActionGroup subclassing support
- examples: Use autobins
- Add Dialog::run_future()
- Subclassing refactoring
- Remove dependency on itertools
- Mark ‘key’ parameter nullable for KeyFile’s get_comment()
- Update to system-deps 3
- gtk: specify template as an attribute of CompositeTemplate
- gdk: Use cairo::Format instead of i32 for the format in Window::creat…
- gtk: Take (column, value) tuples instead of separate slices for the t…
- Added screenshots to example readme
- Make virtual methods take wrapper of type, not parent
- gtk: use “assertion” = “skip” instead of manual implementation
- API changes due to signal-detail PR to gir
- Implement ListBoxRowImplExt for activate method
- gtk: Add
enter_notify_event
andleave_notify_event
toWidgetImpl
- Subclass cleanup
- Add a way for the subclassing infrastructure to add per-instance management data
- Add support for chaining up to parent interface implementations
- Make
drag-motion
anddrag-drop
signals returnbool
instead ofInhibit
- Use girs_directories option from
Gir.toml
files instead of using “-d” by default on gir - Fix async clone closures handling
- Don’t need serial_test_derive
- Fix use of gflags attribute in the subclass example
- Add layout.rs, and manual LayoutLine::x_to_index impl
- Expose layout line fields
- Replace _new constructor for Unix/Win32 Input and Output streams
- generator: Iterate gir directories passed on the command line
- Fix clippy lints
- add access to analysis.extra_attrs
- Fix #392 export gdk::event::FromEvent
- Move examples to separate folders
- Examples fixes
- Further refactor examples
- Refactor example to modules
- Refactor CSS and dialog example
- Add ValueArray::len()/is_empty()
- Improve Debug output for GString, SendValue
- gio: do not take args in application.run()
- gio: Mark
DBusProxy
assend+sync
and regenerate - gio: implement enumerate_children_async
- Add Ecosystem section to the README
- Add minimum Rust supported version
- Continue refactoring the examples
- gtk: make all with_label and with_mnemonic constructors consistent
- [gtk] Do not return Result from Application::new()
- [gtk] Small Gir.toml cleanup
- Remove get for getters & properties where applicable
- Return Options for new UnixMountEntry
- [docs] Some changes to gtk intro
- set minimal features for syn/futures crates
- Get removal round 2
- list_model: Rename object to item
- Value trait refactoring
- Remove doc generation features
- Don’t re-export traits from crate root
- gtk: Add
WidgetClassSubclassExt::{css_name,set_css_name}
- gtk: rename StyleContext::property to StyleContext::style_property
- Regen with latest gir
- Add rename doc aliases
- error: remove misleading example
- gtk: Add binding for
gtk_container_class_handle_border_width()
- gtk: Add run_future() for native dialogs
- Fix new 1.52 clippy warnings
- remove the deprecated functions/reduce the number of disabled clippy linters
- Update minimum versions to versions available in Ubuntu 16.04
- Add a variant prop to the example
- Split core
- Update URLs
- Fix links to GIO examples
- README: it’s gtk3-rs
- Update issue templates
- Replace invalid repository name
- gtk: adapt per glib::MainContext changes
- Icon size property fix
- gdk: Fixes for keymap/keysym API
- Add missing doc aliases
- Add doc alias check
- gtk: drop MainContext check
- More doc aliases
- regen with latest gir
- Update crates version for next release
- Ignore tmp emacs files
- Upgrade gtk3-macro crate version to 0.14.0
- Remove special handling for Window::present on mac
- regen with latest gir
- Gir update and example adjustment
- Generate missing doc aliases for newtypes
- Regen (new bitfields values and more doc aliases)
- Add more doc aliases
- Fix README files format
- Fix git URLs
- Add minimal crate info
- Rename project to “gtk-rs”
- image: pre-install wget
- Fix duplicate doc aliases
- Fix outdated docs overview link
- Fix icon-size property type issue
- Fix clippy warnings
- misc: update docs links & repos links
- Regenerate with gtk 3.99.3
- gtk4: update subclasses to the latest glib
- regenerate with gtk 3.99.4
- Generate gdk4-x11
- gtk4: remove unneeded atk dependency
- gdk4-wayland: generate bindings
- gdkx11: fix crate name
- Gtk subclassing round 1
- Subclassing round 2
- Widget subclass
- Add some trust_return_value_nullability’s for gtk
- Port builder_basics from gtk-rs/examples4
- Update to 2018 edition
- 2018 migration fixes
- Add initial support for GTK composite templates
- subclass/widget: Rework the default measure() vfunc
- gtk: fix widget’s set_focus_child implementation
- Subclassing round 4
- Port examples builders, clock from gtk-rs/examples4
- Subclassing part 3
- gtk: add TextBuffer/TextView subclassing support
- backport CellRenderer/CellRendererText subclasses
- gtk: subclassing round 7
- gtk: fix compute_expand implementation
- gtk4/subclass: Add composite template support to prelude
- port css and entry_completion from gtk-rs/examples4
- Fix some nullable return annotations 2
- gtk: nullability trust part 3
- gtk: implement From cmp::Ordering
- Macro parser improvements
- Regen with gtk 3.99.5
- Add 2 widget class methods
- regen with the latest gir-files
- Add a Widget subclass example
- gtk: add more WidgetClass methods
- gtk: regen from the latest gir-files
- examples: Move unparent to dispose()
- gtk: backport application subclass startup override
- Hook up gtk_widget_init_template() into InitializingObject
- Use manual gdk::Rectangle from gdk3-rs bindings
- Regenerate with gtk 4.0.0
- Update per glib macros names changes
- More doc alias
- Rexport dependencies from gtk
- port text_viewer from gtk-rs/examples4
- gdkx11/gdkwayland: export missed dependencies
- simpler callbacks: avoid Option<Box<Q>>
- Add doc aliases to manual types
- gtk subclassing: re-export preludes of dependencies as well
- gdk: add Paintable subclassing support
- Manually Implement Custom Sorter & Filter
- gtk: Add Orientable subclassing support
- gtk: generate ApplicationBuilder manually
- gtk: allow setting layout_child_type on GtkLayoutManager
- gdk: properly export all consts
- Add Dialog::run_future()
- examples: Use autobins
- Add Dialog::run_async
- Implement Deref for TemplateChild
- gtk: subclassing round 8
- gdk: manually implement Event and it’s subclasses
- Subclassing round 9
- gtk: subclassing round 6
- Specify template as an attribute of CompositeTemplate
- examples: update per subclassing changes
- Ignore CustomLayout
- subclass/widget: Ensure TemplateChild types are registered
- gtk: Remove outdated Gir.toml downstream fixes
- widget: Implement Debug for TickCallbackId
- Some small fixes
- gtk: add BuilderScope subclassing support
- gtk: add IMContext subclassing support
- gdk: bind gdk_gl_texture_new
- gtk: set the controller signals that return inhibit
- regenerate with detailed signals support
- gtk: make sure gtk::disable_setlocale has to be called before gtk::init()
- gtk: use “assertion” = “skip” instead of manual implementation
- gtk: mark manually implemented functions as such
- More doc aliases
- gtk: add Expression bindings
- update per glib::object_subclass changes
- gtk: more manual stuff
- Update per subclassing changes
- gtk: update per glib changes
- update subclassing per gtk-rs/gtk-rs#342
- more manual gtk stuff
- more manual stuff 2
- correctly make RenderNode not a glib::Object
- subclassing: interfaces are now distinct from objects
- interfaces chain up
- gtk: add more WidgetClass methods
- more manual stuff
- gir: regen with always generate builder
- gtk: add subclassing support for more types
- more manual stuff
- Examples: remove
get
from video_player - Examples: move .ui files into separate folder
- gtk: Application subclass initialization fix
- attempt of a new readme format
- gdk: add ToplevelExtManual to prelude
- gtk: disable more printer stuff on non-unix platforms
- gtk: ShortcutTriggerExtManual traits to prelude
- Move the examples into separate folders
- gtk: add features to re-export gdk-x11 & gdk-wayland
- Properly expose features
- examples: remove the duplicate custom editable
- Read dropped application subclass example
- Add book
- Add book to README
- gtk: make ShortcutTrigger::compare return a cmp::Ordering
- misc: bump default features
- Specify naming of types, signals & properties
- Finish up prerequisites
- Accommodate Gio changes
- Put listings into the shared workspace
- gtk: expose KeyvalTrigger
- Update display of minimum supported Rust version
- get_widget_name return annotation fixed upstream
- gdk-x11: manual impl get_xdisplay and get_xsreen
- Use relative paths to gtk4-rs docs
- Use Error::into_raw()
- Refactor custom objects in own modules
- Take str for with_label and with_mnemonic constructors.
- [gtk] Update to gtk3 handling of Application
- mark EventKind/IsExpression/IsRenderNode as unsafe
- [docs] Adds an introduction for the gtk4 crate
- Remove get for getters & properties where applicable
- no more boxes
- bump min required rustc
- readme: include a note about the other libs part of the ecosystem
- Get removal round 2
- more widget class methods
- new generator & fancy updated docs
- Improve signals
- README: Add Video Trimmer to the app list
- Cleanup leftovers from the remove-get-changes
- Value trait refactoring
- gtk: fix measure & add a layout manager example
- move ExtManual traits to prelude only
- add missing doc_trait_name & few fixes
- Re-export glib::signal::Inhibit to gtk4 crate root like gtk3’s bindings.
- Add examples to README
- gtk: bind WidgetClass::query_action
- Rename ToGlib into IntoGlib
- Accommodate changes in glib::Value
- gdk: make ContentProvider subclassable
- Put modules of examples in separate files
- gdk: manually bind ContentFormats::mime_types
- gdk: accept NULL GCancellable*
- gdk: ContentFormats use transfer none instead of container
- Add grid_packing example from the upstream C repository.
- gtk: rename MediaStream::error to MediaStream::set_error
- gtk: make ClosureExpression’s api a bit nicer
- gtk: bind BitsetIter manually
- split expressions/events to multiple files
- Properly mark functions as renamed
- gdk: fix ContentProvider::write_mime_type_async
- gtk: add getters/setters for Border
- reduce usage of allow clippy
- use Self where appropriate part 2
- gtk: add FontChooser/TreeModelFilter subclassing support
- Subclassing round 11
- regen with latest gir & re-enable let_and_return lint
- Add rename doc aliases + rename prop notify signals as connect_*_notify
- gtk: expose invalid pos
- Add “Saving Window State” chapter
- gtk: Builder is final
- Fix new 1.52 clippy warnings
- gtk: Put module of
list_view_apps_launcher
in separate folder - gtk: use transfer full for property expression
- misc: drop x11/wayland features from gtk4 crate
- gdk: unmark *_async callbacks as Send
- gtk: Add run_future() for native dialogs
- gtk: add ParamSpecExpression
- gtk: drop duplicate getter/setters on SearchBar
- gtk: make show_about_dialog’s behaviour more like the upstream one
- Update URLs pointing to gtk-rs
- Add search_bar example from the upstream C repository.
- gtk: bind functions::test_list_all_types
- examples: point to gtk-rs-core ones
- gtk: manually bind ConstraintLayout::add_constraints_from_description
- drop not needed subclassing
- misc: add missing doc aliases
- gdk fixes
- Add doc alias check
- gtk: drop MainContext check
- gtk: stop abusing pattern and use name instead
- gtk response type
- gtk: ignore css_parser_warning_quark
- gir: enums fixes
- gdk: ignore n_ranges params in
- book: Upgrade license to Creative Commons Attribution 4.0
- book: Take advantage of the newly introduced
builder
method - drop not useful builders & generate missing ones
- Gir fixes & regen
- gdk: mark some types as non final
- glib wrapper out of macros
- gtk: register actions on the subclassed widget
- tests: drop extern crate
- misc: add doc aliases on manual types
- gtk: panic if gtk wasn’t init at class_init/interface_init
- gtk4 macros test
- gtk: add Buildable subclassing support
- gtk: mark buildable_get_id as nullable
- Use ::builder() in doc examples
- Generate missing doc aliases for newtypes
- Regen (new bitfields values and more doc aliases)
- use ffi values instead of integers for bitfields
- Add more doc aliases
- book: Scalable lists chapter
- less ext manual traits
- book: Fix links in lists chapter
- examples: fix per glib-macros changes
- gdk-wayland: add missing prelude
- Add an intro to all crates
- docs: replace rust-logo with gtk-rs logo on the CI stage
- Fix outdated docs overview link
- A few miscellaneous book improvements
- gtk: don’t generate a builder for ListItem/BuilderListItemFactory
- gtk: don’t generate a builder for *Page objects
- [regen] Fix duplicate doc aliases
- add missing gsk function & docs fixes
- gtk: TreePath fixes
- gdk texture fixes
- gtk: TreeStore/ListStore are final
- gdk: add a RGBABuilder
- Fix clippy warnings
- misc: update stable docs links
- Book: Fix outdated and dead links
All this was possible thanks to the gir project as well:
- Specify link attribute for Windows to be happy
- Properly handle error-domain
- Add per-crate and per-object configuration to trust return value nullability
- Generate error quark functions in -sys mode if they exist
- toml: use new system-deps versions syntax
- Make sure that closures in global functions require Send+Sync
- Use char::TryFrom::<u32> to convert from UniChar
- Do not pass $rust_class_name to glib_wrapper!
- Generate doc cfg attributes for more beautiful docs
- Don’t warn on docsection elements
- Try to fix Windows CI
- Simplify
match
blocks into?
operator using SSR - codegen/enum: Do not generate doc(cfg) on match arms
- This is not needed any longer
- Switch to 2018 edition
- config/members: add manual to wanted check
- Switch to doc cfg instead of feature dox
- codegen: Explicitly use glib::Value instead of importing
- codegen: Add version condition on special function traits
- Use write_str instead of write_fmt when no formatting is needed
- Revert “Switch to doc cfg instead of feature dox”
- cargo_toml: Do not overwrite library name for unversioned system-deps
- don’t be verbose on missing c:type on internal fields
- Use
cargo:warning
instead ofeprintln!
for printing warnings - Generate
impl
blocks for associated enum functions - Improve final type heuristic to also check for unknown instance structs
- Make calls to from_glib unsafe
- Doc aliases for C functions
- Fixed issue generating the -sys/Cargo.toml
- cargo_toml: Do not overwrite system-deps version if already set
- Use new glib::Object::new() syntax
- Use
wrapper!
instead ofglib_wrapper!
- Generate doc aliases for enums and constants too
- Add an error in case a name field has content of the pattern field
- Unify toml comments format in README
- Fix import of BoolError in glib
- Remove use_boxed_functions override
- function: Teach gir how to generate whole functions as unsafe
- Add extra_dox_features config setting
- codegen: Omit mut_override from boxed copy if parameter is *const
- analysis: Move global imports to object-specific analysis and under versioning constraints
- Honor the PKG_CONFIG env var in the codegen for abi tests
- Add documentation in case this is an abstract class
- codegen: rework ABI tests to use a single C program for each test
- Fix new clippy warning in generated C tests
- sys: use system-deps 3.0
- doc_alias: don’t generate if the enum c_name = rust_name
- Consider nullability of out parameters in normal and async functions
- signals: rename emit to emit_by_name
- codegen: Avoid a dead code warning in ABI tests
- assertions: add a not initialized variant
- README: fix object.function “assertion” key name
- Add support for connecting to signals with details
- Also populate interface structs in addition to class structs
- Extend –gir-directory (into –gir-directories) to be able to pass multiple gir directories
- “canonicalize” paths
- add an option to always generate builder patterns
- sys mode: allow clippy warning upper_case_acronyms
- config: “Canonicalize” ../ away from relative git paths
- Omit version constraints if the surrounding scope already guards these
- [1/3] Emit intra-doc links for self (
@
) references - config: Normalize submodule path before looking it up in .gitmodules
- Remove get for getters
- Fix renamed functions not being documented
- analysis/record: Do not bail on missing memory functions
- doc: Use intra-doc-links instead of relative paths to html pages
- config,git: Omit gir directory hash and URL if not a submodule
- Get removal round 2
- Import generator.py from gtk-rs
- Value trait refactoring
- docs: manual traits are in prelude only
- codegen/object: Only re-export traits from
traits
/prelude
module - codegen/general: Emit “Since vXXX” in #[deprecated] attributes
- codegen/doc: Omit “Feature:
vXXX
” text in favour of doc_cfg - [3/3] Emit intra-doc-links for symbol references
- [2/3] Emit intra-doc links for function references
- analysis/properties: Remove unused ToValue import for property getters
- codegen: take Self for Copy types
- out_param: follow aliases for imports
- build: Rerun if git hash changed
- Fix some clippy::use_self warnings in generated code
- doc: Always consider
trait_name
fromGir.toml
in implementation docs - codegen: only use ret if a builder_postprocess is set
- codegen: add missing } for build pattern
- Add rename doc aliases
- codegen/enums: Keep emitting name of
Self
in string literals - TryFromGlib support
- config/function: allow forcing ‘constructor’ annotation
- codegen: Emit
crate::
for all global%
constants except from prelude - doc: Link trait functions in
prelude
- [RFC] codegen/doc: Simplify links by allowing
Self::
andcrate::
prefix - funct async: use codegen name for _future funct
- Fix some clippy/compiler warnings
- git: Read remote url from upstream or origin
- Use try_from_glib shortcut
- codegen/sys: Use pointer formatting literal to print address of self
- Stop dereferencing followed by reborrowing in
match
andif let
- codegen: default to gtk-rs-core for sys crates
- Rename
do_main
tomain
- codegen/doc: Drop
[Deprecated]
text in favour of Rust annotations - codegen/object: Add missing deprecation attribute to builders
- docs: generate docs for builder properties
- docs: ignore not useful function parameters
- docs: generate docs for global functions
- docs: fix a missing param due to not rebasing #1151
- codegen: use C value instead of hardcoding it
- docs: use doc_ignore_parameters for global functions as well
- codegen: generate a builder method for objects with a Builder
- codegen: generate impl T if there are builder properties as well
- [refactor] Simplify handling of trait bounds and aliases
- codegen/doc: Make extension trait docs link back to the type
- docs: properly look for renamed enum members
- docs: use renamed function name for records as well
- docs: filter out final types from implements trait list
- enums,flags: Always analyze manual types
- flags: generate doc aliases
- enums,flags: Do not analyze imports if the type is not generated
- Docs: refactored + GI Docgen support
- docs: look for renamed properties getters/setters
- codegen: make the builder method doc slightly better formatted
- Generate doc aliases on items in wrapper! macro
- use C const for flags variants
- Fix sys crate name for bitfields
- analysis/function: Don’t link docs that are commented or invisible
- codegen/doc: Generate links for enum/flag functions/methods
- Add float format to PRINT_CONSTANT
- enum,flags: Take
version=
attribute in XML for members into account - Add support for cfg_condition on enum variants and bitfields and fix cfg_condition for enums and bitfields
- Let cancellable be passed into GioFuture instead of creating it ourselves
- Don’t generate duplicated doc aliases
- Move tutorial & configurations docs to an mdbook
- docs: properly handle trait name for manual methods
- Rust 1.53: Use the new nested or_patterns
- Generate warnings for code examples
- Remove extra & to fix clippy lint
- Fix a/an grammar by changing the sentences.
- Fix link to builder pattern explanation
Thanks to all of our contributors for their (awesome!) work on this release:
- @A6GibKm
- @AaronErhardt
- @abdulrehman-git
- @aknarts
- @alatiera
- @andy128k
- @bilelmoussaoui
- @BrainBlasted
- @bvinc
- @chengchangwu
- @cmyr
- @Cogitri
- @deanleggo
- @derekdreery
- @dns2utf8
- @elmarco
- @federicomenaquintero
- @felinira
- @fengalin
- @gdesmott
- @george-hopkins
- @grantshandy
- @GuillaumeGomez
- @haecker-felix
- @heftig
- @hfiguiere
- @Hofer-Julian
- @idanarye
- @ids1024
- @jplatte
- @jsparber
- @kavanmevada
- @Krowemoh
- @lucab
- @MarijnS95
- @matzipan
- @mbiggio
- @mehmooda
- @palfrey
- @pbor
- @piegamesde
- @sdroege
- @seungha-yang
- @SolraBizna
- @sophie-h
- @vamsikrishna-brahmajosyula
- @wonchulee
- @YaLTeR
- @zec