libei/src/libei-region.h
Peter Hutterer 8973101313 ei: divide the headers up across multiple files
libei-private.h was getting unwieldly, so let's split this up so
(most) anything ei_foo goes into libei-foo.h.
2023-02-13 14:01:08 +10:00

50 lines
1.6 KiB
C

/* SPDX-License-Identifier: MIT */
/*
* Copyright © 2020 Red Hat, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#pragma once
#include "util-object.h"
#include "util-list.h"
struct ei_region {
struct object object;
void *user_data;
struct list link;
uint32_t x, y;
uint32_t width, height;
double physical_scale;
};
struct ei_region *
ei_region_new(void);
void
ei_region_set_size(struct ei_region *region, uint32_t w, uint32_t h);
void
ei_region_set_offset(struct ei_region *region, uint32_t x, uint32_t y);
void
ei_region_set_physical_scale(struct ei_region *region, double scale);