Mass refactor 💥
This commit is contained in:
parent
6dfacdf04c
commit
8f1d0070c3
47 changed files with 3440 additions and 3205 deletions
72
src/twc-chat.h
Normal file
72
src/twc-chat.h
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
/*
|
||||
* Copyright (c) 2015 Håvard Pettersson <haavard.pettersson@gmail.com>
|
||||
*
|
||||
* This file is part of Tox-WeeChat.
|
||||
*
|
||||
* Tox-WeeChat is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Tox-WeeChat is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Tox-WeeChat. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef TOX_WEECHAT_CHAT_H
|
||||
#define TOX_WEECHAT_CHAT_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
extern const char *twc_tag_unsent_message;
|
||||
extern const char *twc_tag_sent_message;
|
||||
extern const char *twc_tag_received_message;
|
||||
|
||||
enum TWC_MESSAGE_TYPE
|
||||
{
|
||||
TWC_MESSAGE_TYPE_MESSAGE,
|
||||
TWC_MESSAGE_TYPE_ACTION,
|
||||
};
|
||||
|
||||
struct t_twc_chat
|
||||
{
|
||||
struct t_twc_profile *profile;
|
||||
|
||||
struct t_gui_buffer *buffer;
|
||||
int32_t friend_number;
|
||||
|
||||
};
|
||||
|
||||
struct t_twc_chat *
|
||||
twc_chat_search_friend(struct t_twc_profile *profile,
|
||||
int32_t friend_number,
|
||||
bool create_new);
|
||||
|
||||
struct t_twc_chat *
|
||||
twc_chat_search_buffer(struct t_gui_buffer *target_buffer);
|
||||
|
||||
void
|
||||
twc_chat_print_message(struct t_twc_chat *chat,
|
||||
const char *tags,
|
||||
const char *sender,
|
||||
const char *message,
|
||||
enum TWC_MESSAGE_TYPE message_type);
|
||||
|
||||
void
|
||||
twc_chat_send_message(struct t_twc_chat *chat,
|
||||
const char *message,
|
||||
enum TWC_MESSAGE_TYPE message_type);
|
||||
|
||||
void
|
||||
twc_chat_queue_refresh(struct t_twc_chat *chat);
|
||||
|
||||
void
|
||||
twc_chat_free_profile(struct t_twc_profile *profile);
|
||||
|
||||
#endif // TOX_WEECHAT_CHAT_H
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue