SandboxUtilsCommon

SandboxUtilsCommon — Libwise constants and initialisation functions for client apps

Stability Level

Unstable, unless otherwise indicated

Functions

Types and Values

Object Hierarchy


Includes

#include <sandboxutils.h>

Description

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.

Functions

sandboxutils_get_option_group ()

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.

Returns

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


sandboxutils_parse_args ()

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()).

Parameters

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]

Returns

TRUE if initialization succeeded, otherwise FALSE

Since 0.6


sandboxutils_get_sandboxed ()

gboolean
sandboxutils_get_sandboxed ();

Gets whether Sandbox Utils widgets will be remote sandbox-traversing widgets or local unprivileged GTK+ widgets.

Returns

TRUE if Sandbox Utils will use sandbox-compatible widgets, FALSE otherwise.

Since 0.6


sandboxutils_set_sandboxed ()

void
sandboxutils_set_sandboxed (gboolean sandbox);

Sets whether Sandbox Utils widgets will be remote sandbox-traversing widgets or local unprivileged GTK+ widgets.

Parameters

sandbox

TRUE if widgets should be sandbox-traversing, FALSE otherwise

 

Since 0.6


sandboxutils_init ()

void
sandboxutils_init (int *argc,
                   char **argv[]);

This is an alias to sandboxutils_parse_args().

Parameters

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

Types and Values

SANDBOXUTILS_NAME

#define SANDBOXUTILS_NAME "Sandbox Utils"

SANDBOXUTILS_VERSION

#define SANDBOXUTILS_VERSION "0.6.1"

SANDBOXUTILS_IFACE

#define SANDBOXUTILS_IFACE "org.mupuf.SandboxUtils"

SANDBOXUTILS_PATH

#define SANDBOXUTILS_PATH "/org/mupuf/SandboxUtils"