blob: d7a383281bf525ac974cc52245d861040e8382da [file] [log] [blame]
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.ui.activity;
/// DiscreteActivity is an activity which occurs at a point in time.
xunion DiscreteActivity {
/// Activities that require no special handling.
GenericActivity generic;
/// An activity originating from opening or closing the lid of a
/// clamshell-format device.
LidActivity lid;
};
/// OngoingActivity is an activity which has a definite start and end time.
xunion OngoingActivity {
/// Activities that require no special handling.
GenericActivity generic;
};
/// GenericActivity is a user or system activity of unspecified type, e.g.
/// a keyboard press or an alarm going off.
table GenericActivity {
/// Brief human-readable label for the activity, for logging/debugging.
/// e.g. "cursor", "key", "video"
1: string label;
};
/// LidActivity is an event originating from a change in the state of the lid
/// of a clamshell-like device.
table LidActivity {
1: LidState state;
};
/// LidState is an enumeration of states that a clamshell-like device's lid may
/// be in.
enum LidState {
UNKNOWN = 0;
OPEN = 1;
CLOSED = 2;
FLIPPED = 3;
};