variables.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /* variables.h -- Description of user visible variables in Info.
  2. $Id$
  3. Copyright 1993, 1997, 2004, 2007, 2011, 2013, 2014, 2015,
  4. 2016, 2017 Free Software Foundation, Inc.
  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. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. Originally written by Brian Fox. */
  16. #ifndef INFO_VARIABLES_H
  17. #define INFO_VARIABLES_H
  18. #include "window.h"
  19. #include "info-utils.h"
  20. /* A variable (in the Info sense) is an integer value with a user-visible
  21. name. You may supply an array of strings to complete over when the
  22. variable is set; in that case, the variable is set to the index of the
  23. string that the user chose. If you supply a null list, the user can
  24. set the variable to a numeric value. */
  25. /* Structure describing a user visible variable. */
  26. typedef struct {
  27. char *name; /* Polite name. */
  28. char *doc; /* Documentation string. */
  29. void *value; /* Address of value. */
  30. char **choices; /* Array of strings or NULL if numeric only. */
  31. int where_set; /* Where this variable was set. */
  32. } VARIABLE_ALIST;
  33. /* Values for VARIABLE_ALIST.where_set, in order of increasing priority. */
  34. #define SET_BY_DEFAULT 0
  35. #define SET_IN_CONFIG_FILE 1
  36. #define SET_ON_COMMAND_LINE 2
  37. #define SET_IN_SESSION 4
  38. VARIABLE_ALIST *variable_by_name (char *name);
  39. /* Make an array of REFERENCE which actually contains the names of the
  40. variables available in Info. */
  41. REFERENCE **make_variable_completions_array (void);
  42. /* Set the value of an info variable. */
  43. void set_variable (WINDOW *window, int count);
  44. int set_variable_to_value (VARIABLE_ALIST *var, char *value, int where);
  45. void describe_variable (WINDOW *window, int count);
  46. /* The list of user-visible variables. */
  47. extern int auto_footnotes_p;
  48. extern int auto_tiling_p;
  49. extern int terminal_use_visible_bell_p;
  50. extern int info_error_rings_bell_p;
  51. extern int gc_compressed_files;
  52. extern int show_index_match;
  53. extern int info_scroll_behaviour;
  54. extern int window_scroll_step;
  55. extern int cursor_movement_scrolls_p;
  56. extern int ISO_Latin_p;
  57. extern int scroll_last_node;
  58. extern int min_search_length;
  59. extern int search_skip_screen_p;
  60. extern int infopath_no_defaults_p;
  61. extern int preprocess_nodes_p;
  62. extern int key_time;
  63. extern int mouse_protocol;
  64. extern int follow_strategy;
  65. extern int nodeline_print;
  66. typedef struct {
  67. unsigned long mask;
  68. unsigned long value;
  69. } RENDITION;
  70. extern RENDITION ref_rendition;
  71. extern RENDITION hl_ref_rendition;
  72. extern RENDITION match_rendition;
  73. #endif /* not INFO_VARIABLES_H */