~ubuntu-branches/ubuntu/vivid/ekiga/vivid-proposed

« back to all changes in this revision

Viewing changes to src/gui/main.h

  • Committer: Bazaar Package Importer
  • Author(s): Kilian Krause
  • Date: 2011-07-17 00:24:50 UTC
  • mfrom: (5.1.5 upstream) (7.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20110717002450-ytg3wsrc1ptd3153
Tags: 3.3.1-1
* New upstream release.
 - Required libpt-dev 2.10 and libopal-dev 3.10
* Fix debian/watch to catch new version
* Remove libnotify0.7.patch - included upstream
* Add libboost-dev and libboost-signals-dev to Build-Depends
* debian/rules: Don't install *.la files for new internal shared libs
* Fix Vcs URIs to point to correct desktop/experimental/ekiga tree

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
/* Ekiga -- A VoIP and Video-Conferencing application
3
 
 * Copyright (C) 2000-2006 Damien Sandras
4
 
 *
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.
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 Foundation,
17
 
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
18
 
 *
19
 
 *
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.
26
 
 */
27
 
 
28
 
 
29
 
/*
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.
36
 
 */
37
 
 
38
 
 
39
 
#ifndef _MAIN_INTERFACE_H
40
 
#define _MAIN_INTERFACE_H
41
 
 
42
 
#include "config.h"
43
 
 
44
 
#include "common.h"
45
 
 
46
 
#include "services.h"
47
 
#include "call.h"
48
 
 
49
 
 
50
 
/* DESCRIPTION  :  /
51
 
 * BEHAVIOR     :  Press the given dialpad key.
52
 
 * PRE          :  The main window GMObject, the key to press (0 - 9, *, #).
53
 
 */
54
 
void gm_main_window_press_dialpad (GtkWidget *main_window,
55
 
                                   const char c);
56
 
 
57
 
 
58
 
/* DESCRIPTION  :  /
59
 
 * BEHAVIOR     :  Return the video widget in which we can display.
60
 
 * PRE          :  The main window GMObject.
61
 
 */
62
 
GtkWidget *gm_main_window_get_video_widget (GtkWidget *main_window);
63
 
 
64
 
 
65
 
/* DESCRIPTION  :  /
66
 
 * BEHAVIOR     :  Displays the gnomemeeting logo in the video window.
67
 
 * PRE          :  The main window GMObject.
68
 
 */
69
 
void gm_main_window_update_logo_have_window (GtkWidget *main_window);
70
 
 
71
 
 
72
 
/* DESCRIPTION  :  /
73
 
 * BEHAVIOR     :  Displays the gnomemeeting logo in the video window.
74
 
 * PRE          :  /
75
 
 */
76
 
void gm_main_window_update_logo ();
77
 
 
78
 
/* DESCRIPTION  :  /
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.
82
 
 */
83
 
void gm_main_window_set_call_hold (GtkWidget *main_window,
84
 
                                   bool is_on_hold);
85
 
 
86
 
 
87
 
/* DESCRIPTION  :  /
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
91
 
 *                 item.
92
 
 * PRE          :  The main window GMObject.
93
 
 */
94
 
void gm_main_window_set_channel_pause (GtkWidget *main_window,
95
 
                                       gboolean pause,
96
 
                                       gboolean is_video);
97
 
 
98
 
 
99
 
/* DESCRIPTION  :  /
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
103
 
 *                 is updated: 
104
 
 *                 - the sensitivity of menu and toolbar items,
105
 
 *                 - the stay on top state of windows depending of the main 
106
 
 *                 window, 
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.
114
 
 */
115
 
void gm_main_window_update_calling_state (GtkWidget *main_window,
116
 
                                          unsigned calling_state);
117
 
 
118
 
 
119
 
 
120
 
/* DESCRIPTION  :  /
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.
125
 
 */
126
 
void gm_main_window_set_busy (GtkWidget *main_window,
127
 
                              bool busy);
128
 
 
129
 
 
130
 
/* DESCRIPTION  :  /
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 
136
 
 *                 255.
137
 
 */
138
 
void gm_main_window_set_volume_sliders_values (GtkWidget *main_window,
139
 
                                               int output_volume,
140
 
                                               int input_volume);
141
 
 
142
 
 
143
 
/* DESCRIPTION  :  /
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.
149
 
 */
150
 
void gm_main_window_get_volume_sliders_values (GtkWidget *main_window,
151
 
                                               int &output_volume,
152
 
                                               int &input_volume);
153
 
 
154
 
 
155
 
/* DESCRIPTION  :  /
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 
161
 
 *                 255.
162
 
 */
163
 
void gm_main_window_set_video_sliders_values (GtkWidget *main_window,
164
 
                                              int whiteness,
165
 
                                              int brightness,
166
 
                                              int colour,
167
 
                                              int contrast);
168
 
 
169
 
 
170
 
/* DESCRIPTION  :  /
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
174
 
 *                 the video grabber.
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.
179
 
 */
180
 
void gm_main_window_get_video_sliders_values (GtkWidget *main_window,
181
 
                                              int &whiteness,
182
 
                                              int &brightness,
183
 
                                              int &colour,
184
 
                                              int &contrast);
185
 
 
186
 
 
187
 
/* DESCRIPTION  :  /
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.
191
 
 */
192
 
void gm_main_window_set_panel_section (GtkWidget *main_window,
193
 
                                       int section);
194
 
 
195
 
 
196
 
/* DESCRIPTION  :  /
197
 
 * BEHAVIOR     :  Set the status for the main window.
198
 
 * PRE          :  The main window GMObject and a valid incoming call mode.
199
 
 */
200
 
void gm_main_window_set_status (GtkWidget *main_window,
201
 
                                std::string short_status,
202
 
                                std::string long_status);
203
 
 
204
 
 
205
 
/* DESCRIPTION  :  /
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).
213
 
 */
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);
219
 
 
220
 
 
221
 
