2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
6 * These libraries and programs are free software; you can
7 * redistribute them and/or modify them under the terms of the GNU
8 * Lesser General Public License as published by the Free Software
9 * Foundation; either version 2 of the License, or (at your option)
12 * These libraries and programs are distributed in the hope that
13 * they will be useful, but WITHOUT ANY WARRANTY; without even the
14 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with these librararies and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
23 /* $XConsortium: I18nEnv.h /main/1 1996/03/25 00:51:43 pascale $ */
24 /************************************<+>*************************************
25 ****************************************************************************
30 ** This file contains function definitions for the corresponding .c
34 ****************************************************************************
35 ************************************<+>*************************************/
37 * (c) Copyright 1996 Digital Equipment Corporation.
38 * (c) Copyright 1996 Hewlett-Packard Company.
39 * (c) Copyright 1996 International Business Machines Corp.
40 * (c) Copyright 1996 Sun Microsystems, Inc.
41 * (c) Copyright 1996 Novell, Inc.
42 * (c) Copyright 1996 FUJITSU LIMITED.
43 * (c) Copyright 1996 Hitachi.
54 #include <sys/param.h>
55 #include <sys/socket.h>
59 #define MAXPATHLEN 1024
62 #define DtUSER_TMP_DIR "./dt/tmp"
63 #define DtUSER_IMSFS_DIR "/.dt/ims"
65 #define NAME_NONE "none"
66 #define NAME_LOCAL "local"
67 #define NAME_BUILTIN "builtin"
69 #define STR_PREFIX_CHAR '@'
70 #define STR_DEFAULTIMS "DefaultIms"
71 #define STR_SELECTMODE "SelectMode"
72 #define STR_IMSNAME "ImsName"
73 #define STR_HOSTNAME "HostName"
74 #define TAG_END_CHAR ':'
79 #define HOST_UNKNOWN 2
81 typedef struct _FileSel {
82 char *fname; /* IM selection file full path name */
83 char *hostname; /* User selected hostname */
84 char *im_name; /* User selected Input Method */
85 int start_mode; /* User selected start mode */
89 int inactive; /* Status of the IM */
90 char *im_name; /* File name of the IM as found in the locale
92 char *im_label; /* Label to present to the user */
93 Boolean im_default; /* Is this the default one? */
98 char *host_name; /* hostname selected in the ComboBox */
99 ImsEnt *ims_list ; /* list of IMS entities on this host */
100 int ims_list_size ; /* number of IMS entities */
103 typedef struct _UserEnv {
104 char *localhostname; /* hostname the user has started dtstyle */
105 char *username; /* user name */
106 char *displayname; /* display dtstyle is running on */
107 char *locale; /* system-specific locale from $LANG */
108 char *CDE_locale; /* CDE generic locale name */
112 typedef struct _PipeRec {
115 XtIntervalId timer_id ;
118 typedef struct _I18nEnv {
119 UserEnv *user_env; /* User environmnet */
120 ImsSel *ims_sel; /* Available IMS */
121 FileSel *file_sel; /* User IMS Selection File values */
122 PipeRec *pipe_info; /* Info needed for the pipe execution */
157 /* External declarations */
158 extern I18nEnv i18n_env;
160 extern int _DtI18nGetEnvValues(I18nEnv *env);
161 extern int _DtI18nGetImList(I18nEnv *env, char *hostname);
162 extern void _DtI18nSetSensitiveImTB(I18nEnv *env, Boolean sensitivity);
163 extern int _DtI18nWriteImSelectionFile(I18nEnv *env);
164 extern void _DtI18nErrorDialog(int err) ;
166 #include "I18nUtil.h"
168 #endif /* _i18nEnv_h */
169 /* DON'T ADD ANYTHING AFTER THIS #endif */