Prefix the JNI types from SquirrelJME with sjme_ so that they can easily be mixed...
[SquirrelJME.git] / nanocoat / include / sjme / boot.h
blobde08192cf4a9fa329c61b66cfb48106e56be9ecf
1 /* -*- Mode: C; indent-tabs-mode: t; tab-width: 4 -*-
2 // ---------------------------------------------------------------------------
3 // SquirrelJME
4 // Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
5 // ---------------------------------------------------------------------------
6 // SquirrelJME is under the Mozilla Public License Version 2.0.
7 // See license.mkd for licensing and copyright information.
8 // -------------------------------------------------------------------------*/
10 /**
11 * Virtual machine booting.
13 * @since 2023/07/29
16 #ifndef SQUIRRELJME_BOOT_H
17 #define SQUIRRELJME_BOOT_H
19 #include "sjme/nvm.h"
21 /* Anti-C++. */
22 #ifdef __cplusplus
23 #ifndef SJME_CXX_IS_EXTERNED
24 #define SJME_CXX_IS_EXTERNED
25 #define SJME_CXX_SQUIRRELJME_BOOT_H
26 extern "C" {
27 #endif /* #ifdef SJME_CXX_IS_EXTERNED */
28 #endif /* #ifdef __cplusplus */
30 /*--------------------------------------------------------------------------*/
32 /**
33 * Boots the virtual machine.
35 * @param config The configuration to use.
36 * @param outState The output state of the virtual machine.
37 * @param argc The number of arguments passed to the executable.
38 * @param argv The command line arguments passed to the executable.
39 * @return The booted virtual machine.
40 * @since 2023/07/27
42 sjme_jboolean sjme_nvm_boot(
43 sjme_attrInNotNull const sjme_nvm_bootConfig* config,
44 sjme_attrOutNotNull sjme_nvm_state** outState,
45 sjme_attrInValue int argc,
46 sjme_attrInNullable char** argv) sjme_attrCheckReturn;
48 /**
49 * Destroys the virtual machine.
51 * @param state The state to destroy.
52 * @return If destruction was successful.
53 * @since 2023/07/27
55 sjme_jboolean sjme_nvm_destroy(
56 sjme_attrInNotNull sjme_nvm_state* state,
57 sjme_attrOutNullable sjme_jint* exitCode)
58 sjme_attrCheckReturn;
60 /*--------------------------------------------------------------------------*/
62 /* Anti-C++. */
63 #ifdef __cplusplus
64 #ifdef SJME_CXX_SQUIRRELJME_BOOT_H
66 #undef SJME_CXX_SQUIRRELJME_BOOT_H
67 #undef SJME_CXX_IS_EXTERNED
68 #endif /* #ifdef SJME_CXX_SQUIRRELJME_BOOT_H */
69 #endif /* #ifdef __cplusplus */
71 #endif /* SQUIRRELJME_BOOT_H */