File: pydia-properties.h

package info (click to toggle)
dia 0.97.3%2Bgit20160930-9
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 54,372 kB
  • sloc: ansic: 155,065; xml: 16,326; python: 6,641; cpp: 4,935; makefile: 3,833; sh: 540; perl: 137; sed: 19
file content (29 lines) | stat: -rw-r--r-- 656 bytes parent folder | download | duplicates (8)
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
#ifndef PYDIA_PROPERTIES_H
#define PYDIA_PROPERTIES_H

#include <Python.h>
#include "lib/object.h"
#include "lib/properties.h"

typedef struct {
    PyObject_HEAD
    Property* property; 
} PyDiaProperty;

extern PyTypeObject PyDiaProperty_Type;
PyObject* PyDiaProperty_New (Property* property);

typedef struct {
    PyObject_HEAD
    DiaObject* object;
    int nprops;
} PyDiaProperties;

extern PyTypeObject PyDiaProperties_Type;
PyObject* PyDiaProperties_New (DiaObject* obj);

int PyDiaProperty_ApplyToObject (DiaObject *object, gchar *key, Property *prop, PyObject *val);

#define PyDiaProperty_Check(o) ((o)->ob_type == &PyDiaProperty_Type)

#endif