diff libpurple/request.h @ 31846:a88631af0f5e

Add API: purple_request_field_set_tooltip & purple_request_field_get_tooltip This allows protocol prpl's to provide some context-sensitive help text for Requiest UI fields.
author andrew.victor@mxit.com
date Tue, 03 May 2011 21:22:51 +0000
parents 44f53d3fc54f
children 5c174d124e29 3828a61c44da
line wrap: on
line diff
--- a/libpurple/request.h	Tue May 03 20:55:39 2011 +0000
+++ b/libpurple/request.h	Tue May 03 21:22:51 2011 +0000
@@ -180,6 +180,7 @@
 	} u;
 
 	void *ui_data;
+	char *tooltip;
 
 };
 #endif
@@ -517,6 +518,18 @@
 									  const char *type_hint);
 
 /**
+ * Sets the tooltip for the field.
+ *
+ * This is optionally used by the UIs to provide a tooltip for
+ * the field.
+ *
+ * @param field     The field.
+ * @param tooltip   The tooltip text.
+ */
+void purple_request_field_set_tooltip(PurpleRequestField *field,
+									const char *tooltip);
+
+/**
  * Sets whether or not a field is required.
  *
  * @param field    The field.
@@ -582,6 +595,15 @@
 const char *purple_request_field_get_type_hint(const PurpleRequestField *field);
 
 /**
+ * Returns the field's tooltip.
+ *
+ * @param field The field.
+ *
+ * @return The field's tooltip.
+ */
+const char *purple_request_field_get_tooltip(const PurpleRequestField *field);
+
+/**
  * Returns whether or not a field is required.
  *
  * @param field The field.