about summary refs log tree commit diff stats
path: root/xxxtermicon16.png
blob: e3b5078041d108767c793bbece6979e3ae860215 (plain)
ofshex dumpascii
0000 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 00 10 00 00 00 10 08 02 00 00 00 90 91 68 .PNG........IHDR...............h
0020 36 00 00 00 01 73 52 47 42 00 ae ce 1c e9 00 00 00 09 70 48 59 73 00 00 0b 13 00 00 0b 13 01 00 6....sRGB.........pHYs..........
0040 9a 9c 18 00 00 00 07 74 49 4d 45 07 db 01 03 11 3b 18 a9 c2 7e 3b 00 00 02 04 49 44 41 54 28 cf .......tIME.....;...~;....IDAT(.
0060 95 92 bd 6b 14 51 14 c5 df 7d 6f e6 cd 68 66 d6 cd c6 b0 59 74 63 10 4d 1a 09 08 1b a3 08 16 49 ...k.Q...}o..hf....Ytc.M.......I
0080 0a 2d 04 0b fd 03 34 61 2b 1b 8b fc 01 b1 11 ec c5 3f 40 4b 41 45 04 1b 0b 15 8c 1f a0 41 0b c1 .-....4a+........?@KAE.......A..
00a0 80 4a 48 b2 31 d9 ac fb 35 99 8f 37 ef 1d 8b 0d 26 90 55 f0 34 17 ee 3d a7 b9 e7 47 00 d8 ff c8 .JH.1...5..7....&.U.4..=...G....
00c0 fa f7 19 00 c0 88 33 06 46 44 dd 03 00 88 08 40 ed 67 f3 ed a3 2f b6 25 a6 a6 4b 9d 0d 75 c6 5e ......3.FD.....@.g.../.%..K..u.^
00e0 77 7d a3 f1 fa c1 c7 d6 b7 35 ef c8 90 56 ca 71 ed a9 f2 29 21 38 63 6c 27 d0 b1 6e 2c 6f 7e 78 w}.......5...V.q...)!8cl'..n,o~x
0100 b6 d0 ac 21 5c 59 92 b9 7e 01 26 33 07 20 98 cd d8 e4 cc b8 db e3 ec 04 aa ab 9b ef 9e be 5f ff ...!\Y..~.&3.................._.
0120 d1 4c 2a ab 96 eb 09 69 39 d9 9c 49 53 d7 f3 a1 89 11 04 e7 93 e5 d3 04 a0 5e ad bf 7a 38 bf f2 .L*....i9..IS............^..z8..
0140 75 9d 33 42 14 a5 ad 80 b8 9d 39 3a 98 fe 6a 0a 5b da d2 b1 5d cf e8 54 58 bc 30 92 b7 3e cd 7f u.3B......9:..j.[...]..TX.0..>..
0160 7e 7e ef 85 b0 2d 21 1d 80 03 da f2 3d b7 af bf b1 b8 c8 92 d4 cd f6 c9 7c de 90 61 82 34 99 dc ~~...-!.....=...........|..a.4..
0180 a0 cb e3 a0 9d 24 a1 52 b1 4e a2 56 b5 a2 d3 58 ab 34 0d b7 54 14 db bd bd 76 d6 0f 2a 6b 5a a9 .....$.R.N.V...X.4..T....v..*kZ.
01a0 20 ac 9d b9 7c 62 a4 34 cc 4b 13 e3 ad da 72 9a 84 49 1a 11 67 00 25 1a cd a5 ef 99 a1 21 a3 94 ....|b.4.K....r..I..g.%......!..
01c0 01 b7 f2 07 b1 bf 7d 65 f6 e2 e1 63 87 00 10 80 85 97 6f 1e df 79 22 bd 7d dc 48 9e 86 36 73 49 ......}e...c......o..y".}.H..6sI
01e0 08 c7 cb 4a df 8f 75 50 3a 3f 3a 36 51 fa f3 77 0e 60 f4 ec 18 54 2d 09 22 ad e3 78 ab 65 7a 24 ...J..uP:?:6Q..w.`...T-."..x.ez$
0200 77 5c 38 dc c8 f6 a5 eb 17 76 bb 19 63 9c 88 b8 10 d7 6e dd 50 61 43 87 a1 70 3d 13 27 31 05 7e w\8......v..c.....n.PaC..p=.'1.~
0220 91 cf cc 4d 0f 14 07 ba b0 04 a0 38 7c 5c ba 89 8a 42 30 9d a0 59 be 39 5b 28 16 18 db e6 67 2f ...M.......8|\...B0..Y.9[(....g/
0240 5e 00 d0 6e 34 ae 9e 3c 77 ff f6 dd 38 8a 00 18 63 d0 4d db 4d 77 b8 d8 cd c8 df f8 fd 0d d7 20 ^..n4..<w...8...c.M.Mw..........
0260 33 81 44 c4 46 a4 00 00 00 00 49 45 4e 44 ae 42 60 82 3.D.F.....IEND.B`.
n137'>137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182
/*
 * ui.h
 *
 * Copyright (C) 2012 James Booth <boothj5@gmail.com>
 *
 * This file is part of Profanity.
 *
 * Profanity 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.
 *
 * Profanity 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 Profanity.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

#ifndef UI_H
#define UI_H

#include "config.h"

#include <glib.h>

#ifdef HAVE_NCURSES_H
#include <ncurses.h>
#endif
#ifdef HAVE_NCURSES_NCURSES_H
#include <ncurses/ncurses.h>
#endif

#include "jabber.h"

#define INP_WIN_MAX 1000
#define PAD_SIZE 1000

typedef enum {
    WIN_UNUSED,
    WIN_CONSOLE,
    WIN_CHAT,
    WIN_MUC,
    WIN_PRIVATE
} win_type_t;

struct prof_win {
    char from[100];
    WINDOW *win;
    win_type_t type;
    int y_pos;
    int paged;
    int unread;
    int history_shown;
};

// gui startup and shutdown, resize
void ui_init(void);
void ui_load_colours(void);
void ui_refresh(void);
void ui_close(void);
void ui_resize(const int ch, const char * const input,
    const int size);
void ui_show_typing(const char * const from);
void ui_idle(void);
void ui_show_incoming_msg(const char * const from, const char * const message,
    GTimeVal *tv_stamp, gboolean priv);
void ui_contact_online(const char * const from, const char * const show,
    const char * const status);
void ui_contact_offline(const char * const from, const char * const show,
    const char * const status);
void ui_disconnected(void);
void ui_handle_special_keys(const int * const ch);
void ui_switch_win(const int i);
gboolean ui_windows_full(void);
#ifdef HAVE_LIBXSS
unsigned long ui_get_desktop_idle(void);
#endif

// create windows
void create_title_bar(void);
void create_status_bar(void);
void create_input_window(void);

// title bar actions
void title_bar_refresh(void);
void title_bar_resize(void);
void title_bar_show(const char * const title);
void title_bar_title(void);
void title_bar_set_status(jabber_presence_t status);
void title_bar_set_recipient(char *from);
void title_bar_set_typing(gboolean is_typing);
void title_bar_draw(void);

// current window actions
void win_current_close(void);
int win_current_is_chat(void);
int win_current_is_groupchat(void);
int win_current_is_private(void);
char* win_current_get_recipient(void);
void win_current_show(const char * const msg, ...);
void win_current_bad_show(const char * const msg);
void win_current_page_off(void);

void win_show_error_msg(const char * const from, const char *err_msg);
void win_show_gone(const char * const from);
void win_show_system_msg(const char * const from, const char *message);
void win_show_outgoing_msg(const char * const from, const char * const to,
    const char * const message);
void win_new_chat_win(const char * const to);

void win_join_chat(const char * const room, const char * const nick);
void win_show_room_roster(const char * const room);
void win_show_room_history(const char * const room_jid, const char * const nick,
    GTimeVal tv_stamp, const char * const message);
void win_show_room_message(const char * const room_jid, const char * const nick,
    const char * const message);
void win_show_room_subject(const char * const room_jid,
    const char * const subject);
void win_show_room_broadcast(const char * const room_jid,
    const char * const message);
void win_show_room_member_offline(const char * const room, const char * const nick);
void win_show_room_member_online(const char * const room,
    const char * const nick, const char * const show, const char * const status);
void win_show_room_member_nick_change(const char * const room,
    const char * const old_nick, const char * const nick);
void win_show_room_nick_change(const char * const room, const char * const nick);
void win_show_room_member_presence(const char * const room,
    const char * const nick, const char * const show, const char * const status);

// console window actions
void cons_about(void);
void cons_help(void);
void cons_basic_help(void);
void cons_settings_help(void);
void cons_presence_help(void);
void cons_navigation_help(void);
void cons_prefs(void);
void cons_show_ui_prefs(void);
void cons_show_desktop_prefs(void);
void cons_show_chat_prefs(void);
void cons_show_log_prefs(void);
void cons_show_xmpp_prefs(void);
void cons_bad_command(const char * const cmd);
void cons_show(const char * const cmd, ...);
void cons_show_time(void);
void cons_show_word(const char * const word);
void cons_bad_show(const char * const cmd, ...);
void cons_highlight_show(const char * const cmd);
void cons_show_contacts(GSList * list);
void cons_check_version(gboolean not_available_msg);
void cons_show_wins(void);
void cons_show_status(const char * const contact);

// status bar actions
void status_bar_refresh(void);
void status_bar_resize(void);
void status_bar_clear(void);
void status_bar_clear_message(void);
void status_bar_get_password(void);
void status_bar_print_message(const char * const msg);
void status_bar_inactive(const int win);
void status_bar_active(const int win);
void status_bar_new(const int win);
void status_bar_update_time(void);

// input window actions
void inp_get_char(int *ch, char *input, int *size);
void inp_clear(void);
void inp_win_resize(const char * input, const int size);
void inp_put_back(void);
void inp_non_block(void);
void inp_block(void);
void inp_get_password(char *passwd);
void inp_replace_input(char *input, const char * const new_input, int *size);
int inp_get_next_char(void);

void notify_remind(void);
#endif