/* DESCRIPTION   :  /
222
 
 * BEHAVIOR      : Sets the current call duration (as a string) in the GUI.
223
 
 * PRE           : The main window GMObject.
224
 
 */
225
 
void gm_main_window_set_call_duration (GtkWidget *main_window,
226
 
                                       const char *duration);
227
 
 
228
 
 
229
 
/* DESCRIPTION   :  /
230
 
 * BEHAVIOR      : Sets the current status in the GUI.
231
 
 * PRE           : The main window GMObject.
232
 
 */
233
 
void gm_main_window_set_status (GtkWidget *main_window,
234
 
                                const char *status);
235
 
 
236
 
 
237
 
/* DESCRIPTION  :  /
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.
241
 
 */
242
 
void gm_main_window_speed_dials_menu_update (GtkWidget *main_window,
243
 
                                             GSList *glist);
244
 
 
245
 
 
246
 
/* DESCRIPTION  :  /
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.
251
 
 */
252
 
void gm_main_window_urls_history_update (GtkWidget *main_window);
253
 
 
254
 
 
255
 
/* DESCRIPTION  :  /
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.
260
 
 */
261
 
gboolean gm_main_window_transfer_dialog_run (GtkWidget *main_window,
262
 
                                             GtkWidget *parent_window,
263
 
                                             const char *u);
264
 
 
265
 
 
266
 
/* DESCRIPTION  :  /
267
 
 * BEHAVIOR     :  Builds the main window and adds the popup to the image.
268
 
 * PRE          :  Accels.
269
 
 */
270
 
GtkWidget *gm_main_window_new (Ekiga::ServiceCore & core);
271
 
 
272
 
 
273
 
/* DESCRIPTION   :  /
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.
277
 
 */
278
 
