forked from adafruit/circuitpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdisplay_core.h
More file actions
53 lines (37 loc) · 2.06 KB
/
display_core.h
File metadata and controls
53 lines (37 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// This file is part of the CircuitPython project: https://circuitpython.org
//
// SPDX-FileCopyrightText: Copyright (c) 2019 Scott Shawcroft for Adafruit Industries
//
// SPDX-License-Identifier: MIT
#pragma once
#include "shared-bindings/displayio/__init__.h"
#include "shared-bindings/displayio/Group.h"
#include "shared-module/displayio/area.h"
#define NO_COMMAND 0x100
typedef struct {
displayio_group_t *current_group;
uint64_t last_refresh;
displayio_buffer_transform_t transform;
displayio_area_t area;
uint16_t width;
uint16_t height;
uint16_t rotation;
_displayio_colorspace_t colorspace;
bool full_refresh; // New group means we need to refresh the whole display.
bool refresh_in_progress;
} displayio_display_core_t;
void displayio_display_core_construct(displayio_display_core_t *self,
uint16_t width, uint16_t height, uint16_t rotation,
uint16_t color_depth, bool grayscale, bool pixels_in_byte_share_row, uint8_t bytes_per_cell, bool reverse_pixels_in_byte, bool reverse_bytes_in_word);
bool displayio_display_core_set_root_group(displayio_display_core_t *self, displayio_group_t *root_group);
uint16_t displayio_display_core_get_width(displayio_display_core_t *self);
uint16_t displayio_display_core_get_height(displayio_display_core_t *self);
void displayio_display_core_set_dither(displayio_display_core_t *self, bool dither);
bool displayio_display_core_get_dither(displayio_display_core_t *self);
void displayio_display_core_set_rotation(displayio_display_core_t *self, int rotation);
void release_display_core(displayio_display_core_t *self);
bool displayio_display_core_start_refresh(displayio_display_core_t *self);
void displayio_display_core_finish_refresh(displayio_display_core_t *self);
void displayio_display_core_collect_ptrs(displayio_display_core_t *self);
bool displayio_display_core_fill_area(displayio_display_core_t *self, displayio_area_t *area, uint32_t *mask, uint32_t *buffer);
bool displayio_display_core_clip_area(displayio_display_core_t *self, const displayio_area_t *area, displayio_area_t *clipped);