hc-skins.c 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. /*
  2. Skins engine.
  3. Set of hardcoded skins
  4. Copyright (C) 2009 The Free Software Foundation, Inc.
  5. Written by:
  6. Slava Zanko <slavazanko@gmail.com>, 2009.
  7. This file is part of the Midnight Commander.
  8. The Midnight Commander is free software; you can redistribute it
  9. and/or modify it under the terms of the GNU General Public License as
  10. published by the Free Software Foundation; either version 2 of the
  11. License, or (at your option) any later version.
  12. The Midnight Commander is distributed in the hope that it will be
  13. useful, but WITHOUT ANY WARRANTY; without even the implied warranty
  14. of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. General Public License for more details.
  16. You should have received a copy of the GNU General Public License
  17. along with this program; if not, write to the Free Software
  18. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  19. MA 02110-1301, USA.
  20. */
  21. #include <config.h>
  22. #include "internal.h"
  23. /*** global variables ****************************************************************************/
  24. /*** file scope macro definitions ****************************************************************/
  25. #define set_lines(x,y) mc_config_set_string(mc_skin->config, "Lines", x, y)
  26. /*** file scope type declarations ****************************************************************/
  27. /*** file scope variables ************************************************************************/
  28. /*** file scope functions ************************************************************************/
  29. /* --------------------------------------------------------------------------------------------- */
  30. /* --------------------------------------------------------------------------------------------- */
  31. /*** public functions ****************************************************************************/
  32. /* --------------------------------------------------------------------------------------------- */
  33. void
  34. mc_skin_hardcoded_blackwhite_colors (mc_skin_t * mc_skin)
  35. {
  36. mc_config_set_string (mc_skin->config, "core", "_default_", "default;default");
  37. mc_config_set_string (mc_skin->config, "core", "selected", "A_REVERSE");
  38. mc_config_set_string (mc_skin->config, "core", "marked", "A_BOLD");
  39. mc_config_set_string (mc_skin->config, "core", "markselect", "A_BOLD_REVERSE");
  40. mc_config_set_string (mc_skin->config, "core", "reverse", "A_REVERSE");
  41. mc_config_set_string (mc_skin->config, "dialog", "_default_", "A_REVERSE");
  42. mc_config_set_string (mc_skin->config, "dialog", "dfocus", "A_BOLD");
  43. mc_config_set_string (mc_skin->config, "dialog", "dhotnormal", "A_UNDERLINE");
  44. mc_config_set_string (mc_skin->config, "dialog", "dhotfocus", "A_UNDERLINE");
  45. mc_config_set_string (mc_skin->config, "error", "_default_", "A_BOLD");
  46. mc_config_set_string (mc_skin->config, "menu", "_default_", "A_REVERSE");
  47. mc_config_set_string (mc_skin->config, "menu", "menuhot", "A_BOLD");
  48. mc_config_set_string (mc_skin->config, "menu", "menusel", "default");
  49. mc_config_set_string (mc_skin->config, "menu", "menuhotsel", "A_UNDERLINE");
  50. mc_config_set_string (mc_skin->config, "menu", "menuinactive", "A_REVERSE");
  51. mc_config_set_string (mc_skin->config, "help", "_default_", "A_REVERSE");
  52. mc_config_set_string (mc_skin->config, "help", "helpitalic", "A_REVERSE");
  53. mc_config_set_string (mc_skin->config, "help", "helpbold", "A_REVERSE");
  54. mc_config_set_string (mc_skin->config, "help", "helpslink", "A_BOLD");
  55. mc_config_set_string (mc_skin->config, "viewer", "viewunderline", "A_UNDERLINE");
  56. mc_config_set_string (mc_skin->config, "editor", "editbold", "A_BOLD");
  57. mc_config_set_string (mc_skin->config, "editor", "editmarked", "A_REVERSE");
  58. mc_config_set_string (mc_skin->config, "buttonbar", "hotkey", "default");
  59. mc_config_set_string (mc_skin->config, "buttonbar", "button", "A_REVERSE");
  60. }
  61. /* --------------------------------------------------------------------------------------------- */
  62. void
  63. mc_skin_hardcoded_space_lines (mc_skin_t * mc_skin)
  64. {
  65. /* single lines */
  66. set_lines ("vert", " ");
  67. set_lines ("horiz", " ");
  68. set_lines ("lefttop", " ");
  69. set_lines ("righttop", " ");
  70. set_lines ("leftbottom", " ");
  71. set_lines ("rightbottom", " ");
  72. set_lines ("topmiddle", " ");
  73. set_lines ("bottommiddle", " ");
  74. set_lines ("leftmiddle", " ");
  75. set_lines ("rightmiddle", " ");
  76. set_lines ("cross", " ");
  77. set_lines ("dvert", " ");
  78. set_lines ("dhoriz", " ");
  79. set_lines ("dlefttop", " ");
  80. set_lines ("drighttop", " ");
  81. set_lines ("dleftbottom", " ");
  82. set_lines ("drightbottom", " ");
  83. set_lines ("dtopmiddle", " ");
  84. set_lines ("dbottommiddle", " ");
  85. set_lines ("dleftmiddle", " ");
  86. set_lines ("drightmiddle", " ");
  87. }
  88. /* --------------------------------------------------------------------------------------------- */
  89. void
  90. mc_skin_hardcoded_ugly_lines (mc_skin_t * mc_skin)
  91. {
  92. /* single lines */
  93. set_lines ("vert", "|");
  94. set_lines ("horiz", "-");
  95. set_lines ("lefttop", "+");
  96. set_lines ("righttop", "+");
  97. set_lines ("leftbottom", "+");
  98. set_lines ("rightbottom", "+");
  99. set_lines ("topmiddle", "-");
  100. set_lines ("bottommiddle", "-");
  101. set_lines ("leftmiddle", "|");
  102. set_lines ("rightmiddle", "|");
  103. set_lines ("cross", "+");
  104. /* double lines */
  105. set_lines ("dvert", "|");
  106. set_lines ("dhoriz", "-");
  107. set_lines ("dlefttop", "+");
  108. set_lines ("drighttop", "+");
  109. set_lines ("dleftbottom", "+");
  110. set_lines ("drightbottom", "+");
  111. set_lines ("dtopmiddle", "-");
  112. set_lines ("dbottommiddle", "-");
  113. set_lines ("dleftmiddle", "|");
  114. set_lines ("drightmiddle", "|");
  115. }
  116. /* --------------------------------------------------------------------------------------------- */