Code Monkey home page Code Monkey logo

gdk's Introduction

gtk3-rs CI

This project is UNMAINTAINED. Please take a look at gtk4-rs instead!

The gtk-rs organization aims to provide safe Rust binding over GObject-based libraries. You can find more about it on https://gtk-rs.org.

This repository contains all the "core" crates of the gtk-rs organization. For more information about each crate, please refer to their README.md file in their directory.

Minimum supported Rust version

Currently, the minimum supported Rust version is 1.70.0.

Documentation

Ecosystem

The gtk3-rs repository contains Rust crates for GTK 3. However there is a large ecosystem of GObject libraries and many of these libraries have Rust bindings based on the tooling included in gtk-rs. Of particular note:

  • gtk-rs-core - bindings for some of the core libraries such as glib, gio, pango, graphene
  • gstreamer-rs - bindings for the GStreamer media framework

Additionally, Rust bindings for various libraries are hosted on GNOME's GitLab instance and can be found at https://gitlab.gnome.org/World/Rust.

When using crates that are not part of the gtk-rs repository, you will need to be careful and ensure that they do not pull in incompatible versions of core crates like glib-rs.

Regenerating

To regenerate crates using gir, please use the generator.py file as follows:

$ python3 generator.py

If you didn't do so yet, please check out all the submodules before via

$ git submodule update --checkout

Development

This repository is mostly split into two branches: master and crate. master contains the not yet released code and is where new developments are happening. crate contains the last release source code and isn't supposed to be updated.

This repository is structured as follows:

- crate/
   |
   |-- README.md
   |-- Gir.toml
   |-- Cargo.toml
   |-- src/
   |-- sys/

The crate is a "top" directory (so "atk" or "gdk" in here for example). Each crate contains:

  • README.md: explanations about the crate itself and eventually some details.
  • Cargo.toml: descriptor of the crate, used by cargo and Rust.
  • Gir.toml: configuration used by gir to generate most of the crates' code.
  • src: the source code of the crate.
  • sys: the 1:1 bindings of the C API.

The gir and gir-files top folders are not crates, but are git submodules which respectively contain the gir tool and the gir files used by the generator.

When running generator.py the tool will automatically update these git submodules and run the gir tool on the gir files to regenerate the code.

During development, it is useful to execute the generator with a different version of the gir tool or of the gir files, for instance to test if the code generation is successful before submitting a pull request to update one of the submodules. This can be done by specifying arguments to the generator script, for instance, to run the generator on a local copy of the gir files:

$ python3 generator.py --gir-files-directory ../gir-files/

See python3 generator.py --help for more details.

gdk's People

Contributors

amjad50 avatar bilelmoussaoui avatar danigm avatar dhardy avatar dns2utf8 avatar dvhaeren avatar emmanueltouzery avatar epashkin avatar fengalin avatar gkoz avatar guillaumegomez avatar jashephe avatar lucaswerkmeister avatar philn avatar rillian avatar sdroege avatar stephanvanschaik avatar susurrus avatar trolleyman avatar tutmann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gdk's Issues

&Device.list_axes() Always Returns Empty Vec<Atom>?

I'm not sure if there is something I need to do before using list_axes(&self), but it always returns an empty Vec.
I find this confusing since calling get_n_axes(&self) it will return 3. And additionally, calling get_axes(&self) will return AXIS_FLAG_X | AXIS_FLAG_Y | AXIS_FLAG_PRESSURE.

Is list_axes misbehaving or am I misusing it?

GdkScreen signals

Hello, I would like to be able to use the signals of GdkScreen as described in the documentation. I would implement them, but I am not sure how to do that. Maybe you can help me?

`Event::downcast` is requires clone from event handler

It seems strange that downcast should consume self when we pass by reference elsewhere. Should the handler instead be passed event: gdk::Event to make proper use of your Boxed smart pointer?

