Maliit settings misc

Maliit settings misc — miscellaneous setting functions and types

Stability Level

Stable, unless otherwise indicated

Synopsis

#include <maliit/maliitsettingdata.h>

enum                MaliitSettingsEntryType;
#define             MALIIT_SETTING_DEFAULT_VALUE
#define             MALIIT_SETTING_VALUE_DOMAIN
#define             MALIIT_SETTING_VALUE_DOMAIN_DESCRIPTIONS
#define             MALIIT_SETTING_VALUE_RANGE_MAX
#define             MALIIT_SETTING_VALUE_RANGE_MIN
gboolean            maliit_validate_setting_value       (MaliitSettingsEntryType type,
                                                         GHashTable *attributes,
                                                         GVariant *value);

Object Hierarchy

  GEnum
   +----MaliitSettingsEntryType

Description

Here MaliitSettingsEntryType, attribute keys and maliit_validate_setting_value() are specified.

Details

enum MaliitSettingsEntryType

typedef enum {
    MALIIT_STRING_TYPE      = 1,
    MALIIT_INT_TYPE         = 2,
    MALIIT_BOOL_TYPE        = 3,
    MALIIT_STRING_LIST_TYPE = 4,
    MALIIT_INT_LIST_TYPE    = 5
} MaliitSettingsEntryType;

This enum describes type of settings entry.

MALIIT_STRING_TYPE

Entry is a string.

MALIIT_INT_TYPE

Entry is an integer.

MALIIT_BOOL_TYPE

Entry is a boolean.

MALIIT_STRING_LIST_TYPE

Entry is a list of strings.

MALIIT_INT_LIST_TYPE

Entry is a list of integers.

MALIIT_SETTING_DEFAULT_VALUE

#define MALIIT_SETTING_DEFAULT_VALUE "defaultValue"

Name of setting entry attribute which holds the default value for a setting entry.


MALIIT_SETTING_VALUE_DOMAIN

#define MALIIT_SETTING_VALUE_DOMAIN "valueDomain"

Name of setting entry attribute which holds the list of values that can be assigned to the entry.


MALIIT_SETTING_VALUE_DOMAIN_DESCRIPTIONS

#define MALIIT_SETTING_VALUE_DOMAIN_DESCRIPTIONS "valueDomainDescriptions"

Name of setting entry attribute which holds the descriptions for the values in MALIIT_SETTING_VALUE_DOMAIN().


MALIIT_SETTING_VALUE_RANGE_MAX

#define MALIIT_SETTING_VALUE_RANGE_MAX "valueRangeMax"

Name of setting entry attribute which holds the maximum valid value (inclusive) for an integer property.


MALIIT_SETTING_VALUE_RANGE_MIN

#define MALIIT_SETTING_VALUE_RANGE_MIN "valueRangeMin"

Name of setting entry attribute which holds the minimum valid value (inclusive) for an integer property.


maliit_validate_setting_value ()

gboolean            maliit_validate_setting_value       (MaliitSettingsEntryType type,
                                                         GHashTable *attributes,
                                                         GVariant *value);

Validate the value for a plugin setting entry.

type :

a MaliitSettingsEntryType to validate against.

attributes :

Attributes to validate. [transfer none][element-type utf8 GLib.Variant]

value :

A GVariant to validate. [transfer none]

Returns :

TRUE if value and attributes are valid for given type.

See Also

MaliitSettingsEntry, MaliitPluginSettings