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 libraries and programs; if not, write
20 * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21 * Floor, Boston, MA 02110-1301 USA
25 * WWL (c) Copyright LRI 1990
26 * Copyright (c) 1990, 1991 Jean-Daniel Fekete
27 * Copyright (c) 1990, 1991 LRI, Universitee de Paris-Sud (France)
29 * Permission to use, copy, modify and distribute this software
30 * and its documentation for any purpose and without fee is hereby
31 * granted, provided that the above copyright notice appears in
32 * all copies of the software. This software is provided "as-is"
33 * without express or implied warranty.
37 * $XConsortium: WCallback.h /main/4 1996/06/11 16:58:00 cde-hal $
46 typedef void (WWL::* WWL_FUN) (WCallback*);
55 void AddCb (WCallback *);
56 Boolean RemoveCb (WCallback *);
57 void removeCallbacks();
60 virtual void __dummy();
61 /* Without a virtual function in the WWL base class, the C++
62 translator cfront will not generate the correct code to
63 call virtual callback functions because it doesn't think
64 that virtuals can be called and only generates code to
65 call non-virtual memebers. */
80 WCallback (Widget, const char*, WWL*, WWL_FUN, void* client=0);
81 WCallback (WObject&, const char*, WWL*, WWL_FUN, void* client=0);
82 WCallback (Widget, Atom, WWL*, WWL_FUN, void* client=0);
83 WCallback (WObject&, Atom, WWL*, WWL_FUN, void* client=0);
88 inline WWL_FUN Fun () { return fun; }
89 inline void Fun (WWL_FUN f) { fun = f; }
90 inline WWL* Obj () { return object; }
91 inline void Obj (WWL* o) { o->AddCb (this); }
92 inline caddr_t CallData () { return call_data; }
93 inline caddr_t ClientData () { return client_data; }
94 inline Widget GetWidget () { return widget; }
95 // inline Widget Widget() { return widget; }
96 inline WObject* GetWObject () { return wobject; }
97 // inline WObject* WObject() { return wobject; }