Skip to content
Browse files

add EventConfigure, wrap gdk_x11_drawable_get_xid

  • Loading branch information...
1 parent 89385da commit b4cf963e6f4b6a094a00cbbd506d4ce37c9efdac @salviati salviati committed
Showing with 12 additions and 1 deletion.
  1. +7 −1 gdk/gdk.go
  2. +5 −0 gtk/gtk.go
View
8 gdk/gdk.go
@@ -2822,7 +2822,13 @@ type EventFocus struct {
}
type EventConfigure struct {
- // TODO
+ Type int
+ Window unsafe.Pointer
+ SendEvent uint8
+ X int
+ Y int
+ Width int
+ Height int
}
type EventProperty struct {
View
5 gtk/gtk.go
@@ -6,6 +6,7 @@ package gtk
/*
#include <gtk/gtk.h>
#include <gdk/gdk.h>
+#include <gdk/gdkx.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
@@ -1989,6 +1990,10 @@ func (v *GtkWindow) Resize(width int, height int) {
C.gtk_window_resize(C.to_GtkWindow(v.Widget), C.gint(width), C.gint(height))
}
+func (v *GtkWindow) XID() int32 {
+ return int32(C.gdk_x11_drawable_get_xid( (*C.GdkDrawable)(unsafe.Pointer(v.Widget.window)) ))
+}
+
// gtk_window_set_default_icon_list
// gtk_window_set_default_icon
// gtk_window_set_default_icon_from_file

0 comments on commit b4cf963

Please sign in to comment.
Something went wrong with that request. Please try again.