Imported Upstream version 3.7.91.1
[platform/upstream/pygobject2.git] / gi / pygi-argument.h
1 /* -*- Mode: C; c-basic-offset: 4 -*-
2  * vim: tabstop=4 shiftwidth=4 expandtab
3  *
4  * Copyright (C) 2005-2009 Johan Dahlin <johan@gnome.org>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
19  * USA
20  */
21
22 #ifndef __PYGI_ARGUMENT_H__
23 #define __PYGI_ARGUMENT_H__
24
25 #include <Python.h>
26
27 #include <girepository.h>
28
29 G_BEGIN_DECLS
30
31
32 /* Private */
33 gpointer _pygi_arg_to_hash_pointer (const GIArgument *arg,
34                                     GITypeTag         type_tag);
35
36 void _pygi_hash_pointer_to_arg (GIArgument *arg,
37                                 GITypeTag   type_tag);
38
39 gint _pygi_g_type_interface_check_object (GIBaseInfo *info,
40                                           PyObject   *object);
41
42 gint _pygi_g_type_info_check_object (GITypeInfo *type_info,
43                                      PyObject   *object,
44                                      gboolean   allow_none);
45
46 gint _pygi_g_registered_type_info_check_object (GIRegisteredTypeInfo *info,
47                                                 gboolean              is_instance,
48                                                 PyObject             *object);
49
50
51 GArray* _pygi_argument_to_array (GIArgument  *arg,
52                                  GIArgument  *args[],
53                                  const GValue *args_values,
54                                  GICallableInfo *callable_info,
55                                  GITypeInfo  *type_info,
56                                  gboolean    *out_free_array);
57
58 GIArgument _pygi_argument_from_object (PyObject   *object,
59                                       GITypeInfo *type_info,
60                                       GITransfer  transfer);
61
62 PyObject* _pygi_argument_to_object (GIArgument  *arg,
63                                     GITypeInfo *type_info,
64                                     GITransfer  transfer);
65
66 GIArgument _pygi_argument_from_g_value(const GValue *value,
67                                        GITypeInfo *type_info);
68
69 void _pygi_argument_release (GIArgument   *arg,
70                              GITypeInfo  *type_info,
71                              GITransfer   transfer,
72                              GIDirection  direction);
73
74 void _pygi_argument_init (void);
75
76 G_END_DECLS
77
78 #endif /* __PYGI_ARGUMENT_H__ */