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 /*%% (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 /*%% $TOG: api_typecb.h /main/5 1999/10/14 18:40:11 mgreess $ */
30 * @(#)api_typecb.h 1.2 93/07/30 SMI
32 * Copyright (c) 1993 by Sun Microsystems, Inc.
34 * _Tt_typecb is a class which holds a <typename, opnum, callback list>
35 * triple. Tables of these are attached to _Tt_c_procid instances to hold
36 * the callbacks registerd by tt_ptype_opnum_callback_add and
37 * tt_otype_opnum_callback_add.
43 #include "util/tt_object.h"
44 #include "api/c/tt_c.h"
45 #include "api/c/api_handle.h"
48 // Avoid g++ compiler errors on linux.
49 #define typename typenm
52 class _Tt_typecb : public _Tt_object {
55 _Tt_typecb(const _Tt_string &typenm, int opnum);
56 virtual ~_Tt_typecb();
57 _Tt_string & get_typename();
59 void add_callback(Tt_message_callback f);
60 Tt_callback_action run_callbacks(Tt_message mh, Tt_pattern ph);
65 _Tt_api_callback_list_ptr cblp;
70 #endif /* _MP_PATTERN_H */