Session Items Factory

WpSiFactory

GObject
    ╰──WpSiFactory

A factory for session items.

The most simple way to register a new item implementation would be:

 GVariantBuilder b = G_VARIANT_BUILDER_INIT ("a(ssymv)");
 g_variant_builder_add (&b, ...);
 wp_si_factory_register (core, wp_si_factory_new_simple (
    "foobar", FOO_TYPE_BAR, g_variant_builder_end (&b)));

And the most simple way to construct an item from a registered factory:

 item = wp_session_item_make (core, "foobar");

Members

parent_instance (GObject) –
No description available

Class structure

WpSiFactoryClass

Fields
parent_class (GObjectClass) –
No description available

Wp.SiFactoryClass

Attributes
parent_class (GObject.ObjectClass) –
No description available

Wp.SiFactoryClass

Attributes
parent_class (GObject.ObjectClass) –
No description available

WpSiFactory

GObject
    ╰──WpSiFactory

A factory for session items.

The most simple way to register a new item implementation would be:

 GVariantBuilder b = G_VARIANT_BUILDER_INIT ("a(ssymv)");
 g_variant_builder_add (&b, ...);
 wp_si_factory_register (core, wp_si_factory_new_simple (
    "foobar", FOO_TYPE_BAR, g_variant_builder_end (&b)));

And the most simple way to construct an item from a registered factory:

 item = wp_session_item_make (core, "foobar");

Members

parent_instance (GObject) –
No description available

WpSiFactory

GObject
    ╰──WpSiFactory

A factory for session items.

The most simple way to register a new item implementation would be:

 GVariantBuilder b = G_VARIANT_BUILDER_INIT ("a(ssymv)");
 g_variant_builder_add (&b, ...);
 wp_si_factory_register (core, wp_si_factory_new_simple (
    "foobar", FOO_TYPE_BAR, g_variant_builder_end (&b)));

And the most simple way to construct an item from a registered factory:

 item = wp_session_item_make (core, "foobar");

Members

parent_instance (GObject) –
No description available

Constructors

wp_si_factory_new_simple

WpSiFactory *
wp_si_factory_new_simple (const gchar * factory_name,
                          GType si_type,
                          GVariant * config_spec)

Parameters:

factory_name

the factory name; must be a static string!

si_type

the WpSessionItem subclass type to instantiate for constructing items

config_spec ( [transfer: floating] ) –

the config spec that will be returned by wp_si_factory_get_config_spec

Returns ( [transfer: full] ) –

the new factory


Wp.SiFactory.new_simple

def Wp.SiFactory.new_simple (factory_name, si_type, config_spec):
    #python wrapper for 'wp_si_factory_new_simple'

Parameters:

factory_name ( str ) –

the factory name; must be a static string!

si_type ( GObject.Type ) –

the Wp.SessionItem subclass type to instantiate for constructing items

config_spec ( GLib.Variant ) –

the config spec that will be returned by Wp.SiFactory.get_config_spec

Returns ( Wp.SiFactory ) –

the new factory


Wp.SiFactory.prototype.new_simple

function Wp.SiFactory.prototype.new_simple(factory_name: String, si_type: GObject.Type, config_spec: GLib.Variant): {
    // javascript wrapper for 'wp_si_factory_new_simple'
}

Parameters:

factory_name ( String ) –

the factory name; must be a static string!

si_type ( GObject.Type ) –

the Wp.SessionItem subclass type to instantiate for constructing items

config_spec ( GLib.Variant ) –

the config spec that will be returned by Wp.SiFactory.prototype.get_config_spec

Returns ( Wp.SiFactory ) –

the new factory


Methods

wp_si_factory_construct

WpSessionItem *
wp_si_factory_construct (WpSiFactory * self)

Creates a new instance of the session item that is constructed by this factory

Parameters:

self

the factory

Returns ( [transfer: full] ) –

a new session item instance


Wp.SiFactory.construct

def Wp.SiFactory.construct (self):
    #python wrapper for 'wp_si_factory_construct'

Creates a new instance of the session item that is constructed by this factory

Parameters:

self ( Wp.SiFactory ) –

the factory

Returns ( Wp.SessionItem ) –

a new session item instance


Wp.SiFactory.prototype.construct

function Wp.SiFactory.prototype.construct(): {
    // javascript wrapper for 'wp_si_factory_construct'
}

Creates a new instance of the session item that is constructed by this factory

Parameters:

self ( Wp.SiFactory ) –

the factory

Returns ( Wp.SessionItem ) –

a new session item instance


wp_si_factory_get_config_spec

GVariant *
wp_si_factory_get_config_spec (WpSiFactory * self)

Returns a description of all the configuration options that the constructed items of this factory have. Configuration options are a way for items to accept input from external sources that affects their behavior, or to provide output for other items to consume as their configuration.

The returned GVariant has the a(ssymv) type. This is an array of tuples, where each tuple has the following values, in order:

  • s (string): the name of the option
  • s (string): a GVariant type string, describing the type of the data
  • y (byte): a combination of WpSiConfigOptionFlags
  • mv (optional variant): optionally, an additional variant This is provided to allow extensions.

Parameters:

self

the factory

Returns ( [transfer: full] ) –

the configuration description


Wp.SiFactory.get_config_spec

def Wp.SiFactory.get_config_spec (self):
    #python wrapper for 'wp_si_factory_get_config_spec'

