blob: 7263ae5fccaa2f84b673d83edf2b08b162a42cf5 (
plain)
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
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
#ifndef PYSIDE_QFLAGS_H
#define PYSIDE_QFLAGS_H
#include <sbkpython.h>
#include "pysidemacros.h"
extern "C"
{
struct PYSIDE_API PySideQFlagsObject {
PyObject_HEAD
long ob_value;
};
PYSIDE_API PyObject* PySideQFlags_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
PYSIDE_API PyObject* PySideQFlags_tp_richcompare(PyObject *self, PyObject *other, int op);
}
namespace PySide
{
namespace QFlagsSupport
{
/**
* Creates a new QFlags type.
*/
PYSIDE_API PyTypeObject *create(const char* name, PyType_Slot *numberMethods);
/**
* Creates a new QFlags instance of type \p type and value \p value.
*/
PYSIDE_API PySideQFlagsObject* newObject(long value, PyTypeObject* type);
/**
* Returns the value held by a QFlag.
*/
PYSIDE_API long getValue(PySideQFlagsObject* self);
}
}
#endif
|