public Gdk.Pixbuf RenderIcon(Gtk.Style style, Gtk.TextDirection direction, Gtk.StateType state, Gtk.IconSize size, Gtk.Widget widget, string detail) { IntPtr native_detail = GLib.Marshaller.StringToPtrGStrdup(detail); IntPtr raw_ret = gtk_icon_set_render_icon(Handle, style == null ? IntPtr.Zero : style.Handle, (int)direction, (int)state, (int)size, widget == null ? IntPtr.Zero : widget.Handle, native_detail); Gdk.Pixbuf ret = GLib.Object.GetObject(raw_ret) as Gdk.Pixbuf; GLib.Marshaller.Free(native_detail); return(ret); }
public static void DrawInsertionCursor(Gtk.Widget widget, Cairo.Context cr, Gdk.Rectangle location, bool is_primary, Gtk.TextDirection direction, bool draw_arrow) { IntPtr native_location = GLib.Marshaller.StructureToPtrAlloc(location); gtk_draw_insertion_cursor(widget == null ? IntPtr.Zero : widget.Handle, cr == null ? IntPtr.Zero : cr.Handle, native_location, is_primary, (int)direction, draw_arrow); Marshal.FreeHGlobal(native_location); }