Update upstream source from tag 'upstream/2.6.1'
Update to upstream version '2.6.1'
with Debian dir 3d26784ba7f55f1504f6cce0bd3605fadc3ea9d8
Joshua Peisach
10 months ago
7 | 7 | branches: |
8 | 8 | - master |
9 | 9 | workflow_dispatch: |
10 | inputs: | |
11 | debug_enabled: | |
12 | type: boolean | |
13 | description: 'Start an SSH server on failure.' | |
14 | required: false | |
15 | default: false | |
10 | 16 | |
11 | 17 | jobs: |
12 | 18 | build: |
0 | 0 | # Specify filepatterns you want git to ignore. |
1 | 1 | |
2 | obj-x86_64-linux-gnu | |
2 | obj-* | |
3 | 3 | debian/tmp/ |
4 | 4 | debian/*.debhelper |
5 | 5 | debian/gir1.2-xapp-1.0/ |
0 | 0 | |
1 | 1 | if not app_lib_only |
2 | install_data(['80xapp-gtk3-module.sh'], | |
3 | install_dir: join_paths(get_option('sysconfdir'), 'X11', 'xinit', 'xinitrc.d'), | |
4 | install_mode: 'rwxr-xr-x' | |
5 | ) | |
2 | ||
3 | if get_option('debian_derivative') | |
4 | ||
5 | install_data(['80xapp-gtk3-module.sh'], | |
6 | rename : ['80xapp-gtk3-module'], | |
7 | install_dir: join_paths(get_option('sysconfdir'), 'X11', 'Xsession.d')) | |
8 | else | |
9 | ||
10 | install_data(['80xapp-gtk3-module.sh'], | |
11 | install_dir: join_paths(get_option('sysconfdir'), 'X11', 'xinit', 'xinitrc.d'), | |
12 | install_mode: 'rwxr-xr-x') | |
13 | ||
14 | endif | |
6 | 15 | endif⏎ |
0 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
1 | <html> | |
2 | <head> | |
3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
4 | <title>XAppDarkModeManager: XApp Reference Manual</title> | |
5 | <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"> | |
6 | <link rel="home" href="index.html" title="XApp Reference Manual"> | |
7 | <link rel="up" href="ch01.html" title="API reference"> | |
8 | <link rel="prev" href="ch01.html" title="API reference"> | |
9 | <link rel="next" href="XAppFavorites.html" title="XAppFavorites"> | |
10 | <meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> | |
11 | <link rel="stylesheet" href="style.css" type="text/css"> | |
12 | </head> | |
13 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> | |
14 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle"> | |
15 | <td width="100%" align="left" class="shortcuts"> | |
16 | <a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> | |
17 | <a href="#XAppDarkModeManager.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> | |
18 | <a href="#XAppDarkModeManager.object-hierarchy" class="shortcut">Object Hierarchy</a></span> | |
19 | </td> | |
20 | <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> | |
21 | <td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> | |
22 | <td><a accesskey="p" href="ch01.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> | |
23 | <td><a accesskey="n" href="XAppFavorites.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> | |
24 | </tr></table> | |
25 | <div class="refentry"> | |
26 | <a name="XAppDarkModeManager"></a><div class="titlepage"></div> | |
27 | <div class="refnamediv"><table width="100%"><tr> | |
28 | <td valign="top"> | |
29 | <h2><span class="refentrytitle"><a name="XAppDarkModeManager.top_of_page"></a>XAppDarkModeManager</span></h2> | |
30 | <p>XAppDarkModeManager — Manages an application's dark mode preference for it.</p> | |
31 | </td> | |
32 | <td class="gallery_image" valign="top" align="right"></td> | |
33 | </tr></table></div> | |
34 | <div class="refsect1"> | |
35 | <a name="XAppDarkModeManager.functions"></a><h2>Functions</h2> | |
36 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
37 | <colgroup> | |
38 | <col width="150px" class="functions_proto_type"> | |
39 | <col class="functions_proto_name"> | |
40 | </colgroup> | |
41 | <tbody><tr> | |
42 | <td class="function_type"> | |
43 | <a class="link" href="XAppDarkModeManager.html" title="XAppDarkModeManager"><span class="returnvalue">XAppDarkModeManager</span></a> * | |
44 | </td> | |
45 | <td class="function_name"> | |
46 | <a class="link" href="XAppDarkModeManager.html#xapp-dark-mode-manager-new" title="xapp_dark_mode_manager_new ()">xapp_dark_mode_manager_new</a> <span class="c_punctuation">()</span> | |
47 | </td> | |
48 | </tr></tbody> | |
49 | </table></div> | |
50 | </div> | |
51 | <div class="refsect1"> | |
52 | <a name="XAppDarkModeManager.other"></a><h2>Types and Values</h2> | |
53 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
54 | <colgroup> | |
55 | <col width="150px" class="other_proto_type"> | |
56 | <col class="other_proto_name"> | |
57 | </colgroup> | |
58 | <tbody> | |
59 | <tr> | |
60 | <td class="define_keyword">#define</td> | |
61 | <td class="function_name"><a class="link" href="XAppDarkModeManager.html#XAPP-TYPE-DARK-MODE-MANAGER:CAPS" title="XAPP_TYPE_DARK_MODE_MANAGER">XAPP_TYPE_DARK_MODE_MANAGER</a></td> | |
62 | </tr> | |
63 | <tr> | |
64 | <td class="datatype_keyword"> </td> | |
65 | <td class="function_name"><a class="link" href="XAppDarkModeManager.html#XAppDarkModeManager-struct" title="XAppDarkModeManager">XAppDarkModeManager</a></td> | |
66 | </tr> | |
67 | </tbody> | |
68 | </table></div> | |
69 | </div> | |
70 | <div class="refsect1"> | |
71 | <a name="XAppDarkModeManager.object-hierarchy"></a><h2>Object Hierarchy</h2> | |
72 | <pre class="screen"> <a href="../gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a> | |
73 | <span class="lineart">╰──</span> XAppDarkModeManager | |
74 | </pre> | |
75 | </div> | |
76 | <div class="refsect1"> | |
77 | <a name="XAppDarkModeManager.description"></a><h2>Description</h2> | |
78 | <p>This class will attempt to use the XDG Desktop Settings portal to manage its | |
79 | 'gtk-application-prefer-dark-theme' setting. If the portal is unavailable it | |
80 | will resort to using xdg-desktop-portal-xapp's dconf setting.</p> | |
81 | <p>Since 2.6</p> | |
82 | </div> | |
83 | <div class="refsect1"> | |
84 | <a name="XAppDarkModeManager.functions_details"></a><h2>Functions</h2> | |
85 | <div class="refsect2"> | |
86 | <a name="xapp-dark-mode-manager-new"></a><h3>xapp_dark_mode_manager_new ()</h3> | |
87 | <pre class="programlisting"><a class="link" href="XAppDarkModeManager.html" title="XAppDarkModeManager"><span class="returnvalue">XAppDarkModeManager</span></a> * | |
88 | xapp_dark_mode_manager_new (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> prefer_dark_mode</code></em>);</pre> | |
89 | <div class="refsect3"> | |
90 | <a name="xapp-dark-mode-manager-new.parameters"></a><h4>Parameters</h4> | |
91 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
92 | <colgroup> | |
93 | <col width="150px" class="parameters_name"> | |
94 | <col class="parameters_description"> | |
95 | <col width="200px" class="parameters_annotations"> | |
96 | </colgroup> | |
97 | <tbody><tr> | |
98 | <td class="parameter_name"><p>prefer_dark_mode</p></td> | |
99 | <td class="parameter_description"><p>The application's preference.</p></td> | |
100 | <td class="parameter_annotations"> </td> | |
101 | </tr></tbody> | |
102 | </table></div> | |
103 | </div> | |
104 | <div class="refsect3"> | |
105 | <a name="xapp-dark-mode-manager-new.returns"></a><h4>Returns</h4> | |
106 | <p>a new XAppDarkModeManager instance. Free with g_object_unref. </p> | |
107 | <p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> | |
108 | </div> | |
109 | <p class="since">Since: 2.6</p> | |
110 | </div> | |
111 | </div> | |
112 | <div class="refsect1"> | |
113 | <a name="XAppDarkModeManager.other_details"></a><h2>Types and Values</h2> | |
114 | <div class="refsect2"> | |
115 | <a name="XAPP-TYPE-DARK-MODE-MANAGER:CAPS"></a><h3>XAPP_TYPE_DARK_MODE_MANAGER</h3> | |
116 | <pre class="programlisting">#define XAPP_TYPE_DARK_MODE_MANAGER (xapp_dark_mode_manager_get_type ()) | |
117 | </pre> | |
118 | </div> | |
119 | <hr> | |
120 | <div class="refsect2"> | |
121 | <a name="XAppDarkModeManager-struct"></a><h3>XAppDarkModeManager</h3> | |
122 | <pre class="programlisting">typedef struct _XAppDarkModeManager XAppDarkModeManager;</pre> | |
123 | </div> | |
124 | </div> | |
125 | </div> | |
126 | <div class="footer"> | |
127 | <hr>Generated by GTK-Doc V1.33.1</div> | |
128 | </body> | |
129 | </html>⏎ |
5 | 5 | <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"> |
6 | 6 | <link rel="home" href="index.html" title="XApp Reference Manual"> |
7 | 7 | <link rel="up" href="ch01.html" title="API reference"> |
8 | <link rel="prev" href="ch01.html" title="API reference"> | |
8 | <link rel="prev" href="XAppDarkModeManager.html" title="XAppDarkModeManager"> | |
9 | 9 | <link rel="next" href="XAppGtkWindow.html" title="XAppGtkWindow"> |
10 | 10 | <meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
20 | 20 | </td> |
21 | 21 | <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> |
22 | 22 | <td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> |
23 | <td><a accesskey="p" href="ch01.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> | |
23 | <td><a accesskey="p" href="XAppDarkModeManager.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> | |
24 | 24 | <td><a accesskey="n" href="XAppGtkWindow.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> |
25 | 25 | </tr></table> |
26 | 26 | <div class="refentry"> |
0 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
1 | <html> | |
2 | <head> | |
3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
4 | <title>XAppGpuOffloadHelper: XApp Reference Manual</title> | |
5 | <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"> | |
6 | <link rel="home" href="index.html" title="XApp Reference Manual"> | |
7 | <link rel="up" href="ch01.html" title="API reference"> | |
8 | <link rel="prev" href="XAppGtkWindow.html" title="XAppGtkWindow"> | |
9 | <link rel="next" href="XAppIconChooserButton.html" title="XAppIconChooserButton"> | |
10 | <meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> | |
11 | <link rel="stylesheet" href="style.css" type="text/css"> | |
12 | </head> | |
13 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> | |
14 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle"> | |
15 | <td width="100%" align="left" class="shortcuts"> | |
16 | <a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> | |
17 | <a href="#XAppGpuOffloadHelper.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> | |
18 | <a href="#XAppGpuOffloadHelper.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_signals"> <span class="dim">|</span> | |
19 | <a href="#XAppGpuOffloadHelper.signals" class="shortcut">Signals</a></span> | |
20 | </td> | |
21 | <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> | |
22 | <td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> | |
23 | <td><a accesskey="p" href="XAppGtkWindow.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> | |
24 | <td><a accesskey="n" href="XAppIconChooserButton.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> | |
25 | </tr></table> | |
26 | <div class="refentry"> | |
27 | <a name="XAppGpuOffloadHelper"></a><div class="titlepage"></div> | |
28 | <div class="refnamediv"><table width="100%"><tr> | |
29 | <td valign="top"> | |
30 | <h2><span class="refentrytitle"><a name="XAppGpuOffloadHelper.top_of_page"></a>XAppGpuOffloadHelper</span></h2> | |
31 | <p>XAppGpuOffloadHelper — Simple interface for Switcheroo.</p> | |
32 | </td> | |
33 | <td class="gallery_image" valign="top" align="right"></td> | |
34 | </tr></table></div> | |
35 | <div class="refsect1"> | |
36 | <a name="XAppGpuOffloadHelper.functions"></a><h2>Functions</h2> | |
37 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
38 | <colgroup> | |
39 | <col width="150px" class="functions_proto_type"> | |
40 | <col class="functions_proto_name"> | |
41 | </colgroup> | |
42 | <tbody> | |
43 | <tr> | |
44 | <td class="function_type"> | |
45 | <a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper"><span class="returnvalue">XAppGpuOffloadHelper</span></a> * | |
46 | </td> | |
47 | <td class="function_name"> | |
48 | <a class="link" href="XAppGpuOffloadHelper.html#xapp-gpu-offload-helper-get" title="xapp_gpu_offload_helper_get ()">xapp_gpu_offload_helper_get</a> <span class="c_punctuation">()</span> | |
49 | </td> | |
50 | </tr> | |
51 | <tr> | |
52 | <td class="function_type"> | |
53 | <a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper"><span class="returnvalue">XAppGpuOffloadHelper</span></a> * | |
54 | </td> | |
55 | <td class="function_name"> | |
56 | <a class="link" href="XAppGpuOffloadHelper.html#xapp-gpu-offload-helper-get-sync" title="xapp_gpu_offload_helper_get_sync ()">xapp_gpu_offload_helper_get_sync</a> <span class="c_punctuation">()</span> | |
57 | </td> | |
58 | </tr> | |
59 | <tr> | |
60 | <td class="function_type"> | |
61 | <a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> | |
62 | </td> | |
63 | <td class="function_name"> | |
64 | <a class="link" href="XAppGpuOffloadHelper.html#xapp-gpu-offload-helper-is-ready" title="xapp_gpu_offload_helper_is_ready ()">xapp_gpu_offload_helper_is_ready</a> <span class="c_punctuation">()</span> | |
65 | </td> | |
66 | </tr> | |
67 | <tr> | |
68 | <td class="function_type"> | |
69 | <a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> | |
70 | </td> | |
71 | <td class="function_name"> | |
72 | <a class="link" href="XAppGpuOffloadHelper.html#xapp-gpu-offload-helper-is-offload-supported" title="xapp_gpu_offload_helper_is_offload_supported ()">xapp_gpu_offload_helper_is_offload_supported</a> <span class="c_punctuation">()</span> | |
73 | </td> | |
74 | </tr> | |
75 | <tr> | |
76 | <td class="function_type"> | |
77 | <a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> | |
78 | </td> | |
79 | <td class="function_name"> | |
80 | <a class="link" href="XAppGpuOffloadHelper.html#xapp-gpu-offload-helper-get-n-gpus" title="xapp_gpu_offload_helper_get_n_gpus ()">xapp_gpu_offload_helper_get_n_gpus</a> <span class="c_punctuation">()</span> | |
81 | </td> | |
82 | </tr> | |
83 | <tr> | |
84 | <td class="function_type"> | |
85 | <a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * | |
86 | </td> | |
87 | <td class="function_name"> | |
88 | <a class="link" href="XAppGpuOffloadHelper.html#xapp-gpu-offload-helper-get-offload-infos" title="xapp_gpu_offload_helper_get_offload_infos ()">xapp_gpu_offload_helper_get_offload_infos</a> <span class="c_punctuation">()</span> | |
89 | </td> | |
90 | </tr> | |
91 | <tr> | |
92 | <td class="function_type"> | |
93 | <a class="link" href="XAppGpuOffloadHelper.html#XAppGpuInfo"><span class="returnvalue">XAppGpuInfo</span></a> * | |
94 | </td> | |
95 | <td class="function_name"> | |
96 | <a class="link" href="XAppGpuOffloadHelper.html#xapp-gpu-offload-helper-get-default-info" title="xapp_gpu_offload_helper_get_default_info ()">xapp_gpu_offload_helper_get_default_info</a> <span class="c_punctuation">()</span> | |
97 | </td> | |
98 | </tr> | |
99 | <tr> | |
100 | <td class="function_type"> | |
101 | <a class="link" href="XAppGpuOffloadHelper.html#XAppGpuInfo"><span class="returnvalue">XAppGpuInfo</span></a> * | |
102 | </td> | |
103 | <td class="function_name"> | |
104 | <a class="link" href="XAppGpuOffloadHelper.html#xapp-gpu-offload-helper-get-info-by-id" title="xapp_gpu_offload_helper_get_info_by_id ()">xapp_gpu_offload_helper_get_info_by_id</a> <span class="c_punctuation">()</span> | |
105 | </td> | |
106 | </tr> | |
107 | <tr> | |
108 | <td class="function_type"> | |
109 | <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * | |
110 | </td> | |
111 | <td class="function_name"> | |
112 | <a class="link" href="XAppGpuOffloadHelper.html#xapp-gpu-info-get-shell-env-prefix" title="xapp_gpu_info_get_shell_env_prefix ()">xapp_gpu_info_get_shell_env_prefix</a> <span class="c_punctuation">()</span> | |
113 | </td> | |
114 | </tr> | |
115 | </tbody> | |
116 | </table></div> | |
117 | </div> | |
118 | <div class="refsect1"> | |
119 | <a name="XAppGpuOffloadHelper.signals"></a><h2>Signals</h2> | |
120 | <div class="informaltable"><table class="informaltable" border="0"> | |
121 | <colgroup> | |
122 | <col width="150px" class="signal_proto_type"> | |
123 | <col width="300px" class="signal_proto_name"> | |
124 | <col width="200px" class="signal_proto_flags"> | |
125 | </colgroup> | |
126 | <tbody><tr> | |
127 | <td class="signal_type"><span class="returnvalue">void</span></td> | |
128 | <td class="signal_name"><a class="link" href="XAppGpuOffloadHelper.html#XAppGpuOffloadHelper-ready" title="The “ready” signal">ready</a></td> | |
129 | <td class="signal_flags"><a href="../gobject/gobject-Signals.html#G-SIGNAL-ACTION:CAPS">Action</a></td> | |
130 | </tr></tbody> | |
131 | </table></div> | |
132 | </div> | |
133 | <a name="XAppGpuInfo"></a><div class="refsect1"> | |
134 | <a name="XAppGpuOffloadHelper.other"></a><h2>Types and Values</h2> | |
135 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
136 | <colgroup> | |
137 | <col width="150px" class="other_proto_type"> | |
138 | <col class="other_proto_name"> | |
139 | </colgroup> | |
140 | <tbody> | |
141 | <tr> | |
142 | <td class="define_keyword">#define</td> | |
143 | <td class="function_name"><a class="link" href="XAppGpuOffloadHelper.html#XAPP-TYPE-GPU-OFFLOAD-HELPER:CAPS" title="XAPP_TYPE_GPU_OFFLOAD_HELPER">XAPP_TYPE_GPU_OFFLOAD_HELPER</a></td> | |
144 | </tr> | |
145 | <tr> | |
146 | <td class="datatype_keyword">struct</td> | |
147 | <td class="function_name"><a class="link" href="XAppGpuOffloadHelper.html#XAppGpuInfo-struct" title="struct XAppGpuInfo">XAppGpuInfo</a></td> | |
148 | </tr> | |
149 | <tr> | |
150 | <td class="datatype_keyword"> </td> | |
151 | <td class="function_name"><a class="link" href="XAppGpuOffloadHelper.html#XAppGpuOffloadHelper-struct" title="XAppGpuOffloadHelper">XAppGpuOffloadHelper</a></td> | |
152 | </tr> | |
153 | </tbody> | |
154 | </table></div> | |
155 | </div> | |
156 | <div class="refsect1"> | |
157 | <a name="XAppGpuOffloadHelper.object-hierarchy"></a><h2>Object Hierarchy</h2> | |
158 | <pre class="screen"> <a href="/usr/share/gtk-doc/html/gobject/gobject-Boxed-Types.html">GBoxed</a> | |
159 | <span class="lineart">╰──</span> XAppGpuInfo | |
160 | <a href="../gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a> | |
161 | <span class="lineart">╰──</span> XAppGpuOffloadHelper | |
162 | </pre> | |
163 | </div> | |
164 | <div class="refsect1"> | |
165 | <a name="XAppGpuOffloadHelper.description"></a><h2>Description</h2> | |
166 | <p><a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper"><span class="type">XAppGpuOffloadHelper</span></a> is class that provides a reliable property cache and simple return methods | |
167 | for getting offload_helper parameters and conditions from the Switcheroo interface.</p> | |
168 | <p>Since 2.6</p> | |
169 | </div> | |
170 | <div class="refsect1"> | |
171 | <a name="XAppGpuOffloadHelper.functions_details"></a><h2>Functions</h2> | |
172 | <div class="refsect2"> | |
173 | <a name="xapp-gpu-offload-helper-get"></a><h3>xapp_gpu_offload_helper_get ()</h3> | |
174 | <pre class="programlisting"><a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper"><span class="returnvalue">XAppGpuOffloadHelper</span></a> * | |
175 | xapp_gpu_offload_helper_get (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> | |
176 | <p>Creates a new <a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper"><span class="type">XAppGpuOffloadHelper</span></a> instance.</p> | |
177 | <p>The <a class="link" href="XAppGpuOffloadHelper.html#XAppGpuOffloadHelper-ready" title="The “ready” signal"><span class="type">“ready”</span></a> signal will be emitted when the helper is initialized (successfully or not).</p> | |
178 | <div class="refsect3"> | |
179 | <a name="xapp-gpu-offload-helper-get.returns"></a><h4>Returns</h4> | |
180 | <p>a new <a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper"><span class="type">XAppGpuOffloadHelper</span></a>. </p> | |
181 | <p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> | |
182 | </div> | |
183 | <p class="since">Since: 2.6</p> | |
184 | </div> | |
185 | <hr> | |
186 | <div class="refsect2"> | |
187 | <a name="xapp-gpu-offload-helper-get-sync"></a><h3>xapp_gpu_offload_helper_get_sync ()</h3> | |
188 | <pre class="programlisting"><a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper"><span class="returnvalue">XAppGpuOffloadHelper</span></a> * | |
189 | xapp_gpu_offload_helper_get_sync (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> | |
190 | <p>Creates a new <a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper"><span class="type">XAppGpuOffloadHelper</span></a> instance. This performs initialization synchronously, | |
191 | and can potentially block.</p> | |
192 | <p>Use <a class="link" href="XAppGpuOffloadHelper.html#xapp-gpu-offload-helper-is-ready" title="xapp_gpu_offload_helper_is_ready ()"><code class="function">xapp_gpu_offload_helper_is_ready()</code></a> to see if the helper was initialized successfully.</p> | |
193 | <div class="refsect3"> | |
194 | <a name="xapp-gpu-offload-helper-get-sync.returns"></a><h4>Returns</h4> | |
195 | <p>a new <a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper"><span class="type">XAppGpuOffloadHelper</span></a>, fully initialized. </p> | |
196 | <p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> | |
197 | </div> | |
198 | <p class="since">Since: 2.6</p> | |
199 | </div> | |
200 | <hr> | |
201 | <div class="refsect2"> | |
202 | <a name="xapp-gpu-offload-helper-is-ready"></a><h3>xapp_gpu_offload_helper_is_ready ()</h3> | |
203 | <pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> | |
204 | xapp_gpu_offload_helper_is_ready (<em class="parameter"><code><a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper"><span class="type">XAppGpuOffloadHelper</span></a> *helper</code></em>);</pre> | |
205 | <p>Checks if the helper is ready and valid. This does not mean | |
206 | offload support exists.</p> | |
207 | <div class="refsect3"> | |
208 | <a name="xapp-gpu-offload-helper-is-ready.parameters"></a><h4>Parameters</h4> | |
209 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
210 | <colgroup> | |
211 | <col width="150px" class="parameters_name"> | |
212 | <col class="parameters_description"> | |
213 | <col width="200px" class="parameters_annotations"> | |
214 | </colgroup> | |
215 | <tbody><tr> | |
216 | <td class="parameter_name"><p>helper</p></td> | |
217 | <td class="parameter_description"><p>The <a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper"><span class="type">XAppGpuOffloadHelper</span></a>.</p></td> | |
218 | <td class="parameter_annotations"> </td> | |
219 | </tr></tbody> | |
220 | </table></div> | |
221 | </div> | |
222 | <div class="refsect3"> | |
223 | <a name="xapp-gpu-offload-helper-is-ready.returns"></a><h4>Returns</h4> | |
224 | <p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the helper has been successfully initialized.</p> | |
225 | </div> | |
226 | <p class="since">Since: 2.6</p> | |
227 | </div> | |
228 | <hr> | |
229 | <div class="refsect2"> | |
230 | <a name="xapp-gpu-offload-helper-is-offload-supported"></a><h3>xapp_gpu_offload_helper_is_offload_supported ()</h3> | |
231 | <pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> | |
232 | xapp_gpu_offload_helper_is_offload_supported | |
233 | (<em class="parameter"><code><a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper"><span class="type">XAppGpuOffloadHelper</span></a> *helper</code></em>);</pre> | |
234 | <p>Checks if there is a non-default GPU available for offloading.</p> | |
235 | <div class="refsect3"> | |
236 | <a name="xapp-gpu-offload-helper-is-offload-supported.parameters"></a><h4>Parameters</h4> | |
237 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
238 | <colgroup> | |
239 | <col width="150px" class="parameters_name"> | |
240 | <col class="parameters_description"> | |
241 | <col width="200px" class="parameters_annotations"> | |
242 | </colgroup> | |
243 | <tbody><tr> | |
244 | <td class="parameter_name"><p>helper</p></td> | |
245 | <td class="parameter_description"><p>The <a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper"><span class="type">XAppGpuOffloadHelper</span></a>.</p></td> | |
246 | <td class="parameter_annotations"> </td> | |
247 | </tr></tbody> | |
248 | </table></div> | |
249 | </div> | |
250 | <div class="refsect3"> | |
251 | <a name="xapp-gpu-offload-helper-is-offload-supported.returns"></a><h4>Returns</h4> | |
252 | <p> <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if there is an extra GPU available.</p> | |
253 | </div> | |
254 | <p class="since">Since: 2.6</p> | |
255 | </div> | |
256 | <hr> | |
257 | <div class="refsect2"> | |
258 | <a name="xapp-gpu-offload-helper-get-n-gpus"></a><h3>xapp_gpu_offload_helper_get_n_gpus ()</h3> | |
259 | <pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> | |
260 | xapp_gpu_offload_helper_get_n_gpus (<em class="parameter"><code><a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper"><span class="type">XAppGpuOffloadHelper</span></a> *helper</code></em>);</pre> | |
261 | <p>Gets the number of GPUs noticed by Switcheroo.</p> | |
262 | <div class="refsect3"> | |
263 | <a name="xapp-gpu-offload-helper-get-n-gpus.parameters"></a><h4>Parameters</h4> | |
264 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
265 | <colgroup> | |
266 | <col width="150px" class="parameters_name"> | |
267 | <col class="parameters_description"> | |
268 | <col width="200px" class="parameters_annotations"> | |
269 | </colgroup> | |
270 | <tbody><tr> | |
271 | <td class="parameter_name"><p>helper</p></td> | |
272 | <td class="parameter_description"><p>The <a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper"><span class="type">XAppGpuOffloadHelper</span></a>.</p></td> | |
273 | <td class="parameter_annotations"> </td> | |
274 | </tr></tbody> | |
275 | </table></div> | |
276 | </div> | |
277 | <div class="refsect3"> | |
278 | <a name="xapp-gpu-offload-helper-get-n-gpus.returns"></a><h4>Returns</h4> | |
279 | <p> the total number of GPUs. A return value larger than | |
280 | 1 implies there are offloadable GPUs available.</p> | |
281 | </div> | |
282 | <p class="since">Since: 2.6</p> | |
283 | </div> | |
284 | <hr> | |
285 | <div class="refsect2"> | |
286 | <a name="xapp-gpu-offload-helper-get-offload-infos"></a><h3>xapp_gpu_offload_helper_get_offload_infos ()</h3> | |
287 | <pre class="programlisting"><a href="../glib/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * | |
288 | xapp_gpu_offload_helper_get_offload_infos | |
289 | (<em class="parameter"><code><a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper"><span class="type">XAppGpuOffloadHelper</span></a> *helper</code></em>);</pre> | |
290 | <p>Generates a list of <a href="XAppGpuOffloadHelper.html#XAppGpuInfo-struct"><span class="type">XAppGpuInfos</span></a> that can be offloaded to, if there are any.</p> | |
291 | <div class="refsect3"> | |
292 | <a name="xapp-gpu-offload-helper-get-offload-infos.parameters"></a><h4>Parameters</h4> | |
293 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
294 | <colgroup> | |
295 | <col width="150px" class="parameters_name"> | |
296 | <col class="parameters_description"> | |
297 | <col width="200px" class="parameters_annotations"> | |
298 | </colgroup> | |
299 | <tbody><tr> | |
300 | <td class="parameter_name"><p>helper</p></td> | |
301 | <td class="parameter_description"><p>The <a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper"><span class="type">XAppGpuOffloadHelper</span></a>.</p></td> | |
302 | <td class="parameter_annotations"> </td> | |
303 | </tr></tbody> | |
304 | </table></div> | |
305 | </div> | |
306 | <div class="refsect3"> | |
307 | <a name="xapp-gpu-offload-helper-get-offload-infos.returns"></a><h4>Returns</h4> | |
308 | <p>a list of <a href="XAppGpuOffloadHelper.html#XAppGpuInfo-struct"><span class="type">XAppGpuInfos</span></a> or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if there is only | |
309 | a single GPU. The elements are owned by <em class="parameter"><code>helper</code></em> | |
310 | but the container itself should be freed. </p> | |
311 | <p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> XAppGpuInfo][<acronym title="The caller owns the data container, but not the data inside it."><span class="acronym">transfer container</span></acronym>]</span></p> | |
312 | </div> | |
313 | <p class="since">Since: 2.6</p> | |
314 | </div> | |
315 | <hr> | |
316 | <div class="refsect2"> | |
317 | <a name="xapp-gpu-offload-helper-get-default-info"></a><h3>xapp_gpu_offload_helper_get_default_info ()</h3> | |
318 | <pre class="programlisting"><a class="link" href="XAppGpuOffloadHelper.html#XAppGpuInfo"><span class="returnvalue">XAppGpuInfo</span></a> * | |
319 | xapp_gpu_offload_helper_get_default_info | |
320 | (<em class="parameter"><code><a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper"><span class="type">XAppGpuOffloadHelper</span></a> *helper</code></em>);</pre> | |
321 | <p>Returns an <a class="link" href="XAppGpuOffloadHelper.html#XAppGpuInfo"><span class="type">XAppGpuInfo</span></a> for the default GPU.</p> | |
322 | <div class="refsect3"> | |
323 | <a name="xapp-gpu-offload-helper-get-default-info.parameters"></a><h4>Parameters</h4> | |
324 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
325 | <colgroup> | |
326 | <col width="150px" class="parameters_name"> | |
327 | <col class="parameters_description"> | |
328 | <col width="200px" class="parameters_annotations"> | |
329 | </colgroup> | |
330 | <tbody><tr> | |
331 | <td class="parameter_name"><p>helper</p></td> | |
332 | <td class="parameter_description"><p>The <a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper"><span class="type">XAppGpuOffloadHelper</span></a>.</p></td> | |
333 | <td class="parameter_annotations"> </td> | |
334 | </tr></tbody> | |
335 | </table></div> | |
336 | </div> | |
337 | <div class="refsect3"> | |
338 | <a name="xapp-gpu-offload-helper-get-default-info.returns"></a><h4>Returns</h4> | |
339 | <p>the default <a class="link" href="XAppGpuOffloadHelper.html#XAppGpuInfo"><span class="type">XAppGpuInfo</span></a>. Do not free. </p> | |
340 | <p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> | |
341 | </div> | |
342 | <p class="since">Since: 2.6</p> | |
343 | </div> | |
344 | <hr> | |
345 | <div class="refsect2"> | |
346 | <a name="xapp-gpu-offload-helper-get-info-by-id"></a><h3>xapp_gpu_offload_helper_get_info_by_id ()</h3> | |
347 | <pre class="programlisting"><a class="link" href="XAppGpuOffloadHelper.html#XAppGpuInfo"><span class="returnvalue">XAppGpuInfo</span></a> * | |
348 | xapp_gpu_offload_helper_get_info_by_id | |
349 | (<em class="parameter"><code><a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper"><span class="type">XAppGpuOffloadHelper</span></a> *helper</code></em>, | |
350 | <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> id</code></em>);</pre> | |
351 | <p>Returns an <a class="link" href="XAppGpuOffloadHelper.html#XAppGpuInfo"><span class="type">XAppGpuInfo</span></a> with the given ID.</p> | |
352 | <div class="refsect3"> | |
353 | <a name="xapp-gpu-offload-helper-get-info-by-id.parameters"></a><h4>Parameters</h4> | |
354 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
355 | <colgroup> | |
356 | <col width="150px" class="parameters_name"> | |
357 | <col class="parameters_description"> | |
358 | <col width="200px" class="parameters_annotations"> | |
359 | </colgroup> | |
360 | <tbody> | |
361 | <tr> | |
362 | <td class="parameter_name"><p>helper</p></td> | |
363 | <td class="parameter_description"><p>The <a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper"><span class="type">XAppGpuOffloadHelper</span></a>.</p></td> | |
364 | <td class="parameter_annotations"> </td> | |
365 | </tr> | |
366 | <tr> | |
367 | <td class="parameter_name"><p>id</p></td> | |
368 | <td class="parameter_description"><p>The ID of the info to retrieve.</p></td> | |
369 | <td class="parameter_annotations"> </td> | |
370 | </tr> | |
371 | </tbody> | |
372 | </table></div> | |
373 | </div> | |
374 | <div class="refsect3"> | |
375 | <a name="xapp-gpu-offload-helper-get-info-by-id.returns"></a><h4>Returns</h4> | |
376 | <p>the appropriate <a class="link" href="XAppGpuOffloadHelper.html#XAppGpuInfo"><span class="type">XAppGpuInfo</span></a>, or <a href="../glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>id</code></em> | |
377 | was invalid. </p> | |
378 | <p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> | |
379 | </div> | |
380 | <p class="since">Since: 2.6</p> | |
381 | </div> | |
382 | <hr> | |
383 | <div class="refsect2"> | |
384 | <a name="xapp-gpu-info-get-shell-env-prefix"></a><h3>xapp_gpu_info_get_shell_env_prefix ()</h3> | |
385 | <pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * | |
386 | xapp_gpu_info_get_shell_env_prefix (<em class="parameter"><code><a class="link" href="XAppGpuOffloadHelper.html#XAppGpuInfo"><span class="type">XAppGpuInfo</span></a> *info</code></em>);</pre> | |
387 | <p>Creates a new string in a form intended to prefix a shell command, containing | |
388 | the appropriate name/values for this gpu. For example:</p> | |
389 | <p>__GLX_VENDOR_LIBRARY_NAME=nvidia __NV_PRIME_RENDER_OFFLOAD=1</p> | |
390 | <div class="refsect3"> | |
391 | <a name="xapp-gpu-info-get-shell-env-prefix.parameters"></a><h4>Parameters</h4> | |
392 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
393 | <colgroup> | |
394 | <col width="150px" class="parameters_name"> | |
395 | <col class="parameters_description"> | |
396 | <col width="200px" class="parameters_annotations"> | |
397 | </colgroup> | |
398 | <tbody><tr> | |
399 | <td class="parameter_name"><p>info</p></td> | |
400 | <td class="parameter_description"><p>An <a class="link" href="XAppGpuOffloadHelper.html#XAppGpuInfo"><span class="type">XAppGpuInfo</span></a>.</p></td> | |
401 | <td class="parameter_annotations"> </td> | |
402 | </tr></tbody> | |
403 | </table></div> | |
404 | </div> | |
405 | <div class="refsect3"> | |
406 | <a name="xapp-gpu-info-get-shell-env-prefix.returns"></a><h4>Returns</h4> | |
407 | <p>A new string, free with <a href="../glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>.</p> | |
408 | <p>Since 2.6. </p> | |
409 | <p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> | |
410 | </div> | |
411 | </div> | |
412 | </div> | |
413 | <div class="refsect1"> | |
414 | <a name="XAppGpuOffloadHelper.other_details"></a><h2>Types and Values</h2> | |
415 | <div class="refsect2"> | |
416 | <a name="XAPP-TYPE-GPU-OFFLOAD-HELPER:CAPS"></a><h3>XAPP_TYPE_GPU_OFFLOAD_HELPER</h3> | |
417 | <pre class="programlisting">#define XAPP_TYPE_GPU_OFFLOAD_HELPER xapp_gpu_offload_helper_get_type () | |
418 | </pre> | |
419 | </div> | |
420 | <hr> | |
421 | <div class="refsect2"> | |
422 | <a name="XAppGpuInfo-struct"></a><h3>struct XAppGpuInfo</h3> | |
423 | <pre class="programlisting">struct XAppGpuInfo { | |
424 | gint id; | |
425 | gboolean is_default; | |
426 | gchar *display_name; | |
427 | gchar **env_strv; | |
428 | }; | |
429 | </pre> | |
430 | <p>Information about a single GPU used for offloading. The length of <em class="parameter"><code>env_strv</code></em> | |
431 | will always be an even number.</p> | |
432 | <div class="refsect3"> | |
433 | <a name="XAppGpuInfo.members"></a><h4>Members</h4> | |
434 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
435 | <colgroup> | |
436 | <col width="300px" class="struct_members_name"> | |
437 | <col class="struct_members_description"> | |
438 | <col width="200px" class="struct_members_annotations"> | |
439 | </colgroup> | |
440 | <tbody> | |
441 | <tr> | |
442 | <td class="struct_member_name"><p><a href="../glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> <em class="structfield"><code><a name="XAppGpuInfo-struct.id"></a>id</code></em>;</p></td> | |
443 | <td class="struct_member_description"><p>An identifier that can be used to refer to this GPU.</p></td> | |
444 | <td class="struct_member_annotations"> </td> | |
445 | </tr> | |
446 | <tr> | |
447 | <td class="struct_member_name"><p><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> <em class="structfield"><code><a name="XAppGpuInfo-struct.is-default"></a>is_default</code></em>;</p></td> | |
448 | <td class="struct_member_description"><p>Whether this GPU is used by default.</p></td> | |
449 | <td class="struct_member_annotations"> </td> | |
450 | </tr> | |
451 | <tr> | |
452 | <td class="struct_member_name"><p><a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="XAppGpuInfo-struct.display-name"></a>display_name</code></em>;</p></td> | |
453 | <td class="struct_member_description"><p>User-visible name of the GPU.</p></td> | |
454 | <td class="struct_member_annotations"> </td> | |
455 | </tr> | |
456 | <tr> | |
457 | <td class="struct_member_name"><p><a href="../glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **<em class="structfield"><code><a name="XAppGpuInfo-struct.env-strv"></a>env_strv</code></em>;</p></td> | |
458 | <td class="struct_member_description"><p>A string array containing alternating environment variables names and values to use to enable the gpu. </p></td> | |
459 | <td class="struct_member_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1]</span></td> | |
460 | </tr> | |
461 | </tbody> | |
462 | </table></div> | |
463 | </div> | |
464 | </div> | |
465 | <hr> | |
466 | <div class="refsect2"> | |
467 | <a name="XAppGpuOffloadHelper-struct"></a><h3>XAppGpuOffloadHelper</h3> | |
468 | <pre class="programlisting">typedef struct _XAppGpuOffloadHelper XAppGpuOffloadHelper;</pre> | |
469 | </div> | |
470 | </div> | |
471 | <div class="refsect1"> | |
472 | <a name="XAppGpuOffloadHelper.signal-details"></a><h2>Signal Details</h2> | |
473 | <div class="refsect2"> | |
474 | <a name="XAppGpuOffloadHelper-ready"></a><h3>The <code class="literal">“ready”</code> signal</h3> | |
475 | <pre class="programlisting"><span class="returnvalue">void</span> | |
476 | user_function (<a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper"><span class="type">XAppGpuOffloadHelper</span></a> *helper, | |
477 | <a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> success, | |
478 | <a href="../glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre> | |
479 | <p>This signal is emitted by the helper when it has completed | |
480 | gathering GPU information. It will only be sent once.</p> | |
481 | <div class="refsect3"> | |
482 | <a name="XAppGpuOffloadHelper-ready.parameters"></a><h4>Parameters</h4> | |
483 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
484 | <colgroup> | |
485 | <col width="150px" class="parameters_name"> | |
486 | <col class="parameters_description"> | |
487 | <col width="200px" class="parameters_annotations"> | |
488 | </colgroup> | |
489 | <tbody> | |
490 | <tr> | |
491 | <td class="parameter_name"><p>helper</p></td> | |
492 | <td class="parameter_description"><p>the <a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper"><span class="type">XAppGpuOffloadHelper</span></a></p></td> | |
493 | <td class="parameter_annotations"> </td> | |
494 | </tr> | |
495 | <tr> | |
496 | <td class="parameter_name"><p>success</p></td> | |
497 | <td class="parameter_description"><p>Whether or not the helper initialize successfully.</p></td> | |
498 | <td class="parameter_annotations"> </td> | |
499 | </tr> | |
500 | <tr> | |
501 | <td class="parameter_name"><p>user_data</p></td> | |
502 | <td class="parameter_description"><p>user data set when the signal handler was connected.</p></td> | |
503 | <td class="parameter_annotations"> </td> | |
504 | </tr> | |
505 | </tbody> | |
506 | </table></div> | |
507 | </div> | |
508 | <p>Flags: <a href="../gobject/gobject-Signals.html#G-SIGNAL-ACTION:CAPS">Action</a></p> | |
509 | </div> | |
510 | </div> | |
511 | </div> | |
512 | <div class="footer"> | |
513 | <hr>Generated by GTK-Doc V1.33.1</div> | |
514 | </body> | |
515 | </html>⏎ |
6 | 6 | <link rel="home" href="index.html" title="XApp Reference Manual"> |
7 | 7 | <link rel="up" href="ch01.html" title="API reference"> |
8 | 8 | <link rel="prev" href="XAppFavorites.html" title="XAppFavorites"> |
9 | <link rel="next" href="XAppIconChooserButton.html" title="XAppIconChooserButton"> | |
9 | <link rel="next" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper"> | |
10 | 10 | <meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
12 | 12 | </head> |
21 | 21 | <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> |
22 | 22 | <td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> |
23 | 23 | <td><a accesskey="p" href="XAppFavorites.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> |
24 | <td><a accesskey="n" href="XAppIconChooserButton.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> | |
24 | <td><a accesskey="n" href="XAppGpuOffloadHelper.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> | |
25 | 25 | </tr></table> |
26 | 26 | <div class="refentry"> |
27 | 27 | <a name="XAppGtkWindow"></a><div class="titlepage"></div> |
5 | 5 | <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"> |
6 | 6 | <link rel="home" href="index.html" title="XApp Reference Manual"> |
7 | 7 | <link rel="up" href="ch01.html" title="API reference"> |
8 | <link rel="prev" href="XAppGtkWindow.html" title="XAppGtkWindow"> | |
8 | <link rel="prev" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper"> | |
9 | 9 | <link rel="next" href="XAppIconChooserDialog.html" title="XAppIconChooserDialog"> |
10 | 10 | <meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
21 | 21 | </td> |
22 | 22 | <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> |
23 | 23 | <td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> |
24 | <td><a accesskey="p" href="XAppGtkWindow.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> | |
24 | <td><a accesskey="p" href="XAppGpuOffloadHelper.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> | |
25 | 25 | <td><a accesskey="n" href="XAppIconChooserDialog.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> |
26 | 26 | </tr></table> |
27 | 27 | <div class="refentry"> |
129 | 129 | to the <a href="../gtk3/GtkStack.html#GtkStack-struct"><span class="type">GtkStack</span></a>. The <a class="link" href="XAppStackSidebar.html" title="XAppStackSidebar"><span class="type">XAppStackSidebar</span></a> is an extended version of the |
130 | 130 | the <a href="../gtk3/GtkStackSidebar.html#GtkStackSidebar-struct"><span class="type">GtkStackSidebar</span></a> that allows showing an icon in addition to the text.</p> |
131 | 131 | <div class="refsect2"> |
132 | <a name="id-1.2.9.8.4"></a><h3>CSS nodes</h3> | |
132 | <a name="id-1.2.11.8.4"></a><h3>CSS nodes</h3> | |
133 | 133 | <p>XAppStackSidebar has a single CSS node with the name stacksidebar and |
134 | 134 | style class .sidebar</p> |
135 | 135 | <p>When circumstances require it, XAppStackSidebar adds the |
0 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
1 | <html> | |
2 | <head> | |
3 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
4 | <title>XAppVisibilityGroup: XApp Reference Manual</title> | |
5 | <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"> | |
6 | <link rel="home" href="index.html" title="XApp Reference Manual"> | |
7 | <link rel="up" href="ch01.html" title="API reference"> | |
8 | <link rel="prev" href="libxapp-xapp-util.html" title="xapp-util"> | |
9 | <link rel="next" href="object-tree.html" title="Object Hierarchy"> | |
10 | <meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> | |
11 | <link rel="stylesheet" href="style.css" type="text/css"> | |
12 | </head> | |
13 | <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> | |
14 | <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle"> | |
15 | <td width="100%" align="left" class="shortcuts"> | |
16 | <a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> | |
17 | <a href="#XAppVisibilityGroup.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> | |
18 | <a href="#XAppVisibilityGroup.object-hierarchy" class="shortcut">Object Hierarchy</a></span> | |
19 | </td> | |
20 | <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> | |
21 | <td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> | |
22 | <td><a accesskey="p" href="libxapp-xapp-util.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> | |
23 | <td><a accesskey="n" href="object-tree.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> | |
24 | </tr></table> | |
25 | <div class="refentry"> | |
26 | <a name="XAppVisibilityGroup"></a><div class="titlepage"></div> | |
27 | <div class="refnamediv"><table width="100%"><tr> | |
28 | <td valign="top"> | |
29 | <h2><span class="refentrytitle"><a name="XAppVisibilityGroup.top_of_page"></a>XAppVisibilityGroup</span></h2> | |
30 | <p>XAppVisibilityGroup — Groups widgets to have their visibility or sensitivity controlled as a group, | |
31 | independent of their positions in any widget hierarchy.</p> | |
32 | </td> | |
33 | <td class="gallery_image" valign="top" align="right"></td> | |
34 | </tr></table></div> | |
35 | <div class="refsect1"> | |
36 | <a name="XAppVisibilityGroup.functions"></a><h2>Functions</h2> | |
37 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
38 | <colgroup> | |
39 | <col width="150px" class="functions_proto_type"> | |
40 | <col class="functions_proto_name"> | |
41 | </colgroup> | |
42 | <tbody> | |
43 | <tr> | |
44 | <td class="function_type"> | |
45 | <a class="link" href="XAppVisibilityGroup.html" title="XAppVisibilityGroup"><span class="returnvalue">XAppVisibilityGroup</span></a> * | |
46 | </td> | |
47 | <td class="function_name"> | |
48 | <a class="link" href="XAppVisibilityGroup.html#xapp-visibility-group-new" title="xapp_visibility_group_new ()">xapp_visibility_group_new</a> <span class="c_punctuation">()</span> | |
49 | </td> | |
50 | </tr> | |
51 | <tr> | |
52 | <td class="function_type"> | |
53 | <span class="returnvalue">void</span> | |
54 | </td> | |
55 | <td class="function_name"> | |
56 | <a class="link" href="XAppVisibilityGroup.html#xapp-visibility-group-add-widget" title="xapp_visibility_group_add_widget ()">xapp_visibility_group_add_widget</a> <span class="c_punctuation">()</span> | |
57 | </td> | |
58 | </tr> | |
59 | <tr> | |
60 | <td class="function_type"> | |
61 | <a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> | |
62 | </td> | |
63 | <td class="function_name"> | |
64 | <a class="link" href="XAppVisibilityGroup.html#xapp-visibility-group-remove-widget" title="xapp_visibility_group_remove_widget ()">xapp_visibility_group_remove_widget</a> <span class="c_punctuation">()</span> | |
65 | </td> | |
66 | </tr> | |
67 | <tr> | |
68 | <td class="function_type"> | |
69 | <span class="returnvalue">void</span> | |
70 | </td> | |
71 | <td class="function_name"> | |
72 | <a class="link" href="XAppVisibilityGroup.html#xapp-visibility-group-hide" title="xapp_visibility_group_hide ()">xapp_visibility_group_hide</a> <span class="c_punctuation">()</span> | |
73 | </td> | |
74 | </tr> | |
75 | <tr> | |
76 | <td class="function_type"> | |
77 | <span class="returnvalue">void</span> | |
78 | </td> | |
79 | <td class="function_name"> | |
80 | <a class="link" href="XAppVisibilityGroup.html#xapp-visibility-group-show" title="xapp_visibility_group_show ()">xapp_visibility_group_show</a> <span class="c_punctuation">()</span> | |
81 | </td> | |
82 | </tr> | |
83 | <tr> | |
84 | <td class="function_type"> | |
85 | <span class="returnvalue">void</span> | |
86 | </td> | |
87 | <td class="function_name"> | |
88 | <a class="link" href="XAppVisibilityGroup.html#xapp-visibility-group-set-visible" title="xapp_visibility_group_set_visible ()">xapp_visibility_group_set_visible</a> <span class="c_punctuation">()</span> | |
89 | </td> | |
90 | </tr> | |
91 | <tr> | |
92 | <td class="function_type"> | |
93 | <a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> | |
94 | </td> | |
95 | <td class="function_name"> | |
96 | <a class="link" href="XAppVisibilityGroup.html#xapp-visibility-group-get-visible" title="xapp_visibility_group_get_visible ()">xapp_visibility_group_get_visible</a> <span class="c_punctuation">()</span> | |
97 | </td> | |
98 | </tr> | |
99 | <tr> | |
100 | <td class="function_type"> | |
101 | <span class="returnvalue">void</span> | |
102 | </td> | |
103 | <td class="function_name"> | |
104 | <a class="link" href="XAppVisibilityGroup.html#xapp-visibility-group-set-sensitive" title="xapp_visibility_group_set_sensitive ()">xapp_visibility_group_set_sensitive</a> <span class="c_punctuation">()</span> | |
105 | </td> | |
106 | </tr> | |
107 | <tr> | |
108 | <td class="function_type"> | |
109 | <a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> | |
110 | </td> | |
111 | <td class="function_name"> | |
112 | <a class="link" href="XAppVisibilityGroup.html#xapp-visibility-group-get-sensitive" title="xapp_visibility_group_get_sensitive ()">xapp_visibility_group_get_sensitive</a> <span class="c_punctuation">()</span> | |
113 | </td> | |
114 | </tr> | |
115 | <tr> | |
116 | <td class="function_type"> | |
117 | <a href="../glib/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> * | |
118 | </td> | |
119 | <td class="function_name"> | |
120 | <a class="link" href="XAppVisibilityGroup.html#xapp-visibility-group-get-widgets" title="xapp_visibility_group_get_widgets ()">xapp_visibility_group_get_widgets</a> <span class="c_punctuation">()</span> | |
121 | </td> | |
122 | </tr> | |
123 | <tr> | |
124 | <td class="function_type"> | |
125 | <span class="returnvalue">void</span> | |
126 | </td> | |
127 | <td class="function_name"> | |
128 | <a class="link" href="XAppVisibilityGroup.html#xapp-visibility-group-set-widgets" title="xapp_visibility_group_set_widgets ()">xapp_visibility_group_set_widgets</a> <span class="c_punctuation">()</span> | |
129 | </td> | |
130 | </tr> | |
131 | </tbody> | |
132 | </table></div> | |
133 | </div> | |
134 | <div class="refsect1"> | |
135 | <a name="XAppVisibilityGroup.other"></a><h2>Types and Values</h2> | |
136 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
137 | <colgroup> | |
138 | <col width="150px" class="other_proto_type"> | |
139 | <col class="other_proto_name"> | |
140 | </colgroup> | |
141 | <tbody><tr> | |
142 | <td class="datatype_keyword">struct</td> | |
143 | <td class="function_name"><a class="link" href="XAppVisibilityGroup.html#XAppVisibilityGroup-struct" title="struct XAppVisibilityGroup">XAppVisibilityGroup</a></td> | |
144 | </tr></tbody> | |
145 | </table></div> | |
146 | </div> | |
147 | <div class="refsect1"> | |
148 | <a name="XAppVisibilityGroup.object-hierarchy"></a><h2>Object Hierarchy</h2> | |
149 | <pre class="screen"> <a href="/usr/share/gtk-doc/html/gobject/gobject-Boxed-Types.html">GBoxed</a> | |
150 | <span class="lineart">╰──</span> XAppVisibilityGroup | |
151 | </pre> | |
152 | </div> | |
153 | <div class="refsect1"> | |
154 | <a name="XAppVisibilityGroup.description"></a><h2>Description</h2> | |
155 | <p>You can use this to hide and show groups of widgets all at once, without having to | |
156 | specify each one. They do not have to have the same parents, or even have the same toplevel | |
157 | window.</p> | |
158 | <p>If a widget is destroyed before the group is, it will be automatically removed from the | |
159 | visibility group. You only ever need to free the XAppVisibilityGroup itself.</p> | |
160 | <p>Only the specific members of the group have their visibility and sensitivity set, not their | |
161 | descendants. No effort is made to track or prevent state changes made to individual widgets | |
162 | by outside influence.</p> | |
163 | </div> | |
164 | <div class="refsect1"> | |
165 | <a name="XAppVisibilityGroup.functions_details"></a><h2>Functions</h2> | |
166 | <div class="refsect2"> | |
167 | <a name="xapp-visibility-group-new"></a><h3>xapp_visibility_group_new ()</h3> | |
168 | <pre class="programlisting"><a class="link" href="XAppVisibilityGroup.html" title="XAppVisibilityGroup"><span class="returnvalue">XAppVisibilityGroup</span></a> * | |
169 | xapp_visibility_group_new (<em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> visible</code></em>, | |
170 | <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> sensitive</code></em>, | |
171 | <em class="parameter"><code><a href="../glib/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> *widgets</code></em>);</pre> | |
172 | <p>Creates a new <a class="link" href="XAppVisibilityGroup.html" title="XAppVisibilityGroup"><span class="type">XAppVisibilityGroup</span></a>.</p> | |
173 | <p>If <em class="parameter"><code>widgets</code></em> | |
174 | is not NULL, adds these widgets to the group with the starting visibility and | |
175 | sensitivity state.</p> | |
176 | <div class="refsect3"> | |
177 | <a name="xapp-visibility-group-new.parameters"></a><h4>Parameters</h4> | |
178 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
179 | <colgroup> | |
180 | <col width="150px" class="parameters_name"> | |
181 | <col class="parameters_description"> | |
182 | <col width="200px" class="parameters_annotations"> | |
183 | </colgroup> | |
184 | <tbody> | |
185 | <tr> | |
186 | <td class="parameter_name"><p>visible</p></td> | |
187 | <td class="parameter_description"><p>starting visibility state</p></td> | |
188 | <td class="parameter_annotations"> </td> | |
189 | </tr> | |
190 | <tr> | |
191 | <td class="parameter_name"><p>sensitive</p></td> | |
192 | <td class="parameter_description"><p>starting sensitivity state</p></td> | |
193 | <td class="parameter_annotations"> </td> | |
194 | </tr> | |
195 | <tr> | |
196 | <td class="parameter_name"><p>widgets</p></td> | |
197 | <td class="parameter_description"><p>list of <a href="../gtk3/GtkWidget.html#GtkWidget-struct"><span class="type">GtkWidgets</span></a> to add to the group. </p></td> | |
198 | <td class="parameter_annotations"><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GtkWidget][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> | |
199 | </tr> | |
200 | </tbody> | |
201 | </table></div> | |
202 | </div> | |
203 | <div class="refsect3"> | |
204 | <a name="xapp-visibility-group-new.returns"></a><h4>Returns</h4> | |
205 | <p>a new <a class="link" href="XAppVisibilityGroup.html" title="XAppVisibilityGroup"><span class="type">XAppVisibilityGroup</span></a>. Use xapp_visibility_group_free when finished. </p> | |
206 | <p><span class="annotation">[<acronym title="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p> | |
207 | </div> | |
208 | <p class="since">Since: 2.2.15</p> | |
209 | </div> | |
210 | <hr> | |
211 | <div class="refsect2"> | |
212 | <a name="xapp-visibility-group-add-widget"></a><h3>xapp_visibility_group_add_widget ()</h3> | |
213 | <pre class="programlisting"><span class="returnvalue">void</span> | |
214 | xapp_visibility_group_add_widget (<em class="parameter"><code><a class="link" href="XAppVisibilityGroup.html" title="XAppVisibilityGroup"><span class="type">XAppVisibilityGroup</span></a> *group</code></em>, | |
215 | <em class="parameter"><code><a href="../gtk3/GtkWidget.html#GtkWidget-struct"><span class="type">GtkWidget</span></a> *widget</code></em>);</pre> | |
216 | <p>Adds widget to the visibility group.</p> | |
217 | <div class="refsect3"> | |
218 | <a name="xapp-visibility-group-add-widget.parameters"></a><h4>Parameters</h4> | |
219 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
220 | <colgroup> | |
221 | <col width="150px" class="parameters_name"> | |
222 | <col class="parameters_description"> | |
223 | <col width="200px" class="parameters_annotations"> | |
224 | </colgroup> | |
225 | <tbody> | |
226 | <tr> | |
227 | <td class="parameter_name"><p>group</p></td> | |
228 | <td class="parameter_description"><p>the visibility group</p></td> | |
229 | <td class="parameter_annotations"> </td> | |
230 | </tr> | |
231 | <tr> | |
232 | <td class="parameter_name"><p>widget</p></td> | |
233 | <td class="parameter_description"><p>the <a href="../gtk3/GtkWidget.html#GtkWidget-struct"><span class="type">GtkWidget</span></a> to add to the group</p></td> | |
234 | <td class="parameter_annotations"> </td> | |
235 | </tr> | |
236 | </tbody> | |
237 | </table></div> | |
238 | </div> | |
239 | <p class="since">Since: 2.2.15</p> | |
240 | </div> | |
241 | <hr> | |
242 | <div class="refsect2"> | |
243 | <a name="xapp-visibility-group-remove-widget"></a><h3>xapp_visibility_group_remove_widget ()</h3> | |
244 | <pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> | |
245 | xapp_visibility_group_remove_widget (<em class="parameter"><code><a class="link" href="XAppVisibilityGroup.html" title="XAppVisibilityGroup"><span class="type">XAppVisibilityGroup</span></a> *group</code></em>, | |
246 | <em class="parameter"><code><a href="../gtk3/GtkWidget.html#GtkWidget-struct"><span class="type">GtkWidget</span></a> *widget</code></em>);</pre> | |
247 | <div class="refsect3"> | |
248 | <a name="xapp-visibility-group-remove-widget.parameters"></a><h4>Parameters</h4> | |
249 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
250 | <colgroup> | |
251 | <col width="150px" class="parameters_name"> | |
252 | <col class="parameters_description"> | |
253 | <col width="200px" class="parameters_annotations"> | |
254 | </colgroup> | |
255 | <tbody> | |
256 | <tr> | |
257 | <td class="parameter_name"><p>group</p></td> | |
258 | <td class="parameter_description"><p>the visibility group</p></td> | |
259 | <td class="parameter_annotations"> </td> | |
260 | </tr> | |
261 | <tr> | |
262 | <td class="parameter_name"><p>widget</p></td> | |
263 | <td class="parameter_description"><p>the <a href="../gtk3/GtkWidget.html#GtkWidget-struct"><span class="type">GtkWidget</span></a> to remove from the group</p></td> | |
264 | <td class="parameter_annotations"> </td> | |
265 | </tr> | |
266 | </tbody> | |
267 | </table></div> | |
268 | </div> | |
269 | <div class="refsect3"> | |
270 | <a name="xapp-visibility-group-remove-widget.returns"></a><h4>Returns</h4> | |
271 | <p> TRUE if the widget was found and removed.</p> | |
272 | </div> | |
273 | <p class="since">Since: 2.2.15</p> | |
274 | </div> | |
275 | <hr> | |
276 | <div class="refsect2"> | |
277 | <a name="xapp-visibility-group-hide"></a><h3>xapp_visibility_group_hide ()</h3> | |
278 | <pre class="programlisting"><span class="returnvalue">void</span> | |
279 | xapp_visibility_group_hide (<em class="parameter"><code><a class="link" href="XAppVisibilityGroup.html" title="XAppVisibilityGroup"><span class="type">XAppVisibilityGroup</span></a> *group</code></em>);</pre> | |
280 | <p>Hide all widgets in the group.</p> | |
281 | <div class="refsect3"> | |
282 | <a name="xapp-visibility-group-hide.parameters"></a><h4>Parameters</h4> | |
283 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
284 | <colgroup> | |
285 | <col width="150px" class="parameters_name"> | |
286 | <col class="parameters_description"> | |
287 | <col width="200px" class="parameters_annotations"> | |
288 | </colgroup> | |
289 | <tbody><tr> | |
290 | <td class="parameter_name"><p>group</p></td> | |
291 | <td class="parameter_description"><p>the visibility group</p></td> | |
292 | <td class="parameter_annotations"> </td> | |
293 | </tr></tbody> | |
294 | </table></div> | |
295 | </div> | |
296 | <p class="since">Since: 2.2.15</p> | |
297 | </div> | |
298 | <hr> | |
299 | <div class="refsect2"> | |
300 | <a name="xapp-visibility-group-show"></a><h3>xapp_visibility_group_show ()</h3> | |
301 | <pre class="programlisting"><span class="returnvalue">void</span> | |
302 | xapp_visibility_group_show (<em class="parameter"><code><a class="link" href="XAppVisibilityGroup.html" title="XAppVisibilityGroup"><span class="type">XAppVisibilityGroup</span></a> *group</code></em>);</pre> | |
303 | <p>Show all widgets in the group.</p> | |
304 | <div class="refsect3"> | |
305 | <a name="xapp-visibility-group-show.parameters"></a><h4>Parameters</h4> | |
306 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
307 | <colgroup> | |
308 | <col width="150px" class="parameters_name"> | |
309 | <col class="parameters_description"> | |
310 | <col width="200px" class="parameters_annotations"> | |
311 | </colgroup> | |
312 | <tbody><tr> | |
313 | <td class="parameter_name"><p>group</p></td> | |
314 | <td class="parameter_description"><p>the visibility group</p></td> | |
315 | <td class="parameter_annotations"> </td> | |
316 | </tr></tbody> | |
317 | </table></div> | |
318 | </div> | |
319 | <p class="since">Since: 2.2.15</p> | |
320 | </div> | |
321 | <hr> | |
322 | <div class="refsect2"> | |
323 | <a name="xapp-visibility-group-set-visible"></a><h3>xapp_visibility_group_set_visible ()</h3> | |
324 | <pre class="programlisting"><span class="returnvalue">void</span> | |
325 | xapp_visibility_group_set_visible (<em class="parameter"><code><a class="link" href="XAppVisibilityGroup.html" title="XAppVisibilityGroup"><span class="type">XAppVisibilityGroup</span></a> *group</code></em>, | |
326 | <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> visible</code></em>);</pre> | |
327 | <p>Set the visibility of all widgets in the group.</p> | |
328 | <div class="refsect3"> | |
329 | <a name="xapp-visibility-group-set-visible.parameters"></a><h4>Parameters</h4> | |
330 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
331 | <colgroup> | |
332 | <col width="150px" class="parameters_name"> | |
333 | <col class="parameters_description"> | |
334 | <col width="200px" class="parameters_annotations"> | |
335 | </colgroup> | |
336 | <tbody> | |
337 | <tr> | |
338 | <td class="parameter_name"><p>group</p></td> | |
339 | <td class="parameter_description"><p>the visibility group</p></td> | |
340 | <td class="parameter_annotations"> </td> | |
341 | </tr> | |
342 | <tr> | |
343 | <td class="parameter_name"><p>visible</p></td> | |
344 | <td class="parameter_description"><p>TRUE to make the widgets visible.</p></td> | |
345 | <td class="parameter_annotations"> </td> | |
346 | </tr> | |
347 | </tbody> | |
348 | </table></div> | |
349 | </div> | |
350 | <p class="since">Since: 2.2.15</p> | |
351 | </div> | |
352 | <hr> | |
353 | <div class="refsect2"> | |
354 | <a name="xapp-visibility-group-get-visible"></a><h3>xapp_visibility_group_get_visible ()</h3> | |
355 | <pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> | |
356 | xapp_visibility_group_get_visible (<em class="parameter"><code><a class="link" href="XAppVisibilityGroup.html" title="XAppVisibilityGroup"><span class="type">XAppVisibilityGroup</span></a> *group</code></em>);</pre> | |
357 | <p>Get the visibility of the group.</p> | |
358 | <p>There is no guarantee that all widgets in the group actually are | |
359 | in the returned state, if they've had their visibility individually | |
360 | modified since the last time the group was set.</p> | |
361 | <div class="refsect3"> | |
362 | <a name="xapp-visibility-group-get-visible.parameters"></a><h4>Parameters</h4> | |
363 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
364 | <colgroup> | |
365 | <col width="150px" class="parameters_name"> | |
366 | <col class="parameters_description"> | |
367 | <col width="200px" class="parameters_annotations"> | |
368 | </colgroup> | |
369 | <tbody><tr> | |
370 | <td class="parameter_name"><p>group</p></td> | |
371 | <td class="parameter_description"><p>the visibility group.</p></td> | |
372 | <td class="parameter_annotations"> </td> | |
373 | </tr></tbody> | |
374 | </table></div> | |
375 | </div> | |
376 | <div class="refsect3"> | |
377 | <a name="xapp-visibility-group-get-visible.returns"></a><h4>Returns</h4> | |
378 | <p> The visibility state of the group.</p> | |
379 | </div> | |
380 | <p class="since">Since: 2.2.15</p> | |
381 | </div> | |
382 | <hr> | |
383 | <div class="refsect2"> | |
384 | <a name="xapp-visibility-group-set-sensitive"></a><h3>xapp_visibility_group_set_sensitive ()</h3> | |
385 | <pre class="programlisting"><span class="returnvalue">void</span> | |
386 | xapp_visibility_group_set_sensitive (<em class="parameter"><code><a class="link" href="XAppVisibilityGroup.html" title="XAppVisibilityGroup"><span class="type">XAppVisibilityGroup</span></a> *group</code></em>, | |
387 | <em class="parameter"><code><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> sensitive</code></em>);</pre> | |
388 | <p>Set the sensitivity of all widgets in group.</p> | |
389 | <div class="refsect3"> | |
390 | <a name="xapp-visibility-group-set-sensitive.parameters"></a><h4>Parameters</h4> | |
391 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
392 | <colgroup> | |
393 | <col width="150px" class="parameters_name"> | |
394 | <col class="parameters_description"> | |
395 | <col width="200px" class="parameters_annotations"> | |
396 | </colgroup> | |
397 | <tbody> | |
398 | <tr> | |
399 | <td class="parameter_name"><p>group</p></td> | |
400 | <td class="parameter_description"><p>the visibility group.</p></td> | |
401 | <td class="parameter_annotations"> </td> | |
402 | </tr> | |
403 | <tr> | |
404 | <td class="parameter_name"><p>sensitive</p></td> | |
405 | <td class="parameter_description"><p>TRUE to make the widgets sensitive.</p></td> | |
406 | <td class="parameter_annotations"> </td> | |
407 | </tr> | |
408 | </tbody> | |
409 | </table></div> | |
410 | </div> | |
411 | <p class="since">Since: 2.2.15</p> | |
412 | </div> | |
413 | <hr> | |
414 | <div class="refsect2"> | |
415 | <a name="xapp-visibility-group-get-sensitive"></a><h3>xapp_visibility_group_get_sensitive ()</h3> | |
416 | <pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> | |
417 | xapp_visibility_group_get_sensitive (<em class="parameter"><code><a class="link" href="XAppVisibilityGroup.html" title="XAppVisibilityGroup"><span class="type">XAppVisibilityGroup</span></a> *group</code></em>);</pre> | |
418 | <p>Get the sensitivity of the group.</p> | |
419 | <p>There is no guarantee that all widgets in the group actually are | |
420 | in the returned state, if they've had their sensitivity individually | |
421 | modified since the last time the group was set.</p> | |
422 | <div class="refsect3"> | |
423 | <a name="xapp-visibility-group-get-sensitive.parameters"></a><h4>Parameters</h4> | |
424 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
425 | <colgroup> | |
426 | <col width="150px" class="parameters_name"> | |
427 | <col class="parameters_description"> | |
428 | <col width="200px" class="parameters_annotations"> | |
429 | </colgroup> | |
430 | <tbody><tr> | |
431 | <td class="parameter_name"><p>group</p></td> | |
432 | <td class="parameter_description"><p>the visibility group.</p></td> | |
433 | <td class="parameter_annotations"> </td> | |
434 | </tr></tbody> | |
435 | </table></div> | |
436 | </div> | |
437 | <div class="refsect3"> | |
438 | <a name="xapp-visibility-group-get-sensitive.returns"></a><h4>Returns</h4> | |
439 | <p> The sensitivity state of the group.</p> | |
440 | </div> | |
441 | <p class="since">Since: 2.2.15</p> | |
442 | </div> | |
443 | <hr> | |
444 | <div class="refsect2"> | |
445 | <a name="xapp-visibility-group-get-widgets"></a><h3>xapp_visibility_group_get_widgets ()</h3> | |
446 | <pre class="programlisting"><a href="../glib/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> * | |
447 | xapp_visibility_group_get_widgets (<em class="parameter"><code><a class="link" href="XAppVisibilityGroup.html" title="XAppVisibilityGroup"><span class="type">XAppVisibilityGroup</span></a> *group</code></em>);</pre> | |
448 | <p>Returns the members of the group or NULL if the group is empty.</p> | |
449 | <div class="refsect3"> | |
450 | <a name="xapp-visibility-group-get-widgets.parameters"></a><h4>Parameters</h4> | |
451 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
452 | <colgroup> | |
453 | <col width="150px" class="parameters_name"> | |
454 | <col class="parameters_description"> | |
455 | <col width="200px" class="parameters_annotations"> | |
456 | </colgroup> | |
457 | <tbody><tr> | |
458 | <td class="parameter_name"><p>group</p></td> | |
459 | <td class="parameter_description"><p>the visibility group</p></td> | |
460 | <td class="parameter_annotations"> </td> | |
461 | </tr></tbody> | |
462 | </table></div> | |
463 | </div> | |
464 | <div class="refsect3"> | |
465 | <a name="xapp-visibility-group-get-widgets.returns"></a><h4>Returns</h4> | |
466 | <p>a list of members of the group.</p> | |
467 | <p>The list is owned by XApp, do not free. </p> | |
468 | <p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GtkWidget][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> | |
469 | </div> | |
470 | <p class="since">Since: 2.2.15</p> | |
471 | </div> | |
472 | <hr> | |
473 | <div class="refsect2"> | |
474 | <a name="xapp-visibility-group-set-widgets"></a><h3>xapp_visibility_group_set_widgets ()</h3> | |
475 | <pre class="programlisting"><span class="returnvalue">void</span> | |
476 | xapp_visibility_group_set_widgets (<em class="parameter"><code><a class="link" href="XAppVisibilityGroup.html" title="XAppVisibilityGroup"><span class="type">XAppVisibilityGroup</span></a> *group</code></em>, | |
477 | <em class="parameter"><code><a href="../glib/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> *widgets</code></em>);</pre> | |
478 | <div class="refsect3"> | |
479 | <a name="xapp-visibility-group-set-widgets.parameters"></a><h4>Parameters</h4> | |
480 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
481 | <colgroup> | |
482 | <col width="150px" class="parameters_name"> | |
483 | <col class="parameters_description"> | |
484 | <col width="200px" class="parameters_annotations"> | |
485 | </colgroup> | |
486 | <tbody> | |
487 | <tr> | |
488 | <td class="parameter_name"><p>group</p></td> | |
489 | <td class="parameter_description"><p>the visibility group</p></td> | |
490 | <td class="parameter_annotations"> </td> | |
491 | </tr> | |
492 | <tr> | |
493 | <td class="parameter_name"><p>widgets</p></td> | |
494 | <td class="parameter_description"><p>The widgets to add to this group, replacing any existing ones. </p></td> | |
495 | <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GtkWidget][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></td> | |
496 | </tr> | |
497 | </tbody> | |
498 | </table></div> | |
499 | </div> | |
500 | <p class="since">Since: 2.2.15</p> | |
501 | </div> | |
502 | </div> | |
503 | <div class="refsect1"> | |
504 | <a name="XAppVisibilityGroup.other_details"></a><h2>Types and Values</h2> | |
505 | <div class="refsect2"> | |
506 | <a name="XAppVisibilityGroup-struct"></a><h3>struct XAppVisibilityGroup</h3> | |
507 | <pre class="programlisting">struct XAppVisibilityGroup { | |
508 | GSList *widgets; | |
509 | gboolean visible; | |
510 | gboolean sensitive; | |
511 | }; | |
512 | </pre> | |
513 | <p>A group of widgets that can have their visibility and sensitivity controlled together.</p> | |
514 | <div class="refsect3"> | |
515 | <a name="XAppVisibilityGroup.members"></a><h4>Members</h4> | |
516 | <div class="informaltable"><table class="informaltable" width="100%" border="0"> | |
517 | <colgroup> | |
518 | <col width="300px" class="struct_members_name"> | |
519 | <col class="struct_members_description"> | |
520 | <col width="200px" class="struct_members_annotations"> | |
521 | </colgroup> | |
522 | <tbody> | |
523 | <tr> | |
524 | <td class="struct_member_name"><p><a href="../glib/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> *<em class="structfield"><code><a name="XAppVisibilityGroup-struct.widgets"></a>widgets</code></em>;</p></td> | |
525 | <td class="struct_member_description"><p>The <a href="../gtk3/GtkWidget.html#GtkWidget-struct"><span class="type">GtkWidget</span></a> members of this group. </p></td> | |
526 | <td class="struct_member_annotations"><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> Gtk.Widget][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td> | |
527 | </tr> | |
528 | <tr> | |
529 | <td class="struct_member_name"><p><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> <em class="structfield"><code><a name="XAppVisibilityGroup-struct.visible"></a>visible</code></em>;</p></td> | |
530 | <td class="struct_member_description"><p>The current visible state of the group. There is no guarantee that all members are actually in this state.</p></td> | |
531 | <td class="struct_member_annotations"> </td> | |
532 | </tr> | |
533 | <tr> | |
534 | <td class="struct_member_name"><p><a href="../glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> <em class="structfield"><code><a name="XAppVisibilityGroup-struct.sensitive"></a>sensitive</code></em>;</p></td> | |
535 | <td class="struct_member_description"><p>The current sensitive state of the group. There is no guarantee that all members are actually in this state.</p></td> | |
536 | <td class="struct_member_annotations"> </td> | |
537 | </tr> | |
538 | </tbody> | |
539 | </table></div> | |
540 | </div> | |
541 | </div> | |
542 | </div> | |
543 | </div> | |
544 | <div class="footer"> | |
545 | <hr>Generated by GTK-Doc V1.33.1</div> | |
546 | </body> | |
547 | </html>⏎ |
32 | 32 | <span class="dim">|</span> |
33 | 33 | <a class="shortcut" href="#idxT">T</a> |
34 | 34 | <span class="dim">|</span> |
35 | <a class="shortcut" href="#idxU">U</a></span></td> | |
35 | <a class="shortcut" href="#idxU">U</a> | |
36 | <span class="dim">|</span> | |
37 | <a class="shortcut" href="#idxV">V</a></span></td> | |
36 | 38 | <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> |
37 | 39 | <td><img src="up-insensitive.png" width="16" height="16" border="0"></td> |
38 | 40 | <td><a accesskey="p" href="object-tree.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> |
43 | 45 | <a name="api-index-full"></a>API Index</h1></div></div></div> |
44 | 46 | <a name="idx"></a><a name="idxD"></a><h3 class="title">D</h3> |
45 | 47 | <dt> |
48 | <a class="link" href="XAppDarkModeManager.html#XAppDarkModeManager-struct" title="XAppDarkModeManager">XAppDarkModeManager</a>, struct in <a class="link" href="XAppDarkModeManager.html" title="XAppDarkModeManager">XAppDarkModeManager</a> | |
49 | </dt> | |
50 | <dd></dd> | |
51 | <dt> | |
52 | <a class="link" href="XAppDarkModeManager.html#xapp-dark-mode-manager-new" title="xapp_dark_mode_manager_new ()">xapp_dark_mode_manager_new</a>, function in <a class="link" href="XAppDarkModeManager.html" title="XAppDarkModeManager">XAppDarkModeManager</a> | |
53 | </dt> | |
54 | <dd></dd> | |
55 | <dt> | |
46 | 56 | DEBUG, macro in xapp-debug |
47 | 57 | </dt> |
48 | 58 | <dd></dd> |
63 | 73 | </dt> |
64 | 74 | <dd></dd> |
65 | 75 | <dt> |
76 | debug_flag_to_string, function in xapp-debug | |
77 | </dt> | |
78 | <dd></dd> | |
79 | <dt> | |
66 | 80 | xapp_debug_set_flags, function in xapp-debug |
67 | 81 | </dt> |
68 | 82 | <dd></dd> |
141 | 155 | <dd></dd> |
142 | 156 | <a name="idxG"></a><h3 class="title">G</h3> |
143 | 157 | <dt> |
158 | <a class="link" href="libxapp-xapp-util.html#xapp-get-tmp-dir" title="xapp_get_tmp_dir ()">xapp_get_tmp_dir</a>, function in <a class="link" href="libxapp-xapp-util.html" title="xapp-util">xapp-util</a> | |
159 | </dt> | |
160 | <dd></dd> | |
161 | <dt> | |
162 | <a class="link" href="XAppGpuOffloadHelper.html#XAppGpuInfo-struct" title="struct XAppGpuInfo">XAppGpuInfo</a>, struct in <a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper">XAppGpuOffloadHelper</a> | |
163 | </dt> | |
164 | <dd></dd> | |
165 | <dt> | |
166 | <a class="link" href="XAppGpuOffloadHelper.html#XAppGpuOffloadHelper-struct" title="XAppGpuOffloadHelper">XAppGpuOffloadHelper</a>, struct in <a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper">XAppGpuOffloadHelper</a> | |
167 | </dt> | |
168 | <dd></dd> | |
169 | <dt> | |
170 | <a class="link" href="XAppGpuOffloadHelper.html#XAppGpuOffloadHelper-ready" title="The “ready” signal">XAppGpuOffloadHelper::ready</a>, object signal in <a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper">XAppGpuOffloadHelper</a> | |
171 | </dt> | |
172 | <dd></dd> | |
173 | <dt> | |
174 | <a class="link" href="XAppGpuOffloadHelper.html#xapp-gpu-info-get-shell-env-prefix" title="xapp_gpu_info_get_shell_env_prefix ()">xapp_gpu_info_get_shell_env_prefix</a>, function in <a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper">XAppGpuOffloadHelper</a> | |
175 | </dt> | |
176 | <dd></dd> | |
177 | <dt> | |
178 | <a class="link" href="XAppGpuOffloadHelper.html#xapp-gpu-offload-helper-get" title="xapp_gpu_offload_helper_get ()">xapp_gpu_offload_helper_get</a>, function in <a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper">XAppGpuOffloadHelper</a> | |
179 | </dt> | |
180 | <dd></dd> | |
181 | <dt> | |
182 | <a class="link" href="XAppGpuOffloadHelper.html#xapp-gpu-offload-helper-get-default-info" title="xapp_gpu_offload_helper_get_default_info ()">xapp_gpu_offload_helper_get_default_info</a>, function in <a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper">XAppGpuOffloadHelper</a> | |
183 | </dt> | |
184 | <dd></dd> | |
185 | <dt> | |
186 | <a class="link" href="XAppGpuOffloadHelper.html#xapp-gpu-offload-helper-get-info-by-id" title="xapp_gpu_offload_helper_get_info_by_id ()">xapp_gpu_offload_helper_get_info_by_id</a>, function in <a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper">XAppGpuOffloadHelper</a> | |
187 | </dt> | |
188 | <dd></dd> | |
189 | <dt> | |
190 | <a class="link" href="XAppGpuOffloadHelper.html#xapp-gpu-offload-helper-get-n-gpus" title="xapp_gpu_offload_helper_get_n_gpus ()">xapp_gpu_offload_helper_get_n_gpus</a>, function in <a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper">XAppGpuOffloadHelper</a> | |
191 | </dt> | |
192 | <dd></dd> | |
193 | <dt> | |
194 | <a class="link" href="XAppGpuOffloadHelper.html#xapp-gpu-offload-helper-get-offload-infos" title="xapp_gpu_offload_helper_get_offload_infos ()">xapp_gpu_offload_helper_get_offload_infos</a>, function in <a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper">XAppGpuOffloadHelper</a> | |
195 | </dt> | |
196 | <dd></dd> | |
197 | <dt> | |
198 | <a class="link" href="XAppGpuOffloadHelper.html#xapp-gpu-offload-helper-get-sync" title="xapp_gpu_offload_helper_get_sync ()">xapp_gpu_offload_helper_get_sync</a>, function in <a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper">XAppGpuOffloadHelper</a> | |
199 | </dt> | |
200 | <dd></dd> | |
201 | <dt> | |
202 | <a class="link" href="XAppGpuOffloadHelper.html#xapp-gpu-offload-helper-is-offload-supported" title="xapp_gpu_offload_helper_is_offload_supported ()">xapp_gpu_offload_helper_is_offload_supported</a>, function in <a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper">XAppGpuOffloadHelper</a> | |
203 | </dt> | |
204 | <dd></dd> | |
205 | <dt> | |
206 | <a class="link" href="XAppGpuOffloadHelper.html#xapp-gpu-offload-helper-is-ready" title="xapp_gpu_offload_helper_is_ready ()">xapp_gpu_offload_helper_is_ready</a>, function in <a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper">XAppGpuOffloadHelper</a> | |
207 | </dt> | |
208 | <dd></dd> | |
209 | <dt> | |
144 | 210 | <a class="link" href="XAppGtkWindow.html#XAppGtkWindow-struct" title="XAppGtkWindow">XAppGtkWindow</a>, struct in <a class="link" href="XAppGtkWindow.html" title="XAppGtkWindow">XAppGtkWindow</a> |
145 | 211 | </dt> |
146 | 212 | <dd></dd> |
906 | 972 | xapp_style_manager_set_widget, function in XAppStyleManager |
907 | 973 | </dt> |
908 | 974 | <dd></dd> |
975 | <dt> | |
976 | XAppSwitcherooControl:gpus, object property in XAppSwitcherooControlSkeleton | |
977 | </dt> | |
978 | <dd></dd> | |
979 | <dt> | |
980 | XAppSwitcherooControl:has-dual-gpu, object property in XAppSwitcherooControlSkeleton | |
981 | </dt> | |
982 | <dd></dd> | |
983 | <dt> | |
984 | XAppSwitcherooControl:num-gpus, object property in XAppSwitcherooControlSkeleton | |
985 | </dt> | |
986 | <dd></dd> | |
987 | <dt> | |
988 | xapp_switcheroo_control_dup_gpus, function in XAppSwitcherooControlSkeleton | |
989 | </dt> | |
990 | <dd></dd> | |
991 | <dt> | |
992 | xapp_switcheroo_control_get_gpus, function in XAppSwitcherooControlSkeleton | |
993 | </dt> | |
994 | <dd></dd> | |
995 | <dt> | |
996 | xapp_switcheroo_control_get_has_dual_gpu, function in XAppSwitcherooControlSkeleton | |
997 | </dt> | |
998 | <dd></dd> | |
999 | <dt> | |
1000 | xapp_switcheroo_control_get_num_gpus, function in XAppSwitcherooControlSkeleton | |
1001 | </dt> | |
1002 | <dd></dd> | |
1003 | <dt> | |
1004 | xapp_switcheroo_control_interface_info, function in XAppSwitcherooControlSkeleton | |
1005 | </dt> | |
1006 | <dd></dd> | |
1007 | <dt> | |
1008 | xapp_switcheroo_control_override_properties, function in XAppSwitcherooControlSkeleton | |
1009 | </dt> | |
1010 | <dd></dd> | |
1011 | <dt> | |
1012 | xapp_switcheroo_control_proxy_new, function in XAppSwitcherooControlSkeleton | |
1013 | </dt> | |
1014 | <dd></dd> | |
1015 | <dt> | |
1016 | xapp_switcheroo_control_proxy_new_finish, function in XAppSwitcherooControlSkeleton | |
1017 | </dt> | |
1018 | <dd></dd> | |
1019 | <dt> | |
1020 | xapp_switcheroo_control_proxy_new_for_bus, function in XAppSwitcherooControlSkeleton | |
1021 | </dt> | |
1022 | <dd></dd> | |
1023 | <dt> | |
1024 | xapp_switcheroo_control_proxy_new_for_bus_finish, function in XAppSwitcherooControlSkeleton | |
1025 | </dt> | |
1026 | <dd></dd> | |
1027 | <dt> | |
1028 | xapp_switcheroo_control_proxy_new_for_bus_sync, function in XAppSwitcherooControlSkeleton | |
1029 | </dt> | |
1030 | <dd></dd> | |
1031 | <dt> | |
1032 | xapp_switcheroo_control_proxy_new_sync, function in XAppSwitcherooControlSkeleton | |
1033 | </dt> | |
1034 | <dd></dd> | |
1035 | <dt> | |
1036 | xapp_switcheroo_control_set_gpus, function in XAppSwitcherooControlSkeleton | |
1037 | </dt> | |
1038 | <dd></dd> | |
1039 | <dt> | |
1040 | xapp_switcheroo_control_set_has_dual_gpu, function in XAppSwitcherooControlSkeleton | |
1041 | </dt> | |
1042 | <dd></dd> | |
1043 | <dt> | |
1044 | xapp_switcheroo_control_set_num_gpus, function in XAppSwitcherooControlSkeleton | |
1045 | </dt> | |
1046 | <dd></dd> | |
1047 | <dt> | |
1048 | xapp_switcheroo_control_skeleton_new, function in XAppSwitcherooControlSkeleton | |
1049 | </dt> | |
1050 | <dd></dd> | |
909 | 1051 | <a name="idxT"></a><h3 class="title">T</h3> |
910 | 1052 | <dt> |
1053 | <a class="link" href="XAppDarkModeManager.html#XAPP-TYPE-DARK-MODE-MANAGER:CAPS" title="XAPP_TYPE_DARK_MODE_MANAGER">XAPP_TYPE_DARK_MODE_MANAGER</a>, macro in <a class="link" href="XAppDarkModeManager.html" title="XAppDarkModeManager">XAppDarkModeManager</a> | |
1054 | </dt> | |
1055 | <dd></dd> | |
1056 | <dt> | |
911 | 1057 | <a class="link" href="XAppFavorites.html#XAPP-TYPE-FAVORITES:CAPS" title="XAPP_TYPE_FAVORITES">XAPP_TYPE_FAVORITES</a>, macro in <a class="link" href="XAppFavorites.html" title="XAppFavorites">XAppFavorites</a> |
912 | 1058 | </dt> |
913 | 1059 | <dd></dd> |
914 | 1060 | <dt> |
1061 | <a class="link" href="XAppGpuOffloadHelper.html#XAPP-TYPE-GPU-OFFLOAD-HELPER:CAPS" title="XAPP_TYPE_GPU_OFFLOAD_HELPER">XAPP_TYPE_GPU_OFFLOAD_HELPER</a>, macro in <a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper">XAppGpuOffloadHelper</a> | |
1062 | </dt> | |
1063 | <dd></dd> | |
1064 | <dt> | |
915 | 1065 | <a class="link" href="XAppGtkWindow.html#XAPP-TYPE-GTK-WINDOW:CAPS" title="XAPP_TYPE_GTK_WINDOW">XAPP_TYPE_GTK_WINDOW</a>, macro in <a class="link" href="XAppGtkWindow.html" title="XAppGtkWindow">XAppGtkWindow</a> |
916 | 1066 | </dt> |
917 | 1067 | <dd></dd> |
954 | 1104 | <dd></dd> |
955 | 1105 | <dt> |
956 | 1106 | <a class="link" href="libxapp-xapp-util.html#xapp-util-gpu-offload-supported" title="xapp_util_gpu_offload_supported ()">xapp_util_gpu_offload_supported</a>, function in <a class="link" href="libxapp-xapp-util.html" title="xapp-util">xapp-util</a> |
1107 | </dt> | |
1108 | <dd></dd> | |
1109 | <a name="idxV"></a><h3 class="title">V</h3> | |
1110 | <dt> | |
1111 | <a class="link" href="XAppVisibilityGroup.html#XAppVisibilityGroup-struct" title="struct XAppVisibilityGroup">XAppVisibilityGroup</a>, struct in <a class="link" href="XAppVisibilityGroup.html" title="XAppVisibilityGroup">XAppVisibilityGroup</a> | |
1112 | </dt> | |
1113 | <dd></dd> | |
1114 | <dt> | |
1115 | <a class="link" href="XAppVisibilityGroup.html#xapp-visibility-group-add-widget" title="xapp_visibility_group_add_widget ()">xapp_visibility_group_add_widget</a>, function in <a class="link" href="XAppVisibilityGroup.html" title="XAppVisibilityGroup">XAppVisibilityGroup</a> | |
1116 | </dt> | |
1117 | <dd></dd> | |
1118 | <dt> | |
1119 | <a class="link" href="XAppVisibilityGroup.html#xapp-visibility-group-get-sensitive" title="xapp_visibility_group_get_sensitive ()">xapp_visibility_group_get_sensitive</a>, function in <a class="link" href="XAppVisibilityGroup.html" title="XAppVisibilityGroup">XAppVisibilityGroup</a> | |
1120 | </dt> | |
1121 | <dd></dd> | |
1122 | <dt> | |
1123 | <a class="link" href="XAppVisibilityGroup.html#xapp-visibility-group-get-visible" title="xapp_visibility_group_get_visible ()">xapp_visibility_group_get_visible</a>, function in <a class="link" href="XAppVisibilityGroup.html" title="XAppVisibilityGroup">XAppVisibilityGroup</a> | |
1124 | </dt> | |
1125 | <dd></dd> | |
1126 | <dt> | |
1127 | <a class="link" href="XAppVisibilityGroup.html#xapp-visibility-group-get-widgets" title="xapp_visibility_group_get_widgets ()">xapp_visibility_group_get_widgets</a>, function in <a class="link" href="XAppVisibilityGroup.html" title="XAppVisibilityGroup">XAppVisibilityGroup</a> | |
1128 | </dt> | |
1129 | <dd></dd> | |
1130 | <dt> | |
1131 | <a class="link" href="XAppVisibilityGroup.html#xapp-visibility-group-hide" title="xapp_visibility_group_hide ()">xapp_visibility_group_hide</a>, function in <a class="link" href="XAppVisibilityGroup.html" title="XAppVisibilityGroup">XAppVisibilityGroup</a> | |
1132 | </dt> | |
1133 | <dd></dd> | |
1134 | <dt> | |
1135 | <a class="link" href="XAppVisibilityGroup.html#xapp-visibility-group-new" title="xapp_visibility_group_new ()">xapp_visibility_group_new</a>, function in <a class="link" href="XAppVisibilityGroup.html" title="XAppVisibilityGroup">XAppVisibilityGroup</a> | |
1136 | </dt> | |
1137 | <dd></dd> | |
1138 | <dt> | |
1139 | <a class="link" href="XAppVisibilityGroup.html#xapp-visibility-group-remove-widget" title="xapp_visibility_group_remove_widget ()">xapp_visibility_group_remove_widget</a>, function in <a class="link" href="XAppVisibilityGroup.html" title="XAppVisibilityGroup">XAppVisibilityGroup</a> | |
1140 | </dt> | |
1141 | <dd></dd> | |
1142 | <dt> | |
1143 | <a class="link" href="XAppVisibilityGroup.html#xapp-visibility-group-set-sensitive" title="xapp_visibility_group_set_sensitive ()">xapp_visibility_group_set_sensitive</a>, function in <a class="link" href="XAppVisibilityGroup.html" title="XAppVisibilityGroup">XAppVisibilityGroup</a> | |
1144 | </dt> | |
1145 | <dd></dd> | |
1146 | <dt> | |
1147 | <a class="link" href="XAppVisibilityGroup.html#xapp-visibility-group-set-visible" title="xapp_visibility_group_set_visible ()">xapp_visibility_group_set_visible</a>, function in <a class="link" href="XAppVisibilityGroup.html" title="XAppVisibilityGroup">XAppVisibilityGroup</a> | |
1148 | </dt> | |
1149 | <dd></dd> | |
1150 | <dt> | |
1151 | <a class="link" href="XAppVisibilityGroup.html#xapp-visibility-group-set-widgets" title="xapp_visibility_group_set_widgets ()">xapp_visibility_group_set_widgets</a>, function in <a class="link" href="XAppVisibilityGroup.html" title="XAppVisibilityGroup">XAppVisibilityGroup</a> | |
1152 | </dt> | |
1153 | <dd></dd> | |
1154 | <dt> | |
1155 | <a class="link" href="XAppVisibilityGroup.html#xapp-visibility-group-show" title="xapp_visibility_group_show ()">xapp_visibility_group_show</a>, function in <a class="link" href="XAppVisibilityGroup.html" title="XAppVisibilityGroup">XAppVisibilityGroup</a> | |
957 | 1156 | </dt> |
958 | 1157 | <dd></dd> |
959 | 1158 | </div> |
6 | 6 | <link rel="home" href="index.html" title="XApp Reference Manual"> |
7 | 7 | <link rel="up" href="index.html" title="XApp Reference Manual"> |
8 | 8 | <link rel="prev" href="index.html" title="XApp Reference Manual"> |
9 | <link rel="next" href="XAppFavorites.html" title="XAppFavorites"> | |
9 | <link rel="next" href="XAppDarkModeManager.html" title="XAppDarkModeManager"> | |
10 | 10 | <meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
12 | 12 | </head> |
16 | 16 | <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> |
17 | 17 | <td><img src="up-insensitive.png" width="16" height="16" border="0"></td> |
18 | 18 | <td><a accesskey="p" href="index.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> |
19 | <td><a accesskey="n" href="XAppFavorites.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> | |
19 | <td><a accesskey="n" href="XAppDarkModeManager.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> | |
20 | 20 | </tr></table> |
21 | 21 | <div class="chapter"> |
22 | 22 | <div class="titlepage"><div><div><h1 class="title"> |
23 | 23 | <a name="id-1.2"></a>API reference</h1></div></div></div> |
24 | 24 | <div class="toc"><dl class="toc"> |
25 | 25 | <dt> |
26 | <span class="refentrytitle"><a href="XAppDarkModeManager.html">XAppDarkModeManager</a></span><span class="refpurpose"> — Manages an application's dark mode preference for it.</span> | |
27 | </dt> | |
28 | <dt> | |
26 | 29 | <span class="refentrytitle"><a href="XAppFavorites.html">XAppFavorites</a></span><span class="refpurpose"> — Keeps track of favorite files.</span> |
27 | 30 | </dt> |
28 | 31 | <dt> |
29 | 32 | <span class="refentrytitle"><a href="XAppGtkWindow.html">XAppGtkWindow</a></span><span class="refpurpose"> — A subclass of <code class="literal">GtkWindow</code> that allows additional |
30 | 33 | communication with the window manager.</span> |
34 | </dt> | |
35 | <dt> | |
36 | <span class="refentrytitle"><a href="XAppGpuOffloadHelper.html">XAppGpuOffloadHelper</a></span><span class="refpurpose"> — Simple interface for Switcheroo.</span> | |
31 | 37 | </dt> |
32 | 38 | <dt> |
33 | 39 | <span class="refentrytitle"><a href="XAppIconChooserButton.html">XAppIconChooserButton</a></span><span class="refpurpose"> — A button for selecting an icon</span> |
60 | 66 | <dt> |
61 | 67 | <span class="refentrytitle"><a href="libxapp-xapp-util.html">xapp-util</a></span><span class="refpurpose"></span> |
62 | 68 | </dt> |
69 | <dt> | |
70 | <span class="refentrytitle"><a href="XAppVisibilityGroup.html">XAppVisibilityGroup</a></span><span class="refpurpose"> — Groups widgets to have their visibility or sensitivity controlled as a group, | |
71 | independent of their positions in any widget hierarchy.</span> | |
72 | </dt> | |
63 | 73 | </dl></div> |
64 | 74 | </div> |
65 | 75 | <div class="footer"> |
14 | 14 | <div> |
15 | 15 | <div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">XApp Reference Manual</p></th></tr></table></div> |
16 | 16 | <div><p class="releaseinfo"> |
17 | xapp 2.2.10 | |
17 | xapp 2.6.0 | |
18 | 18 | </p></div> |
19 | 19 | </div> |
20 | 20 | <hr> |
23 | 23 | <dt><span class="chapter"><a href="ch01.html">API reference</a></span></dt> |
24 | 24 | <dd><dl> |
25 | 25 | <dt> |
26 | <span class="refentrytitle"><a href="XAppDarkModeManager.html">XAppDarkModeManager</a></span><span class="refpurpose"> — Manages an application's dark mode preference for it.</span> | |
27 | </dt> | |
28 | <dt> | |
26 | 29 | <span class="refentrytitle"><a href="XAppFavorites.html">XAppFavorites</a></span><span class="refpurpose"> — Keeps track of favorite files.</span> |
27 | 30 | </dt> |
28 | 31 | <dt> |
29 | 32 | <span class="refentrytitle"><a href="XAppGtkWindow.html">XAppGtkWindow</a></span><span class="refpurpose"> — A subclass of <code class="literal">GtkWindow</code> that allows additional |
30 | 33 | communication with the window manager.</span> |
34 | </dt> | |
35 | <dt> | |
36 | <span class="refentrytitle"><a href="XAppGpuOffloadHelper.html">XAppGpuOffloadHelper</a></span><span class="refpurpose"> — Simple interface for Switcheroo.</span> | |
31 | 37 | </dt> |
32 | 38 | <dt> |
33 | 39 | <span class="refentrytitle"><a href="XAppIconChooserButton.html">XAppIconChooserButton</a></span><span class="refpurpose"> — A button for selecting an icon</span> |
60 | 66 | <dt> |
61 | 67 | <span class="refentrytitle"><a href="libxapp-xapp-util.html">xapp-util</a></span><span class="refpurpose"></span> |
62 | 68 | </dt> |
69 | <dt> | |
70 | <span class="refentrytitle"><a href="XAppVisibilityGroup.html">XAppVisibilityGroup</a></span><span class="refpurpose"> — Groups widgets to have their visibility or sensitivity controlled as a group, | |
71 | independent of their positions in any widget hierarchy.</span> | |
72 | </dt> | |
63 | 73 | </dl></dd> |
64 | 74 | <dt><span class="chapter"><a href="object-tree.html">Object Hierarchy</a></span></dt> |
65 | 75 | <dt><span class="index"><a href="api-index-full.html">API Index</a></span></dt> |
6 | 6 | <link rel="home" href="index.html" title="XApp Reference Manual"> |
7 | 7 | <link rel="up" href="ch01.html" title="API reference"> |
8 | 8 | <link rel="prev" href="XAppObjectManagerClient.html" title="XAppObjectManagerClient"> |
9 | <link rel="next" href="object-tree.html" title="Object Hierarchy"> | |
9 | <link rel="next" href="XAppVisibilityGroup.html" title="XAppVisibilityGroup"> | |
10 | 10 | <meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
12 | 12 | </head> |
19 | 19 | <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> |
20 | 20 | <td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td> |
21 | 21 | <td><a accesskey="p" href="XAppObjectManagerClient.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> |
22 | <td><a accesskey="n" href="object-tree.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> | |
22 | <td><a accesskey="n" href="XAppVisibilityGroup.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> | |
23 | 23 | </tr></table> |
24 | 24 | <div class="refentry"> |
25 | 25 | <a name="libxapp-xapp-util"></a><div class="titlepage"></div> |
60 | 60 | </td> |
61 | 61 | <td class="function_name"> |
62 | 62 | <a class="link" href="libxapp-xapp-util.html#xapp-pango-font-string-to-css" title="xapp_pango_font_string_to_css ()">xapp_pango_font_string_to_css</a> <span class="c_punctuation">()</span> |
63 | </td> | |
64 | </tr> | |
65 | <tr> | |
66 | <td class="function_type">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * | |
67 | </td> | |
68 | <td class="function_name"> | |
69 | <a class="link" href="libxapp-xapp-util.html#xapp-get-tmp-dir" title="xapp_get_tmp_dir ()">xapp_get_tmp_dir</a> <span class="c_punctuation">()</span> | |
63 | 70 | </td> |
64 | 71 | </tr> |
65 | 72 | </tbody> |
122 | 129 | </div> |
123 | 130 | <p class="since">Since: 2.2</p> |
124 | 131 | </div> |
132 | <hr> | |
133 | <div class="refsect2"> | |
134 | <a name="xapp-get-tmp-dir"></a><h3>xapp_get_tmp_dir ()</h3> | |
135 | <pre class="programlisting">const <a href="../glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * | |
136 | xapp_get_tmp_dir (<em class="parameter"><code><span class="type">void</span></code></em>);</pre> | |
137 | <p>Provides the path to the system's temporary files folder. This is identical to g_get_tmp_dir, | |
138 | but includes the /dev/shm ramdisk as the first choice for a temporary folder.</p> | |
139 | <div class="refsect3"> | |
140 | <a name="xapp-get-tmp-dir.returns"></a><h4>Returns</h4> | |
141 | <p>the directory to use for temporary files. </p> | |
142 | <p><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> filename][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p> | |
143 | </div> | |
144 | <p class="since">Since: 2.2.16</p> | |
145 | </div> | |
125 | 146 | </div> |
126 | 147 | </div> |
127 | 148 | <div class="footer"> |
1 | 1 | <book xmlns="http://www.devhelp.net/book" title="XApp Reference Manual" link="index.html" author="" name="libxapp" version="2" language="c"> |
2 | 2 | <chapters> |
3 | 3 | <sub name="API reference" link="ch01.html"> |
4 | <sub name="XAppDarkModeManager" link="XAppDarkModeManager.html"/> | |
4 | 5 | <sub name="XAppFavorites" link="XAppFavorites.html"/> |
5 | 6 | <sub name="XAppGtkWindow" link="XAppGtkWindow.html"/> |
7 | <sub name="XAppGpuOffloadHelper" link="XAppGpuOffloadHelper.html"/> | |
6 | 8 | <sub name="XAppIconChooserButton" link="XAppIconChooserButton.html"/> |
7 | 9 | <sub name="XAppIconChooserDialog" link="XAppIconChooserDialog.html"/> |
8 | 10 | <sub name="XAppKbdLayoutController" link="XAppKbdLayoutController.html"/> |
13 | 15 | <sub name="XAppStatusIconMonitor" link="XAppStatusIconMonitor.html"/> |
14 | 16 | <sub name="XAppObjectManagerClient" link="XAppObjectManagerClient.html"/> |
15 | 17 | <sub name="xapp-util" link="libxapp-xapp-util.html"/> |
18 | <sub name="XAppVisibilityGroup" link="XAppVisibilityGroup.html"/> | |
16 | 19 | </sub> |
17 | 20 | <sub name="Object Hierarchy" link="object-tree.html"/> |
18 | 21 | <sub name="API Index" link="api-index-full.html"/> |
20 | 23 | <sub name="Annotation Glossary" link="annotation-glossary.html"/> |
21 | 24 | </chapters> |
22 | 25 | <functions> |
26 | <keyword type="function" name="xapp_dark_mode_manager_new ()" link="XAppDarkModeManager.html#xapp-dark-mode-manager-new" since="2.6"/> | |
27 | <keyword type="macro" name="XAPP_TYPE_DARK_MODE_MANAGER" link="XAppDarkModeManager.html#XAPP-TYPE-DARK-MODE-MANAGER:CAPS"/> | |
28 | <keyword type="struct" name="XAppDarkModeManager" link="XAppDarkModeManager.html#XAppDarkModeManager-struct"/> | |
23 | 29 | <keyword type="function" name="xapp_favorites_get_default ()" link="XAppFavorites.html#xapp-favorites-get-default" since="2.0"/> |
24 | 30 | <keyword type="function" name="xapp_favorites_get_favorites ()" link="XAppFavorites.html#xapp-favorites-get-favorites" since="2.0"/> |
25 | 31 | <keyword type="function" name="xapp_favorites_get_n_favorites ()" link="XAppFavorites.html#xapp-favorites-get-n-favorites" since="2.0"/> |
54 | 60 | <keyword type="macro" name="XAPP_TYPE_GTK_WINDOW" link="XAppGtkWindow.html#XAPP-TYPE-GTK-WINDOW:CAPS"/> |
55 | 61 | <keyword type="struct" name="struct XAppGtkWindowClass" link="XAppGtkWindow.html#XAppGtkWindowClass"/> |
56 | 62 | <keyword type="struct" name="XAppGtkWindow" link="XAppGtkWindow.html#XAppGtkWindow-struct"/> |
63 | <keyword type="function" name="xapp_gpu_offload_helper_get ()" link="XAppGpuOffloadHelper.html#xapp-gpu-offload-helper-get" since="2.6"/> | |
64 | <keyword type="function" name="xapp_gpu_offload_helper_get_sync ()" link="XAppGpuOffloadHelper.html#xapp-gpu-offload-helper-get-sync" since="2.6"/> | |
65 | <keyword type="function" name="xapp_gpu_offload_helper_is_ready ()" link="XAppGpuOffloadHelper.html#xapp-gpu-offload-helper-is-ready" since="2.6"/> | |
66 | <keyword type="function" name="xapp_gpu_offload_helper_is_offload_supported ()" link="XAppGpuOffloadHelper.html#xapp-gpu-offload-helper-is-offload-supported" since="2.6"/> | |
67 | <keyword type="function" name="xapp_gpu_offload_helper_get_n_gpus ()" link="XAppGpuOffloadHelper.html#xapp-gpu-offload-helper-get-n-gpus" since="2.6"/> | |
68 | <keyword type="function" name="xapp_gpu_offload_helper_get_offload_infos ()" link="XAppGpuOffloadHelper.html#xapp-gpu-offload-helper-get-offload-infos" since="2.6"/> | |
69 | <keyword type="function" name="xapp_gpu_offload_helper_get_default_info ()" link="XAppGpuOffloadHelper.html#xapp-gpu-offload-helper-get-default-info" since="2.6"/> | |
70 | <keyword type="function" name="xapp_gpu_offload_helper_get_info_by_id ()" link="XAppGpuOffloadHelper.html#xapp-gpu-offload-helper-get-info-by-id" since="2.6"/> | |
71 | <keyword type="function" name="xapp_gpu_info_get_shell_env_prefix ()" link="XAppGpuOffloadHelper.html#xapp-gpu-info-get-shell-env-prefix"/> | |
72 | <keyword type="macro" name="XAPP_TYPE_GPU_OFFLOAD_HELPER" link="XAppGpuOffloadHelper.html#XAPP-TYPE-GPU-OFFLOAD-HELPER:CAPS"/> | |
73 | <keyword type="struct" name="struct XAppGpuInfo" link="XAppGpuOffloadHelper.html#XAppGpuInfo-struct"/> | |
74 | <keyword type="struct" name="XAppGpuOffloadHelper" link="XAppGpuOffloadHelper.html#XAppGpuOffloadHelper-struct"/> | |
75 | <keyword type="signal" name="The “ready” signal" link="XAppGpuOffloadHelper.html#XAppGpuOffloadHelper-ready"/> | |
57 | 76 | <keyword type="function" name="xapp_icon_chooser_button_new ()" link="XAppIconChooserButton.html#xapp-icon-chooser-button-new"/> |
58 | 77 | <keyword type="function" name="xapp_icon_chooser_button_new_with_size ()" link="XAppIconChooserButton.html#xapp-icon-chooser-button-new-with-size"/> |
59 | 78 | <keyword type="function" name="xapp_icon_chooser_button_set_icon_size ()" link="XAppIconChooserButton.html#xapp-icon-chooser-button-set-icon-size"/> |
230 | 249 | <keyword type="function" name="xapp_util_gpu_offload_supported ()" link="libxapp-xapp-util.html#xapp-util-gpu-offload-supported" since="1.8"/> |
231 | 250 | <keyword type="function" name="xapp_util_get_session_is_running ()" link="libxapp-xapp-util.html#xapp-util-get-session-is-running" since="2.0"/> |
232 | 251 | <keyword type="function" name="xapp_pango_font_string_to_css ()" link="libxapp-xapp-util.html#xapp-pango-font-string-to-css" since="2.2"/> |
252 | <keyword type="function" name="xapp_get_tmp_dir ()" link="libxapp-xapp-util.html#xapp-get-tmp-dir" since="2.2.16"/> | |
253 | <keyword type="function" name="xapp_visibility_group_new ()" link="XAppVisibilityGroup.html#xapp-visibility-group-new" since="2.2.15"/> | |
254 | <keyword type="function" name="xapp_visibility_group_add_widget ()" link="XAppVisibilityGroup.html#xapp-visibility-group-add-widget" since="2.2.15"/> | |
255 | <keyword type="function" name="xapp_visibility_group_remove_widget ()" link="XAppVisibilityGroup.html#xapp-visibility-group-remove-widget" since="2.2.15"/> | |
256 | <keyword type="function" name="xapp_visibility_group_hide ()" link="XAppVisibilityGroup.html#xapp-visibility-group-hide" since="2.2.15"/> | |
257 | <keyword type="function" name="xapp_visibility_group_show ()" link="XAppVisibilityGroup.html#xapp-visibility-group-show" since="2.2.15"/> | |
258 | <keyword type="function" name="xapp_visibility_group_set_visible ()" link="XAppVisibilityGroup.html#xapp-visibility-group-set-visible" since="2.2.15"/> | |
259 | <keyword type="function" name="xapp_visibility_group_get_visible ()" link="XAppVisibilityGroup.html#xapp-visibility-group-get-visible" since="2.2.15"/> | |
260 | <keyword type="function" name="xapp_visibility_group_set_sensitive ()" link="XAppVisibilityGroup.html#xapp-visibility-group-set-sensitive" since="2.2.15"/> | |
261 | <keyword type="function" name="xapp_visibility_group_get_sensitive ()" link="XAppVisibilityGroup.html#xapp-visibility-group-get-sensitive" since="2.2.15"/> | |
262 | <keyword type="function" name="xapp_visibility_group_get_widgets ()" link="XAppVisibilityGroup.html#xapp-visibility-group-get-widgets" since="2.2.15"/> | |
263 | <keyword type="function" name="xapp_visibility_group_set_widgets ()" link="XAppVisibilityGroup.html#xapp-visibility-group-set-widgets" since="2.2.15"/> | |
264 | <keyword type="struct" name="struct XAppVisibilityGroup" link="XAppVisibilityGroup.html#XAppVisibilityGroup-struct"/> | |
233 | 265 | <keyword type="constant" name="XAPP_ICON_SIZE_16" link="XAppIconChooserDialog.html#XAPP-ICON-SIZE-16:CAPS"/> |
234 | 266 | <keyword type="constant" name="XAPP_ICON_SIZE_22" link="XAppIconChooserDialog.html#XAPP-ICON-SIZE-22:CAPS"/> |
235 | 267 | <keyword type="constant" name="XAPP_ICON_SIZE_24" link="XAppIconChooserDialog.html#XAPP-ICON-SIZE-24:CAPS"/> |
246 | 278 | <keyword type="member" name="XAppFavoriteInfo-struct.uri" link="XAppFavorites.html#XAppFavoriteInfo-struct.uri"/> |
247 | 279 | <keyword type="member" name="XAppFavoriteInfo-struct.display-name" link="XAppFavorites.html#XAppFavoriteInfo-struct.display-name"/> |
248 | 280 | <keyword type="member" name="XAppFavoriteInfo-struct.cached-mimetype" link="XAppFavorites.html#XAppFavoriteInfo-struct.cached-mimetype"/> |
281 | <keyword type="member" name="XAppGpuInfo-struct.id" link="XAppGpuOffloadHelper.html#XAppGpuInfo-struct.id"/> | |
282 | <keyword type="member" name="XAppGpuInfo-struct.is-default" link="XAppGpuOffloadHelper.html#XAppGpuInfo-struct.is-default"/> | |
283 | <keyword type="member" name="XAppGpuInfo-struct.display-name" link="XAppGpuOffloadHelper.html#XAppGpuInfo-struct.display-name"/> | |
284 | <keyword type="member" name="XAppGpuInfo-struct.env-strv" link="XAppGpuOffloadHelper.html#XAppGpuInfo-struct.env-strv"/> | |
285 | <keyword type="member" name="XAppVisibilityGroup-struct.widgets" link="XAppVisibilityGroup.html#XAppVisibilityGroup-struct.widgets"/> | |
286 | <keyword type="member" name="XAppVisibilityGroup-struct.visible" link="XAppVisibilityGroup.html#XAppVisibilityGroup-struct.visible"/> | |
287 | <keyword type="member" name="XAppVisibilityGroup-struct.sensitive" link="XAppVisibilityGroup.html#XAppVisibilityGroup-struct.sensitive"/> | |
249 | 288 | </functions> |
250 | 289 | </book> |
5 | 5 | <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot"> |
6 | 6 | <link rel="home" href="index.html" title="XApp Reference Manual"> |
7 | 7 | <link rel="up" href="index.html" title="XApp Reference Manual"> |
8 | <link rel="prev" href="libxapp-xapp-util.html" title="xapp-util"> | |
8 | <link rel="prev" href="XAppVisibilityGroup.html" title="XAppVisibilityGroup"> | |
9 | 9 | <link rel="next" href="api-index-full.html" title="API Index"> |
10 | 10 | <meta name="generator" content="GTK-Doc V1.33.1 (XML mode)"> |
11 | 11 | <link rel="stylesheet" href="style.css" type="text/css"> |
15 | 15 | <td width="100%" align="left" class="shortcuts"></td> |
16 | 16 | <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td> |
17 | 17 | <td><img src="up-insensitive.png" width="16" height="16" border="0"></td> |
18 | <td><a accesskey="p" href="libxapp-xapp-util.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> | |
18 | <td><a accesskey="p" href="XAppVisibilityGroup.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td> | |
19 | 19 | <td><a accesskey="n" href="api-index-full.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td> |
20 | 20 | </tr></table> |
21 | 21 | <div class="chapter"> |
23 | 23 | <a name="object-tree"></a>Object Hierarchy</h1></div></div></div> |
24 | 24 | <pre class="screen"> |
25 | 25 | <a href="../gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a> |
26 | <span class="lineart">├──</span> <a class="link" href="XAppDarkModeManager.html" title="XAppDarkModeManager">XAppDarkModeManager</a> | |
26 | 27 | <span class="lineart">├──</span> <a class="link" href="XAppFavorites.html" title="XAppFavorites">XAppFavorites</a> |
28 | <span class="lineart">├──</span> <a class="link" href="XAppGpuOffloadHelper.html" title="XAppGpuOffloadHelper">XAppGpuOffloadHelper</a> | |
27 | 29 | <span class="lineart">├──</span> <a href="../gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a> |
28 | 30 | <span class="lineart">│</span> <span class="lineart">╰──</span> <a href="../gtk3/GtkWidget.html#GtkWidget-struct">GtkWidget</a> |
29 | 31 | <span class="lineart">│</span> <span class="lineart">╰──</span> <a href="../gtk3/GtkContainer.html#GtkContainer-struct">GtkContainer</a> |
45 | 47 | <span class="lineart">│</span> <span class="lineart">╰──</span> <a class="link" href="XAppObjectManagerClient.html#XAppObjectSkeleton">XAppObjectSkeleton</a> |
46 | 48 | <span class="lineart">├──</span> <a class="link" href="XAppStatusIcon.html" title="XAppStatusIcon">XAppStatusIcon</a> |
47 | 49 | <span class="lineart">├──</span> <a href="../gio/GDBusProxy.html#GDBusProxy-struct">GDBusProxy</a> |
48 | <span class="lineart">│</span> <span class="lineart">╰──</span> <a class="link" href="XAppObjectManagerClient.html#XAppStatusIconInterfaceProxy">XAppStatusIconInterfaceProxy</a> | |
50 | <span class="lineart">│</span> <span class="lineart">├──</span> <a class="link" href="XAppObjectManagerClient.html#XAppStatusIconInterfaceProxy">XAppStatusIconInterfaceProxy</a> | |
51 | <span class="lineart">│</span> <span class="lineart">╰──</span> XAppSwitcherooControlProxy | |
49 | 52 | <span class="lineart">├──</span> <a href="../gio/GDBusInterfaceSkeleton.html#GDBusInterfaceSkeleton-struct">GDBusInterfaceSkeleton</a> |
50 | <span class="lineart">│</span> <span class="lineart">╰──</span> <a class="link" href="XAppObjectManagerClient.html#XAppStatusIconInterfaceSkeleton">XAppStatusIconInterfaceSkeleton</a> | |
53 | <span class="lineart">│</span> <span class="lineart">├──</span> <a class="link" href="XAppObjectManagerClient.html#XAppStatusIconInterfaceSkeleton">XAppStatusIconInterfaceSkeleton</a> | |
54 | <span class="lineart">│</span> <span class="lineart">╰──</span> XAppSwitcherooControlSkeleton | |
51 | 55 | <span class="lineart">├──</span> <a class="link" href="XAppStatusIconMonitor.html" title="XAppStatusIconMonitor">XAppStatusIconMonitor</a> |
52 | 56 | <span class="lineart">╰──</span> XAppStyleManager |
53 | 57 | <a href="/usr/share/gtk-doc/html/gobject/GTypeModule.html">GInterface</a> |
54 | 58 | <span class="lineart">├──</span> <a class="link" href="XAppObjectManagerClient.html#XAppObject">XAppObject</a> |
55 | <span class="lineart">╰──</span> <a class="link" href="XAppObjectManagerClient.html#XAppStatusIconInterface">XAppStatusIconInterface</a> | |
59 | <span class="lineart">├──</span> <a class="link" href="XAppObjectManagerClient.html#XAppStatusIconInterface">XAppStatusIconInterface</a> | |
60 | <span class="lineart">╰──</span> XAppSwitcherooControl | |
56 | 61 | <a href="/usr/share/gtk-doc/html/gobject/gobject-Boxed-Types.html">GBoxed</a> |
57 | <span class="lineart">╰──</span> <a class="link" href="XAppFavorites.html#XAppFavoriteInfo">XAppFavoriteInfo</a> | |
62 | <span class="lineart">├──</span> <a class="link" href="XAppFavorites.html#XAppFavoriteInfo">XAppFavoriteInfo</a> | |
63 | <span class="lineart">├──</span> <a class="link" href="XAppGpuOffloadHelper.html#XAppGpuInfo">XAppGpuInfo</a> | |
64 | <span class="lineart">╰──</span> <a class="link" href="XAppVisibilityGroup.html" title="XAppVisibilityGroup">XAppVisibilityGroup</a> | |
58 | 65 | <a href="/usr/share/gtk-doc/html/gobject/gobject-Enumeration-and-Flag-Types.html">GEnum</a> |
59 | 66 | <span class="lineart">├──</span> <a class="link" href="XAppIconChooserDialog.html#XAppIconSize" title="enum XAppIconSize">XAppIconSize</a> |
60 | 67 | <span class="lineart">├──</span> <a class="link" href="XAppStatusIcon.html#XAppScrollDirection" title="enum XAppScrollDirection">XAppScrollDirection</a> |
15 | 15 | |
16 | 16 | <chapter> |
17 | 17 | <title>API reference</title> |
18 | <xi:include href="xml/xapp-dark-mode-manager.xml"/> | |
18 | 19 | <xi:include href="xml/xapp-favorites.xml"/> |
19 | 20 | <xi:include href="xml/xapp-gtk-window.xml"/> |
21 | <xi:include href="xml/xapp-gpu-offload-helper.xml"/> | |
20 | 22 | <xi:include href="xml/xapp-icon-chooser-button.xml"/> |
21 | 23 | <xi:include href="xml/xapp-icon-chooser-dialog.xml"/> |
22 | 24 | <xi:include href="xml/xapp-kbd-layout-controller.xml"/> |
11 | 11 | #define FAVORITE_DCONF_METADATA_KEY "root-metadata" |
12 | 12 | |
13 | 13 | static GSettings *settings = NULL; |
14 | G_LOCK_DEFINE_STATIC (settings); | |
14 | 15 | |
15 | 16 | typedef struct |
16 | 17 | { |
490 | 491 | |
491 | 492 | if (g_file_attribute_matcher_enumerate_namespace (matcher, "metadata")) |
492 | 493 | { |
494 | G_LOCK (settings); | |
495 | ||
493 | 496 | gchar **entries = g_settings_get_strv (settings, FAVORITE_DCONF_METADATA_KEY); |
494 | 497 | |
495 | 498 | if (entries != NULL) |
524 | 527 | } |
525 | 528 | |
526 | 529 | g_strfreev (entries); |
530 | ||
531 | G_UNLOCK (settings); | |
527 | 532 | } |
528 | 533 | |
529 | 534 | g_file_attribute_matcher_unref (matcher); |
686 | 691 | gchar **old_metadata, **new_metadata; |
687 | 692 | gint i; |
688 | 693 | |
694 | G_LOCK (settings); | |
695 | ||
689 | 696 | old_metadata = g_settings_get_strv (settings, FAVORITE_DCONF_METADATA_KEY); |
690 | 697 | |
691 | 698 | if (old_metadata == NULL) |
716 | 723 | |
717 | 724 | g_settings_set_strv (settings, FAVORITE_DCONF_METADATA_KEY, (const gchar * const *) new_metadata); |
718 | 725 | g_strfreev (new_metadata); |
726 | ||
727 | G_UNLOCK (settings); | |
719 | 728 | } |
720 | 729 | |
721 | 730 | static void |
729 | 738 | gchar *entry; |
730 | 739 | gboolean exists; |
731 | 740 | |
741 | G_LOCK (settings); | |
742 | ||
732 | 743 | old_metadata = g_settings_get_strv (settings, FAVORITE_DCONF_METADATA_KEY); |
733 | 744 | |
734 | 745 | if (old_metadata == NULL) |
790 | 801 | |
791 | 802 | g_settings_set_strv (settings, FAVORITE_DCONF_METADATA_KEY, (const gchar * const *) new_metadata); |
792 | 803 | g_strfreev (new_metadata); |
804 | ||
805 | G_UNLOCK (settings); | |
793 | 806 | } |
794 | 807 | |
795 | 808 | gboolean |
3 | 3 | gio_unix_dep = dependency('gio-unix-2.0', version: glib_min_ver, required: true) |
4 | 4 | glib_dep = dependency('glib-2.0', version: glib_min_ver, required: true) |
5 | 5 | gtk3_dep = dependency('gtk+-3.0', version: '>=3.16', required: true) |
6 | gmodule_dep = dependency('gmodule-2.0', version: glib_min_ver, required: true) | |
6 | 7 | |
7 | 8 | libdeps = [] |
8 | 9 | libdeps += gio_dep |
9 | 10 | libdeps += gio_unix_dep |
10 | 11 | libdeps += glib_dep |
11 | 12 | libdeps += gtk3_dep |
13 | libdeps += gmodule_dep | |
12 | 14 | libdeps += dependency('gdk-pixbuf-2.0', version: '>=2.22.0', required: true) |
13 | 15 | libdeps += dependency('cairo', required: true) |
14 | 16 | libdeps += dependency('x11', required: true) |
25 | 27 | ] |
26 | 28 | |
27 | 29 | xapp_headers = [ |
30 | 'xapp-dark-mode-manager.h', | |
28 | 31 | 'xapp-favorites.h', |
29 | 32 | 'xapp-gtk-window.h', |
33 | 'xapp-gpu-offload-helper.h', | |
30 | 34 | 'xapp-icon-chooser-button.h', |
31 | 35 | 'xapp-icon-chooser-dialog.h', |
32 | 36 | 'xapp-monitor-blanker.h', |
40 | 44 | ] |
41 | 45 | |
42 | 46 | xapp_sources = [ |
47 | 'xapp-dark-mode-manager.c', | |
43 | 48 | 'xapp-favorites.c', |
44 | 49 | 'xapp-glade-catalog.c', |
45 | 50 | 'xapp-gtk-window.c', |
51 | 'xapp-gpu-offload-helper.c', | |
46 | 52 | 'xapp-icon-chooser-button.c', |
47 | 53 | 'xapp-icon-chooser-dialog.c', |
48 | 54 | 'xapp-monitor-blanker.c', |
55 | 61 | 'xapp-visibility-group.c' |
56 | 62 | ] |
57 | 63 | |
64 | switcheroo_sources = gnome.gdbus_codegen( | |
65 | 'xapp-switcheroo-interface', | |
66 | sources: 'net.hadess.SwitcherooControl.xml', | |
67 | interface_prefix: 'net.hadess', | |
68 | namespace: 'XApp' | |
69 | ) | |
70 | ||
71 | xapp_sources += switcheroo_sources | |
72 | ||
58 | 73 | if not app_lib_only |
59 | 74 | libdeps += dependency('libgnomekbdui', required: true) |
60 | 75 | xapp_headers += 'xapp-kbd-layout-controller.h' |
61 | 76 | xapp_sources += 'xapp-kbd-layout-controller.c' |
62 | 77 | endif |
63 | 78 | |
64 | dbus_headers = [] | |
65 | ||
66 | # FIXME: Ugly workaround that simulates the generation of | |
67 | # two different targets, so headers can be included | |
68 | # explicitly for introspection. | |
69 | # | |
70 | # This can be removed once all platforms use meson >=.46 | |
71 | # and replaced with gnome.gdbus_codegen | |
72 | xapp_statusicon_interface_sources = custom_target( | |
73 | 'xapp-statusicon-interface', | |
74 | input: 'org.x.StatusIcon.xml', | |
75 | output: ['xapp-statusicon-interface.h', 'xapp-statusicon-interface.c'], | |
76 | command: [ | |
77 | codegen, | |
78 | 'org.x.StatusIcon', | |
79 | 'xapp-statusicon-interface', | |
80 | 'StatusIconInterface', | |
81 | meson.current_build_dir(), | |
82 | '@INPUT@', '@OUTPUT@' | |
83 | ] | |
79 | xapp_statusicon_interface_sources = gnome.gdbus_codegen( | |
80 | 'xapp-statusicon-interface', | |
81 | sources: 'org.x.StatusIcon.xml', | |
82 | interface_prefix: 'org.x.StatusIcon', | |
83 | namespace: 'XApp', | |
84 | annotations: [[ 'org.x.StatusIcon', 'org.gtk.GDBus.C.Name', 'StatusIconInterface' ]], | |
85 | object_manager: true, | |
86 | install_header: true, | |
87 | install_dir: join_paths(get_option('prefix'), get_option('includedir'), 'xapp/libxapp') | |
84 | 88 | ) |
85 | 89 | |
86 | dbus_headers += xapp_statusicon_interface_sources[0] | |
87 | xapp_sources += xapp_statusicon_interface_sources[1] | |
88 | ||
89 | # You can't actually access the generated header udring the install_header command below, | |
90 | # because the command is evaluated prior to the files being generated. So we need to manually | |
91 | # install the dbus header file (custom install scripts really *do* get evaluated after build, | |
92 | # during the install phase.) | |
93 | codegen = find_program(join_paths(meson.source_root(), 'meson-scripts', 'g-codegen.py')) | |
94 | ||
95 | meson.add_install_script(join_paths(meson.source_root(), 'meson-scripts', 'install_generated_header.py'), | |
96 | 'xapp-statusicon-interface.h' | |
97 | ) | |
90 | dbus_headers = [ xapp_statusicon_interface_sources[1] ] | |
91 | xapp_sources += xapp_statusicon_interface_sources[0] | |
98 | 92 | |
99 | 93 | xapp_enums = gnome.mkenums_simple('xapp-enums', |
100 | 94 | sources : xapp_headers, |
0 | <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" | |
1 | "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> | |
2 | ||
3 | <node> | |
4 | ||
5 | <!-- | |
6 | net.hadess.SwitcherooControl: | |
7 | @short_description: D-Bus proxy to access dual-GPU controls. | |
8 | ||
9 | After checking the availability of two switchable GPUs in the machine, | |
10 | check the value of net.hadess.SwitcherooControl.HasDualGpu to see | |
11 | if running applications on the discrete GPU should be offered. | |
12 | ||
13 | The object path will be "/net/hadess/SwitcherooControl". | |
14 | --> | |
15 | <interface name="net.hadess.SwitcherooControl"> | |
16 | <!-- | |
17 | HasDualGpu: | |
18 | ||
19 | Whether two switchable GPUs are present on the system. This property | |
20 | has been obsoleted in favour of the "NumGPUs" property. | |
21 | --> | |
22 | <property name="HasDualGpu" type="b" access="read"/> | |
23 | ||
24 | <!-- | |
25 | NumGPUs: | |
26 | ||
27 | The number of GPUs available on the system. Note that while having no | |
28 | GPUs is unlikely, consumers of this API should probably not throw errors | |
29 | if that were the case. | |
30 | --> | |
31 | <property name="NumGPUs" type="u" access="read"/> | |
32 | ||
33 | <!-- | |
34 | GPUs: | |
35 | ||
36 | An array of key-pair values representing each GPU. The key named "Name" (s) | |
37 | will contain a user-facing name for the GPU, the "Environment" (as) key will | |
38 | contain an array of even number of strings, each being an environment | |
39 | variable to set to use the GPU, followed by its value, the "Default" (b) key | |
40 | will tag the default (usually integrated) GPU. | |
41 | --> | |
42 | <property name="GPUs" type="aa{sv}" access="read"/> | |
43 | ||
44 | </interface> | |
45 | </node> |
0 | 0 | <!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" |
1 | 1 | "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> |
2 | 2 | <!-- GDBus 2.48.1 --> |
3 | <node> | |
3 | <node name='/org/x/StatusIcon'> | |
4 | 4 | <interface name='org.x.StatusIcon'> |
5 | 5 | <method name='ButtonPress'> |
6 | 6 | <arg name='x' direction='in' type='i'/> |
0 | #include <config.h> | |
1 | ||
2 | #include <stdio.h> | |
3 | #include <stdlib.h> | |
4 | #include <string.h> | |
5 | ||
6 | #include <gtk/gtk.h> | |
7 | #include <glib/gstdio.h> | |
8 | ||
9 | #include "xapp-dark-mode-manager.h" | |
10 | ||
11 | #define DEBUG_FLAG XAPP_DEBUG_DARK_MODE_MANAGER | |
12 | #include "xapp-debug.h" | |
13 | ||
14 | #define PORTAL_BUS_NAME "org.freedesktop.portal.Desktop" | |
15 | #define PORTAL_OBJECT_PATH "/org/freedesktop/portal/desktop" | |
16 | #define PORTAL_SETTINGS_INTERFACE "org.freedesktop.portal.Settings" | |
17 | ||
18 | #define PORTAL_ERROR_NOT_FOUND "org.freedesktop.portal.Error.NotFound" | |
19 | ||
20 | #define FALLBACK_SETTINGS "org.x.apps.portal" | |
21 | ||
22 | /** | |
23 | * SECTION:xapp-dark-mode-manager | |
24 | * @Short_description: Manages an application's dark mode preference for it. | |
25 | * @Title: XAppDarkModeManager | |
26 | * | |
27 | * This class will attempt to use the XDG Desktop Settings portal to manage its | |
28 | * 'gtk-application-prefer-dark-theme' setting. If the portal is unavailable it | |
29 | * will resort to using xdg-desktop-portal-xapp's dconf setting. | |
30 | * | |
31 | * Since 2.6 | |
32 | */ | |
33 | ||
34 | typedef enum | |
35 | { | |
36 | /* Aligns with the portal spec */ | |
37 | COLOR_SCHEME_DEFAULT, | |
38 | COLOR_SCHEME_PREFER_DARK, | |
39 | COLOR_SCHEME_PREFER_LIGHT, | |
40 | } ColorScheme; | |
41 | ||
42 | typedef struct | |
43 | { | |
44 | GDBusProxy *portal; | |
45 | GSettings *fallback_settings; | |
46 | ||
47 | gboolean app_prefers_dark; | |
48 | ||
49 | ColorScheme color_scheme; | |
50 | } XAppDarkModeManagerPrivate; | |
51 | ||
52 | struct _XAppDarkModeManager | |
53 | { | |
54 | GObject parent_instance; | |
55 | }; | |
56 | ||
57 | G_DEFINE_TYPE_WITH_PRIVATE (XAppDarkModeManager, xapp_dark_mode_manager, G_TYPE_OBJECT) | |
58 | ||
59 | static const gchar * | |
60 | color_scheme_name (ColorScheme scheme) | |
61 | { | |
62 | switch (scheme) | |
63 | { | |
64 | case COLOR_SCHEME_DEFAULT: | |
65 | return "Default"; | |
66 | case COLOR_SCHEME_PREFER_LIGHT: | |
67 | return "Prefer Light"; | |
68 | case COLOR_SCHEME_PREFER_DARK: | |
69 | return "Prefer Dark"; | |
70 | } | |
71 | ||
72 | return "unknown"; | |
73 | } | |
74 | ||
75 | static void | |
76 | update_gtk_settings (XAppDarkModeManager *manager) | |
77 | { | |
78 | XAppDarkModeManagerPrivate *priv = xapp_dark_mode_manager_get_instance_private (manager); | |
79 | GtkSettings *gtk_settings = gtk_settings_get_default (); | |
80 | ||
81 | gboolean pref = priv->app_prefers_dark; | |
82 | ||
83 | switch (priv->color_scheme) | |
84 | { | |
85 | case COLOR_SCHEME_PREFER_LIGHT: | |
86 | pref = FALSE; | |
87 | break; | |
88 | case COLOR_SCHEME_PREFER_DARK: | |
89 | pref = TRUE; | |
90 | break; | |
91 | case COLOR_SCHEME_DEFAULT: | |
92 | default: | |
93 | break; | |
94 | } | |
95 | ||
96 | g_object_set (gtk_settings, "gtk-application-prefer-dark-theme", pref, NULL); | |
97 | } | |
98 | ||
99 | static void | |
100 | fallback_gsettings_changed_cb (gpointer user_data) | |
101 | { | |
102 | XAppDarkModeManager *manager = XAPP_DARK_MODE_MANAGER (user_data); | |
103 | XAppDarkModeManagerPrivate *priv = xapp_dark_mode_manager_get_instance_private (manager); | |
104 | ||
105 | priv->color_scheme = g_settings_get_enum (priv->fallback_settings, "color-scheme"); | |
106 | ||
107 | DEBUG ("Fallback settings changed (color-scheme: %s)", color_scheme_name (priv->color_scheme)); | |
108 | update_gtk_settings (manager); | |
109 | } | |
110 | ||
111 | ||
112 | static void | |
113 | use_fallback_gsettings (XAppDarkModeManager *manager) | |
114 | { | |
115 | XAppDarkModeManagerPrivate *priv = xapp_dark_mode_manager_get_instance_private (manager); | |
116 | ||
117 | DEBUG ("Using fallback gsettings"); | |
118 | ||
119 | priv->fallback_settings = g_settings_new (FALLBACK_SETTINGS); | |
120 | priv->color_scheme = g_settings_get_enum (priv->fallback_settings, "color-scheme"); | |
121 | ||
122 | g_signal_connect_swapped (priv->fallback_settings, | |
123 | "changed::color-scheme", | |
124 | G_CALLBACK (fallback_gsettings_changed_cb), | |
125 | manager); | |
126 | ||
127 | DEBUG ("Initial fallback settings read (color-scheme: %s)", color_scheme_name (priv->color_scheme)); | |
128 | update_gtk_settings (manager); | |
129 | } | |
130 | ||
131 | static gboolean | |
132 | read_portal_setting (XAppDarkModeManager *manager, | |
133 | const char *schema, | |
134 | const char *name, | |
135 | const char *type, | |
136 | GVariant **out) | |
137 | { | |
138 | XAppDarkModeManagerPrivate *priv = xapp_dark_mode_manager_get_instance_private (manager); | |
139 | ||
140 | GError *error = NULL; | |
141 | GVariant *ret; | |
142 | GVariant *child, *child2; | |
143 | GVariantType *out_type; | |
144 | gboolean result = FALSE; | |
145 | ||
146 | ret = g_dbus_proxy_call_sync (priv->portal, | |
147 | "Read", | |
148 | g_variant_new ("(ss)", schema, name), | |
149 | G_DBUS_CALL_FLAGS_NONE, | |
150 | G_MAXINT, | |
151 | NULL, | |
152 | &error); | |
153 | if (error) | |
154 | { | |
155 | if (error->domain == G_DBUS_ERROR && | |
156 | error->code == G_DBUS_ERROR_SERVICE_UNKNOWN) | |
157 | { | |
158 | DEBUG ("Portal not found: %s", error->message); | |
159 | } | |
160 | else | |
161 | if (error->domain == G_DBUS_ERROR && | |
162 | error->code == G_DBUS_ERROR_UNKNOWN_METHOD) | |
163 | { | |
164 | DEBUG ("Portal doesn't provide settings: %s", error->message); | |
165 | } | |
166 | else | |
167 | if (g_dbus_error_is_remote_error (error)) | |
168 | { | |
169 | char *remote_error = g_dbus_error_get_remote_error (error); | |
170 | ||
171 | if (!g_strcmp0 (remote_error, PORTAL_ERROR_NOT_FOUND)) { | |
172 | DEBUG ("Setting %s.%s of type %s not found", schema, name, type); | |
173 | } | |
174 | g_free (remote_error); | |
175 | } | |
176 | else | |
177 | { | |
178 | g_critical ("Couldn't read the %s setting: %s", name, error->message); | |
179 | } | |
180 | ||
181 | g_clear_error (&error); | |
182 | ||
183 | return FALSE; | |
184 | } | |
185 | ||
186 | g_variant_get (ret, "(v)", &child); | |
187 | g_variant_get (child, "v", &child2); | |
188 | ||
189 | out_type = g_variant_type_new (type); | |
190 | if (g_variant_type_equal (g_variant_get_type (child2), out_type)) | |
191 | { | |
192 | *out = child2; | |
193 | ||
194 | result = TRUE; | |
195 | } | |
196 | else | |
197 | { | |
198 | g_critical ("Invalid type for %s.%s: expected %s, got %s", | |
199 | schema, name, type, g_variant_get_type_string (child2)); | |
200 | ||
201 | g_variant_unref (child2); | |
202 | } | |
203 | ||
204 | g_variant_type_free (out_type); | |
205 | g_variant_unref (child); | |
206 | g_variant_unref (ret); | |
207 | g_clear_error (&error); | |
208 | ||
209 | return result; | |
210 | } | |
211 | ||
212 | static void | |
213 | portal_changed_cb (GDBusProxy *proxy, | |
214 | const char *sender_name, | |
215 | const char *signal_name, | |
216 | GVariant *parameters, | |
217 | gpointer user_data) | |
218 | { | |
219 | XAppDarkModeManager *manager = XAPP_DARK_MODE_MANAGER (user_data); | |
220 | XAppDarkModeManagerPrivate *priv = xapp_dark_mode_manager_get_instance_private (manager); | |
221 | const char *namespace; | |
222 | const char *name; | |
223 | GVariant *value = NULL; | |
224 | ||
225 | if (g_strcmp0 (signal_name, "SettingChanged")) | |
226 | return; | |
227 | ||
228 | g_variant_get (parameters, "(&s&sv)", &namespace, &name, &value); | |
229 | ||
230 | if (!g_strcmp0 (namespace, "org.freedesktop.appearance") && | |
231 | !g_strcmp0 (name, "color-scheme")) | |
232 | { | |
233 | priv->color_scheme = g_variant_get_uint32 (value); | |
234 | g_variant_unref (value); | |
235 | } | |
236 | ||
237 | DEBUG ("Portal setting changed (color-scheme: %s)", color_scheme_name (priv->color_scheme)); | |
238 | ||
239 | update_gtk_settings (manager); | |
240 | } | |
241 | ||
242 | static void | |
243 | init_and_monitor_portal (XAppDarkModeManager *manager) | |
244 | { | |
245 | XAppDarkModeManagerPrivate *priv = xapp_dark_mode_manager_get_instance_private (manager); | |
246 | GVariant *value = NULL; | |
247 | ||
248 | if (read_portal_setting (manager, "org.freedesktop.appearance", | |
249 | "color-scheme", "u", &value)) | |
250 | { | |
251 | priv->color_scheme = g_variant_get_uint32 (value); | |
252 | g_variant_unref (value); | |
253 | ||
254 | DEBUG ("Initial portal setting read (color-scheme: %s)", color_scheme_name (priv->color_scheme)); | |
255 | ||
256 | update_gtk_settings (manager); | |
257 | ||
258 | g_signal_connect (priv->portal, "g-signal", | |
259 | G_CALLBACK (portal_changed_cb), manager); | |
260 | } | |
261 | else | |
262 | { | |
263 | use_fallback_gsettings (manager); | |
264 | } | |
265 | } | |
266 | ||
267 | static void | |
268 | new_portal_callback (GObject *source, | |
269 | GAsyncResult *res, | |
270 | gpointer user_data) | |
271 | { | |
272 | g_return_if_fail (XAPP_IS_DARK_MODE_MANAGER (user_data)); | |
273 | ||
274 | XAppDarkModeManager *manager = XAPP_DARK_MODE_MANAGER (user_data); | |
275 | XAppDarkModeManagerPrivate *priv = xapp_dark_mode_manager_get_instance_private (manager); | |
276 | ||
277 | GError *error = NULL; | |
278 | priv->portal = g_dbus_proxy_new_for_bus_finish (res, &error); | |
279 | ||
280 | if (error != NULL) | |
281 | { | |
282 | g_critical ("XDG desktop portal proxy failed to initialize: %s", error->message); | |
283 | g_free (error); | |
284 | use_fallback_gsettings (manager); | |
285 | return; | |
286 | } | |
287 | ||
288 | init_and_monitor_portal (manager); | |
289 | } | |
290 | ||
291 | static void | |
292 | init_manager (XAppDarkModeManager *manager) | |
293 | { | |
294 | DEBUG ("XAppDarkModeManager: init_manager"); | |
295 | ||
296 | g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION, | |
297 | G_DBUS_PROXY_FLAGS_NONE, | |
298 | NULL, | |
299 | PORTAL_BUS_NAME, | |
300 | PORTAL_OBJECT_PATH, | |
301 | PORTAL_SETTINGS_INTERFACE, | |
302 | NULL, | |
303 | (GAsyncReadyCallback) new_portal_callback, | |
304 | manager); | |
305 | } | |
306 | ||
307 | static void | |
308 | xapp_dark_mode_manager_init (XAppDarkModeManager *manager) | |
309 | { | |
310 | } | |
311 | ||
312 | static void | |
313 | xapp_dark_mode_manager_dispose (GObject *object) | |
314 | { | |
315 | XAppDarkModeManager *manager = XAPP_DARK_MODE_MANAGER (object); | |
316 | XAppDarkModeManagerPrivate *priv = xapp_dark_mode_manager_get_instance_private (manager); | |
317 | DEBUG ("XAppDarkModeManager dispose (%p)", object); | |
318 | ||
319 | g_clear_object (&priv->fallback_settings); | |
320 | g_clear_object (&priv->portal); | |
321 | ||
322 | G_OBJECT_CLASS (xapp_dark_mode_manager_parent_class)->dispose (object); | |
323 | } | |
324 | ||
325 | static void | |
326 | xapp_dark_mode_manager_finalize (GObject *object) | |
327 | { | |
328 | DEBUG ("XAppDarkModeManager finalize (%p)", object); | |
329 | ||
330 | G_OBJECT_CLASS (xapp_dark_mode_manager_parent_class)->finalize (object); | |
331 | } | |
332 | ||
333 | static void | |
334 | xapp_dark_mode_manager_class_init (XAppDarkModeManagerClass *klass) | |
335 | { | |
336 | GObjectClass *gobject_class = G_OBJECT_CLASS (klass); | |
337 | ||
338 | gobject_class->dispose = xapp_dark_mode_manager_dispose; | |
339 | gobject_class->finalize = xapp_dark_mode_manager_finalize; | |
340 | } | |
341 | ||
342 | /** | |
343 | * xapp_dark_mode_manager_new: | |
344 | * @prefer_dark_mode: The application's preference. | |
345 | * | |
346 | * | |
347 | * Returns: (transfer full): a new XAppDarkModeManager instance. Free with g_object_unref. | |
348 | * | |
349 | * Since: 2.6 | |
350 | */ | |
351 | XAppDarkModeManager * | |
352 | xapp_dark_mode_manager_new (gboolean prefer_dark_mode) | |
353 | { | |
354 | XAppDarkModeManager *manager = g_object_new (XAPP_TYPE_DARK_MODE_MANAGER, NULL); | |
355 | XAppDarkModeManagerPrivate *priv = xapp_dark_mode_manager_get_instance_private (manager); | |
356 | ||
357 | priv->app_prefers_dark = prefer_dark_mode; | |
358 | ||
359 | init_manager (manager); | |
360 | ||
361 | return manager; | |
362 | } |
0 | #ifndef __XAPP_DARK_MODE_MANAGER_H__ | |
1 | #define __XAPP_DARK_MODE_MANAGER_H__ | |
2 | ||
3 | #include <stdio.h> | |
4 | #include <gtk/gtk.h> | |
5 | ||
6 | #include <glib-object.h> | |
7 | ||
8 | G_BEGIN_DECLS | |
9 | ||
10 | #define XAPP_TYPE_DARK_MODE_MANAGER (xapp_dark_mode_manager_get_type ()) | |
11 | G_DECLARE_FINAL_TYPE (XAppDarkModeManager, xapp_dark_mode_manager, XAPP, DARK_MODE_MANAGER, GObject) | |
12 | ||
13 | XAppDarkModeManager *xapp_dark_mode_manager_new (gboolean prefer_dark_mode); | |
14 | ||
15 | G_END_DECLS | |
16 | ||
17 | #endif /* __XAPP_DARK_MODE_MANAGER_H__ */ |
27 | 27 | |
28 | 28 | #include "xapp-debug.h" |
29 | 29 | |
30 | #ifdef ENABLE_DEBUG | |
31 | ||
30 | 32 | static DebugFlags flags = 0; |
31 | 33 | static gboolean initialized = FALSE; |
32 | 34 | |
38 | 40 | { "SnWatcher", XAPP_DEBUG_SN_WATCHER }, |
39 | 41 | { "GtkModule", XAPP_DEBUG_MODULE}, |
40 | 42 | { "VisibilityGroup", XAPP_DEBUG_VISIBILITY_GROUP}, |
43 | { "GpuOffload", XAPP_DEBUG_GPU_OFFLOAD}, | |
44 | { "DarkModeManager", XAPP_DEBUG_DARK_MODE_MANAGER}, | |
41 | 45 | { 0, } |
42 | 46 | }; |
43 | 47 | |
60 | 64 | return "GtkModule"; |
61 | 65 | case XAPP_DEBUG_VISIBILITY_GROUP: |
62 | 66 | return "VisibilityGroup"; |
67 | case XAPP_DEBUG_GPU_OFFLOAD: | |
68 | return "GpuOffload"; | |
69 | case XAPP_DEBUG_DARK_MODE_MANAGER: | |
70 | return "DarkModeManager"; | |
63 | 71 | } |
64 | 72 | return ""; |
65 | 73 | } |
120 | 128 | } |
121 | 129 | } |
122 | 130 | |
131 | #endif /* ENABLE_DEBUG */ |
29 | 29 | |
30 | 30 | G_BEGIN_DECLS |
31 | 31 | |
32 | #ifdef ENABLE_DEBUG | |
33 | ||
32 | 34 | typedef enum |
33 | 35 | { |
34 | 36 | XAPP_DEBUG_WINDOW = 1 << 1, |
37 | 39 | XAPP_DEBUG_STATUS_ICON = 1 << 4, |
38 | 40 | XAPP_DEBUG_SN_WATCHER = 1 << 5, |
39 | 41 | XAPP_DEBUG_MODULE = 1 << 6, |
40 | XAPP_DEBUG_VISIBILITY_GROUP = 1 << 7 | |
42 | XAPP_DEBUG_VISIBILITY_GROUP = 1 << 7, | |
43 | XAPP_DEBUG_GPU_OFFLOAD = 1 << 8, | |
44 | XAPP_DEBUG_DARK_MODE_MANAGER = 1 << 9 | |
41 | 45 | } DebugFlags; |
42 | 46 | |
43 | 47 | void xapp_debug_set_flags (DebugFlags flags); |
70 | 74 | #define DEBUGGING 0 |
71 | 75 | |
72 | 76 | #endif /* DEBUG_FLAG */ |
77 | #endif /* ENABLE_DEBUG */ | |
73 | 78 | |
74 | 79 | G_END_DECLS |
75 | 80 |
0 | #include "config.h" | |
1 | ||
2 | #define DEBUG_FLAG XAPP_DEBUG_GPU_OFFLOAD | |
3 | #include "xapp-debug.h" | |
4 | ||
5 | #include "xapp-gpu-offload-helper.h" | |
6 | #include "xapp-switcheroo-interface.h" | |
7 | #include "xapp-util.h" | |
8 | ||
9 | static const gchar *DEFAULT_ENV_ARGV[5] = { | |
10 | "__NV_PRIME_RENDER_OFFLOAD", "1", | |
11 | "__GLX_VENDOR_LIBRARY_NAME", "nvidia", | |
12 | NULL | |
13 | }; | |
14 | ||
15 | XAppGpuInfo *xapp_gpu_info_copy (const XAppGpuInfo *info); | |
16 | void xapp_gpu_info_free (XAppGpuInfo *info); | |
17 | ||
18 | G_DEFINE_BOXED_TYPE (XAppGpuInfo, xapp_gpu_info, xapp_gpu_info_copy, xapp_gpu_info_free); | |
19 | /** | |
20 | * SECTION:xapp-gpu-offload-helper | |
21 | * @Short_description: Simple interface for Switcheroo. | |
22 | * @Title: XAppGpuOffloadHelper | |
23 | * | |
24 | * #XAppGpuOffloadHelper is class that provides a reliable property cache and simple return methods | |
25 | * for getting offload_helper parameters and conditions from the Switcheroo interface. | |
26 | * | |
27 | * Since 2.6 | |
28 | */ | |
29 | ||
30 | XAppGpuInfo * | |
31 | xapp_gpu_info_copy (const XAppGpuInfo *info) | |
32 | { | |
33 | DEBUG ("XAppGpuInfo copy"); | |
34 | g_return_val_if_fail (info != NULL, NULL); | |
35 | ||
36 | #if GLIB_CHECK_VERSION(2, 68, 0) | |
37 | XAppGpuInfo *_info = g_memdup2 (info, sizeof(XAppGpuInfo)); | |
38 | #else | |
39 | XAppGpuInfo *_info = g_memdup (info, sizeof(XAppGpuInfo)); | |
40 | #endif | |
41 | _info->id = info->id; | |
42 | _info->is_default = info->is_default; | |
43 | _info->display_name = g_strdup (info->display_name); | |
44 | _info->env_strv = g_strdupv (info->env_strv); | |
45 | ||
46 | return _info; | |
47 | } | |
48 | ||
49 | /** | |
50 | * xapp_gpu_info_free: | |
51 | * @group: The #XAppGpuInfo to free. | |
52 | * | |
53 | * Destroys the #XAppGpuInfo. | |
54 | * | |
55 | * Since 2.6 | |
56 | */ | |
57 | void | |
58 | xapp_gpu_info_free (XAppGpuInfo *info) | |
59 | { | |
60 | DEBUG ("XAppGpuInfo free"); | |
61 | g_return_if_fail (info != NULL); | |
62 | ||
63 | g_strfreev (info->env_strv); | |
64 | g_free (info->display_name); | |
65 | g_free (info); | |
66 | } | |
67 | ||
68 | /** | |
69 | * xapp_gpu_info_get_shell_env_prefix: | |
70 | * @info: An #XAppGpuInfo. | |
71 | * | |
72 | * Creates a new string in a form intended to prefix a shell command, containing | |
73 | * the appropriate name/values for this gpu. For example: | |
74 | * | |
75 | * __GLX_VENDOR_LIBRARY_NAME=nvidia __NV_PRIME_RENDER_OFFLOAD=1 | |
76 | * | |
77 | * Returns: (transfer full): A new string, free with g_free(). | |
78 | * | |
79 | * Since 2.6 | |
80 | */ | |
81 | gchar * | |
82 | xapp_gpu_info_get_shell_env_prefix(XAppGpuInfo *info) | |
83 | { | |
84 | g_return_val_if_fail (info != NULL, g_strdup ("")); | |
85 | ||
86 | if (info->env_strv == NULL) | |
87 | { | |
88 | return g_strdup (""); | |
89 | } | |
90 | ||
91 | g_return_val_if_fail (g_strv_length (info->env_strv) % 2 == 0, g_strdup ("")); | |
92 | ||
93 | GString *args = g_string_new (NULL); | |
94 | ||
95 | for (gint i = 0; i < g_strv_length (info->env_strv); i++) | |
96 | { | |
97 | g_string_append_printf (args, "%s=", info->env_strv[i++]); | |
98 | g_string_append_printf (args, "%s ", info->env_strv[i]); | |
99 | } | |
100 | ||
101 | DEBUG ("%s", args->str); | |
102 | return g_string_free (args, FALSE); | |
103 | } | |
104 | ||
105 | struct _XAppGpuOffloadHelper | |
106 | { | |
107 | GObject parent_instance; | |
108 | ||
109 | GCancellable *cancellable; | |
110 | GDBusProxy *control; | |
111 | ||
112 | guint num_gpus; | |
113 | ||
114 | GMutex gpu_infos_mutex; | |
115 | GList *gpu_infos; // XAppGpuInfos | |
116 | ||
117 | gboolean ready; | |
118 | ||
119 | gboolean ubuntu_offload_support_found; | |
120 | }; | |
121 | ||
122 | G_DEFINE_TYPE (XAppGpuOffloadHelper, xapp_gpu_offload_helper, G_TYPE_OBJECT) | |
123 | ||
124 | enum | |
125 | { | |
126 | READY, | |
127 | LAST_SIGNAL | |
128 | }; | |
129 | ||
130 | static guint signals[LAST_SIGNAL] = {0, }; | |
131 | ||
132 | static void | |
133 | process_gpus_property (XAppGpuOffloadHelper *helper, | |
134 | GError **error) | |
135 | { | |
136 | GVariant *gpus; | |
137 | GList *infos = NULL; | |
138 | gint num_children, i; | |
139 | gboolean default_found = FALSE; | |
140 | ||
141 | gpus = xapp_switcheroo_control_get_gpus (XAPP_SWITCHEROO_CONTROL (helper->control)); | |
142 | ||
143 | num_children = g_variant_n_children(gpus); | |
144 | ||
145 | for (i = 0; i < num_children; i++) | |
146 | { | |
147 | g_autoptr(GVariant) gpu; | |
148 | g_autoptr(GVariant) vname = NULL; | |
149 | g_autoptr(GVariant) venv = NULL; | |
150 | g_autoptr(GVariant) vdefault = NULL; | |
151 | const char *name; | |
152 | g_autofree const char **env_strv = NULL; | |
153 | gsize env_len; | |
154 | gboolean is_default; | |
155 | ||
156 | gpu = g_variant_get_child_value (gpus, i); | |
157 | if (!gpu || !g_variant_is_of_type (gpu, G_VARIANT_TYPE ("a{s*}"))) | |
158 | { | |
159 | continue; | |
160 | } | |
161 | ||
162 | vname = g_variant_lookup_value (gpu, "Name", NULL); | |
163 | venv = g_variant_lookup_value (gpu, "Environment", NULL); | |
164 | vdefault= g_variant_lookup_value (gpu, "Default", NULL); | |
165 | ||
166 | if (!vname || !venv) | |
167 | continue; | |
168 | ||
169 | name = g_variant_get_string (vname, NULL); | |
170 | env_strv = g_variant_get_strv (venv, &env_len); | |
171 | ||
172 | if (env_strv != NULL && env_len % 2 != 0) | |
173 | { | |
174 | g_autofree char *debug = NULL; | |
175 | debug = g_strjoinv ("\n", (char **) env_strv); | |
176 | g_warning ("Invalid environment returned from switcheroo:\n%s", debug); | |
177 | g_clear_pointer (&env_strv, g_free); | |
178 | continue; | |
179 | } | |
180 | ||
181 | is_default = vdefault ? g_variant_get_boolean (vdefault) : FALSE; | |
182 | ||
183 | if (is_default) | |
184 | { | |
185 | default_found = TRUE; | |
186 | } | |
187 | ||
188 | XAppGpuInfo *info = g_new0 (XAppGpuInfo, 1); | |
189 | info->id = i; | |
190 | info->display_name = g_strdup (name); | |
191 | info->env_strv = g_strdupv ((gchar **) env_strv); | |
192 | info->is_default = is_default; | |
193 | ||
194 | infos = g_list_append (infos, info); | |
195 | } | |
196 | ||
197 | if (infos == NULL) | |
198 | { | |
199 | *error = g_error_new (g_dbus_error_quark (), | |
200 | G_DBUS_ERROR_FAILED, | |
201 | "GPUs property didn't contain any valid gpu info."); | |
202 | } | |
203 | ||
204 | if (!default_found) | |
205 | { | |
206 | *error = g_error_new (g_dbus_error_quark (), | |
207 | G_DBUS_ERROR_FAILED, | |
208 | "No default GPU exists."); | |
209 | g_list_free_full (infos, (GDestroyNotify) xapp_gpu_info_free); | |
210 | infos = NULL; | |
211 | } | |
212 | ||
213 | g_mutex_lock (&helper->gpu_infos_mutex); | |
214 | ||
215 | g_list_free_full (helper->gpu_infos, (GDestroyNotify) xapp_gpu_info_free); | |
216 | helper->gpu_infos = infos; | |
217 | helper->num_gpus = g_list_length (helper->gpu_infos); | |
218 | ||
219 | g_mutex_unlock (&helper->gpu_infos_mutex); | |
220 | } | |
221 | ||
222 | static void | |
223 | populate_gpu_info (XAppGpuOffloadHelper *helper, | |
224 | GError **error) | |
225 | { | |
226 | GVariant *gpus; | |
227 | g_auto(GStrv) cached_props = NULL; | |
228 | ||
229 | cached_props = g_dbus_proxy_get_cached_property_names (helper->control); | |
230 | ||
231 | if (cached_props != NULL && g_strv_contains ((const gchar * const *) cached_props, "GPUs")) | |
232 | { | |
233 | // (already cached) | |
234 | DEBUG ("GPUs property already cached, skipping Get"); | |
235 | process_gpus_property (helper, error); | |
236 | return; | |
237 | } | |
238 | ||
239 | gpus = g_dbus_connection_call_sync (g_dbus_proxy_get_connection (helper->control), | |
240 | g_dbus_proxy_get_name (helper->control), | |
241 | g_dbus_proxy_get_object_path (helper->control), | |
242 | "org.freedesktop.DBus.Properties", | |
243 | "Get", | |
244 | g_variant_new ("(ss)", | |
245 | g_dbus_proxy_get_interface_name (helper->control), | |
246 | "GPUs"), | |
247 | NULL, | |
248 | G_DBUS_CALL_FLAGS_NONE, | |
249 | -1, | |
250 | helper->cancellable, | |
251 | error); | |
252 | ||
253 | if (gpus == NULL) | |
254 | { | |
255 | return; | |
256 | } | |
257 | ||
258 | g_dbus_proxy_set_cached_property (helper->control, "(GPUs)", gpus); | |
259 | process_gpus_property (helper, error); | |
260 | } | |
261 | ||
262 | static void | |
263 | on_bus_connection_closed (GDBusConnection *connection, | |
264 | gboolean remote_peer_vanished, | |
265 | GError *error, | |
266 | gpointer user_data) | |
267 | { | |
268 | XAppGpuOffloadHelper *helper = XAPP_GPU_OFFLOAD_HELPER (user_data); | |
269 | ||
270 | if (error != NULL) | |
271 | { | |
272 | g_critical ("Bus connection unexpectedly lost: (%d) %s", error->code, error->message); | |
273 | g_error_free (error); | |
274 | } | |
275 | ||
276 | g_object_unref (helper); | |
277 | } | |
278 | ||
279 | static void | |
280 | helper_init_thread (GTask *task, | |
281 | gpointer source_object, | |
282 | gpointer task_data, | |
283 | GCancellable *cancellable) | |
284 | { | |
285 | XAppGpuOffloadHelper *helper = XAPP_GPU_OFFLOAD_HELPER (source_object); | |
286 | XAppSwitcherooControl *control; | |
287 | GError *error = NULL; | |
288 | ||
289 | control = xapp_switcheroo_control_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM, | |
290 | G_DBUS_PROXY_FLAGS_NONE, | |
291 | "net.hadess.SwitcherooControl", | |
292 | "/net/hadess/SwitcherooControl", | |
293 | helper->cancellable, | |
294 | &error); | |
295 | ||
296 | if (error != NULL) | |
297 | { | |
298 | if (!g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) | |
299 | { | |
300 | g_task_return_boolean (task, TRUE); | |
301 | } | |
302 | ||
303 | g_critical ("Could not create switcheroo proxy: (%d): %s", error->code, error->message); | |
304 | g_task_return_error (task, error); | |
305 | } | |
306 | ||
307 | if (g_dbus_proxy_get_name_owner (G_DBUS_PROXY (control)) != NULL) | |
308 | { | |
309 | DEBUG ("Got switcheroo-control proxy successfully"); | |
310 | ||
311 | helper->control = G_DBUS_PROXY (control); | |
312 | g_signal_connect (g_dbus_proxy_get_connection (helper->control), "closed", G_CALLBACK (on_bus_connection_closed), helper); | |
313 | ||
314 | populate_gpu_info (helper, &error); | |
315 | ||
316 | if (error != NULL) | |
317 | { | |
318 | if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) | |
319 | { | |
320 | g_task_return_boolean (task, TRUE); | |
321 | } | |
322 | ||
323 | g_critical ("Could not get gpu info from switcheroo proxy: (%d): %s", error->code, error->message); | |
324 | g_task_return_error (task, error); | |
325 | } | |
326 | } | |
327 | else | |
328 | { | |
329 | g_warning ("Switcheroo-control doesn't appear to be running, checking for Ubuntu support..."); | |
330 | ||
331 | // Add a default GPU no matter what just so we're 'valid' | |
332 | ||
333 | XAppGpuInfo *info; | |
334 | GList *infos = NULL; | |
335 | ||
336 | info = g_new0 (XAppGpuInfo, 1); | |
337 | info->id = 0; | |
338 | info->is_default = TRUE; | |
339 | info->display_name = g_strdup ("Integrated GPU"); | |
340 | infos = g_list_append (infos, info); | |
341 | ||
342 | // If there's support, make up a default and non-default XAppGpuInfo. | |
343 | if (xapp_util_gpu_offload_supported ()) | |
344 | { | |
345 | info = g_new0 (XAppGpuInfo, 1); | |
346 | info->id = 1; | |
347 | info->is_default = FALSE; | |
348 | info->display_name = g_strdup ("NVIDIA GPU"); | |
349 | info->env_strv = g_strdupv ((gchar **) DEFAULT_ENV_ARGV); | |
350 | ||
351 | infos = g_list_append (infos, info); | |
352 | } | |
353 | ||
354 | g_mutex_lock (&helper->gpu_infos_mutex); | |
355 | ||
356 | g_list_free_full (helper->gpu_infos, (GDestroyNotify) xapp_gpu_info_free); | |
357 | helper->gpu_infos = infos; | |
358 | helper->num_gpus = g_list_length (helper->gpu_infos); | |
359 | ||
360 | g_mutex_unlock (&helper->gpu_infos_mutex); | |
361 | } | |
362 | ||
363 | g_task_return_boolean (task, TRUE); | |
364 | } | |
365 | ||
366 | static void | |
367 | helper_task_callback (GObject *source_object, | |
368 | GAsyncResult *res, | |
369 | gpointer user_data) | |
370 | { | |
371 | XAppGpuOffloadHelper *helper = XAPP_GPU_OFFLOAD_HELPER (source_object); | |
372 | ||
373 | // Todo with an error? This callback is only used in async mode. | |
374 | gboolean success = g_task_propagate_boolean (G_TASK (res), NULL); | |
375 | ||
376 | if (success) | |
377 | { | |
378 | helper->ready = TRUE; | |
379 | ||
380 | if (DEBUGGING) | |
381 | { | |
382 | DEBUG ("Gpu infos:"); | |
383 | for (GList *l = helper->gpu_infos; l != NULL; l = l->next) | |
384 | { | |
385 | XAppGpuInfo *info = l->data; | |
386 | ||
387 | gchar *shell_str = xapp_gpu_info_get_shell_env_prefix (info); | |
388 | gchar *debug = g_strdup_printf ("%s: %s", info->display_name, shell_str); | |
389 | ||
390 | DEBUG ("%s", debug); | |
391 | g_free (shell_str); | |
392 | g_free (debug); | |
393 | } | |
394 | } | |
395 | } | |
396 | ||
397 | g_signal_emit (helper, signals[READY], 0, helper->ready); | |
398 | } | |
399 | ||
400 | static void | |
401 | init_helper (XAppGpuOffloadHelper *helper, | |
402 | gboolean synchronous) | |
403 | { | |
404 | GTask *task = g_task_new (helper, helper->cancellable, helper_task_callback, NULL); | |
405 | ||
406 | if (synchronous) | |
407 | { | |
408 | g_task_run_in_thread_sync (task, helper_init_thread); | |
409 | helper_task_callback (G_OBJECT (helper), G_ASYNC_RESULT (task), NULL); | |
410 | } | |
411 | else | |
412 | { | |
413 | g_task_run_in_thread (task, helper_init_thread); | |
414 | } | |
415 | ||
416 | g_object_unref (task); | |
417 | } | |
418 | ||
419 | static void | |
420 | xapp_gpu_offload_helper_init (XAppGpuOffloadHelper *helper) | |
421 | { | |
422 | helper->cancellable = g_cancellable_new (); | |
423 | g_mutex_init (&helper->gpu_infos_mutex); | |
424 | } | |
425 | ||
426 | static void | |
427 | xapp_gpu_offload_helper_dispose (GObject *object) | |
428 | { | |
429 | XAppGpuOffloadHelper *helper = XAPP_GPU_OFFLOAD_HELPER (object); | |
430 | ||
431 | if (helper->gpu_infos != NULL) | |
432 | { | |
433 | g_list_free_full (helper->gpu_infos, (GDestroyNotify) xapp_gpu_info_free); | |
434 | helper->gpu_infos = NULL; | |
435 | } | |
436 | ||
437 | g_clear_object (&helper->cancellable); | |
438 | g_clear_object (&helper->control); | |
439 | ||
440 | helper->ready = FALSE; | |
441 | ||
442 | G_OBJECT_CLASS (xapp_gpu_offload_helper_parent_class)->dispose (object); | |
443 | } | |
444 | ||
445 | static void | |
446 | xapp_gpu_offload_helper_class_init (XAppGpuOffloadHelperClass *klass) | |
447 | { | |
448 | GObjectClass *object_class = G_OBJECT_CLASS (klass); | |
449 | ||
450 | object_class->dispose = xapp_gpu_offload_helper_dispose; | |
451 | ||
452 | /** | |
453 | * XAppGpuOffloadHelper::ready: | |
454 | * @helper: the #XAppGpuOffloadHelper | |
455 | * @success: Whether or not the helper initialize successfully. | |
456 | * | |
457 | * This signal is emitted by the helper when it has completed | |
458 | * gathering GPU information. It will only be sent once. | |
459 | */ | |
460 | signals[READY] = | |
461 | g_signal_new ("ready", | |
462 | XAPP_TYPE_GPU_OFFLOAD_HELPER, | |
463 | G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, | |
464 | 0, | |
465 | NULL, NULL, NULL, | |
466 | G_TYPE_NONE, 1, G_TYPE_BOOLEAN); | |
467 | } | |
468 | ||
469 | static gboolean | |
470 | idle_init_helper (gpointer user_data) | |
471 | { | |
472 | XAppGpuOffloadHelper *helper = XAPP_GPU_OFFLOAD_HELPER (user_data); | |
473 | ||
474 | init_helper (helper, FALSE); | |
475 | ||
476 | return G_SOURCE_REMOVE; | |
477 | } | |
478 | ||
479 | static XAppGpuOffloadHelper * | |
480 | helper_get_common (gboolean synchronous) | |
481 | { | |
482 | static XAppGpuOffloadHelper *gpu_offload_helper = NULL; | |
483 | static gsize once_init_value = 0; | |
484 | ||
485 | if (g_once_init_enter (&once_init_value)) | |
486 | { | |
487 | gpu_offload_helper = g_object_new (XAPP_TYPE_GPU_OFFLOAD_HELPER, NULL); | |
488 | ||
489 | if (synchronous) | |
490 | { | |
491 | DEBUG ("Initializing helper synchronously."); | |
492 | init_helper (gpu_offload_helper, TRUE); | |
493 | } | |
494 | else | |
495 | { | |
496 | DEBUG ("Initializing helper asynchronously"); | |
497 | g_idle_add ((GSourceFunc) idle_init_helper, gpu_offload_helper); | |
498 | } | |
499 | ||
500 | g_once_init_leave (&once_init_value, 1); | |
501 | } | |
502 | ||
503 | return gpu_offload_helper; | |
504 | } | |
505 | ||
506 | /** | |
507 | * xapp_gpu_offload_helper_get: | |
508 | * | |
509 | * Creates a new #XAppGpuOffloadHelper instance. | |
510 | * | |
511 | * The #XAppGpuOffloadHelper::ready signal will be emitted when the helper is initialized (successfully or not). | |
512 | * | |
513 | * Returns: (transfer none): a new #XAppGpuOffloadHelper. | |
514 | * | |
515 | * Since: 2.6 | |
516 | */ | |
517 | XAppGpuOffloadHelper * | |
518 | xapp_gpu_offload_helper_get (void) | |
519 | { | |
520 | return helper_get_common (FALSE); | |
521 | } | |
522 | ||
523 | /** | |
524 | * xapp_gpu_offload_helper_get_sync: | |
525 | * | |
526 | * Creates a new #XAppGpuOffloadHelper instance. This performs initialization synchronously, | |
527 | * and can potentially block. | |
528 | * | |
529 | * Use xapp_gpu_offload_helper_is_ready() to see if the helper was initialized successfully. | |
530 | * | |
531 | * Returns: (transfer none): a new #XAppGpuOffloadHelper, fully initialized. | |
532 | * | |
533 | * Since: 2.6 | |
534 | */ | |
535 | XAppGpuOffloadHelper * | |
536 | xapp_gpu_offload_helper_get_sync (void) | |
537 | { | |
538 | return helper_get_common (TRUE); | |
539 | } | |
540 | ||
541 | static void | |
542 | warn_if_not_ready (XAppGpuOffloadHelper *helper) | |
543 | { | |
544 | if (!helper->ready) | |
545 | { | |
546 | g_warning ("Helper not initialized or failed to do so."); | |
547 | } | |
548 | } | |
549 | ||
550 | /** | |
551 | * xapp_gpu_offload_helper_is_ready: | |
552 | * @helper: The #XAppGpuOffloadHelper. | |
553 | * | |
554 | * Checks if the helper is ready and valid. This does not mean | |
555 | * offload support exists. | |
556 | * | |
557 | * Returns: %TRUE if the helper has been successfully initialized. | |
558 | * | |
559 | * Since: 2.6 | |
560 | */ | |
561 | gboolean | |
562 | xapp_gpu_offload_helper_is_ready (XAppGpuOffloadHelper *helper) | |
563 | { | |
564 | g_return_val_if_fail (XAPP_IS_GPU_OFFLOAD_HELPER (helper), 1); | |
565 | ||
566 | return helper->ready; | |
567 | } | |
568 | ||
569 | /** | |
570 | * xapp_gpu_offload_helper_is_offload_supported: | |
571 | * @helper: The #XAppGpuOffloadHelper. | |
572 | * | |
573 | * Checks if there is a non-default GPU available for offloading. | |
574 | * | |
575 | * Returns: %TRUE if there is an extra GPU available. | |
576 | * | |
577 | * Since: 2.6 | |
578 | */ | |
579 | gboolean | |
580 | xapp_gpu_offload_helper_is_offload_supported (XAppGpuOffloadHelper *helper) | |
581 | { | |
582 | g_return_val_if_fail (XAPP_IS_GPU_OFFLOAD_HELPER (helper), 1); | |
583 | ||
584 | return helper->num_gpus > 1; | |
585 | } | |
586 | ||
587 | /** | |
588 | * xapp_gpu_offload_helper_get_n_gpus: | |
589 | * @helper: The #XAppGpuOffloadHelper. | |
590 | * | |
591 | * Gets the number of GPUs noticed by Switcheroo. | |
592 | * | |
593 | * Returns: the total number of GPUs. A return value larger than | |
594 | * 1 implies there are offloadable GPUs available. | |
595 | * | |
596 | * Since: 2.6 | |
597 | */ | |
598 | gint | |
599 | xapp_gpu_offload_helper_get_n_gpus (XAppGpuOffloadHelper *helper) | |
600 | { | |
601 | g_return_val_if_fail (XAPP_IS_GPU_OFFLOAD_HELPER (helper), 1); | |
602 | warn_if_not_ready (helper); | |
603 | ||
604 | return helper->num_gpus; | |
605 | } | |
606 | ||
607 | /** | |
608 | * xapp_gpu_offload_helper_get_offload_infos: | |
609 | * @helper: The #XAppGpuOffloadHelper. | |
610 | * | |
611 | * Generates a list of #XAppGpuInfos that can be offloaded to, if there are any. | |
612 | * | |
613 | * Returns: (element-type XAppGpuInfo) (transfer container): a list of #XAppGpuInfos or %NULL if there is only | |
614 | * a single GPU. The elements are owned by @helper but the container itself should be freed. | |
615 | * | |
616 | * Since: 2.6 | |
617 | */ | |
618 | GList * | |
619 | xapp_gpu_offload_helper_get_offload_infos (XAppGpuOffloadHelper *helper) | |
620 | { | |
621 | g_return_val_if_fail (XAPP_IS_GPU_OFFLOAD_HELPER (helper), NULL); | |
622 | warn_if_not_ready (helper); | |
623 | ||
624 | GList *retval = NULL; | |
625 | ||
626 | GList *l; | |
627 | for (l = helper->gpu_infos; l != NULL; l = l->next) | |
628 | { | |
629 | XAppGpuInfo *info = l->data; | |
630 | ||
631 | if (info->is_default) | |
632 | continue; | |
633 | ||
634 | retval = g_list_append (retval, info); | |
635 | } | |
636 | ||
637 | return retval; | |
638 | } | |
639 | ||
640 | /** | |
641 | * xapp_gpu_offload_helper_get_default_info: | |
642 | * @helper: The #XAppGpuOffloadHelper. | |
643 | * | |
644 | * Returns an #XAppGpuInfo for the default GPU. | |
645 | * | |
646 | * Returns: (transfer none): the default #XAppGpuInfo. Do not free | |
647 | * | |
648 | * Since: 2.6 | |
649 | */ | |
650 | XAppGpuInfo * | |
651 | xapp_gpu_offload_helper_get_default_info (XAppGpuOffloadHelper *helper) | |
652 | { | |
653 | g_return_val_if_fail (XAPP_IS_GPU_OFFLOAD_HELPER (helper), NULL); | |
654 | warn_if_not_ready (helper); | |
655 | ||
656 | GList *l; | |
657 | for (l = helper->gpu_infos; l != NULL; l = l->next) | |
658 | { | |
659 | XAppGpuInfo *info = l->data; | |
660 | ||
661 | if (info->is_default) | |
662 | return info; | |
663 | } | |
664 | ||
665 | g_warning ("No default GPU found by switcheroo!"); | |
666 | return NULL; | |
667 | } | |
668 | ||
669 | /** | |
670 | * xapp_gpu_offload_helper_get_info_by_id: | |
671 | * @helper: The #XAppGpuOffloadHelper. | |
672 | * @id: The ID of the info to retrieve. | |
673 | * | |
674 | * Returns an #XAppGpuInfo with the given ID. | |
675 | * | |
676 | * Returns: (transfer none): the appropriate #XAppGpuInfo, or %NULL if @id was invalid. | |
677 | * | |
678 | * Since: 2.6 | |
679 | */ | |
680 | XAppGpuInfo * | |
681 | xapp_gpu_offload_helper_get_info_by_id (XAppGpuOffloadHelper *helper, gint id) | |
682 | { | |
683 | g_return_val_if_fail (XAPP_IS_GPU_OFFLOAD_HELPER (helper), NULL); | |
684 | warn_if_not_ready (helper); | |
685 | ||
686 | GList *l; | |
687 | for (l = helper->gpu_infos; l != NULL; l = l->next) | |
688 | { | |
689 | XAppGpuInfo *info = l->data; | |
690 | ||
691 | if (info->id == id) | |
692 | return info; | |
693 | } | |
694 | ||
695 | g_warning ("No GPU with id %d found.", id); | |
696 | return NULL; | |
697 | } | |
698 |
0 | #ifndef __XAPP_GPU_OFFLOAD_HELPER_H__ | |
1 | #define __XAPP_GPU_OFFLOAD_HELPER_H__ | |
2 | ||
3 | #include <glib-object.h> | |
4 | ||
5 | G_BEGIN_DECLS | |
6 | ||
7 | #define XAPP_TYPE_GPU_OFFLOAD_HELPER xapp_gpu_offload_helper_get_type () | |
8 | G_DECLARE_FINAL_TYPE (XAppGpuOffloadHelper, xapp_gpu_offload_helper, XAPP, GPU_OFFLOAD_HELPER, GObject) | |
9 | ||
10 | #define XAPP_TYPE_GPU_INFO (xapp_gpu_info_get_type ()) | |
11 | typedef struct _XAppGpuInfo XAppGpuInfo; | |
12 | ||
13 | GType xapp_gpu_info_get_type (void) G_GNUC_CONST; | |
14 | ||
15 | /** | |
16 | * XAppGpuInfo: | |
17 | * @id: An identifier that can be used to refer to this GPU. | |
18 | * @is_default: Whether this GPU is used by default. | |
19 | * @display_name: User-visible name of the GPU. | |
20 | * @env_strv: (array zero-terminated=1): A string array containing alternating environment variables names and values to use to enable the gpu. | |
21 | * | |
22 | * Information about a single GPU used for offloading. The length of @env_strv will always be an even number. | |
23 | */ | |
24 | struct _XAppGpuInfo | |
25 | { | |
26 | gint id; | |
27 | gboolean is_default; | |
28 | gchar *display_name; | |
29 | gchar **env_strv; | |
30 | }; | |
31 | ||
32 | XAppGpuOffloadHelper *xapp_gpu_offload_helper_get (void); | |
33 | XAppGpuOffloadHelper *xapp_gpu_offload_helper_get_sync (void); | |
34 | gboolean xapp_gpu_offload_helper_is_ready (XAppGpuOffloadHelper *helper); | |
35 | gboolean xapp_gpu_offload_helper_is_offload_supported (XAppGpuOffloadHelper *helper); | |
36 | gint xapp_gpu_offload_helper_get_n_gpus (XAppGpuOffloadHelper *helper); | |
37 | GList *xapp_gpu_offload_helper_get_offload_infos (XAppGpuOffloadHelper *helper); | |
38 | XAppGpuInfo *xapp_gpu_offload_helper_get_default_info (XAppGpuOffloadHelper *helper); | |
39 | XAppGpuInfo *xapp_gpu_offload_helper_get_info_by_id (XAppGpuOffloadHelper *helper, gint id); | |
40 | gchar *xapp_gpu_info_get_shell_env_prefix (XAppGpuInfo *info); | |
41 | ||
42 | G_END_DECLS | |
43 | ||
44 | #endif /* __XAPP_GPU_OFFLOAD_HELPER_H__ */ |
1872 | 1872 | |
1873 | 1873 | g_clear_object (&icon->priv->primary_menu); |
1874 | 1874 | |
1875 | DEBUG ("set_primary_menu: %p", menu); | |
1875 | DEBUG ("%s: %p", icon->priv->name, menu); | |
1876 | 1876 | |
1877 | 1877 | if (menu) |
1878 | 1878 | { |
1924 | 1924 | |
1925 | 1925 | g_clear_object (&icon->priv->secondary_menu); |
1926 | 1926 | |
1927 | DEBUG ("set_secondary_menu: %p", menu); | |
1927 | DEBUG ("%s: %p", icon->priv->name, menu); | |
1928 | 1928 | |
1929 | 1929 | if (menu) |
1930 | 1930 | { |
0 | 0 | #!/usr/bin/python3 |
1 | 1 | |
2 | 2 | # This script is used to update the docs in docs/reference |
3 | # which are served at http://developer.linuxmint.com/xapps/reference/index.html. | |
3 | # which are served at https://projects.linuxmint.com/xapp/reference/index.html. | |
4 | 4 | |
5 | 5 | import os |
6 | 6 | import sys |
0 | #!/usr/bin/env python3 | |
1 | ||
2 | ''' | |
3 | FIXME | |
4 | ||
5 | This script is used only to call gdbus-codegen and simulate the | |
6 | generation of the source code and header as different targets. | |
7 | ||
8 | Both are generated implicitly, so meson is not able to know how | |
9 | many files are generated, so it does generate only one opaque | |
10 | target that represents the two files. | |
11 | ||
12 | originally from: | |
13 | https://gitlab.gnome.org/GNOME/gnome-settings-daemon/commit/5924d72931a030b24554116a48140a661a99652b | |
14 | ||
15 | Please see: | |
16 | https://bugzilla.gnome.org/show_bug.cgi?id=791015 | |
17 | https://github.com/mesonbuild/meson/pull/2930 | |
18 | ''' | |
19 | ||
20 | import subprocess | |
21 | import sys | |
22 | import os | |
23 | ||
24 | subprocess.call([ | |
25 | 'gdbus-codegen', | |
26 | '--interface-prefix=' + sys.argv[1], | |
27 | '--generate-c-code=' + os.path.join(sys.argv[4], sys.argv[2]), | |
28 | '--c-namespace=XApp', | |
29 | '--c-generate-object-manager', | |
30 | '--annotate', sys.argv[1], 'org.gtk.GDBus.C.Name', sys.argv[3], | |
31 | sys.argv[5] | |
32 | ]) |
0 | 0 | project('xapp', |
1 | 1 | 'c', |
2 | version : '2.4.3', | |
2 | version : '2.6.1', | |
3 | 3 | default_options : [ 'buildtype=debugoptimized' ], |
4 | 4 | ) |
5 | 5 | |
9 | 9 | |
10 | 10 | dbus_services_dir = dependency('dbus-1').get_pkgconfig_variable('session_bus_services_dir', |
11 | 11 | define_variable: ['datadir', get_option('datadir')]) |
12 | libexec_path = join_paths(get_option('prefix'), get_option('libexecdir'), 'xapps', 'sn-watcher') | |
12 | sn_watcher_dir = join_paths(get_option('prefix'), get_option('libdir'), 'xapps') | |
13 | 13 | |
14 | 14 | cdata = configuration_data() |
15 | 15 | cdata.set_quoted('GETTEXT_PACKAGE', 'xapp') |
16 | cdata.set_quoted('XAPP_SN_WATCHER_PATH', join_paths([libexec_path, 'xapp-sn-watcher'])) | |
16 | cdata.set_quoted('XAPP_SN_WATCHER_PATH', join_paths([sn_watcher_dir, 'xapp-sn-watcher'])) | |
17 | cdata.set('ENABLE_DEBUG', get_option('buildtype') in ['debug', 'debugoptimized']) | |
17 | 18 | |
18 | 19 | add_global_arguments([ |
19 | 20 | '-Wunused', |
39 | 40 | ) |
40 | 41 | |
41 | 42 | top_inc = include_directories('.') |
42 | codegen = find_program(join_paths(meson.source_root(), 'meson-scripts', 'g-codegen.py')) | |
43 | 43 | |
44 | 44 | subdir('libxapp') |
45 | 45 | subdir('po') |
22 | 22 | value: false, |
23 | 23 | description: 'Limit build to core library only and without the keyboard layout controller. This is to allow flatpak bundlings.' |
24 | 24 | ) |
25 | ||
25 | option('debian_derivative', | |
26 | type: 'boolean', | |
27 | value: false, | |
28 | description: 'Use paths specific to Debian and derivatives.' | |
29 | ) |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
7 | 7 | "Project-Id-Version: linuxmint\n" |
8 | 8 | "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" |
9 | 9 | "POT-Creation-Date: 2020-11-25 11:16+0000\n" |
10 | "PO-Revision-Date: 2020-07-06 09:20+0000\n" | |
11 | "Last-Translator: شريف الحكيمي <Unknown>\n" | |
10 | "PO-Revision-Date: 2023-02-20 12:25+0000\n" | |
11 | "Last-Translator: raousoft <Unknown>\n" | |
12 | 12 | "Language-Team: Arabic <ar@li.org>\n" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
27 | 27 | #: libxapp/favorite-vfs-file.c:1204 libxapp/favorite-vfs-file.c:1239 |
28 | 28 | #: libxapp/favorite-vfs-file.c:1269 libxapp/favorite-vfs-file.c:1308 |
29 | 29 | msgid "Operation not supported" |
30 | msgstr "" | |
30 | msgstr "عمليّة غير مدعومة" | |
31 | 31 | |
32 | 32 | #: libxapp/xapp-icon-chooser-button.c:207 |
33 | 33 | #: libxapp/xapp-icon-chooser-dialog.c:639 |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | "Language: cy\n" |
19 | 19 | |
20 | 20 | #: libxapp/favorite-vfs-file.c:463 |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
7 | 7 | "Project-Id-Version: linuxmint\n" |
8 | 8 | "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" |
9 | 9 | "POT-Creation-Date: 2020-11-25 11:16+0000\n" |
10 | "PO-Revision-Date: 2021-01-13 16:19+0000\n" | |
11 | "Last-Translator: Vasilis Kosmidis <Unknown>\n" | |
10 | "PO-Revision-Date: 2023-05-08 13:07+0000\n" | |
11 | "Last-Translator: Aster Bandis <Unknown>\n" | |
12 | 12 | "Language-Team: Greek <el@li.org>\n" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
113 | 113 | |
114 | 114 | #: libxapp/xapp-icon-chooser-dialog.c:586 |
115 | 115 | msgid "Default" |
116 | msgstr "Προεπιλεγμένη" | |
116 | msgstr "Προεπιλογή" | |
117 | 117 | |
118 | 118 | #: libxapp/xapp-icon-chooser-dialog.c:596 |
119 | 119 | msgid "Select" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
0 | # Persian translation for linuxmint | |
1 | # Copyright (c) 2023 Rosetta Contributors and Canonical Ltd 2023 | |
2 | # This file is distributed under the same license as the linuxmint package. | |
3 | # FIRST AUTHOR <EMAIL@ADDRESS>, 2023. | |
4 | # | |
5 | msgid "" | |
6 | msgstr "" | |
7 | "Project-Id-Version: linuxmint\n" | |
8 | "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" | |
9 | "POT-Creation-Date: 2020-11-25 11:16+0000\n" | |
10 | "PO-Revision-Date: 2023-03-23 16:11+0000\n" | |
11 | "Last-Translator: Mr.Ravi <Unknown>\n" | |
12 | "Language-Team: Persian <fa@li.org>\n" | |
13 | "MIME-Version: 1.0\n" | |
14 | "Content-Type: text/plain; charset=UTF-8\n" | |
15 | "Content-Transfer-Encoding: 8bit\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | ||
19 | #: libxapp/favorite-vfs-file.c:463 | |
20 | msgid "Favorites" | |
21 | msgstr "برگزیدهها" | |
22 | ||
23 | #: libxapp/favorite-vfs-file.c:933 libxapp/favorite-vfs-file.c:963 | |
24 | #: libxapp/favorite-vfs-file.c:992 libxapp/favorite-vfs-file.c:1026 | |
25 | #: libxapp/favorite-vfs-file.c:1053 libxapp/favorite-vfs-file.c:1082 | |
26 | #: libxapp/favorite-vfs-file.c:1115 libxapp/favorite-vfs-file.c:1142 | |
27 | #: libxapp/favorite-vfs-file.c:1204 libxapp/favorite-vfs-file.c:1239 | |
28 | #: libxapp/favorite-vfs-file.c:1269 libxapp/favorite-vfs-file.c:1308 | |
29 | msgid "Operation not supported" | |
30 | msgstr "عملیات پشتیبانی نمیشود" | |
31 | ||
32 | #: libxapp/xapp-icon-chooser-button.c:207 | |
33 | #: libxapp/xapp-icon-chooser-dialog.c:639 | |
34 | msgid "Icon size" | |
35 | msgstr "اندازه نماد" | |
36 | ||
37 | #: libxapp/xapp-icon-chooser-button.c:208 | |
38 | #: libxapp/xapp-icon-chooser-dialog.c:640 | |
39 | msgid "The preferred icon size." | |
40 | msgstr "اندازه نماد ترجیحی" | |
41 | ||
42 | #: libxapp/xapp-icon-chooser-button.c:222 | |
43 | msgid "Icon" | |
44 | msgstr "نماد" | |
45 | ||
46 | #: libxapp/xapp-icon-chooser-button.c:223 | |
47 | msgid "The string representing the icon." | |
48 | msgstr "رشته نشان دهنده نماد" | |
49 | ||
50 | #: libxapp/xapp-icon-chooser-button.c:234 | |
51 | msgid "Category" | |
52 | msgstr "دستهبندی" | |
53 | ||
54 | #: libxapp/xapp-icon-chooser-button.c:235 | |
55 | msgid "The default category." | |
56 | msgstr "دسته بندی پیشفرض" | |
57 | ||
58 | #: libxapp/xapp-icon-chooser-dialog.c:98 | |
59 | msgid "Actions" | |
60 | msgstr "اقدامات" | |
61 | ||
62 | #: libxapp/xapp-icon-chooser-dialog.c:101 | |
63 | msgid "Applications" | |
64 | msgstr "برنامهها" | |
65 | ||
66 | #: libxapp/xapp-icon-chooser-dialog.c:104 | |
67 | msgid "Categories" | |
68 | msgstr "دستهبندیها" | |
69 | ||
70 | #: libxapp/xapp-icon-chooser-dialog.c:107 | |
71 | msgid "Devices" | |
72 | msgstr "دستگاهها" | |
73 | ||
74 | #: libxapp/xapp-icon-chooser-dialog.c:110 | |
75 | msgid "Emblems" | |
76 | msgstr "نشانها" | |
77 | ||
78 | #: libxapp/xapp-icon-chooser-dialog.c:113 | |
79 | msgid "Emoji" | |
80 | msgstr "شکلک" | |
81 | ||
82 | #: libxapp/xapp-icon-chooser-dialog.c:116 | |
83 | msgid "Mime types" | |
84 | msgstr "انواع اداگر ها" | |
85 | ||
86 | #: libxapp/xapp-icon-chooser-dialog.c:119 | |
87 | msgid "Places" | |
88 | msgstr "مکانها" | |
89 | ||
90 | #: libxapp/xapp-icon-chooser-dialog.c:122 | |
91 | msgid "Status" | |
92 | msgstr "وضعیت" | |
93 | ||
94 | #: libxapp/xapp-icon-chooser-dialog.c:125 | |
95 | msgid "Other" | |
96 | msgstr "موارد دیگر" | |
97 | ||
98 | #: libxapp/xapp-icon-chooser-dialog.c:454 | |
99 | msgid "Choose an icon" | |
100 | msgstr "یک نماد انتخاب کنید" | |
101 | ||
102 | #: libxapp/xapp-icon-chooser-dialog.c:476 | |
103 | msgid "Search" | |
104 | msgstr "جستجو" | |
105 | ||
106 | #: libxapp/xapp-icon-chooser-dialog.c:483 | |
107 | msgid "Browse" | |
108 | msgstr "مرور کردن" | |
109 | ||
110 | #: libxapp/xapp-icon-chooser-dialog.c:539 | |
111 | msgid "Loading..." | |
112 | msgstr "درحال بارگذاری..." | |
113 | ||
114 | #: libxapp/xapp-icon-chooser-dialog.c:586 | |
115 | msgid "Default" | |
116 | msgstr "پیشفرض" | |
117 | ||
118 | #: libxapp/xapp-icon-chooser-dialog.c:596 | |
119 | msgid "Select" | |
120 | msgstr "انتخاب" | |
121 | ||
122 | #: libxapp/xapp-icon-chooser-dialog.c:605 | |
123 | #: libxapp/xapp-icon-chooser-dialog.c:1936 | |
124 | msgid "Cancel" | |
125 | msgstr "لغو" | |
126 | ||
127 | #: libxapp/xapp-icon-chooser-dialog.c:652 | |
128 | msgid "Allow Paths" | |
129 | msgstr "مجاز کردن مسیر ها" | |
130 | ||
131 | #: libxapp/xapp-icon-chooser-dialog.c:653 | |
132 | msgid "Whether to allow paths." | |
133 | msgstr "که آیا به مسیر ها اجازه داده شود." | |
134 | ||
135 | #: libxapp/xapp-icon-chooser-dialog.c:664 | |
136 | msgid "Default Icon" | |
137 | msgstr "نماد پیشفرض" | |
138 | ||
139 | #: libxapp/xapp-icon-chooser-dialog.c:665 | |
140 | msgid "The icon to use by default" | |
141 | msgstr "نمادی که به عنوان پیشفرض استفاده شود" | |
142 | ||
143 | #: libxapp/xapp-icon-chooser-dialog.c:1933 | |
144 | msgid "Select image file" | |
145 | msgstr "فایل تصویر را انتخاب کنید" | |
146 | ||
147 | #: libxapp/xapp-icon-chooser-dialog.c:1938 | |
148 | msgid "Open" | |
149 | msgstr "بازکردن" | |
150 | ||
151 | #: libxapp/xapp-icon-chooser-dialog.c:1953 | |
152 | msgid "Image" | |
153 | msgstr "تصویر" | |
154 | ||
155 | #: status-applets/mate/mate-xapp-status-applet.py:330 | |
156 | msgid "About" | |
157 | msgstr "درباره" | |
158 | ||
159 | #: status-applets/mate/mate-xapp-status-applet.py:350 | |
160 | #: status-applets/mate/org.x.MateXAppStatusApplet.mate-panel-applet.in.in:7 | |
161 | #: status-applets/mate/org.x.MateXAppStatusApplet.mate-panel-applet.in.in:11 | |
162 | msgid "Area where XApp status icons appear" | |
163 | msgstr "مکانی که نمادهای وضعیت XApp ها نمایان میشوند." | |
164 | ||
165 | #: status-applets/mate/org.x.MateXAppStatusApplet.mate-panel-applet.in.in:6 | |
166 | msgid "XApp Status Applet Factory" | |
167 | msgstr "کارخانه برنامک وضعیت XApp" | |
168 | ||
169 | #: status-applets/mate/org.x.MateXAppStatusApplet.mate-panel-applet.in.in:10 | |
170 | msgid "XApp Status Applet" | |
171 | msgstr "برنامک وضعیت XApp" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
8 | 8 | "MIME-Version: 1.0\n" |
9 | 9 | "Content-Type: text/plain; charset=UTF-8\n" |
10 | 10 | "Content-Transfer-Encoding: 8bit\n" |
11 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
12 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
11 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
12 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
13 | 13 | "Language: hu\n" |
14 | 14 | |
15 | 15 | #: libxapp/favorite-vfs-file.c:463 |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | "Language: ie\n" |
19 | 19 | |
20 | 20 | #: libxapp/favorite-vfs-file.c:463 |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | "Language: la\n" |
19 | 19 | |
20 | 20 | #: libxapp/favorite-vfs-file.c:463 |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | "Language: sk\n" |
19 | 19 | |
20 | 20 | #: libxapp/favorite-vfs-file.c:463 |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | "Language: sr\n" |
19 | 19 | |
20 | 20 | #: libxapp/favorite-vfs-file.c:463 |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
8 | 8 | "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" |
9 | 9 | "POT-Creation-Date: 2020-11-25 11:16+0000\n" |
10 | 10 | "PO-Revision-Date: 2022-05-03 10:20+0000\n" |
11 | "Last-Translator: Umidjon Almasov <umidjon@almasov.uz>\n" | |
11 | "Last-Translator: Umidjon Almasov <Unknown>\n" | |
12 | 12 | "Language-Team: Uzbek <uz@li.org>\n" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | "Language: uz\n" |
19 | 19 | |
20 | 20 | #: libxapp/favorite-vfs-file.c:463 |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
13 | 13 | "MIME-Version: 1.0\n" |
14 | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
15 | 15 | "Content-Transfer-Encoding: 8bit\n" |
16 | "X-Launchpad-Export-Date: 2022-12-02 14:24+0000\n" | |
17 | "X-Generator: Launchpad (build 51cef3d08dff1e227b5ada709bd67280c567d4be)\n" | |
16 | "X-Launchpad-Export-Date: 2023-06-08 10:22+0000\n" | |
17 | "X-Generator: Launchpad (build 620cd5280e3a973662e263ebf9346837ed657a46)\n" | |
18 | 18 | |
19 | 19 | #: libxapp/favorite-vfs-file.c:463 |
20 | 20 | msgid "Favorites" |
2 | 2 | <schema id="org.x.apps" path="/org/x/apps/"> |
3 | 3 | <child name="status-icon" schema="org.x.apps.statusicon"/> |
4 | 4 | <child name="favorites" schema="org.x.apps.favorites"/> |
5 | <child name="portal" schema="org.x.apps.portal"/> | |
5 | 6 | </schema> |
6 | 7 | |
7 | 8 | <schema id="org.x.apps.favorites" path="/org/x/apps/favorites/" gettext-domain="xapps"> |
58 | 59 | </key> |
59 | 60 | </schema> |
60 | 61 | |
62 | <enum id="org.x.apps.portal.ColorScheme"> | |
63 | <value nick="default" value="0"/> | |
64 | <value nick="prefer-dark" value="1"/> | |
65 | <value nick="prefer-light" value="2"/> | |
66 | </enum> | |
67 | ||
68 | <schema id="org.x.apps.portal" path="/org/x/apps/portal/" gettext-domain="xdg-desktop-portal-xapp"> | |
69 | <key name="color-scheme" enum="org.x.apps.portal.ColorScheme"> | |
70 | <default>'default'</default> | |
71 | <summary>Color scheme</summary> | |
72 | <description> | |
73 | The preferred color scheme for the user interface. Valid values are “default”, “prefer-dark”, “prefer-light”. | |
74 | </description> | |
75 | </key> | |
76 | </schema> | |
61 | 77 | </schemalist> |
0 | scripts = files('pastebin', 'upload-system-info', 'xfce4-set-wallpaper') | |
0 | scripts = files( | |
1 | 'pastebin', | |
2 | 'upload-system-info', | |
3 | 'xapp-gpu-offload', | |
4 | 'xfce4-set-wallpaper') | |
1 | 5 | |
2 | 6 | install_data(scripts, |
3 | 7 | install_dir: join_paths(get_option('prefix'), get_option('bindir')), |
8 | install_mode: 'rwxr-xr-x' | |
4 | 9 | ) |
0 | #!/usr/bin/python3 | |
1 | ||
2 | import sys | |
3 | import os | |
4 | import argparse | |
5 | ||
6 | import gi | |
7 | gi.require_version('XApp', '1.0') | |
8 | from gi.repository import XApp | |
9 | ||
10 | helper = XApp.GpuOffloadHelper.get_sync() | |
11 | ||
12 | def list_gpus(): | |
13 | info = helper.get_default_info() | |
14 | print("{: <1} {: <6} {: <20} [{: <20}]".format(info.id, "default" if info.is_default else "", info.get_shell_env_prefix(), info.display_name)) | |
15 | for info in helper.get_offload_infos(): | |
16 | print("{: <1} {: <6} {: <20} [{: <20}]".format(info.id, "default" if info.is_default else "", info.get_shell_env_prefix(), info.display_name)) | |
17 | ||
18 | def check_id(_id): | |
19 | if _id < 0 or _id >= helper.get_n_gpus(): | |
20 | print("A GPU with that ID does not exist", file=sys.stderr) | |
21 | exit(1) | |
22 | ||
23 | def _get_correct_info(_id): | |
24 | info = None | |
25 | ||
26 | if _id == -1: | |
27 | infos = helper.get_offload_infos() | |
28 | if infos: | |
29 | info = infos[0] | |
30 | else: | |
31 | info = helper.get_info_by_id(_id) | |
32 | ||
33 | if info is None: | |
34 | info = helper.get_default_info() | |
35 | ||
36 | return info | |
37 | ||
38 | def print_env(_id): | |
39 | info = _get_correct_info(_id) | |
40 | print(info.get_shell_env_prefix(), end="") | |
41 | ||
42 | def exec_command(_id, command): | |
43 | info = _get_correct_info(_id) | |
44 | ||
45 | env = os.environ | |
46 | ||
47 | if info: | |
48 | i = 0 | |
49 | strv = info.env_strv | |
50 | while i < len(strv): | |
51 | env[strv[i]] = strv[i + 1] | |
52 | i += 2 | |
53 | ||
54 | os.execvpe(command[0], command, env) | |
55 | ||
56 | parser = argparse.ArgumentParser(description="Launch a program using an alternate GPU, or if there are no others, like a normal program.", | |
57 | formatter_class=argparse.RawDescriptionHelpFormatter)# epilog=mode_help) | |
58 | parser.add_argument("command", type=str, nargs="*", help="The program to run and arguments.") | |
59 | parser.add_argument("-i", "--id", help="Specify the GPU to use. If omitted, the first non-default GPU will be used.", | |
60 | action="store", type=int, default=-1) | |
61 | parser.add_argument("-l", "--list-gpus", help="List available GPUs.", | |
62 | action="store_true") | |
63 | parser.add_argument("-p", "--print-env", help="Print the environment variables to be prepended to a shell command. A newline is omitted.", | |
64 | action="store_true") | |
65 | args = parser.parse_args() | |
66 | ||
67 | if not args.command and not args.list_gpus and not args.print_env: | |
68 | parser.print_help() | |
69 | exit(0) | |
70 | ||
71 | _id = -1 | |
72 | ||
73 | if args.list_gpus: | |
74 | list_gpus() | |
75 | exit(0) | |
76 | ||
77 | if args.id > -1: | |
78 | if (not args.print_env) and len(args.command) == 0: | |
79 | print("The ID argument must be accompanied by --print-env or a command to run.", file=sys.stderr) | |
80 | exit(1) | |
81 | ||
82 | _id = args.id | |
83 | check_id(_id) | |
84 | ||
85 | if args.print_env: | |
86 | print_env(_id) | |
87 | exit(0) | |
88 | ||
89 | if args.command: | |
90 | exit(exec_command(_id, args.command)) | |
91 | ||
92 | exit(0) |
0 | #! /usr/bin/python3 | |
1 | ||
2 | """ | |
3 | A demo/test script for the XAppAppGtkWindow class | |
4 | """ | |
5 | import sys, os | |
6 | import signal | |
7 | ||
8 | import gi | |
9 | gi.require_version('XApp', '1.0') | |
10 | ||
11 | from gi.repository import GLib, Gio, XApp, GObject | |
12 | ||
13 | signal.signal(signal.SIGINT, signal.SIG_DFL) | |
14 | ||
15 | class Main: | |
16 | def __init__(self): | |
17 | if len(sys.argv) > 1 and sys.argv[1] == "sync": | |
18 | self.helper = XApp.GpuOffloadHelper.get_sync() | |
19 | self.on_helper_ready(self.helper, self.helper.is_ready()) | |
20 | else: | |
21 | self.helper = XApp.GpuOffloadHelper.get() | |
22 | self.helper.connect("ready", self.on_helper_ready) | |
23 | ||
24 | def on_helper_ready(self, helper, success): | |
25 | print("Success:", success); | |
26 | print("Number of GPUS:", helper.get_n_gpus()) | |
27 | info = helper.get_default_info() | |
28 | print("%d - %s -- '%s'" % (info.id, info.display_name, info.get_shell_env_prefix())) | |
29 | for info in helper.get_offload_infos(): | |
30 | print("%d - %s -- '%s'" % (info.id, info.display_name, info.get_shell_env_prefix())) | |
31 | ||
32 | if __name__ == "__main__": | |
33 | main = Main() | |
34 | ||
35 | if len(sys.argv) == 1: | |
36 | GLib.MainLoop.new(None, True).run() | |
37 | ||
38 | exit(0) |
11 | 11 | |
12 | 12 | |
13 | 13 | conf = configuration_data() |
14 | conf.set('launch_folder', libexec_path) | |
14 | conf.set('launch_folder', sn_watcher_dir) | |
15 | 15 | |
16 | 16 | ## DBus service file |
17 | 17 | service_file = configure_file( |
45 | 45 | watcher_sources, |
46 | 46 | include_directories: [ top_inc ], |
47 | 47 | dependencies: [libxapp_dep, dbusmenu, cairo], |
48 | install_dir: libexec_path, | |
48 | install_dir: sn_watcher_dir, | |
49 | 49 | install: true |
50 | 50 | )⏎ |
569 | 569 | static void |
570 | 570 | update_menu (SnItem *item, SnItemPropertiesResult *new_props) |
571 | 571 | { |
572 | g_clear_object (&item->menu); | |
572 | DEBUG ("Possible new menu for '%s' - current path: '%s', new: '%s'", | |
573 | item->sortable_name, item->current_props->menu_path, new_props->menu_path); | |
573 | 574 | |
574 | 575 | xapp_status_icon_set_primary_menu (item->status_icon, NULL); |
575 | 576 | xapp_status_icon_set_secondary_menu (item->status_icon, NULL); |
577 | g_clear_object (&item->menu); | |
576 | 578 | |
577 | 579 | if (new_props->menu_path == NULL) |
578 | 580 | { |
581 | return; | |
582 | } | |
583 | ||
584 | if (g_strcmp0 (new_props->menu_path, "/NO_DBUSMENU") == 0) | |
585 | { | |
586 | DEBUG ("No menu set for '%s' (/NO_DBUSMENU)", item->sortable_name); | |
579 | 587 | return; |
580 | 588 | } |
581 | 589 | |
582 | 590 | item->menu = GTK_WIDGET (dbusmenu_gtkmenu_new ((gchar *) g_dbus_proxy_get_name (item->sn_item_proxy), |
583 | 591 | new_props->menu_path)); |
584 | 592 | g_object_ref_sink (item->menu); |
585 | ||
586 | DEBUG ("New menu for '%s'", item->sortable_name); | |
587 | 593 | |
588 | 594 | if (item->is_ai && !item->should_activate) |
589 | 595 | { |
981 | 987 | return; |
982 | 988 | } |
983 | 989 | |
990 | DEBUG ("Signal received from StatusNotifierItem: %s", signal_name); | |
991 | ||
984 | 992 | if (g_strcmp0 (signal_name, "NewIcon") == 0 || |
985 | 993 | g_strcmp0 (signal_name, "Id") == 0 || |
986 | 994 | g_strcmp0 (signal_name, "NewAttentionIcon") == 0 || |
681 | 681 | return watcher; |
682 | 682 | } |
683 | 683 | |
684 | static void | |
685 | dbusmenu_log_handler (const char *log_domain, | |
686 | GLogLevelFlags log_level, | |
687 | const char *message, | |
688 | gpointer data) | |
689 | ||
690 | { | |
691 | DEBUG ("%s", message); | |
692 | } | |
693 | ||
684 | 694 | int |
685 | 695 | main (int argc, char **argv) |
686 | 696 | { |
701 | 711 | sleep (2); |
702 | 712 | } |
703 | 713 | |
704 | current_desktop = g_getenv ("XDG_CURRENT_DESKTOP"); | |
705 | 714 | xapp_settings = g_settings_new (STATUS_ICON_SCHEMA); |
706 | 715 | |
707 | 716 | if (g_settings_get_boolean (xapp_settings, DEBUG_KEY)) |
717 | 726 | whitelist = g_settings_get_strv (xapp_settings, |
718 | 727 | VALID_XDG_DESKTOPS_KEY); |
719 | 728 | |
720 | should_start = g_strv_contains ((const gchar * const *) whitelist, current_desktop); | |
729 | current_desktop = g_getenv ("XDG_CURRENT_DESKTOP"); | |
730 | ||
731 | if (current_desktop != NULL) | |
732 | { | |
733 | should_start = g_strv_contains ((const gchar * const *) whitelist, current_desktop); | |
734 | } | |
735 | else | |
736 | { | |
737 | g_warning ("XDG_CURRENT_DESKTOP not set, unable to check against enabled desktop list. Starting anyway..."); | |
738 | should_start = TRUE; | |
739 | } | |
721 | 740 | |
722 | 741 | g_strfreev (whitelist); |
723 | 742 | g_clear_object (&xapp_settings); |
730 | 749 | exit(0); |
731 | 750 | } |
732 | 751 | |
752 | // libdbusmenu throws a lot of warnings for problems we already handle. They can be noisy in | |
753 | // .xsession-errors, however. Redirect them to debug output. | |
754 | g_log_set_handler ("LIBDBUSMENU-GTK", G_LOG_LEVEL_WARNING, | |
755 | dbusmenu_log_handler, NULL); | |
756 | ||
733 | 757 | watcher = watcher_new (current_desktop); |
734 | 758 | |
735 | 759 | status = g_application_run (G_APPLICATION (watcher), argc, argv); |