All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sandpolis.plugin.desktop.net.msg_rd.proto Maven / Gradle / Ivy

/*******************************************************************************
 *                                                                             *
 *                Copyright © 2015 - 2019 Subterranean Security                *
 *                                                                             *
 *  Licensed under the Apache License, Version 2.0 (the "License");            *
 *  you may not use this file except in compliance with the License.           *
 *  You may obtain a copy of the License at                                    *
 *                                                                             *
 *      http://www.apache.org/licenses/LICENSE-2.0                             *
 *                                                                             *
 *  Unless required by applicable law or agreed to in writing, software        *
 *  distributed under the License is distributed on an "AS IS" BASIS,          *
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   *
 *  See the License for the specific language governing permissions and        *
 *  limitations under the License.                                             *
 *                                                                             *
 ******************************************************************************/
syntax = "proto3";

package net;

option java_package = "com.sandpolis.plugin.desktop.net";

message RQ_DesktopStream {

    // The desired stream ID
    int32 id = 1;

    enum CaptureType {

        // Polls for screen updates
        POLL = 0;

        // A native hook into screen updates
        HOOK = 1;
    }

    enum ColorMode {

        // Each pixel encoded in three bytes
        RGB888 = 0;

        // Each pixel encoded in two bytes
        RGB565 = 1;

        // Each pixel encoded in one byte
        RGB332 = 2;
    }

    // The monitors to capture
    repeated string monitor = 2;

    // The capture type
    CaptureType capture_type = 3;

    // The color quality
    ColorMode color_mode = 4;
}

message DesktopEvent {
    int32 keyPressed = 1;
    int32 keyReleased = 2;
    int32 mousePressed = 3;
    int32 mouseReleased = 4;

    int32 mouseMovedX = 5;
    int32 mouseMovedY = 6;

    double scale_update = 7;
}

/**
 * An arbitrary rectangle update.
 */
message DirtyRect {

    // The coordinates of the rectangle's top left pixel
    int32 x = 1;
    int32 y = 2;

    // The width of the rectangle in pixels
    int32 w = 3;

    // The pixel data
    bytes data = 4;
}

/**
 * An arbitrary block update.
 */
message DirtyBlock {
    int32 block_id = 1;

    // The pixel data
    bytes data = 2;
}

message EV_DesktopStream {

    oneof data {
        DirtyRect dirty_rect = 2;
        DirtyBlock dirty_block = 3;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy