Code example for EventBus

Methods: post

0
		final xcb_map_notify_event_t map_notify_event = cast(event);
 
		LOG.debug(	"Received X event={}", 
					map_notify_event.getClass().getSimpleName());
 
		this.xEventBus.post(map_notify_event);
 
		return Optional.of(new ShowNotify());
	} 
 
	public xcb_map_notify_event_t cast(final xcb_generic_event_t event) {
		return new xcb_map_notify_event_t(	xcb_generic_event_t.getCPtr(event),
											false); 
	} 
 
	@Override 
	public Optional<DisplaySurface> getTarget(final xcb_generic_event_t event_t) {
		final xcb_map_notify_event_t map_notify_event_t = cast(event_t);
		final int windowId = map_notify_event_t.getWindow();
		return Optional.of(this.xWindowCache.getWindow(windowId));