2011-01-17 12:44:25 +03:00
|
|
|
#ifndef MC__EVENT_TYPES_H
|
|
|
|
#define MC__EVENT_TYPES_H
|
|
|
|
|
2011-02-15 17:41:22 +03:00
|
|
|
#include <stdarg.h>
|
|
|
|
|
2011-01-17 12:44:25 +03:00
|
|
|
/*** typedefs(not structures) and defined constants **********************************************/
|
|
|
|
|
|
|
|
/* Event groups for main modules */
|
|
|
|
#define MCEVENT_GROUP_CORE "Core"
|
2011-05-02 13:44:47 +04:00
|
|
|
#define MCEVENT_GROUP_DIALOG "Dialog"
|
2011-01-17 12:44:25 +03:00
|
|
|
#define MCEVENT_GROUP_DIFFVIEWER "DiffViewer"
|
|
|
|
#define MCEVENT_GROUP_EDITOR "Editor"
|
|
|
|
#define MCEVENT_GROUP_FILEMANAGER "FileManager"
|
|
|
|
#define MCEVENT_GROUP_VIEWER "Viewer"
|
|
|
|
|
2011-05-02 13:44:47 +04:00
|
|
|
/* Events */
|
2011-05-03 17:24:56 +04:00
|
|
|
#define MCEVENT_HISTORY_LOAD "history_load"
|
2011-05-02 13:44:47 +04:00
|
|
|
#define MCEVENT_HISTORY_SAVE "history_save"
|
|
|
|
|
2011-01-17 12:44:25 +03:00
|
|
|
/*** enums ***************************************************************************************/
|
|
|
|
|
|
|
|
/*** structures declarations (and typedefs of structures)*****************************************/
|
|
|
|
|
2011-02-15 17:41:22 +03:00
|
|
|
/* MCEVENT_GROUP_CORE:vfs_timestamp */
|
|
|
|
struct vfs_class;
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
struct vfs_class *vclass;
|
|
|
|
gpointer id;
|
|
|
|
gboolean ret;
|
|
|
|
} ev_vfs_stamp_create_t;
|
|
|
|
|
2011-02-16 14:26:59 +03:00
|
|
|
/* MCEVENT_GROUP_CORE:vfs_print_message */
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
const char *msg;
|
|
|
|
va_list ap;
|
|
|
|
} ev_vfs_print_message_t;
|
|
|
|
|
2011-02-17 12:24:53 +03:00
|
|
|
/* MCEVENT_GROUP_CORE:clipboard_text_from_file */
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
char **text;
|
|
|
|
gboolean ret;
|
|
|
|
} ev_clipboard_text_from_file_t;
|
|
|
|
|
2011-02-17 15:02:31 +03:00
|
|
|
/* MCEVENT_GROUP_CORE:help */
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
const char *filename;
|
|
|
|
const char *node;
|
|
|
|
} ev_help_t;
|
|
|
|
|
2011-02-18 15:50:30 +03:00
|
|
|
/* MCEVENT_GROUP_CORE:background_parent_call */
|
|
|
|
/* MCEVENT_GROUP_CORE:background_parent_call_string */
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
void *routine;
|
|
|
|
gpointer *ctx;
|
|
|
|
int argc;
|
|
|
|
va_list ap;
|
|
|
|
union
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
char *s;
|
|
|
|
} ret;
|
|
|
|
} ev_background_parent_call_t;
|
|
|
|
|
2011-05-03 17:24:56 +04:00
|
|
|
/* MCEVENT_GROUP_DIALOG:history_load */
|
2011-05-02 13:44:47 +04:00
|
|
|
/* MCEVENT_GROUP_DIALOG:history_save */
|
|
|
|
struct mc_config_t;
|
|
|
|
struct Widget;
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
struct mc_config_t *cfg;
|
|
|
|
struct Widget *receiver; /* NULL means broadcast message */
|
|
|
|
} ev_history_load_save_t;
|
2011-02-16 14:26:59 +03:00
|
|
|
|
2011-01-17 12:44:25 +03:00
|
|
|
/*** global variables defined in .c file *********************************************************/
|
|
|
|
|
|
|
|
/*** declarations of public functions ************************************************************/
|
|
|
|
|
|
|
|
/*** inline functions ****************************************************************************/
|
|
|
|
|
|
|
|
#endif /* MC__EVENT_TYPES_H */
|