2 * Copyright (C) 2010 Robert Ancell.
3 * Author: Robert Ancell <robert.ancell@canonical.com>
5 * This library is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU Lesser General Public License as published by the Free
7 * Software Foundation; either version 2 or version 3 of the License.
8 * See http://www.gnu.org/copyleft/lgpl.html the full text of the license.
11 #ifndef LIGHTDM_LANGUAGE_H_
12 #define LIGHTDM_LANGUAGE_H_
14 #include <glib-object.h>
18 #define LIGHTDM_TYPE_LANGUAGE (lightdm_language_get_type())
19 #define LIGHTDM_LANGUAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIGHTDM_TYPE_LANGUAGE, LightDMLanguage));
20 #define LIGHTDM_LANGUAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), LIGHTDM_TYPE_LANGUAGE, LightDMLanguageClass))
21 #define LIGHTDM_IS_LANGUAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIGHTDM_TYPE_LANGUAGE))
22 #define LIGHTDM_IS_LANGUAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LIGHTDM_TYPE_LANGUAGE))
23 #define LIGHTDM_LANGUAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), LIGHTDM_TYPE_LANGUAGE, LightDMLanguageClass))
27 GObject parent_instance;
32 GObjectClass parent_class;
35 void (*reserved1) (void);
36 void (*reserved2) (void);
37 void (*reserved3) (void);
38 void (*reserved4) (void);
39 void (*reserved5) (void);
40 void (*reserved6) (void);
41 } LightDMLanguageClass;
43 #ifdef GLIB_VERSION_2_44
44 typedef LightDMLanguage *LightDMLanguage_autoptr;
45 static inline void glib_autoptr_cleanup_LightDMLanguage (LightDMLanguage **_ptr)
47 glib_autoptr_cleanup_GObject ((GObject **) _ptr);
51 GType lightdm_language_get_type (void);
53 GList *lightdm_get_languages (void);
55 LightDMLanguage *lightdm_get_language (void);
57 const gchar *lightdm_language_get_code (LightDMLanguage *language);
59 const gchar *lightdm_language_get_name (LightDMLanguage *language);
61 const gchar *lightdm_language_get_territory (LightDMLanguage *language);
63 gboolean lightdm_language_matches (LightDMLanguage *language, const gchar *code);
67 #endif /* LIGHTDM_LANGUAGE_H_ */