Ags.Config

g Ags.Config Ags.Config GObject.Object GObject.Object GObject.Object->Ags.Config

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

get_instance ()

class

new ()

clear ()

get_value (group, key)

load_defaults ()

load_from_data (buffer, buffer_length)

load_from_file (filename)

save ()

set_value (group, key, value)

to_data (buffer, buffer_length)

Virtual Methods

Inherited:

GObject.Object (7)

do_get_value (group, key)

do_load_defaults ()

do_set_value (group, key, value)

Properties

None

Signals

Inherited:

GObject.Object (1)

Name

Short Description

get-value

The ::get-value signal notifies about value been getting.

load-defaults

The ::load-defaults signal notifies about loading defaults

set-value

The ::set-value signal notifies about value been setting.

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

build_id

str

r

flags

int

r

gobject

GObject.Object

r

key_file

GLib.KeyFile

r

obj_mutex

GLib.RecMutex

r

version

str

r

Class Details

class Ags.Config(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Ags.ConfigClass

classmethod get_instance()
Returns:

the config instance

Return type:

Ags.Config

Get config instance.

New in version 3.0.0.

classmethod new()
Returns:

the new Ags.Config.

Return type:

Ags.Config

Create a new instance of Ags.Config.

New in version 3.0.0.

clear()

Clears configuration.

New in version 3.0.0.

get_value(group, key)
Parameters:
  • group (str) – the config group identifier

  • key (str) – the key of the property

Returns:

the property’s value

Return type:

str

Retrieve config by group and key.

New in version 3.0.0.

load_defaults()

Load configuration from default values.

New in version 3.0.0.

load_from_data(buffer, buffer_length)
Parameters:
  • buffer (str) – the data buffer

  • buffer_length (int) – the size of the buffer

Read configuration in memory.

New in version 3.0.0.

load_from_file(filename)
Parameters:

filename (str) – the configuration file

Load configuration from filename.

New in version 3.0.0.

save()

Save configuration.

New in version 3.0.0.

set_value(group, key, value)
Parameters:
  • group (str) – the config group identifier

  • key (str) – the key of the property

  • value (str) – the value to set

Set config by group and key, applying value.

New in version 3.0.0.

to_data(buffer, buffer_length)
Parameters:
  • buffer (str) – the data buffer

  • buffer_length (int) – the size of the buffer

Save configuration.

New in version 3.0.0.

do_get_value(group, key) virtual
Parameters:
  • group (str) – the config group identifier

  • key (str) – the key of the property

Returns:

the property’s value

Return type:

str

Retrieve config by group and key.

New in version 3.0.0.

do_load_defaults() virtual

Load configuration from default values.

New in version 3.0.0.

do_set_value(group, key, value) virtual
Parameters:
  • group (str) – the config group identifier

  • key (str) – the key of the property

  • value (str) – the value to set

Set config by group and key, applying value.

New in version 3.0.0.

Signal Details

Ags.Config.signals.get_value(config, group, key)
Signal Name:

get-value

Flags:

RUN_LAST

Parameters:
  • config (Ags.Config) – The object which received the signal

  • group (str) – the group to retrieve from

  • key (str) – the key to get

Returns:

the value

Return type:

str

The ::get-value signal notifies about value been getting.

New in version 3.0.0.

Ags.Config.signals.load_defaults(config)
Signal Name:

load-defaults

Flags:

RUN_LAST

Parameters:

config (Ags.Config) – The object which received the signal

The ::load-defaults signal notifies about loading defaults

New in version 3.0.0.

Ags.Config.signals.set_value(config, group, key, value)
Signal Name:

set-value

Flags:

RUN_LAST

Parameters:
  • config (Ags.Config) – The object which received the signal

  • group (str) – the group to apply to

  • key (str) – the key to set

  • value (str) – the value to apply

The ::set-value signal notifies about value been setting.

New in version 3.0.0.