2 * Copyright (C) 2008-2012 Collabora Ltd.
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 * Authors: Xavier Claessens <xclaesse@gmail.com>
21 #ifndef __EMPATHY_THEME_ADIUM_H__
22 #define __EMPATHY_THEME_ADIUM_H__
24 #include <webkit/webkitwebview.h>
26 #include <libempathy/empathy-message.h>
31 #define EMPATHY_TYPE_THEME_ADIUM \
32 (empathy_theme_adium_get_type ())
33 #define EMPATHY_THEME_ADIUM(obj) \
34 (G_TYPE_CHECK_INSTANCE_CAST((obj), \
35 EMPATHY_TYPE_THEME_ADIUM, \
37 #define EMPATHY_THEME_ADIUM_CLASS(klass) \
38 (G_TYPE_CHECK_CLASS_CAST((klass), \
39 EMPATHY_TYPE_THEME_ADIUM, \
40 EmpathyThemeAdiumClass))
41 #define EMPATHY_IS_THEME_ADIUM(obj) \
42 (G_TYPE_CHECK_INSTANCE_TYPE((obj), \
43 EMPATHY_TYPE_THEME_ADIUM))
44 #define EMPATHY_IS_THEME_ADIUM_CLASS(klass) \
45 (G_TYPE_CHECK_CLASS_TYPE((klass), \
46 EMPATHY_TYPE_THEME_ADIUM))
47 #define EMPATHY_THEME_ADIUM_GET_CLASS(obj) \
48 (G_TYPE_INSTANCE_GET_CLASS ((obj), \
49 EMPATHY_TYPE_THEME_ADIUM, \
50 EmpathyThemeAdiumClass))
54 typedef struct _EmpathyThemeAdium EmpathyThemeAdium;
55 typedef struct _EmpathyThemeAdiumClass EmpathyThemeAdiumClass;
56 typedef struct _EmpathyThemeAdiumPriv EmpathyThemeAdiumPriv;
58 typedef struct _EmpathyAdiumData EmpathyAdiumData;
60 struct _EmpathyThemeAdium
63 EmpathyThemeAdiumPriv *priv;
66 struct _EmpathyThemeAdiumClass
68 WebKitWebViewClass parent_class;
71 GType empathy_theme_adium_get_type (void) G_GNUC_CONST;
73 EmpathyThemeAdium *empathy_theme_adium_new (EmpathyAdiumData *data,
74 const gchar *variant);
75 void empathy_theme_adium_set_variant (EmpathyThemeAdium *theme,
76 const gchar *variant);
77 void empathy_theme_adium_show_inspector (EmpathyThemeAdium *theme);
79 void empathy_theme_adium_append_message (EmpathyThemeAdium *self,
81 gboolean should_highlight);
83 void empathy_theme_adium_append_event (EmpathyThemeAdium *self,
86 void empathy_theme_adium_append_event_markup (EmpathyThemeAdium *self,
87 const gchar *markup_text,
88 const gchar *fallback_text);
90 void empathy_theme_adium_edit_message (EmpathyThemeAdium *self,
91 EmpathyMessage *message);
93 void empathy_theme_adium_scroll (EmpathyThemeAdium *self,
94 gboolean allow_scrolling);
96 void empathy_theme_adium_scroll_down (EmpathyThemeAdium *self);
98 gboolean empathy_theme_adium_get_has_selection (EmpathyThemeAdium *self);
100 void empathy_theme_adium_clear (EmpathyThemeAdium *self);
102 gboolean empathy_theme_adium_find_previous (EmpathyThemeAdium *self,
103 const gchar *search_criteria,
105 gboolean match_case);
107 gboolean empathy_theme_adium_find_next (EmpathyThemeAdium *self,
108 const gchar *search_criteria,
110 gboolean match_case);
112 void empathy_theme_adium_find_abilities (EmpathyThemeAdium *self,
113 const gchar *search_criteria,
115 gboolean *can_do_previous,
116 gboolean *can_do_next);
118 void empathy_theme_adium_highlight (EmpathyThemeAdium *self,
120 gboolean match_case);
122 void empathy_theme_adium_copy_clipboard (EmpathyThemeAdium *self);
124 void empathy_theme_adium_focus_toggled (EmpathyThemeAdium *self,
127 void empathy_theme_adium_message_acknowledged (EmpathyThemeAdium *self,
128 EmpathyMessage *message);
130 void empathy_theme_adium_set_show_avatars (EmpathyThemeAdium *self,
131 gboolean show_avatars);
133 /* not methods functions */
135 gboolean empathy_adium_path_is_valid (const gchar *path);
137 GHashTable *empathy_adium_info_new (const gchar *path);
138 const gchar * empathy_adium_info_get_default_variant (GHashTable *info);
139 GPtrArray * empathy_adium_info_get_available_variants (GHashTable *info);
141 #define EMPATHY_TYPE_ADIUM_DATA (empathy_adium_data_get_type ())
142 GType empathy_adium_data_get_type (void) G_GNUC_CONST;
143 EmpathyAdiumData *empathy_adium_data_new (const gchar *path);
144 EmpathyAdiumData *empathy_adium_data_new_with_info (const gchar *path,
146 EmpathyAdiumData *empathy_adium_data_ref (EmpathyAdiumData *data);
147 void empathy_adium_data_unref (EmpathyAdiumData *data);
148 GHashTable *empathy_adium_data_get_info (EmpathyAdiumData *data);
149 const gchar *empathy_adium_data_get_path (EmpathyAdiumData *data);
153 #endif /* __EMPATHY_THEME_ADIUM_H__ */