Data Fields
_PurplePrefsUiOps Struct Reference

Prefs UI operations. More...

`#include <prefs.h>`

## Data Fields
void(* | add_none )(const char *name)
void(* | add_bool )(const char *name, gboolean value)
void(* | add_int )(const char *name, int value)
void(* | add_string )(const char *name, const char *value)
void(* | add_string_list )(const char *name, GList *value)
void(* | set_bool )(const char *name, gboolean value)
void(* | set_int )(const char *name, int value)
void(* | set_string )(const char *name, const char *value)
void(* | set_string_list )(const char *name, GList *value)
gboolean(* | get_bool )(const char *name)
int(* | get_int )(const char *name)
const char *(* | get_string )(const char *name)
GList *(* | get_string_list )(const char *name)
PurplePrefType(* | get_type )(const char *name)
GList *(* | get_children_names )(const char *name)
gboolean(* | exists )(const char *name)
void(* | remove )(const char *name)
void(* | rename )(const char *oldname, const char *newname)
void(* | rename_boolean_toggle )(const char *oldname, const char *newname)
gboolean(* | load )(void)
void(* | save )(void)
void(* | schedule_save )(void)
void *(* | connect_callback )(const char *name, PurplePrefCallbackData *data)
| Called when a callback is added to a preference. More...
void(* | disconnect_callback )(const char *name, void *ui_data)
| Called when a callback is removed from a preference. More...
void(* | _purple_reserved1 )(void)
void(* | _purple_reserved2 )(void)
void(* | _purple_reserved3 )(void)
void(* | _purple_reserved4 )(void)
void(* | _purple_reserved5 )(void)

## Detailed Description

Prefs UI operations.

This allows overriding the prefs.xml storage with anything else.

Unless specified otherwise, each entry provides an implementation for the corresponding purple_prefs_* method, and disables the prefs.xml code for it. This means that to do anything useful, all the methods must be implemented.

Since
  2.11.0

Definition at line 87 of file prefs.h.

## Field Documentation

## ◆ connect_callback

void*(* _PurplePrefsUiOps::connect_callback) (const char *name, PurplePrefCallbackData *data)

Called when a callback is added to a preference.

The UI must keep track of it and call purple_prefs_trigger_callback_object with the data attribute.

Parameters

  name | The preference name.
  data | The object to be passed when triggering the callback

Returns
  A pointer to a ui_data object.

Definition at line 127 of file prefs.h.

## ◆ disconnect_callback

void(* _PurplePrefsUiOps::disconnect_callback) (const char *name, void *ui_data)

Called when a callback is removed from a preference.

The ui_data object is the one returned from connect_callback.

Parameters

  name | The preference name
  ui_data | The object that was returned from the connect_callback UI OP.

Definition at line 137 of file prefs.h.

The documentation for this struct was generated from the following file:

- prefs.h