40 lines
837 B
C
40 lines
837 B
C
#include "gm-iuserlist.h"
|
|
|
|
GType
|
|
gm_iuserlist_get_type() {
|
|
static GType iuserlist_type = 0;
|
|
|
|
if (iuserlist_type == 0) {
|
|
static const GTypeInfo iuserlist_info = {
|
|
sizeof (GmIUserlistInterface),
|
|
NULL, /* base_init */
|
|
NULL, /* base_finalize */
|
|
NULL, /* class_init */
|
|
NULL, /* class_finalize */
|
|
NULL, /* class_data */
|
|
0,
|
|
0, /* n_preallocs */
|
|
NULL /* instance_init */
|
|
};
|
|
|
|
iuserlist_type = g_type_register_static(G_TYPE_INTERFACE,
|
|
"GmIUserlist", &iuserlist_info, 0);
|
|
}
|
|
|
|
return iuserlist_type;
|
|
}
|
|
|
|
GList *
|
|
gm_iuserlist_get_menu(GmIUserlist *self, gint id) {
|
|
GmIUserlistInterface *iface;
|
|
|
|
g_return_val_if_fail(GM_IS_IUSERLIST(self), FALSE);
|
|
|
|
iface = GM_IUSERLIST_GET_INTERFACE(self);
|
|
|
|
if (iface->get_menu) {
|
|
return (* iface->get_menu) (self, id);
|
|
} else {
|
|
return NULL;
|
|
}
|
|
}
|