1 /* 2 * Copyright 2021 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package android.gui; 18 19 import android.gui.BitTube; 20 import android.gui.ParcelableVsyncEventData; 21 22 /** @hide */ 23 interface IDisplayEventConnection { 24 /* 25 * stealReceiveChannel() returns a BitTube to receive events from. Only the receive file 26 * descriptor of outChannel will be initialized, and this effectively "steals" the receive 27 * channel from the remote end (such that the remote end can only use its send channel). 28 */ stealReceiveChannel(out BitTube outChannel)29 void stealReceiveChannel(out BitTube outChannel); 30 31 /* 32 * setVsyncRate() sets the vsync event delivery rate. A value of 1 returns every vsync event. 33 * A value of 2 returns every other event, etc. A value of 0 returns no event unless 34 * requestNextVsync() has been called. 35 */ setVsyncRate(in int count)36 void setVsyncRate(in int count); 37 38 /* 39 * requestNextVsync() schedules the next vsync event. It has no effect if the vsync rate is > 0. 40 */ requestNextVsync()41 oneway void requestNextVsync(); // Asynchronous 42 43 /* 44 * getLatestVsyncEventData() gets the latest vsync event data. 45 */ getLatestVsyncEventData()46 ParcelableVsyncEventData getLatestVsyncEventData(); 47 } 48