rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Loading...
Searching...
No Matches
files_int.h File Reference

FILES' private seam between files_screen.c, the state, the requests to the card's task and the screen's interface, files_draw.c, the drawing, and files_events.c, the touch events: the layout the three work on, the state and the functions one calls in another. Nothing outside shared/ui includes this header; the screen's interface is files_screen.h. More...

#include <stdbool.h>
#include <stdint.h>
#include "card_tree.h"
#include "files_screen.h"
#include "fm_req.h"
#include "fm_rules.h"
#include "fm_tree.h"
#include "gfx.h"
#include "touch_types.h"
#include "ui_layout.h"
#include "ui_text.h"
#include "ui_textkey.h"
#include "ui_widgets.h"

Go to the source code of this file.

Data Structures

struct  fs_state_t
 The screen's state. More...

Macros

#define SCREEN_W   UI_PANEL_W
#define SCREEN_H   UI_BODY_H
 The body's height, 540px: the router owns the band and hands this screen the body.
#define MAX_FBS   3
#define FS_FONT_LABEL   (&gfx_font_10x20)
 The faces: FS_FONT_LABEL (10 x 20) for names, sizes, buttons and INFO's rows; FS_FONT_FINE (8 x 16) for a row's kind line; FS_FONT_BODY (12 x 24) for the message line and the questions' sentences.
#define FS_FONT_FINE   (&gfx_font_8x16)
#define FS_FONT_BODY   (&gfx_font_12x24)
#define FS_L   UI_MARGIN
 The screen's columns: UI_MARGIN (8px) in from either edge.
#define FS_R   (SCREEN_W - UI_MARGIN)
#define FS_W   (FS_R - FS_L)
#define FS_PANE_W   500
 The two panes, 500px wide at x 8 and x 516, 8px apart.
#define FS_PANE_GAP   8
#define FS_PANE_X(i)
 Pane i's left edge: 8 or 516.
#define FS_HDR_Y   4
#define FS_HDR_H   UI_TAP_MIN
#define FS_PG_W   88
#define FS_UP_W   312
#define FS_UP(i)
 Pane i's UP.
#define FS_PREV(i)
 Pane i's PREV.
#define FS_NEXT(i)
 Pane i's NEXT.
#define FS_LIST_Y   60
#define FS_HEAD_H   30
#define FS_ROW_H   48
#define FS_ROWS   6
#define FS_LIST(i)
 Pane i's list panel: its heading and its rows.
#define FS_BAR_W   56
#define FS_BAR_MIN   32
#define FS_BAR(i)
 Pane i's scroll bar's track.
#define FS_ROW_IN   8
#define FS_ROW_W   (FS_PANE_W - FS_ROW_IN - 8 - FS_BAR_W - 8)
 A row's width: from the inset to 8px short of the bar.
#define FS_ICON   24
#define FS_SIZE_W   90
#define FS_MSG_Y   388
 The message line under the panes: two lines of the 12 x 24 face, 84 cells each, 24px apart, ending 4px above the footer.
#define FS_MSG_LH   24
#define FOOT_H   52
 The footer, body y 440 to 492, ending 4px above the router's alert band (y 496), in LOGS' order: RESCAN at the left, 140px for its German AKTUALISIEREN, then COPY, MOVE, RENAME, DELETE, NEW, INFO and OPEN at the right, 118px wide, 6px apart, 52px tall.
#define FOOT_Y   (SCREEN_H - UI_ALERT_H - 4 - FOOT_H)
#define FOOT_W   118
#define FOOT_W_FIRST   140
#define FOOT_GAP   6
#define FOOT_PAD   6
#define FOOT_N   8
#define FS_FOOT_X(i)
 Footer button i's left edge: x 8 for the first, then 146px on and 124px a button after it.
#define FS_FOOT(i)
 Footer button i: 0 RESCAN to 7 OPEN (fs_foot_t).
#define FS_BOX_Y   100
 The DELETE question and the progress box, in place of the panes and the footer: 700 x 280px, the buttons 300 x 56px at its foot, as LOGS' question.
#define FS_BOX_H   280
#define FS_BOX   gfx_rect_make(162, FS_BOX_Y, 700, FS_BOX_H)
 The box, 700 x 280px.
