aboutsummaryrefslogtreecommitdiff
path: root/src/fixes.vapi
blob: 8d0837086e52c612ec2dd24ed810a6ec87c951b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#if !VALA_0_22
namespace Posix
{
    [CCode (cheader_filename = "sys/mman.h")]
    public const int MCL_CURRENT;
    [CCode (cheader_filename = "sys/mman.h")]
    public const int MCL_FUTURE;
    [CCode (cheader_filename = "sys/mman.h")]
    public int mlockall (int flags);
    [CCode (cheader_filename = "sys/mman.h")]
    public int munlockall ();
}
#endif

// See https://bugzilla.gnome.org/show_bug.cgi?id=727113
[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "X11/Xlib.h")]
namespace X
{
    [CCode (cname = "XCreatePixmap")]
    public int CreatePixmap (X.Display display, X.Drawable d, uint width, uint height, uint depth);
    [CCode (cname = "XSetWindowBackgroundPixmap")]
    public int SetWindowBackgroundPixmap (X.Display display, X.Window w, int Pixmap);
    [CCode (cname = "XClearWindow")]
    public int ClearWindow (X.Display display, X.Window w);
    public const int RetainPermanent;
}

namespace Gtk
{
    namespace RGB
    {
        // Fixed in Vala 0.24
        public void to_hsv (double r, double g, double b, out double h, out double s, out double v);
    }
}

namespace Gnome
{
    [CCode (cheader_filename = "libgnome-desktop/gnome-idle-monitor.h")]
    public class IdleMonitor : GLib.Object
    {
        public IdleMonitor ();
        public IdleMonitor.for_device (Gdk.Device device);
        public uint add_idle_watch (uint64 interval_msec, IdleMonitorWatchFunc callback, GLib.DestroyNotify? notify = null);
        public uint add_user_active_watch (IdleMonitorWatchFunc callback, GLib.DestroyNotify? notify = null);
        public void remove_watch (uint id);
        public int64 get_idletime ();
    }

    public delegate void IdleMonitorWatchFunc (IdleMonitor monitor, uint id);
}

// Note, fixed in 1.10.0
namespace LightDM
{
    bool greeter_start_session_sync (LightDM.Greeter greeter, string session) throws GLib.Error;
}