Blender V5.0
BLI_timer.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2018 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
7#include "BLI_sys_types.h"
8
12
18typedef double (*BLI_timer_func)(uintptr_t uuid, void *user_data);
19typedef void (*BLI_timer_data_free)(uintptr_t uuid, void *user_data);
20
21/* `func(...) < 0`: The timer will be removed.
22 * `func(...) >= 0`: The function will be called again in that many seconds. */
23void BLI_timer_register(uintptr_t uuid,
24 BLI_timer_func func,
25 void *user_data,
26 BLI_timer_data_free user_data_free,
27 double first_interval,
28 bool persistent);
29
30bool BLI_timer_is_registered(uintptr_t uuid);
31
33bool BLI_timer_unregister(uintptr_t uuid);
34
36void BLI_timer_execute(void);
37
38void BLI_timer_free(void);
39
40/* This function is to be called next to BKE_CB_EVT_LOAD_PRE, to make sure the module
41 * is properly configured for the new file. */
42void BLI_timer_on_file_load(void);
bool BLI_timer_is_registered(uintptr_t uuid)
Definition BLI_timer.cc:73
void BLI_timer_register(uintptr_t uuid, BLI_timer_func func, void *user_data, BLI_timer_data_free user_data_free, double first_interval, bool persistent)
Definition BLI_timer.cc:34
void(* BLI_timer_data_free)(uintptr_t uuid, void *user_data)
Definition BLI_timer.h:19
bool BLI_timer_unregister(uintptr_t uuid)
Definition BLI_timer.cc:61
void BLI_timer_free(void)
Definition BLI_timer.cc:126
double(* BLI_timer_func)(uintptr_t uuid, void *user_data)
Definition BLI_timer.h:18
void BLI_timer_on_file_load(void)
Definition BLI_timer.cc:144
void BLI_timer_execute(void)
Definition BLI_timer.cc:120