warnlib.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
  2. #ifndef __WARNLIB_H__
  3. #define __WARNLIB_H__
  4. #include <gio/gio.h>
  5. #include "gitestmacros.h"
  6. #define WARNLIB_UNPAIRED_ERROR (warnlib_unpaired_error_quark ())
  7. _GI_TEST_EXTERN
  8. GQuark warnlib_unpaired_error_quark (void);
  9. _GI_TEST_EXTERN
  10. gboolean warnlib_throw_unpaired (GError **error);
  11. /* interface */
  12. #define WARNLIB_TYPE_WHATEVER (warnlib_whatever_get_type ())
  13. #define WARNLIB_WHATEVER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), WARNLIB_TYPE_WHATEVER, WarnLibWhatever))
  14. #define WARNLIB_IS_WHATEVER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), WARNLIB_TYPE_WHATEVER))
  15. #define WARNLIB_WHATEVER_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), WARNLIB_TYPE_WHATEVER, WarnLibWhateverIface))
  16. typedef struct _WarnLibWhateverIface WarnLibWhateverIface;
  17. typedef struct _WarnLibWhatever WarnLibWhatever;
  18. struct _WarnLibWhateverIface
  19. {
  20. GTypeInterface parent_iface;
  21. /* virtual table */
  22. /* explicitly test un-named parameters */
  23. void (*do_moo) (WarnLibWhatever *self, int, gpointer);
  24. void (*do_boo) (WarnLibWhatever *self, int x, gpointer y);
  25. };
  26. _GI_TEST_EXTERN
  27. void warnlib_whatever_do_moo (WarnLibWhatever *self, int, gpointer);
  28. _GI_TEST_EXTERN
  29. void warnlib_whatever_do_boo (WarnLibWhatever *self, int, gpointer);
  30. _GI_TEST_EXTERN
  31. GType warnlib_whatever_get_type (void) G_GNUC_CONST;
  32. #endif