| 39 #define PIDGIN_WEBVIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PIDGIN_TYPE_WEBVIEW, PidginWebView)) |
39 #define PIDGIN_WEBVIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), PIDGIN_TYPE_WEBVIEW, PidginWebView)) |
| 40 #define PIDGIN_WEBVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PIDGIN_TYPE_WEBVIEW, PidginWebViewClass)) |
40 #define PIDGIN_WEBVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PIDGIN_TYPE_WEBVIEW, PidginWebViewClass)) |
| 41 #define PIDGIN_IS_WEBVIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PIDGIN_TYPE_WEBVIEW)) |
41 #define PIDGIN_IS_WEBVIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), PIDGIN_TYPE_WEBVIEW)) |
| 42 #define PIDGIN_IS_WEBVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PIDGIN_TYPE_WEBVIEW)) |
42 #define PIDGIN_IS_WEBVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PIDGIN_TYPE_WEBVIEW)) |
| 43 #define PIDGIN_WEBVIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PIDGIN_TYPE_WEBVIEW, PidginWebViewClass)) |
43 #define PIDGIN_WEBVIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PIDGIN_TYPE_WEBVIEW, PidginWebViewClass)) |
| 44 |
|
| 45 #define PIDGIN_TYPE_WEBVIEW_SMILEY (pidgin_webview_smiley_get_type()) |
|
| 46 |
44 |
| 47 typedef enum { |
45 typedef enum { |
| 48 PIDGIN_WEBVIEW_BOLD = 1 << 0, |
46 PIDGIN_WEBVIEW_BOLD = 1 << 0, |
| 49 PIDGIN_WEBVIEW_ITALIC = 1 << 1, |
47 PIDGIN_WEBVIEW_ITALIC = 1 << 1, |
| 50 PIDGIN_WEBVIEW_UNDERLINE = 1 << 2, |
48 PIDGIN_WEBVIEW_UNDERLINE = 1 << 2, |
| 60 PIDGIN_WEBVIEW_STRIKE = 1 << 12, |
58 PIDGIN_WEBVIEW_STRIKE = 1 << 12, |
| 61 /** Show custom smileys when appropriate. */ |
59 /** Show custom smileys when appropriate. */ |
| 62 PIDGIN_WEBVIEW_CUSTOM_SMILEY = 1 << 13, |
60 PIDGIN_WEBVIEW_CUSTOM_SMILEY = 1 << 13, |
| 63 PIDGIN_WEBVIEW_ALL = -1 |
61 PIDGIN_WEBVIEW_ALL = -1 |
| 64 } PidginWebViewButtons; |
62 } PidginWebViewButtons; |
| 65 |
|
| 66 typedef enum { |
|
| 67 PIDGIN_WEBVIEW_SMILEY_CUSTOM = 1 << 0 |
|
| 68 } PidginWebViewSmileyFlags; |
|
| 69 |
63 |
| 70 typedef enum { |
64 typedef enum { |
| 71 PIDGIN_WEBVIEW_ACTION_BOLD, |
65 PIDGIN_WEBVIEW_ACTION_BOLD, |
| 72 PIDGIN_WEBVIEW_ACTION_ITALIC, |
66 PIDGIN_WEBVIEW_ACTION_ITALIC, |
| 73 PIDGIN_WEBVIEW_ACTION_UNDERLINE, |
67 PIDGIN_WEBVIEW_ACTION_UNDERLINE, |
| 593 * Gets the protocol name associated with this PidginWebView. |
579 * Gets the protocol name associated with this PidginWebView. |
| 594 */ |
580 */ |
| 595 const char *pidgin_webview_get_protocol_name(PidginWebView *webview); |
581 const char *pidgin_webview_get_protocol_name(PidginWebView *webview); |
| 596 |
582 |
| 597 /** |
583 /** |
| 598 * pidgin_webview_set_protocol_name: |
|
| 599 * @webview: The PidginWebView |
|
| 600 * @protocol_name: The protocol name to associate with the PidginWebView |
|
| 601 * |
|
| 602 * Associates a protocol name with a PidginWebView. |
|
| 603 */ |
|
| 604 void pidgin_webview_set_protocol_name(PidginWebView *webview, const char *protocol_name); |
|
| 605 |
|
| 606 /** |
|
| 607 * pidgin_webview_smiley_create: |
|
| 608 * @file: The image file for the smiley |
|
| 609 * @shortcut: The key shortcut for the smiley |
|
| 610 * @hide: %TRUE if the smiley should be hidden in the smiley dialog, |
|
| 611 * %FALSE otherwise |
|
| 612 * @flags: The smiley flags |
|
| 613 * |
|
| 614 * Create a new PidginWebViewSmiley. |
|
| 615 * |
|
| 616 * Returns: The newly created smiley |
|
| 617 */ |
|
| 618 PidginWebViewSmiley *pidgin_webview_smiley_create(const char *file, |
|
| 619 const char *shortcut, |
|
| 620 gboolean hide, |
|
| 621 PidginWebViewSmileyFlags flags); |
|
| 622 |
|
| 623 /** |
|
| 624 * pidgin_webview_smiley_reload: |
|
| 625 * @smiley: The smiley to reload |
|
| 626 * |
|
| 627 * Reload the image data for the smiley. |
|
| 628 */ |
|
| 629 void pidgin_webview_smiley_reload(PidginWebViewSmiley *smiley); |
|
| 630 |
|
| 631 /** |
|
| 632 * pidgin_webview_smiley_destroy: |
|
| 633 * @smiley: The smiley to destroy |
|
| 634 * |
|
| 635 * Destroy a PidginWebViewSmiley. |
|
| 636 */ |
|
| 637 void pidgin_webview_smiley_destroy(PidginWebViewSmiley *smiley); |
|
| 638 |
|
| 639 /** |
|
| 640 * pidgin_webview_smiley_get_smile: |
|
| 641 * @smiley: The smiley |
|
| 642 * |
|
| 643 * Returns the text associated with a smiley. |
|
| 644 * |
|
| 645 * Returns: The text |
|
| 646 */ |
|
| 647 const char *pidgin_webview_smiley_get_smile(const PidginWebViewSmiley *smiley); |
|
| 648 |
|
| 649 /** |
|
| 650 * pidgin_webview_smiley_get_file: |
|
| 651 * @smiley: The smiley |
|
| 652 * |
|
| 653 * Returns the file associated with a smiley. |
|
| 654 * |
|
| 655 * Returns: The file |
|
| 656 */ |
|
| 657 const char *pidgin_webview_smiley_get_file(const PidginWebViewSmiley *smiley); |
|
| 658 |
|
| 659 /** |
|
| 660 * pidgin_webview_smiley_get_hidden: |
|
| 661 * @smiley: The smiley |
|
| 662 * |
|
| 663 * Returns the invisibility of a smiley. |
|
| 664 * |
|
| 665 * Returns: The hidden status |
|
| 666 */ |
|
| 667 gboolean pidgin_webview_smiley_get_hidden(const PidginWebViewSmiley *smiley); |
|
| 668 |
|
| 669 /** |
|
| 670 * pidgin_webview_smiley_get_flags: |
|
| 671 * @smiley: The smiley |
|
| 672 * |
|
| 673 * Returns the flags associated with a smiley. |
|
| 674 * |
|
| 675 * Returns: The flags |
|
| 676 */ |
|
| 677 PidginWebViewSmileyFlags pidgin_webview_smiley_get_flags(const PidginWebViewSmiley *smiley); |
|
| 678 |
|
| 679 /** |
|
| 680 * pidgin_webview_smiley_find: |
|
| 681 * @webview: The PidginWebView |
|
| 682 * @sml: The name of the smiley category |
|
| 683 * @text: The text associated with the smiley |
|
| 684 * |
|
| 685 * Returns: The smiley object associated with the text. |
|
| 686 */ |
|
| 687 PidginWebViewSmiley *pidgin_webview_smiley_find(PidginWebView *webview, const char *sml, |
|
| 688 const char *text); |
|
| 689 |
|
| 690 /** |
|
| 691 * pidgin_webview_associate_smiley: |
|
| 692 * @webview: The PidginWebView |
|
| 693 * @sml: The name of the smiley category |
|
| 694 * @smiley: The PidginWebViewSmiley to associate |
|
| 695 * |
|
| 696 * Associates a smiley with a PidginWebView. |
|
| 697 */ |
|
| 698 void pidgin_webview_associate_smiley(PidginWebView *webview, const char *sml, |
|
| 699 PidginWebViewSmiley *smiley); |
|
| 700 |
|
| 701 /** |
|
| 702 * pidgin_webview_remove_smileys: |
|
| 703 * @webview: The PidginWebView. |
|
| 704 * |
|
| 705 * Removes all smileys associated with a PidginWebView. |
|
| 706 */ |
|
| 707 void pidgin_webview_remove_smileys(PidginWebView *webview); |
|
| 708 |
|
| 709 /** |
|
| 710 * pidgin_webview_insert_smiley: |
|
| 711 * @webview: The PidginWebView |
|
| 712 * @sml: The category of the smiley |
|
| 713 * @smiley: The text of the smiley to insert |
|
| 714 * |
|
| 715 * Inserts a smiley at the current location or selection in a PidginWebView. |
|
| 716 */ |
|
| 717 void pidgin_webview_insert_smiley(PidginWebView *webview, const char *sml, |
|
| 718 const char *smiley); |
|
| 719 |
|
| 720 /** |
|
| 721 * pidgin_webview_show_toolbar: |
584 * pidgin_webview_show_toolbar: |
| 722 * @webview: The PidginWebView. |
585 * @webview: The PidginWebView. |
| 723 * |
586 * |
| 724 * Makes the toolbar associated with a PidginWebView visible. |
587 * Makes the toolbar associated with a PidginWebView visible. |
| 725 */ |
588 */ |
| 739 * @action: The PidginWebViewAction |
602 * @action: The PidginWebViewAction |
| 740 * |
603 * |
| 741 * Activate an action on the toolbar associated with a PidginWebView. |
604 * Activate an action on the toolbar associated with a PidginWebView. |
| 742 */ |
605 */ |
| 743 void pidgin_webview_activate_toolbar(PidginWebView *webview, PidginWebViewAction action); |
606 void pidgin_webview_activate_toolbar(PidginWebView *webview, PidginWebViewAction action); |
| |
607 |
| |
608 /** |
| |
609 * pidgin_webview_switch_active_conversation: |
| |
610 * @webview: The PidginWebView |
| |
611 * @conv: The conversation. |
| |
612 * |
| |
613 * Updates the webview for a new active #PurpleConversation. |
| |
614 */ |
| |
615 void |
| |
616 pidgin_webview_switch_active_conversation(PidginWebView *webview, |
| |
617 PurpleConversation *conv); |
| 744 |
618 |
| 745 /* Do not use. */ |
619 /* Do not use. */ |
| 746 void |
620 void |
| 747 pidgin_webview_set_toolbar(PidginWebView *webview, GtkWidget *toolbar); |
621 pidgin_webview_set_toolbar(PidginWebView *webview, GtkWidget *toolbar); |
| 748 |
622 |
| 749 G_END_DECLS |
623 G_END_DECLS |
| 750 |
624 |
| 751 #endif /* _PIDGIN_WEBVIEW_H_ */ |
625 #endif /* _PIDGIN_WEBVIEW_H_ */ |
| 752 |
|