Fix typo in license headers
[oweals/cde.git] / cde / programs / dtinfo / dtinfo / wwl / include / WWL / WTimeOut.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 /*
24  *      WWL             (c) Copyright LRI 1990
25  *      Copyright (c) 1990, 1991 Jean-Daniel Fekete
26  *      Copyright (c) 1990, 1991 LRI, Universitee de Paris-Sud (France)
27  *
28  *      Permission to use, copy, modify and distribute this software
29  *      and its documentation for any purpose and without fee is hereby
30  *      granted, provided that the above copyright notice appears in
31  *      all copies of the software. This software is provided "as-is"
32  *      without express or implied warranty.
33  *
34  *      C++ Time Outs
35  *
36  *      $XConsortium: WTimeOut.h /main/3 1996/06/11 16:58:44 cde-hal $
37  */
38
39 #ifndef _WTimeOut_h
40 #define _WTimeOut_h
41
42 class WWL;
43 class WTimeOut;
44
45 typedef void (WWL::* WTimeOutFunc) (WTimeOut *);
46
47 // WARNING: Do not create temporary WTimeOut objects or you'll be sorry.
48 //          This means that WTimeOut objects MUST be created with new!!
49
50 // WTimeOut objects are automatically deleted after the timeout proc is called.
51 // Delete the WTimeOut object to cancel the timeout.
52
53 // -- DJB 10/06/92
54
55 class WTimeOut {
56 protected:
57         WWL            *object;
58         WTimeOutFunc    func;
59         XtIntervalId    interval_id;
60         XtPointer       client_data;
61         
62 public:
63         WTimeOut (XtAppContext, unsigned long interval,
64                   WWL *, WTimeOutFunc, XtPointer client = NULL);
65         ~WTimeOut();
66
67         void    Call();
68         
69 inline  WTimeOutFunc    Fun()                   { return func; }
70 inline  void            Fun (WTimeOutFunc f)    { func = f; }
71 inline  WWL*            Obj()                   { return object; }
72 inline  void            Obj (WWL *o)            { object = o; }
73 inline  XtPointer       ClientData()            { return client_data; }
74 };
75
76 #endif