コード例 #1
0
        /// <summary>
        /// <p>
        /// Set the destination size of the associated wl_surface. See
        /// wp_viewport for the description, and relation to the wl_buffer
        /// size.
        /// </p>
        /// <p>
        /// If width is -1 and height is -1, the destination size is unset
        /// instead. Any other pair of values for width and height that
        /// contains zero or negative values raises the bad_value protocol
        /// error.
        /// </p>
        /// <p>
        /// The crop and scale state is double-buffered state, and will be
        /// applied on the next wl_surface.commit.
        /// </p>
        /// </summary>
        /// <param name="width">surface width</param>
        /// <param name="height">surface height</param>
        public static void wp_viewport_set_destination(wp_viewport *pointer, int width, int height)
        {
            var args = stackalloc wl_argument[2];

            args[0] = width;
            args[1] = height;
            WaylandClient.wl_proxy_marshal_array((wl_proxy *)pointer, 2, args);
        }
コード例 #2
0
        /// <summary>
        /// <p>
        /// Set the source rectangle of the associated wl_surface. See
        /// wp_viewport for the description, and relation to the wl_buffer
        /// size.
        /// </p>
        /// <p>
        /// If all of x, y, width and height are -1.0, the source rectangle is
        /// unset instead. Any other set of values where width or height are zero
        /// or negative, or x or y are negative, raise the bad_value protocol
        /// error.
        /// </p>
        /// <p>
        /// The crop and scale state is double-buffered state, and will be
        /// applied on the next wl_surface.commit.
        /// </p>
        /// </summary>
        /// <param name="x">source rectangle x</param>
        /// <param name="y">source rectangle y</param>
        /// <param name="width">source rectangle width</param>
        /// <param name="height">source rectangle height</param>
        public static void wp_viewport_set_source(wp_viewport *pointer, wl_fixed x, wl_fixed y, wl_fixed width, wl_fixed height)
        {
            var args = stackalloc wl_argument[4];

            args[0] = x;
            args[1] = y;
            args[2] = width;
            args[3] = height;
            WaylandClient.wl_proxy_marshal_array((wl_proxy *)pointer, 1, args);
        }
コード例 #3
0
 public WpViewport(wp_viewport *ptr)
 {
     Pointer = ptr;
 }
コード例 #4
0
 /// <summary>
 /// <p>
 /// The associated wl_surface's crop and scale state is removed.
 /// The change is applied on the next wl_surface.commit.
 /// </p>
 /// </summary>
 public static void wp_viewport_destroy(wp_viewport *pointer)
 {
     WaylandClient.wl_proxy_marshal((wl_proxy *)pointer, 0);
 }