remove ultrix support
[oweals/cde.git] / cde / lib / tt / lib / mp / mp_desktop.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
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)
10  * any later version.
11  *
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
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these libraries and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /*%%  (c) Copyright 1993, 1994 Hewlett-Packard Company                   */
24 /*%%  (c) Copyright 1993, 1994 International Business Machines Corp.     */
25 /*%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                    */
26 /*%%  (c) Copyright 1993, 1994 Novell, Inc.                              */
27 /*%%  $XConsortium: mp_desktop.h /main/3 1995/10/23 10:23:14 rswiston $                                                          */
28 /*
29  * mp_desktop.h 1.6 30 Jul 1993
30  *
31  * Tool Talk Message Passer (MP) - mp_desktop.h
32  *
33  * Copyright (c) 1990,1992 by Sun Microsystems, Inc.
34  */
35 #ifndef MP_DESKTOP_H
36 #define MP_DESKTOP_H
37 #include <setjmp.h>
38 #include <mp/mp_global.h>
39 #include <util/tt_object.h>
40
41 enum _Tt_dt_type {
42         _TT_DESKTOP_X11,
43         _TT_DESKTOP_LAST
44 };
45
46 typedef int (*_Tt_dt_errfn)(void *);
47
48 struct _Tt_desktop_private;
49
50 class _Tt_desktop : public _Tt_object {
51       public:
52         _Tt_desktop();
53         virtual ~_Tt_desktop();
54         int                     init(_Tt_string dt_handle, _Tt_dt_type t);
55         int                     notify_fd();
56         int                     process_event();
57         int                     lock();
58         int                     unlock();
59         int                     set_prop(_Tt_string pname, _Tt_string &val);
60         int                     del_prop(_Tt_string pname);
61         int                     get_prop(_Tt_string pname, _Tt_string &val);
62         _Tt_string              session_name(_Tt_string dt_handle);
63         void                    set_error_handler(_Tt_dt_errfn efn);
64       private:
65         int                     close();
66         void                    restore_user_handler();
67         static int              io_error_proc(void *);
68         int                     *user_io_handler;
69         static jmp_buf          io_exception;
70         _Tt_desktop_private     *priv;
71 };
72
73 #include <mp/mp_desktop_utils.h>
74
75 class _Tt_desktop_lock : public _Tt_object {
76       public:
77         _Tt_desktop_lock();
78         _Tt_desktop_lock( const _Tt_desktop_ptr &dt );
79         virtual ~_Tt_desktop_lock();
80       private:
81         _Tt_desktop_ptr         _dt;
82 };
83
84 #endif                          /* MP_DESKTOP_H */