Skip to content
Snippets Groups Projects
Commit 5915569b authored by Ruben Rodriguez's avatar Ruben Rodriguez
Browse files

Added gobject-introspection gtk+3.0 pygobject dbus-python

parent d23429e7
No related tags found
No related merge requests found
From 52c3b6b86129907dfb72a3dc394117470791845b Mon Sep 17 00:00:00 2001
From: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Date: Sun, 30 Oct 2011 16:31:23 +0100
Subject: [PATCH] Make g_callable_info_invoke public
So it can be used for invoking callbacks
https://bugzilla.gnome.org/show_bug.cgi?id=663052
---
girepository/gicallableinfo.c | 20 ++++++++++----------
girepository/gicallableinfo.h | 10 ++++++++++
girepository/gifunctioninfo.c | 20 ++++++++++----------
girepository/girepository-private.h | 11 -----------
girepository/givfuncinfo.c | 20 ++++++++++----------
5 files changed, 40 insertions(+), 41 deletions(-)
diff --git a/girepository/gicallableinfo.c b/girepository/gicallableinfo.c
index 475346e..ba5f6c6 100644
--- a/girepository/gicallableinfo.c
+++ b/girepository/gicallableinfo.c
@@ -360,16 +360,16 @@ g_callable_info_iterate_return_attributes (GICallableInfo *info,
}
gboolean
-_g_callable_info_invoke (GIFunctionInfo *info,
- gpointer function,
- const GIArgument *in_args,
- int n_in_args,
- const GIArgument *out_args,
- int n_out_args,
- GIArgument *return_value,
- gboolean is_method,
- gboolean throws,
- GError **error)
+g_callable_info_invoke (GIFunctionInfo *info,
+ gpointer function,
+ const GIArgument *in_args,
+ int n_in_args,
+ const GIArgument *out_args,
+ int n_out_args,
+ GIArgument *return_value,
+ gboolean is_method,
+ gboolean throws,
+ GError **error)
{
ffi_cif cif;
ffi_type *rtype;
diff --git a/girepository/gicallableinfo.h b/girepository/gicallableinfo.h
index a1d22c7..bdaa96d 100644
--- a/girepository/gicallableinfo.h
+++ b/girepository/gicallableinfo.h
@@ -54,6 +54,16 @@ GIArgInfo * g_callable_info_get_arg (GICallableInfo *info,
void g_callable_info_load_arg (GICallableInfo *info,
gint n,
GIArgInfo *arg);
+gboolean g_callable_info_invoke (GICallableInfo *info,
+ gpointer function,
+ const GIArgument *in_args,
+ int n_in_args,
+ const GIArgument *out_args,
+ int n_out_args,
+ GIArgument *return_value,
+ gboolean is_method,
+ gboolean throws,
+ GError **error);
G_END_DECLS
diff --git a/girepository/gifunctioninfo.c b/girepository/gifunctioninfo.c
index 2544cc3..2cf6ddb 100644
--- a/girepository/gifunctioninfo.c
+++ b/girepository/gifunctioninfo.c
@@ -270,14 +270,14 @@ g_function_info_invoke (GIFunctionInfo *info,
&& (g_function_info_get_flags (info) & GI_FUNCTION_IS_CONSTRUCTOR) == 0;
throws = g_function_info_get_flags (info) & GI_FUNCTION_THROWS;
- return _g_callable_info_invoke ((GICallableInfo*) info,
- func,
- in_args,
- n_in_args,
- out_args,
- n_out_args,
- return_value,
- is_method,
- throws,
- error);
+ return g_callable_info_invoke ((GICallableInfo*) info,
+ func,
+ in_args,
+ n_in_args,
+ out_args,
+ n_out_args,
+ return_value,
+ is_method,
+ throws,
+ error);
}
diff --git a/girepository/girepository-private.h b/girepository/girepository-private.h
index 52d65b2..897c52c 100644
--- a/girepository/girepository-private.h
+++ b/girepository/girepository-private.h
@@ -108,17 +108,6 @@ GIVFuncInfo * _g_base_info_find_vfunc (GIRealInfo *rinfo,
gint n_vfuncs,
const gchar *name);
-gboolean _g_callable_info_invoke (GICallableInfo *info,
- gpointer function,
- const GIArgument *in_args,
- int n_in_args,
- const GIArgument *out_args,
- int n_out_args,
- GIArgument *return_value,
- gboolean is_method,
- gboolean throws,
- GError **error);
-
extern ffi_status ffi_prep_closure_loc (ffi_closure *,
ffi_cif *,
void (*fun)(ffi_cif *, void *, void **, void *),
diff --git a/girepository/givfuncinfo.c b/girepository/givfuncinfo.c
index 332655a..859f5d5 100644
--- a/girepository/givfuncinfo.c
+++ b/girepository/givfuncinfo.c
@@ -304,14 +304,14 @@ g_vfunc_info_invoke (GIVFuncInfo *info,
if (*error != NULL)
return FALSE;
- return _g_callable_info_invoke ((GICallableInfo*) info,
- func,
- in_args,
- n_in_args,
- out_args,
- n_out_args,
- return_value,
- TRUE,
- FALSE,
- error);
+ return g_callable_info_invoke ((GICallableInfo*) info,
+ func,
+ in_args,
+ n_in_args,
+ out_args,
+ n_out_args,
+ return_value,
+ TRUE,
+ FALSE,
+ error);
}
--
1.7.6.4
\ No newline at end of file
libgirepository-1.0.so.1 libgirepository-1.0-1 #MINVER#
g_arg_info_get_closure@Base 0.9.2
g_arg_info_get_destroy@Base 0.9.2
g_arg_info_get_direction@Base 0.9.2
g_arg_info_get_ownership_transfer@Base 0.9.2
g_arg_info_get_scope@Base 0.9.2
g_arg_info_get_type@Base 0.9.2
g_arg_info_is_caller_allocates@Base 0.9.2
g_arg_info_is_optional@Base 0.9.2
g_arg_info_is_return_value@Base 0.9.2
g_arg_info_is_skip@Base 1.29.0
g_arg_info_load_type@Base 0.9.2
g_arg_info_may_be_null@Base 0.9.2
g_base_info_equal@Base 0.9.2
g_base_info_get_attribute@Base 0.9.2
g_base_info_get_container@Base 0.9.2
g_base_info_get_name@Base 0.9.2
g_base_info_get_namespace@Base 0.9.2
g_base_info_get_type@Base 0.9.2
g_base_info_get_typelib@Base 0.9.2
g_base_info_gtype_get_type@Base 0.9.6
g_base_info_is_deprecated@Base 0.9.2
g_base_info_iterate_attributes@Base 0.9.2
g_base_info_ref@Base 0.9.2
g_base_info_unref@Base 0.9.2
g_callable_info_free_closure@Base 0.9.2
g_callable_info_get_arg@Base 0.9.2
g_callable_info_get_caller_owns@Base 0.9.2
g_callable_info_get_n_args@Base 0.9.2
g_callable_info_get_return_attribute@Base 0.9.2
g_callable_info_get_return_type@Base 0.9.2
g_callable_info_invoke@Base 1.32.0-1+6.0trisquel1
g_callable_info_iterate_return_attributes@Base 0.9.2
g_callable_info_load_arg@Base 0.9.2
g_callable_info_load_return_type@Base 0.9.2
g_callable_info_may_return_null@Base 0.9.2
g_callable_info_prepare_closure@Base 0.9.2
g_callable_info_skip_return@Base 1.29.0
g_constant_info_free_value@Base 1.31.0
g_constant_info_get_type@Base 0.9.2
g_constant_info_get_value@Base 0.9.2
g_enum_info_get_error_domain@Base 1.30.0
g_enum_info_get_method@Base 1.30.0
g_enum_info_get_n_methods@Base 1.30.0
g_enum_info_get_n_values@Base 0.9.2
g_enum_info_get_storage_type@Base 0.9.2
g_enum_info_get_value@Base 0.9.2
g_field_info_get_field@Base 0.9.2
g_field_info_get_flags@Base 0.9.2
g_field_info_get_offset@Base 0.9.2
g_field_info_get_size@Base 0.9.2
g_field_info_get_type@Base 0.9.2
g_field_info_set_field@Base 0.9.2
g_function_info_get_flags@Base 0.9.2
g_function_info_get_property@Base 0.9.2
g_function_info_get_symbol@Base 0.9.2
g_function_info_get_vfunc@Base 0.9.2
g_function_info_invoke@Base 0.9.2
g_function_info_prep_invoker@Base 0.9.2
g_function_invoker_destroy@Base 0.9.2
g_function_invoker_new_for_address@Base 1.31.20
g_info_new@Base 0.9.2
g_info_type_to_string@Base 0.9.3
g_interface_info_find_method@Base 0.9.2
g_interface_info_find_vfunc@Base 0.9.2
g_interface_info_get_constant@Base 0.9.2
g_interface_info_get_iface_struct@Base 0.9.2
g_interface_info_get_method@Base 0.9.2
g_interface_info_get_n_constants@Base 0.9.2
g_interface_info_get_n_methods@Base 0.9.2
g_interface_info_get_n_prerequisites@Base 0.9.2
g_interface_info_get_n_properties@Base 0.9.2
g_interface_info_get_n_signals@Base 0.9.2
g_interface_info_get_n_vfuncs@Base 0.9.2
g_interface_info_get_prerequisite@Base 0.9.2
g_interface_info_get_property@Base 0.9.2
g_interface_info_get_signal@Base 0.9.2
g_interface_info_get_vfunc@Base 0.9.2
g_invoke_error_quark@Base 0.9.2
g_irepository_dump@Base 0.9.2
g_irepository_enumerate_versions@Base 0.9.3
g_irepository_error_quark@Base 0.9.2
g_irepository_find_by_error_domain@Base 1.30.0
g_irepository_find_by_gtype@Base 0.9.2
g_irepository_find_by_name@Base 0.9.2
g_irepository_get_c_prefix@Base 0.9.2
g_irepository_get_default@Base 0.9.2
g_irepository_get_dependencies@Base 0.9.2
g_irepository_get_info@Base 0.9.2
g_irepository_get_loaded_namespaces@Base 0.9.2
g_irepository_get_n_infos@Base 0.9.2
g_irepository_get_option_group@Base 0.9.2
g_irepository_get_search_path@Base 0.9.2
g_irepository_get_shared_library@Base 0.9.2
g_irepository_get_type@Base 0.9.2
g_irepository_get_typelib_path@Base 0.9.2
g_irepository_get_version@Base 0.9.2
g_irepository_is_registered@Base 0.9.2
g_irepository_load_typelib@Base 0.9.2
g_irepository_prepend_search_path@Base 0.9.2
g_irepository_require@Base 0.9.2
g_irepository_require_private@Base 0.9.3
g_object_info_find_method@Base 0.9.2
g_object_info_find_method_using_interfaces@Base 0.10.0
g_object_info_find_signal@Base 0.10.0
g_object_info_find_vfunc@Base 0.9.2
g_object_info_find_vfunc_using_interfaces@Base 1.31.20
g_object_info_get_abstract@Base 0.9.2
g_object_info_get_class_struct@Base 0.9.2
g_object_info_get_constant@Base 0.9.2
g_object_info_get_field@Base 0.9.2
g_object_info_get_fundamental@Base 0.9.2
g_object_info_get_get_value_function@Base 0.9.2
g_object_info_get_get_value_function_pointer@Base 0.9.2
g_object_info_get_interface@Base 0.9.2
g_object_info_get_method@Base 0.9.2
g_object_info_get_n_constants@Base 0.9.2
g_object_info_get_n_fields@Base 0.9.2
g_object_info_get_n_interfaces@Base 0.9.2
g_object_info_get_n_methods@Base 0.9.2
g_object_info_get_n_properties@Base 0.9.2
g_object_info_get_n_signals@Base 0.9.2
g_object_info_get_n_vfuncs@Base 0.9.2
g_object_info_get_parent@Base 0.9.2
g_object_info_get_property@Base 0.9.2
g_object_info_get_ref_function@Base 0.9.2
g_object_info_get_ref_function_pointer@Base 0.9.2
g_object_info_get_set_value_function@Base 0.9.2
g_object_info_get_set_value_function_pointer@Base 0.9.2
g_object_info_get_signal@Base 0.9.2
g_object_info_get_type_init@Base 0.9.2
g_object_info_get_type_name@Base 0.9.2
g_object_info_get_unref_function@Base 0.9.2
g_object_info_get_unref_function_pointer@Base 0.9.2
g_object_info_get_vfunc@Base 0.9.2
g_property_info_get_flags@Base 0.9.2
g_property_info_get_ownership_transfer@Base 0.9.2
g_property_info_get_type@Base 0.9.2
g_registered_type_info_get_g_type@Base 0.9.2
g_registered_type_info_get_type_init@Base 0.9.2
g_registered_type_info_get_type_name@Base 0.9.2
g_signal_info_get_class_closure@Base 0.9.2
g_signal_info_get_flags@Base 0.9.2
g_signal_info_true_stops_emit@Base 0.9.2
g_struct_info_find_method@Base 0.9.2
g_struct_info_get_alignment@Base 0.9.2
g_struct_info_get_field@Base 0.9.2
g_struct_info_get_method@Base 0.9.2
g_struct_info_get_n_fields@Base 0.9.2
g_struct_info_get_n_methods@Base 0.9.2
g_struct_info_get_size@Base 0.9.2
g_struct_info_is_foreign@Base 0.9.2
g_struct_info_is_gtype_struct@Base 0.9.2
g_type_info_get_array_fixed_size@Base 0.9.2
g_type_info_get_array_length@Base 0.9.2
g_type_info_get_array_type@Base 0.9.2
g_type_info_get_ffi_type@Base 0.9.2
g_type_info_get_interface@Base 0.9.2
g_type_info_get_param_type@Base 0.9.2
g_type_info_get_tag@Base 0.9.2
g_type_info_is_pointer@Base 0.9.2
g_type_info_is_zero_terminated@Base 0.9.2
g_type_tag_to_string@Base 0.9.2
g_typelib_check_sanity@Base 0.9.2
g_typelib_error_quark@Base 0.9.2
g_typelib_free@Base 0.9.2
g_typelib_get_dir_entry@Base 0.9.2
g_typelib_get_dir_entry_by_error_domain@Base 1.30.0
g_typelib_get_dir_entry_by_gtype@Base 0.10.0
g_typelib_get_dir_entry_by_name@Base 0.10.0
g_typelib_get_namespace@Base 0.9.2
g_typelib_new_from_const_memory@Base 0.9.2
g_typelib_new_from_mapped_file@Base 0.9.2
g_typelib_new_from_memory@Base 0.9.2
g_typelib_symbol@Base 0.9.2
g_typelib_validate@Base 0.9.2
g_union_info_find_method@Base 0.9.2
g_union_info_get_alignment@Base 0.9.2
g_union_info_get_discriminator@Base 0.9.2
g_union_info_get_discriminator_offset@Base 0.9.2
g_union_info_get_discriminator_type@Base 0.9.2
g_union_info_get_field@Base 0.9.2
g_union_info_get_method@Base 0.9.2
g_union_info_get_n_fields@Base 0.9.2
g_union_info_get_n_methods@Base 0.9.2
g_union_info_get_size@Base 0.9.2
g_union_info_is_discriminated@Base 0.9.2
g_value_info_get_value@Base 0.9.2
g_vfunc_info_get_address@Base 0.10.2
g_vfunc_info_get_flags@Base 0.9.2
g_vfunc_info_get_invoker@Base 0.9.2
g_vfunc_info_get_offset@Base 0.9.2
g_vfunc_info_get_signal@Base 0.9.2
g_vfunc_info_invoke@Base 0.10.2
gi_cclosure_marshal_generic@Base 0.9.2
gi_type_info_extract_ffi_return_value@Base 1.31.22
gi_type_tag_get_ffi_type@Base 0.10.0
From 0912441778e91dbbd8677b434efbdf0b7df4d2b2 Mon Sep 17 00:00:00 2001
From: Simon Feltman <s.feltman@gmail.com>
Date: Sun, 29 Jul 2012 23:36:25 -0700
Subject: [PATCH] Fix crash when returning (False, None) from
Gtk.TreeModel.do_get_iter.
Added a Py_None check before attempting memcpy.
https://bugzilla.gnome.org/show_bug.cgi?id=680812
---
gi/pygi-closure.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/gi/pygi-closure.c b/gi/pygi-closure.c
index 8c8e13d..1982c1b 100644
--- a/gi/pygi-closure.c
+++ b/gi/pygi-closure.c
@@ -82,8 +82,12 @@ _pygi_closure_assign_pyobj_to_out_argument (gpointer out_arg, PyObject *object,
if (!g_type_info_is_pointer (type_info) &&
interface_type == GI_INFO_TYPE_STRUCT) {
- gsize item_size = _pygi_g_type_info_size (type_info);
- memcpy (out_arg, arg.v_pointer, item_size);
+ if (object == Py_None) {
+ arg.v_pointer = NULL;
+ } else {
+ gsize item_size = _pygi_g_type_info_size (type_info);
+ memcpy (out_arg, arg.v_pointer, item_size);
+ }
break;
}
}
--
1.7.9.5
This diff is collapsed.
This diff is collapsed.
#!/bin/sh
#
# Copyright (C) 2011 Rubén Rodríguez <ruben@trisquel.info>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
VERSION=2
EXTERNAL="deb-src http://archive.ubuntu.com/ubuntu quantal main"
. ./config
changelog "Recompiled to link with updated gi"
compile
#!/bin/sh
#
# Copyright (C) 2013 Rubén Rodríguez <ruben@trisquel.info>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
VERSION=1
. ./config
patch -p1 < $DATA/g_callable_info_invoke-public.patch
cp $DATA/symbols debian/libgirepository-1.0-1.symbols
changelog "GNOME bug 644926"
compile
#!/bin/sh
#
# Copyright (C) 2011 Rubén Rodríguez <ruben@trisquel.info>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
VERSION=1
COMPONENT=main
. ./config
cat << EOF | patch -p1
From 87f61439784427a436b8fb2739c8c24699163e96 Mon Sep 17 00:00:00 2001
From: Carlos Garnacho <carlos@lanedo.com>
Date: Wed, 27 Jun 2012 14:51:57 +0200
Subject: [PATCH] introspection: mark data in GtkCallback as closure
This is needed for so GtkContainer::forall() can be implemented
in non-native code, and the callback gets the passed data if
called.
https://bugzilla.gnome.org/show_bug.cgi?id=644926
---
gtk/gtkwidget.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index 33a54d0..d9ff046 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -78,7 +78,7 @@ typedef GdkRectangle GtkAllocation;
/**
* GtkCallback:
* @widget: the widget to operate on
- * @data: user-supplied data
+ * @data: (closure): user-supplied data
*
* The type of the callback functions used for e.g. iterating over
* the children of a container, see gtk_container_foreach().
--
1.7.10.2
EOF
changelog "Disabled resize grips by default"
PARALLEL=false compile
#!/bin/sh
#
# Copyright (C) 2013 Rubén Rodríguez <ruben@trisquel.info>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
VERSION=3
EXTERNAL="deb-src http://archive.ubuntu.com/ubuntu quantal main universe"
. ./config
#patch -p1 < $DATA/ccallback.patch
sed 's/1\.33\.14/1\.3\.14/' configure.ac -i
/bin/sed 's/1\.33\.9/1\.3\.9/' debian/control* -i
apt-get install -q -y pep8 pyflakes
changelog "GNOME bug 644926"
compile
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment