xref: /netbsd-src/sys/arch/landisk/dev/buttonvar.h (revision 028ff6cfc9a7845a33e87227184198a43ad1f19e)
1*028ff6cfSrin /*	$NetBSD: buttonvar.h,v 1.2 2021/07/15 05:07:50 rin Exp $	*/
21fd097bfSuwe 
31fd097bfSuwe /*-
41fd097bfSuwe  * Copyright (c) 2000 Zembu Labs, Inc.
51fd097bfSuwe  * All rights reserved.
61fd097bfSuwe  *
71fd097bfSuwe  * Author: Jason R. Thorpe <thorpej@zembu.com>
81fd097bfSuwe  *
91fd097bfSuwe  * Redistribution and use in source and binary forms, with or without
101fd097bfSuwe  * modification, are permitted provided that the following conditions
111fd097bfSuwe  * are met:
121fd097bfSuwe  * 1. Redistributions of source code must retain the above copyright
131fd097bfSuwe  *    notice, this list of conditions and the following disclaimer.
141fd097bfSuwe  * 2. Redistributions in binary form must reproduce the above copyright
151fd097bfSuwe  *    notice, this list of conditions and the following disclaimer in the
161fd097bfSuwe  *    documentation and/or other materials provided with the distribution.
171fd097bfSuwe  * 3. All advertising materials mentioning features or use of this software
181fd097bfSuwe  *    must display the following acknowledgement:
191fd097bfSuwe  *	This product includes software developed by Zembu Labs, Inc.
201fd097bfSuwe  * 4. Neither the name of Zembu Labs nor the names of its employees may
211fd097bfSuwe  *    be used to endorse or promote products derived from this software
221fd097bfSuwe  *    without specific prior written permission.
231fd097bfSuwe  *
241fd097bfSuwe  * THIS SOFTWARE IS PROVIDED BY ZEMBU LABS, INC. ``AS IS'' AND ANY EXPRESS
251fd097bfSuwe  * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WAR-
261fd097bfSuwe  * RANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DIS-
271fd097bfSuwe  * CLAIMED.  IN NO EVENT SHALL ZEMBU LABS BE LIABLE FOR ANY DIRECT, INDIRECT,
281fd097bfSuwe  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
291fd097bfSuwe  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
301fd097bfSuwe  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
311fd097bfSuwe  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
321fd097bfSuwe  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
331fd097bfSuwe  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
341fd097bfSuwe  */
351fd097bfSuwe 
361fd097bfSuwe #ifndef _MACHINE_BUTTONVAR_H_
371fd097bfSuwe #define	_MACHINE_BUTTONVAR_H_
381fd097bfSuwe 
391fd097bfSuwe #include <sys/queue.h>
401fd097bfSuwe 
411fd097bfSuwe struct btn_event {
421fd097bfSuwe 	const char *bev_name;		/* button name */
431fd097bfSuwe 	int bev_type;			/* button type */
441fd097bfSuwe 
451fd097bfSuwe 	LIST_ENTRY(btn_event) bev_list;
461fd097bfSuwe };
471fd097bfSuwe 
48*028ff6cfSrin int	btn_init(void);
49*028ff6cfSrin 
501fd097bfSuwe void	btn_settype(const char *type);
511fd097bfSuwe 
521fd097bfSuwe int	btn_event_register(struct btn_event *bev);
531fd097bfSuwe void	btn_event_unregister(struct btn_event *bev);
541fd097bfSuwe 
551fd097bfSuwe void	btn_event_send(struct btn_event *, int);
561fd097bfSuwe 
571fd097bfSuwe #endif /* _MACHINE_BUTTONVAR_H_ */
58