pidgin: theme-manager.h File Reference

pidgin 2.14.4

Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs
theme-manager.h File Reference

Theme Manager API. More...

`#include <glib-object.h>`
`#include <glib.h>`
`#include "theme.h"`
`#include "theme-loader.h"`

Go to the source code of this file.

## Data Structures
struct | _PurpleThemeManager
struct | _PurpleThemeManagerClass

## Macros
#define | PURPLE_TYPE_THEME_MANAGER (purple_theme_manager_get_type())
#define | PURPLE_THEME_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_THEME_MANAGER, PurpleThemeManager))
#define | PURPLE_THEME_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_THEME_MANAGER, PurpleThemeManagerClass))
#define | PURPLE_IS_THEME_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_THEME_MANAGER))
#define | PURPLE_IS_THEME_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_THEME_MANAGER))
#define | PURPLE_GET_THEME_MANAGER_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_THEME_MANAGER, PurpleThemeManagerClass))

## Typedefs
typedef void(* | PTFunc) (PurpleTheme *)
typedef struct _PurpleThemeManager | PurpleThemeManager
typedef struct _PurpleThemeManagerClass | PurpleThemeManagerClass

## Functions
Purple Theme Manager API <br>
G_BEGIN_DECLS GType | purple_theme_manager_get_type (void)
| GObject foo.
void | purple_theme_manager_init (void)
| Initalizes the theme manager.
void | purple_theme_manager_uninit (void)
| Uninitalizes the manager then frees all the themes and loaders it is responsible for.
void | purple_theme_manager_refresh (void)
| Rebuilds all the themes in the theme manager.
PurpleTheme * | purple_theme_manager_find_theme (const gchar *name, const gchar *type)
| Finds the PurpleTheme object stored by the theme manager.
void | purple_theme_manager_add_theme (PurpleTheme *theme)
| Adds a PurpleTheme to the theme manager.
void | purple_theme_manager_remove_theme (PurpleTheme *theme)
| Removes a PurpleTheme from the theme manager and frees the theme.
void | purple_theme_manager_register_type (PurpleThemeLoader *loader)
| Adds a loader to the theme manager so it knows how to build themes.
void | purple_theme_manager_unregister_type (PurpleThemeLoader *loader)
| Removes the loader and all themes of the same type from the loader.
void | purple_theme_manager_for_each_theme (PTFunc func)
| Calls the given function on each purple theme.
PurpleTheme * | purple_theme_manager_load_theme (const gchar *theme_dir, const gchar *type)
| Loads a theme of the given type without adding it to the manager.

## Detailed Description

Theme Manager API.

Definition in file theme-manager.h.

## Macro Definition Documentation

## ◆ PURPLE_GET_THEME_MANAGER_CLASS

#define PURPLE_GET_THEME_MANAGER_CLASS | ( |  | obj | ) | (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_THEME_MANAGER, PurpleThemeManagerClass))

Definition at line 45 of file theme-manager.h.

## ◆ PURPLE_IS_THEME_MANAGER

#define PURPLE_IS_THEME_MANAGER | ( |  | obj | ) | (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_THEME_MANAGER))

Definition at line 43 of file theme-manager.h.

## ◆ PURPLE_IS_THEME_MANAGER_CLASS

#define PURPLE_IS_THEME_MANAGER_CLASS | ( |  | klass | ) | (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_THEME_MANAGER))

Definition at line 44 of file theme-manager.h.

## ◆ PURPLE_THEME_MANAGER

#define PURPLE_THEME_MANAGER | ( |  | obj | ) | (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_THEME_MANAGER, PurpleThemeManager))

Definition at line 41 of file theme-manager.h.

## ◆ PURPLE_THEME_MANAGER_CLASS

#define PURPLE_THEME_MANAGER_CLASS | ( |  | klass | ) | (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_THEME_MANAGER, PurpleThemeManagerClass))

Definition at line 42 of file theme-manager.h.

## ◆ PURPLE_TYPE_THEME_MANAGER

#define PURPLE_TYPE_THEME_MANAGER (purple_theme_manager_get_type())

Definition at line 40 of file theme-manager.h.

## Typedef Documentation

## ◆ PTFunc

typedef void(* PTFunc) (PurpleTheme *)

Definition at line 35 of file theme-manager.h.

## ◆ PurpleThemeManager

typedef struct _PurpleThemeManager PurpleThemeManager

Definition at line 37 of file theme-manager.h.

## ◆ PurpleThemeManagerClass

typedef struct _PurpleThemeManagerClass PurpleThemeManagerClass

Definition at line 38 of file theme-manager.h.

## Function Documentation

## ◆ purple_theme_manager_add_theme()

void purple_theme_manager_add_theme | ( | PurpleTheme * | theme | ) |

Adds a PurpleTheme to the theme manager.

If the theme already exists then this function does nothing.

Parameters

  theme | The PurpleTheme to add to the manager.

## ◆ purple_theme_manager_find_theme()

PurpleTheme * purple_theme_manager_find_theme | ( | const gchar * | name,
|  | const gchar * | type
| ) |  |

Finds the PurpleTheme object stored by the theme manager.

Parameters

  name | The name of the PurpleTheme.
  type | The type of the PurpleTheme.

Returns
  The PurpleTheme, or NULL if it wasn't found.

## ◆ purple_theme_manager_for_each_theme()

void purple_theme_manager_for_each_theme | ( | PTFunc | func | ) |

Calls the given function on each purple theme.

Parameters

  func | The PTFunc to be applied to each theme.

## ◆ purple_theme_manager_load_theme()

PurpleTheme * purple_theme_manager_load_theme | ( | const gchar * | theme_dir,
|  | const gchar * | type
| ) |  |

Loads a theme of the given type without adding it to the manager.

Parameters

  theme_dir | the directory of the theme to load
  type | the type of theme to load

## ◆ purple_theme_manager_refresh()

void purple_theme_manager_refresh | ( | void |  | ) |

Rebuilds all the themes in the theme manager.

(Removes all current themes but keeps the added loaders.)

## ◆ purple_theme_manager_register_type()

void purple_theme_manager_register_type | ( | PurpleThemeLoader * | loader | ) |

Adds a loader to the theme manager so it knows how to build themes.

Parameters

  loader | The PurpleThemeLoader to add.

## ◆ purple_theme_manager_remove_theme()

void purple_theme_manager_remove_theme | ( | PurpleTheme * | theme | ) |

Removes a PurpleTheme from the theme manager and frees the theme.

Parameters

  theme | The PurpleTheme to remove from the manager.

## ◆ purple_theme_manager_unregister_type()

void purple_theme_manager_unregister_type | ( | PurpleThemeLoader * | loader | ) |

Removes the loader and all themes of the same type from the loader.

Parameters

  loader | The PurpleThemeLoader to be removed.