Callbacks

This module provides callback functions for handling keyboard and mouse input, as well as predefined button actions in EZGL applications.

Input Event Callbacks

gboolean ezgl::press_key(GtkWidget *widget, GdkEventKey *event, gpointer data)

React to a keyboard press event.

Parameters:
  • widget – The GUI widget where this event came from.

  • event – The keyboard event.

  • data – A pointer to any user-specified data you passed in.

Returns:

FALSE to allow other handlers to see this event, too. TRUE otherwise.

gboolean ezgl::press_mouse(GtkWidget *widget, GdkEventButton *event, gpointer data)

React to mouse click event

Parameters:
  • widget – The GUI widget where this event came from.

  • event – The click event.

  • data – A pointer to any user-specified data you passed in.

Returns:

FALSE to allow other handlers to see this event, too. TRUE otherwise.

gboolean ezgl::release_mouse(GtkWidget *widget, GdkEventButton *event, gpointer data)

React to mouse release event

Parameters:
  • widget – The GUI widget where this event came from.

  • event – The click event.

  • data – A pointer to any user-specified data you passed in.

Returns:

FALSE to allow other handlers to see this event, too. TRUE otherwise.

gboolean ezgl::move_mouse(GtkWidget *widget, GdkEventButton *event, gpointer data)

React to mouse release event

Parameters:
  • widget – The GUI widget where this event came from.

  • event – The click event.

  • data – A pointer to any user-specified data you passed in.

Returns:

FALSE to allow other handlers to see this event, too. TRUE otherwise.

gboolean ezgl::scroll_mouse(GtkWidget *widget, GdkEvent *event, gpointer data)

React to scroll_event event

Parameters:
  • widget – The GUI widget where this event came from.

  • event – The click event.

  • data – A pointer to any user-specified data you passed in.

Returns:

FALSE to allow other handlers to see this event, too. TRUE otherwise.

Button Action Callbacks

gboolean ezgl::press_zoom_fit(GtkWidget *widget, gpointer data)

React to the clicked zoom_fit button

Parameters:
  • widget – The GUI widget where this event came from.

  • data – A pointer to any user-specified data you passed in.

Returns:

FALSE to allow other handlers to see this event, too. TRUE otherwise.

gboolean ezgl::press_zoom_in(GtkWidget *widget, gpointer data)

React to the clicked zoom_in button

Parameters:
  • widget – The GUI widget where this event came from.

  • data – A pointer to any user-specified data you passed in.

Returns:

FALSE to allow other handlers to see this event, too. TRUE otherwise.

gboolean ezgl::press_zoom_out(GtkWidget *widget, gpointer data)

React to the clicked zoom_out button

Parameters:
  • widget – The GUI widget where this event came from.

  • data – A pointer to any user-specified data you passed in.

Returns:

FALSE to allow other handlers to see this event, too. TRUE otherwise.

Other Callbacks

gboolean ezgl::press_proceed(GtkWidget *widget, gpointer data)

React to the clicked proceed button

Parameters:
  • widget – The GUI widget where this event came from.

  • data – A pointer to any user-specified data you passed in.

Returns:

FALSE to allow other handlers to see this event, too. TRUE otherwise.