Add 2008 to the copyright notice.
[Rockbox.git] / apps / keymaps / keymap-newtarget.c
blob69da4efc447cd97bbba151f2dc19c0e7182ee41b
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
9 * Copyright (C) 200
11 * All files in this archive are subject to the GNU General Public License.
12 * See the file COPYING in the source tree root for full license agreement.
14 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
15 * KIND, either express or implied.
17 ****************************************************************************/
19 /* Button Code Definitions for <new> target */
21 #include "config.h"
22 #include "action.h"
23 #include "button.h"
25 #define LAST_ITEM_IN_LIST { ACTION_NONE,BUTTON_NONE,BUTTON_NONE }
26 /* {Action Code, Button code, Prereq button code } */
28 /**
29 This file is where all button mappings are defined.
30 In ../action.h there is an enum with all the used ACTION_ codes.
31 Ideally All the ACTION_STD_* and ACTION_WPS_* codes should be defined somehwere in this file.
33 Remeber to make a copy of this file and rename it to keymap-<targetname>.c and add it to apps/SOURCES
35 Good luck and thanks for porting a new target! :D
37 **/
39 /*
40 * The format of the list is as follows
41 * { Action Code, Button code, Prereq button code }
42 * if there's no need to check the previous button's value, use BUTTON_NONE
43 * Insert LAST_ITEM_IN_LIST at the end of each mapping
45 static const struct button_mapping button_context_standard[] = {
47 LAST_ITEM_IN_LIST
48 }; /* button_context_standard */
50 static const struct button_mapping button_context_wps[] = {
52 LAST_ITEM_IN_LIST
53 }; /* button_context_wps */
57 /* get_context_mapping returns a pointer to one of the above defined arrays depending on the context */
58 const struct button_mapping* get_context_mapping(int context)
60 switch (context)
62 case CONTEXT_STD:
63 return button_context_standard;
64 case CONTEXT_WPS:
65 return button_context_wps;
67 case CONTEXT_TREE:
68 case CONTEXT_LIST:
69 case CONTEXT_MAINMENU:
71 case CONTEXT_SETTINGS:
72 case CONTEXT_SETTINGS|CONTEXT_REMOTE:
73 default:
74 return button_context_standard;
76 return button_context_standard;