Imported Upstream version 3.19.91
[platform/upstream/python-gobject.git] / gi / pygi-error.h
1 /* -*- Mode: C; c-basic-offset: 4 -*-
2  * vim: tabstop=4 shiftwidth=4 expandtab
3  *
4  * Copyright (C) 1998-2003  James Henstridge
5  *               2004-2008  Johan Dahlin
6  * Copyright (C) 2014 Simon Feltman <sfeltman@gnome.org>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, see <http://www.gnu.org/licenses/>.
20  */
21
22 #ifndef __PYGI_ERROR_H__
23 #define __PYGI_ERROR_H__
24
25 #include <girepository.h>
26 #include "pygi-cache.h"
27
28 G_BEGIN_DECLS
29
30 extern PyObject *PyGError;
31
32 gboolean      pygi_error_check              (GError **error);
33
34 PyObject*     pygi_error_marshal_to_py      (GError **error);
35
36 gboolean      pygi_error_marshal_from_py    (PyObject  *pyerr,
37                                              GError   **error);
38
39 gboolean      pygi_gerror_exception_check   (GError **error);
40
41 PyObject*     pygi_register_exception_for_domain (gchar *name,
42                                                   gint   error_domain);
43
44 PyGIArgCache* pygi_arg_gerror_new_from_info (GITypeInfo    *type_info,
45                                              GIArgInfo     *arg_info,   /* may be null */
46                                              GITransfer     transfer,
47                                              PyGIDirection  direction);
48
49 void          pygi_error_register_types     (PyObject *module);
50
51 G_END_DECLS
52
53 #endif /*__PYGI_ERROR_H__*/