A11yProfileManagerProfile

A11yProfileManagerProfile — This object represents an accessibility profile.

Functions

Properties

gchar * at-command Read
gchar * description Read
gchar * dir-name Read
gboolean indicator-toggle Read / Write
gchar * monitor-key Read
gchar * monitor-schema Read
gchar * name Read
gboolean valid Read

Types and Values

Object Hierarchy

    GObject
    ╰── A11yProfileManagerProfile

Description

An accessibility profile represents a group of settings that can be enabled to provide a better experience for a user with a disability. An accessibility profile can be associated with an assistive technology service such as the Orca Screen reader if desired.

Only one accessibility profile can be enabled at a time, as the same setting may be present in multiple profiles, and have multiple different values accross different profiles. The accessibility profile manager library currently only supports GSettings for profile configuration at this time.

Functions

a11y_profile_manager_profile_validate ()

void
a11y_profile_manager_profile_validate (A11yProfileManagerProfile *self,
                                       GError **error);

Validates the profile manifest and gsettings files found in the profile directory given at object creation time. If required manifest data is not present, or the GSettings data is invalid, #error will be set to ProfileError.

The validity of the profile can be checked with #a11y_profile_manager_profile_get_valid().

Parameters

self

the A11yProfileManagerProfile instance

 

error

location to store the error occurring, or NULL to ignore

 

Since: 0.1


a11y_profile_manager_profile_set_settings ()

void
a11y_profile_manager_profile_set_settings
                               (A11yProfileManagerProfile *self,
                                GError **error);

Sets the settings as per the profile GSettings file.

Parameters

self

the A11yProfileManagerProfile instance

 

error

location to store the error occurring, or NULL to ignore

 

Since: 0.1


a11y_profile_manager_profile_reset_settings ()

void
a11y_profile_manager_profile_reset_settings
                               (A11yProfileManagerProfile *self,
                                GError **error);

Resets the settings given in the profile GSettings file to defaults.

Parameters

self

the A11yProfileManagerProfile instance

 

error

location to store the error occurring, or NULL to ignore

 

Since: 0.1


a11y_profile_manager_profile_write_dconf_file ()

void
a11y_profile_manager_profile_write_dconf_file
                               (A11yProfileManagerProfile *self,
                                const gchar *file,
                                GError **error);

Writes the gsettings data in the profile to a format that is consumable by the dconf command-line utility. The file can be used with 'dconf compile' to create a dconf database with profile settings.

Parameters

self

the A11yProfileManagerProfile instance

 

file

 .

A file to write the dconf data to.

.

[in]

error

location to store the error occurring, or NULL to ignore

 

Since: 0.1.2


a11y_profile_manager_profile_new ()

A11yProfileManagerProfile *
a11y_profile_manager_profile_new (const gchar *profile_dir);

Creates a new accessibility profile object.

Parameters

profile_dir

 .

The profile directory name relative to the profiles directory.

.

[in]

Returns

A new Profile

Since: 0.1


a11y_profile_manager_profile_get_dir_name ()

const gchar *
a11y_profile_manager_profile_get_dir_name
                               (A11yProfileManagerProfile *self);

Get and return the current value of the "dir-name" property.

The directory where the profile files are stored, relative to the profiles directory.

Parameters

self

the A11yProfileManagerProfile instance to query

 

Returns

the value of the "dir-name" property

Since: 0.1


a11y_profile_manager_profile_get_name ()

const gchar *
a11y_profile_manager_profile_get_name (A11yProfileManagerProfile *self);

Get and return the current value of the "name" property.

The name of the accessibility profile, as per the manifest file.

Parameters

self

the A11yProfileManagerProfile instance to query

 

Returns

the value of the "name" property

Since: 0.1


a11y_profile_manager_profile_get_description ()

const gchar *
a11y_profile_manager_profile_get_description
                               (A11yProfileManagerProfile *self);

Get and return the current value of the "description" property.

The description of the accessibility profile, as per the manifest file.

Parameters

self

the A11yProfileManagerProfile instance to query

 

Returns

the value of the "description" property

Since: 0.1


a11y_profile_manager_profile_get_monitor_schema ()

const gchar *
a11y_profile_manager_profile_get_monitor_schema
                               (A11yProfileManagerProfile *self);

Get and return the current value of the "monitor-schema" property.

The GSettings schema to subscribe to for change events, as per the manifest file.

Parameters

self

the A11yProfileManagerProfile instance to query

 

Returns

the value of the "monitor-schema" property

Since: 0.1


a11y_profile_manager_profile_get_monitor_key ()

const gchar *
a11y_profile_manager_profile_get_monitor_key
                               (A11yProfileManagerProfile *self);

Get and return the current value of the "monitor-key" property.

THe GSettings key associated with the GSettings schema to monitor, as per the manifest file.

Parameters

self

the A11yProfileManagerProfile instance to query

 

Returns

the value of the "monitor-key" property

Since: 0.1


a11y_profile_manager_profile_get_at_command ()

const gchar *
a11y_profile_manager_profile_get_at_command
                               (A11yProfileManagerProfile *self);

Get and return the current value of the "at-command" property.

The command to execute to run an assistive technology that best works with this profile.

Parameters

self

the A11yProfileManagerProfile instance to query

 

Returns

the value of the "at-command" property

Since: 0.1.2


a11y_profile_manager_profile_get_valid ()

gboolean
a11y_profile_manager_profile_get_valid
                               (A11yProfileManagerProfile *self);

Get and return the current value of the "valid" property.

The validity of the accessibility profile, whether the GSettings exist, the manifest is valid, whether settings values are the correct value type, etc.

Parameters

self

the A11yProfileManagerProfile instance to query

 

Returns

the value of the "valid" property

Since: 0.1


a11y_profile_manager_profile_get_indicator_toggle ()

gboolean
a11y_profile_manager_profile_get_indicator_toggle
                               (A11yProfileManagerProfile *self);

Get and return the current value of the "indicator-toggle" property.

Used to toggle the state of the accessibility profiles indicator. Set to true if writing out profile data to a file for use with dconf.

Parameters

self

the A11yProfileManagerProfile instance to query

 

Returns

the value of the "indicator-toggle" property

Since: 0.1.11


a11y_profile_manager_profile_set_indicator_toggle ()

void
a11y_profile_manager_profile_set_indicator_toggle
                               (A11yProfileManagerProfile *self,
                                gboolean value);

Set the value of the "indicator-toggle" property to value .

Used to toggle the state of the accessibility profiles indicator. Set to true if writing out profile data to a file for use with dconf.

Parameters

self

the A11yProfileManagerProfile instance to modify

 

value

the new value of the "indicator-toggle" property

 

Since: 0.1.11

Types and Values

A11Y_PROFILE_MANAGER_TYPE_PROFILE

#define A11Y_PROFILE_MANAGER_TYPE_PROFILE (a11y_profile_manager_profile_get_type ())

The type for A11yProfileManagerProfile.


struct A11yProfileManagerProfile

struct A11yProfileManagerProfile;

This object represents an accessibility profile.

An accessibility profile represents a group of settings that can be enabled to provide a better experience for a user with a disability. An accessibility profile can be associated with an assistive technology service such as the Orca Screen reader if desired.

Only one accessibility profile can be enabled at a time, as the same setting may be present in multiple profiles, and have multiple different values accross different profiles. The accessibility profile manager library currently only supports GSettings for profile configuration at this time.

Since: 0.1


struct A11yProfileManagerProfileClass

struct A11yProfileManagerProfileClass {
	GObjectClass parent_class;
};

The class structure for A11Y_PROFILE_MANAGER_TYPE_PROFILE. All the fields in this structure are private and should never be accessed directly.

Members


enum A11yProfileManagerProfileError

Errors which can be thrown when attempting to activate an accessibility profile.

Members

A11Y_PROFILE_MANAGER_PROFILE_ERROR_NO_PROFILE_GROUP

No profile group in manifest file:

 

A11Y_PROFILE_MANAGER_PROFILE_ERROR_NO_NAME_ENTRY

No name entry in profile group.

 

A11Y_PROFILE_MANAGER_PROFILE_ERROR_NO_DESCRIPTION_ENTRY

No description entry in profile group.

 

A11Y_PROFILE_MANAGER_PROFILE_ERROR_INVALID_ENTRY

Invalid manifest entry.

 

A11Y_PROFILE_MANAGER_PROFILE_ERROR_NO_SUCH_MONITOR_SCHEMA

No such assistive technology monitor schema.

 

A11Y_PROFILE_MANAGER_PROFILE_ERROR_SCHEMA_WITHOUT_KEY

A schema was specified, but no key.

 

A11Y_PROFILE_MANAGER_PROFILE_ERROR_NO_SUCH_MONITOR_KEY

No such assistive technology monitor key.

 

A11Y_PROFILE_MANAGER_PROFILE_ERROR_NO_GSETTINGS_FILES_FOUND

No gsettings files found.

 

A11Y_PROFILE_MANAGER_PROFILE_ERROR_SCHEMA_NOT_RELOCATABLE

Schema is not relocatable.

 

A11Y_PROFILE_MANAGER_PROFILE_ERROR_NO_SUCH_KEY

Key does not exist in schema.

 

A11Y_PROFILE_MANAGER_PROFILE_ERROR_INVALID_SCHEMA_PATH

Invalid schema path.

 

A11Y_PROFILE_MANAGER_PROFILE_ERROR_INVALID_KEY_TYPE

Invalid key type.

 

Since: 0.1

Property Details

The “at-command” property

  “at-command”               gchar *

The command to execute to run an assistive technology that best works with this profile.

Owner: A11yProfileManagerProfile

Flags: Read

Default value: NULL

Since: 0.1.2


The “description” property

  “description”              gchar *

The description of the accessibility profile, as per the manifest file.

Owner: A11yProfileManagerProfile

Flags: Read

Default value: NULL

Since: 0.1


The “dir-name” property

  “dir-name”                 gchar *

The directory where the profile files are stored, relative to the profiles directory.

Owner: A11yProfileManagerProfile

Flags: Read

Default value: NULL

Since: 0.1


The “indicator-toggle” property

  “indicator-toggle”         gboolean

Used to toggle the state of the accessibility profiles indicator. Set to true if writing out profile data to a file for use with dconf.

Owner: A11yProfileManagerProfile

Flags: Read / Write

Default value: FALSE

Since: 0.1.11


The “monitor-key” property

  “monitor-key”              gchar *

THe GSettings key associated with the GSettings schema to monitor, as per the manifest file.

Owner: A11yProfileManagerProfile

Flags: Read

Default value: NULL

Since: 0.1


The “monitor-schema” property

  “monitor-schema”           gchar *

The GSettings schema to subscribe to for change events, as per the manifest file.

Owner: A11yProfileManagerProfile

Flags: Read

Default value: NULL

Since: 0.1


The “name” property

  “name”                     gchar *

The name of the accessibility profile, as per the manifest file.

Owner: A11yProfileManagerProfile

Flags: Read

Default value: NULL

Since: 0.1


The “valid” property

  “valid”                    gboolean

The validity of the accessibility profile, whether the GSettings exist, the manifest is valid, whether settings values are the correct value type, etc.

Owner: A11yProfileManagerProfile

Flags: Read

Default value: FALSE

Since: 0.1