Commit 63744d4e authored by Maxim Ermilov's avatar Maxim Ermilov Committed by Matthew Barnes
Browse files

Bug 623017 - Add introspection support

Only covers libecal and bits of libedataserver, but it's a start!
parent 89b384cf
......@@ -61,6 +61,7 @@
/m4/intlmacosx.m4
/m4/intltool.m4
/m4/intmax.m4
/m4/introspection.m4
/m4/inttypes-pri.m4
/m4/inttypes_h.m4
/m4/lcmessage.m4
......
ACLOCAL_AMFLAGS=-I m4
DISTCHECK_CONFIGURE_FLAGS = --disable-gtk3 --enable-gtk-doc --with-krb5=/usr --without-weather
DISTCHECK_CONFIGURE_FLAGS = --disable-gtk3 --enable-gtk-doc --with-krb5=/usr --without-weather --enable-introspection
if ENABLE_CALENDAR
CALENDAR_DIR = calendar
......@@ -62,6 +62,7 @@ MAINTAINERCLEANFILES = \
$(srcdir)/m4/intlmacosx.m4 \
$(srcdir)/m4/intltool.m4 \
$(srcdir)/m4/intmax.m4 \
$(srcdir)/m4/introspection.m4 \
$(srcdir)/m4/inttypes-pri.m4 \
$(srcdir)/m4/inttypes_h.m4 \
$(srcdir)/m4/lcmessage.m4 \
......
......@@ -5,15 +5,18 @@ MARSHAL_GENERATED = e-cal-marshal.c e-cal-marshal.h
# The library
lib_LTLIBRARIES = libecal-1.2.la
libecal_1_2_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
-DG_LOG_DOMAIN=\"libecal\" \
libecal_INCLUDES = \
-I$(top_srcdir) \
-I$(top_srcdir)/calendar \
-I$(top_srcdir)/calendar/libegdbus \
-I$(top_srcdir)/calendar/libedata-cal \
-I$(top_builddir) \
-I$(top_builddir)/calendar/libecal \
-I$(top_builddir)/calendar/libecal
libecal_1_2_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(libecal_INCLUDES) \
-DG_LOG_DOMAIN=\"libecal\" \
$(LIBICAL_CFLAGS) \
$(EVOLUTION_CALENDAR_CFLAGS)
......@@ -62,6 +65,32 @@ BUILT_SOURCES = $(MARSHAL_GENERATED)
CLEANFILES = $(BUILT_SOURCES)
DISTCLEANFILES = $(pkgconfig_DATA)
-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS =
INTROSPECTION_SCANNER_ARGS = --identifier-prefix E
INTROSPECTION_COMPILER_ARGS =
if HAVE_INTROSPECTION
introspection_sources = \
$(filter-out %-private.h, $(libecalinclude_HEADERS) $(libecal_1_2_la_SOURCES))
ECalendar-1.2.gir: libecal-1.2.la
ECalendar_1_2_gir_INCLUDES = GObject-2.0 EDataServer-1.2 GLib-2.0
ECalendar_1_2_gir_CFLAGS = $(libecal_INCLUDES) $(LIBICAL_CFLAGS) $(EVOLUTION_CALENDAR_CFLAGS)
ECalendar_1_2_gir_LIBS = libecal-1.2.la $(top_builddir)/calendar/libegdbus/libegdbus-cal.la $(top_builddir)/libedataserver/libedataserver-1.2.la $(LIBICAL_LIBS)
ECalendar_1_2_gir_FILES = $(introspection_sources)
INTROSPECTION_GIRS += ECalendar-1.2.gir
girdir = $(datadir)/gir-1.0
gir_DATA = $(INTROSPECTION_GIRS)
typelibdir = $(libdir)/girepository-1.0
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
CLEANFILES += $(gir_DATA) $(typelib_DATA)
endif
EXTRA_DIST = \
e-cal-marshal.list \
$(pkgconfig_DATA:-$(API_VERSION).pc=.pc.in)
......
......@@ -1038,7 +1038,7 @@ e_cal_component_set_new_vtype (ECalComponent *comp, ECalComponentVType type)
/**
* e_cal_component_set_icalcomponent:
* @comp: A calendar component object.
* @icalcomp: An #icalcomponent.
* @icalcomp: (type long): An #icalcomponent.
*
* Sets the contents of a calendar component object from an #icalcomponent
* structure. If the @comp already had an #icalcomponent set into it, it will
......
......@@ -277,7 +277,11 @@ e_cal_view_class_init (ECalViewClass *klass)
g_object_class_install_property (object_class, PROP_CLIENT,
g_param_spec_object ("client", "The e-cal for the view", NULL, E_TYPE_CAL,
G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY));
/**
* ECalView::objects-added:
* @view:: self
* @objects: (type GLib.List) (transfer none) (element-type long):
*/
signals[OBJECTS_ADDED] =
g_signal_new ("objects_added",
G_TYPE_FROM_CLASS (klass),
......@@ -286,6 +290,11 @@ e_cal_view_class_init (ECalViewClass *klass)
NULL, NULL,
g_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE, 1, G_TYPE_POINTER);
/**
* ECalView::objects-modified:
* @view:: self
* @objects: (type GLib.List) (transfer none) (element-type long):
*/
signals[OBJECTS_MODIFIED] =
g_signal_new ("objects_modified",
G_TYPE_FROM_CLASS (klass),
......@@ -294,6 +303,11 @@ e_cal_view_class_init (ECalViewClass *klass)
NULL, NULL,
g_cclosure_marshal_VOID__POINTER,
G_TYPE_NONE, 1, G_TYPE_POINTER);
/**
* ECalView::objects-removed:
* @view:: self
* @objects: (type GLib.List) (transfer none) (element-type ECalComponentId):
*/
signals[OBJECTS_REMOVED] =
g_signal_new ("objects_removed",
G_TYPE_FROM_CLASS (klass),
......
......@@ -315,10 +315,10 @@ e_cal_source_type_enum_get_type (void)
if (g_once_init_enter (&enum_type__volatile)) {
GType enum_type;
static GEnumValue values[] = {
{ E_CAL_SOURCE_TYPE_EVENT, "Event", NULL},
{ E_CAL_SOURCE_TYPE_TODO, "ToDo", NULL},
{ E_CAL_SOURCE_TYPE_JOURNAL, "Journal", NULL},
{ E_CAL_SOURCE_TYPE_LAST, "Invalid", NULL},
{ E_CAL_SOURCE_TYPE_EVENT, "Event", "Event"},
{ E_CAL_SOURCE_TYPE_TODO, "ToDo", "ToDo"},
{ E_CAL_SOURCE_TYPE_JOURNAL, "Journal", "Journal"},
{ E_CAL_SOURCE_TYPE_LAST, "Invalid", "Invalid"},
{ -1, NULL, NULL}
};
......@@ -592,6 +592,11 @@ e_cal_class_init (ECalClass *klass)
G_TYPE_NONE, 1, G_TYPE_INT);
#endif
/**
* ECal::cal-opened-ex:
* @ecal:: self
* @error: (type glong):
*/
e_cal_signals[CAL_OPENED_EX] =
g_signal_new ("cal_opened_ex",
G_TYPE_FROM_CLASS (klass),
......@@ -2427,7 +2432,7 @@ e_cal_free_change_list (GList *list)
* e_cal_get_object_list:
* @ecal: A calendar client.
* @query: Query string.
* @objects: Return value for list of objects.
* @objects: (out) (element-type long): Return value for list of objects.
* @error: Placeholder for error information.
*
* Gets a list of objects from the calendar that match the query specified
......@@ -3933,7 +3938,7 @@ e_cal_add_timezone (ECal *ecal, icaltimezone *izone, GError **error)
* e_cal_get_query:
* @ecal: A calendar client.
* @sexp: S-expression representing the query.
* @query: Return value for the new query.
* @query: (out): Return value for the new query.
* @error: Placeholder for error information.
*
* Creates a live query object from a loaded calendar.
......
......@@ -98,7 +98,6 @@ typedef gchar * (* ECalAuthFunc) (ECal *ecal,
GType e_cal_get_type (void);
GType e_cal_open_status_enum_get_type (void);
GType e_cal_source_type_enum_get_type (void);
GType e_cal_set_mode_status_enum_get_type (void);
GType cal_mode_enum_get_type (void);
......
......@@ -18,9 +18,9 @@ dnl library names for backward compatibility.
m4_define([api_version], [1.2])
dnl Autoconf / Automake Initialization
AC_PREREQ(2.58)
AC_PREREQ(2.62)
AC_INIT([evolution-data-server],[eds_version],[http://bugzilla.gnome.org/enter_bug.cgi?product=Evolution-Data-Server])
AM_INIT_AUTOMAKE([gnu 1.10 tar-ustar -Wall -Werror foreign])
AM_INIT_AUTOMAKE([gnu 1.10 tar-ustar -Wall -Wno-portability -Werror foreign])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR(README)
AC_CONFIG_HEADERS(config.h)
......@@ -1413,6 +1413,8 @@ if test "x$GPERF" = "xno"; then
AC_MSG_ERROR([You need gperf to build evolution-data-server])
fi
GOBJECT_INTROSPECTION_CHECK([0.9.12])
dnl ******************************
dnl Makefiles
dnl ******************************
......
......@@ -121,15 +121,6 @@ Represents an entire calendar or task list, not individual items within them.2
@Returns:
<!-- ##### FUNCTION e_cal_open_status_enum_get_type ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION e_cal_source_type_enum_get_type ##### -->
<para>
......
......@@ -512,6 +512,14 @@ ECalViewListener
@listener:
<!-- ##### FUNCTION e_cal_open_status_enum_get_type ##### -->
<para>
</para>
@void:
@Returns:
<!-- ##### FUNCTION e_cal_remove_calendar ##### -->
<para>
......
......@@ -96,6 +96,32 @@ EXTRA_DIST = \
$(pkgconfig_DATA:-$(API_VERSION).pc=.pc.in) \
eds-version.h.in
CLEANFILES =
DISTCLEANFILES = eds-version.h $(pkgconfig_DATA)
-include $(INTROSPECTION_MAKEFILE)
INTROSPECTION_GIRS =
INTROSPECTION_SCANNER_ARGS = --identifier-prefix E
INTROSPECTION_COMPILER_ARGS =
if HAVE_INTROSPECTION
introspection_sources = \
$(filter-out %-private.h e-sexp.h, $(libedataserverinclude_HEADERS) $(libedataserver_1_2_la_SOURCES))
EDataServer-1.2.gir: libedataserver-1.2.la
EDataServer_1_2_gir_INCLUDES = GObject-2.0 libxml2-2.0
EDataServer_1_2_gir_CFLAGS = -I$(top_srcdir) $(E_DATA_SERVER_CFLAGS) $(SOUP_CFLAGS)
EDataServer_1_2_gir_LIBS = libedataserver-1.2.la
EDataServer_1_2_gir_FILES = $(introspection_sources)
INTROSPECTION_GIRS += EDataServer-1.2.gir
girdir = $(datadir)/gir-1.0
gir_DATA = $(INTROSPECTION_GIRS)
typelibdir = $(libdir)/girepository-1.0
typelib_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
CLEANFILES += $(gir_DATA) $(typelib_DATA)
endif
-include $(top_srcdir)/git.mk
......@@ -645,6 +645,11 @@ e_source_group_get_readonly (ESourceGroup *group)
return group->priv->readonly;
}
/**
* e_source_group_peek_sources:
*
* Return value: (transfer none) (element-type ESource):
*/
GSList *
e_source_group_peek_sources (ESourceGroup *group)
{
......
......@@ -393,6 +393,11 @@ e_source_list_new_for_gconf_default (const gchar *path)
return list;
}
/**
* e_source_list_peek_groups:
*
* Return value: (transfer none) (element-type ESourceGroup):
*/
GSList *
e_source_list_peek_groups (ESourceList *list)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment