xsettings-common

## xsettings-common xsettings-common — |

## Synopsis

                XSettingsBuffer;
                XSettingsColor;
                XSettingsList;
                XSettingsSetting;
    enum        XSettingsType;
    enum        XSettingsResult;
    XSettingsSetting* xsettings_setting_copy    (XSettingsSetting *setting);
    void        xsettings_setting_free          (XSettingsSetting *setting);
    int         xsettings_setting_equal         (XSettingsSetting *setting_a,
                                                 XSettingsSetting *setting_b);
    void        xsettings_list_free             (XSettingsList *list);
    XSettingsList* xsettings_list_copy          (XSettingsList *list);
    XSettingsResult xsettings_list_insert       (XSettingsList **list,
                                                 XSettingsSetting *setting);
    XSettingsSetting* xsettings_list_lookup     (XSettingsList *list,
                                                 const char *name);
    XSettingsResult xsettings_list_delete       (XSettingsList **list,
                                                 const char *name);
    char        xsettings_byte_order            (void);
    #define     XSETTINGS_PAD                   (n,m)

## Description

## Details

### XSettingsBuffer

    typedef struct {
      char byte_order;
      size_t len;
      unsigned char *data;
      unsigned char *pos;
    } XSettingsBuffer;

### XSettingsColor

    typedef struct {
      unsigned short red, green, blue, alpha;
    } XSettingsColor;

### XSettingsList

    typedef struct {
      XSettingsSetting *setting;
      XSettingsList *next;
    } XSettingsList;

### XSettingsSetting

    typedef struct {
      char *name;
      XSettingsType type;

      union {
        int v_int;
        char *v_string;
        XSettingsColor v_color;
    } XSettingsSetting;

### enum XSettingsType

    typedef enum
    {
      XSETTINGS_TYPE_INT     = 0,
      XSETTINGS_TYPE_STRING  = 1,
      XSETTINGS_TYPE_COLOR   = 2,
      XSETTINGS_TYPE_NONE    = 0xff
    } XSettingsType;

### enum XSettingsResult

    typedef enum
    {
      XSETTINGS_SUCCESS,
      XSETTINGS_NO_MEM,
      XSETTINGS_ACCESS,
      XSETTINGS_FAILED,
      XSETTINGS_NO_ENTRY,
      XSETTINGS_DUPLICATE_ENTRY
    } XSettingsResult;

### xsettings_setting_copy ()

    XSettingsSetting* xsettings_setting_copy    (XSettingsSetting *setting);

`setting` : |
Returns : |

### xsettings_setting_free ()

    void        xsettings_setting_free          (XSettingsSetting *setting);

`setting` : |

### xsettings_setting_equal ()

    int         xsettings_setting_equal         (XSettingsSetting *setting_a,
                                                 XSettingsSetting *setting_b);

`setting_a` : |
`setting_b` : |
Returns : |

### xsettings_list_free ()

    void        xsettings_list_free             (XSettingsList *list);

`list` : |

### xsettings_list_copy ()

    XSettingsList* xsettings_list_copy          (XSettingsList *list);

`list` : |
Returns : |

### xsettings_list_insert ()

    XSettingsResult xsettings_list_insert       (XSettingsList **list,
                                                 XSettingsSetting *setting);

`list` : |
`setting` : |
Returns : |

### xsettings_list_lookup ()

    XSettingsSetting* xsettings_list_lookup     (XSettingsList *list,
                                                 const char *name);

`list` : |
`name` : |
Returns : |

### xsettings_list_delete ()

    XSettingsResult xsettings_list_delete       (XSettingsList **list,
                                                 const char *name);

`list` : |
`name` : |
Returns : |

### xsettings_byte_order ()

    char        xsettings_byte_order            (void);

Returns : |

### XSETTINGS_PAD()

    #define     XSETTINGS_PAD(n,m)

`n` : |
`m` : |