-
Notifications
You must be signed in to change notification settings - Fork 81
GtkOffscreenWindow? #33
Comments
Gtk Documentation about feature. |
The GtkOffscreenWindow bindings themselves are simple to add, but we have neither GdkPixbuf nor any cairo bindings which would be necessary to get a snapshot of the offscreen window. Which were you planning to use? |
There is a GtkPixbuf implementation in a pull request (#12), so I think first attempting to merge some or all of that in is the first step here. |
OK tnx I assume there are still some issues with GdkPixbuf implementation if it is not merget to the master. |
FYI, those cario bindings you mentioned are dual licensed as LGPL/MPL so I won't depend on them from gotk3 code since we would be statically linking against them. |
Actually I might consider it, MPL should allow static linking. |
If the license becomes an issue, it's probably worth contacting the author and asking if he would mind changing the license. Just throwing it out there. Keep up the good work. :) |
@mdimec4, I saw you started on this using those cairo bindings. I just threw together some GdkPixbuf bindings as well which OffscreenWindow will definitely use when added to gotk3. Would you mind testing them out and see if they work for this? Patch is here: http://sprunge.us/HKMH edit: maybe I'm going crazy. thought I saw you had worked on them and now I can't find it. edit 2: Here's a better version: http://sprunge.us/jHEj I changed the GetPixels function to create and return a go byte slice rather than a uintptr that you must manually add offsets for and use getters/setters to dereference the pointer. No more offsets past the valid portion of the data! (and if you try, you'll hit a Go panic rather than undefined behavior) |
Ok Here is my brunch which is a brunch of a little outdated branch of your work that is bundled with go-webkit2. |
Ok I have tested it. It works. :) I hope there will not be to much problems made by me working in different branch. Import paths are defenetly different. |
Thanks for the patch. I'll review it when I get a chance. |
Ok 2014/1/15 Josh Rickmar [email protected]
|
Taking a look at this now. I'm unfamilar with the cairo library, so I've been looking through the documentation and have some thoughts about how you implemented this: First, I think the cairo stuff should be its own package (like glib, gdk, and gtk are) so GTK code dealing with cairo surfaces would be using a *cairo.Surface. It also seems that the cairo context should be implemented as its own type rather than adding it as a member of the Surface struct. I've committed the GdkPixbuf code to master, btw. |
This change adds a new gotk3 package for Cairo bindings. Currently, there exists support for Surface (cairo_surface_t) and Context (cairo_t). Symbols used have been limited to Cairo 1.10 and not the latest 1.12 because I don't feel like adding yet another build tag to complicate the build process. This is a step towards completing #33.
Ok nice work. |
Add lots of window functions, and move all window functions into its …
Hello
This is a great gtk port, but I am currently missing one thing in it.
I am talking about GtkOffscreenWindow implementation.
Functions to create offscreen window and functions ti access window image.
I am asking if there is any plan to implement this in the near future?
Or if I can tray to implement it to be then merged with master branch?
Best
Miha
The text was updated successfully, but these errors were encountered: