finch/libgnt/gnttextview.h

branch
soc.2013.gobjectification.plugins
changeset 37023
d9bcdc9a91e6
parent 37021
04c99b24db84
child 37034
9d6765962b22
equal deleted inserted replaced
37022:d891503c8aa6 37023:d9bcdc9a91e6
86 }; 86 };
87 87
88 G_BEGIN_DECLS 88 G_BEGIN_DECLS
89 89
90 /** 90 /**
91 * Returns: GType for GntTextView. 91 * @return GType for GntTextView.
92 */ 92 */
93 GType gnt_text_view_get_gtype(void); 93 GType gnt_text_view_get_gtype(void);
94 94
95 /** 95 /**
96 * Create a new textview. 96 * Create a new textview.
97 * 97 *
98 * Returns: The newly created textview. 98 * @return The newly created textview.
99 */ 99 */
100 GntWidget * gnt_text_view_new(void); 100 GntWidget * gnt_text_view_new(void);
101 101
102 /** 102 /**
103 * Scroll the textview. 103 * Scroll the textview.
104 * @view: The textview to scroll. 104 * @param view The textview to scroll.
105 * @scroll: scroll > 0 means scroll up, < 0 means scroll down, == 0 means scroll to the end. 105 * @param scroll scroll > 0 means scroll up, < 0 means scroll down, == 0 means scroll to the end.
106 */ 106 */
107 void gnt_text_view_scroll(GntTextView *view, int scroll); 107 void gnt_text_view_scroll(GntTextView *view, int scroll);
108 108
109 /** 109 /**
110 * Append new text in a textview. 110 * Append new text in a textview.
111 * 111 *
112 * @view: The textview. 112 * @param view The textview.
113 * @text: The text to append to the textview. 113 * @param text The text to append to the textview.
114 * @flags: The text-flags to apply to the new text. 114 * @param flags The text-flags to apply to the new text.
115 */ 115 */
116 void gnt_text_view_append_text_with_flags(GntTextView *view, const char *text, GntTextFormatFlags flags); 116 void gnt_text_view_append_text_with_flags(GntTextView *view, const char *text, GntTextFormatFlags flags);
117 117
118 /** 118 /**
119 * Append text in the textview, with some identifier (tag) for the added text. 119 * Append text in the textview, with some identifier (tag) for the added text.
120 * 120 *
121 * @view: The textview. 121 * @param view The textview.
122 * @text: The text to append. 122 * @param text The text to append.
123 * @flags: The text-flags to apply to the new text. 123 * @param flags The text-flags to apply to the new text.
124 * @tag: The tag for the appended text, so it can be changed later (@see gnt_text_view_tag_change) 124 * @param tag The tag for the appended text, so it can be changed later (@see gnt_text_view_tag_change)
125 */ 125 */
126 void gnt_text_view_append_text_with_tag(GntTextView *view, const char *text, GntTextFormatFlags flags, const char *tag); 126 void gnt_text_view_append_text_with_tag(GntTextView *view, const char *text, GntTextFormatFlags flags, const char *tag);
127 127
128 /** 128 /**
129 * Move the cursor to the beginning of the next line and resets text-attributes. 129 * Move the cursor to the beginning of the next line and resets text-attributes.
130 * It first completes the current line with the current text-attributes. 130 * It first completes the current line with the current text-attributes.
131 * 131 *
132 * @view: The textview. 132 * @param view The textview.
133 */ 133 */
134 void gnt_text_view_next_line(GntTextView *view); 134 void gnt_text_view_next_line(GntTextView *view);
135 135
136 /** 136 /**
137 * Convert GNT-text formats to ncurses-text attributes. 137 * Convert GNT-text formats to ncurses-text attributes.
138 * 138 *
139 * @flags: The GNT text format. 139 * @param flags The GNT text format.
140 * 140 *
141 * Returns: Nucrses text attribute. 141 * @return Nucrses text attribute.
142 */ 142 */
143 chtype gnt_text_format_flag_to_chtype(GntTextFormatFlags flags); 143 chtype gnt_text_format_flag_to_chtype(GntTextFormatFlags flags);
144 144
145 /** 145 /**
146 * Clear the contents of the textview. 146 * Clear the contents of the textview.
147 * 147 *
148 * @view: The textview. 148 * @param view The textview.
149 */ 149 */
150 void gnt_text_view_clear(GntTextView *view); 150 void gnt_text_view_clear(GntTextView *view);
151 151
152 /** 152 /**
153 * The number of lines below the bottom-most visible line. 153 * The number of lines below the bottom-most visible line.
154 * 154 *
155 * @view: The textview. 155 * @param view The textview.
156 * 156 *
157 * Returns: Number of lines below the bottom-most visible line. 157 * @return Number of lines below the bottom-most visible line.
158 */ 158 */
159 int gnt_text_view_get_lines_below(GntTextView *view); 159 int gnt_text_view_get_lines_below(GntTextView *view);
160 160
161 /** 161 /**
162 * The number of lines above the topmost visible line. 162 * The number of lines above the topmost visible line.
163 * 163 *
164 * @view: The textview. 164 * @param view The textview.
165 * 165 *
166 * Returns: Number of lines above the topmost visible line. 166 * @return Number of lines above the topmost visible line.
167 */ 167 */
168 int gnt_text_view_get_lines_above(GntTextView *view); 168 int gnt_text_view_get_lines_above(GntTextView *view);
169 169
170 /** 170 /**
171 * Change the text of a tag. 171 * Change the text of a tag.
172 * 172 *
173 * @view: The textview. 173 * @param view The textview.
174 * @name: The name of the tag. 174 * @param name The name of the tag.
175 * @text: The new text for the text. If 'text' is %NULL, the tag is removed. 175 * @param text The new text for the text. If 'text' is @c NULL, the tag is removed.
176 * @all: %TRUE if all of the instancess of the tag should be changed, %FALSE if 176 * @param all @c TRUE if all of the instancess of the tag should be changed, @c FALSE if
177 * only the first instance should be changed. 177 * only the first instance should be changed.
178 * 178 *
179 * Returns: The number of instances changed. 179 * @return The number of instances changed.
180 */ 180 */
181 int gnt_text_view_tag_change(GntTextView *view, const char *name, const char *text, gboolean all); 181 int gnt_text_view_tag_change(GntTextView *view, const char *name, const char *text, gboolean all);
182 182
183 /** 183 /**
184 * Setup hooks so that pressing up/down/page-up/page-down keys when 'widget' is 184 * Setup hooks so that pressing up/down/page-up/page-down keys when 'widget' is
185 * in focus scrolls the textview. 185 * in focus scrolls the textview.
186 * 186 *
187 * @view: The textview. 187 * @param view The textview.
188 * @widget: The trigger widget. 188 * @param widget The trigger widget.
189 */ 189 */
190 void gnt_text_view_attach_scroll_widget(GntTextView *view, GntWidget *widget); 190 void gnt_text_view_attach_scroll_widget(GntTextView *view, GntWidget *widget);
191 191
192 /** 192 /**
193 * Setup appropriate hooks so that pressing some keys when the 'pager' widget 193 * Setup appropriate hooks so that pressing some keys when the 'pager' widget
201 * [pager] 201 * [pager]
202 * key = a-v 202 * key = a-v
203 * path = /path/to/pager 203 * path = /path/to/pager
204 * @endcode 204 * @endcode
205 * 205 *
206 * @view: The textview. 206 * @param view The textview.
207 * @pager: The widget to trigger the PAGER. 207 * @param pager The widget to trigger the PAGER.
208 */ 208 */
209 void gnt_text_view_attach_pager_widget(GntTextView *view, GntWidget *pager); 209 void gnt_text_view_attach_pager_widget(GntTextView *view, GntWidget *pager);
210 210
211 /** 211 /**
212 * Setup appropriate hooks so that pressing some keys when 'widget' 212 * Setup appropriate hooks so that pressing some keys when 'widget'
220 * [editor] 220 * [editor]
221 * key = a-e 221 * key = a-e
222 * path = /path/to/editor 222 * path = /path/to/editor
223 * @endcode 223 * @endcode
224 * 224 *
225 * @view: The textview. 225 * @param view The textview.
226 * @widget: The widget to trigger the EDITOR. 226 * @param widget The widget to trigger the EDITOR.
227 */ 227 */
228 void gnt_text_view_attach_editor_widget(GntTextView *view, GntWidget *widget); 228 void gnt_text_view_attach_editor_widget(GntTextView *view, GntWidget *widget);
229 229
230 /** 230 /**
231 * Set a GntTextViewFlag for the textview widget. 231 * Set a GntTextViewFlag for the textview widget.
232 * 232 *
233 * @view: The textview widget 233 * @param view The textview widget
234 * @flag: The flag to set 234 * @param flag The flag to set
235 * 235 *
236 * @since 2.0.0 (gnt), 2.1.0 (pidgin) 236 * @since 2.0.0 (gnt), 2.1.0 (pidgin)
237 */ 237 */
238 void gnt_text_view_set_flag(GntTextView *view, GntTextViewFlag flag); 238 void gnt_text_view_set_flag(GntTextView *view, GntTextViewFlag flag);
239 239

mercurial