mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Merge branch 'master' into osx-functional
This commit is contained in:
commit
cce68037e1
@ -197,6 +197,17 @@ api_get_current_muc(void)
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
api_current_win_is_console(void)
|
||||
{
|
||||
ProfWin *current = wins_get_current();
|
||||
if (current && current->type == WIN_CONSOLE) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
api_log_debug(const char *message)
|
||||
{
|
||||
|
@ -43,8 +43,10 @@ int api_cons_show_themed(const char *const group, const char *const item, const
|
||||
int api_cons_bad_cmd_usage(const char *const cmd);
|
||||
void api_notify(const char *message, const char *category, int timeout_ms);
|
||||
void api_send_line(char *line);
|
||||
|
||||
char * api_get_current_recipient(void);
|
||||
char * api_get_current_muc(void);
|
||||
gboolean api_current_win_is_console(void);
|
||||
|
||||
void api_register_command(const char *command_name, int min_args, int max_args,
|
||||
const char **synopsis, const char *description, const char *arguments[][2], const char **examples,
|
||||
|
@ -126,6 +126,12 @@ c_api_get_current_muc(void)
|
||||
return api_get_current_muc();
|
||||
}
|
||||
|
||||
static int
|
||||
c_api_current_win_is_console()
|
||||
{
|
||||
return api_current_win_is_console();
|
||||
}
|
||||
|
||||
static void
|
||||
c_api_log_debug(const char *message)
|
||||
{
|
||||
@ -220,6 +226,7 @@ c_api_init(void)
|
||||
prof_send_line = c_api_send_line;
|
||||
prof_get_current_recipient = c_api_get_current_recipient;
|
||||
prof_get_current_muc = c_api_get_current_muc;
|
||||
prof_current_win_is_console = c_api_current_win_is_console;
|
||||
prof_log_debug = c_api_log_debug;
|
||||
prof_log_info = c_api_log_info;
|
||||
prof_log_warning = c_api_log_warning;
|
||||
|
@ -56,6 +56,7 @@ void (*prof_send_line)(char *line) = NULL;
|
||||
|
||||
char* (*prof_get_current_recipient)(void) = NULL;
|
||||
char* (*prof_get_current_muc)(void) = NULL;
|
||||
int (*prof_current_win_is_console)(void) = NULL;
|
||||
|
||||
void (*prof_log_debug)(const char *message) = NULL;
|
||||
void (*prof_log_info)(const char *message) = NULL;
|
||||
|
@ -56,6 +56,7 @@ void (*prof_send_line)(char *line);
|
||||
|
||||
char* (*prof_get_current_recipient)(void);
|
||||
char* (*prof_get_current_muc)(void);
|
||||
int (*prof_current_win_is_console)(void);
|
||||
|
||||
void (*prof_log_debug)(const char *message);
|
||||
void (*prof_log_info)(const char *message);
|
||||
|
Loading…
Reference in New Issue
Block a user