LANAPICallbacks.h 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /*
  2. ** Command & Conquer Generals Zero Hour(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. ////////////////////////////////////////////////////////////////////////////////
  19. // //
  20. // (c) 2001-2003 Electronic Arts Inc. //
  21. // //
  22. ////////////////////////////////////////////////////////////////////////////////
  23. ///////////////////////////////////////////////////////////////////////////////////////
  24. // FILE: LANAPICallbacks.h
  25. // Author: Chris Huybregts, October 2001
  26. // Description: LAN API Callbacks header
  27. ///////////////////////////////////////////////////////////////////////////////////////
  28. #pragma once
  29. #ifndef _LANAPI_CALLBACKS_H_
  30. #define _LANAPI_CALLBACKS_H_
  31. #include "Common/NameKeyGenerator.h"
  32. #include "GameClient/Shell.h"
  33. #include "GameClient/GadgetListBox.h"
  34. #include "GameClient/GadgetTextEntry.h"
  35. #include "GameNetwork/LANAPI.h"
  36. // LAN API Singleton ----------------------------------------------------------------------
  37. extern LANAPI *TheLAN;
  38. //external declarations of the Gadgets the callbacks can use
  39. // LanLobby
  40. extern NameKeyType listboxChatWindowID;
  41. extern GameWindow *listboxChatWindow;
  42. extern GameWindow *listboxPlayers;
  43. extern NameKeyType listboxGamesID;
  44. extern GameWindow *listboxGames;
  45. //LanGame Options screen
  46. extern NameKeyType listboxChatWindowLanGameID;
  47. extern GameWindow *listboxChatWindowLanGame;
  48. extern WindowLayout *mapSelectLayout;
  49. // ScoreScreen
  50. extern NameKeyType listboxChatWindowScoreScreenID;
  51. extern GameWindow *listboxChatWindowScoreScreen;
  52. //Colors used for the chat dialogs
  53. extern const Color playerColor;
  54. extern const Color gameColor;
  55. extern const Color gameInProgressColor;
  56. extern const Color chatNormalColor;
  57. extern const Color chatActionColor;
  58. extern const Color chatLocalNormalColor;
  59. extern const Color chatLocalActionColor;
  60. extern const Color chatSystemColor;
  61. extern const Color chatSystemColor;
  62. extern const Color acceptTrueColor;
  63. extern const Color acceptFalseColor;
  64. void lanUpdateSlotList( void );
  65. void updateGameOptions( void );
  66. //Enum is used for the utility function so other windows do not need
  67. //to know about controls on LanGameOptions window.
  68. enum PostToLanGameType{ SEND_GAME_OPTS = 0,
  69. MAP_BACK,
  70. POST_TO_LAN_GAME_TYPE_COUNT };
  71. //the utility function mentioned above
  72. void PostToLanGameOptions(PostToLanGameType post);
  73. #endif //_LANAPI_CALLBACKS_H_