aboutsummaryrefslogtreecommitdiffstats
path: root/src/delayed.c
blob: 62af6b9e77fbd289ee75d16bb03316ac189e7553 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include "delayed.h"

void
e_delayed_action_start(void *obs, void *obj)
{
   char event_name[1024];
   E_Delayed_Action *eda = obs;

   snprintf(event_name, 1024, "_e_delayed_action_notify(%d)", eda->e_event);
   e_add_event_timer(event_name, eda->delay, eda->delay_func, 0, obj);
}

void
e_delayed_action_cancel(void *obs)
{
   E_Delayed_Action *eda = obs;
   char event_name[1024];
   snprintf(event_name, 1024, "_e_delayed_action_notify(%d)", eda->e_event);
   e_del_event_timer(event_name);
}

void
e_delayed_action_free(void *obs)
{
	e_delayed_action_cancel(obs);
	free(obs);
}