Method

TermboxEventinto_mouse_event

Declaration

TbgMouseEvent*
tbg_event_into_mouse_event (
  TbgEvent* event
)

Description

Consume event and reinterpret it as a TbgMouseEvent.

Use GLib’s steal-pointer helper when passing a g_autoptr(TbgEvent) to this function. If event is not a mouse event, it is freed and NULL is returned.

Parameters

event

Type: TbgEvent

A TbgEvent.

The instance takes ownership of the data, and is responsible for freeing it.

Return value

Type: TbgMouseEvent

A TbgMouseEvent, or NULL.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.
The return value can be NULL.