fn handler(event: &mut gdk::Event) {
    use gdk::EventType::*;
    match event.get_event_type() {
        ButtonPress | ButtonRelease |
        DoubleButtonPress | TripleButtonPress => {
            let event = event.clone().downcast::<gdk::EventButton>().unwrap();

Failure building gdk on Rust 1.13

My projects have been targetting Rust 1.13 as a minimum build version and I recently ran into a problem building gdk (through the glib and gtk dependencies) for my GUI program:

     Running `rustc /root/.cargo/git/checkouts/gdk-0e2106e2e12a0cc1/8b3342528ee9c85bf5ecf97c788b2cc3d531e7d8/src/lib.rs --crate-name gdk --crate-type lib -g --cfg feature=\"v3_6\" --cfg feature=\"pango\" --cfg feature=\"v3_16\" --cfg feature=\"v3_12\" --cfg feature=\"v3_14\" --cfg feature=\"v3_8\" --cfg feature=\"gdk-pixbuf\" --cfg feature=\"v3_18\" --cfg feature=\"v3_10\" --cfg feature=\"gio\" --cfg feature=\"v3_20\" --cfg feature=\"cairo-rs\" --cfg feature=\"gdk-sys\" -C metadata=1f87422b5add9ed8 -C extra-filename=-1f87422b5add9ed8 --out-dir /builds/susurrus/gattii/target/debug/deps --emit=dep-info,link -L dependency=/builds/susurrus/gattii/target/debug/deps --extern bitflags=/builds/susurrus/gattii/target/debug/deps/libbitflags-1efefdc447eb53f2.rlib --extern glib_sys=/builds/susurrus/gattii/target/debug/deps/libglib_sys-8f1dec70df9c8640.rlib --extern cairo=/builds/susurrus/gattii/target/debug/deps/libcairo-77d84e4bc57ccadc.rlib --extern pango=/builds/susurrus/gattii/target/debug/deps/libpango-7d1db9e45a06c17d.rlib --extern gdk_sys=/builds/susurrus/gattii/target/debug/deps/libgdk_sys-cd0070267421ce7b.rlib --extern libc=/builds/susurrus/gattii/target/debug/deps/liblibc-e1db4c5f3a4f3c2f.rlib --extern gdk_pixbuf=/builds/susurrus/gattii/target/debug/deps/libgdk_pixbuf-06be090bf3460918.rlib --extern gio=/builds/susurrus/gattii/target/debug/deps/libgio-f3f1e1d7dd69eae8.rlib --extern glib=/builds/susurrus/gattii/target/debug/deps/libglib-05904638e40d7bdc.rlib --cap-lints allow -L native=/usr/lib/x86_64-linux-gnu -L native=/usr/lib/x86_64-linux-gnu -L native=/usr/lib/x86_64-linux-gnu -L native=/usr/lib/x86_64-linux-gnu -L native=/usr/lib/x86_64-linux-gnu -L native=/usr/lib/x86_64-linux-gnu -L native=/usr/lib/x86_64-linux-gnu`
error[E0252]: a type named `EventMask` has already been imported in this module
   --> /root/.cargo/git/checkouts/gdk-0e2106e2e12a0cc1/8b3342528ee9c85bf5ecf97c788b2cc3d531e7d8/src/lib.rs:136:9
    |
24  | pub use auto::*;
    |         -------- previous import of `EventMask` here
...
136 | pub use ffi::GdkEventMask as EventMask;
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ already imported

error[E0252]: a type named `WindowHints` has already been imported in this module
   --> /root/.cargo/git/checkouts/gdk-0e2106e2e12a0cc1/8b3342528ee9c85bf5ecf97c788b2cc3d531e7d8/src/lib.rs:151:9
    |
24  | pub use auto::*;
    |         -------- previous import of `WindowHints` here
...
151 | pub use ffi::GdkWindowHints as WindowHints;
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ already imported

error[E0252]: a type named `DragAction` has already been imported in this module
   --> /root/.cargo/git/checkouts/gdk-0e2106e2e12a0cc1/8b3342528ee9c85bf5ecf97c788b2cc3d531e7d8/src/lib.rs:134:9
    |
24  | pub use auto::*;
    |         -------- previous import of `DragAction` here
...
134 | pub use ffi::GdkDragAction as DragAction;
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ already imported

error: aborting due to 3 previous errors

error: Could not compile `gdk`.

These failures occur on x86_64-unknown-linux-gnu, x86_64-pc-windows-gnu, and i686-pc-windows-gnu only for 1.13. The same codebase for nightly and stable (currently 1.15.1) builds succeed.

I guess my first question is this an actual bug, either with our code of 1.13. And secondly, what is the oldest Rust supported by gtk-rs and friends as the README doesn't specify anything?

Add GDK_EVENT_* & GDK_BUTTON_* to the public api

Per the discussion in that chat room

the gdk_button & gdk_event are exposed through the -sys crate only and should be part of the public API

Quoting ebassi

There are a couple of defines that should be in the public API; like GDK_BUTTON_* and GDK_EVENT_PROPAGATE|STOP

GDK Cairo Interaction

GDK offers a number of methods for interfacing with Cairo surfaces. I'd like to see these added, because they can be useful for loading images to render to Cairo surfaces (i.e. gdk_cairo_set_source_pixbuf()). Where would be the best place to add these? Should they be a part of rust-gnome/gdk or would they be better in rust-gnome/cairo?

gdk::WindowAttr should contain an EventMask in the event_mask field

Currently the event_mask field has type i32. The EventMask struct exists and can be built as a bitfield, and then converted using .bits(), yielding an u32 which then needs to be cast in order to be used in the event_mask field. This is somewhat unwieldy, and it would likely be preferable to just have the WindowAttr struct contain the EventMask.

Window function set_titlebar generate gtk-CRITICAL error messages when moving window

Line 41 in sourcefile mainwindow.rs enables moving window by pressing mousebutton over the headerbar in the window. When running the program in shell and moving the window I get this message:

gtk_container_propagate_draw: assertion '_gtk_widget_get_parent (child) == GTK_WIDGET (container)' failed

https://developer.gnome.org/gtk3/stable/GtkHeaderBar.html
(using headerbar with set_titlebar)
For these reasons, GtkHeaderBar is the natural choice for use as the custom titlebar widget of a GtkWindow (see gtk_window_set_titlebar()), as it gives features typical of titlebars while allowing the addition of child widgets.

https://developer.gnome.org/gtk3/stable/GtkWindow.html#gtk-window-set-titlebar
(set-titlebar api)
In gtk refrences it seems that set-titlebar should accept any type of GtkWidget

I am new to rust, gtk, open source and linux programming so excuse stupid misstakes I have made.

example code below
moving_window_error.zip

cairo_interaction::set_source_rgba() is not public

This applies to a lof of the functions in that file. I've been trying to copy some C code and it's converted basically to the following Rust example:

let icon = gtk::DrawingArea::new();
icon.connect_draw(|w, c| {
    let style_context = w.get_style_context().unwrap();
    let foreground = style_context.get_color(w.get_state_flags());
    c.set_source_rgba (&foreground);
});

Unfortunately this doesn't compile because of both the missing get_color() (tracked in gtk-rs/gtk#454), but also because the equivalent of gdk_cairo_set_source_rgba() isn't available. It's implemented in gdk::cairo_interaction and I would think it'd be usable since the c argument to the closure is a cairo::Context. Is there something I'm missing here?

I should note that if you call c.get_clip_rectangle() within the callback it will compile successfully, so I'm wondering if there's a compiler bug that is allowing Context to have two set_source_rgba functions implemented on it and silently ignores the duplicate one?

Event accessors

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 (gtk-rs/gtk#246, we don't have a settled style for that yet).
  • There's a still open question of whether to make keyval type an enum: #105
  • 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.

setting _NET_WM_WINDOW_TYPE(ATOM)

Hi, how can I set this parameter for the ApplicationWindow instance ?
Also, same question for NET_WM_STRUT_PARTIAL and _NET_WM_STRUT(CARDINAL).

Thank you

Object Reform obscures documentation for wrapped types

Although @gkoz's object reform PR improved the handling of wrapped types, it resulted in the generated rustdoc pages not showing the documentation for associated methods (look at the documentation page for Pixbuf for an example). This is probably a rustdoc problem, but is there anything we can do to make the docs visible?

Bindings for gdk_event_request_motions() missing

GDK documentation: https://developer.gnome.org/gdk3/stable/gdk3-Events.html#gdk-event-request-motions

GTK 3.8 and onwards will always compress motion events, unless gdk_window_set_event_compression() is used to disable compression. gdk_event_request_motions() is the recommended way of decompressing the events in a handler, but it seems that the binding for it is missing. An alternative is the gdk_window_get_device_position() function, which does have a binding, but EventMotion doesn't seem to provide a .get_device() method on the Rust side.

Missing clipboard constants

As far as I can tell, this crate is missing bindings to the GDK_SELECTION_CLIPBOARD, GDK_SELECTION_PRIMARY, and GDK_SELECTION_SECONDARY constants. These constants are necessary to implement cut/copy/paste with GTK.

gdk::Seat::grab() panic

I've ported some vala code to rust and noticed that the rust code panics at gdk::Seat::grab().
Am I using the rust bindings wrong or is this a bug?
Vala:
https://github.com/jangernert/FeedReader/blob/master/src/Widgets/ArticleView.vala#L597
WIP Rust:
https://gitlab.com/news-flash/news_flash_gtk/blob/master/src/article_view/mod.rs#L501

Backtrace:

stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:70
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:58
             at src/libstd/panicking.rs:200
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:215
   4: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:478
   5: std::panicking::begin_panic
             at /rustc/2aa4c46cfdd726e97360c2734835aa3515e8c858/src/libstd/panicking.rs:412
   6: gdk::auto::seat::Seat::grab::prepare_func_func
             at ./<::std::macros::panic macros>:3
   7: <unknown>
   8: gdk::auto::seat::Seat::grab
             at /home/jeanluc/.cargo/registry/src/github.com-1ecc6299db9ec823/gdk-0.10.0/src/auto/seat.rs:99
   9: news_flash_gtk::article_view::ArticleView::new_webview::{{closure}}
             at src/article_view/mod.rs:501
  10: gtk::auto::widget::button_press_event_trampoline
             at /home/jeanluc/.cargo/registry/src/github.com-1ecc6299db9ec823/gtk-0.6.0/src/auto/widget.rs:3106
  11: <unknown>
  12: g_closure_invoke
  13: <unknown>
  14: g_signal_emit_valist
  15: g_signal_emit
  16: <unknown>
  17: <unknown>
  18: gtk_main_do_event
  19: <unknown>
  20: <unknown>
  21: g_main_context_dispatch
  22: <unknown>
  23: g_main_context_iteration
  24: g_application_run
  25: <O as gio::application::ApplicationExtManual>::run
             at /home/jeanluc/.cargo/registry/src/github.com-1ecc6299db9ec823/gio-0.6.0/src/application.rs:23
  26: news_flash_gtk::main
             at src/main.rs:72
  27: std::rt::lang_start::{{closure}}
             at /rustc/2aa4c46cfdd726e97360c2734835aa3515e8c858/src/libstd/rt.rs:64
  28: std::panicking::try::do_call
             at src/libstd/rt.rs:49
             at src/libstd/panicking.rs:297
  29: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:92
  30: std::rt::lang_start_internal
             at src/libstd/panicking.rs:276
             at src/libstd/panic.rs:388
             at src/libstd/rt.rs:48
  31: std::rt::lang_start
             at /rustc/2aa4c46cfdd726e97360c2734835aa3515e8c858/src/libstd/rt.rs:64
  32: main
  33: __libc_start_main
  34: _start

relevant crate versions:

[dependencies]
cairo-rs = "0.6"
gtk = { version = "0.6", features = ["v3_22_30"] }
gio = { version = "0.6", features = ["v2_56"] }
gdk = { version = "0.10", features = ["v3_22"] }
gdk-pixbuf = "0.6"
pango = "0.6"
webkit2gtk = { version = "0.6", features = ["v2_16"] }
glib = "0.7"

Any more information I can provide to figure out what's the issue here?

Proposal: use an `Option` for return value of `get_[predicted_]presentation_time()`

get_presentation_time & get_predicted_presentation_time can both return 0 when the value is not available.

In Rust, returning None in this case would make it clear that the value shouldn't be used as is. I tried changing the signature to return an Option using Gir's nullable = true, but it didn't work.

What do you think about this change? If you agree, I'll open a PR.
Is there a Gir-way to handle this or should I use a manual implementation?

GErrors as supplementary returns (+ GQuarks and Error domains)

I recently encountered this thanks to the addition of gdk::PixbufLoader in #11. PixbufLoader's function loader_write(&self, buf: &[u8], error: &mut Error) requires passing a GError (in the form of gdk::glib::Error). In the GDK documentation, the function is looking for a double pointer to memory for an error object, which presumably is only populated when false is returned. In the Rust version, however, we have to pass a fully-instantiated Error struct, which can currently only be created with new_literal(domain: u32, code: i32, message: &str). However, because GQuarks don't appear to be bridged yet, I cannot successfully create Errors because I have no way of determining the domain, and thus cannot write data to PixbufLoaders.

It seems to me that the real problem is that the original double-pointer function signature is not reproduced in a Rustic way. Does anyone have any suggestions? Thanks!

In the interest of full disclosure, I'm a beginner at all of this, so I might just be missing something obvious.

GdkPixbufExt: create_surface doesn't work with a None

I have added in 2e14ec9 the possibility to use the create_surface without passing a GdkWindow.

From what I understand, somehow glib::IsA doesn't seem to work correctly with an Option<gdk::Window> as I keep getting

402 |         let new_surface = pixbuf.create_surface(self.get_zoom() as i32, None).unwrap();
    |                                                                         ^^^^
    |                                                                         |
    |                                                                         expected reference, found enum `std::option::Option`
    |                                                                         help: consider borrowing here: `&None`

using gdk::NONE_WINDOW doesn't seem to help neither. Removing the use of glib::IsA in the patch linked above makes my code pass the build and works.

After reading a bit about the use of glib::IsA https://github.com/gtk-rs/glib/blob/e003445cfa3d32f057b355524e4c832b5273129f/src/object.rs#L76
It seems that I shouldn't have used that in that patch as gdk::Window doesn't implement the ToGlibPtr

Am I missing something or should I send a patch to remove the use of IsA already?

Use of gdk_sys::gdk_screen_get_default()

Hi all,

I'm trying to port some of the logic of devilspie2 into a project written in rust.

https://git.savannah.gnu.org/cgit/devilspie2.git/tree/src/devilspie2.c#n136

    unsafe {
        let _default_display = gdk_sys::gdk_display_get_default();

        let _default_screen = gdk_sys::gdk_display_get_screen(_default_display, 0);
        OR
        let _default_screen = gdk_sys::gdk_screen_get_default();

        let _windows = gdk_sys::gdk_screen_get_window_stack(_default_screen);

        // glib_sys::g_list_foreach (_windows, Some(call_from_c(), ptr::null_mut());             
        
    }
...
(process:15885): Gdk-CRITICAL **: 17:59:10.729: gdk_display_get_screen: assertion 'GDK_IS_DISPLAY (display)' failed

(process:15885): Gdk-CRITICAL **: 17:59:10.730: gdk_screen_get_window_stack: assertion 'GDK_IS_SCREEN (screen)' failed
...

I tried something like "export DISPLAY=:0" but I'm out of ideas.

Generate classes that currently manual

Seems most gdk classes that currently done manual way can be generated now, it add signals support.
Also better generate Monitor and possibly Sink to have full Gdk screen management.

Compilation failing

When I run cargo build (no options or anything) I get:

error[E0046]: not all trait items implemented, missing: `set_geometry_hints`
   --> src/window.rs:174:1
    |
151 |     fn set_geometry_hints(&self, geometry: &gdk_sys::GdkGeometry, geom_mask: WindowHints);
    |     -------------------------------------------------------------------------------------- `set_geometry_hints` from trait
...
174 | impl<O: IsA<Window>> WindowExtManual for O {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `set_geometry_hints` in implementation

error: aborting due to previous error

cc @sdroege @EPashkin

Missing keymaps

Hello! I can not find the api about key map, is it missing?

API stabilization

We should look at adding some structure to the crate's types organization. I don't like putting everything into the top-level namespace.
For example, the pixbufs stuff should stay in the pixbuf module. There we might also want to drop the Pixbuf prefix from most types (e.g. PixbufLoader -> pixbuf::Loader). I'm torn on the latter proposition though because renaming the classes may confuse people who read the official gnome docs. And this policy should be applied uniformly across the project.

Rectangle from_glib_xx problem

Rectangle has implementation of trait FromGlibPtr that contains panic!() in "full" branch.

Implementation mostly unused as Rectangle returned by out.
Only use is converting ffi-struct field in EventExpose.

Converting ffi-struct field IMHO legal usage and we can't disallow it, but panic!() better removed.
I see 2 way to fix:

  • implement From<*const ffi::GdkRectangle> for Rectangle
  • extract FromGlibNonePtr trait

First currently only needed changes in gdk and maybe in user crates.
Second need change almost all crates.
Both seems don't affect Gir.

@GuillaumeGomez, what you think?

PS. This issue also applied for other records that converting by direct copy ("direct" records: PangoRectange, maybe GdkRGBA, ...)

add a method get_root_position() to EventMotion

Sometimes one needs the position relative to the root of the screen rather than the widget.

pub fn get_root_position(&self) -> (f64, f64) {
let x = self.as_ref().x_root;
let y = self.as_ref().y_root;
(x, y)
}

GdkPixbufLoader?

Hi, I've been looking around, and I've been having trouble figuring out if GdkPixbufLoader has been implemented. Is there any chance that it might be implemented in the future, or has it already been done and am I just looking in the wrong place? Thanks a lot!

Pixbuf::new

See discussion on ba7ccfc (comment). Summary:

  • Add Pixbuf::new_uninitialized, directly calls gdk_pixbuf_new
  • Make Pixbuf::new clear its newly allocated buffer
  • Remove unsafe from Pixbuf::new

gdk-sys Cairo Dependency

In Cargo.toml, the gdk-sys dependency is listed as

gdk-sys = "^0"

Doesn't this mean that it's pulled from crates.io rather than from the local copy in the repository? Is that what we want? Is there some way to say, "Depend on the copy of gdk-sys provided in the repository"?

The relevant use case is: edit gdk-sys locally, adding new ffi bindings, then build gdk and discover that it's using the version from crates.io. I know that this can be overridden locally, but if there's a way to change the default behavior, that seems more ergonomic to me.

Failed to compile with gtk_3_16

The error produced is

   Compiling gdk v0.1.2
cargo/registry/src/github.com-0a35038f75765ae4/gdk-0.1.2/src/device.rs:61:5: 65:6 error: duplicate method [E0201]
cargo/registry/src/github.com-0a35038f75765ae4/gdk-0.1.2/src/device.rs:61     pub fn get_vendor_id(&self) -> Option<String> {
cargo/registry/src/github.com-0a35038f75765ae4/gdk-0.1.2/src/device.rs:62         unsafe {
cargo/registry/src/github.com-0a35038f75765ae4/gdk-0.1.2/src/device.rs:63             from_glib_none(ffi::gdk_device_get_vendor_id(self.to_glib_none().0))
cargo/registry/src/github.com-0a35038f75765ae4/gdk-0.1.2/src/device.rs:64         }
cargo/registry/src/github.com-0a35038f75765ae4/gdk-0.1.2/src/device.rs:65     }
cargo/registry/src/github.com-0a35038f75765ae4/gdk-0.1.2/src/device.rs:61:5: 65:6 help: run `rustc --explain E0201` to see a detailed explanation
error: aborting due to previous error
Build failed, waiting for other jobs to finish...
Could not compile `gdk`.

After looking at the source there looks of what could be a copy and paste error starting in Line 54 of Device and Line 61 with both get_vendor_id configured with the same gtk version.

versions rustc: 1.2.0 gtk: 3.16.6 gdm: 3.16.2
using the gdm crate from crates.io

Clean up ciaro interactions

Currently, some methods are implemented as part of the ContextExt which shouldn't be the case.

The PixbufExt isn't loaded on prelude either.

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.