Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #133 from boutros/master

gtk_window type_hint
  • Loading branch information...
commit c2b14a7fd06fda4e18b61c0bba3daf99682a0590 2 parents fd62ab7 + c96345b
@corebob corebob authored
Showing with 26 additions and 3 deletions.
  1. +19 −0 gdk/gdk.go
  2. +7 −3 gtk/gtk.go
View
19 gdk/gdk.go
@@ -443,6 +443,25 @@ const (
GDK_ACTION_ASK GdkDragAction = 1 << 5
)
+type GdkWindowTypeHint int
+
+const (
+ GDK_WINDOW_TYPE_HINT_NORMAL GdkWindowTypeHint = 0
+ GDK_WINDOW_TYPE_HINT_DIALOG GdkWindowTypeHint = 1
+ GDK_WINDOW_TYPE_HINT_MENU GdkWindowTypeHint = 2
+ GDK_WINDOW_TYPE_HINT_TOOLBAR GdkWindowTypeHint = 3
+ GDK_WINDOW_TYPE_HINT_SPLASHSCREEN GdkWindowTypeHint = 4
+ GDK_WINDOW_TYPE_HINT_UTILITY GdkWindowTypeHint = 5
+ GDK_WINDOW_TYPE_HINT_DOCK GdkWindowTypeHint = 6
+ GDK_WINDOW_TYPE_HINT_DESKTOP GdkWindowTypeHint = 7
+ GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU GdkWindowTypeHint = 8
+ GDK_WINDOW_TYPE_HINT_POPUP_MENU GdkWindowTypeHint = 9
+ GDK_WINDOW_TYPE_HINT_TOOLTIP GdkWindowTypeHint = 10
+ GDK_WINDOW_TYPE_HINT_NOTIFICATION GdkWindowTypeHint = 11
+ GDK_WINDOW_TYPE_HINT_COMBO GdkWindowTypeHint = 12
+ GDK_WINDOW_TYPE_HINT_DND GdkWindowTypeHint = 13
+)
+
type GdkWindow struct {
Window *C.GdkWindow
}
View
10 gtk/gtk.go
@@ -1163,14 +1163,15 @@ func (v *GtkWindow) SetDecorated(setting bool){
func (v *GtkWindow) SetDeletable(setting bool){
C.gtk_window_set_deletable(C.to_GtkWindow(v.Widget), bool2gboolean(setting))
}
-
+func (v *GtkWindow) SetTypeHint(hint gdk.GdkWindowTypeHint) {
+ C.gtk_window_set_type_hint(C.to_GtkWindow(v.Widget), C.GdkWindowTypeHint(hint))
+}
// gtk_window_begin_resize_drag
// gtk_window_begin_move_drag
// gtk_window_set_frame_dimensions //deprecated since 2.24
// gtk_window_set_has_frame //deprecated since 2.24
// gtk_window_set_mnemonic_modifier
-// gtk_window_set_type_hint
// gtk_window_set_skip_taskbar_hint
// gtk_window_set_skip_pager_hint
// gtk_window_set_urgency_hint
@@ -1229,8 +1230,11 @@ func (v *GtkWindow) GetTitle() string {
return C.GoString(C.to_charptr(C.gtk_window_get_title(C.to_GtkWindow(v.Widget))))
}
+func (v *GtkWindow) GetTypeHint() gdk.GdkWindowTypeHint {
+ return gdk.GdkWindowTypeHint(C.gtk_window_get_type_hint(C.to_GtkWindow(v.Widget)))
+}
+
// gtk_window_get_transient_for
-// gtk_window_get_type_hint
// gtk_window_get_skip_taskbar_hint
// gtk_window_get_skip_pager_hint
// gtk_window_get_urgency_hint
Please sign in to comment.
Something went wrong with that request. Please try again.