<commit_before>#User Interface (ui.js)

###Functions

`if_init_surface(name, info)` - Create a surface based on an agreed upon name for a `prototype` and pass it some `info`. Do not show the surface yet.  Returns a hash containing  a key called `sp` with a `surface pointer` and any named views will need to have the required keys as the view's name in the key and the value will be a pointer to that view.

`if_free_surface(sp)` - Destroy a surface with a `surface pointer`.

`if_detach_surface(sp)` - Remove a surface from it's current view

`if_attach_surface(sp, vp)` - A request to embed a surface (`sp`) into the top of a view located at `vp` provided during `if_init_surface`.

------

## Overview 

This driver controls the **semantics** of the visuals shown on screen.  There is no defined layouts, styles, or anything relating to rendering. There is however, a hierarchy description composed of two elements:

 1. **View** - A **view** holds your content.
 2. **Area** - Views can have blank **areas**s where other views can be placed.

## Analogy
Here is an *analougy* in HTML. **This is not the way it's actually defined, the code here is never actually used in flok, but something similar is**
```html
<!-- A login view -->
<div class='view' data-name='login'><commit_msg>Update ui.md<commit_after>#User Interface (ui.js)

###Functions

`if_init_view(name, info)` - Create a view based on an agreed upon name for a `prototype` and pass it some `info`. Do not show the view yet.  Returns a hash containing  a key called `sp` with a `view pointer` and any named views will need to have the required keys as the view's name in the key and the value will be a pointer to that view.

`if_free_surface(vp)` - Destroy a view with a `view pointer`.

`if_detach_surface(vp)` - Remove a view from it's current view

`if_attach_surface(vp, vp)` - A request to embed a view (`vp`) into the top of a view or spot located at `vp` provided during `if_init_surface`.

------

## Overview 

This driver controls the **semantics** of the visuals shown on screen.  There is no defined layouts, styles, or anything relating to rendering. There is however, a hierarchy description composed of two elements:

 1. **View** - A **view** holds your content.
 2. **Area** - Views can have blank **areas**s where other views can be placed.

## Analogy
Here is an *analougy* in HTML. **This is not the way it's actually defined, the code here is never actually used in flok, but something similar is**
```html
<!-- A login view -->
<div class='view' data-name='login'>
{'fraction_non_alphanumeric': 0.10066588327457893, 'fraction_numerical': 0.0015667841754798276, 'mean_word_length': 4.0574257425742575, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '903787', 'n_tokens_mistral': 748, 'n_tokens_neox': 719, 'n_words': 390}