summaryrefslogtreecommitdiff
path: root/vapi/gnome-rr-4.vapi
blob: c807c67fb6968ebd04cee252e73a49f6ccfc68b7 (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
/* gnome-rr-4.vapi generated by vapigen, do not modify. */

[CCode (cprefix = "GnomeRR", gir_namespace = "GnomeRR", gir_version = "4.0", lower_case_cprefix = "gnome_rr_")]
namespace GnomeRR {
	[CCode (cheader_filename = "libgnome-desktop/gnome-rr-config.h", type_id = "gnome_rr_config_get_type ()")]
	public sealed class Config : GLib.Object {
		[CCode (has_construct_function = false)]
		protected Config ();
		public bool applicable (GnomeRR.Screen screen) throws GLib.Error;
		public bool apply (GnomeRR.Screen screen) throws GLib.Error;
		public bool apply_persistent (GnomeRR.Screen screen) throws GLib.Error;
		[CCode (has_construct_function = false)]
		public Config.current (GnomeRR.Screen screen) throws GLib.Error;
		public bool ensure_primary ();
		public bool equal (GnomeRR.Config config2);
		public bool get_clone ();
		[CCode (array_length = false, array_null_terminated = true)]
		public unowned GnomeRR.OutputInfo[] get_outputs ();
		public bool load_current () throws GLib.Error;
		public bool match (GnomeRR.Config config2);
		public void sanitize ();
		public void set_clone (bool clone);
		[NoAccessorMethod]
		public GnomeRR.Screen screen { construct; }
	}
	[CCode (cheader_filename = "libgnome-desktop/gnome-rr.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gnome_rr_crtc_get_type ()")]
	[Compact]
	public class Crtc {
		public bool can_drive_output (GnomeRR.Output output);
		public unowned GnomeRR.Mode get_current_mode ();
		public GnomeRR.Rotation get_current_rotation ();
		public bool get_gamma (int size, out ushort red, out ushort green, out ushort blue);
		public uint32 get_id ();
		public void get_position (out int x, out int y);
		public GnomeRR.Rotation get_rotations ();
		public bool set_gamma (int size, ushort red, ushort green, ushort blue);
		public bool supports_rotation (GnomeRR.Rotation rotation);
	}
	[CCode (cheader_filename = "libgnome-desktop/gnome-rr.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gnome_rr_mode_get_type ()")]
	[Compact]
	public class Mode {
		public int get_freq ();
		public double get_freq_f ();
		public uint get_height ();
		public uint32 get_id ();
		public bool get_is_interlaced ();
		public bool get_is_tiled ();
		public uint get_width ();
	}
	[CCode (cheader_filename = "libgnome-desktop/gnome-rr.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gnome_rr_output_get_type ()")]
	[Compact]
	public class Output {
		public bool can_clone (GnomeRR.Output clone);
		public int get_backlight ();
		public unowned GnomeRR.Crtc get_crtc ();
		public unowned GnomeRR.Mode get_current_mode ();
		public unowned string get_display_name ();
		public uint8 get_edid_data (size_t size);
		public uint32 get_id ();
		public void get_ids_from_edid (out string vendor, out string product, out string serial);
		public bool get_is_primary ();
		public bool get_is_underscanning ();
		public int get_min_backlight_step ();
		public unowned string get_name ();
		public void get_physical_size (out int width_mm, out int height_mm);
		public void get_position (out int x, out int y);
		[CCode (array_length = false, array_null_terminated = true)]
		public unowned GnomeRR.Crtc[] get_possible_crtcs ();
		public unowned GnomeRR.Mode get_preferred_mode ();
		public bool is_builtin_display ();
		[CCode (array_length = false, array_null_terminated = true)]
		public unowned GnomeRR.Mode[] list_modes ();
		public bool set_backlight (int value) throws GLib.Error;
		public bool set_color_transform (GnomeRR.CTM ctm) throws GLib.Error;
		public bool supports_color_transform ();
		public bool supports_mode (GnomeRR.Mode mode);
		public bool supports_underscanning ();
	}
	[CCode (cheader_filename = "libgnome-desktop/gnome-rr-config.h", type_id = "gnome_rr_output_info_get_type ()")]
	public sealed class OutputInfo : GLib.Object {
		[CCode (has_construct_function = false)]
		protected OutputInfo ();
		public double get_aspect_ratio ();
		public unowned string get_display_name ();
		public void get_geometry (out int x, out int y, out int width, out int height);
		public unowned string get_name ();
		public int get_preferred_height ();
		public int get_preferred_width ();
		public bool get_primary ();
		public unowned string get_product ();
		public int get_refresh_rate ();
		public GnomeRR.Rotation get_rotation ();
		public unowned string get_serial ();
		public bool get_underscanning ();
		public unowned string get_vendor ();
		public bool is_active ();
		public bool is_connected ();
		public bool is_primary_tile ();
		public void set_active (bool active);
		public void set_geometry (int x, int y, int width, int height);
		public void set_primary (bool primary);
		public void set_refresh_rate (int rate);
		public void set_rotation (GnomeRR.Rotation rotation);
		public void set_underscanning (bool underscanning);
		public bool supports_rotation (GnomeRR.Rotation rotation);
	}
	[CCode (cheader_filename = "libgnome-desktop/gnome-rr.h", type_id = "gnome_rr_screen_get_type ()")]
	public class Screen : GLib.Object, GLib.AsyncInitable, GLib.Initable {
		[CCode (cname = "gnome_rr_screen_new_async", has_construct_function = false)]
		public async Screen (Gdk.Display display) throws GLib.Error;
		public unowned GnomeRR.Crtc get_crtc_by_id (uint32 id);
		public bool get_dpms_mode (out GnomeRR.DpmsMode mode) throws GLib.Error;
		public unowned GnomeRR.Output get_output_by_id (uint32 id);
		public unowned GnomeRR.Output get_output_by_name (string name);
		public void get_ranges (out int min_width, out int max_width, out int min_height, out int max_height);
		[CCode (array_length = false, array_null_terminated = true)]
		public unowned GnomeRR.Mode[] list_clone_modes ();
		[CCode (array_length = false, array_null_terminated = true)]
		public unowned GnomeRR.Crtc[] list_crtcs ();
		[CCode (array_length = false, array_null_terminated = true)]
		public unowned GnomeRR.Mode[] list_modes ();
		[CCode (array_length = false, array_null_terminated = true)]
		public unowned GnomeRR.Output[] list_outputs ();
		public bool refresh () throws GLib.Error;
		public bool set_dpms_mode (GnomeRR.DpmsMode mode) throws GLib.Error;
		[CCode (cname = "gnome_rr_screen_new", has_construct_function = false)]
		public Screen.sync (Gdk.Display display) throws GLib.Error;
		[NoAccessorMethod]
		public GnomeRR.DpmsModeType dpms_mode { get; set; }
		[NoAccessorMethod]
		public Gdk.Display gdk_display { owned get; construct; }
		public virtual signal void changed ();
		public virtual signal void output_connected (GnomeRR.Output output);
		public virtual signal void output_disconnected (GnomeRR.Output output);
	}
	[CCode (cheader_filename = "libgnome-desktop/gnome-rr.h", has_type_id = false)]
	public struct CTM {
	}
	[CCode (cheader_filename = "libgnome-desktop/gnome-rr.h", cprefix = "GNOME_RR_DPMS_", has_type_id = false)]
	public enum DpmsMode {
		ON,
		STANDBY,
		SUSPEND,
		OFF,
		UNKNOWN
	}
	[CCode (cheader_filename = "libgnome-desktop/gnome-rr.h", cprefix = "GNOME_RR_DPMS_", type_id = "gnome_rr_dpms_mode_get_type ()")]
	public enum DpmsModeType {
		ON,
		STANDBY,
		SUSPEND,
		OFF,
		UNKNOWN
	}
	[CCode (cheader_filename = "libgnome-desktop/gnome-rr.h", cprefix = "GNOME_RR_", has_type_id = false)]
	[Flags]
	public enum Rotation {
		ROTATION_NEXT,
		ROTATION_0,
		ROTATION_90,
		ROTATION_180,
		ROTATION_270,
		REFLECT_X,
		REFLECT_Y
	}
	[CCode (cheader_filename = "libgnome-desktop/gnome-rr.h", cprefix = "GNOME_RR_ERROR_", has_type_id = false)]
	public errordomain Error {
		UNKNOWN,
		NO_RANDR_EXTENSION,
		RANDR_ERROR,
		BOUNDS_ERROR,
		CRTC_ASSIGNMENT,
		NO_MATCHING_CONFIG,
		NO_DPMS_EXTENSION;
		[CCode (cheader_filename = "libgnome-desktop/gnome-rr.h")]
		public static GLib.Quark quark ();
	}
	[CCode (cheader_filename = "libgnome-desktop/gnome-rr.h", cname = "GNOME_RR_CONNECTOR_TYPE_PANEL")]
	public const string CONNECTOR_TYPE_PANEL;
}