VisionBase.h 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. /*
  2. * The contents of this file are subject to the Mozilla Public
  3. * License Version 1.1 (the "License"); you may not use this file
  4. * except in compliance with the License. You may obtain a copy of
  5. * the License at http://www.mozilla.org/MPL/
  6. *
  7. * Software distributed under the License is distributed on an "AS
  8. * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  9. * implied. See the License for the specific language governing
  10. * rights and limitations under the License.
  11. *
  12. * The Original Code is Vision.
  13. *
  14. * The Initial Developer of the Original Code is The Vision Team.
  15. * Portions created by The Vision Team are
  16. * Copyright (C) 1999, 2000, 2001 The Vision Team. All Rights
  17. * Reserved.
  18. *
  19. * Contributor(s): Wade Majors <wade@ezri.org>
  20. * Rene Gollent
  21. * Todd Lair
  22. * Andrew Bazan
  23. */
  24. #ifndef _VISIONBASE_H_
  25. #define _VISIONBASE_H_
  26. #include "VisionMessages.h"
  27. #include "VisionStrings.h"
  28. /// base includes and defines ///
  29. #include <GraphicsDefs.h>
  30. #include <Debug.h>
  31. #include <String.h>
  32. // TODO: resort these so they make more sense -- will break settings compat though
  33. #define C_TEXT 0
  34. #define C_BACKGROUND 1
  35. #define C_URL 2
  36. #define C_SERVER 3
  37. #define C_NOTICE 4
  38. #define C_ACTION 5
  39. #define C_QUIT 6
  40. #define C_ERROR 7
  41. #define C_NICK 8
  42. #define C_MYNICK 9
  43. #define C_NICKDISPLAY 10
  44. #define C_JOIN 11
  45. #define C_KICK 12
  46. #define C_WHOIS 13
  47. #define C_NAMES 14
  48. #define C_OP 15
  49. #define C_HELPER 16
  50. #define C_VOICE 17
  51. #define C_NAMES_SELECTION 18
  52. #define C_NAMES_BACKGROUND 19
  53. #define C_CTCP_REQ 20
  54. #define C_CTCP_RPY 21
  55. #define C_IGNORE 22
  56. #define C_INPUT 23
  57. #define C_INPUT_BACKGROUND 24
  58. #define C_WINLIST_NORMAL 25
  59. #define C_WINLIST_NEWS 26
  60. #define C_WINLIST_NICK 27
  61. #define C_WINLIST_SELECTION 28
  62. #define C_WINLIST_PAGESIX 29
  63. #define C_WINLIST_BACKGROUND 30
  64. #define C_WALLOPS 31
  65. #define C_TIMESTAMP 32
  66. #define C_TIMESTAMP_BACKGROUND 33
  67. #define C_SELECTION 34
  68. // mirc color codes
  69. #define C_MIRC_WHITE 35
  70. #define C_MIRC_BLACK 36
  71. #define C_MIRC_BLUE 37
  72. #define C_MIRC_GREEN 38
  73. #define C_MIRC_RED 39
  74. #define C_MIRC_BROWN 40
  75. #define C_MIRC_PURPLE 41
  76. #define C_MIRC_ORANGE 42
  77. #define C_MIRC_YELLOW 43
  78. #define C_MIRC_LIME 44
  79. #define C_MIRC_TEAL 45
  80. #define C_MIRC_AQUA 46
  81. #define C_MIRC_LT_BLUE 47
  82. #define C_MIRC_PINK 48
  83. #define C_MIRC_GREY 49
  84. #define C_MIRC_SILVER 50
  85. #define C_NOTIFY_ON 51
  86. #define C_NOTIFY_OFF 52
  87. #define C_NOTIFYLIST_BACKGROUND 53
  88. #define C_NOTIFYLIST_SELECTION 54
  89. #define MAX_COLORS 55
  90. #define F_TEXT 0
  91. #define F_SERVER 1
  92. #define F_URL 2
  93. #define F_NAMES 3
  94. #define F_INPUT 4
  95. #define F_WINLIST 5
  96. #define F_LISTAGENT 6
  97. #define F_TIMESTAMP 7
  98. #define MAX_FONTS 8
  99. #define E_JOIN 0
  100. #define E_PART 1
  101. #define E_NICK 2
  102. #define E_QUIT 3
  103. #define E_KICK 4
  104. #define E_TOPIC 5
  105. #define E_SNOTICE 6
  106. #define E_UNOTICE 7
  107. #define E_NOTIFY_ON 8
  108. #define E_NOTIFY_OFF 9
  109. #define MAX_EVENTS 10
  110. #define CMD_QUIT 0
  111. #define CMD_KICK 1
  112. #define CMD_IGNORE 2
  113. #define CMD_UNIGNORE 3
  114. #define CMD_AWAY 4
  115. #define CMD_BACK 5
  116. #define CMD_UPTIME 6
  117. #define MAX_COMMANDS 7
  118. // tells the NamesView how to color the nicks
  119. #define STATUS_FOUNDER_BIT 0x0001
  120. #define STATUS_PROTECTED_BIT 0x0002
  121. #define STATUS_OP_BIT 0x0004
  122. #define STATUS_HELPER_BIT 0x0008
  123. #define STATUS_VOICE_BIT 0x0010
  124. #define STATUS_NORMAL_BIT 0x0020
  125. #define STATUS_IGNORE_BIT 0x0040
  126. // tells the WindowList how to color the WindowListItem
  127. #define WIN_NORMAL_BIT 0x0001
  128. #define WIN_PAGESIX_BIT 0x0010
  129. #define WIN_NEWS_BIT 0x0100
  130. #define WIN_NICK_BIT 0x1000
  131. // tells the WindowList how to format and sort the WindowListItem
  132. // (eg: WIN_CHANNEL_TYPE = indent 2 spaces)
  133. #define WIN_SERVER_TYPE 0x0001
  134. #define WIN_CHANNEL_TYPE 0x0010
  135. #define WIN_MESSAGE_TYPE 0x0100
  136. #define WIN_LIST_TYPE 0x0200
  137. /// IRCDS
  138. /// an effort to properly support conflicting numeric meanings
  139. const int IRCD_STANDARD = 1;
  140. const int IRCD_HYBRID = 2; // "hybrid"
  141. const int IRCD_ULTIMATE = 3; // "UltimateIRCd"
  142. const int IRCD_COMSTUD = 4; // "comstud"
  143. const int IRCD_UNDERNET = 5; // "u2."
  144. const int IRCD_BAHAMUT = 6; // "bahamut"
  145. const int IRCD_PTLINK = 7; // "PTlink"
  146. const int IRCD_CONFERENCEROOM = 8; // "CR"
  147. const int IRCD_NEWNET = 9; // "nn-"
  148. const int32 ID_SERVER = -47;
  149. const int32 ID_NOTCHILD = -1;
  150. const uint32 SERVER_PRIMARY = 0;
  151. const uint32 SERVER_SECONDARY = 1;
  152. const uint32 SERVER_DISABLED = 2;
  153. const int32 BIG_ENOUGH_FOR_A_REALLY_FAST_ETHERNET = 1024 * 16;
  154. // Sound event identifiers
  155. enum SoundEvent
  156. {
  157. seNickMentioned = 0,
  158. seSoundEventsNumber
  159. };
  160. extern const char *kSoundEventNames[];
  161. // network data structure:
  162. struct ServerData
  163. {
  164. char serverName[255];
  165. uint32 port;
  166. uint32 state;
  167. char password[255];
  168. };
  169. #endif