If http-use-IE-proxy is enable, use Internet Explorer entered HTTP proxy server confi...
[vlc.git] / src / misc / action.c
blobaf731a39e621805f9b7b3fb6c0bbdfd1dccdf0f0
1 /*****************************************************************************
2 * action.c: key to action mapping
3 *****************************************************************************
4 * Copyright © 2008 Rémi Denis-Courmont
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
19 *****************************************************************************/
21 #ifdef HAVE_CONFIG_H
22 # include "config.h"
23 #endif
25 #include <vlc_common.h>
26 #include "../libvlc.h"
28 int vlc_key_to_action (vlc_object_t *libvlc, const char *varname,
29 vlc_value_t prevkey, vlc_value_t curkey, void *priv)
31 const struct hotkey *key = priv;
33 (void)varname;
34 (void)prevkey;
36 while (key->i_key != curkey.i_int)
38 if (key->psz_action == NULL)
39 return VLC_SUCCESS; /* key is not mapped to anything */
41 key++;
44 return var_SetInteger (libvlc, "key-action", key->i_action);