libpurple/pluginpref.h

branch
gtkdoc-conversion
changeset 35397
31fa3a1aeff5
parent 35394
38facb8226d4
child 35440
467bb21b82a1
child 37040
91119588bc3a
equal deleted inserted replaced
35396:7bfe75a37af7 35397:31fa3a1aeff5
29 29
30 typedef struct _PurplePluginPrefFrame PurplePluginPrefFrame; 30 typedef struct _PurplePluginPrefFrame PurplePluginPrefFrame;
31 typedef struct _PurplePluginPref PurplePluginPref; 31 typedef struct _PurplePluginPref PurplePluginPref;
32 32
33 /** 33 /**
34 * PurpleStringFormatType:
35 * @PURPLE_STRING_FORMAT_TYPE_NONE: The string is plain text.
36 * @PURPLE_STRING_FORMAT_TYPE_MULTILINE: The string can have newlines.
37 * @PURPLE_STRING_FORMAT_TYPE_HTML: The string can be in HTML.
38 *
34 * String format for preferences. 39 * String format for preferences.
35 */ 40 */
36 typedef enum 41 typedef enum
37 { 42 {
38 PURPLE_STRING_FORMAT_TYPE_NONE = 0, /**< The string is plain text. */ 43 PURPLE_STRING_FORMAT_TYPE_NONE = 0,
39 PURPLE_STRING_FORMAT_TYPE_MULTILINE = 1 << 0, /**< The string can have newlines. */ 44 PURPLE_STRING_FORMAT_TYPE_MULTILINE = 1 << 0,
40 PURPLE_STRING_FORMAT_TYPE_HTML = 1 << 1 /**< The string can be in HTML. */ 45 PURPLE_STRING_FORMAT_TYPE_HTML = 1 << 1
41 } PurpleStringFormatType; 46 } PurpleStringFormatType;
42 47
48 /**
49 * PurplePluginPrefType:
50 * @PURPLE_PLUGIN_PREF_INFO: no-value label
51 * @PURPLE_PLUGIN_PREF_STRING_FORMAT: The preference has a string value.
52 */
43 typedef enum { 53 typedef enum {
44 PURPLE_PLUGIN_PREF_NONE, 54 PURPLE_PLUGIN_PREF_NONE,
45 PURPLE_PLUGIN_PREF_CHOICE, 55 PURPLE_PLUGIN_PREF_CHOICE,
46 PURPLE_PLUGIN_PREF_INFO, /**< no-value label */ 56 PURPLE_PLUGIN_PREF_INFO,
47 PURPLE_PLUGIN_PREF_STRING_FORMAT /**< The preference has a string value. */ 57 PURPLE_PLUGIN_PREF_STRING_FORMAT
48 } PurplePluginPrefType; 58 } PurplePluginPrefType;
49 59
50 #include <glib.h> 60 #include <glib.h>
51 #include "prefs.h" 61 #include "prefs.h"
52 62
56 /** @name Plugin Preference API */ 66 /** @name Plugin Preference API */
57 /**************************************************************************/ 67 /**************************************************************************/
58 /*@{*/ 68 /*@{*/
59 69
60 /** 70 /**
71 * purple_plugin_pref_frame_new:
72 *
61 * Create a new plugin preference frame 73 * Create a new plugin preference frame
62 * 74 *
63 * Returns: a new PurplePluginPrefFrame 75 * Returns: a new PurplePluginPrefFrame
64 */ 76 */
65 PurplePluginPrefFrame *purple_plugin_pref_frame_new(void); 77 PurplePluginPrefFrame *purple_plugin_pref_frame_new(void);
66 78
67 /** 79 /**
80 * purple_plugin_pref_frame_destroy:
81 * @frame: The plugin frame to destroy
82 *
68 * Destroy a plugin preference frame 83 * Destroy a plugin preference frame
69 *
70 * @frame: The plugin frame to destroy
71 */ 84 */
72 void purple_plugin_pref_frame_destroy(PurplePluginPrefFrame *frame); 85 void purple_plugin_pref_frame_destroy(PurplePluginPrefFrame *frame);
73 86
74 /** 87 /**
75 * Adds a plugin preference to a plugin preference frame 88 * purple_plugin_pref_frame_add:
76 *
77 * @frame: The plugin frame to add the preference to 89 * @frame: The plugin frame to add the preference to
78 * @pref: The preference to add to the frame 90 * @pref: The preference to add to the frame
91 *
92 * Adds a plugin preference to a plugin preference frame
79 */ 93 */
80 void purple_plugin_pref_frame_add(PurplePluginPrefFrame *frame, PurplePluginPref *pref); 94 void purple_plugin_pref_frame_add(PurplePluginPrefFrame *frame, PurplePluginPref *pref);
81 95
82 /** 96 /**
97 * purple_plugin_pref_frame_get_prefs:
98 * @frame: The plugin frame to get the plugin preferences from
99 *
83 * Get the plugin preferences from a plugin preference frame 100 * Get the plugin preferences from a plugin preference frame
84 * 101 *
85 * @frame: The plugin frame to get the plugin preferences from
86 * Returns: (transfer none): a GList of plugin preferences 102 * Returns: (transfer none): a GList of plugin preferences
87 */ 103 */
88 GList *purple_plugin_pref_frame_get_prefs(PurplePluginPrefFrame *frame); 104 GList *purple_plugin_pref_frame_get_prefs(PurplePluginPrefFrame *frame);
89 105
90 /** 106 /**
107 * purple_plugin_pref_new:
108 *
91 * Create a new plugin preference 109 * Create a new plugin preference
92 * 110 *
93 * Returns: a new PurplePluginPref 111 * Returns: a new PurplePluginPref
94 */ 112 */
95 PurplePluginPref *purple_plugin_pref_new(void); 113 PurplePluginPref *purple_plugin_pref_new(void);
96 114
97 /** 115 /**
116 * purple_plugin_pref_new_with_name:
117 * @name: The name of the pref
118 *
98 * Create a new plugin preference with name 119 * Create a new plugin preference with name
99 * 120 *
100 * @name: The name of the pref
101 * Returns: a new PurplePluginPref 121 * Returns: a new PurplePluginPref
102 */ 122 */
103 PurplePluginPref *purple_plugin_pref_new_with_name(const char *name); 123 PurplePluginPref *purple_plugin_pref_new_with_name(const char *name);
104 124
105 /** 125 /**
126 * purple_plugin_pref_new_with_label:
127 * @label: The label to be displayed
128 *
106 * Create a new plugin preference with label 129 * Create a new plugin preference with label
107 * 130 *
108 * @label: The label to be displayed
109 * Returns: a new PurplePluginPref 131 * Returns: a new PurplePluginPref
110 */ 132 */
111 PurplePluginPref *purple_plugin_pref_new_with_label(const char *label); 133 PurplePluginPref *purple_plugin_pref_new_with_label(const char *label);
112 134
113 /** 135 /**
114 * Create a new plugin preference with name and label 136 * purple_plugin_pref_new_with_name_and_label:
115 *
116 * @name: The name of the pref 137 * @name: The name of the pref
117 * @label: The label to be displayed 138 * @label: The label to be displayed
139 *
140 * Create a new plugin preference with name and label
141 *
118 * Returns: a new PurplePluginPref 142 * Returns: a new PurplePluginPref
119 */ 143 */
120 PurplePluginPref *purple_plugin_pref_new_with_name_and_label(const char *name, const char *label); 144 PurplePluginPref *purple_plugin_pref_new_with_name_and_label(const char *name, const char *label);
121 145
122 /** 146 /**
147 * purple_plugin_pref_destroy:
148 * @pref: The preference to destroy
149 *
123 * Destroy a plugin preference 150 * Destroy a plugin preference
124 *
125 * @pref: The preference to destroy
126 */ 151 */
127 void purple_plugin_pref_destroy(PurplePluginPref *pref); 152 void purple_plugin_pref_destroy(PurplePluginPref *pref);
128 153
129 /** 154 /**
155 * purple_plugin_pref_set_name:
156 * @pref: The plugin pref
157 * @name: The name of the pref
158 *
130 * Set a plugin pref name 159 * Set a plugin pref name
131 *
132 * @pref: The plugin pref
133 * @name: The name of the pref
134 */ 160 */
135 void purple_plugin_pref_set_name(PurplePluginPref *pref, const char *name); 161 void purple_plugin_pref_set_name(PurplePluginPref *pref, const char *name);
136 162
137 /** 163 /**
164 * purple_plugin_pref_get_name:
165 * @pref: The plugin pref
166 *
138 * Get a plugin pref name 167 * Get a plugin pref name
139 * 168 *
140 * @pref: The plugin pref
141 * Returns: The name of the pref 169 * Returns: The name of the pref
142 */ 170 */
143 const char *purple_plugin_pref_get_name(PurplePluginPref *pref); 171 const char *purple_plugin_pref_get_name(PurplePluginPref *pref);
144 172
145 /** 173 /**
146 * Set a plugin pref label 174 * purple_plugin_pref_set_label:
147 *
148 * @pref: The plugin pref 175 * @pref: The plugin pref
149 * @label: The label for the plugin pref 176 * @label: The label for the plugin pref
177 *
178 * Set a plugin pref label
150 */ 179 */
151 void purple_plugin_pref_set_label(PurplePluginPref *pref, const char *label); 180 void purple_plugin_pref_set_label(PurplePluginPref *pref, const char *label);
152 181
153 /** 182 /**
183 * purple_plugin_pref_get_label:
184 * @pref: The plugin pref
185 *
154 * Get a plugin pref label 186 * Get a plugin pref label
155 * 187 *
156 * @pref: The plugin pref
157 * Returns: The label for the plugin pref 188 * Returns: The label for the plugin pref
158 */ 189 */
159 const char *purple_plugin_pref_get_label(PurplePluginPref *pref); 190 const char *purple_plugin_pref_get_label(PurplePluginPref *pref);
160 191
161 /** 192 /**
162 * Set the bounds for an integer pref 193 * purple_plugin_pref_set_bounds:
163 *
164 * @pref: The plugin pref 194 * @pref: The plugin pref
165 * @min: The min value 195 * @min: The min value
166 * @max: The max value 196 * @max: The max value
197 *
198 * Set the bounds for an integer pref
167 */ 199 */
168 void purple_plugin_pref_set_bounds(PurplePluginPref *pref, int min, int max); 200 void purple_plugin_pref_set_bounds(PurplePluginPref *pref, int min, int max);
169 201
170 /** 202 /**
171 * Get the bounds for an integer pref 203 * purple_plugin_pref_get_bounds:
172 *
173 * @pref: The plugin pref 204 * @pref: The plugin pref
174 * @min: The min value 205 * @min: The min value
175 * @max: The max value 206 * @max: The max value
207 *
208 * Get the bounds for an integer pref
176 */ 209 */
177 void purple_plugin_pref_get_bounds(PurplePluginPref *pref, int *min, int *max); 210 void purple_plugin_pref_get_bounds(PurplePluginPref *pref, int *min, int *max);
178 211
179 /** 212 /**
213 * purple_plugin_pref_set_type:
214 * @pref: The plugin pref
215 * @type: The type
216 *
180 * Set the type of a plugin pref 217 * Set the type of a plugin pref
181 *
182 * @pref: The plugin pref
183 * @type: The type
184 */ 218 */
185 void purple_plugin_pref_set_type(PurplePluginPref *pref, PurplePluginPrefType type); 219 void purple_plugin_pref_set_type(PurplePluginPref *pref, PurplePluginPrefType type);
186 220
187 /** 221 /**
222 * purple_plugin_pref_get_type:
223 * @pref: The plugin pref
224 *
188 * Get the type of a plugin pref 225 * Get the type of a plugin pref
189 * 226 *
190 * @pref: The plugin pref
191 * Returns: The type 227 * Returns: The type
192 */ 228 */
193 PurplePluginPrefType purple_plugin_pref_get_type(PurplePluginPref *pref); 229 PurplePluginPrefType purple_plugin_pref_get_type(PurplePluginPref *pref);
194 230
195 /** 231 /**
196 * Set the choices for a choices plugin pref 232 * purple_plugin_pref_add_choice:
197 *
198 * @pref: The plugin pref 233 * @pref: The plugin pref
199 * @label: The label for the choice 234 * @label: The label for the choice
200 * @choice: A gpointer of the choice 235 * @choice: A gpointer of the choice
236 *
237 * Set the choices for a choices plugin pref
201 */ 238 */
202 void purple_plugin_pref_add_choice(PurplePluginPref *pref, const char *label, gpointer choice); 239 void purple_plugin_pref_add_choice(PurplePluginPref *pref, const char *label, gpointer choice);
203 240
204 /** 241 /**
242 * purple_plugin_pref_get_choices:
243 * @pref: The plugin pref
244 *
205 * Get the choices for a choices plugin pref 245 * Get the choices for a choices plugin pref
206 * 246 *
207 * @pref: The plugin pref
208 * Returns: (transfer none): GList of the choices 247 * Returns: (transfer none): GList of the choices
209 */ 248 */
210 GList *purple_plugin_pref_get_choices(PurplePluginPref *pref); 249 GList *purple_plugin_pref_get_choices(PurplePluginPref *pref);
211 250
212 /** 251 /**
213 * Set the max length for a string plugin pref 252 * purple_plugin_pref_set_max_length:
214 *
215 * @pref: The plugin pref 253 * @pref: The plugin pref
216 * @max_length: The max length of the string 254 * @max_length: The max length of the string
255 *
256 * Set the max length for a string plugin pref
217 */ 257 */
218 void purple_plugin_pref_set_max_length(PurplePluginPref *pref, unsigned int max_length); 258 void purple_plugin_pref_set_max_length(PurplePluginPref *pref, unsigned int max_length);
219 259
220 /** 260 /**
261 * purple_plugin_pref_get_max_length:
262 * @pref: The plugin pref
263 *
221 * Get the max length for a string plugin pref 264 * Get the max length for a string plugin pref
222 * 265 *
223 * @pref: The plugin pref
224 * Returns: the max length 266 * Returns: the max length
225 */ 267 */
226 unsigned int purple_plugin_pref_get_max_length(PurplePluginPref *pref); 268 unsigned int purple_plugin_pref_get_max_length(PurplePluginPref *pref);
227 269
228 /** 270 /**
271 * purple_plugin_pref_set_masked:
272 * @pref: The plugin pref
273 * @mask: The value to set
274 *
229 * Sets the masking of a string plugin pref 275 * Sets the masking of a string plugin pref
230 *
231 * @pref: The plugin pref
232 * @mask: The value to set
233 */ 276 */
234 void purple_plugin_pref_set_masked(PurplePluginPref *pref, gboolean mask); 277 void purple_plugin_pref_set_masked(PurplePluginPref *pref, gboolean mask);
235 278
236 /** 279 /**
280 * purple_plugin_pref_get_masked:
281 * @pref: The plugin pref
282 *
237 * Gets the masking of a string plugin pref 283 * Gets the masking of a string plugin pref
238 * 284 *
239 * @pref: The plugin pref
240 * Returns: The masking 285 * Returns: The masking
241 */ 286 */
242 gboolean purple_plugin_pref_get_masked(PurplePluginPref *pref); 287 gboolean purple_plugin_pref_get_masked(PurplePluginPref *pref);
243 288
244 /** 289 /**
290 * purple_plugin_pref_set_format_type:
291 * @pref: The plugin pref
292 * @format: The format of the string
293 *
245 * Sets the format type for a formattable-string plugin pref. You need to set the 294 * Sets the format type for a formattable-string plugin pref. You need to set the
246 * pref type to PURPLE_PLUGIN_PREF_STRING_FORMAT first before setting the format. 295 * pref type to PURPLE_PLUGIN_PREF_STRING_FORMAT first before setting the format.
247 *
248 * @pref: The plugin pref
249 * @format: The format of the string
250 */ 296 */
251 void purple_plugin_pref_set_format_type(PurplePluginPref *pref, PurpleStringFormatType format); 297 void purple_plugin_pref_set_format_type(PurplePluginPref *pref, PurpleStringFormatType format);
252 298
253 /** 299 /**
300 * purple_plugin_pref_get_format_type:
301 * @pref: The plugin pref
302 *
254 * Gets the format type of the formattable-string plugin pref. 303 * Gets the format type of the formattable-string plugin pref.
255 * 304 *
256 * @pref: The plugin pref
257 * Returns: The format of the pref 305 * Returns: The format of the pref
258 */ 306 */
259 PurpleStringFormatType purple_plugin_pref_get_format_type(PurplePluginPref *pref); 307 PurpleStringFormatType purple_plugin_pref_get_format_type(PurplePluginPref *pref);
260 308
261 /*@}*/ 309 /*@}*/

mercurial