1 /*
2  * Copyright 1993 Network Computing Devices, Inc.
3  *
4  * Permission to use, copy, modify, distribute, and sell this software and
5  * its documentation for any purpose is hereby granted without fee, provided
6  * that the above copyright notice appear in all copies and that both that
7  * copyright notice and this permission notice appear in supporting
8  * documentation, and that the name Network Computing Devices, Inc. not be
9  * used in advertising or publicity pertaining to distribution of this
10  * software without specific, written prior permission.
11  *
12  * THIS SOFTWARE IS PROVIDED 'AS-IS'.  NETWORK COMPUTING DEVICES, INC.,
13  * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT
14  * LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
15  * PARTICULAR PURPOSE, OR NONINFRINGEMENT.  IN NO EVENT SHALL NETWORK
16  * COMPUTING DEVICES, INC., BE LIABLE FOR ANY DAMAGES WHATSOEVER, INCLUDING
17  * SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOSS OF USE, DATA,
18  * OR PROFITS, EVEN IF ADVISED OF THE POSSIBILITY THEREOF, AND REGARDLESS OF
19  * WHETHER IN AN ACTION IN CONTRACT, TORT OR NEGLIGENCE, ARISING OUT OF OR IN
20  * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21  *
22  * $NCDId: @(#)Xtutil.h,v 1.5 1994/09/19 22:40:13 greg Exp $
23  *
24  * 			      <audio/xtutil.h>
25  *
26  * This file contains declarations for utilities that may be used with Xt.
27  */
28 
29 #ifndef _AUDIO_XTUTIL_H_
30 #define _AUDIO_XTUTIL_H_
31 
32 /*
33  * This file must be included after:
34  *
35  * #include <X11/Intrinsic.h>
36  * #include <audio/audiolib.h>
37  */
38 
39 #include <setjmp.h>
40 
41 /*
42  * AuXtErrorJump - Point to which an error handler can return to have
43  * the audio handling code exit cleanly to the Xt event loop.
44  */
45 
46 extern jmp_buf AuXtErrorJump;
47 
48 _AUFUNCPROTOBEGIN
49 
50 /*
51  * AuXtHandleAudioEvents - this routine extracts the AuServer from the
52  * Xt callback data and then calls AuHandleEvents.
53  */
54 extern void AuXtHandleAudioEvents (
55 	XtPointer,	/* caller_arg */
56 	int *,		/* ptr_to_source */
57 	XtInputId *	/* opaque_inputid */
58 );
59 
60 
61 /*
62  * AuXtAppAddAudioHandler - this routine adds AuXtHandleAudioEvents as an
63  * Xt input handler to deal with audio events.  This allows the audio service
64  * to be used from Xt programs without disturbing their main loop.
65  */
66 extern XtInputId AuXtAppAddAudioHandler (
67 	XtAppContext,	/* app_context */
68         AuServer *	/* server */
69 );
70 
71 extern void
72 AuXtAppRemoveAudioHandler(
73        AuServer *,		/* server */
74        XtInputId
75 );
76 
77 _AUFUNCPROTOEND
78 
79 #endif /* _AUDIO_XTUTIL_H_ */
80