pidgin/gtkwebview.h

changeset 35714
bb2c91c3e2db
parent 35713
4423f463a782
child 35731
7a8d87b4e516
equal deleted inserted replaced
35713:4423f463a782 35714:bb2c91c3e2db
58 PIDGIN_WEBVIEW_STRIKE = 1 << 12, 58 PIDGIN_WEBVIEW_STRIKE = 1 << 12,
59 /** Show custom smileys when appropriate. */ 59 /** Show custom smileys when appropriate. */
60 PIDGIN_WEBVIEW_CUSTOM_SMILEY = 1 << 13, 60 PIDGIN_WEBVIEW_CUSTOM_SMILEY = 1 << 13,
61 PIDGIN_WEBVIEW_ALL = -1 61 PIDGIN_WEBVIEW_ALL = -1
62 } PidginWebViewButtons; 62 } PidginWebViewButtons;
63
64 typedef enum {
65 PIDGIN_WEBVIEW_SMILEY_CUSTOM = 1 << 0
66 } PidginWebViewSmileyFlags;
67 63
68 typedef enum { 64 typedef enum {
69 PIDGIN_WEBVIEW_ACTION_BOLD, 65 PIDGIN_WEBVIEW_ACTION_BOLD,
70 PIDGIN_WEBVIEW_ACTION_ITALIC, 66 PIDGIN_WEBVIEW_ACTION_ITALIC,
71 PIDGIN_WEBVIEW_ACTION_UNDERLINE, 67 PIDGIN_WEBVIEW_ACTION_UNDERLINE,
86 PIDGIN_WEBVIEW_ACTION_ATTENTION 82 PIDGIN_WEBVIEW_ACTION_ATTENTION
87 } PidginWebViewAction; 83 } PidginWebViewAction;
88 84
89 typedef struct _PidginWebView PidginWebView; 85 typedef struct _PidginWebView PidginWebView;
90 typedef struct _PidginWebViewClass PidginWebViewClass; 86 typedef struct _PidginWebViewClass PidginWebViewClass;
91 typedef struct _PidginWebViewSmiley PidginWebViewSmiley;
92 87
93 struct _PidginWebView 88 struct _PidginWebView
94 { 89 {
95 WebKitWebView parent; 90 WebKitWebView parent;
96 }; 91 };
586 * Gets the protocol name associated with this PidginWebView. 581 * Gets the protocol name associated with this PidginWebView.
587 */ 582 */
588 const char *pidgin_webview_get_protocol_name(PidginWebView *webview); 583 const char *pidgin_webview_get_protocol_name(PidginWebView *webview);
589 584
590 /** 585 /**
591 * pidgin_webview_set_protocol_name:
592 * @webview: The PidginWebView
593 * @protocol_name: The protocol name to associate with the PidginWebView
594 *
595 * Associates a protocol name with a PidginWebView.
596 */
597 void pidgin_webview_set_protocol_name(PidginWebView *webview, const char *protocol_name);
598
599 /**
600 * pidgin_webview_smiley_create:
601 * @file: The image file for the smiley
602 * @shortcut: The key shortcut for the smiley
603 * @hide: %TRUE if the smiley should be hidden in the smiley dialog,
604 * %FALSE otherwise
605 * @flags: The smiley flags
606 *
607 * Create a new PidginWebViewSmiley.
608 *
609 * Returns: The newly created smiley
610 */
611 PidginWebViewSmiley *pidgin_webview_smiley_create(const char *file,
612 const char *shortcut,
613 gboolean hide,
614 PidginWebViewSmileyFlags flags);
615
616 /**
617 * pidgin_webview_smiley_reload:
618 * @smiley: The smiley to reload
619 *
620 * Reload the image data for the smiley.
621 */
622 void pidgin_webview_smiley_reload(PidginWebViewSmiley *smiley);
623
624 /**
625 * pidgin_webview_smiley_destroy:
626 * @smiley: The smiley to destroy
627 *
628 * Destroy a PidginWebViewSmiley.
629 */
630 void pidgin_webview_smiley_destroy(PidginWebViewSmiley *smiley);
631
632 /**
633 * pidgin_webview_smiley_get_smile:
634 * @smiley: The smiley
635 *
636 * Returns the text associated with a smiley.
637 *
638 * Returns: The text
639 */
640 const char *pidgin_webview_smiley_get_smile(const PidginWebViewSmiley *smiley);
641
642 /**
643 * pidgin_webview_smiley_get_file:
644 * @smiley: The smiley
645 *
646 * Returns the file associated with a smiley.
647 *
648 * Returns: The file
649 */
650 const char *pidgin_webview_smiley_get_file(const PidginWebViewSmiley *smiley);
651
652 /**
653 * pidgin_webview_smiley_get_hidden:
654 * @smiley: The smiley
655 *
656 * Returns the invisibility of a smiley.
657 *
658 * Returns: The hidden status
659 */
660 gboolean pidgin_webview_smiley_get_hidden(const PidginWebViewSmiley *smiley);
661
662 /**
663 * pidgin_webview_smiley_get_flags:
664 * @smiley: The smiley
665 *
666 * Returns the flags associated with a smiley.
667 *
668 * Returns: The flags
669 */
670 PidginWebViewSmileyFlags pidgin_webview_smiley_get_flags(const PidginWebViewSmiley *smiley);
671
672 /**
673 * pidgin_webview_smiley_find:
674 * @webview: The PidginWebView
675 * @sml: The name of the smiley category
676 * @text: The text associated with the smiley
677 *
678 * Returns: The smiley object associated with the text.
679 */
680 PidginWebViewSmiley *pidgin_webview_smiley_find(PidginWebView *webview, const char *sml,
681 const char *text);
682
683 /**
684 * pidgin_webview_associate_smiley:
685 * @webview: The PidginWebView
686 * @sml: The name of the smiley category
687 * @smiley: The PidginWebViewSmiley to associate
688 *
689 * Associates a smiley with a PidginWebView.
690 */
691 void pidgin_webview_associate_smiley(PidginWebView *webview, const char *sml,
692 PidginWebViewSmiley *smiley);
693
694 /**
695 * pidgin_webview_remove_smileys:
696 * @webview: The PidginWebView.
697 *
698 * Removes all smileys associated with a PidginWebView.
699 */
700 void pidgin_webview_remove_smileys(PidginWebView *webview);
701
702 /**
703 * pidgin_webview_insert_smiley:
704 * @webview: The PidginWebView
705 * @sml: The category of the smiley
706 * @smiley: The text of the smiley to insert
707 *
708 * Inserts a smiley at the current location or selection in a PidginWebView.
709 */
710 void pidgin_webview_insert_smiley(PidginWebView *webview, const char *sml,
711 const char *smiley);
712
713 /**
714 * pidgin_webview_show_toolbar: 586 * pidgin_webview_show_toolbar:
715 * @webview: The PidginWebView. 587 * @webview: The PidginWebView.
716 * 588 *
717 * Makes the toolbar associated with a PidginWebView visible. 589 * Makes the toolbar associated with a PidginWebView visible.
718 */ 590 */

mercurial