mssh-window.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 *table;
  20. GtkWidget *server_menu;
  21. GtkWidget *global_entry;
  22. GtkAccelGroup *accel;
  23. GArray *terminals;
  24. char **env;
  25. int columns;
  26. int columns_override;
  27. int timeout;
  28. gboolean close_ended_sessions;
  29. gboolean exit_on_all_closed;
  30. gint modifier;
  31. gint dir_focus;
  32. gint last_closed;
  33. } MSSHWindow;
  34. typedef struct
  35. {
  36. GtkWindowClass parent_class;
  37. } MSSHWindowClass;
  38. GType mssh_window_get_type(void) G_GNUC_CONST;
  39. GtkWidget* mssh_window_new(void);
  40. void mssh_window_start_session(MSSHWindow* window, char **env,
  41. GArray *hosts, long cols);
  42. void mssh_window_relayout(MSSHWindow *window);
  43. void mssh_window_session_closed(MSSHTerminal *terminal, gpointer data);
  44. gboolean mssh_window_focus(GtkWidget *widget, GObject *acceleratable,
  45. guint keyval, GdkModifierType modifier, gpointer data);
  46. G_END_DECLS
  47. #endif /* __MSSH_WINDOW_H__ */