Returns a description of all the configuration options that the constructed items of this factory have. Configuration options are a way for items to accept input from external sources that affects their behavior, or to provide output for other items to consume as their configuration.

The returned GVariant has the a(ssymv) type. This is an array of tuples, where each tuple has the following values, in order:

  • s (string): the name of the option
  • s (string): a GVariant type string, describing the type of the data
  • y (byte): a combination of Wp.SiConfigOptionFlags
  • mv (optional variant): optionally, an additional variant This is provided to allow extensions.

Parameters:

self ( Wp.SiFactory ) –

the factory

Returns ( GLib.Variant ) –

the configuration description


Wp.SiFactory.prototype.get_config_spec

function Wp.SiFactory.prototype.get_config_spec(): {
    // javascript wrapper for 'wp_si_factory_get_config_spec'
}

Returns a description of all the configuration options that the constructed items of this factory have. Configuration options are a way for items to accept input from external sources that affects their behavior, or to provide output for other items to consume as their configuration.

The returned GVariant has the a(ssymv) type. This is an array of tuples, where each tuple has the following values, in order:

  • s (string): the name of the option
  • s (string): a GVariant type string, describing the type of the data
  • y (byte): a combination of Wp.SiConfigOptionFlags
  • mv (optional variant): optionally, an additional variant This is provided to allow extensions.

Parameters:

self ( Wp.SiFactory ) –

the factory

Returns ( GLib.Variant ) –

the configuration description


wp_si_factory_get_name

const gchar *
wp_si_factory_get_name (WpSiFactory * self)

Parameters:

self

the factory

Returns

the factory name


Wp.SiFactory.get_name

def Wp.SiFactory.get_name (self):
    #python wrapper for 'wp_si_factory_get_name'

Parameters:

self ( Wp.SiFactory ) –

the factory

Returns ( str ) –

the factory name


Wp.SiFactory.prototype.get_name

function Wp.SiFactory.prototype.get_name(): {
    // javascript wrapper for 'wp_si_factory_get_name'
}

Parameters:

self ( Wp.SiFactory ) –

the factory

Returns ( String ) –

the factory name


Functions

wp_si_factory_find

WpSiFactory *
wp_si_factory_find (WpCore * core,
                    const gchar * factory_name)

Parameters:

core

the core

factory_name

the lookup name

Returns ( [transfer: full] [nullable] ) –

the factory matching the lookup name


Wp.SiFactory.find

def Wp.SiFactory.find (core, factory_name):
    #python wrapper for 'wp_si_factory_find'

Parameters:

core ( Wp.Core ) –

the core

factory_name ( str ) –

the lookup name

Returns ( Wp.SiFactory ) –

the factory matching the lookup name


Wp.SiFactory.prototype.find

function Wp.SiFactory.prototype.find(core: Wp.Core, factory_name: String): {
    // javascript wrapper for 'wp_si_factory_find'
}

Parameters:

core ( Wp.Core ) –

the core

factory_name ( String ) –

the lookup name

Returns ( Wp.SiFactory ) –

the factory matching the lookup name


wp_si_factory_register

wp_si_factory_register (WpCore * core,
                        WpSiFactory * factory)

Registers the factory on the core.

Parameters:

core

the core

factory ( [transfer: full] ) –

the factory to register


Wp.SiFactory.register

def Wp.SiFactory.register (core, factory):
    #python wrapper for 'wp_si_factory_register'

Registers the factory on the core.

Parameters:

core ( Wp.Core ) –

the core

factory ( Wp.SiFactory ) –

the factory to register


Wp.SiFactory.prototype.register

function Wp.SiFactory.prototype.register(core: Wp.Core, factory: Wp.SiFactory): {
    // javascript wrapper for 'wp_si_factory_register'
}

Registers the factory on the core.

Parameters:

core ( Wp.Core ) –

the core

factory ( Wp.SiFactory ) –

the factory to register


Properties

name

“name” gchar *

Flags : Read / Write / Construct Only


name

“self.props.name” str

Flags : Read / Write / Construct Only


name

“name” String

Flags : Read / Write / Construct Only


Virtual Methods

construct

WpSessionItem *
construct (WpSiFactory * self)

Parameters:

self
No description available
Returns
No description available

do_construct

def do_construct (self):
    #python implementation of the 'construct' virtual method

Parameters:

self ( Wp.SiFactory ) –
No description available
Returns ( Wp.SessionItem ) –
No description available

vfunc_construct

function vfunc_construct(self: Wp.SiFactory): {
    // javascript implementation of the 'construct' virtual method
}

Parameters:

self ( Wp.SiFactory ) –
No description available
Returns ( Wp.SessionItem ) –
No description available

get_config_spec

GVariant *
get_config_spec (WpSiFactory * self)

Parameters:

self
No description available
Returns
No description available

do_get_config_spec

def do_get_config_spec (self):
    #python implementation of the 'get_config_spec' virtual method

Parameters:

self ( Wp.SiFactory ) –
No description available
Returns ( GLib.Variant ) –
No description available

vfunc_get_config_spec

function vfunc_get_config_spec(self: Wp.SiFactory): {
    // javascript implementation of the 'get_config_spec' virtual method
}

Parameters:

self ( Wp.SiFactory ) –
No description available
Returns ( GLib.Variant ) –
No description available

Constants

WP_TYPE_SI_FACTORY

#define WP_TYPE_SI_FACTORY (wp_si_factory_get_type ())

The WpSiFactory GType


The results of the search are