Re: how would I do the following

Jacques Garrigue <[email protected]>
Newsgroups gmane.comp.lang.ocaml.lib.gtk
Message-ID <[email protected]>
From: "Jacques Le Normand" <[email protected]>

> how do I remove decorations from a window? there's a function
> set_decorations, but it seems that it's for internal use only.

Looks like there is a "decorated" property in Gtk since 2.4, but it is
not interfaced in lablgtk2.
You can add it with:

  open Gobject
  let decorated : ([>`window],_) property =
    {name="decorated"; conv=Data.boolean}

You can then access it with

  Gobject.get decorated w#as_window;;
  Gobject.set decorated w#as_window false;;

Note that you must set it when the window is not on screen.
I.e., before calling show.

We should add it in the next release (with a few other forgotten
window properties)

> Also, how do I set the position of my popup_menu? gtk has a function
> gtk_menu_popup, described in
> 
> http://library.gnome.org/devel/gtk/2.12/GtkMenu.html#gtk-menu-popup
> 
> which takes an argument
> 
> func : a user supplied function used to position the menu, or NULL
> 
> does lablgtk have something similar?

This is not interfaced either.
Since this is a callback, this will require some C code...

I'll add it soon.

> thanks for the help
> --Jacques

Sorry for the missing features...

Jacques
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.