#define FS_Q_CANCEL   gfx_rect_make(186, 304, 300, 56)
#define FS_Q_DELETE   gfx_rect_make(538, 304, 300, 56)
#define FS_JOB_CANCEL   gfx_rect_make(362, 304, 300, 56)
 The progress box's CANCEL, in the middle of its foot.
#define FS_JOB_BAR   gfx_rect_make(186, 228, 652, 24)
 The progress box's bar.
#define FS_INFO_Y   20
 The INFO box: 800 x 420px, its rows in the 10 x 20 face at a pitch of FS_INFO_LH under the heading, the key in FS_INFO_KEY_W px, CLOSE 300 x 56px at its foot.
#define FS_INFO_H   420
#define FS_INFO_BOX   gfx_rect_make(112, FS_INFO_Y, 800, FS_INFO_H)
 The box, 800 x 420px.
#define FS_INFO_LH   32
#define FS_INFO_KEY_W   160
#define FS_INFO_CLOSE   gfx_rect_make(362, 364, 300, 56)
#define FS_NEW_W   300
 NEW's choice: a list of two rows of 56px (UI_CHOICE_ROW_H) over the panes, its right edge NEW's, its foot 8px above the footer.
#define FS_NEW_ROW_H   UI_CHOICE_ROW_H
#define FS_NEW_H   (2 * FS_NEW_ROW_H + 8)
#define FS_NEW_X   (FS_FOOT_X(FS_NEW) + FOOT_W - FS_NEW_W)
 Its left edge, x 468: NEW's right edge less its width.
#define FS_NEW_Y   (FOOT_Y - 8 - FS_NEW_H)
#define FS_NEW_LIST   gfx_rect_make(FS_NEW_X, FS_NEW_Y, FS_NEW_W, FS_NEW_H)
 The list.
#define FS_NEW_ROW(i)
 Its row i: 0 FOLDER, 1 TEXT FILE.
#define FS_TK_AREA   gfx_rect_make(FS_L, 4, FS_W, FOOT_Y + FOOT_H - 4)
 The keyboard for a name: over the body from y 4 to the footer's foot, 1008px wide; its keys end at UI_KEYS_FOOT.
#define FS_JOB_BOX_S   0.25f
 A single call's progress box waits this long, s: a rename that is done at once shows no box.
#define DRAG_SLOP   8
 A press that moves further than this, px, in x or in y, is not a tap; on a list, vertical travel past it is a scroll.
#define FS_MSG_MAX   192
 The message line's longest text, bytes with its NUL.
#define s   fs_s

Enumerations

enum  fs_foot_t {
  FS_RESCAN = 0 , FS_COPY , FS_MOVE , FS_RENAME ,
  FS_DELETE , FS_NEW , FS_INFO , FS_OPEN
}
 The footer's buttons, left to right: each one's number is its place in the footer.
enum  fs_name_for_t { FS_NAME_FOLDER = 0 , FS_NAME_FILE , FS_NAME_RENAME }
 What a name is typed for. More...
enum  fs_hit_t {
  FS_HIT_NONE = -1 , FS_HIT_UP = FOOT_N , FS_HIT_PREV = FOOT_N + 2 , FS_HIT_NEXT = FOOT_N + 4 ,
  FS_HIT_ROW = FOOT_N + 6 , FS_HIT_BAR , FS_HIT_Q_CANCEL , FS_HIT_Q_DELETE ,
  FS_HIT_INFO_CLOSE , FS_HIT_NEW_ROW , FS_HIT_JOB_CANCEL = FS_HIT_NEW_ROW + 2
}
 What a press came down on. More...
enum  fs_msg_kind_t { FS_MSG_NONE = 0 , FS_MSG_TEXT , FS_MSG_ERR }
 What the message line holds. More...

Functions

const fm_entry_t * fs_selected (void)
 The selected entry of the active pane.
bool fs_foot_live (fs_foot_t b, fm_err_t *why)
 Whether footer button b takes a press now, and why not.
bool fs_paged (int i)
 Whether a pane's folder holds more than its page.
void fs_foot (fs_foot_t b)
 Act on footer button b: a tap on it, live or dimmed.
void fs_turn (int i, fm_go_t go, bool up)
 Read another page of pane i, or the folder above it.
void fs_row_tap (int i, int row)
 A tap on row row of pane i: the pane active and the row selected; a tap on the selected row of the active pane opens it.
