PageRenderTime 26ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/gnome-terminal-3.4.1.1/src/terminal-app.h

#
C Header | 161 lines | 95 code | 42 blank | 24 comment | 0 complexity | a95b8cb7041298fc7155ec22515fcfce MD5 | raw file
Possible License(s): GPL-3.0
  1. /*
  2. * Copyright Š 2001 Havoc Pennington
  3. * Copyright Š 2008 Christian Persch
  4. *
  5. * This library is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU Library General Public
  7. * License as published by the Free Software Foundation; either
  8. * version 3 of the License, or (at your option) any later version.
  9. *
  10. * This library 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 GNU
  13. * Library General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU Library General Public
  16. * License along with this library; if not, write to the
  17. * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  18. * Boston, MA 02111-1307, USA.
  19. */
  20. #ifndef TERMINAL_APP_H
  21. #define TERMINAL_APP_H
  22. #include <gtk/gtk.h>
  23. #include "terminal-encoding.h"
  24. #include "terminal-screen.h"
  25. #include "terminal-options.h"
  26. G_BEGIN_DECLS
  27. /* Terminal conf files */
  28. #define TERMINAL_CONFIG_VERSION (1) /* Bump this for any changes */
  29. #define TERMINAL_CONFIG_COMPAT_VERSION (1) /* Bump this for incompatible changes */
  30. #define TERMINAL_CONFIG_GROUP "GNOME Terminal Configuration"
  31. #define TERMINAL_CONFIG_PROP_VERSION "Version"
  32. #define TERMINAL_CONFIG_PROP_COMPAT_VERSION "CompatVersion"
  33. #define TERMINAL_CONFIG_PROP_WINDOWS "Windows"
  34. #define TERMINAL_CONFIG_WINDOW_PROP_ACTIVE_TAB "ActiveTerminal"
  35. #define TERMINAL_CONFIG_WINDOW_PROP_FULLSCREEN "Fullscreen"
  36. #define TERMINAL_CONFIG_WINDOW_PROP_GEOMETRY "Geometry"
  37. #define TERMINAL_CONFIG_WINDOW_PROP_MAXIMIZED "Maximized"
  38. #define TERMINAL_CONFIG_WINDOW_PROP_MENUBAR_VISIBLE "MenubarVisible"
  39. #define TERMINAL_CONFIG_WINDOW_PROP_ROLE "Role"
  40. #define TERMINAL_CONFIG_WINDOW_PROP_TABS "Terminals"
  41. #define TERMINAL_CONFIG_TERMINAL_PROP_HEIGHT "Height"
  42. #define TERMINAL_CONFIG_TERMINAL_PROP_COMMAND "Command"
  43. #define TERMINAL_CONFIG_TERMINAL_PROP_PROFILE_ID "ProfileID"
  44. #define TERMINAL_CONFIG_TERMINAL_PROP_TITLE "Title"
  45. #define TERMINAL_CONFIG_TERMINAL_PROP_WIDTH "Width"
  46. #define TERMINAL_CONFIG_TERMINAL_PROP_WORKING_DIRECTORY "WorkingDirectory"
  47. #define TERMINAL_CONFIG_TERMINAL_PROP_ZOOM "Zoom"
  48. /* Configuration */
  49. #define CONF_PREFIX "/apps/gnome-terminal"
  50. #define CONF_GLOBAL_PREFIX CONF_PREFIX "/global"
  51. #define CONF_PROFILES_PREFIX CONF_PREFIX "/profiles"
  52. #define CONF_KEYS_PREFIX CONF_PREFIX "/keybindings"
  53. #define GNOME_TERMINAL_ICON_NAME "utilities-terminal"
  54. #define TERMINAL_APP_DEFAULT_PROFILE "default-profile"
  55. #define TERMINAL_APP_ENABLE_MENU_BAR_ACCEL "enable-menu-accels"
  56. #define TERMINAL_APP_ENABLE_MNEMONICS "enable-mnemonics"
  57. #define TERMINAL_APP_SYSTEM_FONT "system-font"
  58. /* TerminalApp */
  59. #define TERMINAL_TYPE_APP (terminal_app_get_type ())
  60. #define TERMINAL_APP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), TERMINAL_TYPE_APP, TerminalApp))
  61. #define TERMINAL_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TERMINAL_TYPE_APP, TerminalAppClass))
  62. #define TERMINAL_IS_APP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), TERMINAL_TYPE_APP))
  63. #define TERMINAL_IS_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TERMINAL_TYPE_APP))
  64. #define TERMINAL_APP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TERMINAL_TYPE_APP, TerminalAppClass))
  65. typedef struct _TerminalAppClass TerminalAppClass;
  66. typedef struct _TerminalApp TerminalApp;
  67. GType terminal_app_get_type (void);
  68. TerminalApp* terminal_app_get (void);
  69. void terminal_app_shutdown (void);
  70. gboolean terminal_app_handle_options (TerminalApp *app,
  71. TerminalOptions *options,
  72. gboolean allow_resume,
  73. GError **error);
  74. void terminal_app_edit_profile (TerminalApp *app,
  75. TerminalProfile *profile,
  76. GtkWindow *transient_parent,
  77. const char *widget_name);
  78. void terminal_app_new_profile (TerminalApp *app,
  79. TerminalProfile *default_base_profile,
  80. GtkWindow *transient_parent);
  81. TerminalWindow * terminal_app_new_window (TerminalApp *app,
  82. GdkScreen *screen);
  83. TerminalScreen *terminal_app_new_terminal (TerminalApp *app,
  84. TerminalWindow *window,
  85. TerminalProfile *profile,
  86. char **override_command,
  87. const char *title,
  88. const char *working_dir,
  89. char **child_env,
  90. double zoom);
  91. TerminalWindow *terminal_app_get_current_window (TerminalApp *app);
  92. void terminal_app_manage_profiles (TerminalApp *app,
  93. GtkWindow *transient_parent);
  94. void terminal_app_edit_keybindings (TerminalApp *app,
  95. GtkWindow *transient_parent);
  96. void terminal_app_edit_encodings (TerminalApp *app,
  97. GtkWindow *transient_parent);
  98. GList* terminal_app_get_profile_list (TerminalApp *app);
  99. TerminalProfile* terminal_app_ensure_profile_fallback (TerminalApp *app);
  100. TerminalProfile* terminal_app_get_profile_by_name (TerminalApp *app,
  101. const char *name);
  102. TerminalProfile* terminal_app_get_profile_by_visible_name (TerminalApp *app,
  103. const char *name);
  104. /* may return NULL */
  105. TerminalProfile* terminal_app_get_default_profile (TerminalApp *app);
  106. /* never returns NULL if any profiles exist, one is always supposed to */
  107. TerminalProfile* terminal_app_get_profile_for_new_term (TerminalApp *app);
  108. TerminalEncoding *terminal_app_ensure_encoding (TerminalApp *app,
  109. const char *charset);
  110. GHashTable *terminal_app_get_encodings (TerminalApp *app);
  111. GSList* terminal_app_get_active_encodings (TerminalApp *app);
  112. void terminal_app_save_config (TerminalApp *app,
  113. GKeyFile *key_file);
  114. gboolean terminal_app_save_config_file (TerminalApp *app,
  115. const char *file_name,
  116. GError **error);
  117. GSettings *terminal_app_get_proxy_settings (TerminalApp *app);
  118. G_END_DECLS
  119. #endif /* !TERMINAL_APP_H */