pluginpref.h

Go to the documentation of this file.
00001 
00006 /* purple
00007  *
00008  * Purple is the legal property of its developers, whose names are too numerous
00009  * to list here.  Please refer to the COPYRIGHT file distributed with this
00010  * source distribution.
00011  *
00012  * This program is free software; you can redistribute it and/or modify
00013  * it under the terms of the GNU General Public License as published by
00014  * the Free Software Foundation; either version 2 of the License, or
00015  * (at your option) any later version.
00016  *
00017  * This program is distributed in the hope that it will be useful,
00018  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020  * GNU General Public License for more details.
00021  *
00022  * You should have received a copy of the GNU General Public License
00023  * along with this program; if not, write to the Free Software
00024  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
00025  *
00026  */
00027 #ifndef _PURPLE_PLUGINPREF_H_
00028 #define _PURPLE_PLUGINPREF_H_
00029 
00030 typedef struct _PurplePluginPrefFrame       PurplePluginPrefFrame;
00031 typedef struct _PurplePluginPref            PurplePluginPref;
00032 
00036 typedef enum
00037 {
00038     PURPLE_STRING_FORMAT_TYPE_NONE      = 0,          
00039     PURPLE_STRING_FORMAT_TYPE_MULTILINE = 1 << 0,     
00040     PURPLE_STRING_FORMAT_TYPE_HTML      = 1 << 1      
00041 } PurpleStringFormatType;
00042 
00043 typedef enum {
00044     PURPLE_PLUGIN_PREF_NONE,
00045     PURPLE_PLUGIN_PREF_CHOICE,
00046     PURPLE_PLUGIN_PREF_INFO,              
00047     PURPLE_PLUGIN_PREF_STRING_FORMAT      
00048 } PurplePluginPrefType;
00049 
00050 #include <glib.h>
00051 #include "prefs.h"
00052 
00053 #ifdef __cplusplus
00054 extern "C" {
00055 #endif
00056 
00057 /**************************************************************************/
00059 /**************************************************************************/
00067 PurplePluginPrefFrame *purple_plugin_pref_frame_new(void);
00068 
00074 void purple_plugin_pref_frame_destroy(PurplePluginPrefFrame *frame);
00075 
00082 void purple_plugin_pref_frame_add(PurplePluginPrefFrame *frame, PurplePluginPref *pref);
00083 
00090 GList *purple_plugin_pref_frame_get_prefs(PurplePluginPrefFrame *frame);
00091 
00097 PurplePluginPref *purple_plugin_pref_new(void);
00098 
00105 PurplePluginPref *purple_plugin_pref_new_with_name(const char *name);
00106 
00113 PurplePluginPref *purple_plugin_pref_new_with_label(const char *label);
00114 
00122 PurplePluginPref *purple_plugin_pref_new_with_name_and_label(const char *name, const char *label);
00123 
00129 void purple_plugin_pref_destroy(PurplePluginPref *pref);
00130 
00137 void purple_plugin_pref_set_name(PurplePluginPref *pref, const char *name);
00138 
00145 const char *purple_plugin_pref_get_name(PurplePluginPref *pref);
00146 
00153 void purple_plugin_pref_set_label(PurplePluginPref *pref, const char *label);
00154 
00161 const char *purple_plugin_pref_get_label(PurplePluginPref *pref);
00162 
00170 void purple_plugin_pref_set_bounds(PurplePluginPref *pref, int min, int max);
00171 
00179 void purple_plugin_pref_get_bounds(PurplePluginPref *pref, int *min, int *max);
00180 
00187 void purple_plugin_pref_set_type(PurplePluginPref *pref, PurplePluginPrefType type);
00188 
00195 PurplePluginPrefType purple_plugin_pref_get_type(PurplePluginPref *pref);
00196 
00204 void purple_plugin_pref_add_choice(PurplePluginPref *pref, const char *label, gpointer choice);
00205 
00212 GList *purple_plugin_pref_get_choices(PurplePluginPref *pref);
00213 
00220 void purple_plugin_pref_set_max_length(PurplePluginPref *pref, unsigned int max_length);
00221 
00228 unsigned int purple_plugin_pref_get_max_length(PurplePluginPref *pref);
00229 
00236 void purple_plugin_pref_set_masked(PurplePluginPref *pref, gboolean mask);
00237 
00244 gboolean purple_plugin_pref_get_masked(PurplePluginPref *pref);
00245 
00253 void purple_plugin_pref_set_format_type(PurplePluginPref *pref, PurpleStringFormatType format);
00254 
00261 PurpleStringFormatType purple_plugin_pref_get_format_type(PurplePluginPref *pref);
00262 
00265 #ifdef __cplusplus
00266 }
00267 #endif
00268 
00269 #endif /* _PURPLE_PLUGINPREF_H_ */