void fs_delete_doomed (void)
 The DELETE question's DELETE: the job that deletes it.
void fs_new_name (bool folder)
 NEW's choice: the keyboard for the new entry's name.
void fs_name_typed (const char *name)
 The keyboard closed with name: the job that makes or renames.
void fs_job_cancel (void)
 CANCEL on the progress box.
void fs_say (bool ok, ui_text_id_t id, const char *a, const char *b)
 The message line says id, with up to two names.
void fs_say_err (fm_err_t err, const char *name)
 The message line says why err, for name (fs_err_text()).
void fs_quiet (void)
 The message line says nothing.
const char * fs_message (char *buf, size_t n)
 The message line in the language showing.
void fs_err_text (fm_err_t err, const char *name, char *out, size_t n)
 The words of a refusal or a failure, for name.
void fs_bar_thumb (int i, int *y, int *h)
 The scroll bar's thumb of pane i.
int fs_bar_scroll_at (int i, int top)
 The scroll of pane i that puts the thumb's top nearest top.
void fs_clamp_scroll (int i)
 Pane i's scroll held to its rows.
void fs_render (gfx_canvas_t *c, int buffer_index)
 FILES drawn: the panes and the footer, or a box over them, and the keyboard on top.
const char * fs_kind_word (int kind)
 The words of entry kind kind.
void fs_event (const touch_event_t *e)
 One touch event, in the screen's coordinates.
void fs_cancel_press (void)
 Drop a press under way: the touch stream lost an event.

Variables

fs_state_t fs_s
 The screen's state, defined in files_screen.c.

Detailed Description

FILES' private seam between files_screen.c, the state, the requests to the card's task and the screen's interface, files_draw.c, the drawing, and files_events.c, the touch events: the layout the three work on, the state and the functions one calls in another. Nothing outside shared/ui includes this header; the screen's interface is files_screen.h.

Included last: its layout macros have short names (FS_ROW_H, FOOT_Y) and it names the state s, which no header included after it may meet. What one file calls or reads in another carries the prefix fs_.

SPDX-License-Identifier: MIT

Macro Definition Documentation

◆ FOOT_GAP

#define FOOT_GAP   6

Between two buttons.

◆ FOOT_H

#define FOOT_H   52

The footer, body y 440 to 492, ending 4px above the router's alert band (y 496), in LOGS' order: RESCAN at the left, 140px for its German AKTUALISIEREN, then COPY, MOVE, RENAME, DELETE, NEW, INFO and OPEN at the right, 118px wide, 6px apart, 52px tall.

fs_foot_t is the one place that orders them: a button's number is its place, so the drawing (FS_FOOT()) and the hit test take the same one.

◆ FOOT_N

#define FOOT_N   8

The buttons.

◆ FOOT_PAD

#define FOOT_PAD   6

Room kept at each side of a label.

◆ FOOT_W

#define FOOT_W   118

A button's width but RESCAN's.

◆ FOOT_W_FIRST

#define FOOT_W_FIRST   140

RESCAN's width, the first button.

◆ FOOT_Y

#define FOOT_Y   (SCREEN_H - UI_ALERT_H - 4 - FOOT_H)

y 440.

◆ FS_BAR

