// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Message definitions for text input messages.

syntax = "proto2";

option optimize_for = LITE_RUNTIME;

package blimp;

message ImeMessage {
  // Text input type for IME which should be kept in sync with
  // ui::TextInputType.
  enum InputType {
    NONE = 0;
    TEXT = 1;
    PASSWORD = 2;
    SEARCH = 3;
    EMAIL = 4;
    NUMBER = 5;
    TELEPHONE = 6;
    URL = 7;
    DATE = 8;
    DATE_TIME = 9;
    DATE_TIME_LOCAL = 10;
    MONTH = 11;
    TIME = 12;
    WEEK = 13;
    TEXT_AREA = 14;
    CONTENT_EDITABLE = 15;
    DATE_TIME_FIELD = 16;
  }

  enum Type {
    UNKNOWN = 0;

    // Server => Client types.
    SHOW_IME = 1;
    HIDE_IME = 2;

    // Client => Server types.
    SET_TEXT = 3;
  }

  optional int32 render_widget_id = 1;
  optional Type type = 2 [default = UNKNOWN];
  optional InputType text_input_type = 3;
  optional string ime_text = 4;
  optional bool auto_submit = 5;
}
