You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.
We have the following goals for the high level APIs like these getters:
Do not expose raw pointers. We have helper function for common cases, you might want to look at the surrounding modules and glib::translate for guidance (example of returning a window). It seems likely that most pointers carried by the events are nullable, so the type would be wrapped in Option (the helper functions can handle that).
Do not expose any of the FFI types (or at least type names) that have higher-level counterparts. If an FFI type hasn't been reexported yet, add it to lib.rs among the others. In particular,
GdkRectangle is currently exposed as cairo::RectangleInt;
strings might translate to &str or Option<&str> or Cow<str> depending on our assumptions, new helper functions will be needed for that.
Integers that aren't expected to be negative (e.g. width, height) should be converted to u32 with assertions ([RFC] Integer signedness story gtk#246, we don't have a settled style for that yet).
Ideally, you should have some idea of how the event can be used. For instance, I'd rather not bind EventProperty at all yet because the properties story is not clear.
The text was updated successfully, but these errors were encountered:
We have the following goals for the high level APIs like these getters:
glib::translate
for guidance (example of returning a window). It seems likely that most pointers carried by the events are nullable, so the type would be wrapped inOption
(the helper functions can handle that).lib.rs
among the others. In particular,GdkRectangle
is currently exposed ascairo::RectangleInt
;&str
orOption<&str>
orCow<str>
depending on our assumptions, new helper functions will be needed for that.u32
with assertions ([RFC] Integer signedness story gtk#246, we don't have a settled style for that yet).EventProperty
at all yet because the properties story is not clear.The text was updated successfully, but these errors were encountered: