miamore / development with miamore extended
Functions:
Section titled “Functions:”void test(char *string);This function is just a test to make sure that the library works properly.
calc_window_size
Section titled “calc_window_size”void calc_window_size(void);This function calculates the window width and height.
wait_for
Section titled “wait_for”void wait_for(seconds_t seconds);This function calculates sets a timer and pauses the program until set time is finished.
*input
Section titled “*input”int input(void);char *input_ex(void);These functions allow the developer to take user input from the user in the terminal. It is a small function and functionality may and will be limited.
clear*
Section titled “clear*”void clear(void); // clear window and keep cursor ar positionvoid clear_origin(void); // clear window and go to 1, 1These functions allow a developer to clear the terminal window, the difference between them however is clear() retains the cursor position while clearing the window however clear_origin() brings cursor back to its ‘origin’ at (1, 1).
Editors note: Functionality to set your own origin isn't included but will be available at in later updates
init_miamore
Section titled “init_miamore”#define init_miamore(...)This is the main init function for miamore if this isn’t included before using most functions at the top of your int main() or fn main() will not work.
manage_keys
Section titled “manage_keys”void manage_keys(keys_t keyboard);This function allows the developer to manage what the user can do with the keyboard, currently supporting disable and enable.
manage_cursor
Section titled “manage_cursor”// void(manage_cursor)(cursor_t cursor, position_t position);void manage_cursor(...);This function allows the developer to manage what is currently happening to the cursor, this includes move -> moving the cursor (which requires the position_t to be filled so the cursor can move), hide -> to hide the cursor from showing and show -> which shows the cursor.
draw_text
Section titled “draw_text”void draw_text(const char *text);This function allows the developer to draw text to the screen as normal printf may not properly work all the time and this is connected to our frame_buffer to it will draw just as fast as the rest of the window.
draw_shape
Section titled “draw_shape”// void draw_shape_opts(shape_t shape, ShapeOptions opts);#define draw_shape(s, ...)This function allows developers to draw shapes to the window, currently only supports rectangles rect but support for circles, triangles and other shapes will be coming to a later update.
draw_border
Section titled “draw_border”void draw_border_opts(BorderOptions opts);#define draw_border(...)This function allows the developer to draw a border around the edge of the window. It supports the text which acts as a title to the window and theme_t to set a theme the line should be drawn with.
void set_fg(colors_t);void set_bg(colors_t);This allows the developer to set a color_t -> color to the window. Either the set_fg -> foreground or the set_bg -> background. Both these functions and all the color functions have an internal function that checks the currently used terminal emulator or tty for truecolor support and if so uses truecolor instead of the default 8-bit color mode.
License
Section titled “License”This project is licensed under the GNU LESSER GENERAL PUBLIC LICENSEThe GNU Lesser General Public License is used in some Ametrine projects - see the LICENSE file for details or see the license on here