Initial packaging to sync OBS with git/gerrit
[profile/ivi/gtk3.git] / docs / reference / gtk / html / GtkLockButton.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>GtkLockButton</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="GTK+ 3 Reference Manual">
8 <link rel="up" href="ButtonWidgets.html" title="Buttons and Toggles">
9 <link rel="prev" href="GtkSwitch.html" title="GtkSwitch">
10 <link rel="next" href="NumericEntry.html" title="Numeric/Text Data Entry">
11 <meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
16 <tr valign="middle">
17 <td><a accesskey="p" href="GtkSwitch.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="ButtonWidgets.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">GTK+ 3 Reference Manual</th>
21 <td><a accesskey="n" href="NumericEntry.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
22 </tr>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#GtkLockButton.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#GtkLockButton.description" class="shortcut">Description</a>
27                    | 
28                   <a href="#GtkLockButton.object-hierarchy" class="shortcut">Object Hierarchy</a>
29                    | 
30                   <a href="#GtkLockButton.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
31                    | 
32                   <a href="#GtkLockButton.properties" class="shortcut">Properties</a>
33 </td></tr>
34 </table>
35 <div class="refentry">
36 <a name="GtkLockButton"></a><div class="titlepage"></div>
37 <div class="refnamediv"><table width="100%"><tr>
38 <td valign="top">
39 <h2><span class="refentrytitle"><a name="GtkLockButton.top_of_page"></a>GtkLockButton</span></h2>
40 <p>GtkLockButton — A widget to unlock or lock privileged operations</p>
41 </td>
42 <td valign="top" align="right"><img src="lockbutton.png"></td>
43 </tr></table></div>
44 <div class="refsynopsisdiv">
45 <a name="GtkLockButton.synopsis"></a><h2>Synopsis</h2>
46 <pre class="synopsis">
47 #include &lt;gtk/gtk.h&gt;
48
49 struct              <a class="link" href="GtkLockButton.html#GtkLockButton-struct" title="struct GtkLockButton">GtkLockButton</a>;
50 <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         <a class="link" href="GtkLockButton.html#gtk-lock-button-new" title="gtk_lock_button_new ()">gtk_lock_button_new</a>                 (<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GPermission.html"><span class="type">GPermission</span></a> *permission</code></em>);
51 <a href="http://library.gnome.org/devel/gio/unstable/GPermission.html"><span class="returnvalue">GPermission</span></a> *       <a class="link" href="GtkLockButton.html#gtk-lock-button-get-permission" title="gtk_lock_button_get_permission ()">gtk_lock_button_get_permission</a>      (<em class="parameter"><code><a class="link" href="GtkLockButton.html" title="GtkLockButton"><span class="type">GtkLockButton</span></a> *button</code></em>);
52 <span class="returnvalue">void</span>                <a class="link" href="GtkLockButton.html#gtk-lock-button-set-permission" title="gtk_lock_button_set_permission ()">gtk_lock_button_set_permission</a>      (<em class="parameter"><code><a class="link" href="GtkLockButton.html" title="GtkLockButton"><span class="type">GtkLockButton</span></a> *button</code></em>,
53                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GPermission.html"><span class="type">GPermission</span></a> *permission</code></em>);
54 </pre>
55 </div>
56 <div class="refsect1">
57 <a name="GtkLockButton.object-hierarchy"></a><h2>Object Hierarchy</h2>
58 <pre class="synopsis">
59   <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
60    +----<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
61          +----<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>
62                +----<a class="link" href="GtkContainer.html" title="GtkContainer">GtkContainer</a>
63                      +----<a class="link" href="GtkBin.html" title="GtkBin">GtkBin</a>
64                            +----<a class="link" href="GtkButton.html" title="GtkButton">GtkButton</a>
65                                  +----GtkLockButton
66 </pre>
67 </div>
68 <div class="refsect1">
69 <a name="GtkLockButton.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
70 <p>
71 GtkLockButton implements
72  AtkImplementorIface,  <a class="link" href="GtkBuildable.html" title="GtkBuildable">GtkBuildable</a>,  <a class="link" href="GtkActionable.html" title="GtkActionable">GtkActionable</a> and  <a class="link" href="GtkActivatable.html" title="GtkActivatable">GtkActivatable</a>.</p>
73 </div>
74 <div class="refsect1">
75 <a name="GtkLockButton.properties"></a><h2>Properties</h2>
76 <pre class="synopsis">
77   "<a class="link" href="GtkLockButton.html#GtkLockButton--permission" title='The "permission" property'>permission</a>"               <a href="http://library.gnome.org/devel/gio/unstable/GPermission.html"><span class="type">GPermission</span></a>*          : Read / Write
78   "<a class="link" href="GtkLockButton.html#GtkLockButton--text-lock" title='The "text-lock" property'>text-lock</a>"                <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct
79   "<a class="link" href="GtkLockButton.html#GtkLockButton--text-unlock" title='The "text-unlock" property'>text-unlock</a>"              <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct
80   "<a class="link" href="GtkLockButton.html#GtkLockButton--tooltip-lock" title='The "tooltip-lock" property'>tooltip-lock</a>"             <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct
81   "<a class="link" href="GtkLockButton.html#GtkLockButton--tooltip-not-authorized" title='The "tooltip-not-authorized" property'>tooltip-not-authorized</a>"   <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct
82   "<a class="link" href="GtkLockButton.html#GtkLockButton--tooltip-unlock" title='The "tooltip-unlock" property'>tooltip-unlock</a>"           <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct
83 </pre>
84 </div>
85 <div class="refsect1">
86 <a name="GtkLockButton.description"></a><h2>Description</h2>
87 <p>
88 GtkLockButton is a widget that can be used in control panels or
89 preference dialogs to allow users to obtain and revoke authorizations
90 needed to operate the controls. The required authorization is represented
91 by a <a href="http://library.gnome.org/devel/gio/unstable/GPermission.html"><span class="type">GPermission</span></a> object. Concrete implementations of <a href="http://library.gnome.org/devel/gio/unstable/GPermission.html"><span class="type">GPermission</span></a> may use
92 PolicyKit or some other authorization framework.
93 </p>
94 <p>
95 If the user lacks the authorization but authorization can be obtained
96 through authentication, the widget looks like this
97 </p>
98 <div class="informalexample"><img src="lockbutton-locked.png"></div>
99 <p>
100 and the user can click the button to obtain the authorization. Depending
101 on the platform, this may pop up an authentication dialog or ask the user
102 to authenticate in some other way. Once authorization is obtained, the
103 widget changes to this
104 </p>
105 <div class="informalexample"><img src="lockbutton-unlocked.png"></div>
106 <p>
107 and the authorization can be dropped by clicking the button. If the user
108 is not able to obtain authorization at all, the widget looks like this
109 </p>
110 <div class="informalexample"><img src="lockbutton-sorry.png"></div>
111 <p>
112 If the user is authorized and cannot drop the authorization, the button
113 is hidden.
114 </p>
115 <p>
116 The text (and tooltips) that are shown in the various cases can be adjusted
117 with the <a class="link" href="GtkLockButton.html#GtkLockButton--text-lock" title='The "text-lock" property'><span class="type">"text-lock"</span></a>, <a class="link" href="GtkLockButton.html#GtkLockButton--text-unlock" title='The "text-unlock" property'><span class="type">"text-unlock"</span></a>,
118 <a class="link" href="GtkLockButton.html#GtkLockButton--tooltip-lock" title='The "tooltip-lock" property'><span class="type">"tooltip-lock"</span></a>, <a class="link" href="GtkLockButton.html#GtkLockButton--tooltip-unlock" title='The "tooltip-unlock" property'><span class="type">"tooltip-unlock"</span></a> and
119 <a class="link" href="GtkLockButton.html#GtkLockButton--tooltip-not-authorized" title='The "tooltip-not-authorized" property'><span class="type">"tooltip-not-authorized"</span></a> properties.
120 </p>
121 </div>
122 <div class="refsect1">
123 <a name="GtkLockButton.details"></a><h2>Details</h2>
124 <div class="refsect2">
125 <a name="GtkLockButton-struct"></a><h3>struct GtkLockButton</h3>
126 <pre class="programlisting">struct GtkLockButton;</pre>
127 </div>
128 <hr>
129 <div class="refsect2">
130 <a name="gtk-lock-button-new"></a><h3>gtk_lock_button_new ()</h3>
131 <pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         gtk_lock_button_new                 (<em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GPermission.html"><span class="type">GPermission</span></a> *permission</code></em>);</pre>
132 <p>
133 Creates a new lock button which reflects the <em class="parameter"><code>permission</code></em>.
134 </p>
135 <div class="variablelist"><table border="0">
136 <col align="left" valign="top">
137 <tbody>
138 <tr>
139 <td><p><span class="term"><em class="parameter"><code>permission</code></em> :</span></p></td>
140 <td>a <a href="http://library.gnome.org/devel/gio/unstable/GPermission.html"><span class="type">GPermission</span></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
141 </td>
142 </tr>
143 <tr>
144 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
145 <td>a new <a class="link" href="GtkLockButton.html" title="GtkLockButton"><span class="type">GtkLockButton</span></a>
146 </td>
147 </tr>
148 </tbody>
149 </table></div>
150 <p class="since">Since 3.2</p>
151 </div>
152 <hr>
153 <div class="refsect2">
154 <a name="gtk-lock-button-get-permission"></a><h3>gtk_lock_button_get_permission ()</h3>
155 <pre class="programlisting"><a href="http://library.gnome.org/devel/gio/unstable/GPermission.html"><span class="returnvalue">GPermission</span></a> *       gtk_lock_button_get_permission      (<em class="parameter"><code><a class="link" href="GtkLockButton.html" title="GtkLockButton"><span class="type">GtkLockButton</span></a> *button</code></em>);</pre>
156 <p>
157 Obtains the <a href="http://library.gnome.org/devel/gio/unstable/GPermission.html"><span class="type">GPermission</span></a> object that controls <em class="parameter"><code>button</code></em>.
158 </p>
159 <div class="variablelist"><table border="0">
160 <col align="left" valign="top">
161 <tbody>
162 <tr>
163 <td><p><span class="term"><em class="parameter"><code>button</code></em> :</span></p></td>
164 <td>a <a class="link" href="GtkLockButton.html" title="GtkLockButton"><span class="type">GtkLockButton</span></a>
165 </td>
166 </tr>
167 <tr>
168 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
169 <td>the <a href="http://library.gnome.org/devel/gio/unstable/GPermission.html"><span class="type">GPermission</span></a> of <em class="parameter"><code>button</code></em>
170 </td>
171 </tr>
172 </tbody>
173 </table></div>
174 <p class="since">Since 3.2</p>
175 </div>
176 <hr>
177 <div class="refsect2">
178 <a name="gtk-lock-button-set-permission"></a><h3>gtk_lock_button_set_permission ()</h3>
179 <pre class="programlisting"><span class="returnvalue">void</span>                gtk_lock_button_set_permission      (<em class="parameter"><code><a class="link" href="GtkLockButton.html" title="GtkLockButton"><span class="type">GtkLockButton</span></a> *button</code></em>,
180                                                          <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GPermission.html"><span class="type">GPermission</span></a> *permission</code></em>);</pre>
181 <p>
182 Sets the <a href="http://library.gnome.org/devel/gio/unstable/GPermission.html"><span class="type">GPermission</span></a> object that controls <em class="parameter"><code>button</code></em>.
183 </p>
184 <div class="variablelist"><table border="0">
185 <col align="left" valign="top">
186 <tbody>
187 <tr>
188 <td><p><span class="term"><em class="parameter"><code>button</code></em> :</span></p></td>
189 <td>a <a class="link" href="GtkLockButton.html" title="GtkLockButton"><span class="type">GtkLockButton</span></a>
190 </td>
191 </tr>
192 <tr>
193 <td><p><span class="term"><em class="parameter"><code>permission</code></em> :</span></p></td>
194 <td>a <a href="http://library.gnome.org/devel/gio/unstable/GPermission.html"><span class="type">GPermission</span></a> object, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
195 </td>
196 </tr>
197 </tbody>
198 </table></div>
199 <p class="since">Since 3.2</p>
200 </div>
201 </div>
202 <div class="refsect1">
203 <a name="GtkLockButton.property-details"></a><h2>Property Details</h2>
204 <div class="refsect2">
205 <a name="GtkLockButton--permission"></a><h3>The <code class="literal">"permission"</code> property</h3>
206 <pre class="programlisting">  "permission"               <a href="http://library.gnome.org/devel/gio/unstable/GPermission.html"><span class="type">GPermission</span></a>*          : Read / Write</pre>
207 <p>The GPermission object controlling this button.</p>
208 </div>
209 <hr>
210 <div class="refsect2">
211 <a name="GtkLockButton--text-lock"></a><h3>The <code class="literal">"text-lock"</code> property</h3>
212 <pre class="programlisting">  "text-lock"                <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct</pre>
213 <p>The text to display when prompting the user to lock.</p>
214 <p>Default value: "Lock"</p>
215 </div>
216 <hr>
217 <div class="refsect2">
218 <a name="GtkLockButton--text-unlock"></a><h3>The <code class="literal">"text-unlock"</code> property</h3>
219 <pre class="programlisting">  "text-unlock"              <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct</pre>
220 <p>The text to display when prompting the user to unlock.</p>
221 <p>Default value: "Unlock"</p>
222 </div>
223 <hr>
224 <div class="refsect2">
225 <a name="GtkLockButton--tooltip-lock"></a><h3>The <code class="literal">"tooltip-lock"</code> property</h3>
226 <pre class="programlisting">  "tooltip-lock"             <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct</pre>
227 <p>The tooltip to display when prompting the user to lock.</p>
228 <p>Default value: "Dialog is unlocked.\nClick to prevent further changes"</p>
229 </div>
230 <hr>
231 <div class="refsect2">
232 <a name="GtkLockButton--tooltip-not-authorized"></a><h3>The <code class="literal">"tooltip-not-authorized"</code> property</h3>
233 <pre class="programlisting">  "tooltip-not-authorized"   <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct</pre>
234 <p>The tooltip to display when prompting the user cannot obtain authorization.</p>
235 <p>Default value: "System policy prevents changes.\nContact your system administrator"</p>
236 </div>
237 <hr>
238 <div class="refsect2">
239 <a name="GtkLockButton--tooltip-unlock"></a><h3>The <code class="literal">"tooltip-unlock"</code> property</h3>
240 <pre class="programlisting">  "tooltip-unlock"           <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a>*                : Read / Write / Construct</pre>
241 <p>The tooltip to display when prompting the user to unlock.</p>
242 <p>Default value: "Dialog is locked.\nClick to make changes"</p>
243 </div>
244 </div>
245 </div>
246 <div class="footer">
247 <hr>
248           Generated by GTK-Doc V1.18</div>
249 </body>
250 </html>