mssh-window.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #ifndef __MSSH_WINDOW_H__
  2. #define __MSSH_WINDOW_H__
  3. #include <gtk/gtk.h>
  4. #include <vte/vte.h>
  5. #include "mssh-terminal.h"
  6. G_BEGIN_DECLS
  7. #define MSSH_TYPE_WINDOW mssh_window_get_type()
  8. #define MSSH_WINDOW(obj) G_TYPE_CHECK_INSTANCE_CAST(obj,\
  9. MSSH_TYPE_WINDOW, MSSHWindow)
  10. #define MSSH_WINDOW_CLASS(klass) G_TYPE_CHECK_CLASS_CAST(klass,\
  11. MSSH_WINDOW_TYPE, MSSHWindowClass)
  12. #define IS_MSSH_WINDOW(obj) G_TYPE_CHECK_INSTANCE_TYPE(obj,\
  13. MSSH_TYPE_WINDOW)
  14. #define IS_MSSH_WINDOW_CLASS(klass) G_TYPE_CHECK_CLASS_TYPE(klass,\
  15. MSSH_TYPE_WINDOW)
  16. typedef struct
  17. {
  18. GtkWindow widget;
  19. GtkWidget *grid;
  20. GtkWidget *server_menu;
  21. GtkWidget *command_menu;
  22. GtkWidget *global_entry;
  23. GtkAccelGroup *accel;
  24. GArray *terminals;
  25. char **env;
  26. int columns;
  27. int columns_override;
  28. int timeout;
  29. gboolean close_ended_sessions;
  30. gboolean exit_on_all_closed;
  31. gint modifier;
  32. gint dir_focus;
  33. gint last_closed;
  34. gint backscroll_buffer_size;
  35. GtkWidget *last_focus;
  36. int is_maximized;
  37. gboolean recolor_focused;
  38. GData **commands;
  39. } MSSHWindow;
  40. typedef struct
  41. {
  42. GtkWindowClass parent_class;
  43. } MSSHWindowClass;
  44. GType mssh_window_get_type(void) G_GNUC_CONST;
  45. GtkWidget* mssh_window_new(void);
  46. void mssh_window_start_session(MSSHWindow* window, char **env,
  47. GArray *hosts, long cols);
  48. void mssh_window_add_command(GQuark key_id, gpointer data, gpointer user_data);
  49. void mssh_window_relayout(MSSHWindow *window);
  50. void mssh_window_session_closed(MSSHTerminal *terminal, gpointer data);
  51. gboolean mssh_window_focus(GtkWidget *widget, GObject *acceleratable,
  52. guint keyval, GdkModifierType modifier, gpointer data);
  53. gboolean mssh_window_toggle_maximize(GtkWidget *widget, GObject *acceleratable,
  54. guint keyval, GdkModifierType modifier, gpointer data);
  55. G_END_DECLS
  56. #endif /* __MSSH_WINDOW_H__ */