1 /** \file   mousedrv.h
2  * \brief   Mouse handling for Headless UI - header
3  *
4  * \author  Marco van den Heuvel <blackystardust68@yahoo.com>
5  */
6 
7 /* This file is part of VICE, the Versatile Commodore Emulator.
8  * See README for copyright notice.
9  *
10  *  This program is free software; you can redistribute it and/or modify
11  *  it under the terms of the GNU General Public License as published by
12  *  the Free Software Foundation; either version 2 of the License, or
13  *  (at your option) any later version.
14  *
15  *  This program is distributed in the hope that it will be useful,
16  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  *  GNU General Public License for more details.
19  *
20  *  You should have received a copy of the GNU General Public License
21  *  along with this program; if not, write to the Free Software
22  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23  *
24  */
25 
26 #ifndef VICE_MOUSEDRV_H
27 #define VICE_MOUSEDRV_H
28 
29 #include "types.h"
30 
31 #include "mouse.h"
32 
33 /** \brief Register callbacks for mouse button presses.
34  *  \param funcs The callbacks to register.
35  *  \return Zero on success, nonzero on failure. */
36 int mousedrv_resources_init(mouse_func_t *funcs);
37 
38 /** \brief Register and parse mouse-related command-line options.
39  *  \return Zero on success, nonzero on failure. */
40 int mousedrv_cmdline_options_init(void);
41 
42 /** \brief Initialize the mouse-handling subsystem. */
43 void mousedrv_init(void);
44 
45 /** \brief Called by the emulation core to announce the mouse has been
46  *         enabled or disabled. */
47 void mousedrv_mouse_changed(void);
48 
49 /** \brief Called by the UI event handler to announce the user has
50  *         pressed or released a button.
51  *  \param bnumber Which button was pressed or released.
52  *  \param state   Nonzero if button was pressed, zero if it was released.
53  */
54 void mouse_button(int bnumber, int state);
55 
56 #endif
57