2 * irreco - Ir Remote Control
3 * Copyright (C) 2007 Arto Karppinen (arto.karppinen@iki.fi)
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 * @addtogroup IrrecoHardkeyMap
27 * Header file of @ref IrrecoHardkeyMap.
30 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
32 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
34 * Make sure that typedefs are available before we include anything elese.
36 * This makes sure that whatever other structures that depend on structures
37 * defined in this file will compile OK recardles of header inclusion order.
39 #ifndef __IRRECO_HARDKEY_H_TYPEDEF__
40 #define __IRRECO_HARDKEY_H_TYPEDEF__
42 #include <gdk/gdkkeysyms.h>
45 IRRECO_HARDKEY_UP
= GDK_Up
,
46 IRRECO_HARDKEY_DOWN
= GDK_Down
,
47 IRRECO_HARDKEY_LEFT
= GDK_Left
,
48 IRRECO_HARDKEY_RIGHT
= GDK_Right
,
49 IRRECO_HARDKEY_SELECT
= GDK_Return
,
50 IRRECO_HARDKEY_BACK
= GDK_Escape
,
51 IRRECO_HARDKEY_MENU
= GDK_F4
,
52 IRRECO_HARDKEY_HOME
= GDK_F5
,
53 IRRECO_HARDKEY_FULLSCREEN
= GDK_F6
,
54 IRRECO_HARDKEY_PLUS
= GDK_F7
,
55 IRRECO_HARDKEY_MINUS
= GDK_F8
58 typedef struct _IrrecoHardkeyMap IrrecoHardkeyMap
;
61 #endif /* __IRRECO_HARDKEY_H_TYPEDEF__ */
65 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
67 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
68 #ifndef __IRRECO_HARDKEY_H__
69 #define __IRRECO_HARDKEY_H__
71 #include "irreco_cmd_chain_manager.h"
75 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
77 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
79 struct _IrrecoHardkeyMap
{
80 IrrecoCmdChainManager
*manager
;
84 typedef void (*IrrecoHardkeyMapFunc
) (IrrecoHardkeyMap
*hardkey_map
,
86 IrrecoCmdChainId chain_id
,
87 IrrecoCmdChain
*chain
,
92 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
94 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
98 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
100 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
101 gchar
* irreco_hardkey_to_str( guint keyval
);
102 IrrecoHardkeyMap
* irreco_hardkey_map_new( IrrecoCmdChainManager
*manager
);
103 void irreco_hardkey_map_free( IrrecoHardkeyMap
*self
);
104 void irreco_hardkey_map_assosiate_chain(
105 IrrecoHardkeyMap
*self
,
107 gboolean
irreco_hardkey_map_assosiate_chain_with_id(
108 IrrecoHardkeyMap
*self
,
110 IrrecoCmdChainId id
);
111 IrrecoCmdChain
* irreco_hardkey_map_get_cmd_chain(
112 IrrecoHardkeyMap
*self
,
114 gboolean
irreco_hardkey_map_find_cmd_chain_id(
115 IrrecoHardkeyMap
*self
,
118 gboolean
irreco_hardkey_map_cmd_chain_exists(
119 IrrecoHardkeyMap
*self
,
121 void irreco_hardkey_map_chain_foreach(
122 IrrecoHardkeyMap
*self
,
123 IrrecoHardkeyMapFunc func
,
129 #endif /* __IRRECO_HARDKEY_H__ */