mirror of
https://github.com/Cesarus85/ringfall-mjolnir-vr.git
synced 2026-10-29 04:01:10 +01:00
* misc changes and additions formatting changes and add structs/constants for terminal work * match write_to_error_file and add error_global_data * console work * requested changes * terminal work 100% match all terminal functions * Formatting --------- Co-authored-by: punpckhdq <121350336+punpckhdq@users.noreply.github.com>
43 lines
860 B
C
43 lines
860 B
C
/*
|
|
EDIT_TEXT.H
|
|
|
|
header included in hcex build.
|
|
*/
|
|
|
|
#ifndef __EDIT_TEXT_H
|
|
#define __EDIT_TEXT_H
|
|
#pragma once
|
|
|
|
/* ---------- constants */
|
|
|
|
/* ---------- macros */
|
|
|
|
#define valid_edit_text(edit) (edit) && (edit)->buffer && (edit)->maximum_length > 0 && strlen((edit)->buffer) <= (edit)->maximum_length
|
|
|
|
/* ---------- structures */
|
|
|
|
struct edit_text
|
|
{
|
|
char *buffer;
|
|
short maximum_length;
|
|
short insertion_point_index;
|
|
short selection_start_index;
|
|
};
|
|
|
|
|
|
/* ---------- prototypes/EDIT_TEXT.C */
|
|
|
|
void edit_text_handle_key(struct edit_text *edit, struct key_stroke const *key);
|
|
|
|
boolean edit_text_get_selection_indices(struct edit_text *edit, short *start_index, short *end_index);
|
|
|
|
void edit_text_new(struct edit_text *edit);
|
|
|
|
void edit_text_selection_reset(struct edit_text *edit);
|
|
|
|
/* ---------- globals */
|
|
|
|
/* ---------- public code */
|
|
|
|
#endif // __EDIT_TEXT_H
|