Added button image data transmission from
[irreco.git] / irreco / src / core / irreco_hardkey_map.h
blob9f5bf47060512e4c6b5e28dfdac86b9f06e1a406
1 /*
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.
20 /**
21 * @addtogroup IrrecoHardkeyMap
22 * @{
25 /**
26 * @file
27 * Header file of @ref IrrecoHardkeyMap.
30 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
31 /* Typedef */
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>
44 enum {
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 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
66 /* Include */
67 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
68 #ifndef __IRRECO_HARDKEY_H__
69 #define __IRRECO_HARDKEY_H__
70 #include "irreco.h"
71 #include "irreco_cmd_chain_manager.h"
75 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
76 /* Datatypes */
77 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
79 struct _IrrecoHardkeyMap {
80 IrrecoCmdChainManager *manager;
81 GHashTable *table;
84 typedef void (*IrrecoHardkeyMapFunc) (IrrecoHardkeyMap *hardkey_map,
85 guint keyval,
86 IrrecoCmdChainId chain_id,
87 IrrecoCmdChain *chain,
88 gpointer user_data);
92 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
93 /* Macro */
94 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
98 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-*/
99 /* Prototypes */
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,
106 guint keyval);
107 gboolean irreco_hardkey_map_assosiate_chain_with_id(
108 IrrecoHardkeyMap *self,
109 guint keyval,
110 IrrecoCmdChainId id);
111 IrrecoCmdChain* irreco_hardkey_map_get_cmd_chain(
112 IrrecoHardkeyMap *self,
113 guint keyval);
114 gboolean irreco_hardkey_map_find_cmd_chain_id(
115 IrrecoHardkeyMap *self,
116 IrrecoCmdChainId id,
117 guint *keyval);
118 gboolean irreco_hardkey_map_cmd_chain_exists(
119 IrrecoHardkeyMap *self,
120 guint keyval);
121 void irreco_hardkey_map_chain_foreach(
122 IrrecoHardkeyMap *self,
123 IrrecoHardkeyMapFunc func,
124 gpointer user_data);
129 #endif /* __IRRECO_HARDKEY_H__ */
131 /** @} */