2 Event callbacks initialization
4 Copyright (C) 2011-2024
5 Free Software Foundation, Inc.
8 Slava Zanko <slavazanko@gmail.com>, 2011.
10 This file is part of the Midnight Commander.
12 The Midnight Commander is free software: you can redistribute it
13 and/or modify it under the terms of the GNU General Public License as
14 published by the Free Software Foundation, either version 3 of the License,
15 or (at your option) any later version.
17 The Midnight Commander is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with this program. If not, see <http://www.gnu.org/licenses/>.
28 #include "lib/global.h"
30 #include "lib/event.h"
32 #ifdef ENABLE_BACKGROUND
33 #include "background.h" /* (background_parent_call), background_parent_call_string() */
34 #endif /* ENABLE_BACKGROUND */
35 #include "clipboard.h" /* clipboard events */
36 #include "execute.h" /* execute_suspend() */
37 #include "help.h" /* help_interactive_display() */
39 #include "events_init.h"
41 /*** global variables ****************************************************************************/
43 /*** file scope macro definitions ****************************************************************/
45 /*** file scope type declarations ****************************************************************/
47 /*** file scope variables ************************************************************************/
50 /*** file scope functions ************************************************************************/
51 /* --------------------------------------------------------------------------------------------- */
53 /* --------------------------------------------------------------------------------------------- */
54 /*** public functions ****************************************************************************/
55 /* --------------------------------------------------------------------------------------------- */
58 events_init (GError
**mcerror
)
61 static const event_init_t standard_events
[] =
63 {MCEVENT_GROUP_CORE
, "clipboard_file_to_ext_clip", clipboard_file_to_ext_clip
, NULL
},
64 {MCEVENT_GROUP_CORE
, "clipboard_file_from_ext_clip", clipboard_file_from_ext_clip
, NULL
},
65 {MCEVENT_GROUP_CORE
, "clipboard_text_to_file", clipboard_text_to_file
, NULL
},
66 {MCEVENT_GROUP_CORE
, "clipboard_text_from_file", clipboard_text_from_file
, NULL
},
68 {MCEVENT_GROUP_CORE
, "help", help_interactive_display
, NULL
},
69 {MCEVENT_GROUP_CORE
, "suspend", execute_suspend
, NULL
},
71 #ifdef ENABLE_BACKGROUND
72 {MCEVENT_GROUP_CORE
, "background_parent_call", background_parent_call
, NULL
},
73 {MCEVENT_GROUP_CORE
, "background_parent_call_string", background_parent_call_string
, NULL
},
74 #endif /* ENABLE_BACKGROUND */
76 {NULL
, NULL
, NULL
, NULL
}
80 if (!mc_event_init (mcerror
))
83 return mc_event_mass_add (standard_events
, mcerror
);
86 /* --------------------------------------------------------------------------------------------- */