aboutsummaryrefslogtreecommitdiff
path: root/docs/casiowin/monochromelib/screen.en.md
blob: 961f8dd3234e9b6013ebda2bf7472a1c84e2b428 (plain)
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
---
title: Screen interactions
---
As described in [the introduction](index), MonochromeLib uses the double
buffering technique, so that the number of interactions with the screen
(which are slow) is limited. So there are very few things you can actually do
with the screen in the MonochromeLib.

### Updating the screen
Once the VRAM is ready to be displayed (see [VRAM interactions](vram) for more
explanations), use the following function to update the screen using the VRAM:

{% highlight c linenos %}
void ML_display_vram(void);
{% endhighlight %}

### Clear the screen
If you want to clear the screen but not the VRAM, although it isn't
recommended, you can use the following function:

{% highlight c %}
void ML_clear_screen(void);
{% endhighlight %}

### Set and get the screen contrast
You can set the contrast using these two functions:

{% highlight c linenos %}
void ML_set_contrast(unsigned char contrast);
unsigned char ML_get_contrast(void);
{% endhighlight %}

The contrast is a value between `ML_CONTRAST_MIN` and `ML_CONTRAST_MAX`,
ideally `ML_CONTRAST_NORMAL`.