blob: 37715e961ffd7ebe952dd5fb6dc5be874968b965 [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 zx;
@transport("Syscall")
closed protocol Framebuffer {
/// ## Summary
///
/// TODO(https://fxbug.dev/42108078)
///
/// ## Declaration
///
/// ```c
/// #include <zircon/syscalls.h>
///
/// zx_status_t zx_framebuffer_get_info(zx_handle_t resource,
/// uint32_t* format,
/// uint32_t* width,
/// uint32_t* height,
/// uint32_t* stride);
/// ```
///
/// ## Description
///
/// TODO(https://fxbug.dev/42108078)
///
/// ## Rights
///
/// *resource* must have resource kind `ZX_RSRC_KIND_SYSTEM` and resource
/// base `ZX_RSRC_SYSTEM_FRAMEBUFFER_BASE`.
///
/// ## Return value
///
/// TODO(https://fxbug.dev/42108078)
///
/// ## Errors
///
/// TODO(https://fxbug.dev/42108078)
///
/// ## See also
///
/// TODO(https://fxbug.dev/42108078)
strict GetInfo(resource struct {
resource Handle:RESOURCE;
}) -> (struct {
format uint32;
width uint32;
height uint32;
stride uint32;
}) error Status;
// TODO(https://fxbug.dev/42107929): vmo ZX_OBJ_TYPE_VMO; No rights required?
/// ## Summary
///
/// TODO(https://fxbug.dev/42108078)
///
/// ## Declaration
///
/// ```c
/// #include <zircon/syscalls.h>
///
/// zx_status_t zx_framebuffer_set_range(zx_handle_t resource,
/// zx_handle_t vmo,
/// uint32_t len,
/// uint32_t format,
/// uint32_t width,
/// uint32_t height,
/// uint32_t stride);
/// ```
///
/// ## Description
///
/// TODO(https://fxbug.dev/42108078)
///
/// ## Rights
///
/// *resource* must have resource kind `ZX_RSRC_KIND_SYSTEM` and resource
/// base `ZX_RSRC_SYSTEM_FRAMEBUFFER_BASE`.
///
/// ## Return value
///
/// TODO(https://fxbug.dev/42108078)
///
/// ## Errors
///
/// TODO(https://fxbug.dev/42108078)
///
/// ## See also
///
/// TODO(https://fxbug.dev/42108078)
strict SetRange(resource struct {
resource Handle:RESOURCE;
vmo Handle:VMO;
len uint32;
format uint32;
width uint32;
height uint32;
stride uint32;
}) -> () error Status;
};