QtGStreamer 1.2.0
Loading...
Searching...
No Matches
paramspec.h
1/*
2 Copyright (C) 2009-2010 George Kiagiadakis <kiagiadakis.george@gmail.com>
3
4 This library is free software; you can redistribute it and/or modify
5 it under the terms of the GNU Lesser General Public License as published
6 by the Free Software Foundation; either version 2.1 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17#ifndef QGLIB_PARAMSPEC_H
18#define QGLIB_PARAMSPEC_H
19
20#include "global.h"
21#include "refpointer.h"
22#include "type.h"
23#include "value.h"
24#include <QtCore/QString>
25
26namespace QGlib {
27
34class QTGLIB_EXPORT ParamSpec : public RefCountedObject
35{
36 QGLIB_WRAPPER(ParamSpec)
37public:
38 enum ParamFlag { //codegen: prefix=G_PARAM_, ReadWrite=READWRITE
39 Readable = 1<<0,
40 Writable = 1<<1,
41 ReadWrite = Readable | Writable,
42 Construct = 1<<2,
43 ConstructOnly = 1<<3,
44 LaxValidation = 1<<4,
45 Deprecated = 1<<31
46 };
47 Q_DECLARE_FLAGS(ParamFlags, ParamFlag);
48
49 QString name() const;
50 QString nick() const;
51 QString description() const;
52
53 ParamFlags flags() const;
54 Type valueType() const;
55 Type ownerType() const;
56
57 void *quarkData(const Quark & quark) const;
58 void *stealQuarkData(const Quark & quark) const;
59 void setQuarkData(const Quark & quark, void *data, void (*destroyCallback)(void*) = NULL);
60
61protected:
62 virtual void ref(bool increaseRef);
63 virtual void unref();
64};
65
66Q_DECLARE_OPERATORS_FOR_FLAGS(ParamSpec::ParamFlags)
67
68} //namespace QGlib
69
70QGLIB_REGISTER_TYPE(QGlib::ParamSpec) //codegen: GType=G_TYPE_PARAM
71QGLIB_REGISTER_TYPE(QGlib::ParamSpec::ParamFlags)
72QGLIB_REGISTER_WRAPIMPL_FOR_SUBCLASSES_OF(QGlib::ParamSpec, QGlib::Private::wrapParamSpec)
73
74// HACK to support glib 2.24 when compiling the generated assertions of ParamFlag
75// REMOVE THIS in future versions
76#ifdef INCLUDED_FROM_CODEGEN
77# if !GLIB_CHECK_VERSION(2,26,0)
78# define G_PARAM_DEPRECATED QGlib::ParamSpec::Deprecated
79# endif
80#endif //CODEGEN_RUN
81
82#endif
Wrapper class for GParamSpec.
Definition paramspec.h:35
Wrapper class for GQuark.
Definition quark.h:43
Base class for all the reference-counted object wrappers.
Definition refpointer.h:182
Wrapper class for GType.
Definition type.h:64
Wrappers for Glib and GObject classes.