void gm_main_window_flash_message (GtkWidget *main_window,
279
 
                                   const char *msg,
280
 
                                   ...) G_GNUC_PRINTF(2,3);
281
 
 
282
 
 
283
 
/* DESCRIPTION   :  /
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.
288
 
 */
289
 
void gm_main_window_push_message (GtkWidget *main_window,
290
 
                                  unsigned int missed,
291
 
                                  unsigned int mwi);
292
 
 
293
 
 
294
 
/* DESCRIPTION   :  /
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.
298
 
 */
299
 
void gm_main_window_push_message (GtkWidget *main_window,
300
 
                                  const char *msg,
301
 
                                  ...) G_GNUC_PRINTF(2,3);
302
 
 
303
 
 
304
 
/* DESCRIPTION   :  /
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.
308
 
 */
309
 
void gm_main_window_push_info_message (GtkWidget *main_window,
310
 
                                       const char *msg,
311
 
                                       ...) G_GNUC_PRINTF(2,3);
312
 
 
313
 
/* DESCRIPTION   :  /
314
 
 * BEHAVIOR      : Sets the given URL as called URL.
315
 
 * PRE           : The main window GMObject.
316
 
 */
317
 
void gm_main_window_set_call_url (GtkWidget *main_window,
318
 
                                  const char *url);
319
 
 
320
 
 
321
 
/* DESCRIPTION   :  /
322
 
 * BEHAVIOR      : Appends the given string to the current URL. Replaces the 
323
 
 *                 current selection if any.
324
 
 * PRE           : The main window GMObject.
325
 
 */
326
 
void gm_main_window_append_call_url (GtkWidget *main_window,
327
 
                                     const char *url);
328
 
 
329
 
 
330
 
/* DESCRIPTION   :  /
331
 
 * BEHAVIOR      : Returns the currently called URL in the URL bar.
332
 
 * PRE           : The main window GMObject.
333
 
 */
334
 
const char *gm_main_window_get_call_url (GtkWidget *main_window);
335
 
 
336
 
 
337
 
/* DESCRIPTION   :  /
338
 
 * BEHAVIOR      : Clears the stats area in the control panel. 
339
 
 * PRE           : The main window GMObject.
340
 
 */
341
 
void gm_main_window_clear_stats (GtkWidget *main_window);
342
 
 
343
 
 
344
 
/* DESCRIPTION   :  /
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.
349
 
 */
350
 
void gm_main_window_update_stats (GtkWidget *main_window,
351
 
                                  float lost,
352
 
                                  float late,
353
 
                                  float out_of_order,
354
 
                                  int jitter,
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);
363
 
 
364
 
 
365
 
/* DESCRIPTION   :  /
366
 
 * BEHAVIOR      : Returns the currently displayed picture as a pixbuf.
367
 
 * PRE           : The main window GMObject.
368
 
 */
369
 
GdkPixbuf *gm_main_window_get_current_picture (GtkWidget *main_window);
370
 
 
371
 
 
372
 
/* DESCRIPTION   :  /
373
 
 * BEHAVIOR      : Returns the currently displayed picture as a pixbuf.
374
 
 * PRE           : The main window GMObject.
375
 
 */
376
 
void gm_main_window_set_stay_on_top (GtkWidget *main_window,
377
 
                                     gboolean stay_on_top);
378
 
 
379
 
 
380
 
/* DESCRIPTION  :  /
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).
390
 
 */
391
 
void gm_main_window_update_sensitivity (GtkWidget *main_window,
392
 
                                        bool is_video,
393
 
                                        bool is_receiving,
394
 
                                        bool is_transmitting);
395
 
 
396
 
 
397
 
/* DESCRIPTION   :  /
398
 
 * BEHAVIOR      : Updates the menu sensitivity
399
 
 * PRE           : The main window GMObject.
400
 
 */
401
 
void gm_main_window_fullscreen_menu_update_sensitivity (bool fullscreen);
402
 
 
403
 
#endif
404