event.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef MC__EVENT_H
  2. #define MC__EVENT_H
  3. #include "event-types.h"
  4. /*** typedefs(not structures) and defined constants **********************************************/
  5. typedef gboolean (*mc_event_callback_func_t) (const gchar *, const gchar *, gpointer, gpointer);
  6. /*** enums ***************************************************************************************/
  7. /*** structures declarations (and typedefs of structures)*****************************************/
  8. typedef struct
  9. {
  10. const char *event_group_name;
  11. const char *event_name;
  12. mc_event_callback_func_t cb;
  13. gpointer init_data;
  14. } event_init_t;
  15. /*** global variables defined in .c file *********************************************************/
  16. /*** declarations of public functions ************************************************************/
  17. /* event.c: */
  18. gboolean mc_event_init (GError **);
  19. gboolean mc_event_deinit (GError **);
  20. /* manage.c: */
  21. gboolean mc_event_add (const gchar *, const gchar *, mc_event_callback_func_t, gpointer, GError **);
  22. void mc_event_del (const gchar *, const gchar *, mc_event_callback_func_t, gpointer);
  23. void mc_event_destroy (const gchar *, const gchar *);
  24. void mc_event_group_del (const gchar *);
  25. gboolean mc_event_present (const gchar *, const gchar *);
  26. gboolean mc_event_mass_add (event_init_t *, GError **);
  27. /* raise.c: */
  28. gboolean mc_event_raise (const gchar *, const gchar *, gpointer);
  29. /*** inline functions ****************************************************************************/
  30. #endif /* MC__EVENT_H */