ChrisOS Research ProjectOperating systems · language systems · graphics · machine emulation
DOCUMENTATION ARCHIVEMAIN BRANCH
ChrisOS/Source reference: LIB/UI.CC

Source reference: LIB/UI.CC

Deterministic source record. The complete textual file is reproduced below; this page does not replace architectural interpretation in the authored chapters.

File identity

Field Value
Path LIB/UI.CC
Lines 17
Bytes 267
SHA-256 5b68d692282af5d55d990c7a71adf2119713a39cbb4418c3ccae71c8cb7889e6
ChrisOS revision da3df29cb397932c43d32373871fb9380e688ade

Detected syntactic dependencies

Line Include
— No preprocessor include detected.

Detected symbols

Line Symbol
1 ui_hit

Complete source

The following block is the complete textual file at the recorded revision. No lines are elided, abbreviated or paraphrased.

int ui_hit(int x, int y, int w, int h) {
  int mx;
  int my;
  mx = mouse_x() - win_ox();
  my = mouse_y() - win_oy();
  if (mx >= x) {
    if (mx < x + w) {
      if (my >= y) {
        if (my < y + h) {
          return 1;
        }
      }
    }
  }
  return 0;
}

Role of this record

The atlas guarantees file-by-file traceability. Responsibility, invariants, ownership, concurrency, security, performance and subsystem interactions belong in authored chapters and must cite this file when applicable.

Document record ID: source-5b68d692282af5d5 Reviewed source: da3df29cb397 Class: generated-source-reference