Commit 09df7778 authored by Sean Davis's avatar Sean Davis 🕶

Plugin API updates, fix playlist search

parent 17127def
......@@ -5,6 +5,8 @@
* Fix IF/ELSE for plugin installation on multiple platforms (bugs #10142, #10441)
* Fix building with enable-debug=full on some platforms (bug #10525)
* Fix "Remove Duplicates" functionality.
* Plugin API documentation updates
* Fixed playlist search
2013-10-19: bluesabre@xfce.org
* Development release 0.5.90
......
......@@ -79,6 +79,11 @@ GTKDOC_LIBS= \
if ENABLE_GTK_DOC
include $(top_srcdir)/gtk-doc.make
doccheck: $(GTKDOC_CHECK)
$(AM_V_GEN)ln -s $< $@
MOSTLYCLEANFILES = doccheck
TESTS = doccheck
else
EXTRA_DIST=
endif
......
......@@ -76,5 +76,35 @@
<title>API Index</title>
<xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
</index>
<index id="api-index-0.2">
<title>API Index - 0.2</title>
<xi:include href="xml/api-index-0.2.xml"><xi:fallback /></xi:include>
</index>
<index id="api-index-0.4">
<title>API Index - 0.4</title>
<xi:include href="xml/api-index-0.4.xml"><xi:fallback /></xi:include>
</index>
<index id="api-index-0.6">
<title>API Index - 0.6</title>
<xi:include href="xml/api-index-0.6.xml"><xi:fallback /></xi:include>
</index>
<index id="api-index-deprecated">
<title>API Index - Deprecated Symbols</title>
<xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include>
</index>
<index id="parole-enum-types">
<title>Parole Enum Types</title>
<xi:include href="xml/parole-enum-types.xml"><xi:fallback /></xi:include>
</index>
<index id="parole-marshal">
<title>Parole Marshal</title>
<xi:include href="xml/parole-marshal.xml"><xi:fallback /></xi:include>
</index>
</book>
......@@ -6,12 +6,20 @@ ParolePluginContainer
ParoleState
parole_provider_player_get_main_window
parole_provider_player_pack
parole_provider_player_get_action
parole_provider_player_set_fullscreen
parole_provider_player_get_fullscreen
parole_stream_set_image
parole_stream_get_image
parole_provider_player_get_state
parole_provider_player_get_stream
parole_provider_player_get_stream_position
parole_provider_player_play_uri
parole_provider_player_pause
parole_provider_player_resume
parole_provider_player_stop
parole_provider_player_play_next
parole_provider_player_play_previous
parole_provider_player_seek
parole_provider_player_open_media_chooser
<SUBSECTION Standard>
......@@ -24,12 +32,12 @@ parole_provider_player_get_type
<SECTION>
<FILE>parole-provider-plugin</FILE>
ParoleProviderPluginIface
ParoleProviderPlugin
parole_provider_plugin_get_is_configurable
parole_provider_plugin_configure
parole_provider_plugin_set_player
<SUBSECTION Standard>
ParoleProviderPluginIface
PAROLE_PROVIDER_PLUGIN
PAROLE_IS_PROVIDER_PLUGIN
PAROLE_TYPE_PROVIDER_PLUGIN
......@@ -41,15 +49,21 @@ parole_provider_plugin_get_type
<FILE>parole-file</FILE>
<TITLE>ParoleFile</TITLE>
ParoleFile
ParoleFileClass
parole_file_new
parole_file_new_with_display_name
parole_file_new_cdda_track
parole_file_new_dvd_chapter
parole_file_get_file_name
parole_file_get_display_name
parole_file_get_uri
parole_file_get_directory
parole_file_get_content_type
parole_file_set_dvd_chapter
parole_file_get_dvd_chapter
parole_file_set_custom_subtitles
parole_file_get_custom_subtitles
<SUBSECTION Standard>
ParoleFileClass
PAROLE_FILE
PAROLE_IS_FILE
PAROLE_TYPE_FILE
......@@ -61,8 +75,8 @@ parole_file_get_type
ParoleMediaType
<TITLE>ParoleStream</TITLE>
ParoleStream
ParoleStreamClass
<SUBSECTION Standard>
ParoleStreamClass
PAROLE_STREAM
PAROLE_IS_STREAM
PAROLE_TYPE_STREAM
......@@ -110,6 +124,8 @@ PAROLE_DEFINE_TYPE_WITH_CODE
PAROLE_DEFINE_ABSTRACT_TYPE
PAROLE_DEFINE_ABSTRACT_TYPE_WITH_CODE
PAROLE_IMPLEMENT_INTERFACE
parole_get_supported_recent_files_filter
parole_get_supported_recent_media_filter
</SECTION>
<SECTION>
......
<!-- ##### SECTION ./tmpl/parole-plugins.sgml:Long_Description ##### -->
<!-- ##### STRUCT ParoleFileClass ##### -->
<para>
</para>
@parent_class:
<!-- ##### SECTION ./tmpl/parole-plugins.sgml:See_Also ##### -->
<!-- ##### STRUCT ParoleProviderPluginIface ##### -->
<para>
</para>
@__parent__:
@get_is_configurable:
@configure:
@set_player:
<!-- ##### SECTION ./tmpl/parole-plugins.sgml:Short_Description ##### -->
<!-- ##### SECTION ./tmpl/parole-plugins.sgml:Stability_Level ##### -->
<!-- ##### SECTION ./tmpl/parole-plugins.sgml:Title ##### -->
Parole Plugin Tutorial
<para>
This section explains the steps required to write a plugin for Parole using
the C language interface.
</para>
<para>
A simple example can be found in the parole plugins dir shipped with the source code, the sample
plugin.
</para>
<para>
As a basics, the plugin needs to implement <link linkend="ParoleProviderPlugin"><type>ParoleProviderPlugin</type></link>
interface, That is, the player use this interface to get if the plugin is configurable, to ask it to show
its properties dialog when needed, to set the <link linkend="ParoleProviderPlayer"><type>ParoleProviderPlayer</type></link>
interface used by plugins to access the the Parole player backend.
</para>
<sect1 id="parole-plugin-strcuted">
<title>Plugin structure.</title>
sample-plugin.c
<programlisting>
#include "sample-provider.h"
/* Avoid a no previous function declaration compiler warning*/
G_MODULE_EXPORT GType parole_plugin_initialize (ParoleProviderPlugin *plugin);
G_MODULE_EXPORT void parole_plugin_shutdown (void);
G_MODULE_EXPORT GType
parole_plugin_initialize (ParoleProviderPlugin *plugin)
{
xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8");
sample_provider_register_type (plugin);
return SAMPLE_TYPE_PROVIDER;
}
G_MODULE_EXPORT void
parole_plugin_shutdown (void)
{
}
</programlisting>
sample-provider.h
<programlisting>
#ifndef SAMPLE_PROVIDER_H_
#define SAMPLE_PROVIDER_H_
#include &lt;src/misc/parole.h&gt;
G_BEGIN_DECLS
typedef struct _SampleProviderClass SampleProviderClass;
typedef struct _SampleProvider SampleProvider;
#define SAMPLE_TYPE_PROVIDER (sample_provider_get_type ())
#define SAMPLE_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SAMPLE_TYPE_PROVIDER, SampleProvider))
#define SAMPLE_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SAMPLE_TYPE_PROVIDER, SampleProviderClass))
#define SAMPLE_IS_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SAMPLE_TYPE_PROVIDER))
#define SAMPLE_IS_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SAMPLE_TYPE_PROVIDER))
#define SAMPLE_PROVIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SAMPLE_TYPE_PROVIDER, SampleProviderClass))
GType sample_provider_get_type (void) G_GNUC_CONST G_GNUC_INTERNAL;
void sample_provider_register_type (ParoleProviderPlugin *plugin);
G_END_DECLS
</programlisting>
sample-provider.c
<programlisting>
#include "sample-provider.h"
static void sample_provider_iface_init (ParoleProviderPluginIface *iface);
static void sample_provider_finalize (GObject *object);
struct _SampleProviderClass
{
GObjectClass parent_class;
};
struct _SampleProvider
{
GObject parent;
ParoleProviderPlayer *player;
};
PAROLE_DEFINE_TYPE_WITH_CODE (SampleProvider,
sample_provider,
G_TYPE_OBJECT,
PAROLE_IMPLEMENT_INTERFACE (PAROLE_TYPE_PROVIDER_PLUGIN,
sample_provider_iface_init));
static void sample_provider_configure (ParoleProviderPlugin *provider, GtkWidget *parent)
{
/*Open the configuration dialog, parent is the window transient for*/
}
static gboolean sample_provider_is_configurable (ParoleProviderPlugin *plugin)
{
return TRUE; /*Returns FALSE and don't override the iface->configure function*/
}
static void
sample_provider_set_player (ParoleProviderPlugin *plugin, ParoleProviderPlayer *player)
{
SampleProvider *provider;
provider = SAMPLE_PROVIDER (plugin);
provider->player = player;
}
static void
sample_provider_iface_init (ParoleProviderPluginIface *iface)
{
iface->get_is_configurable = sample_provider_is_configurable;
iface->configure = sample_provider_configure;
iface->set_player = sample_provider_set_player;
}
static void sample_provider_class_init (SampleProviderClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
gobject_class->finalize = sample_provider_finalize;
}
static void sample_provider_init (SampleProvider *provider)
{
provider->player = NULL;
}
static void sample_provider_finalize (GObject *object)
{
G_OBJECT_CLASS (sample_provider_parent_class)->finalize (object);
}
</programlisting>
</sect1>
</part>
<!-- ##### MACRO PAROLE_PROVIDER_PLAYER_GET_INTERFACE ##### -->
<para>
</para>
@o:
<!-- ##### MACRO PAROLE_PROVIDER_PLUGIN_GET_INTERFACE ##### -->
<para>
</para>
@o:
<!-- ##### ENUM ParoleFileFormat ##### -->
<para>
</para>
@PAROLE_FILE_UNKNOWN:
@PAROLE_FILE_AUDIO:
@PAROLE_FILE_VIDEO:
@PAROLE_FILE_PLAYLIST:
<!-- ##### FUNCTION parole_file_guess_format ##### -->
<para>
</para>
@file:
@Returns:
<!-- ##### FUNCTION parole_provider_player_get_main_window ##### -->
<para>
</para>
@player:
@Returns:
<!-- ##### FUNCTION parole_provider_player_get_stream ##### -->
<para>
</para>
@player:
@Returns:
<!-- ##### FUNCTION parole_stream_init_properties ##### -->
<para>
</para>
@stream:
<!-- ##### FUNCTION parole_stream_new ##### -->
<!-- ##### STRUCT ParoleStreamClass ##### -->
<para>
</para>
@Returns:
@parent_class:
......@@ -61,28 +61,41 @@ Simple file handling.
</para>
<!-- ##### STRUCT ParoleFileClass ##### -->
<!-- ##### FUNCTION parole_file_new ##### -->
<para>
</para>
@parent_class:
@filename:
@Returns:
<!-- ##### FUNCTION parole_file_new ##### -->
<!-- ##### FUNCTION parole_file_new_with_display_name ##### -->
<para>
</para>
@filename:
@display_name:
@Returns:
<!-- ##### FUNCTION parole_file_new_with_display_name ##### -->
<!-- ##### FUNCTION parole_file_new_cdda_track ##### -->
<para>
</para>
@filename:
@track_num:
@display_name:
@Returns:
<!-- ##### FUNCTION parole_file_new_dvd_chapter ##### -->
<para>
</para>
@chapter_num:
@display_name:
@Returns:
......@@ -132,3 +145,39 @@ Simple file handling.
@Returns:
<!-- ##### FUNCTION parole_file_set_dvd_chapter ##### -->
<para>
</para>
@file:
@dvd_chapter:
<!-- ##### FUNCTION parole_file_get_dvd_chapter ##### -->
<para>
</para>
@file:
@Returns:
<!-- ##### FUNCTION parole_file_set_custom_subtitles ##### -->
<para>
</para>
@file:
@suburi:
<!-- ##### FUNCTION parole_file_get_custom_subtitles ##### -->
<para>
</para>
@file:
@Returns:
......@@ -89,6 +89,53 @@ playback status.
@container:
<!-- ##### FUNCTION parole_provider_player_get_action ##### -->
<para>
</para>
@player:
@action:
@Returns:
<!-- ##### FUNCTION parole_provider_player_set_fullscreen ##### -->
<para>
</para>
@player:
@fullscreen:
@Returns:
<!-- ##### FUNCTION parole_provider_player_get_fullscreen ##### -->
<para>
</para>
@player:
@Returns:
<!-- ##### FUNCTION parole_stream_set_image ##### -->
<para>
</para>
@object:
@pixbuf:
<!-- ##### FUNCTION parole_stream_get_image ##### -->
<para>
</para>
@object:
@Returns:
<!-- ##### FUNCTION parole_provider_player_get_state ##### -->
<para>
......@@ -98,6 +145,15 @@ playback status.
@Returns:
<!-- ##### FUNCTION parole_provider_player_get_stream_position ##### -->
<para>
</para>
@player:
@Returns:
<!-- ##### FUNCTION parole_provider_player_play_uri ##### -->
<para>
......@@ -135,6 +191,24 @@ playback status.
@Returns:
<!-- ##### FUNCTION parole_provider_player_play_next ##### -->
<para>
</para>
@player:
@Returns:
<!-- ##### FUNCTION parole_provider_player_play_previous ##### -->
<para>
</para>
@player:
@Returns:
<!-- ##### FUNCTION parole_provider_player_seek ##### -->
<para>
......
......@@ -23,16 +23,6 @@ can use to get access to various functionalities of the player.
<!-- ##### SECTION Image ##### -->
<!-- ##### STRUCT ParoleProviderPluginIface ##### -->
<para>
</para>
@__parent__:
@get_is_configurable:
@configure:
@set_player:
<!-- ##### STRUCT ParoleProviderPlugin ##### -->
<para>
......
......@@ -163,10 +163,3 @@ signal of the player, the plugin shouldn't take reference and all the properties
</para>
<!-- ##### STRUCT ParoleStreamClass ##### -->
<para>
</para>
@parent_class:
......@@ -114,3 +114,21 @@ Parole
@iface_init:
<!-- ##### FUNCTION parole_get_supported_recent_files_filter ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION parole_get_supported_recent_media_filter ##### -->
<para>
</para>
@void:
@Returns:
......@@ -459,7 +459,7 @@ parole_file_new_with_display_name (const gchar *filename, const gchar *display_n
/**
* parole_file_new_cdda_track:
* @track_num: cd track number.
*
* @display_name: the track name to display.
*
*
* Returns: A new #ParoleFile object.
......@@ -483,8 +483,8 @@ parole_file_new_cdda_track (const gint track_num, const gchar *display_name)
/**
* parole_file_new_dvd_chapter:
* @track_num: dvd chapter number.
*
* @chapter_num: dvd chapter number.
* @display_name: the chapter name to display.
*
*
* Returns: A new #ParoleFile object.
......
......@@ -775,7 +775,7 @@ gboolean parole_pl_parser_save_from_files (GSList *files, const gchar *filename,
* @filename: a filename.
*
*
* Returns: a #GSList containts a list of #Parolefile parsed from the playlist,
* Returns: a #GSList containts a list of #ParoleFile parsed from the playlist,
* or NULL if no files were parsed.
*
* Since: 0.2
......@@ -806,7 +806,7 @@ out:
* This function tries to parse a playlist without guessing the playlist format.
*
*
* Returns: a #GSList containts a list of #Parolefile parsed from the playlist,
* Returns: a #GSList containts a list of #ParoleFile parsed from the playlist,
* or NULL if no files were parsed.
*
* Since: 0.2
......
......@@ -129,11 +129,12 @@ static void parole_provider_player_class_init (gpointer klass)
/**
* parole_provider_player_get_main_window:
* @player: a #ParoleProviderPlayer
* @player: a #ParoleProviderPlayer
*
* Ask the Player to get the Parole main window.
*
* Returns: #GtkWidget window.
* Returns: a #GtkWidget window.
*
*
* Since: 0.2
**/
......@@ -424,6 +425,8 @@ gboolean parole_provider_player_seek (ParoleProviderPlayer *player, gdouble pos)
* @player: a #ParoleProviderPlayer
*
* Get stream position (microseconds) for Parole.
*
* Returns: a #gdouble containing the current stream position in microseconds.
*
* Since: 0.6
**/
......@@ -465,6 +468,9 @@ void parole_provider_player_open_media_chooser (ParoleProviderPlayer *player)