/**
 * ctrl_c_handler(int signal)
 * @brief Ctrl C signal handler
 * @param signal
 */ 
void ctrl_c_handler(int signal)
{
	fprintf(stdout, "Interrupt caught[NO: %d ]\n", signal);
	TERMINATE_FEAT_INPUT_FC();
	stop_application();
	exit(0);
}
Ejemplo n.º 2
0
UInt32	PilotMain(UInt16 cmd, void *cmdPBP, UInt16 launchFlags){

  EventType event;
  int error;

  if (cmd == sysAppLaunchCmdNormalLaunch) {

    error = start_application();
    if (error)
      return error;

    event_loop();
    stop_application();
  }
  return 0;
}
Ejemplo n.º 3
0
int main (int argc, char **argv)
{

  gdk_init (&argc, &argv);

  loop = g_main_loop_new (NULL, FALSE);
  screen = wnck_screen_get_default ();

  signal(SIGINT, INThandler);


  g_signal_connect(screen, "active-window-changed",
  		  G_CALLBACK(on_active_window_changed), NULL);

  g_main_loop_run (loop);

  stop_application();

  return 0;
}
Ejemplo n.º 4
0
void INThandler(int sig)
{
	g_print("Exiting program");
	stop_application();
}