event-types.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. #ifndef MC__EVENT_TYPES_H
  2. #define MC__EVENT_TYPES_H
  3. #include <stdarg.h>
  4. /*** typedefs(not structures) and defined constants **********************************************/
  5. /* Event groups for main modules */
  6. #define MCEVENT_GROUP_CORE "Core"
  7. #define MCEVENT_GROUP_DIALOG "Dialog"
  8. #define MCEVENT_GROUP_DIFFVIEWER "DiffViewer"
  9. #define MCEVENT_GROUP_EDITOR "Editor"
  10. #define MCEVENT_GROUP_FILEMANAGER "FileManager"
  11. #define MCEVENT_GROUP_VIEWER "Viewer"
  12. /* Events */
  13. #define MCEVENT_HISTORY_LOAD "history_load"
  14. #define MCEVENT_HISTORY_SAVE "history_save"
  15. /*** enums ***************************************************************************************/
  16. /*** structures declarations (and typedefs of structures)*****************************************/
  17. /* MCEVENT_GROUP_CORE:vfs_timestamp */
  18. struct vfs_class;
  19. typedef struct
  20. {
  21. struct vfs_class *vclass;
  22. gpointer id;
  23. gboolean ret;
  24. } ev_vfs_stamp_create_t;
  25. /* MCEVENT_GROUP_CORE:vfs_print_message */
  26. typedef struct
  27. {
  28. char *msg;
  29. } ev_vfs_print_message_t;
  30. /* MCEVENT_GROUP_CORE:clipboard_text_from_file */
  31. typedef struct
  32. {
  33. char **text;
  34. gboolean ret;
  35. } ev_clipboard_text_from_file_t;
  36. /* MCEVENT_GROUP_CORE:help */
  37. typedef struct
  38. {
  39. const char *filename;
  40. const char *node;
  41. } ev_help_t;
  42. /* MCEVENT_GROUP_CORE:background_parent_call */
  43. /* MCEVENT_GROUP_CORE:background_parent_call_string */
  44. typedef struct
  45. {
  46. void *routine;
  47. gpointer *ctx;
  48. int argc;
  49. va_list ap;
  50. union
  51. {
  52. int i;
  53. char *s;
  54. } ret;
  55. } ev_background_parent_call_t;
  56. /* MCEVENT_GROUP_DIALOG:history_load */
  57. /* MCEVENT_GROUP_DIALOG:history_save */
  58. struct mc_config_t;
  59. struct Widget;
  60. typedef struct
  61. {
  62. struct mc_config_t *cfg;
  63. struct Widget *receiver; /* NULL means broadcast message */
  64. } ev_history_load_save_t;
  65. /*** global variables defined in .c file *********************************************************/
  66. /*** declarations of public functions ************************************************************/
  67. /*** inline functions ****************************************************************************/
  68. #endif /* MC__EVENT_TYPES_H */