ObjQt  Diff

Differences From Artifact [24149a7d9b]:

To Artifact [3d675a8122]:


34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64

@property (readonly, nonatomic) QEvent *qEvent;
@property (nonatomic, getter=isAccepted) bool accepted;
@property (readonly, nonatomic, getter=isSpontaneous) bool spontaneous;
@property (readonly, nonatomic) QEvent::Type type;

+ (int)registerEventType: (int)hint;
- init OF_UNAVAILABLE;
- initWithQEvent: (QEvent *)qEvent OF_DESIGNATED_INITIALIZER;
- (void)accept;
- (void)ignore;
@end

namespace ObjQt {

static OF_INLINE QtEvent *
toOF(QEvent *qEvent)
{
	if (qEvent == NULL)
		return nil;

	return [[[QtEvent alloc] initWithQEvent: qEvent] autorelease];
}

static OF_INLINE QEvent *
toQt(QtEvent *event)
{
	return [event qEvent];
}

}







|
|


















|



34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64

@property (readonly, nonatomic) QEvent *qEvent;
@property (nonatomic, getter=isAccepted) bool accepted;
@property (readonly, nonatomic, getter=isSpontaneous) bool spontaneous;
@property (readonly, nonatomic) QEvent::Type type;

+ (int)registerEventType: (int)hint;
- (instancetype)init OF_UNAVAILABLE;
- (instancetype)initWithQEvent: (QEvent *)qEvent OF_DESIGNATED_INITIALIZER;
- (void)accept;
- (void)ignore;
@end

namespace ObjQt {

static OF_INLINE QtEvent *
toOF(QEvent *qEvent)
{
	if (qEvent == NULL)
		return nil;

	return [[[QtEvent alloc] initWithQEvent: qEvent] autorelease];
}

static OF_INLINE QEvent *
toQt(QtEvent *event)
{
	return event.qEvent;
}

}