| 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/ |
| 1461 * @uri_list: An uri-list in the standard format. |
1473 * @uri_list: An uri-list in the standard format. |
| 1462 * |
1474 * |
| 1463 * This function extracts a list of URIs from the a "text/uri-list" |
1475 * This function extracts a list of URIs from the a "text/uri-list" |
| 1464 * string. It was "borrowed" from gnome_uri_list_extract_uris |
1476 * string. It was "borrowed" from gnome_uri_list_extract_uris |
| 1465 * |
1477 * |
| 1466 * Returns: A GList containing strings allocated with g_malloc |
1478 * Returns: (element-type utf8): A GList containing strings allocated with |
| 1467 * that have been splitted from uri-list. |
1479 * g_malloc that have been split from uri-list. |
| 1468 */ |
1480 */ |
| 1469 GList *purple_uri_list_extract_uris(const gchar *uri_list); |
1481 GList *purple_uri_list_extract_uris(const gchar *uri_list); |
| 1470 |
1482 |
| 1471 /** |
1483 /** |
| 1472 * purple_uri_list_extract_filenames: |
1484 * purple_uri_list_extract_filenames: |
| 1474 * |
1486 * |
| 1475 * This function extracts a list of filenames from a |
1487 * This function extracts a list of filenames from a |
| 1476 * "text/uri-list" string. It was "borrowed" from |
1488 * "text/uri-list" string. It was "borrowed" from |
| 1477 * gnome_uri_list_extract_filenames |
1489 * gnome_uri_list_extract_filenames |
| 1478 * |
1490 * |
| 1479 * Returns: A GList containing strings allocated with g_malloc that |
1491 * Returns: (element-type utf8): A GList containing strings allocated with |
| 1480 * contain the filenames in the uri-list. Note that unlike |
1492 * g_malloc that contain the filenames in the uri-list. Note that |
| 1481 * purple_uri_list_extract_uris() function, this will discard |
1493 * unlike the purple_uri_list_extract_uris() function, this will |
| 1482 * any non-file uri from the result value. |
1494 * discard any non-file uri from the result value. |
| 1483 */ |
1495 */ |
| 1484 GList *purple_uri_list_extract_filenames(const gchar *uri_list); |
1496 GList *purple_uri_list_extract_filenames(const gchar *uri_list); |
| 1485 |
1497 |
| 1486 /************************************************************************** |
1498 /************************************************************************** |
| 1487 * UTF8 String Functions |
1499 * UTF8 String Functions |
| 1563 * preceded or immediately followed by another alpha-numeric character. |
1575 * preceded or immediately followed by another alpha-numeric character. |
| 1564 * |
1576 * |
| 1565 * Returns: TRUE if haystack has the word, otherwise FALSE |
1577 * Returns: TRUE if haystack has the word, otherwise FALSE |
| 1566 */ |
1578 */ |
| 1567 gboolean purple_utf8_has_word(const char *haystack, const char *needle); |
1579 gboolean purple_utf8_has_word(const char *haystack, const char *needle); |
| 1568 |
|
| 1569 /** |
|
| 1570 * purple_print_utf8_to_console: |
|
| 1571 * @filestream: The file stream (e.g. STDOUT or STDERR) |
|
| 1572 * @message: The message to print. |
|
| 1573 * |
|
| 1574 * Prints a UTF-8 message to the given file stream. The function |
|
| 1575 * tries to convert the UTF-8 message to user's locale. If this |
|
| 1576 * is not possible, the original UTF-8 text will be printed. |
|
| 1577 */ |
|
| 1578 void purple_print_utf8_to_console(FILE *filestream, char *message); |
|
| 1579 |
1580 |
| 1580 /** |
1581 /** |
| 1581 * purple_message_meify: |
1582 * purple_message_meify: |
| 1582 * @message: The message to check |
1583 * @message: The message to check |
| 1583 * @len: The message length, or -1 |
1584 * @len: The message length, or -1 |