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-2008 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>
25 * Jonny Lamb <jonny.lamb@collabora.co.uk>
27 * Part of this file is copied from GtkSourceView (gtksourceiter.c):
32 #ifndef __EMPATHY_UI_UTILS_H__
33 #define __EMPATHY_UI_UTILS_H__
36 #include <glade/glade.h>
38 #include <libmissioncontrol/mc-account.h>
39 #include <libmissioncontrol/mc-profile.h>
41 #include <libempathy/empathy-contact.h>
43 #include "empathy-chat-view.h"
47 /* NOTE: Keep this sync with sound_entries in empathy-ui-utils.c */
49 EMPATHY_SOUND_MESSAGE_INCOMING,
50 EMPATHY_SOUND_MESSAGE_OUTGOING,
51 EMPATHY_SOUND_CONVERSATION_NEW,
52 EMPATHY_SOUND_CONTACT_CONNECTED,
53 EMPATHY_SOUND_CONTACT_DISCONNECTED,
54 EMPATHY_SOUND_ACCOUNT_CONNECTED,
55 EMPATHY_SOUND_ACCOUNT_DISCONNECTED,
56 EMPATHY_SOUND_PHONE_INCOMING,
57 EMPATHY_SOUND_PHONE_OUTGOING,
58 EMPATHY_SOUND_PHONE_HANGUP,
62 void empathy_gtk_init (void);
64 void empathy_glade_get_file_simple (const gchar *filename,
67 const gchar *first_required_widget,
69 GladeXML * empathy_glade_get_file (const gchar *filename,
72 const gchar *first_required_widget,
74 void empathy_glade_connect (GladeXML *gui,
78 void empathy_glade_setup_size_group (GladeXML *gui,
79 GtkSizeGroupMode mode,
83 const gchar * empathy_icon_name_from_account (McAccount *account);
84 const gchar * empathy_icon_name_for_presence (McPresence presence);
85 const gchar * empathy_icon_name_for_contact (EmpathyContact *contact);
86 GdkPixbuf * empathy_pixbuf_from_data (gchar *data,
88 GdkPixbuf * empathy_pixbuf_from_data_and_mime (gchar *data,
91 GdkPixbuf * empathy_pixbuf_from_avatar_scaled (EmpathyAvatar *avatar,
94 GdkPixbuf * empathy_pixbuf_avatar_from_contact_scaled (EmpathyContact *contact,
97 GdkPixbuf * empathy_pixbuf_scale_down_if_necessary (GdkPixbuf *pixbuf,
99 GdkPixbuf * empathy_pixbuf_from_icon_name (const gchar *icon_name,
100 GtkIconSize icon_size);
101 GdkPixbuf * empathy_pixbuf_from_icon_name_sized (const gchar *icon_name,
104 gboolean empathy_text_iter_forward_search (const GtkTextIter*iter,
106 GtkTextIter *match_start,
107 GtkTextIter *match_end,
108 const GtkTextIter*limit);
109 gboolean empathy_text_iter_backward_search (const GtkTextIter*iter,
111 GtkTextIter *match_start,
112 GtkTextIter *match_end,
113 const GtkTextIter*limit);
115 gboolean empathy_window_get_is_visible (GtkWindow *window);
116 void empathy_window_present (GtkWindow *window,
117 gboolean steal_focus);
118 void empathy_window_iconify (GtkWindow *window,
119 GtkStatusIcon *status_icon);
120 GtkWindow * empathy_get_toplevel_window (GtkWidget *widget);
121 void empathy_url_show (GtkWidget *parent,
123 void empathy_toggle_button_set_state_quietly (GtkWidget *widget,
127 GtkWidget * empathy_link_button_new (const gchar *url,
130 void empathy_send_file_with_file_chooser (EmpathyContact *contact);
133 void empathy_sound_play (GtkWidget *widget,
134 EmpathySound sound_id);
137 gboolean empathy_notification_should_show (gboolean check_focus);
141 #endif /* __EMPATHY_UI_UTILS_H__ */