Thu, 25 Aug 2022 23:25:12 -0500
Replace the style-updated signal with GtkIconTheme:changed
Testing Done:
Ran and make sure the `GWarning` went away.
Reviewed at https://reviews.imfreedom.org/r/1653/
|
20147
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19859
diff
changeset
|
1 | /* Copyright (C) 2003 Timothy Ringenbach <omarvo@hotmail.com> |
| 9130 | 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify | |
| 4 | * it under the terms of the GNU General Public License as published by | |
| 5 | * the Free Software Foundation; either version 2 of the License, or | |
| 6 | * (at your option) any later version. | |
| 7 | * | |
| 8 | * This program is distributed in the hope that it will be useful, | |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 11 | * GNU General Public License for more details. | |
| 12 | * | |
| 13 | * You should have received a copy of the GNU General Public License | |
| 14 | * along with this program; if not, write to the Free Software | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
15884
diff
changeset
|
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 9130 | 16 | * |
| 17 | */ | |
|
35487
494f09f7f331
Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents:
35486
diff
changeset
|
18 | |
|
40474
1341be8e3402
Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents:
40230
diff
changeset
|
19 | #if !defined(PURPLE_GLOBAL_HEADER_INSIDE) && !defined(PURPLE_COMPILATION) |
|
1341be8e3402
Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents:
40230
diff
changeset
|
20 | # error "only <purple.h> may be included directly" |
|
1341be8e3402
Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents:
40230
diff
changeset
|
21 | #endif |
|
1341be8e3402
Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents:
40230
diff
changeset
|
22 | |
|
39659
e4dfb99b0cef
Fix libpurple header guards using reserved names.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38745
diff
changeset
|
23 | #ifndef PURPLE_CMDS_H |
|
e4dfb99b0cef
Fix libpurple header guards using reserved names.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38745
diff
changeset
|
24 | #define PURPLE_CMDS_H |
|
39862
595bac8cac23
Add missing documentation for commands
Gary Kramlich <grim@reaperworld.com>
parents:
39659
diff
changeset
|
25 | |
|
40853
d3518ff99fa7
rename conversation.[ch] to purpleconversation.[ch] and split PurpleConversationUiOps out to its own file to avoid circular include issues.
Gary Kramlich <grim@reaperworld.com>
parents:
40474
diff
changeset
|
26 | #include <purpleconversation.h> |
| 9130 | 27 | |
|
39862
595bac8cac23
Add missing documentation for commands
Gary Kramlich <grim@reaperworld.com>
parents:
39659
diff
changeset
|
28 | /****************************************************************************** |
|
595bac8cac23
Add missing documentation for commands
Gary Kramlich <grim@reaperworld.com>
parents:
39659
diff
changeset
|
29 | * Structures |
|
595bac8cac23
Add missing documentation for commands
Gary Kramlich <grim@reaperworld.com>
parents:
39659
diff
changeset
|
30 | *****************************************************************************/ |
| 9130 | 31 | |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
32 | /** |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
33 | * PurpleCmdStatus: |
|
39862
595bac8cac23
Add missing documentation for commands
Gary Kramlich <grim@reaperworld.com>
parents:
39659
diff
changeset
|
34 | * @PURPLE_CMD_STATUS_OK: The command executed successfully. |
|
595bac8cac23
Add missing documentation for commands
Gary Kramlich <grim@reaperworld.com>
parents:
39659
diff
changeset
|
35 | * @PURPLE_CMD_STATUS_FAILED: The command failed to execute. |
|
595bac8cac23
Add missing documentation for commands
Gary Kramlich <grim@reaperworld.com>
parents:
39659
diff
changeset
|
36 | * @PURPLE_CMD_STATUS_NOT_FOUND: The command was not found. |
|
595bac8cac23
Add missing documentation for commands
Gary Kramlich <grim@reaperworld.com>
parents:
39659
diff
changeset
|
37 | * @PURPLE_CMD_STATUS_WRONG_ARGS: The wrong number of arguments were passed. |
|
39863
60a4930ea197
Fix some doc comments and move the comment about purple_timeout_reset to it's new home
Gary Kramlich <grim@reaperworld.com>
parents:
39862
diff
changeset
|
38 | * @PURPLE_CMD_STATUS_WRONG_PROTOCOL: The command was run with the wrong |
|
39862
595bac8cac23
Add missing documentation for commands
Gary Kramlich <grim@reaperworld.com>
parents:
39659
diff
changeset
|
39 | * protocol. |
|
39863
60a4930ea197
Fix some doc comments and move the comment about purple_timeout_reset to it's new home
Gary Kramlich <grim@reaperworld.com>
parents:
39862
diff
changeset
|
40 | * @PURPLE_CMD_STATUS_WRONG_TYPE: The Command was ran against the wrong type of |
|
39862
595bac8cac23
Add missing documentation for commands
Gary Kramlich <grim@reaperworld.com>
parents:
39659
diff
changeset
|
41 | * conversation. |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
42 | * |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
43 | * The possible results of running a command with purple_cmd_do_command(). |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
44 | */ |
|
32206
a2c62b07ae5a
Please correct me if I'm wrong, but I don't think we gain anything
Mark Doliner <markdoliner@pidgin.im>
parents:
25105
diff
changeset
|
45 | typedef enum { |
| 15884 | 46 | PURPLE_CMD_STATUS_OK, |
| 47 | PURPLE_CMD_STATUS_FAILED, | |
| 48 | PURPLE_CMD_STATUS_NOT_FOUND, | |
| 49 | PURPLE_CMD_STATUS_WRONG_ARGS, | |
|
36545
23b59a16c808
Replaced some _prpl_ stuff with _protocol_
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
50 | PURPLE_CMD_STATUS_WRONG_PROTOCOL, |
|
25105
fe13c190ca13
Remove the commas at the end of enumerator lists. This resolves warnings
Florian Quèze <florian@instantbird.org>
parents:
23555
diff
changeset
|
51 | PURPLE_CMD_STATUS_WRONG_TYPE |
|
22051
61dc80506e49
C++ doesn't really allow forward declarations of enums, and we
Mark Doliner <markdoliner@pidgin.im>
parents:
20370
diff
changeset
|
52 | } PurpleCmdStatus; |
| 9130 | 53 | |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
54 | /** |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
55 | * PurpleCmdRet: |
|
39863
60a4930ea197
Fix some doc comments and move the comment about purple_timeout_reset to it's new home
Gary Kramlich <grim@reaperworld.com>
parents:
39862
diff
changeset
|
56 | * @PURPLE_CMD_RET_OK: Everything's okay; Don't look for another command to |
|
60a4930ea197
Fix some doc comments and move the comment about purple_timeout_reset to it's new home
Gary Kramlich <grim@reaperworld.com>
parents:
39862
diff
changeset
|
57 | * call. |
|
60a4930ea197
Fix some doc comments and move the comment about purple_timeout_reset to it's new home
Gary Kramlich <grim@reaperworld.com>
parents:
39862
diff
changeset
|
58 | * @PURPLE_CMD_RET_FAILED: The command failed, but stop looking. |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
59 | * @PURPLE_CMD_RET_CONTINUE: Continue, looking for other commands with the same |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
60 | * name to call. |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
61 | * |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
62 | * Commands registered with the core return one of these values when run. |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
63 | * Normally, a command will want to return one of the first two; in some |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
64 | * unusual cases, you might want to have several functions called for a |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
65 | * particular command; in this case, they should return |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
66 | * #PURPLE_CMD_RET_CONTINUE to cause the core to fall through to other |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
67 | * commands with the same name. |
|
23510
d4f5493b1c26
Document a few types in cmds, partly to make doxygen links to those types work.
Will Thompson <resiak@pidgin.im>
parents:
23420
diff
changeset
|
68 | */ |
|
32206
a2c62b07ae5a
Please correct me if I'm wrong, but I don't think we gain anything
Mark Doliner <markdoliner@pidgin.im>
parents:
25105
diff
changeset
|
69 | typedef enum { |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
70 | PURPLE_CMD_RET_OK, |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
71 | PURPLE_CMD_RET_FAILED, |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
72 | PURPLE_CMD_RET_CONTINUE |
|
22051
61dc80506e49
C++ doesn't really allow forward declarations of enums, and we
Mark Doliner <markdoliner@pidgin.im>
parents:
20370
diff
changeset
|
73 | } PurpleCmdRet; |
| 9130 | 74 | |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
75 | /** |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
76 | * PurpleCmdFunc: |
|
39862
595bac8cac23
Add missing documentation for commands
Gary Kramlich <grim@reaperworld.com>
parents:
39659
diff
changeset
|
77 | * @conversation: The #PurpleConversation where the command is being run. |
|
595bac8cac23
Add missing documentation for commands
Gary Kramlich <grim@reaperworld.com>
parents:
39659
diff
changeset
|
78 | * @cmd: The name of the command. |
|
595bac8cac23
Add missing documentation for commands
Gary Kramlich <grim@reaperworld.com>
parents:
39659
diff
changeset
|
79 | * @args: The arguments to the command. |
|
595bac8cac23
Add missing documentation for commands
Gary Kramlich <grim@reaperworld.com>
parents:
39659
diff
changeset
|
80 | * @error: (out): A return address for a #GError. |
|
595bac8cac23
Add missing documentation for commands
Gary Kramlich <grim@reaperworld.com>
parents:
39659
diff
changeset
|
81 | * @data: User data to pass to the function. |
|
23510
d4f5493b1c26
Document a few types in cmds, partly to make doxygen links to those types work.
Will Thompson <resiak@pidgin.im>
parents:
23420
diff
changeset
|
82 | * |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
83 | * A function implementing a command, as passed to purple_cmd_register(). |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
84 | */ |
|
38745
f4376b1f4682
A ton more of introspection cleanups
Gary Kramlich <grim@reaperworld.com>
parents:
38716
diff
changeset
|
85 | typedef PurpleCmdRet (*PurpleCmdFunc)(PurpleConversation *conversation, const gchar *cmd, |
| 9597 | 86 | gchar **args, gchar **error, void *data); |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
87 | /** |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
88 | * PurpleCmdId: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
89 | * |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
90 | * A unique integer representing a command registered with |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
91 | * purple_cmd_register(), which can subsequently be passed to |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
92 | * purple_cmd_unregister() to unregister that command. |
|
23510
d4f5493b1c26
Document a few types in cmds, partly to make doxygen links to those types work.
Will Thompson <resiak@pidgin.im>
parents:
23420
diff
changeset
|
93 | */ |
| 15884 | 94 | typedef guint PurpleCmdId; |
| 9130 | 95 | |
|
39862
595bac8cac23
Add missing documentation for commands
Gary Kramlich <grim@reaperworld.com>
parents:
39659
diff
changeset
|
96 | /** |
|
595bac8cac23
Add missing documentation for commands
Gary Kramlich <grim@reaperworld.com>
parents:
39659
diff
changeset
|
97 | * PurpleCmdPriority: |
|
595bac8cac23
Add missing documentation for commands
Gary Kramlich <grim@reaperworld.com>
parents:
39659
diff
changeset
|
98 | * @PURPLE_CMD_P_VERY_LOW: Lowest priority. |
|
595bac8cac23
Add missing documentation for commands
Gary Kramlich <grim@reaperworld.com>
parents:
39659
diff
changeset
|
99 | * @PURPLE_CMD_P_LOW: Low priority. |
|
595bac8cac23
Add missing documentation for commands
Gary Kramlich <grim@reaperworld.com>
parents:
39659
diff
changeset
|
100 | * @PURPLE_CMD_P_DEFAULT: Default priority. |
|
595bac8cac23
Add missing documentation for commands
Gary Kramlich <grim@reaperworld.com>
parents:
39659
diff
changeset
|
101 | * @PURPLE_CMD_P_PROTOCOL: Priority for protocol plugins. |
|
595bac8cac23
Add missing documentation for commands
Gary Kramlich <grim@reaperworld.com>
parents:
39659
diff
changeset
|
102 | * @PURPLE_CMD_P_PLUGIN: Priority for plugins. |
|
595bac8cac23
Add missing documentation for commands
Gary Kramlich <grim@reaperworld.com>
parents:
39659
diff
changeset
|
103 | * @PURPLE_CMD_P_ALIAS: Priority for aliasing commands. |
|
595bac8cac23
Add missing documentation for commands
Gary Kramlich <grim@reaperworld.com>
parents:
39659
diff
changeset
|
104 | * @PURPLE_CMD_P_HIGH: High priority. |
|
595bac8cac23
Add missing documentation for commands
Gary Kramlich <grim@reaperworld.com>
parents:
39659
diff
changeset
|
105 | * @PURPLE_CMD_P_VERY_HIGH: Highest priority. |
|
595bac8cac23
Add missing documentation for commands
Gary Kramlich <grim@reaperworld.com>
parents:
39659
diff
changeset
|
106 | * |
|
595bac8cac23
Add missing documentation for commands
Gary Kramlich <grim@reaperworld.com>
parents:
39659
diff
changeset
|
107 | * Commands are registered from multiple locations which leads to name |
|
39863
60a4930ea197
Fix some doc comments and move the comment about purple_timeout_reset to it's new home
Gary Kramlich <grim@reaperworld.com>
parents:
39862
diff
changeset
|
108 | * collisions. PurpleCmdPriority is used to determine which command will be |
|
60a4930ea197
Fix some doc comments and move the comment about purple_timeout_reset to it's new home
Gary Kramlich <grim@reaperworld.com>
parents:
39862
diff
changeset
|
109 | * run. |
|
39862
595bac8cac23
Add missing documentation for commands
Gary Kramlich <grim@reaperworld.com>
parents:
39659
diff
changeset
|
110 | */ |
|
32206
a2c62b07ae5a
Please correct me if I'm wrong, but I don't think we gain anything
Mark Doliner <markdoliner@pidgin.im>
parents:
25105
diff
changeset
|
111 | typedef enum { |
| 15884 | 112 | PURPLE_CMD_P_VERY_LOW = -1000, |
| 113 | PURPLE_CMD_P_LOW = 0, | |
| 114 | PURPLE_CMD_P_DEFAULT = 1000, | |
| 37040 | 115 | PURPLE_CMD_P_PROTOCOL = 2000, |
| 15884 | 116 | PURPLE_CMD_P_PLUGIN = 3000, |
| 117 | PURPLE_CMD_P_ALIAS = 4000, | |
| 118 | PURPLE_CMD_P_HIGH = 5000, | |
|
25105
fe13c190ca13
Remove the commas at the end of enumerator lists. This resolves warnings
Florian Quèze <florian@instantbird.org>
parents:
23555
diff
changeset
|
119 | PURPLE_CMD_P_VERY_HIGH = 6000 |
|
22051
61dc80506e49
C++ doesn't really allow forward declarations of enums, and we
Mark Doliner <markdoliner@pidgin.im>
parents:
20370
diff
changeset
|
120 | } PurpleCmdPriority; |
| 9130 | 121 | |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
122 | /** |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
123 | * PurpleCmdFlag: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
124 | * @PURPLE_CMD_FLAG_IM: Command is usable in IMs. |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
125 | * @PURPLE_CMD_FLAG_CHAT: Command is usable in multi-user chats. |
| 37040 | 126 | * @PURPLE_CMD_FLAG_PROTOCOL_ONLY: Command is usable only for a particular |
| 127 | * protocol. | |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
128 | * @PURPLE_CMD_FLAG_ALLOW_WRONG_ARGS: Incorrect arguments to this command |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
129 | * should be accepted anyway. |
|
20370
f24b280e0c29
Let's document more of cmds.h!
Will Thompson <resiak@pidgin.im>
parents:
20147
diff
changeset
|
130 | * |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
131 | * Flags used to set various properties of commands. Every command should |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
132 | * have at least one of #PURPLE_CMD_FLAG_IM and #PURPLE_CMD_FLAG_CHAT set in |
|
41083
590d533cf290
Fix several typos in libpurple
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
41010
diff
changeset
|
133 | * order to be even slightly useful. |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
134 | * |
| 35471 | 135 | * See purple_cmd_register(). |
|
20370
f24b280e0c29
Let's document more of cmds.h!
Will Thompson <resiak@pidgin.im>
parents:
20147
diff
changeset
|
136 | */ |
|
32206
a2c62b07ae5a
Please correct me if I'm wrong, but I don't think we gain anything
Mark Doliner <markdoliner@pidgin.im>
parents:
25105
diff
changeset
|
137 | typedef enum { |
| 15884 | 138 | PURPLE_CMD_FLAG_IM = 0x01, |
| 139 | PURPLE_CMD_FLAG_CHAT = 0x02, | |
| 37040 | 140 | PURPLE_CMD_FLAG_PROTOCOL_ONLY = 0x04, |
|
25105
fe13c190ca13
Remove the commas at the end of enumerator lists. This resolves warnings
Florian Quèze <florian@instantbird.org>
parents:
23555
diff
changeset
|
141 | PURPLE_CMD_FLAG_ALLOW_WRONG_ARGS = 0x08 |
|
22051
61dc80506e49
C++ doesn't really allow forward declarations of enums, and we
Mark Doliner <markdoliner@pidgin.im>
parents:
20370
diff
changeset
|
142 | } PurpleCmdFlag; |
| 9130 | 143 | |
|
37685
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
144 | /** |
|
38556
5912dabcde42
libpurple: Update documentation to GtkDoc style
Mike Ruprecht <cmaiku@gmail.com>
parents:
38545
diff
changeset
|
145 | * PurpleCommandsUiOps: |
|
5912dabcde42
libpurple: Update documentation to GtkDoc style
Mike Ruprecht <cmaiku@gmail.com>
parents:
38545
diff
changeset
|
146 | * @register_command: If implemented, the UI is responsible for handling |
|
5912dabcde42
libpurple: Update documentation to GtkDoc style
Mike Ruprecht <cmaiku@gmail.com>
parents:
38545
diff
changeset
|
147 | * commands. See @purple_cmd_register for the argument values. |
|
5912dabcde42
libpurple: Update documentation to GtkDoc style
Mike Ruprecht <cmaiku@gmail.com>
parents:
38545
diff
changeset
|
148 | * @unregister_command: Should be implemented if register_command is |
|
5912dabcde42
libpurple: Update documentation to GtkDoc style
Mike Ruprecht <cmaiku@gmail.com>
parents:
38545
diff
changeset
|
149 | * implemented. @name and @prpl_id will have the same value |
|
5912dabcde42
libpurple: Update documentation to GtkDoc style
Mike Ruprecht <cmaiku@gmail.com>
parents:
38545
diff
changeset
|
150 | * that were used for the register_command call. |
|
5912dabcde42
libpurple: Update documentation to GtkDoc style
Mike Ruprecht <cmaiku@gmail.com>
parents:
38545
diff
changeset
|
151 | * |
|
37685
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
152 | * Command UI operations; UIs should implement this if they want to handle |
|
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
153 | * commands themselves, rather than relying on the core. |
|
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
154 | * |
|
38556
5912dabcde42
libpurple: Update documentation to GtkDoc style
Mike Ruprecht <cmaiku@gmail.com>
parents:
38545
diff
changeset
|
155 | * See <link linkend="chapter-ui-ops">List of <literal>UiOps</literal> |
|
5912dabcde42
libpurple: Update documentation to GtkDoc style
Mike Ruprecht <cmaiku@gmail.com>
parents:
38545
diff
changeset
|
156 | * Structures</link> |
|
40230
620a23d172cb
Add Since tags for 2.11.0.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39863
diff
changeset
|
157 | * |
|
620a23d172cb
Add Since tags for 2.11.0.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
39863
diff
changeset
|
158 | * Since: 2.11.0 |
|
37685
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
159 | */ |
|
38545
3e287c9fe72e
cmds: Change PurpleCommandsUiOps so GtkDoc finds it
Mike Ruprecht <cmaiku@gmail.com>
parents:
38240
diff
changeset
|
160 | typedef struct { |
|
37686
403b13cb3a47
PurpleCommandsUiOps: minor naming/docs fixes
dx <dx@dxzone.com.ar>
parents:
37685
diff
changeset
|
161 | void (*register_command)(const gchar *name, PurpleCmdPriority priority, |
|
403b13cb3a47
PurpleCommandsUiOps: minor naming/docs fixes
dx <dx@dxzone.com.ar>
parents:
37685
diff
changeset
|
162 | PurpleCmdFlag flags, const gchar *prpl_id, |
|
37903
caf372ae8882
Fix up the commands execute stuff
Gary Kramlich <grim@reaperworld.com>
parents:
37901
diff
changeset
|
163 | const gchar *help, PurpleCmdId id); |
|
37685
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
164 | |
|
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
165 | void (*unregister_command)(const gchar *name, const gchar *prpl_id); |
|
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
166 | |
|
38556
5912dabcde42
libpurple: Update documentation to GtkDoc style
Mike Ruprecht <cmaiku@gmail.com>
parents:
38545
diff
changeset
|
167 | /*< private >*/ |
|
37685
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
168 | void (*_purple_reserved1)(void); |
|
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
169 | void (*_purple_reserved2)(void); |
|
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
170 | void (*_purple_reserved3)(void); |
|
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
171 | void (*_purple_reserved4)(void); |
|
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
172 | } PurpleCommandsUiOps; |
| 9130 | 173 | |
|
32787
7072f190d6ad
Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32438
diff
changeset
|
174 | G_BEGIN_DECLS |
| 9130 | 175 | |
|
10231
047177cee39f
[gaim-migrate @ 11366]
Andrew Hart <arhart@users.sourceforge.net>
parents:
10052
diff
changeset
|
176 | /**************************************************************************/ |
| 35472 | 177 | /* Commands API */ |
|
10231
047177cee39f
[gaim-migrate @ 11366]
Andrew Hart <arhart@users.sourceforge.net>
parents:
10052
diff
changeset
|
178 | /**************************************************************************/ |
| 9130 | 179 | |
| 180 | /** | |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
181 | * purple_cmd_register: |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
182 | * @cmd: The command. This should be a UTF-8 (or ASCII) string, with no spaces |
| 9130 | 183 | * or other white space. |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
184 | * @args: A string of characters describing to libpurple how to parse this |
|
35682
65c1912ee2c8
Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents:
35538
diff
changeset
|
185 | * command's arguments. If what the user types doesn't match this |
|
65c1912ee2c8
Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents:
35538
diff
changeset
|
186 | * pattern, libpurple will keep looking for another command, unless |
|
65c1912ee2c8
Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents:
35538
diff
changeset
|
187 | * the flag #PURPLE_CMD_FLAG_ALLOW_WRONG_ARGS is passed in @f. |
|
65c1912ee2c8
Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents:
35538
diff
changeset
|
188 | * This string should contain no whitespace, and use a single |
|
65c1912ee2c8
Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents:
35538
diff
changeset
|
189 | * character for each argument. The recognized characters are: |
|
65c1912ee2c8
Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents:
35538
diff
changeset
|
190 | * <itemizedlist> |
|
65c1912ee2c8
Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents:
35538
diff
changeset
|
191 | * <listitem><literal>'w'</literal>: Matches a single word.</listitem> |
|
65c1912ee2c8
Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents:
35538
diff
changeset
|
192 | * <listitem><literal>'W'</literal>: Matches a single word, with |
|
65c1912ee2c8
Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents:
35538
diff
changeset
|
193 | * formatting.</listitem> |
|
65c1912ee2c8
Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents:
35538
diff
changeset
|
194 | * <listitem><literal>'s'</literal>: Matches the rest of the |
|
65c1912ee2c8
Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents:
35538
diff
changeset
|
195 | * arguments after this point, |
|
65c1912ee2c8
Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents:
35538
diff
changeset
|
196 | * as a single string.</listitem> |
|
65c1912ee2c8
Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents:
35538
diff
changeset
|
197 | * <listitem><literal>'S'</literal>: Same as <literal>'s'</literal> |
|
65c1912ee2c8
Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents:
35538
diff
changeset
|
198 | * but with formatting.</listitem> |
|
65c1912ee2c8
Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents:
35538
diff
changeset
|
199 | * </itemizedlist> |
|
65c1912ee2c8
Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents:
35538
diff
changeset
|
200 | * If args is the empty string, then the command accepts no |
|
65c1912ee2c8
Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents:
35538
diff
changeset
|
201 | * arguments. The args passed to the callback @func will be a %NULL |
|
65c1912ee2c8
Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents:
35538
diff
changeset
|
202 | * terminated array of %NULL terminated strings, and will always |
|
65c1912ee2c8
Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents:
35538
diff
changeset
|
203 | * match the number of arguments asked for, unless |
|
65c1912ee2c8
Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents:
35538
diff
changeset
|
204 | * #PURPLE_CMD_FLAG_ALLOW_WRONG_ARGS is passed. |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
205 | * @p: This is the priority. Higher priority commands will be run first, |
|
35682
65c1912ee2c8
Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents:
35538
diff
changeset
|
206 | * and usually the first command will stop any others from being |
|
65c1912ee2c8
Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents:
35538
diff
changeset
|
207 | * called. |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
208 | * @f: Flags specifying various options about this command, combined with |
|
35682
65c1912ee2c8
Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents:
35538
diff
changeset
|
209 | * <literal>|</literal> (bitwise OR). You need to at least pass one of |
|
65c1912ee2c8
Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents:
35538
diff
changeset
|
210 | * #PURPLE_CMD_FLAG_IM or #PURPLE_CMD_FLAG_CHAT (you may pass both) in |
|
65c1912ee2c8
Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents:
35538
diff
changeset
|
211 | * order for the command to ever actually be called. |
|
37034
9d6765962b22
Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents:
37023
diff
changeset
|
212 | * @protocol_id: If the #PURPLE_CMD_FLAG_PROTOCOL_ONLY flag is set, this is the id |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
213 | * of the protocol to which the command applies (such as |
| 35419 | 214 | * <literal>"prpl-msn"</literal>). If the flag is not set, this |
| 215 | * parameter is ignored; pass %NULL (or a humourous string of | |
| 216 | * your choice!). | |
|
35682
65c1912ee2c8
Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents:
35538
diff
changeset
|
217 | * @func: (scope call): This is the function to call when someone enters this |
|
65c1912ee2c8
Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents:
35538
diff
changeset
|
218 | * command. |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
219 | * @helpstr: a whitespace sensitive, UTF-8, HTML string describing how to |
|
35682
65c1912ee2c8
Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents:
35538
diff
changeset
|
220 | * use the command. The preferred format of this string is the |
|
65c1912ee2c8
Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents:
35538
diff
changeset
|
221 | * command's name, followed by a space and any arguments it |
|
65c1912ee2c8
Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents:
35538
diff
changeset
|
222 | * accepts (if it takes any arguments, otherwise no space), |
|
65c1912ee2c8
Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents:
35538
diff
changeset
|
223 | * followed by a colon, two spaces, and a description of the |
|
65c1912ee2c8
Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents:
35538
diff
changeset
|
224 | * command in sentence form. Do not include a slash before the |
|
65c1912ee2c8
Add (scope) annotation to callback parameters (account.h to proxy.h)
Ankit Vani <a@nevitus.org>
parents:
35538
diff
changeset
|
225 | * command name. |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
226 | * @data: User defined data to pass to the #PurpleCmdFunc @f. |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
227 | * |
| 9130 | 228 | * Register a new command with the core. |
| 229 | * | |
| 230 | * The command will only happen if commands are enabled, | |
| 231 | * which is a UI pref. UIs don't have to support commands at all. | |
| 232 | * | |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
233 | * Returns: A #PurpleCmdId, which is only used for calling |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
234 | * #purple_cmd_unregister, or 0 on failure. |
| 9130 | 235 | */ |
| 15884 | 236 | PurpleCmdId purple_cmd_register(const gchar *cmd, const gchar *args, PurpleCmdPriority p, PurpleCmdFlag f, |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
237 | const gchar *protocol_id, PurpleCmdFunc func, const gchar *helpstr, void *data); |
| 9130 | 238 | |
| 239 | /** | |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
240 | * purple_cmd_unregister: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
241 | * @id: The #PurpleCmdId to unregister, as returned by #purple_cmd_register. |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
242 | * |
| 9130 | 243 | * Unregister a command with the core. |
| 244 | * | |
| 245 | * All registered commands must be unregistered, if they're registered by a plugin | |
| 246 | * or something else that might go away. Normally this is called when the plugin | |
| 247 | * unloads itself. | |
| 248 | */ | |
| 15884 | 249 | void purple_cmd_unregister(PurpleCmdId id); |
| 9130 | 250 | |
| 251 | /** | |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
252 | * purple_cmd_do_command: |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
253 | * @conv: The conversation the command was typed in. |
|
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
254 | * @cmdline: The command the user typed (including all arguments) as a single string. |
| 9130 | 255 | * The caller doesn't have to do any parsing, except removing the command |
| 9597 | 256 | * prefix, which the core has no knowledge of. cmd should not contain any |
| 257 | * formatting, and should be in plain text (no html entities). | |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
258 | * @markup: This is the same as cmd, but is the formatted version. It should be in |
| 9175 | 259 | * HTML, with < > and &, at least, escaped to html entities, and should |
| 260 | * include both the default formatting and any extra manual formatting. | |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
261 | * @errormsg: If the command failed errormsg is filled in with the appropriate error |
|
10788
79d6a09303e7
[gaim-migrate @ 12429]
Richard Laager <rlaager@pidgin.im>
parents:
10231
diff
changeset
|
262 | * message. It must be freed by the caller with g_free(). |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
263 | * |
| 9130 | 264 | * Do a command. |
| 265 | * | |
| 266 | * Normally the UI calls this to perform a command. This might also be useful | |
| 267 | * if aliases are ever implemented. | |
| 268 | * | |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
269 | * Returns: A #PurpleCmdStatus indicating if the command succeeded or failed. |
| 9130 | 270 | */ |
| 15884 | 271 | PurpleCmdStatus purple_cmd_do_command(PurpleConversation *conv, const gchar *cmdline, |
| 9175 | 272 | const gchar *markup, gchar **errormsg); |
| 9130 | 273 | |
| 274 | /** | |
|
38556
5912dabcde42
libpurple: Update documentation to GtkDoc style
Mike Ruprecht <cmaiku@gmail.com>
parents:
38545
diff
changeset
|
275 | * purple_cmd_execute: |
|
5912dabcde42
libpurple: Update documentation to GtkDoc style
Mike Ruprecht <cmaiku@gmail.com>
parents:
38545
diff
changeset
|
276 | * @id: The command to execute. |
|
5912dabcde42
libpurple: Update documentation to GtkDoc style
Mike Ruprecht <cmaiku@gmail.com>
parents:
38545
diff
changeset
|
277 | * @conv: The conversation the command was typed in. |
|
5912dabcde42
libpurple: Update documentation to GtkDoc style
Mike Ruprecht <cmaiku@gmail.com>
parents:
38545
diff
changeset
|
278 | * @cmdline: The command the user typed (only the arguments). |
|
5912dabcde42
libpurple: Update documentation to GtkDoc style
Mike Ruprecht <cmaiku@gmail.com>
parents:
38545
diff
changeset
|
279 | * The caller should remove the prefix and the command name. |
|
5912dabcde42
libpurple: Update documentation to GtkDoc style
Mike Ruprecht <cmaiku@gmail.com>
parents:
38545
diff
changeset
|
280 | * It should not contain any formatting, and should be |
|
5912dabcde42
libpurple: Update documentation to GtkDoc style
Mike Ruprecht <cmaiku@gmail.com>
parents:
38545
diff
changeset
|
281 | * in plain text (no HTML entities). |
|
5912dabcde42
libpurple: Update documentation to GtkDoc style
Mike Ruprecht <cmaiku@gmail.com>
parents:
38545
diff
changeset
|
282 | * |
|
37685
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
283 | * Execute a specific command. |
|
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
284 | * |
|
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
285 | * The UI calls this to execute a command, after parsing the |
|
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
286 | * command name. |
|
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
287 | * |
|
38556
5912dabcde42
libpurple: Update documentation to GtkDoc style
Mike Ruprecht <cmaiku@gmail.com>
parents:
38545
diff
changeset
|
288 | * Returns: %TRUE if the command handled the @cmdline, %FALSE otherwise. |
|
37685
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
289 | */ |
|
37903
caf372ae8882
Fix up the commands execute stuff
Gary Kramlich <grim@reaperworld.com>
parents:
37901
diff
changeset
|
290 | gboolean purple_cmd_execute(PurpleCmdId id, PurpleConversation *conv, |
|
37685
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
291 | const gchar *cmdline); |
|
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
292 | |
|
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
293 | /** |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
294 | * purple_cmd_list: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
295 | * @conv: The conversation, or %NULL. |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
296 | * |
| 9130 | 297 | * List registered commands. |
| 298 | * | |
|
38716
b9bed228745a
Add many libpurple element-type annotations.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38556
diff
changeset
|
299 | * Returns: (element-type utf8) (transfer container): All commands |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
300 | * that are valid in the context of @conv, or all commands, if @conv is |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
301 | * %NULL. Don't keep this list around past the main loop, or anything else that |
| 35419 | 302 | * might unregister a command, as the <type>const char *</type>'s used get freed |
|
20370
f24b280e0c29
Let's document more of cmds.h!
Will Thompson <resiak@pidgin.im>
parents:
20147
diff
changeset
|
303 | * then. |
| 9130 | 304 | */ |
| 15884 | 305 | GList *purple_cmd_list(PurpleConversation *conv); |
| 9130 | 306 | |
| 307 | /** | |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
308 | * purple_cmd_help: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
309 | * @conv: The conversation, or %NULL for no context. |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
310 | * @cmd: The command. No wildcards accepted, but returns help for all |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
311 | * commands if %NULL. |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
312 | * |
| 9130 | 313 | * Get the help string for a command. |
| 314 | * | |
|
38716
b9bed228745a
Add many libpurple element-type annotations.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38556
diff
changeset
|
315 | * Returns: (element-type utf8) (transfer container): the help strings for a |
|
b9bed228745a
Add many libpurple element-type annotations.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38556
diff
changeset
|
316 | * given command, one node for each matching command. |
| 9130 | 317 | */ |
| 15884 | 318 | GList *purple_cmd_help(PurpleConversation *conv, const gchar *cmd); |
| 9130 | 319 | |
|
23555
82dab41b4163
cmd-added and cmd-removed signals to emit when commands are registered/unregistered.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23510
diff
changeset
|
320 | /** |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
321 | * purple_cmds_get_handle: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
322 | * |
|
23555
82dab41b4163
cmd-added and cmd-removed signals to emit when commands are registered/unregistered.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23510
diff
changeset
|
323 | * Get the handle for the commands API |
|
35538
d95fa87c8429
Add missing blank line before 'Returns:'
Ankit Vani <a@nevitus.org>
parents:
35487
diff
changeset
|
324 | * |
|
35393
00f876b129bc
Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents:
32787
diff
changeset
|
325 | * Returns: The handle |
|
23555
82dab41b4163
cmd-added and cmd-removed signals to emit when commands are registered/unregistered.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23510
diff
changeset
|
326 | */ |
|
82dab41b4163
cmd-added and cmd-removed signals to emit when commands are registered/unregistered.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23510
diff
changeset
|
327 | gpointer purple_cmds_get_handle(void); |
|
82dab41b4163
cmd-added and cmd-removed signals to emit when commands are registered/unregistered.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23510
diff
changeset
|
328 | |
|
82dab41b4163
cmd-added and cmd-removed signals to emit when commands are registered/unregistered.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23510
diff
changeset
|
329 | /** |
|
38556
5912dabcde42
libpurple: Update documentation to GtkDoc style
Mike Ruprecht <cmaiku@gmail.com>
parents:
38545
diff
changeset
|
330 | * purple_cmds_set_ui_ops: |
|
5912dabcde42
libpurple: Update documentation to GtkDoc style
Mike Ruprecht <cmaiku@gmail.com>
parents:
38545
diff
changeset
|
331 | * @ops: The UI operations structure. |
|
5912dabcde42
libpurple: Update documentation to GtkDoc style
Mike Ruprecht <cmaiku@gmail.com>
parents:
38545
diff
changeset
|
332 | * |
|
37685
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
333 | * Sets the UI operations structure to be used when registering and |
|
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
334 | * unregistering commands. The UI operations need only be set if the |
|
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
335 | * UI wants to handle the commands itself; otherwise, leave it as NULL. |
|
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
336 | */ |
|
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
337 | void purple_cmds_set_ui_ops(PurpleCommandsUiOps *ops); |
|
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
338 | |
|
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
339 | /** |
|
38556
5912dabcde42
libpurple: Update documentation to GtkDoc style
Mike Ruprecht <cmaiku@gmail.com>
parents:
38545
diff
changeset
|
340 | * purple_cmds_get_ui_ops: |
|
5912dabcde42
libpurple: Update documentation to GtkDoc style
Mike Ruprecht <cmaiku@gmail.com>
parents:
38545
diff
changeset
|
341 | * |
|
37685
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
342 | * Returns the UI operations structure to be used when registering and |
|
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
343 | * unregistering commands. |
|
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
344 | * |
|
38556
5912dabcde42
libpurple: Update documentation to GtkDoc style
Mike Ruprecht <cmaiku@gmail.com>
parents:
38545
diff
changeset
|
345 | * Returns: (transfer none): The UI operations structure. |
|
37685
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
346 | */ |
|
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
347 | PurpleCommandsUiOps *purple_cmds_get_ui_ops(void); |
|
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
348 | |
|
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
349 | /** |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
350 | * purple_cmds_init: |
|
37685
ef161f30f8bc
Add PurpleCommandsUiOps API from instantbird
Florian Quèze <florian@instantbird.org>
parents:
25105
diff
changeset
|
351 | * |
|
23555
82dab41b4163
cmd-added and cmd-removed signals to emit when commands are registered/unregistered.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23510
diff
changeset
|
352 | * Initialize the commands subsystem. |
|
82dab41b4163
cmd-added and cmd-removed signals to emit when commands are registered/unregistered.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23510
diff
changeset
|
353 | */ |
|
82dab41b4163
cmd-added and cmd-removed signals to emit when commands are registered/unregistered.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23510
diff
changeset
|
354 | void purple_cmds_init(void); |
|
82dab41b4163
cmd-added and cmd-removed signals to emit when commands are registered/unregistered.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23510
diff
changeset
|
355 | |
|
82dab41b4163
cmd-added and cmd-removed signals to emit when commands are registered/unregistered.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23510
diff
changeset
|
356 | /** |
|
35397
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
357 | * purple_cmds_uninit: |
|
31fa3a1aeff5
Move changes from soc.2013.gobjectification.gtkdoc to this branch
Ankit Vani <a@nevitus.org>
parents:
35393
diff
changeset
|
358 | * |
|
23555
82dab41b4163
cmd-added and cmd-removed signals to emit when commands are registered/unregistered.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23510
diff
changeset
|
359 | * Uninitialize the commands subsystem. |
|
82dab41b4163
cmd-added and cmd-removed signals to emit when commands are registered/unregistered.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23510
diff
changeset
|
360 | */ |
|
82dab41b4163
cmd-added and cmd-removed signals to emit when commands are registered/unregistered.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23510
diff
changeset
|
361 | void purple_cmds_uninit(void); |
|
82dab41b4163
cmd-added and cmd-removed signals to emit when commands are registered/unregistered.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
23510
diff
changeset
|
362 | |
|
32787
7072f190d6ad
Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
32438
diff
changeset
|
363 | G_END_DECLS |
| 9130 | 364 | |
|
39659
e4dfb99b0cef
Fix libpurple header guards using reserved names.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38745
diff
changeset
|
365 | #endif /* PURPLE_CMDS_H */ |