hexchat_api/
consts.rs

1#![allow(dead_code, non_camel_case_types)]
2
3/// Channel flags.
4pub enum ChanFlag {
5    CONNECTED           = 0x0001,
6    CONNECTING          = 0x0002,
7    MARKED_AWAY         = 0x0004,
8    END_OF_MOTD         = 0x0008,
9    HAS_WHOX            = 0x0010,
10    HAS_IDMSG           = 0x0020,
11    HIDE_JOIN           = 0x0040,
12    HIDE_JOIN_UNSET     = 0x0080,
13    BEEP_ON_MESSAGE     = 0x0100,
14    BLINK_TRAY          = 0x0200,
15    BLINK_TASKBAR       = 0x0400,
16    LOGGING             = 0x0800,
17    LOGGING_UNSET       = 0x1000,
18    SCROLLBACK          = 0x2000,
19    SCROLLBACK_UNSET    = 0x4000,
20    STRIP_COLORS        = 0x8000,
21    STRIP_COLORS_UNSET  =0x10000,
22}
23
24/// Channel types.
25pub enum ChanType {
26    SERVER                   = 1,
27    CHANNEL                  = 2,
28    DIALOG                   = 3,
29    NOTICE                   = 4,
30    SNOTICE                  = 5,
31}
32
33/// DCC status values.
34pub enum DccStatus {
35    QUEUED                  = 0,
36    ACTIVE                  = 1,
37    FAILED                  = 2,
38    DONE                    = 3,
39    CONNECTING              = 4,
40    ABORTED                 = 5,
41}
42
43/// DCC action type.
44pub enum DccType {
45    SEND                    = 0,
46    RECIEVE                 = 1,
47    CHATRECV                = 2,
48    CHATSEND                = 3,
49}
50
51// The table online has these "flags" listed as sequential ints.
52// I need to verify whether the online page is wrong, or my understanding
53// of what "flags" means wrt HexChat is wrong.
54
55pub enum IgnFlag {
56    PRIVATE              = 0x01,
57    NOTICE               = 0x02,
58    CHANNEL              = 0x04,
59    CTCP                 = 0x08,
60    INVITE               = 0x10,
61    UNIGNORE             = 0x20,
62    NOSAVE               = 0x40,
63    DCC                  = 0x80,
64}
65
66// IRC color codes. Use these in strings printed to he/xchat.
67pub const IRC_WHITE: &str            = "\x0300";
68pub const IRC_BLACK: &str            = "\x0301";
69pub const IRC_NAVY: &str             = "\x0302";
70pub const IRC_GREEN: &str            = "\x0303";
71pub const IRC_RED: &str              = "\x0304";
72pub const IRC_MAROON: &str           = "\x0305";
73pub const IRC_PURPLE: &str           = "\x0306";
74pub const IRC_OLIVE: &str            = "\x0307";
75pub const IRC_YELLOW: &str           = "\x0308";
76pub const IRC_LIGHT_GREEN: &str      = "\x0309";
77pub const IRC_TEAL: &str             = "\x0310";
78pub const IRC_CYAN: &str             = "\x0311";
79pub const IRC_ROYAL_BLUE: &str       = "\x0312";
80pub const IRC_MAGENTA: &str          = "\x0313";
81pub const IRC_GRAY: &str             = "\x0314";
82pub const IRC_LIGHT_GRAY: &str       = "\x0315";
83
84
85// IRC text format codes. Use these in strings printed to he/xchat.
86
87pub const IRC_BOLD: &str               = "\x02"; //"\002";
88pub const IRC_HIDDEN: &str             = "\x08"; //"\010";
89pub const IRC_UNDERLINE: &str          = "\x1F"; //"\037";
90pub const IRC_ORIG_ATTRIBS: &str       = "\x0F"; //"\017";
91pub const IRC_REVERSE_COLOR: &str      = "\x16"; //"\026";
92pub const IRC_BEEP: &str               = "\x07"; //"\007";
93pub const IRC_ITALICS: &str            = "\x1D"; //"\035";
94
95