Files
clapper/doc/clapper-gtk/signal.ExtraMenuButton.open-subtitles.html
Rafał Dzięgiel 36d62a3a1c doc: Update
2024-02-14 20:35:46 +01:00

225 lines
7.2 KiB
HTML

<!--
SPDX-FileCopyrightText: Rafał Dzięgiel
SPDX-License-Identifier: LGPL-2.1-or-later
-->
<!DOCTYPE html>
<html lang="en">
<head>
<title>ClapperGtk.ExtraMenuButton::open-subtitles</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta charset="utf-8" />
<meta property="og:type" content="website"/>
<meta property="og:image:width" content="256"/>
<meta property="og:image:height" content="256"/>
<meta property="og:image:secure_url" content="clapper-logo.svg"/>
<meta property="og:image:alt" content="ClapperGtk-0.0"/>
<meta property="og:title" content="ClapperGtk.ExtraMenuButton::open-subtitles"/>
<meta property="og:description" content="Reference for signal ClapperGtk.ExtraMenuButton::open-subtitles"/>
<meta name="twitter:title" content="ClapperGtk.ExtraMenuButton::open-subtitles"/>
<meta name="twitter:description" content="Reference for signal ClapperGtk.ExtraMenuButton::open-subtitles"/>
<meta name="twitter:card" content="summary"/>
<link rel="search" type="application/opensearchdescription+xml" title="ClapperGtk" href="opensearch.xml">
<link rel="stylesheet" href="style.css" type="text/css" />
<script src="urlmap.js"></script>
<script src="fzy.js"></script>
<script src="search.js"></script>
<script src="main.js"></script>
</head>
<body>
<div id="body-wrapper" tabindex="-1">
<nav class="sidebar devhelp-hidden">
<div class="section">
<img src="clapper-logo.svg" class="logo"/>
</div>
<div class="search section">
<form id="search-form" autocomplete="off">
<input id="search-input" type="text" name="do-not-autocomplete" placeholder="Click, or press 's' to search" autocomplete="off"/>
</form>
</div>
<div class="section namespace">
<h3><a href="index.html">ClapperGtk</a></h3>
<p>API Version: 0.0</p>
<p>Library Version: 0.5.2</p>
</div>
<div class="section">
<h5>Type</h5>
<div class="links">
<a href="class.ExtraMenuButton.html">ExtraMenuButton</a>
</div>
</div>
<div class="section">
<h5>Signals</h5>
<div class="links">
<a class="signal current" href="signal.ExtraMenuButton.open-subtitles.html">open-subtitles</a>
</div>
</div>
<div class="section generator">
<p>Generated by <a href="https://gitlab.gnome.org/GNOME/gi-docgen">gi-docgen</a> 2023.3</p>
</div>
</nav>
<button id="btn-to-top" class="hidden"><span class="up-arrow"></span></button>
<section id="main" class="content">
<header>
<h3>Signal</h3>
<h1><a href="index.html">ClapperGtk</a><span class="sep"></span><a href="class.ExtraMenuButton.html">ExtraMenuButton</a>::open-subtitles</h1>
</header>
<section>
<div class="docblock">
<p></p>
</div>
<div class="declaration toggle-wrapper">
<h4 id="declaration">
Declaration
<a href="#declaration" class="anchor"></a>
</h4>
<div class="docblock">
<pre><code><div class="highlight"><pre><span></span><span class="kt">void</span>
<span class="n">open_subtitles</span><span class="w"> </span><span class="p">(</span>
<span class="w"> </span><span class="n">ClapperGtkExtraMenuButton</span><span class="o">*</span><span class="w"> </span><span class="n">self</span><span class="p">,</span>
<span class="w"> </span><span class="n">ClapperMediaItem</span><span class="o">*</span><span class="w"> </span><span class="n">item</span><span class="p">,</span>
<span class="w"> </span><span class="n">gpointer</span><span class="w"> </span><span class="n">user_data</span>
<span class="p">)</span>
</pre></div>
</code></pre>
</div>
</div>
<div class="description toggle-wrapper">
<h4 id="description" style="display:flex;">
Description
<a href="#description" class="anchor"></a>
<a class="srclink" title="go to source location" href="https://github.com/Rafostar/clapper/tree/master/lib/clapper-gtk/clapper-gtk-extra-menu-button.c#L701">[src]</a>
</h4>
<div class="docblock">
<p>A signal that user wants to open subtitles&nbsp;file.</p>
<p>Implementation should add a way for user to select subtitles to open
such as by e.g. using <a href="javascript:void(0)" data-namespace="Gtk" data-link="class.FileDialog.html" class="external"><code>GtkFileDialog</code></a> and then add them to the
<code>item</code> using <a href="javascript:void(0)" data-namespace="Clapper" data-link="method.MediaItem.set_suburi.html" class="external"><code>clapper_media_item_set_suburi()</code></a>&nbsp;method.</p>
<p>This signal will pass the <a href="javascript:void(0)" data-namespace="Clapper" data-link="class.MediaItem.html" class="external"><code>ClapperMediaItem</code></a> that was current when
user clicked the open button and subtitles should be added to this <code>item</code>.
This avoids situations where another item starts playing before user selects
subtitles file to be opened. When using asynchronous operations to open file,
implementation should <a href="javascript:void(0)" data-namespace="GObject" data-link="method.Object.ref.html" class="external"><code>g_object_ref()</code></a> the item to ensure that it
stays valid until&nbsp;finish.</p>
<p>Note that this signal will not be emitted if open button is not visible by
setting <a href="method.ExtraMenuButton.set_can_open_subtitles.html"><code>clapper_gtk_extra_menu_button_set_can_open_subtitles()</code></a> to <code>TRUE</code>,
so you do not have to implement handler for it&nbsp;otherwise.</p>
</div>
<div class="docblock">
<table>
<tr><td>Default handler: <p>The default handler is called after the handlers added via <code>g_signal_connect()</code>.</p></td></tr>
<tr><td>Signal emission will restart instead of <a href="https://docs.gtk.org/gobject/flags.SignalFlags.html#no_recurse" class="external">recursing</a></td></tr>
<tr><td><a href="https://docs.gtk.org/gobject/flags.SignalFlags.html#no_hooks" class="external">Hooks</a> are disabled for this signal</td></tr>
</table>
</div>
</div>
<div class="parameters toggle-wrapper">
<h4 id="parameters">
Parameters
<a href="#parameters" class="anchor"></a>
</h4>
<div class="docblock">
<dl class="arguments">
<dt class="arg-name"><code>item</code></dt>
<dd class="arg-description">
<p><em>Type:</em>&nbsp;<a href="javascript:void(0)" data-link="class.MediaItem.html" data-namespace="Clapper" class="external"><code>ClapperMediaItem</code></a></p>
<p><p>A <code>ClapperMediaItem</code>.</p></p>
<table>
<tr><td title="transfer: none">The data is owned by the caller of the function.</td></tr>
</table>
</dd>
</dl>
</div>
</div>
</section>
</section>
<section id="search" class="content hidden"></section>
<footer>
</footer>
</div>
</body>
</html>