?? gtk-accelerator-maps.html
字號:
<a name="gtk-accel-map-add-entry"></a>gtk_accel_map_add_entry ()</h3><a class="indexterm" name="id3166197"></a><pre class="programlisting">void gtk_accel_map_add_entry (const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> *accel_path, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint">guint</a> accel_key, <ahref="/usr/share/gtk-doc/html/gdk/gdk-Windows.html#GdkModifierType">GdkModifierType</a> accel_mods);</pre><p>Registers a new accelerator with the global accelerator map.This function should only be called once per <em class="parameter"><code>accel_path</code></em>with the canonical <em class="parameter"><code>accel_key</code></em> and <em class="parameter"><code>accel_mods</code></em> for this path.To change the accelerator during runtime programatically, use<a class="link" href="gtk-Accelerator-Maps.html#gtk-accel-map-change-entry"><code class="function">gtk_accel_map_change_entry()</code></a>.The accelerator path must consist of "<WINDOWTYPE>/Category1/Category2/.../Action",where <WINDOWTYPE> should be a unique application-specific identifier, thatcorresponds to the kind of window the accelerator is being used in, e.g. "Gimp-Image","Abiword-Document" or "Gnumeric-Settings".The Category1/.../Action portion is most appropriately chosen by the action theaccelerator triggers, i.e. for accelerators on menu items, choose the item's menu path,e.g. "File/Save As", "Image/View/Zoom" or "Edit/Select All".So a full valid accelerator path may look like:"<Gimp-Toolbox>/File/Dialogs/Tool Options...".</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>accel_path</code></em> :</span></p></td><td> valid accelerator path</td></tr><tr><td><p><span class="term"><em class="parameter"><code>accel_key</code></em> :</span></p></td><td> the accelerator key</td></tr><tr><td><p><span class="term"><em class="parameter"><code>accel_mods</code></em> :</span></p></td><td> the accelerator modifiers</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3166348"></a><h3><a name="gtk-accel-map-lookup-entry"></a>gtk_accel_map_lookup_entry ()</h3><a class="indexterm" name="id3166361"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> gtk_accel_map_lookup_entry (const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> *accel_path, <a class="link" href="gtk-Keyboard-Accelerators.html#GtkAccelKey">GtkAccelKey</a> *key);</pre><p>Looks up the accelerator entry for <em class="parameter"><code>accel_path</code></em> and fills in <em class="parameter"><code>key</code></em>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>accel_path</code></em> :</span></p></td><td> a valid accelerator path</td></tr><tr><td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td><td> the accelerator key to be filled in (optional)</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>accel_path</code></em> is known, <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3166482"></a><h3><a name="gtk-accel-map-change-entry"></a>gtk_accel_map_change_entry ()</h3><a class="indexterm" name="id3166495"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> gtk_accel_map_change_entry (const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> *accel_path, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint">guint</a> accel_key, <ahref="/usr/share/gtk-doc/html/gdk/gdk-Windows.html#GdkModifierType">GdkModifierType</a> accel_mods, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> replace);</pre><p>Changes the <em class="parameter"><code>accel_key</code></em> and <em class="parameter"><code>accel_mods</code></em> currently associated with <em class="parameter"><code>accel_path</code></em>.Due to conflicts with other accelerators, a change may not always be possible,<em class="parameter"><code>replace</code></em> indicates whether other accelerators may be deleted to resolve suchconflicts. A change will only occur if all conflicts could be resolved (whichmight not be the case if conflicting accelerators are locked). Successfulchanges are indicated by a <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> return value.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>accel_path</code></em> :</span></p></td><td> a valid accelerator path</td></tr><tr><td><p><span class="term"><em class="parameter"><code>accel_key</code></em> :</span></p></td><td> the new accelerator key</td></tr><tr><td><p><span class="term"><em class="parameter"><code>accel_mods</code></em> :</span></p></td><td> the new accelerator modifiers</td></tr><tr><td><p><span class="term"><em class="parameter"><code>replace</code></em> :</span></p></td><td> <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if other accelerators may be deleted upon conflicts</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the accelerator could be changed, <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3166693"></a><h3><a name="gtk-accel-map-load"></a>gtk_accel_map_load ()</h3><a class="indexterm" name="id3166706"></a><pre class="programlisting">void gtk_accel_map_load (const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> *file_name);</pre><p>Parses a file previously saved with <a class="link" href="gtk-Accelerator-Maps.html#gtk-accel-map-save"><code class="function">gtk_accel_map_save()</code></a> foraccelerator specifications, and propagates them accordingly.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>file_name</code></em> :</span></p></td><td> a file containing accelerator specifications, in the GLib file name encoding</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3166770"></a><h3><a name="gtk-accel-map-save"></a>gtk_accel_map_save ()</h3><a class="indexterm" name="id3166782"></a><pre class="programlisting">void gtk_accel_map_save (const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> *file_name);</pre><p>Saves current accelerator specifications (accelerator path, keyand modifiers) to <em class="parameter"><code>file_name</code></em>.The file is written in a format suitable to be read back in by<a class="link" href="gtk-Accelerator-Maps.html#gtk-accel-map-load"><code class="function">gtk_accel_map_load()</code></a>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>file_name</code></em> :</span></p></td><td> the name of the file to contain accelerator specifications, in the GLib file name encoding</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3166852"></a><h3><a name="gtk-accel-map-foreach"></a>gtk_accel_map_foreach ()</h3><a class="indexterm" name="id3166866"></a><pre class="programlisting">void gtk_accel_map_foreach (<ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer">gpointer</a> data, <a class="link" href="gtk-Accelerator-Maps.html#GtkAccelMapForeach">GtkAccelMapForeach</a> foreach_func);</pre><p>Loops over the entries in the accelerator map whose accel path doesn't match any of the filters added with <a class="link" href="gtk-Accelerator-Maps.html#gtk-accel-map-add-filter"><code class="function">gtk_accel_map_add_filter()</code></a>, and execute <em class="parameter"><code>foreach_func</code></em> on each. The signature of <em class="parameter"><code>foreach_func</code></em> is that of <a class="link" href="gtk-Accelerator-Maps.html#GtkAccelMapForeach"><span class="type">GtkAccelMapForeach</span></a>, the <em class="parameter"><code>changed</code></em> parameter indicates whetherthis accelerator was changed during runtime (thus, would needsaving during an accelerator map dump).</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td><td> data to be passed into <em class="parameter"><code>foreach_func</code></em></td></tr><tr><td><p><span class="term"><em class="parameter"><code>foreach_func</code></em> :</span></p></td><td> function to be executed for each accel map entry which is not filtered out</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3166987"></a><h3><a name="gtk-accel-map-load-fd"></a>gtk_accel_map_load_fd ()</h3><a class="indexterm" name="id3167001"></a><pre class="programlisting">void gtk_accel_map_load_fd (<ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> fd);</pre><p>Filedescriptor variant of <a class="link" href="gtk-Accelerator-Maps.html#gtk-accel-map-load"><code class="function">gtk_accel_map_load()</code></a>.</p><p>Note that the file descriptor will not be closed by this function.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>fd</code></em> :</span></p></td><td> a valid readable file descriptor</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3167066"></a><h3><a name="gtk-accel-map-save-fd"></a>gtk_accel_map_save_fd ()</h3><a class="indexterm" name="id3167079"></a><pre class="programlisting">void gtk_accel_map_save_fd (<ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -