Branch data Line data Source code
1 : : /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ 2 : : 3 : : /* This file gets installed, so we can't assume config.h is available */ 4 : : #ifdef HAVE_CONFIG_H 5 : : #include "config.h" 6 : : #endif 7 : : 8 : : #include "warnlib.h" 9 : : 10 : : GQuark 11 : 2 : warnlib_unpaired_error_quark (void) 12 : : { 13 : 2 : return g_quark_from_static_string ("warnlib-unpaired-error"); 14 : : } 15 : : 16 : : gboolean 17 : 1 : warnlib_throw_unpaired (GError **error) 18 : : { 19 : 1 : g_set_error_literal (error, warnlib_unpaired_error_quark (), 0, 20 : : "Unpaired error"); 21 : 1 : return FALSE; 22 : : } 23 : : 24 : : typedef WarnLibWhateverIface WarnLibWhateverInterface; 25 [ + + + - : 10 : G_DEFINE_INTERFACE (WarnLibWhatever, warnlib_whatever, G_TYPE_OBJECT) + + ] 26 : : 27 : : static void 28 : 2 : warnlib_whatever_default_init(WarnLibWhateverIface *iface G_GNUC_UNUSED) 29 : : { 30 : 2 : } 31 : : 32 : : void 33 : 1 : warnlib_whatever_do_moo (WarnLibWhatever *self, int x, gpointer y) 34 : : { 35 : 1 : WARNLIB_WHATEVER_GET_IFACE(self)->do_moo (self, x, y); 36 : 1 : } 37 : : 38 : : /** 39 : : * warnlib_whatever_do_boo: 40 : : * @self: a WarnLibWhatever 41 : : * @x: x parameter 42 : : * @y: y parameter 43 : : * 44 : : * Does boo. 45 : : */ 46 : : void 47 : 1 : warnlib_whatever_do_boo (WarnLibWhatever *self, int x, gpointer y) 48 : : { 49 : 1 : WARNLIB_WHATEVER_GET_IFACE(self)->do_boo (self, x, y); 50 : 1 : }