#define FS_BAR ( i)
Value:
gfx_rect_make(FS_PANE_X(i) + FS_PANE_W - 8 - FS_BAR_W, \
#define FS_ROW_H
Definition files_int.h:84
#define FS_BAR_W
Definition files_int.h:89
#define FS_HEAD_H
Definition files_int.h:83
#define FS_LIST_Y
Definition files_int.h:82
#define FS_ROWS
Definition files_int.h:85
#define FS_PANE_W
The two panes, 500px wide at x 8 and x 516, 8px apart.
Definition files_int.h:66
#define FS_PANE_X(i)
Pane i's left edge: 8 or 516.
Definition files_int.h:69

Pane i's scroll bar's track.

◆ FS_BAR_MIN

#define FS_BAR_MIN   32

Its thumb's least height.

◆ FS_BAR_W

#define FS_BAR_W   56

The scroll bar's width: 8.4mm.

◆ FS_BOX_H

#define FS_BOX_H   280

Its height.

◆ FS_BOX_Y

#define FS_BOX_Y   100

The DELETE question and the progress box, in place of the panes and the footer: 700 x 280px, the buttons 300 x 56px at its foot, as LOGS' question.

The box's top.

◆ FS_FONT_BODY

#define FS_FONT_BODY   (&gfx_font_12x24)

12 x 24: prose.

◆ FS_FONT_FINE

#define FS_FONT_FINE   (&gfx_font_8x16)

8 x 16: a row's kind line.

◆ FS_FOOT

#define FS_FOOT ( i)
Value:
gfx_rect_make(FS_FOOT_X(i), FOOT_Y, \
((i) == 0) ? FOOT_W_FIRST : FOOT_W, \
#define FS_FOOT_X(i)
Footer button i's left edge: x 8 for the first, then 146px on and 124px a button after it.
Definition files_int.h:126
#define FOOT_W_FIRST
Definition files_int.h:120
#define FOOT_W
Definition files_int.h:119
#define FOOT_Y
Definition files_int.h:118
#define FOOT_H
The footer, body y 440 to 492, ending 4px above the router's alert band (y 496), in LOGS' order: RESC...
Definition files_int.h:117

Footer button i: 0 RESCAN to 7 OPEN (fs_foot_t).

◆ FS_FOOT_X

#define FS_FOOT_X ( i)
Value:
(FS_L + (((i) == 0) ? 0 \
+ ((i) - 1) * (FOOT_W + FOOT_GAP)))
#define FS_L
The screen's columns: UI_MARGIN (8px) in from either edge.
Definition files_int.h:50
#define FOOT_GAP
Definition files_int.h:121

Footer button i's left edge: x 8 for the first, then 146px on and 124px a button after it.

◆ FS_HDR_H

#define FS_HDR_H   UI_TAP_MIN

Its height.

◆ FS_HDR_Y

#define FS_HDR_Y   4

The header row.

◆ FS_HEAD_H

#define FS_HEAD_H   30

Its heading.

◆ FS_ICON

#define FS_ICON   24

A row's icon box.

◆ FS_INFO_CLOSE

#define FS_INFO_CLOSE   gfx_rect_make(362, 364, 300, 56)

CLOSE.

◆ FS_INFO_H

#define FS_INFO_H   420

Its height.

◆ FS_INFO_KEY_W

#define FS_INFO_KEY_W   160

The key's column: 16 cells.

◆ FS_INFO_LH

#define FS_INFO_LH   32

A row's pitch.

◆ FS_INFO_Y

#define FS_INFO_Y   20

The INFO box: 800 x 420px, its rows in the 10 x 20 face at a pitch of FS_INFO_LH under the heading, the key in FS_INFO_KEY_W px, CLOSE 300 x 56px at its foot.

The box's top.

◆ FS_LIST

#define FS_LIST ( i)
Value:
gfx_rect_make(FS_PANE_X(i), FS_LIST_Y, FS_PANE_W, \

Pane i's list panel: its heading and its rows.

◆ FS_LIST_Y

#define FS_LIST_Y   60

The list's panel's top.

◆ FS_MSG_LH

#define FS_MSG_LH   24

A line's pitch.

◆ FS_NEW_H

#define FS_NEW_H   (2 * FS_NEW_ROW_H + 8)

Its height.

◆ FS_NEW_ROW

#define FS_NEW_ROW ( i)
Value:
gfx_rect_make(FS_NEW_X + 4, \
FS_NEW_Y + 4 + (i) * FS_NEW_ROW_H, \
#define FS_NEW_W
NEW's choice: a list of two rows of 56px (UI_CHOICE_ROW_H) over the panes, its right edge NEW's,...
Definition files_int.h:185
#define FS_NEW_Y
Definition files_int.h:190
#define FS_NEW_X
Its left edge, x 468: NEW's right edge less its width.
Definition files_int.h:189
#define FS_NEW_ROW_H
Definition files_int.h:186

Its row i: 0 FOLDER, 1 TEXT FILE.

◆ FS_NEW_ROW_H

#define FS_NEW_ROW_H   UI_CHOICE_ROW_H

A row, 56px.

◆ FS_NEW_W

#define FS_NEW_W   300

NEW's choice: a list of two rows of 56px (UI_CHOICE_ROW_H) over the panes, its right edge NEW's, its foot 8px above the footer.

Its width.

◆ FS_NEW_Y

#define FS_NEW_Y   (FOOT_Y - 8 - FS_NEW_H)

Its top.

◆ FS_NEXT

#define FS_NEXT ( i)
Value:
gfx_rect_make(FS_PANE_X(i) + FS_PANE_W - FS_PG_W, \
#define FS_HDR_Y
Definition files_int.h:70
#define FS_PG_W
Definition files_int.h:72
#define FS_HDR_H
Definition files_int.h:71

Pane i's NEXT.

◆ FS_PANE_GAP

#define FS_PANE_GAP   8

Between them.

◆ FS_PANE_W

#define FS_PANE_W   500

The two panes, 500px wide at x 8 and x 516, 8px apart.

A pane's header row, body y 4 to 52, holds UP: a button with the folder's path that goes up one folder, 312px wide; and while the folder holds more than one page, PREV and NEXT, 88 x 48px, at the pane's right end. The list's panel from y 60 holds FS_ROWS rows at a pitch of FS_ROW_H (48px, UI_TAP_MIN) under its 30px heading, the rows drawn 44px tall, and the scroll bar, FS_BAR_W (56px) wide, at its right edge.

◆ FS_PANE_X

#define FS_PANE_X ( i)
Value:
(FS_L + (i) * (FS_PANE_W + FS_PANE_GAP))
#define FS_PANE_GAP
Definition files_int.h:67

Pane i's left edge: 8 or 516.

◆ FS_PG_W

#define FS_PG_W   88

PREV's and NEXT's width.

◆ FS_PREV

#define FS_PREV ( i)
Value:
gfx_rect_make(FS_PANE_X(i) + FS_PANE_W - 2 * FS_PG_W - 4, \

Pane i's PREV.

◆ FS_Q_CANCEL

#define FS_Q_CANCEL   gfx_rect_make(186, 304, 300, 56)

CANCEL.

◆ FS_Q_DELETE

#define FS_Q_DELETE   gfx_rect_make(538, 304, 300, 56)

DELETE.

◆ FS_R

#define FS_R   (SCREEN_W - UI_MARGIN)

The right edge, x 1016.

◆ FS_ROW_H

#define FS_ROW_H   48

A row's pitch, UI_TAP_MIN.

◆ FS_ROW_IN

#define FS_ROW_IN   8

A row's inset from the panel's left.

◆ FS_ROWS

#define FS_ROWS   6

The rows a pane shows at once.

◆ FS_SIZE_W

#define FS_SIZE_W   90

A row's size box: 9 cells.

◆ FS_UP

#define FS_UP ( i)
Value:
gfx_rect_make(FS_PANE_X(i), FS_HDR_Y, FS_UP_W, FS_HDR_H)
#define FS_UP_W
Definition files_int.h:73

Pane i's UP.

◆ FS_UP_W

#define FS_UP_W   312

UP's width.

◆ FS_W

#define FS_W   (FS_R - FS_L)

The width between, 1008px.

◆ MAX_FBS

#define MAX_FBS   3

The framebuffers the panel turns over.

◆ s

#define s   fs_s

The state by its short name.

◆ SCREEN_W

#define SCREEN_W   UI_PANEL_W

The body's width, 1024px.

Enumeration Type Documentation

◆ fs_hit_t

enum fs_hit_t

What a press came down on.

Enumerator
FS_HIT_UP 

a pane's UP: + the pane

FS_HIT_PREV 

a pane's PREV: + the pane

FS_HIT_NEXT 

a pane's NEXT: + the pane

FS_HIT_ROW 

a row: press_pane, press_row

FS_HIT_BAR 

a scroll bar: bar_pane

FS_HIT_Q_CANCEL 

the DELETE question's CANCEL

FS_HIT_Q_DELETE 

and DELETE

FS_HIT_INFO_CLOSE 

INFO's CLOSE

FS_HIT_NEW_ROW 

NEW's choice: + the row

FS_HIT_JOB_CANCEL 

the progress box's CANCEL

◆ fs_msg_kind_t

What the message line holds.

Enumerator
FS_MSG_NONE 

nothing: the gate's sentence, if any

FS_MSG_TEXT 

a text of the table: msg_id

FS_MSG_ERR 

a refusal or a failure: msg_err

◆ fs_name_for_t

What a name is typed for.

Enumerator
FS_NAME_FOLDER 

NEW > FOLDER

FS_NAME_FILE 

NEW > TEXT FILE

FS_NAME_RENAME 

RENAME

Function Documentation

◆ fs_bar_scroll_at()

int fs_bar_scroll_at ( int i,
int top )

The scroll of pane i that puts the thumb's top nearest top.

Parameters
ithe pane
topthe thumb's top the finger asks for
Returns
the first row on screen

◆ fs_bar_thumb()

void fs_bar_thumb ( int i,
int * y,
int * h )

The scroll bar's thumb of pane i.

Parameters
ithe pane
ytakes its top
htakes its height

◆ fs_clamp_scroll()

void fs_clamp_scroll ( int i)

Pane i's scroll held to its rows.

Parameters
ithe pane

◆ fs_err_text()

void fs_err_text ( fm_err_t err,
const char * name,
char * out,
size_t n )

The words of a refusal or a failure, for name.

Parameters
errthe answer
namethe entry's name, for the formats that name it
outtakes the sentence
nbytes at out

◆ fs_event()

void fs_event ( const touch_event_t * e)

One touch event, in the screen's coordinates.

Parameters
ethe event

◆ fs_foot()

void fs_foot ( fs_foot_t b)

Act on footer button b: a tap on it, live or dimmed.

Parameters
bthe button

◆ fs_foot_live()

bool fs_foot_live ( fs_foot_t b,
fm_err_t * why )

Whether footer button b takes a press now, and why not.

Parameters
bthe button
whytakes the refusal, FM_OK when it takes one; may be NULL
Returns
true when it acts

◆ fs_kind_word()

const char * fs_kind_word ( int kind)

The words of entry kind kind.

Parameters
kindan fm_kind_t
Returns
the word

◆ fs_message()

const char * fs_message ( char * buf,
size_t n )

The message line in the language showing.

Parameters
buftakes the line
nbytes at buf, FS_MSG_MAX for the longest
Returns
buf, "" for no message; "" also for a NULL buf or a zero n

◆ fs_name_typed()

void fs_name_typed ( const char * name)

The keyboard closed with name: the job that makes or renames.

Parameters
namethe name typed

◆ fs_new_name()

void fs_new_name ( bool folder)

NEW's choice: the keyboard for the new entry's name.

Parameters
foldera folder, else an empty text file

◆ fs_paged()

bool fs_paged ( int i)

Whether a pane's folder holds more than its page.

Parameters
ithe pane
Returns
true when PREV and NEXT show

◆ fs_render()

void fs_render ( gfx_canvas_t * c,
int buffer_index )

FILES drawn: the panes and the footer, or a box over them, and the keyboard on top.

Parameters
cthe canvas
buffer_indexthe framebuffer, whose cache it follows

◆ fs_row_tap()

void fs_row_tap ( int i,
int row )

A tap on row row of pane i: the pane active and the row selected; a tap on the selected row of the active pane opens it.

Parameters
ithe pane
rowthe row's index on the page

◆ fs_say()

void fs_say ( bool ok,
ui_text_id_t id,
const char * a,
const char * b )

The message line says id, with up to two names.

The line keeps the ID and the names, and fs_message() words it in the language showing, so a change of SET_LANGUAGE rewords it.

Parameters
oka result, not a refusal
idthe text: FM_COPIED, FM_MOVED, LOG_DELETED and FM_MADE format a, FM_RENAMED a and b; any other is shown as it is
athe first name, or NULL
bthe second name, or NULL

◆ fs_say_err()

void fs_say_err ( fm_err_t err,
const char * name )

The message line says why err, for name (fs_err_text()).

Parameters
errthe answer
namethe entry's name, or NULL

◆ fs_selected()

const fm_entry_t * fs_selected ( void )

The selected entry of the active pane.

Returns
the entry, or NULL for none

◆ fs_turn()

void fs_turn ( int i,
fm_go_t go,
bool up )

Read another page of pane i, or the folder above it.

Parameters
ithe pane
gowhich page; FM_GO_FIRST with up for the folder above
upgo up one folder

Variable Documentation

◆ fs_s

fs_state_t fs_s
extern

The screen's state, defined in files_screen.c.

The screen's state; files_int.h names it s.

The screen's state, defined in files_screen.c.