Debian Codegraph @

gi/pygi-basictype.h

raw
1 /* -*- Mode: C; c-basic-offset: 4 -*-
2 * vim: tabstop=4 shiftwidth=4 expandtab
3 *
4 * Copyright (C) 2014 Simon Feltman <[email protected]>
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, see <http://www.gnu.org/licenses/>.
18 */
19
20 #ifndef __PYGI_ARG_BASICTYPE_H__
21 #define __PYGI_ARG_BASICTYPE_H__
22
23 #include "pygi-cache.h"
24
25 G_BEGIN_DECLS
26
27 GIArgument pygi_marshal_from_py_basic_type (PyObject *object,
28 GITypeTag type_tag,
29 GITransfer transfer,
30 gpointer *cleanup_data);
31
32 PyObject *pygi_marshal_to_py_basic_type (GIArgument arg, GITypeTag type_tag,
33 GITransfer transfer);
34
35 gboolean pygi_gpointer_from_py (PyObject *py_arg, gpointer *result);
36
37 PyObject *pygi_gint64_to_py (gint64 value);
38 PyObject *pygi_guint64_to_py (guint64 value);
39 PyObject *pygi_gfloat_to_py (gfloat value);
40 PyObject *pygi_gdouble_to_py (gdouble value);
41 PyObject *pygi_gboolean_to_py (gboolean value);
42 PyObject *pygi_utf8_to_py (gchar *value);
43 PyObject *pygi_gint_to_py (gint value);
44 PyObject *pygi_glong_to_py (glong value);
45 PyObject *pygi_guint_to_py (guint value);
46 PyObject *pygi_gulong_to_py (gulong value);
47 PyObject *pygi_filename_to_py (gchar *value);
48 PyObject *pygi_gsize_to_py (gsize value);
49 PyObject *pygi_gssize_to_py (gssize value);
50 PyObject *pygi_guint32_to_py (guint32 value);
51 PyObject *pygi_gunichar_to_py (gunichar value);
52
53 gboolean pygi_gboolean_from_py (PyObject *object, gboolean *result);
54 gboolean pygi_gint64_from_py (PyObject *object, gint64 *result);
55 gboolean pygi_guint64_from_py (PyObject *object, guint64 *result);
56 gboolean pygi_gfloat_from_py (PyObject *py_arg, gfloat *result);
57 gboolean pygi_gdouble_from_py (PyObject *py_arg, gdouble *result);
58 gboolean pygi_utf8_from_py (PyObject *py_arg, gchar **result);
59 gboolean pygi_glong_from_py (PyObject *object, glong *result);
60 gboolean pygi_gulong_from_py (PyObject *object, gulong *result);
61 gboolean pygi_gint_from_py (PyObject *object, gint *result);
62 gboolean pygi_guint_from_py (PyObject *object, guint *result);
63 gboolean pygi_gunichar_from_py (PyObject *py_arg, gunichar *result);
64 gboolean pygi_gschar_from_py (PyObject *object, gint8 *result);
65 gboolean pygi_guchar_from_py (PyObject *object, guchar *result);
66
67 G_END_DECLS
68
69 #endif /*__PYGI_ARG_BASICTYPE_H__*/