Mercurial > pidgin
comparison src/gtkimhtml.h @ 10814:364a2ef907ae
[gaim-migrate @ 12468]
same thing here, changing to consistently using GTK+, by rlaager
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Mon, 11 Apr 2005 12:24:47 +0000 |
parents | 6f67d4088da0 |
children | 409d6a11da51 |
comparison
equal
deleted
inserted
replaced
10813:290131d5f626 | 10814:364a2ef907ae |
---|---|
243 * @return The GType for an IM/HTML widget. | 243 * @return The GType for an IM/HTML widget. |
244 */ | 244 */ |
245 GType gtk_imhtml_get_type(void); | 245 GType gtk_imhtml_get_type(void); |
246 | 246 |
247 /** | 247 /** |
248 * Creates and returns a new GTK IM/HTML widget. | 248 * Creates and returns a new GTK+ IM/HTML widget. |
249 * | 249 * |
250 * @return The GTK IM/HTML widget created. | 250 * @return The GTK+ IM/HTML widget created. |
251 */ | 251 */ |
252 GtkWidget *gtk_imhtml_new(void *, void *); | 252 GtkWidget *gtk_imhtml_new(void *, void *); |
253 | 253 |
254 /** | 254 /** |
255 * Returns the smiley object associated with the text. | 255 * Returns the smiley object associated with the text. |
256 * | 256 * |
257 * @param imhtml The GTK IM/HTML. | 257 * @param imhtml The GTK+ IM/HTML. |
258 * @param sml The name of the smiley category. | 258 * @param sml The name of the smiley category. |
259 * @param text The text associated with the smiley. | 259 * @param text The text associated with the smiley. |
260 */ | 260 */ |
261 | 261 |
262 GtkIMHtmlSmiley *gtk_imhtml_smiley_get(GtkIMHtml * imhtml, | 262 GtkIMHtmlSmiley *gtk_imhtml_smiley_get(GtkIMHtml * imhtml, |
263 const gchar * sml, const gchar * text); | 263 const gchar * sml, const gchar * text); |
264 | 264 |
265 | 265 |
266 /** | 266 /** |
267 * Associates a smiley with a GTK IM/HTML. | 267 * Associates a smiley with a GTK+ IM/HTML. |
268 * | 268 * |
269 * @param imhtml The GTK IM/HTML. | 269 * @param imhtml The GTK+ IM/HTML. |
270 * @param sml The name of the smiley category. | 270 * @param sml The name of the smiley category. |
271 * @param smiley The GtkIMSmiley to associate. | 271 * @param smiley The GtkIMSmiley to associate. |
272 */ | 272 */ |
273 void gtk_imhtml_associate_smiley(GtkIMHtml *imhtml, const gchar *sml, GtkIMHtmlSmiley *smiley); | 273 void gtk_imhtml_associate_smiley(GtkIMHtml *imhtml, const gchar *sml, GtkIMHtmlSmiley *smiley); |
274 | 274 |
275 /** | 275 /** |
276 * Removes all smileys associated with a GTK IM/HTML. | 276 * Removes all smileys associated with a GTK+ IM/HTML. |
277 * | 277 * |
278 * @param imhtml The GTK IM/HTML. | 278 * @param imhtml The GTK+ IM/HTML. |
279 */ | 279 */ |
280 void gtk_imhtml_remove_smileys(GtkIMHtml *imhtml); | 280 void gtk_imhtml_remove_smileys(GtkIMHtml *imhtml); |
281 | 281 |
282 /** | 282 /** |
283 * Sets the function callbacks to use with a GTK IM/HTML instance. | 283 * Sets the function callbacks to use with a GTK+ IM/HTML instance. |
284 * | 284 * |
285 * @param imhtml The GTK IM/HTML. | 285 * @param imhtml The GTK+ IM/HTML. |
286 * @param f The GtkIMHTMLFuncs struct containing the functions to use. | 286 * @param f The GtkIMHTMLFuncs struct containing the functions to use. |
287 */ | 287 */ |
288 void gtk_imhtml_set_funcs(GtkIMHtml *imhtml, GtkIMHtmlFuncs *f); | 288 void gtk_imhtml_set_funcs(GtkIMHtml *imhtml, GtkIMHtmlFuncs *f); |
289 | 289 |
290 /** | 290 /** |
291 * Enables or disables showing the contents of HTML comments in a GTK IM/HTML. | 291 * Enables or disables showing the contents of HTML comments in a GTK+ IM/HTML. |
292 * | 292 * |
293 * @param imhtml The GTK IM/HTML. | 293 * @param imhtml The GTK+ IM/HTML. |
294 * @param show @c TRUE if comments should be shown, or @c FALSE otherwise. | 294 * @param show @c TRUE if comments should be shown, or @c FALSE otherwise. |
295 */ | 295 */ |
296 void gtk_imhtml_show_comments(GtkIMHtml *imhtml, gboolean show); | 296 void gtk_imhtml_show_comments(GtkIMHtml *imhtml, gboolean show); |
297 | 297 |
298 /** | 298 /** |
299 * Associates a protocol name with a GTK IM/HTML. | 299 * Associates a protocol name with a GTK+ IM/HTML. |
300 * | 300 * |
301 * @param imhtml The GTK IM/HTML. | 301 * @param imhtml The GTK+ IM/HTML. |
302 * @param protocol_name The protocol name to associate with the IM/HTML. | 302 * @param protocol_name The protocol name to associate with the IM/HTML. |
303 */ | 303 */ |
304 void gtk_imhtml_set_protocol_name(GtkIMHtml *imhtml, const gchar *protocol_name); | 304 void gtk_imhtml_set_protocol_name(GtkIMHtml *imhtml, const gchar *protocol_name); |
305 | 305 |
306 /** | 306 /** |
307 * Appends HTML formatted text to a GTK IM/HTML. | 307 * Appends HTML formatted text to a GTK+ IM/HTML. |
308 * | 308 * |
309 * @param imhtml The GTK IM/HTML. | 309 * @param imhtml The GTK+ IM/HTML. |
310 * @param text The formatted text to append. | 310 * @param text The formatted text to append. |
311 * @param options A GtkIMHtmlOptions object indicating insert behavior. | 311 * @param options A GtkIMHtmlOptions object indicating insert behavior. |
312 */ | 312 */ |
313 #define gtk_imhtml_append_text(imhtml, text, options) \ | 313 #define gtk_imhtml_append_text(imhtml, text, options) \ |
314 gtk_imhtml_append_text_with_images(imhtml, text, options, NULL) | 314 gtk_imhtml_append_text_with_images(imhtml, text, options, NULL) |
315 | 315 |
316 /** | 316 /** |
317 * Appends HTML formatted text to a GTK IM/HTML. | 317 * Appends HTML formatted text to a GTK+ IM/HTML. |
318 * | 318 * |
319 * @param imhtml The GTK IM/HTML. | 319 * @param imhtml The GTK+ IM/HTML. |
320 * @param text The formatted text to append. | 320 * @param text The formatted text to append. |
321 * @param options A GtkIMHtmlOptions object indicating insert behavior. | 321 * @param options A GtkIMHtmlOptions object indicating insert behavior. |
322 * @param unused Use @c NULL value. | 322 * @param unused Use @c NULL value. |
323 */ | 323 */ |
324 void gtk_imhtml_append_text_with_images(GtkIMHtml *imhtml, | 324 void gtk_imhtml_append_text_with_images(GtkIMHtml *imhtml, |
325 const gchar *text, | 325 const gchar *text, |
326 GtkIMHtmlOptions options, | 326 GtkIMHtmlOptions options, |
327 GSList *unused); | 327 GSList *unused); |
328 | 328 |
329 /** | 329 /** |
330 * Inserts HTML formatted text to a GTK IM/HTML at a given iter. | 330 * Inserts HTML formatted text to a GTK+ IM/HTML at a given iter. |
331 * | 331 * |
332 * @param imhtml The GTK IM/HTML. | 332 * @param imhtml The GTK+ IM/HTML. |
333 * @param text The formatted text to append. | 333 * @param text The formatted text to append. |
334 * @param options A GtkIMHtmlOptions object indicating insert behavior. | 334 * @param options A GtkIMHtmlOptions object indicating insert behavior. |
335 * @param iter A GtkTextIter in the GTK IM/HTML at which to insert text. | 335 * @param iter A GtkTextIter in the GTK+ IM/HTML at which to insert text. |
336 */ | 336 */ |
337 void gtk_imhtml_insert_html_at_iter(GtkIMHtml *imhtml, | 337 void gtk_imhtml_insert_html_at_iter(GtkIMHtml *imhtml, |
338 const gchar *text, | 338 const gchar *text, |
339 GtkIMHtmlOptions options, | 339 GtkIMHtmlOptions options, |
340 GtkTextIter *iter); | 340 GtkTextIter *iter); |
341 | 341 |
342 /** | 342 /** |
343 * Scrolls a GTK IM/HTML to the end of its contents. | 343 * Scrolls a GTK+ IM/HTML to the end of its contents. |
344 * | 344 * |
345 * @param imhtml The GTK IM/HTML. | 345 * @param imhtml The GTK+ IM/HTML. |
346 */ | 346 */ |
347 void gtk_imhtml_scroll_to_end(GtkIMHtml *imhtml); | 347 void gtk_imhtml_scroll_to_end(GtkIMHtml *imhtml); |
348 | 348 |
349 /** | 349 /** |
350 * Purges the contents from a GTK IM/HTML and resets formatting. | 350 * Purges the contents from a GTK+ IM/HTML and resets formatting. |
351 * | 351 * |
352 * @param imhtml The GTK IM/HTML. | 352 * @param imhtml The GTK+ IM/HTML. |
353 */ | 353 */ |
354 void gtk_imhtml_clear(GtkIMHtml *imhtml); | 354 void gtk_imhtml_clear(GtkIMHtml *imhtml); |
355 | 355 |
356 /** | 356 /** |
357 * Scrolls a GTK IM/HTML up by one page. | 357 * Scrolls a GTK+ IM/HTML up by one page. |
358 * | 358 * |
359 * @param imhtml The GTK IM/HTML. | 359 * @param imhtml The GTK+ IM/HTML. |
360 */ | 360 */ |
361 void gtk_imhtml_page_up(GtkIMHtml *imhtml); | 361 void gtk_imhtml_page_up(GtkIMHtml *imhtml); |
362 | 362 |
363 /** | 363 /** |
364 * Scrolls a GTK IM/HTML down by one page. | 364 * Scrolls a GTK+ IM/HTML down by one page. |
365 * | 365 * |
366 * @param imhtml The GTK IM/HTML. | 366 * @param imhtml The GTK+ IM/HTML. |
367 */ | 367 */ |
368 void gtk_imhtml_page_down(GtkIMHtml *imhtml); | 368 void gtk_imhtml_page_down(GtkIMHtml *imhtml); |
369 | 369 |
370 /** | 370 /** |
371 * Creates and returns an new GTK IM/HTML scalable object. | 371 * Creates and returns an new GTK+ IM/HTML scalable object. |
372 * | 372 * |
373 * @return A new IM/HTML Scalable object. | 373 * @return A new IM/HTML Scalable object. |
374 */ | 374 */ |
375 GtkIMHtmlScalable *gtk_imhtml_scalable_new(); | 375 GtkIMHtmlScalable *gtk_imhtml_scalable_new(); |
376 | 376 |
377 /** | 377 /** |
378 * Creates and returns an new GTK IM/HTML scalable object with an image. | 378 * Creates and returns an new GTK+ IM/HTML scalable object with an image. |
379 * | 379 * |
380 * @param img A GdkPixbuf of the image to add. | 380 * @param img A GdkPixbuf of the image to add. |
381 * @param filename The filename to associate with the image. | 381 * @param filename The filename to associate with the image. |
382 * @param id The id to associate with the image. | 382 * @param id The id to associate with the image. |
383 * | 383 * |
384 * @return A new IM/HTML Scalable object with an image. | 384 * @return A new IM/HTML Scalable object with an image. |
385 */ | 385 */ |
386 GtkIMHtmlScalable *gtk_imhtml_image_new(GdkPixbuf *img, const gchar *filename, int id); | 386 GtkIMHtmlScalable *gtk_imhtml_image_new(GdkPixbuf *img, const gchar *filename, int id); |
387 | 387 |
388 /** | 388 /** |
389 * Destroys and frees a GTK IM/HTML scalable image. | 389 * Destroys and frees a GTK+ IM/HTML scalable image. |
390 * | 390 * |
391 * @param scale The GTK IM/HTML scalable. | 391 * @param scale The GTK+ IM/HTML scalable. |
392 */ | 392 */ |
393 void gtk_imhtml_image_free(GtkIMHtmlScalable *scale); | 393 void gtk_imhtml_image_free(GtkIMHtmlScalable *scale); |
394 | 394 |
395 /** | 395 /** |
396 * Rescales a GTK IM/HTML scalable image to a given size. | 396 * Rescales a GTK+ IM/HTML scalable image to a given size. |
397 * | 397 * |
398 * @param scale The GTK IM/HTML scalable. | 398 * @param scale The GTK+ IM/HTML scalable. |
399 * @param width The new width. | 399 * @param width The new width. |
400 * @param height The new height. | 400 * @param height The new height. |
401 */ | 401 */ |
402 void gtk_imhtml_image_scale(GtkIMHtmlScalable *scale, int width, int height); | 402 void gtk_imhtml_image_scale(GtkIMHtmlScalable *scale, int width, int height); |
403 | 403 |
404 /** | 404 /** |
405 * Adds a GTK IM/HTML scalable image to a given GTK IM/HTML at a given iter. | 405 * Adds a GTK+ IM/HTML scalable image to a given GTK+ IM/HTML at a given iter. |
406 * | 406 * |
407 * @param scale The GTK IM/HTML scalable. | 407 * @param scale The GTK+ IM/HTML scalable. |
408 * @param imhtml The GTK IM/HTML. | 408 * @param imhtml The GTK+ IM/HTML. |
409 * @param iter The GtkTextIter at which to add the scalable. | 409 * @param iter The GtkTextIter at which to add the scalable. |
410 */ | 410 */ |
411 void gtk_imhtml_image_add_to(GtkIMHtmlScalable *scale, GtkIMHtml *imhtml, GtkTextIter *iter); | 411 void gtk_imhtml_image_add_to(GtkIMHtmlScalable *scale, GtkIMHtml *imhtml, GtkTextIter *iter); |
412 | 412 |
413 /** | 413 /** |
414 * Creates and returns an new GTK IM/HTML scalable with a horizontal rule. | 414 * Creates and returns an new GTK+ IM/HTML scalable with a horizontal rule. |
415 * | 415 * |
416 * @return A new IM/HTML Scalable object with an image. | 416 * @return A new IM/HTML Scalable object with an image. |
417 */ | 417 */ |
418 GtkIMHtmlScalable *gtk_imhtml_hr_new(); | 418 GtkIMHtmlScalable *gtk_imhtml_hr_new(); |
419 | 419 |
420 /** | 420 /** |
421 * Destroys and frees a GTK IM/HTML scalable horizontal rule. | 421 * Destroys and frees a GTK+ IM/HTML scalable horizontal rule. |
422 * | 422 * |
423 * @param scale The GTK IM/HTML scalable. | 423 * @param scale The GTK+ IM/HTML scalable. |
424 */ | 424 */ |
425 void gtk_imhtml_hr_free(GtkIMHtmlScalable *scale); | 425 void gtk_imhtml_hr_free(GtkIMHtmlScalable *scale); |
426 | 426 |
427 /** | 427 /** |
428 * Rescales a GTK IM/HTML scalable horizontal rule to a given size. | 428 * Rescales a GTK+ IM/HTML scalable horizontal rule to a given size. |
429 * | 429 * |
430 * @param scale The GTK IM/HTML scalable. | 430 * @param scale The GTK+ IM/HTML scalable. |
431 * @param width The new width. | 431 * @param width The new width. |
432 * @param height The new height. | 432 * @param height The new height. |
433 */ | 433 */ |
434 void gtk_imhtml_hr_scale(GtkIMHtmlScalable *scale, int width, int height); | 434 void gtk_imhtml_hr_scale(GtkIMHtmlScalable *scale, int width, int height); |
435 | 435 |
436 /** | 436 /** |
437 * Adds a GTK IM/HTML scalable horizontal rule to a given GTK IM/HTML at | 437 * Adds a GTK+ IM/HTML scalable horizontal rule to a given GTK+ IM/HTML at |
438 * a given iter. | 438 * a given iter. |
439 * | 439 * |
440 * @param scale The GTK IM/HTML scalable. | 440 * @param scale The GTK+ IM/HTML scalable. |
441 * @param imhtml The GTK IM/HTML. | 441 * @param imhtml The GTK+ IM/HTML. |
442 * @param iter The GtkTextIter at which to add the scalable. | 442 * @param iter The GtkTextIter at which to add the scalable. |
443 */ | 443 */ |
444 void gtk_imhtml_hr_add_to(GtkIMHtmlScalable *scale, GtkIMHtml *imhtml, GtkTextIter *iter); | 444 void gtk_imhtml_hr_add_to(GtkIMHtmlScalable *scale, GtkIMHtml *imhtml, GtkTextIter *iter); |
445 | 445 |
446 /** | 446 /** |
447 * Finds and highlights a given string in a GTK IM/HTML. | 447 * Finds and highlights a given string in a GTK+ IM/HTML. |
448 * | 448 * |
449 * @param imhtml The GTK IM/HTML. | 449 * @param imhtml The GTK+ IM/HTML. |
450 * @param text The string to search for. | 450 * @param text The string to search for. |
451 * | 451 * |
452 * @return @c TRUE if a search was performed, or @c FALSE if not. | 452 * @return @c TRUE if a search was performed, or @c FALSE if not. |
453 */ | 453 */ |
454 gboolean gtk_imhtml_search_find(GtkIMHtml *imhtml, const gchar *text); | 454 gboolean gtk_imhtml_search_find(GtkIMHtml *imhtml, const gchar *text); |
455 | 455 |
456 /** | 456 /** |
457 * Clears the highlighting from a prior search in a GTK IM/HTML. | 457 * Clears the highlighting from a prior search in a GTK+ IM/HTML. |
458 * | 458 * |
459 * @param imhtml The GTK IM/HTML. | 459 * @param imhtml The GTK+ IM/HTML. |
460 */ | 460 */ |
461 void gtk_imhtml_search_clear(GtkIMHtml *imhtml); | 461 void gtk_imhtml_search_clear(GtkIMHtml *imhtml); |
462 | 462 |
463 /** | 463 /** |
464 * Enables or disables editing in a GTK IM/HTML. | 464 * Enables or disables editing in a GTK+ IM/HTML. |
465 * | 465 * |
466 * @param imhtml The GTK IM/HTML. | 466 * @param imhtml The GTK+ IM/HTML. |
467 * @param editable @c TRUE to make the widget editable, or @c FALSE otherwise. | 467 * @param editable @c TRUE to make the widget editable, or @c FALSE otherwise. |
468 */ | 468 */ |
469 void gtk_imhtml_set_editable(GtkIMHtml *imhtml, gboolean editable); | 469 void gtk_imhtml_set_editable(GtkIMHtml *imhtml, gboolean editable); |
470 | 470 |
471 /** | 471 /** |
472 * Enables or disables whole buffer formatting only (wbfo) in a GTK IM/HTML. | 472 * Enables or disables whole buffer formatting only (wbfo) in a GTK+ IM/HTML. |
473 * In this mode formatting options to the buffer take effect for the entire | 473 * In this mode formatting options to the buffer take effect for the entire |
474 * buffer instead of specific text. | 474 * buffer instead of specific text. |
475 * | 475 * |
476 * @param imhtml The GTK IM/HTML. | 476 * @param imhtml The GTK+ IM/HTML. |
477 * @param wbfo @c TRUE to enable the mode, or @c FALSE otherwise. | 477 * @param wbfo @c TRUE to enable the mode, or @c FALSE otherwise. |
478 */ | 478 */ |
479 void gtk_imhtml_set_whole_buffer_formatting_only(GtkIMHtml *imhtml, gboolean wbfo); | 479 void gtk_imhtml_set_whole_buffer_formatting_only(GtkIMHtml *imhtml, gboolean wbfo); |
480 | 480 |
481 /** | 481 /** |
482 * Indicates which formatting functions to enable and disable in a GTK IM/HTML. | 482 * Indicates which formatting functions to enable and disable in a GTK+ IM/HTML. |
483 * | 483 * |
484 * @param imhtml The GTK IM/HTML. | 484 * @param imhtml The GTK+ IM/HTML. |
485 * @param buttons A GtkIMHtmlButtons bitmask indicating which functions to use. | 485 * @param buttons A GtkIMHtmlButtons bitmask indicating which functions to use. |
486 */ | 486 */ |
487 void gtk_imhtml_set_format_functions(GtkIMHtml *imhtml, GtkIMHtmlButtons buttons); | 487 void gtk_imhtml_set_format_functions(GtkIMHtml *imhtml, GtkIMHtmlButtons buttons); |
488 | 488 |
489 /** | 489 /** |
490 * Returns which formatting functions are enabled in a GTK IM/HTML. | 490 * Returns which formatting functions are enabled in a GTK+ IM/HTML. |
491 * | 491 * |
492 * @param imhtml The GTK IM/HTML. | 492 * @param imhtml The GTK+ IM/HTML. |
493 * | 493 * |
494 * @return A GtkIMHtmlButtons bitmask indicating which functions to are enabled. | 494 * @return A GtkIMHtmlButtons bitmask indicating which functions to are enabled. |
495 */ | 495 */ |
496 GtkIMHtmlButtons gtk_imhtml_get_format_functions(GtkIMHtml *imhtml); | 496 GtkIMHtmlButtons gtk_imhtml_get_format_functions(GtkIMHtml *imhtml); |
497 | 497 |
498 /** | 498 /** |
499 * Sets each boolean to TRUE if that formatting option is enabled at the | 499 * Sets each boolean to TRUE if that formatting option is enabled at the |
500 * current position in a GTK IM/HTML. | 500 * current position in a GTK+ IM/HTML. |
501 * | 501 * |
502 * @param imhtml The GTK IM/HTML. | 502 * @param imhtml The GTK+ IM/HTML. |
503 * @param bold A reference to a boolean for bold. | 503 * @param bold A reference to a boolean for bold. |
504 * @param italic A reference to a boolean for italic. | 504 * @param italic A reference to a boolean for italic. |
505 * @param underline A reference to a boolean for underline. | 505 * @param underline A reference to a boolean for underline. |
506 */ | 506 */ |
507 void gtk_imhtml_get_current_format(GtkIMHtml *imhtml, gboolean *bold, gboolean *italic, gboolean *underline); | 507 void gtk_imhtml_get_current_format(GtkIMHtml *imhtml, gboolean *bold, gboolean *italic, gboolean *underline); |
508 | 508 |
509 /** | 509 /** |
510 * Returns a string containing the selected font face at the current position | 510 * Returns a string containing the selected font face at the current position |
511 * in a GTK IM/HTML. | 511 * in a GTK+ IM/HTML. |
512 * | 512 * |
513 * @param imhtml The GTK IM/HTML. | 513 * @param imhtml The GTK+ IM/HTML. |
514 * | 514 * |
515 * @return A string containg the font face or @c NULL if none is set. | 515 * @return A string containg the font face or @c NULL if none is set. |
516 */ | 516 */ |
517 char *gtk_imhtml_get_current_fontface(GtkIMHtml *imhtml); | 517 char *gtk_imhtml_get_current_fontface(GtkIMHtml *imhtml); |
518 | 518 |
519 /** | 519 /** |
520 * Returns a string containing the selected foreground color at the current | 520 * Returns a string containing the selected foreground color at the current |
521 * position in a GTK IM/HTML. | 521 * position in a GTK+ IM/HTML. |
522 * | 522 * |
523 * @param imhtml The GTK IM/HTML. | 523 * @param imhtml The GTK+ IM/HTML. |
524 * | 524 * |
525 * @return A string containg the foreground color or @c NULL if none is set. | 525 * @return A string containg the foreground color or @c NULL if none is set. |
526 */ | 526 */ |
527 char *gtk_imhtml_get_current_forecolor(GtkIMHtml *imhtml); | 527 char *gtk_imhtml_get_current_forecolor(GtkIMHtml *imhtml); |
528 | 528 |
529 /** | 529 /** |
530 * Returns a string containing the selected font background color at the current | 530 * Returns a string containing the selected font background color at the current |
531 * position in a GTK IM/HTML. | 531 * position in a GTK+ IM/HTML. |
532 * | 532 * |
533 * @param imhtml The GTK IM/HTML. | 533 * @param imhtml The GTK+ IM/HTML. |
534 * | 534 * |
535 * @return A string containg the font background color or @c NULL if none is set. | 535 * @return A string containg the font background color or @c NULL if none is set. |
536 */ | 536 */ |
537 char *gtk_imhtml_get_current_backcolor(GtkIMHtml *imhtml); | 537 char *gtk_imhtml_get_current_backcolor(GtkIMHtml *imhtml); |
538 | 538 |
539 /** | 539 /** |
540 * Returns a string containing the selected background color at the current | 540 * Returns a string containing the selected background color at the current |
541 * position in a GTK IM/HTML. | 541 * position in a GTK+ IM/HTML. |
542 * | 542 * |
543 * @param imhtml The GTK IM/HTML. | 543 * @param imhtml The GTK+ IM/HTML. |
544 * | 544 * |
545 * @return A string containg the background color or @c NULL if none is set. | 545 * @return A string containg the background color or @c NULL if none is set. |
546 */ | 546 */ |
547 char *gtk_imhtml_get_current_background(GtkIMHtml *imhtml); | 547 char *gtk_imhtml_get_current_background(GtkIMHtml *imhtml); |
548 | 548 |
549 /** | 549 /** |
550 * Returns a integer containing the selected HTML font size at the current | 550 * Returns a integer containing the selected HTML font size at the current |
551 * position in a GTK IM/HTML. | 551 * position in a GTK+ IM/HTML. |
552 * | 552 * |
553 * @param imhtml The GTK IM/HTML. | 553 * @param imhtml The GTK+ IM/HTML. |
554 * | 554 * |
555 * @return The HTML font size. | 555 * @return The HTML font size. |
556 */ | 556 */ |
557 gint gtk_imhtml_get_current_fontsize(GtkIMHtml *imhtml); | 557 gint gtk_imhtml_get_current_fontsize(GtkIMHtml *imhtml); |
558 | 558 |
559 /** | 559 /** |
560 * Checks whether a GTK IM/HTML is marked as editable. | 560 * Checks whether a GTK+ IM/HTML is marked as editable. |
561 * | 561 * |
562 * @param imhtml The GTK IM/HTML. | 562 * @param imhtml The GTK+ IM/HTML. |
563 * | 563 * |
564 * @return @c TRUE if the IM/HTML is editable, or @c FALSE otherwise. | 564 * @return @c TRUE if the IM/HTML is editable, or @c FALSE otherwise. |
565 */ | 565 */ |
566 gboolean gtk_imhtml_get_editable(GtkIMHtml *imhtml); | 566 gboolean gtk_imhtml_get_editable(GtkIMHtml *imhtml); |
567 | 567 |
568 /** | 568 /** |
569 * Toggles bold at the cursor location or selection in a GTK IM/HTML. | 569 * Toggles bold at the cursor location or selection in a GTK+ IM/HTML. |
570 * | 570 * |
571 * @param imhtml The GTK IM/HTML. | 571 * @param imhtml The GTK+ IM/HTML. |
572 * | 572 * |
573 * @return @c TRUE if bold was turned on, or @c FALSE if it was turned off. | 573 * @return @c TRUE if bold was turned on, or @c FALSE if it was turned off. |
574 */ | 574 */ |
575 gboolean gtk_imhtml_toggle_bold(GtkIMHtml *imhtml); | 575 gboolean gtk_imhtml_toggle_bold(GtkIMHtml *imhtml); |
576 | 576 |
577 /** | 577 /** |
578 * Toggles italic at the cursor location or selection in a GTK IM/HTML. | 578 * Toggles italic at the cursor location or selection in a GTK+ IM/HTML. |
579 * | 579 * |
580 * @param imhtml The GTK IM/HTML. | 580 * @param imhtml The GTK+ IM/HTML. |
581 * | 581 * |
582 * @return @c TRUE if italic was turned on, or @c FALSE if it was turned off. | 582 * @return @c TRUE if italic was turned on, or @c FALSE if it was turned off. |
583 */ | 583 */ |
584 gboolean gtk_imhtml_toggle_italic(GtkIMHtml *imhtml); | 584 gboolean gtk_imhtml_toggle_italic(GtkIMHtml *imhtml); |
585 | 585 |
586 /** | 586 /** |
587 * Toggles underline at the cursor location or selection in a GTK IM/HTML. | 587 * Toggles underline at the cursor location or selection in a GTK+ IM/HTML. |
588 * | 588 * |
589 * @param imhtml The GTK IM/HTML. | 589 * @param imhtml The GTK+ IM/HTML. |
590 * | 590 * |
591 * @return @c TRUE if underline was turned on, or @c FALSE if it was turned off. | 591 * @return @c TRUE if underline was turned on, or @c FALSE if it was turned off. |
592 */ | 592 */ |
593 gboolean gtk_imhtml_toggle_underline(GtkIMHtml *imhtml); | 593 gboolean gtk_imhtml_toggle_underline(GtkIMHtml *imhtml); |
594 | 594 |
595 /** | 595 /** |
596 * Toggles strikethrough at the cursor location or selection in a GTK IM/HTML. | 596 * Toggles strikethrough at the cursor location or selection in a GTK+ IM/HTML. |
597 * | 597 * |
598 * @param imhtml The GTK IM/HTML. | 598 * @param imhtml The GTK+ IM/HTML. |
599 * | 599 * |
600 * @return @c TRUE if strikethrough was turned on, or @c FALSE if it was turned off. | 600 * @return @c TRUE if strikethrough was turned on, or @c FALSE if it was turned off. |
601 */ | 601 */ |
602 gboolean gtk_imhtml_toggle_strike(GtkIMHtml *imhtml); | 602 gboolean gtk_imhtml_toggle_strike(GtkIMHtml *imhtml); |
603 | 603 |
604 /** | 604 /** |
605 * Toggles a foreground color at the current location or selection in a GTK | 605 * Toggles a foreground color at the current location or selection in a GTK |
606 * IM/HTML. | 606 * IM/HTML. |
607 * | 607 * |
608 * @param imhtml The GTK IM/HTML. | 608 * @param imhtml The GTK+ IM/HTML. |
609 * @param color The HTML-style color, or @c NULL or "" to clear the color. | 609 * @param color The HTML-style color, or @c NULL or "" to clear the color. |
610 * | 610 * |
611 * @return @c TRUE if a color was set, or @c FALSE if it was cleared. | 611 * @return @c TRUE if a color was set, or @c FALSE if it was cleared. |
612 */ | 612 */ |
613 gboolean gtk_imhtml_toggle_forecolor(GtkIMHtml *imhtml, const char *color); | 613 gboolean gtk_imhtml_toggle_forecolor(GtkIMHtml *imhtml, const char *color); |
614 | 614 |
615 /** | 615 /** |
616 * Toggles a background color at the current location or selection in a GTK | 616 * Toggles a background color at the current location or selection in a GTK |
617 * IM/HTML. | 617 * IM/HTML. |
618 * | 618 * |
619 * @param imhtml The GTK IM/HTML. | 619 * @param imhtml The GTK+ IM/HTML. |
620 * @param color The HTML-style color, or @c NULL or "" to clear the color. | 620 * @param color The HTML-style color, or @c NULL or "" to clear the color. |
621 * | 621 * |
622 * @return @c TRUE if a color was set, or @c FALSE if it was cleared. | 622 * @return @c TRUE if a color was set, or @c FALSE if it was cleared. |
623 */ | 623 */ |
624 gboolean gtk_imhtml_toggle_backcolor(GtkIMHtml *imhtml, const char *color); | 624 gboolean gtk_imhtml_toggle_backcolor(GtkIMHtml *imhtml, const char *color); |
625 | 625 |
626 /** | 626 /** |
627 * Toggles a background color at the current location or selection in a GTK | 627 * Toggles a background color at the current location or selection in a GTK |
628 * IM/HTML. | 628 * IM/HTML. |
629 * | 629 * |
630 * @param imhtml The GTK IM/HTML. | 630 * @param imhtml The GTK+ IM/HTML. |
631 * @param color The HTML-style color, or @c NULL or "" to clear the color. | 631 * @param color The HTML-style color, or @c NULL or "" to clear the color. |
632 * | 632 * |
633 * @return @c TRUE if a color was set, or @c FALSE if it was cleared. | 633 * @return @c TRUE if a color was set, or @c FALSE if it was cleared. |
634 */ | 634 */ |
635 gboolean gtk_imhtml_toggle_background(GtkIMHtml *imhtml, const char *color); | 635 gboolean gtk_imhtml_toggle_background(GtkIMHtml *imhtml, const char *color); |
636 | 636 |
637 /** | 637 /** |
638 * Toggles a font face at the current location or selection in a GTK IM/HTML. | 638 * Toggles a font face at the current location or selection in a GTK+ IM/HTML. |
639 * | 639 * |
640 * @param imhtml The GTK IM/HTML. | 640 * @param imhtml The GTK+ IM/HTML. |
641 * @param face The font face name, or @c NULL or "" to clear the font. | 641 * @param face The font face name, or @c NULL or "" to clear the font. |
642 * | 642 * |
643 * @return @c TRUE if a font name was set, or @c FALSE if it was cleared. | 643 * @return @c TRUE if a font name was set, or @c FALSE if it was cleared. |
644 */ | 644 */ |
645 gboolean gtk_imhtml_toggle_fontface(GtkIMHtml *imhtml, const char *face); | 645 gboolean gtk_imhtml_toggle_fontface(GtkIMHtml *imhtml, const char *face); |
646 | 646 |
647 /** | 647 /** |
648 * Toggles a link tag with the given URL at the current location or selection | 648 * Toggles a link tag with the given URL at the current location or selection |
649 * in a GTK IM/HTML. | 649 * in a GTK+ IM/HTML. |
650 * | 650 * |
651 * @param imhtml The GTK IM/HTML. | 651 * @param imhtml The GTK+ IM/HTML. |
652 * @param url The URL for the link or @c NULL to terminate the link. | 652 * @param url The URL for the link or @c NULL to terminate the link. |
653 */ | 653 */ |
654 void gtk_imhtml_toggle_link(GtkIMHtml *imhtml, const char *url); | 654 void gtk_imhtml_toggle_link(GtkIMHtml *imhtml, const char *url); |
655 | 655 |
656 /** | 656 /** |
657 * Inserts a link to the given url at the given GtkTextMark in a GTK IM/HTML. | 657 * Inserts a link to the given url at the given GtkTextMark in a GTK+ IM/HTML. |
658 * | 658 * |
659 * @param imhtml The GTK IM/HTML. | 659 * @param imhtml The GTK+ IM/HTML. |
660 * @param mark The GtkTextMark to insert the link at. | 660 * @param mark The GtkTextMark to insert the link at. |
661 * @param url The URL for the link. | 661 * @param url The URL for the link. |
662 * @param text The string to use for the link description. | 662 * @param text The string to use for the link description. |
663 */ | 663 */ |
664 void gtk_imhtml_insert_link(GtkIMHtml *imhtml, GtkTextMark *mark, const char *url, const char *text); | 664 void gtk_imhtml_insert_link(GtkIMHtml *imhtml, GtkTextMark *mark, const char *url, const char *text); |
665 | 665 |
666 /** | 666 /** |
667 * Inserts a smiley at the current location or selection in a GTK IM/HTML. | 667 * Inserts a smiley at the current location or selection in a GTK+ IM/HTML. |
668 * | 668 * |
669 * @param imhtml The GTK IM/HTML. | 669 * @param imhtml The GTK+ IM/HTML. |
670 * @param sml The category of the smiley. | 670 * @param sml The category of the smiley. |
671 * @param smiley The text of the smiley to insert. | 671 * @param smiley The text of the smiley to insert. |
672 */ | 672 */ |
673 void gtk_imhtml_insert_smiley(GtkIMHtml *imhtml, const char *sml, char *smiley); | 673 void gtk_imhtml_insert_smiley(GtkIMHtml *imhtml, const char *sml, char *smiley); |
674 /** | 674 /** |
675 * Inserts a smiley at the given iter in a GTK IM/HTML. | 675 * Inserts a smiley at the given iter in a GTK+ IM/HTML. |
676 * | 676 * |
677 * @param imhtml The GTK IM/HTML. | 677 * @param imhtml The GTK+ IM/HTML. |
678 * @param sml The category of the smiley. | 678 * @param sml The category of the smiley. |
679 * @param smiley The text of the smiley to insert. | 679 * @param smiley The text of the smiley to insert. |
680 * @param iter The GtkTextIter in the IM/HTML to insert the smiley at. | 680 * @param iter The GtkTextIter in the IM/HTML to insert the smiley at. |
681 */ | 681 */ |
682 void gtk_imhtml_insert_smiley_at_iter(GtkIMHtml *imhtml, const char *sml, char *smiley, GtkTextIter *iter); | 682 void gtk_imhtml_insert_smiley_at_iter(GtkIMHtml *imhtml, const char *sml, char *smiley, GtkTextIter *iter); |
683 | 683 |
684 /** | 684 /** |
685 * Inserts the IM/HTML scalable image with the given id at the given iter in a | 685 * Inserts the IM/HTML scalable image with the given id at the given iter in a |
686 * GTK IM/HTML. | 686 * GTK+ IM/HTML. |
687 * | 687 * |
688 * @param imhtml The GTK IM/HTML. | 688 * @param imhtml The GTK+ IM/HTML. |
689 * @param id The id of the IM/HTML scalable. | 689 * @param id The id of the IM/HTML scalable. |
690 * @param iter The GtkTextIter in the IM/HTML to insert the image at. | 690 * @param iter The GtkTextIter in the IM/HTML to insert the image at. |
691 */ | 691 */ |
692 void gtk_imhtml_insert_image_at_iter(GtkIMHtml *imhtml, int id, GtkTextIter *iter); | 692 void gtk_imhtml_insert_image_at_iter(GtkIMHtml *imhtml, int id, GtkTextIter *iter); |
693 | 693 |
694 /** | 694 /** |
695 * Sets the font size at the current location or selection in a GTK IM/HTML. | 695 * Sets the font size at the current location or selection in a GTK+ IM/HTML. |
696 * | 696 * |
697 * @param imhtml The GTK IM/HTML. | 697 * @param imhtml The GTK+ IM/HTML. |
698 * @param size The HTML font size to use. | 698 * @param size The HTML font size to use. |
699 */ | 699 */ |
700 void gtk_imhtml_font_set_size(GtkIMHtml *imhtml, gint size); | 700 void gtk_imhtml_font_set_size(GtkIMHtml *imhtml, gint size); |
701 | 701 |
702 /** | 702 /** |
703 * Decreases the font size by 1 at the current location or selection in a GTK | 703 * Decreases the font size by 1 at the current location or selection in a GTK |
704 * IM/HTML. | 704 * IM/HTML. |
705 * | 705 * |
706 * @param imhtml The GTK IM/HTML. | 706 * @param imhtml The GTK+ IM/HTML. |
707 */ | 707 */ |
708 void gtk_imhtml_font_shrink(GtkIMHtml *imhtml); | 708 void gtk_imhtml_font_shrink(GtkIMHtml *imhtml); |
709 | 709 |
710 /** | 710 /** |
711 * Increases the font size by 1 at the current location or selection in a GTK | 711 * Increases the font size by 1 at the current location or selection in a GTK |
712 * IM/HTML. | 712 * IM/HTML. |
713 * | 713 * |
714 * @param imhtml The GTK IM/HTML. | 714 * @param imhtml The GTK+ IM/HTML. |
715 */ | 715 */ |
716 void gtk_imhtml_font_grow(GtkIMHtml *imhtml); | 716 void gtk_imhtml_font_grow(GtkIMHtml *imhtml); |
717 | 717 |
718 /** | 718 /** |
719 * Returns the HTML formatted contents between two iters in a GTK IM/HTML. | 719 * Returns the HTML formatted contents between two iters in a GTK+ IM/HTML. |
720 * | 720 * |
721 * @param imhtml The GTK IM/HTML. | 721 * @param imhtml The GTK+ IM/HTML. |
722 * @param start The GtkTextIter indicating the start point in the IM/HTML. | 722 * @param start The GtkTextIter indicating the start point in the IM/HTML. |
723 * @param end The GtkTextIter indicating the end point in the IM/HTML. | 723 * @param end The GtkTextIter indicating the end point in the IM/HTML. |
724 * | 724 * |
725 * @return A string containing the HTML formatted text. | 725 * @return A string containing the HTML formatted text. |
726 */ | 726 */ |
727 char *gtk_imhtml_get_markup_range(GtkIMHtml *imhtml, GtkTextIter *start, GtkTextIter *end); | 727 char *gtk_imhtml_get_markup_range(GtkIMHtml *imhtml, GtkTextIter *start, GtkTextIter *end); |
728 | 728 |
729 /** | 729 /** |
730 * Returns the entire HTML formatted contents of a GTK IM/HTML. | 730 * Returns the entire HTML formatted contents of a GTK+ IM/HTML. |
731 * | 731 * |
732 * @param imhtml The GTK IM/HTML. | 732 * @param imhtml The GTK+ IM/HTML. |
733 * | 733 * |
734 * @return A string containing the HTML formatted text. | 734 * @return A string containing the HTML formatted text. |
735 */ | 735 */ |
736 char *gtk_imhtml_get_markup(GtkIMHtml *imhtml); | 736 char *gtk_imhtml_get_markup(GtkIMHtml *imhtml); |
737 | 737 |
738 /** | 738 /** |
739 * Returns a null terminated array of pointers to null terminated strings, each | 739 * Returns a null terminated array of pointers to null terminated strings, each |
740 * string for each line. g_strfreev() should be called to free it when done. | 740 * string for each line. g_strfreev() should be called to free it when done. |
741 * | 741 * |
742 * @param imhtml The GTK IM/HTML. | 742 * @param imhtml The GTK+ IM/HTML. |
743 * | 743 * |
744 * @return A null terminated array of null terminated HTML formatted strings. | 744 * @return A null terminated array of null terminated HTML formatted strings. |
745 */ | 745 */ |
746 char **gtk_imhtml_get_markup_lines(GtkIMHtml *imhtml); | 746 char **gtk_imhtml_get_markup_lines(GtkIMHtml *imhtml); |
747 | 747 |
748 /** | 748 /** |
749 * Returns the entire unformatted (plain text) contents of a GTK IM/HTML | 749 * Returns the entire unformatted (plain text) contents of a GTK+ IM/HTML |
750 * between two iters in a GTK IM/HTML. | 750 * between two iters in a GTK+ IM/HTML. |
751 * | 751 * |
752 * @param imhtml The GTK IM/HTML. | 752 * @param imhtml The GTK+ IM/HTML. |
753 * @param start The GtkTextIter indicating the start point in the IM/HTML. | 753 * @param start The GtkTextIter indicating the start point in the IM/HTML. |
754 * @param stop The GtkTextIter indicating the end point in the IM/HTML. | 754 * @param stop The GtkTextIter indicating the end point in the IM/HTML. |
755 * | 755 * |
756 * @return A string containing the unformatted text. | 756 * @return A string containing the unformatted text. |
757 */ | 757 */ |