Harlequin RIP SDK

Defines functions to start and end the Timed callback system. More...

#include "hqncall.h"

Typedefs

typedef void *(* hqn_timer_alloc_fn) (size_t size)
 The memory allocator prototype. More...
 
typedef void(* hqn_timer_free_fn) (void *mem)
 The memory deallocator prototype. More...
 

Functions

int hqn_timer_init (hqn_timer_alloc_fn alloc, hqn_timer_free_fn free)
 Initialise the timed callback system. More...
 
void hqn_timer_finish (void)
 Shutdown the timed callback system. More...
 

Detailed Description

Defines functions to start and end the Timed callback system.

Copyright (C) 2023 Global Graphics Software Ltd. All rights reserved. This source code contains the confidential and trade secret information of Global Graphics Software Ltd. It may not be used, copied or distributed for any reason except as set forth in the applicable Global Graphics license agreement.

The timer callback system must be initialised before creating any timed callback timers.

Typedef Documentation

◆ hqn_timer_alloc_fn

typedef void*( * hqn_timer_alloc_fn) (size_t size)

The memory allocator prototype.

Parameters
[in]sizeThe number of bytes to allocate
Returns
Newly allocated memory, or NULL

◆ hqn_timer_free_fn

typedef void( * hqn_timer_free_fn) (void *mem)

The memory deallocator prototype.

Parameters
[in]memThe memory to deallocate.

Function Documentation

◆ hqn_timer_finish()

void hqn_timer_finish ( void  )

Shutdown the timed callback system.

The timed callback system is shutdown but any existing callback timers are not destroyed. It is the client's responsibility to ensure all callback timers are destroyed to prevent a resource leak.

◆ hqn_timer_init()

int hqn_timer_init ( hqn_timer_alloc_fn  alloc,
hqn_timer_free_fn  free 
)

Initialise the timed callback system.

Parameters
[in]allocMemory allocation function pointer.
[in]freeMemory release function pointer.
Returns
TRUE if the timed callback system has been initialised successfully, else FALSE.