1
// This file was generated by the Gtk# code generator.
2
// Any changes made will be lost if regenerated.
7
using System.Runtime.InteropServices;
9
#region Autogenerated code
10
public class Desktop {
12
[DllImport("gnome-desktop-2")]
13
static extern void gnome_desktop_prepend_terminal_to_vector(out int argc, IntPtr argv);
15
public static int PrependTerminalToVector(string argv) {
17
gnome_desktop_prepend_terminal_to_vector(out argc, GLib.Marshaller.StringToPtrGStrdup(argv));
21
[DllImport("gnome-desktop-2")]
22
static extern bool gnome_desktop_thumbnail_has_uri(IntPtr pixbuf, IntPtr uri);
24
public static bool ThumbnailHasUri(Gdk.Pixbuf pixbuf, string uri) {
25
IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri);
26
bool raw_ret = gnome_desktop_thumbnail_has_uri(pixbuf == null ? IntPtr.Zero : pixbuf.Handle, native_uri);
28
GLib.Marshaller.Free (native_uri);
32
[DllImport("gnome-desktop-2")]
33
static extern IntPtr gnome_desktop_thumbnail_scale_down_pixbuf(IntPtr pixbuf, int dest_width, int dest_height);
35
public static Gdk.Pixbuf ThumbnailScaleDownPixbuf(Gdk.Pixbuf pixbuf, int dest_width, int dest_height) {
36
IntPtr raw_ret = gnome_desktop_thumbnail_scale_down_pixbuf(pixbuf == null ? IntPtr.Zero : pixbuf.Handle, dest_width, dest_height);
37
Gdk.Pixbuf ret = GLib.Object.GetObject(raw_ret) as Gdk.Pixbuf;
41
[DllImport("gnome-desktop-2")]
42
static extern IntPtr gnome_desktop_thumbnail_path_for_uri(IntPtr uri, int size);
44
public static string ThumbnailPathForUri(string uri, Gnome.DesktopThumbnailSize size) {
45
IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri);
46
IntPtr raw_ret = gnome_desktop_thumbnail_path_for_uri(native_uri, (int) size);
47
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
48
GLib.Marshaller.Free (native_uri);
52
[DllImport("gnome-desktop-2")]
53
static extern bool gnome_desktop_thumbnail_is_valid(IntPtr pixbuf, IntPtr uri, IntPtr mtime);
55
public static bool ThumbnailIsValid(Gdk.Pixbuf pixbuf, string uri, System.DateTime mtime) {
56
IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri);
57
bool raw_ret = gnome_desktop_thumbnail_is_valid(pixbuf == null ? IntPtr.Zero : pixbuf.Handle, native_uri, GLib.Marshaller.DateTimeTotime_t (mtime));
59
GLib.Marshaller.Free (native_uri);
63
[DllImport("gnome-desktop-2")]
64
static extern IntPtr gnome_desktop_thumbnail_md5(IntPtr uri);
66
public static string ThumbnailMd5(string uri) {
67
IntPtr native_uri = GLib.Marshaller.StringToPtrGStrdup (uri);
68
IntPtr raw_ret = gnome_desktop_thumbnail_md5(native_uri);
69
string ret = GLib.Marshaller.PtrToStringGFree(raw_ret);
70
GLib.Marshaller.Free (native_uri);