Skip to content
This repository was archived by the owner on Jun 8, 2021. It is now read-only.

Fix up cairo interaction extension traits #312

Merged
merged 1 commit into from
Sep 5, 2019
Merged

Fix up cairo interaction extension traits #312

merged 1 commit into from
Sep 5, 2019

Conversation

sdroege
Copy link
Member

@sdroege 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
@@ -10,11 +10,11 @@ use glib::object::IsA;
use glib::translate::*;
use {Rectangle, Window, RGBA};

pub trait SurfaceExt {
pub trait GdkSurfaceExt {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Gdk"SurfaceExt?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO yes, as "it comes from GDK"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine then

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just like we have GtkWindowExt for example

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is all too complicated for me.

@EPashkin
Copy link
Member

EPashkin commented Sep 5, 2019

@sdroege Thanks, 👍

@sdroege
Copy link
Member Author

sdroege commented Sep 5, 2019

@GuillaumeGomez all green

@GuillaumeGomez
Copy link
Member

Thanks!

@GuillaumeGomez GuillaumeGomez merged commit 07eac11 into gtk-rs:master Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clean up ciaro interactions
3 participants