]> sjero.net Git - linphone/blob - gtk/linphone.h
Merge branch 'master' of git.linphone.org:linphone-private
[linphone] / gtk / linphone.h
1 /*
2 linphone, gtk-glade interface.
3 Copyright (C) 2008  Simon MORLAT (simon.morlat@linphone.org)
4
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18 */
19
20 #ifdef HAVE_CONFIG_H
21 #include "config.h"
22 #endif
23
24 #include <gtk/gtk.h>
25 #ifdef WIN32
26 // alloca is already defined by gtk
27 #undef alloca
28 #endif
29 #include "linphonecore.h"
30
31 #include <libintl.h>
32 #ifndef _
33 #define _(String) gettext (String)
34 #endif
35
36 #ifdef USE_BUILDDATE_VERSION
37 #include "version_date.h"
38 #undef LINPHONE_VERSION
39 #define LINPHONE_VERSION LINPHONE_VERSION_DATE
40 #endif
41
42 GdkPixbuf * create_pixbuf(const gchar *filename);
43 GdkPixbufAnimation *create_pixbuf_animation(const gchar *filename);
44 void add_pixmap_directory(const gchar *directory);
45 GtkWidget*create_pixmap(const gchar     *filename);
46 GtkWidget *_gtk_image_new_from_memory_at_scale(const void *data, gint len, gint w, gint h, gboolean preserve_ratio);
47 GdkPixbuf *_gdk_pixbuf_new_from_memory_at_scale(const void *data, gint len, gint w, gint h, gboolean preserve_ratio);
48
49 GtkWidget *linphone_gtk_create_window(const char *window_name);
50 GtkWidget *linphone_gtk_get_widget(GtkWidget *window, const char *name);
51 GtkWidget *linphone_gtk_create_widget(const char *filename, const char *widget_name);
52
53 LinphoneCore *linphone_gtk_get_core(void);
54 GtkWidget *linphone_gtk_get_main_window();
55 void linphone_gtk_display_something(GtkMessageType type,const gchar *message);
56 void linphone_gtk_start_call(GtkWidget *button);
57 void linphone_gtk_call_terminated();
58 void linphone_gtk_show_friends(void);
59 void linphone_gtk_show_contact(LinphoneFriend *lf);
60 void linphone_gtk_set_my_presence(LinphoneOnlineStatus ss);
61 void linphone_gtk_show_parameters(void);
62 void linphone_gtk_load_identities(void);
63 void linphone_gtk_create_chatroom(const char *with);
64 void linphone_gtk_text_received(LinphoneCore *lc, LinphoneChatRoom *room, const LinphoneAddress *from, const char *message);
65 void linphone_gtk_call_log_update(GtkWidget *w);
66 void linphone_gtk_create_log_window(void);
67 void linphone_gtk_log_show(void);
68 void linphone_gtk_log_push(OrtpLogLevel lev, const char *fmt, va_list args);
69 void linphone_gtk_destroy_log_window(void);
70 gboolean linphone_gtk_check_logs();
71 void linphone_gtk_buddy_info_updated(LinphoneCore *lc, LinphoneFriend *lf);
72 const gchar *linphone_gtk_get_ui_config(const char *key, const char *def);
73 int linphone_gtk_get_ui_config_int(const char *key, int def);
74 void linphone_gtk_set_ui_config_int(const char *key , int val);
75 void linphone_gtk_visibility_set(const char *hiddens, const char *window_name, GtkWidget *w, gboolean show);
76
77 void linphone_gtk_open_browser(const char *url);
78 void linphone_gtk_check_for_new_version(void);
79 const char *linphone_gtk_get_lang(const char *config_file);
80 void linphone_gtk_set_lang(const char *code);
81 SipSetupContext* linphone_gtk_get_default_sip_setup_context(void);
82 GtkWidget * linphone_gtk_show_buddy_lookup_window(SipSetupContext *ctx);
83 void linphone_gtk_buddy_lookup_set_keyword(GtkWidget *w, const char *kw);
84 void * linphone_gtk_wait(LinphoneCore *lc, void *ctx, LinphoneWaitingState ws, const char *purpose, float progress);
85
86 void linphone_gtk_show_directory_search(void);
87
88 /*functions controlling the different views*/
89 gboolean linphone_gtk_use_in_call_view();
90 LinphoneCall *linphone_gtk_get_currently_displayed_call();
91 void linphone_gtk_create_in_call_view(LinphoneCall *call);
92 void linphone_gtk_in_call_view_set_calling(LinphoneCall *call);
93 void linphone_gtk_in_call_view_set_in_call(LinphoneCall *call);
94 void linphone_gtk_in_call_view_update_duration(LinphoneCall *call);
95 void linphone_gtk_in_call_view_terminate(LinphoneCall *call, const char *error_msg);
96 void linphone_gtk_in_call_view_set_incoming(LinphoneCall *call, bool_t with_pause);
97 void linphone_gtk_in_call_view_set_paused(LinphoneCall *call);
98 void linphone_gtk_enable_mute_button(GtkButton *button, gboolean sensitive);
99 void linphone_gtk_enable_hold_button(LinphoneCall *call, gboolean sensitive, gboolean holdon);
100
101 void linphone_gtk_show_login_frame(LinphoneProxyConfig *cfg);
102 void linphone_gtk_exit_login_frame(void);
103 void linphone_gtk_set_ui_config(const char *key, const char *value);