mirror of
https://github.com/Tha14/toxic.git
synced 2025-07-04 06:36:46 +02:00
API update
This commit is contained in:
10
src/prompt.c
10
src/prompt.c
@ -100,7 +100,7 @@ void prompt_update_statusmessage(ToxWindow *prompt, uint8_t *statusmsg, uint16_t
|
||||
}
|
||||
|
||||
/* Updates own status in prompt statusbar */
|
||||
void prompt_update_status(ToxWindow *prompt, TOX_USERSTATUS status)
|
||||
void prompt_update_status(ToxWindow *prompt, uint8_t status)
|
||||
{
|
||||
StatusBar *statusbar = prompt->stb;
|
||||
statusbar->status = status;
|
||||
@ -389,7 +389,7 @@ static void prompt_onInit(ToxWindow *self, Tox *m)
|
||||
wclrtoeol(self->window);
|
||||
}
|
||||
|
||||
static void prompt_onConnectionChange(ToxWindow *self, Tox *m, int friendnum , uint8_t status)
|
||||
static void prompt_onConnectionChange(ToxWindow *self, Tox *m, int32_t friendnum , uint8_t status)
|
||||
{
|
||||
if (friendnum < 0)
|
||||
return;
|
||||
@ -434,7 +434,7 @@ static void prompt_onConnectionChange(ToxWindow *self, Tox *m, int friendnum , u
|
||||
}
|
||||
}
|
||||
|
||||
static void prompt_onFriendRequest(ToxWindow *self, uint8_t *key, uint8_t *data, uint16_t length)
|
||||
static void prompt_onFriendRequest(ToxWindow *self, Tox *m, uint8_t *key, uint8_t *data, uint16_t length)
|
||||
{
|
||||
/* make sure message data is null-terminated */
|
||||
data[length - 1] = 0;
|
||||
@ -476,9 +476,9 @@ void prompt_init_statusbar(ToxWindow *self, Tox *m)
|
||||
uint8_t statusmsg[MAX_STR_SIZE];
|
||||
|
||||
pthread_mutex_lock(&Winthread.lock);
|
||||
tox_get_self_name(m, nick, TOX_MAX_NAME_LENGTH);
|
||||
tox_get_self_name(m, nick);
|
||||
tox_get_self_status_message(m, statusmsg, MAX_STR_SIZE);
|
||||
TOX_USERSTATUS status = tox_get_self_user_status(m);
|
||||
uint8_t status = tox_get_self_user_status(m);
|
||||
pthread_mutex_unlock(&Winthread.lock);
|
||||
|
||||
snprintf(statusbar->nick, sizeof(statusbar->nick), "%s", nick);
|
||||
|
Reference in New Issue
Block a user