2
/* Ekiga -- A VoIP and Video-Conferencing application
3
* Copyright (C) 2000-2006 Damien Sandras
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
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.
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 Foundation,
17
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
20
* Ekiga is licensed under the GPL license and as a special exception,
21
* you have permission to link or otherwise combine this program with the
22
* programs OPAL, OpenH323 and PWLIB, and distribute the combination,
23
* without applying the requirements of the GNU GPL to the OPAL, OpenH323
24
* and PWLIB programs, as long as you do follow the requirements of the
25
* GNU GPL for all the rest of the software thus combined.
30
* main_window.h - description
31
* -----------------------------
32
* begin : Mon Mar 26 2001
33
* copyright : (C) 2000-2006 by Damien Sandras
34
* description : This file contains all the functions needed to
35
* build the main window.
39
#ifndef _MAIN_INTERFACE_H
40
#define _MAIN_INTERFACE_H
51
* BEHAVIOR : Press the given dialpad key.
52
* PRE : The main window GMObject, the key to press (0 - 9, *, #).
54
void gm_main_window_press_dialpad (GtkWidget *main_window,
59
* BEHAVIOR : Return the video widget in which we can display.
60
* PRE : The main window GMObject.
62
GtkWidget *gm_main_window_get_video_widget (GtkWidget *main_window);
66
* BEHAVIOR : Displays the gnomemeeting logo in the video window.
67
* PRE : The main window GMObject.
69
void gm_main_window_update_logo_have_window (GtkWidget *main_window);
73
* BEHAVIOR : Displays the gnomemeeting logo in the video window.
76
void gm_main_window_update_logo ();
79
* BEHAVIOR : Update the main window hold call menu and toolbar items
80
* following the call is on hold (TRUE) or not (FALSE).
81
* PRE : The main window GMObject.
83
void gm_main_window_set_call_hold (GtkWidget *main_window,
88
* BEHAVIOR : Update the main window pause channel menu and toolbar items
89
* following the channel is paused (TRUE) or not (FALSE). The
90
* last argument is true if we are modifying a video channel
92
* PRE : The main window GMObject.
94
void gm_main_window_set_channel_pause (GtkWidget *main_window,
100
* BEHAVIOR : Update the main window sensitivity and state following
101
* the given calling state.
102
* The state of widgets that depend on the calling state only
104
* - the sensitivity of menu and toolbar items,
105
* - the stay on top state of windows depending of the main
107
* - the state of the calling button,
108
* - the transfer call window,
109
* - the incoming call window can be destroyed or not.
110
* Widgets for which the state depends on other parameters
111
* are udpated in separate functions.
112
* PRE : The main window GMObject.
113
* A valid GMH323Endpoint calling state.
115
void gm_main_window_update_calling_state (GtkWidget *main_window,
116
unsigned calling_state);
121
* BEHAVIOR : Update the main window busy state. When the window is busy,
122
* a busy cursor is displayed and you can not exit.
123
* PRE : The main window GMObject.
124
* The first parameter is TRUE if we are busy.
126
void gm_main_window_set_busy (GtkWidget *main_window,
131
* BEHAVIOR : Update the main window audio sliders to the given values,
132
* notice it only updates the GUI.
133
* PRE : A valid pointer to the main window GMObject, followed
134
* by the output and input volumes.
135
* Their values must be comprised between -1 (no change) and
138
void gm_main_window_set_volume_sliders_values (GtkWidget *main_window,
144
* BEHAVIOR : Gets the values of the main window audio sliders.
145
* PRE : A valid pointer to the main window GMObject, followed
146
* by the output and input volumes.
147
* Their values will be comprised between 0 and 255 when
148
* the function returns.
150
void gm_main_window_get_volume_sliders_values (GtkWidget *main_window,
156
* BEHAVIOR : Update the main window video sliders to the given values,
157
* notice it only updates the GUI.
158
* PRE : A valid pointer to the main window GMObject, followed
159
* by the whiteness, brightness, colourness and contrast.
160
* Their values must be comprised between -1 (no change) and
163
void gm_main_window_set_video_sliders_values (GtkWidget *main_window,
171
* BEHAVIOR : Gets the values for the main window video sliders and
172
* updates the parameters accordingly.
173
* Notice it only reads the values from the GUI, not from
175
* PRE : A valid pointer to the main window GMObject, followed
176
* by the whiteness, brightness, colourness and contrast.
177
* Their values will be comprised between 0 and 255 when
178
* the function returns.
180
void gm_main_window_get_video_sliders_values (GtkWidget *main_window,
188
* BEHAVIOR : Select the correct panel section in the menus
189
* and in the main window.
190
* PRE : The main window GMObject and a valid section.
192
void gm_main_window_set_panel_section (GtkWidget *main_window,
197
* BEHAVIOR : Set the status for the main window.
198
* PRE : The main window GMObject and a valid incoming call mode.
200
void gm_main_window_set_status (GtkWidget *main_window,
201
std::string short_status,
202
std::string long_status);
206
* BEHAVIOR : Updates the information displayed in the info label
207
* of the main window.
208
* PRE : The main window GMObject,
209
* the transmitted audio codec,
210
* the received audio codec (if any),
211
* the transmitted video codec,
212
* the received video codec(if any).
214
void gm_main_window_set_call_info (GtkWidget *main_window,
215
const char *tr_audio_codec,
216
const char *re_audio_codec,
217
const char *tr_video_codec,
218
const char *re_video_codec);
222
* BEHAVIOR : Sets the current call duration (as a string) in the GUI.
223
* PRE : The main window GMObject.
225
void gm_main_window_set_call_duration (GtkWidget *main_window,
226
const char *duration);
230
* BEHAVIOR : Sets the current status in the GUI.
231
* PRE : The main window GMObject.
233
void gm_main_window_set_status (GtkWidget *main_window,
238
* BEHAVIOR : Update the speed dials menu in the call menu given the
239
* main window GMObject and using the address book.
240
* PRE : The main window GMObject and the GSList of GmContacts.
242
void gm_main_window_speed_dials_menu_update (GtkWidget *main_window,
247
* BEHAVIOR : Update the urls in the cache of the url entry. It is done
248
* using the list of the last 100 given/received/missed calls,
249
* but also using the address book contacts.
250
* PRE : The main window GMObject.
252
void gm_main_window_urls_history_update (GtkWidget *main_window);
256
* BEHAVIOR : Runs a dialog to transfer a call.
257
* Returns TRUE if the user chose to transfer.
258
* PRE : The main window GMObject, the parent window, the URL
259
* to put in the dialog as default.
261
gboolean gm_main_window_transfer_dialog_run (GtkWidget *main_window,
262
GtkWidget *parent_window,
267
* BEHAVIOR : Builds the main window and adds the popup to the image.
270
GtkWidget *gm_main_window_new (Ekiga::ServiceCore & core);
274
* BEHAVIOR : Flashes a message on the statusbar during a few seconds.
275
* Removes the previous message.
276
* PRE : The main window GMObject, followed by printf syntax format.
278
void gm_main_window_flash_message (GtkWidget *main_window,
280
...) G_GNUC_PRINTF(2,3);
284
* BEHAVIOR : Displays a message on the statusbar indicating the number
285
* of missed calls and voice mails.
286
* PRE : The main window GMObject, followed by the number of missed
287
* calls and the number of voice mails.
289
void gm_main_window_push_message (GtkWidget *main_window,
295
* BEHAVIOR : Displays a message on the statusbar or clears it if msg = 0.
296
* Removes the previous message.
297
* PRE : The main window GMObject, followed by printf syntax format.
299
void gm_main_window_push_message (GtkWidget *main_window,
301
...) G_GNUC_PRINTF(2,3);
305
* BEHAVIOR : Displays an info message on the statusbar. An info message
306
* is only cleared when the user clicks on it.
307
* PRE : The main window GMObject, followed by printf syntax format.
309
void gm_main_window_push_info_message (GtkWidget *main_window,
311
...) G_GNUC_PRINTF(2,3);
314
* BEHAVIOR : Sets the given URL as called URL.
315
* PRE : The main window GMObject.
317
void gm_main_window_set_call_url (GtkWidget *main_window,
322
* BEHAVIOR : Appends the given string to the current URL. Replaces the
323
* current selection if any.
324
* PRE : The main window GMObject.
326
void gm_main_window_append_call_url (GtkWidget *main_window,
331
* BEHAVIOR : Returns the currently called URL in the URL bar.
332
* PRE : The main window GMObject.
334
const char *gm_main_window_get_call_url (GtkWidget *main_window);
338
* BEHAVIOR : Clears the stats area in the control panel.
339
* PRE : The main window GMObject.
341
void gm_main_window_clear_stats (GtkWidget *main_window);
345
* BEHAVIOR : Updates the stats area in the control panel.
346
* PRE : The main window GMObject, lost, late packets, rtt, jitter,
347
* video bytes received, transmitted, audio bytes received,
348
* transmitted. All >= 0.
350
void gm_main_window_update_stats (GtkWidget *main_window,
355
float new_video_octets_received,
356
float new_video_octets_transmitted,
357
float new_audio_octets_received,
358
float new_audio_octets_transmitted,
359
unsigned int re_width,
360
unsigned int re_height,
361
unsigned int tr_width,
362
unsigned int tr_height);
366
* BEHAVIOR : Returns the currently displayed picture as a pixbuf.
367
* PRE : The main window GMObject.
369
GdkPixbuf *gm_main_window_get_current_picture (GtkWidget *main_window);
373
* BEHAVIOR : Returns the currently displayed picture as a pixbuf.
374
* PRE : The main window GMObject.
376
void gm_main_window_set_stay_on_top (GtkWidget *main_window,
377
gboolean stay_on_top);
381
* BEHAVIOR : Update the main window sensitivity following the opened
382
* and closed audio and video channels. It also updates
383
* the state of the video preview button.
384
* PRE : The main window GMObject.
385
* The first parameter is TRUE if we are updating video
386
* channels related items, FALSE if we are updating audio
387
* channels related items. The second parameter is TRUE
388
* if we are transmitting audio (or video), the third is TRUE
389
* if we are receiving audio (or video).
391
void gm_main_window_update_sensitivity (GtkWidget *main_window,
394
bool is_transmitting);
398
* BEHAVIOR : Updates the menu sensitivity
399
* PRE : The main window GMObject.
401
void gm_main_window_fullscreen_menu_update_sensitivity (bool fullscreen);