Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix up cairo interaction extension traits #312

Merged
merged 1 commit into from Sep 5, 2019

Conversation

@sdroege
Copy link
Member

sdroege commented Sep 5, 2019

  • Remove duplicated ContextExt::cairo_surface_create_from_pixbuf(). It
    already exists as PixbufExt::create_surface()
  • Rename ContextExt::cairo_draw_from_gl() to draw_from_gl() and take the
    context as &self
  • Mark ContextExt::draw_from_gl as unsafe! It takes random integers for
    GL resources, which are basically like pointers and must be taken care
    of to be correct and valid.
  • Change all functions taking a gdk::Window to take a IsAgdk::Window
  • Rename all traits to include the Gdk prefix for preventing naming
    conflicts.

Fixes #308

- Remove duplicated ContextExt::cairo_surface_create_from_pixbuf(). It
  already exists as PixbufExt::create_surface()
- Rename ContextExt::cairo_draw_from_gl() to draw_from_gl() and take the
  context as &self
- Mark ContextExt::draw_from_gl as unsafe! It takes random integers for
  GL resources, which are basically like pointers and must be taken care
  of to be correct and valid.
- Change all functions taking a gdk::Window to take a IsA<gdk::Window>
- Rename all traits to include the Gdk prefix for preventing naming
  conflicts.

Fixes #308
@sdroege sdroege force-pushed the sdroege:cairo-interaction branch from bae53e4 to e0f17db Sep 5, 2019
@@ -10,11 +10,11 @@ use glib::object::IsA;
use glib::translate::*;
use {Rectangle, Window, RGBA};

pub trait SurfaceExt {
pub trait GdkSurfaceExt {

This comment has been minimized.

Copy link
@GuillaumeGomez

GuillaumeGomez Sep 5, 2019

Member

"Gdk"SurfaceExt?

This comment has been minimized.

Copy link
@GuillaumeGomez

GuillaumeGomez Sep 5, 2019

Member

It comes from GDK but do we really want to name it like this?

This comment has been minimized.

Copy link
@EPashkin

EPashkin Sep 5, 2019

Member

IMHO yes, as "it comes from GDK"

This comment has been minimized.

Copy link
@sdroege

sdroege Sep 5, 2019

Author Member

Yes?

This comment has been minimized.

Copy link
@GuillaumeGomez

GuillaumeGomez Sep 5, 2019

Member

Fine then

This comment has been minimized.

Copy link
@sdroege

sdroege Sep 5, 2019

Author Member

Just like we have GtkWindowExt for example

This comment has been minimized.

Copy link
@GuillaumeGomez

GuillaumeGomez Sep 5, 2019

Member

This is all too complicated for me.

@EPashkin

This comment has been minimized.

Copy link
Member

EPashkin commented Sep 5, 2019

@sdroege Thanks, 👍

@sdroege

This comment has been minimized.

Copy link
Member Author

sdroege commented Sep 5, 2019

@GuillaumeGomez all green

@GuillaumeGomez

This comment has been minimized.

Copy link
Member

GuillaumeGomez commented Sep 5, 2019

Thanks!

@GuillaumeGomez GuillaumeGomez merged commit 07eac11 into gtk-rs:master Sep 5, 2019
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.