~ubuntu-branches/ubuntu/utopic/gnome-do/utopic-proposed

« back to all changes in this revision

Viewing changes to Do.Platform.Linux/src/Do.Universe/Desktop.cs

  • Committer: Package Import Robot
  • Author(s): Christopher James Halse Rogers, Iain Lane, Christopher James Halse Rogers
  • Date: 2014-07-11 16:20:37 UTC
  • mfrom: (0.1.14)
  • Revision ID: package-import@ubuntu.com-20140711162037-08ncoy0ur0046i8e
Tags: 0.95.1-1
[ Iain Lane ]
* Build-depend directly on nunit instead of relying on indirect
* Build-depend on dbus-sharp instead of obsolete ndesk-dbus

[ Christopher James Halse Rogers ]
* Import new upstream 0.95 release (Closes: 713094, 708038)
* Transition to DBus# 2.0
* Simplify gnome-do launcher script (Closes: 650368)
* Version build-dependency on mono-cario; uses methods new in 3.2
* Add new GIO# and GKeyfile# build-depends
* Bump Standards-Version to 3.9.5, updating debian/copyright for
  machine-readable v1.0
* Import new upstream 0.95.1 release
* Drop versioned depends on Mono.Cairo; 0.95.1 builds against Mono < 3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// This file was generated by the Gtk# code generator.
 
2
// Any changes made will be lost if regenerated.
 
3
 
 
4
namespace Gnome {
 
5
 
 
6
        using System;
 
7
        using System.Runtime.InteropServices;
 
8
 
 
9
#region Autogenerated code
 
10
        public class Desktop {
 
11
 
 
12
                [DllImport("gnome-desktop-2")]
 
13
                static extern void gnome_desktop_prepend_terminal_to_vector(out int argc, IntPtr argv);
 
14
 
 
15
                public static int PrependTerminalToVector(string argv) {
 
16
                        int argc;
 
17
                        gnome_desktop_prepend_terminal_to_vector(out argc, GLib.Marshaller.StringToPtrGStrdup(argv));
 
18
                        return argc;
 
19
                }
 
20
 
 
21
                [DllImport("gnome-desktop-2")]
 
22
                static extern bool gnome_desktop_thumbnail_has_uri(IntPtr pixbuf, IntPtr uri);
 
23
 
 
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);
 
27
                        bool ret = raw_ret;
 
28
                        GLib.Marshaller.Free (native_uri);
 
29
                        return ret;
 
30
                }
 
31
 
 
32
                [DllImport("gnome-desktop-2")]
 
33
                static extern IntPtr gnome_desktop_thumbnail_scale_down_pixbuf(IntPtr pixbuf, int dest_width, int dest_height);
 
34
 
 
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;
 
38
                        return ret;
 
39
                }
 
40
 
 
41
                [DllImport("gnome-desktop-2")]
 
42
                static extern IntPtr gnome_desktop_thumbnail_path_for_uri(IntPtr uri, int size);
 
43
 
 
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);
 
49
                        return ret;
 
50
                }
 
51
 
 
52
                [DllImport("gnome-desktop-2")]
 
53
                static extern bool gnome_desktop_thumbnail_is_valid(IntPtr pixbuf, IntPtr uri, IntPtr mtime);
 
54
 
 
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));
 
58
                        bool ret = raw_ret;
 
59
                        GLib.Marshaller.Free (native_uri);
 
60
                        return ret;
 
61
                }
 
62
 
 
63
                [DllImport("gnome-desktop-2")]
 
64
                static extern IntPtr gnome_desktop_thumbnail_md5(IntPtr uri);
 
65
 
 
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);
 
71
                        return ret;
 
72
                }
 
73
 
 
74
#endregion
 
75
        }
 
76
}