Ejemplo n.º 1
0
        public Gdk.PixbufFormat Copy()
        {
            IntPtr raw_ret = gdk_pixbuf_format_copy(Handle);

            Gdk.PixbufFormat ret = raw_ret == IntPtr.Zero ? null : (Gdk.PixbufFormat)GLib.Opaque.GetOpaque(raw_ret, typeof(Gdk.PixbufFormat), true);
            return(ret);
        }
Ejemplo n.º 2
0
        public static Gdk.PixbufFormat GetFileInfo(string filename, out int width, out int height)
        {
            IntPtr native_filename = GLib.Marshaller.StringToPtrGStrdup(filename);
            IntPtr raw_ret         = gdk_pixbuf_get_file_info(native_filename, out width, out height);

            Gdk.PixbufFormat ret = raw_ret == IntPtr.Zero ? null : (Gdk.PixbufFormat)GLib.Opaque.GetOpaque(raw_ret, typeof(Gdk.PixbufFormat), false);
            GLib.Marshaller.Free(native_filename);
            return(ret);
        }
Ejemplo n.º 3
0
        public static unsafe Gdk.PixbufFormat GetFileInfoFinish(GLib.IAsyncResult async_result, out int width, out int height)
        {
            IntPtr error   = IntPtr.Zero;
            IntPtr raw_ret = gdk_pixbuf_get_file_info_finish(async_result == null ? IntPtr.Zero : ((async_result is GLib.Object) ? (async_result as GLib.Object).Handle : (async_result as GLib.AsyncResultAdapter).Handle), out width, out height, out error);

            Gdk.PixbufFormat ret = raw_ret == IntPtr.Zero ? null : (Gdk.PixbufFormat)GLib.Opaque.GetOpaque(raw_ret, typeof(Gdk.PixbufFormat), false);
            if (error != IntPtr.Zero)
            {
                throw new GLib.GException(error);
            }
            return(ret);
        }