Convert gtk::Socket to GtkSocket

How to do that? I have a &gtk::Socket and I need to get star mut GtkSocket.

use glib::translate::*;
let socket: gtk::Socket  = ...;
let socket_ptr: *mut gtk::ffi:GtkSocket = socket.to_glib_none().0;

Note that this pointer is only valid as long as socket is. Use to_glib_full() if you need a new strong reference (which you then will need to unref again later).

Hi and thank you for your reply.