Blender  V2.93
creator_intern.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
17 #pragma once
18 
25 struct bArgs;
26 struct bContext;
27 
28 #ifndef WITH_PYTHON_MODULE
29 
30 /* creator_args.c */
31 void main_args_setup(struct bContext *C, struct bArgs *ba);
32 void main_args_setup_post(struct bContext *C, struct bArgs *ba);
33 
34 /* creator_signals.c */
35 void main_signal_setup(void);
37 void main_signal_setup_fpe(void);
38 
39 #endif /* WITH_PYTHON_MODULE */
40 
43  struct {
46  } signal;
47 
48  /* we may want to set different exit codes for other kinds of errors */
49  struct {
50  unsigned char python;
52 };
53 extern struct ApplicationState app_state; /* creator.c */
54 
59 enum {
68 
71 };
72 
73 /* for the callbacks: */
74 #ifndef WITH_PYTHON_MODULE
75 # define BLEND_VERSION_FMT "Blender %d.%02d.%d"
76 # define BLEND_VERSION_ARG (BLENDER_VERSION / 100), (BLENDER_VERSION % 100), BLENDER_VERSION_PATCH
77 #endif
78 
79 #ifdef WITH_BUILDINFO_HEADER
80 # define BUILD_DATE
81 #endif
82 
83 /* from buildinfo.c */
84 #ifdef BUILD_DATE
85 extern char build_date[];
86 extern char build_time[];
87 extern char build_hash[];
88 extern unsigned long build_commit_timestamp;
89 
90 /* TODO(sergey): ideally size need to be in sync with buildinfo.c */
91 extern char build_commit_date[16];
92 extern char build_commit_time[16];
93 
94 extern char build_branch[];
95 extern char build_platform[];
96 extern char build_type[];
97 extern char build_cflags[];
98 extern char build_cxxflags[];
99 extern char build_linkflags[];
100 extern char build_system[];
101 #endif /* BUILD_DATE */
#define C
Definition: RandGen.cpp:39
char build_commit_date[16]
Definition: buildinfo.c:49
char build_date[]
Definition: buildinfo.c:45
char build_platform[]
Definition: buildinfo.c:53
char build_linkflags[]
Definition: buildinfo.c:64
void main_signal_setup_background(void)
void main_args_setup_post(struct bContext *C, struct bArgs *ba)
char build_cflags[]
Definition: buildinfo.c:62
@ ARG_PASS_ENVIRONMENT
@ ARG_PASS_SETTINGS_FORCE
@ ARG_PASS_SETTINGS_GUI
@ ARG_PASS_FINAL
@ ARG_PASS_SETTINGS
char build_time[]
Definition: buildinfo.c:46
struct ApplicationState app_state
Definition: creator.c:117
char build_system[]
Definition: buildinfo.c:65
void main_args_setup(struct bContext *C, struct bArgs *ba)
void main_signal_setup_fpe(void)
char build_branch[]
Definition: buildinfo.c:51
char build_type[]
Definition: buildinfo.c:54
void main_signal_setup(void)
char build_commit_time[16]
Definition: buildinfo.c:50
unsigned long build_commit_timestamp
Definition: buildinfo.c:48
char build_hash[]
Definition: buildinfo.c:47
char build_cxxflags[]
Definition: buildinfo.c:63
struct ApplicationState::@1183 exit_code_on_error
struct ApplicationState::@1182 signal
unsigned char python
Definition: BLI_args.c:61