Gtk window appears in the background

I want to ccall the following Gtk function: Gtk.Window.set_keep_above

void
gtk_window_set_keep_above (
  GtkWindow* window,
  gboolean setting
)

I looked at Gtk.jl/windows.jl at master · JuliaGraphics/Gtk.jl · GitHub for inspiration, but there is no example for gboolean.

This is what I tried so far:

function set_keep_above(win::GtkWindow, setting::Bool)
    # handle_auto_idle(win); ccall((:gtk_window_set_keep_above, libgtk), (Ptr{GObject},), win)
    # gtk_window_set_keep_above(GTK_WINDOW(window), TRUE)
end

Any idea?

Ok, this seams to work:

using Gtk.ShortNames, GtkObservables

# define the default values
finished = false 

btnOK = button(label="OK")

win = Window("Dialog", 100, 36) |> (bx = Box(:v))
push!(bx, btnOK)

Gtk.showall(win)
ccall((:gtk_window_set_keep_above, Gtk.libgtk), Nothing, (Ptr{GObject},), win)
nothing

I just omitted the gboolean parameter… So I think it is wrong. How can I do this correctly?

I found this website from google search. It says it is gint and which is also int in C. Maybe making it Cint in julia should do the trick. By the way, using ccall that way, the function in question uses garbage value in the corresponding register/memory for the second argument in the function call convention of the system.

I found out that the function IS already wrapped, and I can call it with:

G_.keep_above(win, true)

Thanks anyways!