File: pygstminiobject.h

package info (click to toggle)
telepathy-farstream 0.4.0-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 3,184 kB
  • sloc: sh: 11,106; ansic: 9,464; python: 8,213; makefile: 239
file content (55 lines) | stat: -rw-r--r-- 1,185 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/* -*- Mode: C; c-basic-offset: 4 -*- */

#ifndef _PYGSTMINIOBJECT_H_
#define _PYGSTMINIOBJECT_H_

#include <Python.h>

#include <glib.h>
#include <glib-object.h>

#include "common.h"

G_BEGIN_DECLS

/* Work around bugs in PyGILState api fixed in 2.4.0a4 */
#undef PYGIL_API_IS_BUGGY
#if PY_VERSION_HEX < 0x020400A4
#define PYGIL_API_IS_BUGGY TRUE
#else
#define PYGIL_API_IS_BUGGY FALSE
#endif

typedef struct {
    PyObject_HEAD
    GstMiniObject *obj;
    PyObject *inst_dict; /* the instance dictionary -- must be last */
    PyObject *weakreflist; /* list of weak references */
} PyGstMiniObject;

PyObject *
pygstminiobject_new(GstMiniObject *obj);

#define pygstminiobject_get(v) (((PyGstMiniObject *)(v))->obj)
#define pygstminiobject_check(v,base) (PyObject_TypeCheck(v,base))

void
pygstminiobject_register_class(PyObject *dict, const gchar *type_name,
			       GType gtype, PyTypeObject *type,
			       PyObject *bases);
void
pygstminiobject_register_wrapper(PyObject *self);

void
pygst_miniobject_init();

#ifndef _INSIDE_PYGSTMINIOBJECT_


extern PyTypeObject PyGstMiniObject_Type;

#endif /* !_INSIDE_PYGSTMINIOBJECT_ */

G_END_DECLS

#endif /* !_PYGSTMINIOBJECT_H_ */