~noskcaj/ubuntu/trusty/ekiga/ftbfs

« back to all changes in this revision

Viewing changes to src/gui/misc.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2006-01-28 18:49:20 UTC
  • Revision ID: james.westby@ubuntu.com-20060128184920-v525ihmiv7id40xs
Tags: upstream-1.99.0
Import upstream version 1.99.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
/* GnomeMeeting -- A 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
 
17
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
18
 *
 
19
 *
 
20
 * GnomeMeting 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 OpenH323 and Pwlib, and distribute the combination, without
 
23
 * applying the requirements of the GNU GPL to the OpenH323 program, as long
 
24
 * as you do follow the requirements of the GNU GPL for all the rest of the
 
25
 * software thus combined.
 
26
 */
 
27
 
 
28
 
 
29
/*
 
30
 *                         misc.h  -  description
 
31
 *                         ----------------------
 
32
 *   begin                : Thu Nov 22 2001
 
33
 *   copyright            : (C) 2000-2006 by Damien Sandras
 
34
 *   description          : This file contains miscellaneous functions.
 
35
 *   Additional Code      : De Michele Cristiano, Miguel Rodr�guez 
 
36
 *
 
37
 */
 
38
 
 
39
 
 
40
#ifndef _MISC_H_
 
41
#define _MISC_H_
 
42
 
 
43
#include "common.h"
 
44
 
 
45
 
 
46
/* DESCRIPTION  :  /
 
47
 * BEHAVIOR     :  Takes the GDK lock if we are not in the main thread.
 
48
 * PRE          :  Must not be called instead of gdk_threads_enter in timers
 
49
 *                 or idle functions, because they are executed in the main
 
50
 *                 thread.
 
51
 */
 
52
void 
 
53
gnomemeeting_threads_enter ();
 
54
 
 
55
 
 
56
/* DESCRIPTION  :  /
 
57
 * BEHAVIOR     :  Releases the GDK lock if we are not in the main thread.
 
58
 * PRE          :  Must not be called instead of gdk_threads_leave in timers
 
59
 *                 or idle functions, because they are executed in the main
 
60
 *                 thread.
 
61
 */
 
62
void 
 
63
gnomemeeting_threads_leave ();
 
64
 
 
65
 
 
66
/* DESCRIPTION  :  / 
 
67
 * BEHAVIOR     :  Creates a button with the GtkWidget * as pixmap 
 
68
 *                 and the label as label.
 
69
 * PRE          :  /
 
70
 */
 
71
GtkWidget *
 
72
gnomemeeting_button_new (const char *, 
 
73
                         GtkWidget *);
 
74
 
 
75
 
 
76
/* DESCRIPTION   :  /
 
77
 * BEHAVIOR      : Takes a PString and returns the Left part before a [ or a (.
 
78
 * PRE           : An non-empty PString.
 
79
 */
 
80
PString 
 
81
gnomemeeting_pstring_cut (PString);
 
82
 
 
83
 
 
84
/* DESCRIPTION   :  /
 
85
 * BEHAVIOR      : Takes an ISO-8859-1 encoded PString, and returns an UTF-8
 
86
 *                 encoded string.
 
87
 * PRE           : An ISO-8859-1 encoded PString.
 
88
 */
 
89
gchar *
 
90
gnomemeeting_from_iso88591_to_utf8 (PString);
 
91
 
 
92
 
 
93
gchar *gnomemeeting_get_utf8 (PString);
 
94
 
 
95
void
 
96
gdk_window_set_always_on_top (GdkWindow *window, 
 
97
                              gboolean enable);
 
98
 
 
99
 
 
100
 
 
101
/* DESCRIPTION  :  / 
 
102
 * BEHAVIOR     :  Returns TRUE if the specified window is present and visible
 
103
 *                 on the current workspace, FALSE otherwise.
 
104
 * PRE          :  Argument is a GtkWindow *.
 
105
 */
 
106
gboolean gnomemeeting_window_is_visible (GtkWidget *);
 
107
        
 
108
 
 
109
/* DESCRIPTION  :  This callback is called when a window of gnomemeeting
 
110
 *                 (addressbook, prefs, ...) has to be shown.
 
111
 * BEHAVIOR     :  Restore its size (if applicable) and position from the
 
112
 *                 config database. The window is given as gpointer.
 
113
 *                 The category can be addressbook, main_window, prefs_window,
 
114
 *                 or anything under the
 
115
 *                 /apps/gnomemeeting/general/user_interface/ key and is given
 
116
 *                 by g_object_get_data (G_OBJECT, "window_name"). The window
 
117
 *                 object is pointed by the GtkWidget *.
 
118
 * PRE          :  /
 
119
 */
 
120
void gnomemeeting_window_show (GtkWidget *);
 
121
 
 
122
 
 
123
/* DESCRIPTION  :  /
 
124
 * BEHAVIOR     :  Gets the size of the GmWindow stored in the configuration.
 
125
 *                 The window is given as gpointer.
 
126
 *                 The category can be addressbook, main_window, prefs_window,
 
127
 *                 or anything under the
 
128
 *                 /apps/gnomemeeting/general/user_interface/ key and is given
 
129
 *                 by g_object_get_data (G_OBJECT, "window_name"). The window
 
130
 *                 object is pointed by the GtkWidget *.
 
131
 * PRE          :  /
 
132
 */
 
133
void gnomemeeting_window_get_size (GtkWidget *, 
 
134
                                   int &, 
 
135
                                   int &);
 
136
 
 
137
 
 
138
/* DESCRIPTION  :  This callback is called when a window of gnomemeeting
 
139
 *                 (addressbook, prefs, ...) has to be hidden.
 
140
 * BEHAVIOR     :  Saves its size (if applicable) and position in the config
 
141
 *                 database. The window is given as gpointer.
 
142
 *                 The category can be addressbook, main_window, prefs_window,
 
143
 *                 or anything under the
 
144
 *                 /apps/gnomemeeting/general/user_interface/ key and is given
 
145
 *                 by g_object_get_data (G_OBJECT, "window_name"). The window
 
146
 *                 object is pointed by the GtkWidget *.
 
147
 * PRE          :  /
 
148
 */
 
149
void gnomemeeting_window_hide (GtkWidget *);
 
150
 
 
151
 
 
152
/* DESCRIPTION  :  Concatenates a firstname and a lastname into a fullname.
 
153
 * BEHAVIOR     :  If both parts are non NULL and non-empty, 
 
154
 *                 they are concatenated with a space in-between, 
 
155
 *                 else fullname becomes a copy of the nonempty part.
 
156
 *                 If both parts are NULL or have a zero length, 
 
157
 *                 returns NULL.
 
158
 * PRE          :  /
 
159
 */
 
160
gchar *gnomemeeting_create_fullname (const gchar *firstname, 
 
161
                                     const gchar *lastname);
 
162
 
 
163
#endif