libpurple/util.h

changeset 38897
6db89a0010ae
parent 38887
826f5da7b56c
parent 38716
b9bed228745a
child 38898
10d4a5ed5d67
child 39115
53435f0bef6c
equal deleted inserted replaced
38889:5f88ba22172b 38897:6db89a0010ae
76 * purple_menu_action_new: 76 * purple_menu_action_new:
77 * @label: The text label to display for this action. 77 * @label: The text label to display for this action.
78 * @callback: The function to be called when the action is used on 78 * @callback: The function to be called when the action is used on
79 * the selected item. 79 * the selected item.
80 * @data: Additional data to be passed to the callback. 80 * @data: Additional data to be passed to the callback.
81 * @children: A GList of PurpleMenuActions to be added as a submenu 81 * @children: (element-type PurpleMenuAction) (transfer full): Menu actions to
82 * of the action. 82 * be added as a submenu of this action.
83 * 83 *
84 * Creates a new PurpleMenuAction. 84 * Creates a new PurpleMenuAction.
85 * 85 *
86 * Returns: The PurpleMenuAction. 86 * Returns: The PurpleMenuAction.
87 */ 87 */
130 * purple_menu_action_get_children: 130 * purple_menu_action_get_children:
131 * @act: The PurpleMenuAction. 131 * @act: The PurpleMenuAction.
132 * 132 *
133 * Returns the children of the PurpleMenuAction. 133 * Returns the children of the PurpleMenuAction.
134 * 134 *
135 * Returns: The GList of children. 135 * Returns: (element-type PurpleMenuAction) (transfer none): The menu children.
136 */ 136 */
137 GList* purple_menu_action_get_children(const PurpleMenuAction *act); 137 GList* purple_menu_action_get_children(const PurpleMenuAction *act);
138 138
139 /** 139 /**
140 * purple_menu_action_set_label: 140 * purple_menu_action_set_label:
164 void purple_menu_action_set_data(PurpleMenuAction *act, gpointer data); 164 void purple_menu_action_set_data(PurpleMenuAction *act, gpointer data);
165 165
166 /** 166 /**
167 * purple_menu_action_set_children: 167 * purple_menu_action_set_children:
168 * @act: The menu action. 168 * @act: The menu action.
169 * @children: The PurpleMenuAtion children 169 * @children: (element-type PurpleMenuAction) (transfer full): The menu children
170 * 170 *
171 * Set the children of the PurpleMenuAction. 171 * Set the children of the PurpleMenuAction.
172 */ 172 */
173 void purple_menu_action_set_children(PurpleMenuAction *act, GList *children); 173 void purple_menu_action_set_children(PurpleMenuAction *act, GList *children);
174 174
478 * 478 *
479 * Returns: A time_t. 479 * Returns: A time_t.
480 */ 480 */
481 time_t purple_str_to_time(const char *timestamp, gboolean utc, 481 time_t purple_str_to_time(const char *timestamp, gboolean utc,
482 struct tm *tm, long *tz_off, const char **rest); 482 struct tm *tm, long *tz_off, const char **rest);
483
484 /**
485 * purple_str_to_date_time:
486 * @timestamp: The timestamp
487 * @utc: Assume UTC if no timezone specified
488 *
489 * Parses a timestamp in jabber, ISO8601, or MM/DD/YYYY format and returns
490 * a GDateTime.
491 *
492 * Returns: (transfer full): A GDateTime.
493 */
494 GDateTime *purple_str_to_date_time(const char *timestamp, gboolean utc);
483 495
484 /** 496 /**
485 * purple_uts35_to_str: 497 * purple_uts35_to_str:
486 * @format: The formatting string, according to UTS \#35 498 * @format: The formatting string, according to UTS \#35
487 * See http://unicode.org/reports/tr35/ 499 * See http://unicode.org/reports/tr35/
1382 * @uri_list: An uri-list in the standard format. 1394 * @uri_list: An uri-list in the standard format.
1383 * 1395 *
1384 * This function extracts a list of URIs from the a "text/uri-list" 1396 * This function extracts a list of URIs from the a "text/uri-list"
1385 * string. It was "borrowed" from gnome_uri_list_extract_uris 1397 * string. It was "borrowed" from gnome_uri_list_extract_uris
1386 * 1398 *
1387 * Returns: A GList containing strings allocated with g_malloc 1399 * Returns: (element-type utf8): A GList containing strings allocated with
1388 * that have been splitted from uri-list. 1400 * g_malloc that have been split from uri-list.
1389 */ 1401 */
1390 GList *purple_uri_list_extract_uris(const gchar *uri_list); 1402 GList *purple_uri_list_extract_uris(const gchar *uri_list);
1391 1403
1392 /** 1404 /**
1393 * purple_uri_list_extract_filenames: 1405 * purple_uri_list_extract_filenames:
1395 * 1407 *
1396 * This function extracts a list of filenames from a 1408 * This function extracts a list of filenames from a
1397 * "text/uri-list" string. It was "borrowed" from 1409 * "text/uri-list" string. It was "borrowed" from
1398 * gnome_uri_list_extract_filenames 1410 * gnome_uri_list_extract_filenames
1399 * 1411 *
1400 * Returns: A GList containing strings allocated with g_malloc that 1412 * Returns: (element-type utf8): A GList containing strings allocated with
1401 * contain the filenames in the uri-list. Note that unlike 1413 * g_malloc that contain the filenames in the uri-list. Note that
1402 * purple_uri_list_extract_uris() function, this will discard 1414 * unlike the purple_uri_list_extract_uris() function, this will
1403 * any non-file uri from the result value. 1415 * discard any non-file uri from the result value.
1404 */ 1416 */
1405 GList *purple_uri_list_extract_filenames(const gchar *uri_list); 1417 GList *purple_uri_list_extract_filenames(const gchar *uri_list);
1406 1418
1407 /************************************************************************** 1419 /**************************************************************************
1408 * UTF8 String Functions 1420 * UTF8 String Functions
1484 * preceded or immediately followed by another alpha-numeric character. 1496 * preceded or immediately followed by another alpha-numeric character.
1485 * 1497 *
1486 * Returns: TRUE if haystack has the word, otherwise FALSE 1498 * Returns: TRUE if haystack has the word, otherwise FALSE
1487 */ 1499 */
1488 gboolean purple_utf8_has_word(const char *haystack, const char *needle); 1500 gboolean purple_utf8_has_word(const char *haystack, const char *needle);
1489
1490 /**
1491 * purple_print_utf8_to_console:
1492 * @filestream: The file stream (e.g. STDOUT or STDERR)
1493 * @message: The message to print.
1494 *
1495 * Prints a UTF-8 message to the given file stream. The function
1496 * tries to convert the UTF-8 message to user's locale. If this
1497 * is not possible, the original UTF-8 text will be printed.
1498 */
1499 void purple_print_utf8_to_console(FILE *filestream, char *message);
1500 1501
1501 /** 1502 /**
1502 * purple_message_meify: 1503 * purple_message_meify:
1503 * @message: The message to check 1504 * @message: The message to check
1504 * @len: The message length, or -1 1505 * @len: The message length, or -1

mercurial