<commit_before>#include <gmodule.h>
#include <clutter/clutter.h>
#include <string.h>

gboolean IsFullScreen = FALSE, IsMotion = TRUE;

static void
stage_state_cb (ClutterStage    *stage,
		gpointer         data)
{
  gchar *detail = (gchar*)data;

  printf("[stage signal] %s\n", detail);
}

static gboolean
blue_button_cb (ClutterActor    *actor,
		ClutterEvent    *event,
		gpointer         data)
{
  ClutterActor *stage;

  stage = clutter_stage_get_default ();

  if (IsFullScreen)
    IsFullScreen = FALSE;
  else
    IsFullScreen = TRUE;

  clutter_stage_set_fullscreen (CLUTTER_STAGE (stage), IsFullScreen);

  g_print ("*** Fullscreen %s ***\n",
           IsFullScreen ? "enabled" : "disabled");

  return FALSE;
}

static gboolean
red_button_cb (ClutterActor    *actor,
		ClutterEvent    *event,
		gpointer         data)
{

  if (IsMotion)
    IsMotion = FALSE;
  else
    IsMotion = TRUE;

  clutter_set_motion_events_enabled (IsMotion);

  g_print ("*** Per actor motion events %s ***\n",
           IsMotion ? "enabled" : "disabled");

  return FALSE;
}

static gboolean
capture_cb (ClutterActor *actor,
	    ClutterEvent *event,
	    gpointer      data)
{
  g_print ("* captured event for type '%s' *\n",
           G_OBJECT_TYPE_NAME (actor));

  return FALSE;
}

static void
key_focus_in_cb (ClutterActor    *actor,
		 gpointer         data)
{
  ClutterActor *focus_box = CLUTTER_ACTOR(data);  
<commit_msg>tests: Print out the captured event type<commit_after>#include <gmodule.h>
#include <clutter/clutter.h>
#include <string.h>

gboolean IsFullScreen = FALSE, IsMotion = TRUE;

static const gchar *
get_event_type_name (const ClutterEvent *event)
{
  switch (event->type)
    {
    case CLUTTER_BUTTON_PRESS:
      return "BUTTON PRESS";

    case CLUTTER_BUTTON_RELEASE:
      return "BUTTON_RELEASE";

    case CLUTTER_KEY_PRESS:
      return "KEY PRESS";

    case CLUTTER_KEY_RELEASE:
      return "KEY RELEASE";

    case CLUTTER_ENTER:
      return "ENTER";

    case CLUTTER_LEAVE:
      return "LEAVE";

    default:
      return "EVENT";
    }
}

static void
stage_state_cb (ClutterStage    *stage,
		gpointer         data)
{
  gchar *detail = (gchar*)data;

  printf("[stage signal] %s\n", detail);
}

static gboolean
blue_button_cb (ClutterActor    *actor,
		ClutterEvent    *event,
		gpointer         data)
{
  ClutterActor *stage;

  stage = clutter_stage_get_default ();

  if (IsFullScreen)
    IsFullScreen = FALSE;
  else
    IsFullScreen = TRUE;

  clutter_stage_set_fullscreen (CLUTTER_STAGE (stage), IsFullScreen);

  g_print ("*** Fullscreen %s ***\n",
           IsFullScreen ? "enabled" : "disabled");

  return FALSE;
}

static gboolean
red_button_cb (ClutterActor    *actor,
		ClutterEvent    *event,
		gpointer         data)
{

  if (IsMotion)
    IsMotion = FALSE;
  else
    IsMotion = TRUE;

  clutter_set_motion_events_enabled (IsMotion);

  g_print ("*** Per actor motion events %s ***\n",
           IsMotion ? "enabled" : "disabled");

  return FALSE;
}

static gboolean
capture_cb (ClutterActor *actor,
	    ClutterEvent *event,
	    gpointer      data)
{
  g_print ("* captured event '%s' for type '%s' *\n",
           get_event_type_name (event),
           G_OBJECT_TYPE_NAME (actor));

  return FALSE;
}

static void
key_focus_in_cb (ClutterActor    *actor,
		 gpointer         data)
{
  ClutterActor *focus_box = CLUTTER_ACTOR(data);  

{'fraction_non_alphanumeric': 0.10813199764289923, 'fraction_numerical': 0.0, 'mean_word_length': 3.1554467564259485, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3374909', 'n_tokens_mistral': 1215, 'n_tokens_neox': 1155, 'n_words': 284}