ObjGameKit  Check-in [d49c4b05b0]

Overview
Comment:Rename -[handleNextEvent] -> -[handleEvents].
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d49c4b05b045cb20dc368e1960cecdef136a17d3adc245abaeeac312fa4a70bf
User & Date: js on 2012-08-26 13:42:00
Other Links: manifest | tags
Context
2012-08-26
14:04
.gitignore: Add extra.mk. check-in: b6cd0e0efd user: js tags: trunk
13:42
Rename -[handleNextEvent] -> -[handleEvents]. check-in: d49c4b05b0 user: js tags: trunk
12:34
Reexport allegro_main on OS X. check-in: 2c9f1864d5 user: js tags: trunk
Changes

Modified src/OGKEventQueue.h from [b38728a4f6] to [d68b9f8b49].

46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
	ALLEGRO_EVENT_QUEUE *eventQueue;
	/* FIXME: Make this weak once there is support in ObjFW for it */
	__unsafe_unretained id <OGKEventQueueDelegate> delegate;
}

@property (unsafe_unretained) id <OGKEventQueueDelegate> delegate;

- (void)handleNextEvent;
- (void)registerDisplay: (OGKDisplay*)display;
- (void)unregisterDisplay: (OGKDisplay*)display;
- (void)registerKeyboard;
- (void)unregisterKeyboard;
- (void)registerMouse;
- (void)unregisterMouse;
@end







|







46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
	ALLEGRO_EVENT_QUEUE *eventQueue;
	/* FIXME: Make this weak once there is support in ObjFW for it */
	__unsafe_unretained id <OGKEventQueueDelegate> delegate;
}

@property (unsafe_unretained) id <OGKEventQueueDelegate> delegate;

- (void)handleEvents;
- (void)registerDisplay: (OGKDisplay*)display;
- (void)unregisterDisplay: (OGKDisplay*)display;
- (void)registerKeyboard;
- (void)unregisterKeyboard;
- (void)registerMouse;
- (void)unregisterMouse;
@end

Modified src/OGKEventQueue.m from [84dbf1da64] to [9c06e7380d].

49
50
51
52
53
54
55
56
57
58
59
60
61
62
63

- (void)dealloc
{
	if (al_is_system_installed())
		al_destroy_event_queue(eventQueue);
}

- (void)handleNextEvent
{
	OGKEvent *event = [[OGKEvent alloc] init];
	ALLEGRO_EVENT *allegroEvent = [event OGK_allegroEvent];

	while (al_get_next_event(eventQueue, allegroEvent)) {
		switch (allegroEvent->type) {
		case ALLEGRO_EVENT_DISPLAY_CLOSE:







|







49
50
51
52
53
54
55
56
57
58
59
60
61
62
63

- (void)dealloc
{
	if (al_is_system_installed())
		al_destroy_event_queue(eventQueue);
}

- (void)handleEvents
{
	OGKEvent *event = [[OGKEvent alloc] init];
	ALLEGRO_EVENT *allegroEvent = [event OGK_allegroEvent];

	while (al_get_next_event(eventQueue, allegroEvent)) {
		switch (allegroEvent->type) {
		case ALLEGRO_EVENT_DISPLAY_CLOSE:

Modified tests/TestMain.m from [28b7846922] to [00aa33180c].

71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
	of_log(@"Mouse button was released: %d (X=%.f Y=%.f WX=%.f WY=%.f)",
	    event.button, event.cursor.x, event.cursor.y,
	    event.wheel.x, event.wheel.y);
}

- (void)handleEvents
{
	[eventQueue handleNextEvent];
}

- (void)draw
{
	[OGKBitmap clearToColor: OGK_COLOR_BLACK];
	[bitmap drawAtPosition: position];
	[display update];







|







71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
	of_log(@"Mouse button was released: %d (X=%.f Y=%.f WX=%.f WY=%.f)",
	    event.button, event.cursor.x, event.cursor.y,
	    event.wheel.x, event.wheel.y);
}

- (void)handleEvents
{
	[eventQueue handleEvents];
}

- (void)draw
{
	[OGKBitmap clearToColor: OGK_COLOR_BLACK];
	[bitmap drawAtPosition: position];
	[display update];