Пример #1
0
int
main(int argc, char **argv)
{
   double interval = 0.3; // tick each 0.3 seconds
   Ecore_Poller *poller1, *poller2;
   char *str1 = "poller1";
   char *str2 = "poller2";

   if (!ecore_init())
     {
        printf("ERROR: Cannot init Ecore!\n");
        return -1;
     }

   _initial_time = ecore_time_get();

   ecore_poller_poll_interval_set(ECORE_POLLER_CORE, interval);

   poller1 = ecore_poller_add(ECORE_POLLER_CORE, 4, _poller_print_cb, str1);
   poller2 = ecore_poller_add(ECORE_POLLER_CORE, 8, _poller_print_cb, str2);

   ecore_main_loop_begin();

   printf("changing poller2 interval to 16\n");

   ecore_poller_poller_interval_set(poller2, 16);
   ecore_main_loop_begin();

   ecore_poller_del(poller1);
   ecore_poller_del(poller2);

   ecore_shutdown();
}
static void
_gc_shutdown(E_Gadcon_Client *gcc)
{
   Instance *inst;

   inst = gcc->data;
   ecore_poller_del(inst->poller);
   evas_object_del(inst->obj);
   free(inst);
}
Пример #3
0
void
_battery_openbsd_stop(void)
{
   free(ac);
   if (bat)
     {
        eina_stringshare_del(bat->udi);
        eina_stringshare_del(bat->technology);
        eina_stringshare_del(bat->model);
        eina_stringshare_del(bat->vendor);
        ecore_poller_del(bat->poll);
        free(bat->mib);
        free(bat);
     }
}