The module interface_module
The interface package as a module (the test of the claim "the functions are written so the package can become a module later with the same calls"). Each export calls one function of src/library/modus/interface over two tables in memory of the caller: the draw table (Table of Draw_Record, Append) and the text table (Bytes, Append). The module holds no state of the process: a frame of the package is made over the two tables for the time of one call.
What it is for. It checks a claim of the interface package by doing it: the same functions, called through the call form, give the same draw records as a call of the package in the process. The process interface_through_module loads it, draws its window through it, and compares the records and the time of each way.
The rule of the results of each export that appends: the result is the count of draw records of the whole answer. A result larger than the capacity of the table says that the answer did not fit, and the caller gives a larger table. The result is -1 with an error record for a table over 2^40 records or bytes, or for one element over 64 records or 4096 bytes of text.
What it does not hold: the damage of a frame and the draw of its records into pixels. They are the two exports of the drawing module (src/modules/libraries/drawing), which each module with a window imports. This module keeps the elements only: it shows what one element call through a border costs, and why the elements stay compiled into each module.
interface_module module with no entry
- Hash
7466d57a456348fc7e014e874c29c71a296ff96968ae4cbf6b13bcbe707f4a8c- Size
69632 bytes- Exports
6- Imports
0- Imported by
1- License
- MIT
The interface package as a module (the test of the claim "the functions are written so the package can become a module later with the same calls")
| Fact | Value |
|---|---|
| Kind | Modules with no entry |
| Source | src/modules/libraries/interface_module |
| Boot image | yes: in the boot image, 69632 bytes in this build |
| Build settings | none: the defaults of the source |
| Imports | none |
| Imported by |
Neighbours
What it imports, at its left, and what imports it, at its right: the part of the module graph that touches it.
Exports
draw_background
draw_background(drawn: (, Append), area: ) ->
draw_background appends the background of the rules on an area: one color and the grid of points. The result is the count of draw records of the full answer (larger than the capacity: it did not fit), or -1 with an error record: Too_Long for a table over 2^40 records or bytes, Full for an element over 64 records or 4096 bytes of text, Out_Of_Range for a text table past 2^32 bytes.
drawn: (, Append)area:
- When it fails
- a negative result, and the error record
src/modules/libraries/interface_module/interface_module.odin:262
draw_card
draw_card(drawn: (, Append), text: (Append), area: (, Change), title: , caption: , accent: ) ->
draw_card appends the frame of one subject: its border, its surface, its title in the accent and its caption. It writes the area of its content in the one row of area. The result is the count of draw records of the full answer (larger than the capacity: it did not fit), or -1 with an error record: Too_Long for a table over 2^40 records or bytes, Full for an element over 64 records or 4096 bytes of text, Out_Of_Range for a text table past 2^32 bytes.
drawn: (, Append)text: (Append)area: (, Change)title:caption:accent:
- When it fails
- a negative result, and the error record
src/modules/libraries/interface_module/interface_module.odin:273
draw_cell_text
draw_cell_text(drawn: (, Append), text: (Append), cell: , words: , color: , right: ) ->
draw_cell_text appends a text in a cell of a line, at the left, or at the right when right is not 0. The result is the count of draw records of the full answer (larger than the capacity: it did not fit), or -1 with an error record: Too_Long for a table over 2^40 records or bytes, Full for an element over 64 records or 4096 bytes of text, Out_Of_Range for a text table past 2^32 bytes.
drawn: (, Append)text: (Append)cell:words:color:right:
- When it fails
- a negative result, and the error record
src/modules/libraries/interface_module/interface_module.odin:288
draw_label_value_line
draw_label_value_line(drawn: (, Append), text: (Append), line: , label: , value: ) ->
draw_label_value_line appends a name in the dim color and its value. The result is the count of draw records of the full answer (larger than the capacity: it did not fit), or -1 with an error record: Too_Long for a table over 2^40 records or bytes, Full for an element over 64 records or 4096 bytes of text, Out_Of_Range for a text table past 2^32 bytes.
drawn: (, Append)text: (Append)line:label:value:
- When it fails
- a negative result, and the error record
src/modules/libraries/interface_module/interface_module.odin:299
draw_table_band
draw_table_band(drawn: (, Append), area: , index: ) ->
draw_table_band appends the band under line index of a table: every second line has the surface of a card. The result is the count of draw records of the full answer (larger than the capacity: it did not fit), or -1 with an error record: Too_Long for a table over 2^40 records or bytes, Full for an element over 64 records or 4096 bytes of text, Out_Of_Range for a text table past 2^32 bytes.
drawn: (, Append)area:index:
- When it fails
- a negative result, and the error record
src/modules/libraries/interface_module/interface_module.odin:310
draw_bar
draw_bar(drawn: (, Append), bar: ) ->
draw_bar appends a value against a maximum: the track and the full part. The result is the count of draw records of the full answer (larger than the capacity: it did not fit), or -1 with an error record: Too_Long for a table over 2^40 records or bytes, Full for an element over 64 records or 4096 bytes of text, Out_Of_Range for a text table past 2^32 bytes.
drawn: (, Append)bar:
- When it fails
- a negative result, and the error record
src/modules/libraries/interface_module/interface_module.odin:321
Read from the source of the module, as the build reads it to describe the exports (tools/modustool/build/describe.odin).
Table wire form
A wire form of the module contract: one word of a call. Records of one description that follow each other (a table).
Draw_Record record of a module
A record of the module interface_module: 48 bytes, aligned on 4 bytes, 0 bytes of padding.
kindu801 bytesreservedText(3)13 byteselementu3244 byteslefti3284 bytestopi32124 bytesrighti32164 bytesbottomi32204 bytesfieldsText(24)2424 bytes
Area record of a module
A record of the module interface_module: 32 bytes, aligned on 8 bytes, 0 bytes of padding.
xi6408 bytesyi6488 byteswidthi64168 bytesheighti64248 bytes
Integer wire form
A wire form of the module contract: one word of a call. A signed integer of 64 bits, in a register.
Error_Record record of a module
A record of the module interface_module: 56 bytes, aligned on 8 bytes, 0 bytes of padding.
kindi6408 bytesuniti6488 bytesoperationi64168 bytesargumenti64248 bytesvaluei64328 byteslimiti64408 bytesfoundi64488 bytes
Bytes wire form
A wire form of the module contract: one word of a call. Bytes with no description.
Text wire form
A wire form of the module contract: one word of a call. The address of a slice record {address, count} of UTF-8 bytes.
Label_Value record of a module
A record of the module interface_module: 48 bytes, aligned on 8 bytes, 0 bytes of padding.
xi6408 bytesyi6488 byteswidthi64168 bytesheighti64248 bytesvalue_xi64328 bytescolori64408 bytes
Bar_Value record of a module
A record of the module interface_module: 56 bytes, aligned on 8 bytes, 0 bytes of padding.
xi6408 bytesyi6488 byteswidthi64168 bytesheighti64248 bytesvaluei64328 bytesmaximumi64408 bytescolori64488 bytes
