1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Copyright (C) 2002-2007 Imendio AB
4 * Copyright (C) 2007 Collabora Ltd.
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 of the
9 * License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
16 * You should have received a copy of the GNU General Public
17 * License along with this program; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
21 * Authors: Mikael Hallendal <micke@imendio.com>
22 * Richard Hult <richard@imendio.com>
23 * Martyn Russell <martyn@imendio.com>
24 * Xavier Claessens <xclaesse@gmail.com>
26 * Part of this file is copied from GtkSourceView (gtksourceiter.c):
31 #ifndef __GOSSIP_UI_UTILS_H__
32 #define __GOSSIP_UI_UTILS_H__
35 #include <glade/glade.h>
37 #include <libmissioncontrol/mc-account.h>
38 #include <libmissioncontrol/mc-profile.h>
40 #include <libempathy/gossip-presence.h>
41 #include <libempathy/gossip-contact.h>
42 #include <libempathy/gossip-avatar.h>
44 #include "gossip-chat-view.h"
48 #define G_STR_EMPTY(x) ((x) == NULL || (x)[0] == '\0')
51 void gossip_glade_get_file_simple (const gchar *filename,
54 const gchar *first_required_widget,
56 GladeXML * gossip_glade_get_file (const gchar *filename,
59 const gchar *first_required_widget,
61 void gossip_glade_connect (GladeXML *gui,
65 void gossip_glade_setup_size_group (GladeXML *gui,
66 GtkSizeGroupMode mode,
70 GdkPixbuf * gossip_pixbuf_from_smiley (GossipSmiley type,
71 GtkIconSize icon_size);
72 GdkPixbuf * gossip_pixbuf_from_profile (McProfile *account,
73 GtkIconSize icon_size);
74 GdkPixbuf * gossip_pixbuf_from_account (McAccount *account,
75 GtkIconSize icon_size);
76 GdkPixbuf * gossip_pixbuf_for_presence_state (GossipPresenceState state);
77 GdkPixbuf * gossip_pixbuf_for_presence (GossipPresence *presence);
78 GdkPixbuf * gossip_pixbuf_for_contact (GossipContact *contact);
79 GdkPixbuf * gossip_pixbuf_offline (void);
80 GdkPixbuf * gossip_pixbuf_from_avatar_scaled (GossipAvatar *avatar,
83 GdkPixbuf * gossip_pixbuf_avatar_from_contact (GossipContact *contact);
84 GdkPixbuf * gossip_pixbuf_avatar_from_contact_scaled (GossipContact *contact,
88 gboolean gossip_text_iter_forward_search (const GtkTextIter *iter,
90 GtkTextIter *match_start,
91 GtkTextIter *match_end,
92 const GtkTextIter *limit);
93 gboolean gossip_text_iter_backward_search (const GtkTextIter *iter,
95 GtkTextIter *match_start,
96 GtkTextIter *match_end,
97 const GtkTextIter *limit);
100 gboolean gossip_window_get_is_visible (GtkWindow *window);
101 void gossip_window_present (GtkWindow *window,
102 gboolean steal_focus);
103 void gossip_window_set_default_icon_name (const gchar *name);
105 void gossip_url_show (const char *url);
107 void gossip_toggle_button_set_state_quietly (GtkWidget *widget,
111 GtkWidget *gossip_link_button_new (const gchar *url,
117 #endif /* __GOSSIP_UI_UTILS_H__ */