-
-
Notifications
You must be signed in to change notification settings - Fork 20
Fix up cairo interaction extension traits #312
Conversation
- 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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Gdk"SurfaceExt?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine then
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
@sdroege Thanks, 👍 |
@GuillaumeGomez all green |
Thanks! |
already exists as PixbufExt::create_surface()
context as &self
GL resources, which are basically like pointers and must be taken care
of to be correct and valid.
conflicts.
Fixes #308