![]() |
![]() |
![]() |
GSK Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
Library InitializationLibrary Initialization — Perform general initialization with limited argument parsing. |
GskInitInfo; void gsk_init_info_get_defaults (GskInitInfo *info); void gsk_init (int *argc, char ***argv, GskInitInfo *info); void gsk_init_without_threads (int *argc, char ***argv); #define gsk_init_get_support_threads () void gsk_init_info_parse_args (GskInitInfo *in_out, int *argc, char ***argv); void gsk_init_raw (GskInitInfo *info); extern _GskInitFlags gsk_init_flags; extern gpointer gsk_main_thread;
Almost always one run gsk_init()
at the top of main and forgets about it.
But sometimes you wish to separate the parsing and the initialization
so these routines give you more fine-grained control,
by separating the parsing into gsk_init_info_parse_args()
and
the real initialization into gsk_init_raw()
.
typedef struct { char *prgname; guint needs_threads : 1; } GskInitInfo;
Information about how to initialize GSK.
char * |
The name of the program, may be NULL. |
guint |
Whether the program needs threads. True by default. |
void gsk_init_info_get_defaults (GskInitInfo *info);
Obtain the default initialization information.
This should be run before gsk_init()
or gsk_init_info_parse_args()
.
This API has been deprecated for public use, because it doesn't allow us to expand GskInitInfo without breaking binary-compatibility.
Use gsk_init_info_new()
instead.
|
the GskInitInfo to fill. |
void gsk_init (int *argc, char ***argv, GskInitInfo *info);
Initialize the GSK library.
|
a reference to main() 's argc;
this will be decreased if arguments are parsed
out of the argument array.
|
|
a reference to main() 's argc;
this may have arguments removed.
|
|
the GskInitInfo to use as hints, which will be filled with the actual initialization information used. If NULL, default initialization parameters will be used. |
void gsk_init_without_threads (int *argc, char ***argv);
Initialize the GSK library indicating that you will not use threads.
|
a reference to main() 's argc;
this will be decreased if arguments are parsed
out of the argument array.
|
|
a reference to main() 's argc;
this may have arguments removed.
|
#define gsk_init_get_support_threads()
Ascertain whether thread support is necessary.
void gsk_init_info_parse_args (GskInitInfo *in_out, int *argc, char ***argv);
Parse/modify arguments and return their values in in_out
.
The only currently supported argument is --gsk-debug=FLAGS.
|
the GskInitInfo to fill. |
|
the argument count (may be modified) |
|
the arguments (may be modified) |
void gsk_init_raw (GskInitInfo *info);
Initialize GSK.
|
information to use for initializing. |