summaryrefslogtreecommitdiff
path: root/cli/hitomezashi_cli.h
diff options
context:
space:
mode:
authorArjun Satarkar <me@arjunsatarkar.net>2023-06-01 13:31:24 +0000
committerArjun Satarkar <me@arjunsatarkar.net>2023-06-01 13:33:56 +0000
commit3a2fef94230f35d948634ffef83660afdffa0bad (patch)
treee4fb261e6fcf6d0b4b3d4b688aa94757700f45ab /cli/hitomezashi_cli.h
parent316382d74ed4a705c43e2380e7af20a500c24fa9 (diff)
downloadhitomezashi-3a2fef94230f35d948634ffef83660afdffa0bad.tar
hitomezashi-3a2fef94230f35d948634ffef83660afdffa0bad.tar.gz
hitomezashi-3a2fef94230f35d948634ffef83660afdffa0bad.zip
Complete libhitomezashi, reset project
Diffstat (limited to 'cli/hitomezashi_cli.h')
-rw-r--r--cli/hitomezashi_cli.h43
1 files changed, 0 insertions, 43 deletions
diff --git a/cli/hitomezashi_cli.h b/cli/hitomezashi_cli.h
deleted file mode 100644
index bce0128..0000000
--- a/cli/hitomezashi_cli.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/** @file */
-#ifndef HITOMEZASHI_CLI_H
-#define HITOMEZASHI_CLI_H
-
-#include "SDL2/SDL.h"
-#include <stddef.h>
-
-/** Exit codes for main().
- */
-enum Hitomezashi_Cli_Exit_Code {
- /** The program completed successfully. */
- Hitomezashi_Cli_Exit_Code_Success = 0,
- /** The arguments were invalid or the program could not handle them. */
- Hitomezashi_Cli_Exit_Code_Err_Handle_Args = 1,
- /** Printing the help text failed. */
- Hitomezashi_Cli_Exit_Code_Err_Print_Help = 2,
- /** Initialising SDL failed. */
- Hitomezashi_Cli_Exit_Code_Err_Sdl_Init = 3,
- /** hitomezashi_state_init() from libhitomezashi failed. */
- Hitomezashi_Cli_Exit_Code_Err_State_Init = 4,
- /** Saving the SDL_Surface on which the pattern was drawn as an image failed.
- */
- Hitomezashi_Cli_Exit_Code_Err_Save_Image = 5,
-};
-
-/** Read and parse arguments, ensure they are valid, and give back the
- * information in usable form to the caller. Also calls hitomezashi_cli_help()
- * if -h is passed.
- * Note that *x_pattern and *y_pattern are dynamically allocated and should be
- * freed by the caller when no longer needed.
- */
-void hitomezashi_cli_handle_args(char **out_file_path, int *x_pattern_len,
- int *y_pattern_len, char **x_pattern,
- char **y_pattern, int *gap, int *thickness,
- Uint32 *fg_colour, Uint32 *bg_colour, int argc,
- char **argv);
-/** Print the help text and exit.
- * Exits with Hitomezashi_Cli_Exit_Code_Success (0) on success, and
- * Hitomezashi_Cli_Exit_Code_Print_Help (2) on failure.
- */
-void hitomezashi_cli_help(void);
-
-#endif // HITOMEZASHI_CLI_H