Top |
SandboxUtilsCommonSandboxUtilsCommon — Libwise constants and initialisation functions for client apps |
#define | SANDBOXUTILS_NAME |
#define | SANDBOXUTILS_VERSION |
#define | SANDBOXUTILS_IFACE |
#define | SANDBOXUTILS_PATH |
This file contains constants such as the name of the library and its version, the D-Bus interface name and path used by Sandbox Utils and a couple of internal macros and functions.
It also hosts the sandboxutils_init()
function and other functions exposing
the GOptionGroup used by Sandbox Utils. Clients can use these functions to
enable or disable D-Bus based remote widgets.
GOptionGroup * sandboxutils_get_option_group ();
Returns a GOptionGroup for the commandline arguments recognized by Sandbox Utils.
You should add this group to your GOptionContext
with g_option_context_add_group()
, if you are using
g_option_context_parse()
to parse your commandline arguments.
a GOptionGroup for the commandline arguments recognized
by SandboxUtils. It should be added to a GOptionContext or freed with
g_option_group_free()
.
Since 0.6
gboolean sandboxutils_parse_args (int *argc
,char **argv[]
);
Parses command line arguments, and initializes global attributes of Sandbox Utils.
Any arguments used by Sandbox Utils are removed from the array and
argc
and argv
are updated accordingly.
In most GTK+ applications, you already have a GOptionContext set to parse
your own application's options and GTK+ options. In such a case, it is
preferable to retrieve the Sandbox Utils GOptionGroup (see
sandboxutils_get_option_group()
) and attach it to your GOptionContext (see
g_option_context_add_group()
and g_option_context_parse()
) just like you
would do for GTK+ options (see gtk_get_option_group()
).
argc |
a pointer to the number of command line arguments. |
[inout] |
argv |
a pointer to the array of command line arguments. |
[array length=argc][inout] |
Since 0.6
gboolean sandboxutils_get_sandboxed ();
Gets whether Sandbox Utils widgets will be remote sandbox-traversing widgets or local unprivileged GTK+ widgets.
Since 0.6
void
sandboxutils_set_sandboxed (gboolean sandbox
);
Sets whether Sandbox Utils widgets will be remote sandbox-traversing widgets or local unprivileged GTK+ widgets.
Since 0.6
void sandboxutils_init (int *argc
,char **argv[]
);
This is an alias to sandboxutils_parse_args()
.
argc |
a pointer to the number of command line arguments. |
[inout] |
argv |
a pointer to the array of command line arguments. |
[array length=argc][inout] |
Since 0.6