1 | /* |
2 | * Copyright (C) 2012 Igalia S.L. |
3 | * |
4 | * This library is free software; you can redistribute it and/or |
5 | * modify it under the terms of the GNU Library General Public |
6 | * License as published by the Free Software Foundation; either |
7 | * version 2 of the License, or (at your option) any later version. |
8 | * |
9 | * This library is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 | * Library General Public License for more details. |
13 | * |
14 | * You should have received a copy of the GNU Library General Public License |
15 | * along with this library; see the file COPYING.LIB. If not, write to |
16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
17 | * Boston, MA 02110-1301, USA. |
18 | */ |
19 | |
20 | #if !defined(__WEBKIT2_H_INSIDE__) && !defined(WEBKIT2_COMPILATION) |
21 | #error "Only <webkit2/webkit2.h> can be included directly." |
22 | #endif |
23 | |
24 | #ifndef WebKitEditingCommands_h |
25 | #define WebKitEditingCommands_h |
26 | |
27 | G_BEGIN_DECLS |
28 | |
29 | /** |
30 | * WEBKIT_EDITING_COMMAND_CUT: |
31 | * |
32 | * The cut clipboard command. Copies the current selection inside |
33 | * a #WebKitWebView to the clipboard and deletes the selected content. |
34 | * You can check whether it's possible to execute the command with |
35 | * webkit_web_view_can_execute_editing_command(). In general it's |
36 | * possible to cut to the clipboard when the #WebKitWebView content is |
37 | * editable and there is an active selection. |
38 | */ |
39 | #define WEBKIT_EDITING_COMMAND_CUT "Cut" |
40 | |
41 | /** |
42 | * WEBKIT_EDITING_COMMAND_COPY: |
43 | * |
44 | * The copy clipboard command. Copies the current selection inside |
45 | * a #WebKitWebView to the clipboard. |
46 | * You can check whether it's possible to execute the command with |
47 | * webkit_web_view_can_execute_editing_command(). In general it's |
48 | * possible to copy to the clipboard when there is an active selection |
49 | * inside the #WebKitWebView. |
50 | */ |
51 | #define WEBKIT_EDITING_COMMAND_COPY "Copy" |
52 | |
53 | /** |
54 | * WEBKIT_EDITING_COMMAND_PASTE: |
55 | * |
56 | * The paste clipboard command. Pastes the contents of the clipboard to |
57 | * a #WebKitWebView. |
58 | * You can check whether it's possible to execute the command with |
59 | * webkit_web_view_can_execute_editing_command(). In general it's possible |
60 | * to paste from the clipboard when the #WebKitWebView content is editable |
61 | * and clipboard is not empty. |
62 | */ |
63 | #define WEBKIT_EDITING_COMMAND_PASTE "Paste" |
64 | |
65 | /** |
66 | * WEBKIT_EDITING_COMMAND_SELECT_ALL: |
67 | * |
68 | * The select all command. Selects all the content of the current text field in |
69 | * a #WebKitWebView. |
70 | * It is always possible to select all text, no matter whether the |
71 | * #WebKitWebView content is editable or not. You can still check it |
72 | * with webkit_web_view_can_execute_editing_command(). |
73 | */ |
74 | #define WEBKIT_EDITING_COMMAND_SELECT_ALL "SelectAll" |
75 | |
76 | /** |
77 | * WEBKIT_EDITING_COMMAND_UNDO: |
78 | * |
79 | * The undo command. Undoes the last editing command in a #WebKitWebView. |
80 | * You can check whether it's possible to execute the command with |
81 | * webkit_web_view_can_execute_editing_command(). It's only possible |
82 | * to undo a command after a previously executed editing operation. |
83 | */ |
84 | #define WEBKIT_EDITING_COMMAND_UNDO "Undo" |
85 | |
86 | /** |
87 | * WEBKIT_EDITING_COMMAND_REDO: |
88 | * |
89 | * The redo command. Redoes a previously undone editing command in |
90 | * a #WebKitWebView. |
91 | * You can check whether it's possible to execute the command with |
92 | * webkit_web_view_can_execute_editing_command(). It's only possible |
93 | * to redo a command when it has been previously undone. |
94 | */ |
95 | #define WEBKIT_EDITING_COMMAND_REDO "Redo" |
96 | |
97 | /** |
98 | * WEBKIT_EDITING_COMMAND_INSERT_IMAGE: |
99 | * |
100 | * The insert image command. Creates an image element that is inserted at |
101 | * the current cursor position. It receives an URI as argument, |
102 | * that is used as the image source. This command should be executed with |
103 | * webkit_web_view_execute_editing_command_with_argument(). |
104 | * |
105 | * Since: 2.10 |
106 | */ |
107 | #define WEBKIT_EDITING_COMMAND_INSERT_IMAGE "InsertImage" |
108 | |
109 | /** |
110 | * WEBKIT_EDITING_COMMAND_CREATE_LINK: |
111 | * |
112 | * The create link command. Creates a link element that is inserted at |
113 | * the current cursor position. If there's a selection, the selected text |
114 | * will be used as the link text, otherwise the URL itself will be used. |
115 | * It receives the link URL as argument. This command should be executed |
116 | * with webkit_web_view_execute_editing_command_with_argument() |
117 | * |
118 | * Since: 2.10 |
119 | */ |
120 | #define WEBKIT_EDITING_COMMAND_CREATE_LINK "CreateLink" |
121 | |
122 | G_END_DECLS |
123 | |
124 | #endif |
125 | |