3.14) The shells.

type gr_shell =
  { sh_window : gr_window
  ; mutable sh_top : int
  ; mutable sh_left : int
  ; mutable sh_width : int
  ; mutable sh_height : int
  ; mutable sh_name : string vect
  ; mutable sh_cursor : int
  ; mutable sh_line : int
  ; mutable sh_1st_line : int
  ; mutable sh_1st_row : int
  ; mutable sh_state : string_state
  ; mutable sh_vscroll : int
  ; mutable sh_hscroll : int
  ; mutable sh_s_select : int * int
  ; mutable sh_e_select : int * int
  }
;;
The objects of type gr_shell are used to run simple commands from the operating system. The simple commands are those that don't need keyboard input during their execution. These objects look like the edit text objects, but, each time the user presses the Enter key, the command is executed and the result displayed. The 300 commands are stored. To recall a previous command, use the up and down keys.
The type gr_shell is composed of: As for text edit objects, the shell objects are full of variables used only for their management. So, a simpler type (tmp_shell) is provides as a function to translate from this simple format to type gr_shell.
type tmp_shell =
  { s_window : gr_window
  ; mutable s_top : int
  ; mutable s_left : int
  ; mutable s_width : int
  ; mutable s_height : int
  ; mutable s_state : string_state
  }
;;
gr_make_shell : tmp_shell -> gr_shell
gr_make_shell TmpShell builds an object of type gr_shell from the object TmpShell of type tmp_shell.
gr_draw_shell : gr_shell -> unit
gr_draw_shell Shell draws the shell Shell.
gr_shell_managed : gr_shell -> event -> bool
this is the function used by Camlwin to manage the shell objects.
gr_camlwin_env : string
stores the directory pointed to by the global variable CAMLWIN.