2
* Copyright (C) 2012 Canonical, Ltd.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation; version 3.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
17
// Handy macros to declare GObject callbacks. The 'n' in CALLBACKn refers to
18
// the number of dummy arguments the callback returns
19
#define GOBJECT_CALLBACK0(callbackName, slot) \
21
callbackName(GObject* src, QObject* dst) \
23
QMetaObject::invokeMethod(dst, slot); \
26
#define GOBJECT_CALLBACK1(callbackName, slot) \
28
callbackName(GObject* src, void* dummy1, QObject* dst) \
30
QMetaObject::invokeMethod(dst, slot); \
33
#define GOBJECT_CALLBACK2(callbackName, slot) \
35
callbackName(GObject* src, void* dummy1, void* dummy2, QObject* dst) \
37
QMetaObject::invokeMethod(dst, slot); \