Ticket #2566: .mts file is handled as videofile.
[midnight-commander.git] / src / events_init.c
blob23fd026c47431d5078a642e74842539914dc8e50
1 /* Event callbacks initialization
3 Copyright (C) 2011 Free Software Foundation, Inc.
5 Written by:
6 Slava Zanko <slavazanko@gmail.com>, 2011.
8 This file is part of the Midnight Commander.
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.
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.
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
24 #include <config.h>
26 #include "lib/global.h"
28 #include "lib/event.h"
30 #ifdef WITH_BACKGROUND
31 #include "background.h" /* (background_parent_call), background_parent_call_string() */
32 #endif /* WITH_BACKGROUND */
33 #include "clipboard.h" /* clipboard events */
34 #include "execute.h" /* execute_suspend() */
35 #include "help.h" /* help_interactive_display() */
37 #include "events_init.h"
39 /*** global variables ****************************************************************************/
41 /*** file scope macro definitions ****************************************************************/
43 /*** file scope type declarations ****************************************************************/
45 /*** file scope variables ************************************************************************/
48 /*** file scope functions ************************************************************************/
49 /* --------------------------------------------------------------------------------------------- */
51 /* --------------------------------------------------------------------------------------------- */
52 /*** public functions ****************************************************************************/
53 /* --------------------------------------------------------------------------------------------- */
55 gboolean
56 events_init (GError ** error)
58 /* *INDENT-OFF* */
59 event_init_t standard_events[] =
61 {MCEVENT_GROUP_CORE, "clipboard_file_to_ext_clip", clipboard_file_to_ext_clip, NULL},
62 {MCEVENT_GROUP_CORE, "clipboard_file_from_ext_clip", clipboard_file_from_ext_clip, NULL},
63 {MCEVENT_GROUP_CORE, "clipboard_text_to_file", clipboard_text_to_file, NULL},
64 {MCEVENT_GROUP_CORE, "clipboard_text_from_file", clipboard_text_from_file, NULL},
66 {MCEVENT_GROUP_CORE, "help", help_interactive_display, NULL},
67 {MCEVENT_GROUP_CORE, "suspend", execute_suspend, NULL},
69 #ifdef WITH_BACKGROUND
70 {MCEVENT_GROUP_CORE, "background_parent_call", background_parent_call, NULL},
71 {MCEVENT_GROUP_CORE, "background_parent_call_string", background_parent_call_string, NULL},
72 #endif /* WITH_BACKGROUND */
74 {NULL, NULL, NULL, NULL}
76 /* *INDENT-ON* */
78 if (!mc_event_init (error))
79 return FALSE;
81 return mc_event_mass_add (standard_events, error);
84 /* --------------------------------------------------------------------------------------------- */