1.1 --- a/Frameworks/libpurple.framework/Versions/0.5.6/Headers/pluginpref.h Sun Jun 21 22:04:11 2009 -0400
1.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
1.3 @@ -1,269 +0,0 @@
1.4 -/**
1.5 - * @file pluginpref.h Plugin Preferences API
1.6 - * @ingroup core
1.7 - */
1.8 -
1.9 -/* purple
1.10 - *
1.11 - * Purple is the legal property of its developers, whose names are too numerous
1.12 - * to list here. Please refer to the COPYRIGHT file distributed with this
1.13 - * source distribution.
1.14 - *
1.15 - * This program is free software; you can redistribute it and/or modify
1.16 - * it under the terms of the GNU General Public License as published by
1.17 - * the Free Software Foundation; either version 2 of the License, or
1.18 - * (at your option) any later version.
1.19 - *
1.20 - * This program is distributed in the hope that it will be useful,
1.21 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
1.22 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1.23 - * GNU General Public License for more details.
1.24 - *
1.25 - * You should have received a copy of the GNU General Public License
1.26 - * along with this program; if not, write to the Free Software
1.27 - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
1.28 - *
1.29 - */
1.30 -#ifndef _PURPLE_PLUGINPREF_H_
1.31 -#define _PURPLE_PLUGINPREF_H_
1.32 -
1.33 -typedef struct _PurplePluginPrefFrame PurplePluginPrefFrame;
1.34 -typedef struct _PurplePluginPref PurplePluginPref;
1.35 -
1.36 -/**
1.37 - * String format for preferences.
1.38 - */
1.39 -typedef enum
1.40 -{
1.41 - PURPLE_STRING_FORMAT_TYPE_NONE = 0, /**< The string is plain text. */
1.42 - PURPLE_STRING_FORMAT_TYPE_MULTILINE = 1 << 0, /**< The string can have newlines. */
1.43 - PURPLE_STRING_FORMAT_TYPE_HTML = 1 << 1 /**< The string can be in HTML. */
1.44 -} PurpleStringFormatType;
1.45 -
1.46 -typedef enum {
1.47 - PURPLE_PLUGIN_PREF_NONE,
1.48 - PURPLE_PLUGIN_PREF_CHOICE,
1.49 - PURPLE_PLUGIN_PREF_INFO, /**< no-value label */
1.50 - PURPLE_PLUGIN_PREF_STRING_FORMAT /**< The preference has a string value. */
1.51 -} PurplePluginPrefType;
1.52 -
1.53 -#include <glib.h>
1.54 -#include "prefs.h"
1.55 -
1.56 -#ifdef __cplusplus
1.57 -extern "C" {
1.58 -#endif
1.59 -
1.60 -/**************************************************************************/
1.61 -/** @name Plugin Preference API */
1.62 -/**************************************************************************/
1.63 -/*@{*/
1.64 -
1.65 -/**
1.66 - * Create a new plugin preference frame
1.67 - *
1.68 - * @return a new PurplePluginPrefFrame
1.69 - */
1.70 -PurplePluginPrefFrame *purple_plugin_pref_frame_new(void);
1.71 -
1.72 -/**
1.73 - * Destroy a plugin preference frame
1.74 - *
1.75 - * @param frame The plugin frame to destroy
1.76 - */
1.77 -void purple_plugin_pref_frame_destroy(PurplePluginPrefFrame *frame);
1.78 -
1.79 -/**
1.80 - * Adds a plugin preference to a plugin preference frame
1.81 - *
1.82 - * @param frame The plugin frame to add the preference to
1.83 - * @param pref The preference to add to the frame
1.84 - */
1.85 -void purple_plugin_pref_frame_add(PurplePluginPrefFrame *frame, PurplePluginPref *pref);
1.86 -
1.87 -/**
1.88 - * Get the plugin preferences from a plugin preference frame
1.89 - *
1.90 - * @param frame The plugin frame to get the plugin preferences from
1.91 - * @constreturn a GList of plugin preferences
1.92 - */
1.93 -GList *purple_plugin_pref_frame_get_prefs(PurplePluginPrefFrame *frame);
1.94 -
1.95 -/**
1.96 - * Create a new plugin preference
1.97 - *
1.98 - * @return a new PurplePluginPref
1.99 - */
1.100 -PurplePluginPref *purple_plugin_pref_new(void);
1.101 -
1.102 -/**
1.103 - * Create a new plugin preference with name
1.104 - *
1.105 - * @param name The name of the pref
1.106 - * @return a new PurplePluginPref
1.107 - */
1.108 -PurplePluginPref *purple_plugin_pref_new_with_name(const char *name);
1.109 -
1.110 -/**
1.111 - * Create a new plugin preference with label
1.112 - *
1.113 - * @param label The label to be displayed
1.114 - * @return a new PurplePluginPref
1.115 - */
1.116 -PurplePluginPref *purple_plugin_pref_new_with_label(const char *label);
1.117 -
1.118 -/**
1.119 - * Create a new plugin preference with name and label
1.120 - *
1.121 - * @param name The name of the pref
1.122 - * @param label The label to be displayed
1.123 - * @return a new PurplePluginPref
1.124 - */
1.125 -PurplePluginPref *purple_plugin_pref_new_with_name_and_label(const char *name, const char *label);
1.126 -
1.127 -/**
1.128 - * Destroy a plugin preference
1.129 - *
1.130 - * @param pref The preference to destroy
1.131 - */
1.132 -void purple_plugin_pref_destroy(PurplePluginPref *pref);
1.133 -
1.134 -/**
1.135 - * Set a plugin pref name
1.136 - *
1.137 - * @param pref The plugin pref
1.138 - * @param name The name of the pref
1.139 - */
1.140 -void purple_plugin_pref_set_name(PurplePluginPref *pref, const char *name);
1.141 -
1.142 -/**
1.143 - * Get a plugin pref name
1.144 - *
1.145 - * @param pref The plugin pref
1.146 - * @return The name of the pref
1.147 - */
1.148 -const char *purple_plugin_pref_get_name(PurplePluginPref *pref);
1.149 -
1.150 -/**
1.151 - * Set a plugin pref label
1.152 - *
1.153 - * @param pref The plugin pref
1.154 - * @param label The label for the plugin pref
1.155 - */
1.156 -void purple_plugin_pref_set_label(PurplePluginPref *pref, const char *label);
1.157 -
1.158 -/**
1.159 - * Get a plugin pref label
1.160 - *
1.161 - * @param pref The plugin pref
1.162 - * @return The label for the plugin pref
1.163 - */
1.164 -const char *purple_plugin_pref_get_label(PurplePluginPref *pref);
1.165 -
1.166 -/**
1.167 - * Set the bounds for an integer pref
1.168 - *
1.169 - * @param pref The plugin pref
1.170 - * @param min The min value
1.171 - * @param max The max value
1.172 - */
1.173 -void purple_plugin_pref_set_bounds(PurplePluginPref *pref, int min, int max);
1.174 -
1.175 -/**
1.176 - * Get the bounds for an integer pref
1.177 - *
1.178 - * @param pref The plugin pref
1.179 - * @param min The min value
1.180 - * @param max The max value
1.181 - */
1.182 -void purple_plugin_pref_get_bounds(PurplePluginPref *pref, int *min, int *max);
1.183 -
1.184 -/**
1.185 - * Set the type of a plugin pref
1.186 - *
1.187 - * @param pref The plugin pref
1.188 - * @param type The type
1.189 - */
1.190 -void purple_plugin_pref_set_type(PurplePluginPref *pref, PurplePluginPrefType type);
1.191 -
1.192 -/**
1.193 - * Get the type of a plugin pref
1.194 - *
1.195 - * @param pref The plugin pref
1.196 - * @return The type
1.197 - */
1.198 -PurplePluginPrefType purple_plugin_pref_get_type(PurplePluginPref *pref);
1.199 -
1.200 -/**
1.201 - * Set the choices for a choices plugin pref
1.202 - *
1.203 - * @param pref The plugin pref
1.204 - * @param label The label for the choice
1.205 - * @param choice A gpointer of the choice
1.206 - */
1.207 -void purple_plugin_pref_add_choice(PurplePluginPref *pref, const char *label, gpointer choice);
1.208 -
1.209 -/**
1.210 - * Get the choices for a choices plugin pref
1.211 - *
1.212 - * @param pref The plugin pref
1.213 - * @constreturn GList of the choices
1.214 - */
1.215 -GList *purple_plugin_pref_get_choices(PurplePluginPref *pref);
1.216 -
1.217 -/**
1.218 - * Set the max length for a string plugin pref
1.219 - *
1.220 - * @param pref The plugin pref
1.221 - * @param max_length The max length of the string
1.222 - */
1.223 -void purple_plugin_pref_set_max_length(PurplePluginPref *pref, unsigned int max_length);
1.224 -
1.225 -/**
1.226 - * Get the max length for a string plugin pref
1.227 - *
1.228 - * @param pref The plugin pref
1.229 - * @return the max length
1.230 - */
1.231 -unsigned int purple_plugin_pref_get_max_length(PurplePluginPref *pref);
1.232 -
1.233 -/**
1.234 - * Sets the masking of a string plugin pref
1.235 - *
1.236 - * @param pref The plugin pref
1.237 - * @param mask The value to set
1.238 - */
1.239 -void purple_plugin_pref_set_masked(PurplePluginPref *pref, gboolean mask);
1.240 -
1.241 -/**
1.242 - * Gets the masking of a string plugin pref
1.243 - *
1.244 - * @param pref The plugin pref
1.245 - * @return The masking
1.246 - */
1.247 -gboolean purple_plugin_pref_get_masked(PurplePluginPref *pref);
1.248 -
1.249 -/**
1.250 - * Sets the format type for a formattable-string plugin pref. You need to set the
1.251 - * pref type to PURPLE_PLUGIN_PREF_STRING_FORMAT first before setting the format.
1.252 - *
1.253 - * @param pref The plugin pref
1.254 - * @param format The format of the string
1.255 - */
1.256 -void purple_plugin_pref_set_format_type(PurplePluginPref *pref, PurpleStringFormatType format);
1.257 -
1.258 -/**
1.259 - * Gets the format type of the formattable-string plugin pref.
1.260 - *
1.261 - * @param pref The plugin pref
1.262 - * @return The format of the pref
1.263 - */
1.264 -PurpleStringFormatType purple_plugin_pref_get_format_type(PurplePluginPref *pref);
1.265 -
1.266 -/*@}*/
1.267 -
1.268 -#ifdef __cplusplus
1.269 -}
1.270 -#endif
1.271 -
1.272 -#endif /* _PURPLE_PLUGINPREF_H_ */