]> sjero.net Git - linphone/blob - gtk/linphone.h
Updated translation file
[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 #ifdef ENABLE_NLS
32 # include <libintl.h>
33 # undef _
34 # define _(String) gettext (String)
35 #else
36 # define _(String) (String)
37 # define ngettext(singular,plural,number) ((number>1) ? (plural) : (singular) )
38 #endif
39
40 #undef N_
41 #define N_(str) (str)
42
43 #ifdef USE_BUILDDATE_VERSION
44 #include "version_date.h"
45 #undef LINPHONE_VERSION
46 #define LINPHONE_VERSION LINPHONE_VERSION_DATE
47 #endif
48
49 GdkPixbuf * create_pixbuf(const gchar *filename);
50 GdkPixbufAnimation *create_pixbuf_animation(const gchar *filename);
51 void add_pixmap_directory(const gchar *directory);
52 GtkWidget*create_pixmap(const gchar     *filename);
53 GtkWidget *_gtk_image_new_from_memory_at_scale(const void *data, gint len, gint w, gint h, gboolean preserve_ratio);
54 GdkPixbuf *_gdk_pixbuf_new_from_memory_at_scale(const void *data, gint len, gint w, gint h, gboolean preserve_ratio);
55
56 void linphone_gtk_destroy_window(GtkWidget *window);
57 GtkWidget *linphone_gtk_create_window(const char *window_name);
58 GtkWidget *linphone_gtk_get_widget(GtkWidget *window, const char *name);
59 GtkWidget *linphone_gtk_create_widget(const char *filename, const char *widget_name);
60
61 const char *linphone_gtk_message_storage_get_db_file(const char *filename);
62 void linphone_gtk_show_assistant(void);
63 void linphone_gtk_close_assistant(void);
64
65 LinphoneCore *linphone_gtk_get_core(void);
66 GtkWidget *linphone_gtk_get_main_window();
67 void linphone_gtk_display_something(GtkMessageType type,const gchar *message);
68 void linphone_gtk_start_call(GtkWidget *button);
69 void linphone_gtk_call_terminated();
70 void linphone_gtk_set_my_presence(LinphoneOnlineStatus ss);
71 void linphone_gtk_show_parameters(void);
72 void linphone_gtk_fill_soundcards(GtkWidget *pb);
73 void linphone_gtk_fill_webcams(GtkWidget *pb);
74 void linphone_gtk_load_identities(void);
75 void linphone_gtk_call_log_update(GtkWidget *w);
76 void linphone_gtk_create_log_window(void);
77 void linphone_gtk_log_show(void);
78 void linphone_gtk_show_main_window(void);
79 void linphone_gtk_log_push(OrtpLogLevel lev, const char *fmt, va_list args);
80 void linphone_gtk_destroy_log_window(void);
81 void linphone_gtk_refer_received(LinphoneCore *lc, const char *refer_to);
82 gboolean linphone_gtk_check_logs();
83 const gchar *linphone_gtk_get_ui_config(const char *key, const char *def);
84 int linphone_gtk_get_ui_config_int(const char *key, int def);
85 void linphone_gtk_set_ui_config_int(const char *key , int val);
86 void linphone_gtk_visibility_set(const char *hiddens, const char *window_name, GtkWidget *w, gboolean show);
87
88 void linphone_gtk_open_browser(const char *url);
89 void linphone_gtk_check_for_new_version(void);
90 const char *linphone_gtk_get_lang(const char *config_file);
91 void linphone_gtk_set_lang(const char *code);
92 SipSetupContext* linphone_gtk_get_default_sip_setup_context(void);
93 GtkWidget * linphone_gtk_show_buddy_lookup_window(SipSetupContext *ctx);
94 void linphone_gtk_buddy_lookup_set_keyword(GtkWidget *w, const char *kw);
95 void * linphone_gtk_wait(LinphoneCore *lc, void *ctx, LinphoneWaitingState ws, const char *purpose, float progress);
96 void linphone_gtk_terminate_call(GtkWidget *button);
97 void linphone_gtk_call_update_tab_header(LinphoneCall *call,gboolean pause);
98 void linphone_gtk_show_directory_search(void);
99 void linphone_gtk_status_icon_set_blinking(gboolean val);
100 void linphone_gtk_notify(LinphoneCall *call, const char *msg);
101
102 void linphone_gtk_load_chatroom(LinphoneChatRoom *cr,const LinphoneAddress *uri,GtkWidget *chat_view);
103 void linphone_gtk_send_text();
104 GtkWidget * linphone_gtk_init_chatroom(LinphoneChatRoom *cr, const LinphoneAddress *with);
105 LinphoneChatRoom * linphone_gtk_create_chatroom(const LinphoneAddress *with);
106 void linphone_gtk_text_received(LinphoneCore *lc, LinphoneChatRoom *room, LinphoneChatMessage *msg);
107
108 void linphone_gtk_friend_list_update_chat_picture();
109 void linphone_gtk_friend_list_set_chat_conversation(const LinphoneAddress *la);
110 gboolean linphone_gtk_friend_list_is_contact(const LinphoneAddress *addr);
111 void linphone_gtk_notebook_tab_select(GtkNotebook *notebook,GtkWidget *page,guint page_num, gpointer data);
112 void linphone_gtk_show_friends(void);
113 void linphone_gtk_show_contact(LinphoneFriend *lf);
114 void linphone_gtk_buddy_info_updated(LinphoneCore *lc, LinphoneFriend *lf);
115
116 /*functions controlling the different views*/
117 gboolean linphone_gtk_use_in_call_view();
118 LinphoneCall *linphone_gtk_get_currently_displayed_call(gboolean *is_conf);
119 void linphone_gtk_create_in_call_view(LinphoneCall *call);
120 void linphone_gtk_in_call_view_set_calling(LinphoneCall *call);
121 void linphone_gtk_in_call_view_set_in_call(LinphoneCall *call);
122 void linphone_gtk_in_call_view_update_duration(LinphoneCall *call);
123 void linphone_gtk_in_call_view_terminate(LinphoneCall *call, const char *error_msg);
124 void linphone_gtk_in_call_view_set_incoming(LinphoneCall *call);
125 void linphone_gtk_in_call_view_set_paused(LinphoneCall *call);
126 void linphone_gtk_in_call_view_set_transfer_status(LinphoneCall *call,LinphoneCallState cstate);
127 void linphone_gtk_mute_clicked(GtkButton *button);
128 void transfer_button_clicked(GtkWidget *button, gpointer call_ref);
129 void linphone_gtk_enable_mute_button(GtkButton *button, gboolean sensitive);
130 void linphone_gtk_enable_hold_button(LinphoneCall *call, gboolean sensitive, gboolean holdon);
131 void linphone_gtk_enable_transfer_button(LinphoneCore *lc, gboolean value);
132 void linphone_gtk_enable_conference_button(LinphoneCore *lc, gboolean value);
133 void linphone_gtk_set_in_conference(LinphoneCall *call);
134 void linphone_gtk_unset_from_conference(LinphoneCall *call);
135 void linphone_gtk_terminate_conference_participant(LinphoneCall *call);
136 void linphone_gtk_in_call_view_show_encryption(LinphoneCall *call);
137 void linphone_gtk_update_video_button(LinphoneCall *call);
138 typedef float (*get_volume_t)(void *data);
139 void linphone_gtk_init_audio_meter(GtkWidget *w, get_volume_t get_volume, void *data);
140
141 void linphone_gtk_show_login_frame(LinphoneProxyConfig *cfg);
142 void linphone_gtk_exit_login_frame(void);
143 void linphone_gtk_set_ui_config(const char *key, const char *value);
144
145 void linphone_gtk_log_uninit();
146
147 bool_t linphone_gtk_init_instance(const char *app_name, const char *addr_to_call);
148 void linphone_gtk_uninit_instance(void);
149 void linphone_gtk_monitor_usb(void);
150 void linphone_gtk_unmonitor_usb(void);
151
152 gchar *linphone_gtk_get_record_path(const LinphoneAddress *address, gboolean is_conference);