Frameworks/libpurple.framework/Versions/0.6.2/Headers/theme-loader.h
author Zachary West <zacw@adium.im>
Fri Aug 21 13:25:11 2009 -0700 (2009-08-21)
changeset 2592 e8d15275025e
parent 2069 Frameworks/libpurple.framework/Versions/0.6.0/Headers/theme-loader.h@1346acdb9a2b
permissions -rw-r--r--
im.pidgin.adium.1-4 at 267c6165e02e34318a1823960bd04c0639952f73
zacw@1739
     1
/**
zacw@1739
     2
 * @file theme-loader.h  Purple Theme Loader Abstact Class API
zacw@1739
     3
 */
zacw@1739
     4
zacw@1739
     5
/* purple
zacw@1739
     6
 *
zacw@1739
     7
 * Purple is the legal property of its developers, whose names are too numerous
zacw@1739
     8
 * to list here.  Please refer to the COPYRIGHT file distributed with this
zacw@1739
     9
 * source distribution.
zacw@1739
    10
 *
zacw@1739
    11
 * This program is free software; you can redistribute it and/or modify
zacw@1739
    12
 * it under the terms of the GNU General Public License as published by
zacw@1739
    13
 * the Free Software Foundation; either version 2 of the License, or
zacw@1739
    14
 * (at your option) any later version.
zacw@1739
    15
 *
zacw@1739
    16
 * This program is distributed in the hope that it will be useful,
zacw@1739
    17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
zacw@1739
    18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
zacw@1739
    19
 * GNU General Public License for more details.
zacw@1739
    20
 *
zacw@1739
    21
 * You should have received a copy of the GNU General Public License
zacw@1739
    22
 * along with this program; if not, write to the Free Software
zacw@1739
    23
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
zacw@1739
    24
 */
zacw@1739
    25
zacw@1739
    26
#ifndef PURPLE_THEME_LOADER_H
zacw@1739
    27
#define PURPLE_THEME_LOADER_H
zacw@1739
    28
zacw@1739
    29
#include <glib.h>
zacw@1739
    30
#include <glib-object.h>
zacw@1739
    31
#include "theme.h"
zacw@1739
    32
zacw@1739
    33
/**
zacw@1739
    34
 * A purple theme loader.
zacw@1739
    35
 * This is an abstract class for Purple to use with the Purple theme manager.
zacw@1739
    36
 * The loader is responsible for building each type of theme
zacw@1739
    37
 *
zacw@1739
    38
 * PurpleThemeLoader is a GObject.
zacw@1739
    39
 */
zacw@1739
    40
typedef struct _PurpleThemeLoader        PurpleThemeLoader;
zacw@1739
    41
typedef struct _PurpleThemeLoaderClass   PurpleThemeLoaderClass;
zacw@1739
    42
zacw@1739
    43
#define PURPLE_TYPE_THEME_LOADER            (purple_theme_loader_get_type())
zacw@1739
    44
#define PURPLE_THEME_LOADER(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj), PURPLE_TYPE_THEME_LOADER, PurpleThemeLoader))
zacw@1739
    45
#define PURPLE_THEME_LOADER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), PURPLE_TYPE_THEME_LOADER, PurpleThemeLoaderClass))
zacw@1739
    46
#define PURPLE_IS_THEME_LOADER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), PURPLE_TYPE_THEME_LOADER))
zacw@1739
    47
#define PURPLE_IS_THEME_LOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_THEME_LOADER))
zacw@1739
    48
#define PURPLE_THEME_LOADER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_THEME_LOADER, PurpleThemeLoaderClass))
zacw@1739
    49
zacw@1739
    50
struct _PurpleThemeLoader
zacw@1739
    51
{
zacw@1739
    52
	GObject parent;
zacw@1739
    53
	gpointer priv;
zacw@1739
    54
};
zacw@1739
    55
zacw@1739
    56
struct _PurpleThemeLoaderClass
zacw@1739
    57
{
zacw@1739
    58
	GObjectClass parent_class;
zacw@1739
    59
	PurpleTheme *((*purple_theme_loader_build)(const gchar*));
zacw@1739
    60
};
zacw@1739
    61
zacw@1739
    62
/**************************************************************************/
zacw@1739
    63
/** @name Purple Theme-Loader API                                         */
zacw@1739
    64
/**************************************************************************/
zacw@1739
    65
G_BEGIN_DECLS
zacw@1739
    66
zacw@1739
    67
/**
zacw@1739
    68
 * GObject foo.
zacw@1739
    69
 * @internal.
zacw@1739
    70
 */
zacw@1739
    71
GType purple_theme_loader_get_type(void);
zacw@1739
    72
zacw@1739
    73
/**
zacw@1739
    74
 * Returns the string represtenting the type of the theme loader
zacw@1739
    75
 *
zacw@1739
    76
 * @param self The theme loader
zacw@1739
    77
 *
zacw@1739
    78
 * @returns The string represting this type
zacw@1739
    79
 */
zacw@1739
    80
const gchar *purple_theme_loader_get_type_string(PurpleThemeLoader *self);
zacw@1739
    81
zacw@1739
    82
/**
zacw@1739
    83
 * Creates a new PurpleTheme
zacw@1739
    84
 *
zacw@2069
    85
 * @param loader The theme loader
zacw@2069
    86
 * @param dir    The directory containing the theme
zacw@1739
    87
 *
zacw@1739
    88
 * @returns A PurpleTheme containing the information from the directory
zacw@1739
    89
 */
zacw@1739
    90
PurpleTheme *purple_theme_loader_build(PurpleThemeLoader *loader, const gchar *dir);
zacw@1739
    91
zacw@1739
    92
G_END_DECLS
zacw@1739
    93
#endif /* PURPLE_THEME_LOADER_H */