Pebble App Framework
main
How It Works
CLI
Device API
Phone API
C Coverage
TS Coverage
GitHub
Theme
Pebble App Framework: Device API
Toggle main menu visibility
Loading...
Searching...
No Matches
callback_list.h
Go to the documentation of this file.
1
11
#pragma once
12
#include <stdbool.h>
13
18
20
typedef
void (*
CallbackListFn
)(void);
21
23
typedef
struct
24
{
25
CallbackListFn
*
entries
;
26
int
max
;
27
int
count
;
28
}
CallbackList
;
29
37
bool
callback_list_add
(
CallbackList
*list,
CallbackListFn
cb);
38
44
void
callback_list_fire
(
const
CallbackList
*list);
45
callback_list_fire
void callback_list_fire(const CallbackList *list)
Runs every callback in the order it was added.
Definition
callback_list.c:35
CallbackListFn
void(*) CallbackListFn(void)
One callback in a list.
Definition
callback_list.h:20
callback_list_add
bool callback_list_add(CallbackList *list, CallbackListFn cb)
Adds a callback to the end of the list. Adding one that is already there does nothing.
Definition
callback_list.c:11
CallbackList
A list over storage its owner provides. Start it as {entries, max, 0}.
Definition
callback_list.h:24
CallbackList::entries
CallbackListFn * entries
The owner's array, max long.
Definition
callback_list.h:25
CallbackList::count
int count
How many are in use.
Definition
callback_list.h:27
CallbackList::max
int max
How many the array holds.
Definition
callback_list.h:26
src
c
core
io
callback_list.h
Generated by
1.18.0