## Object inspection functions Object inspection functions — Functions to inspect an object for debugging. |

## Synopsis

    void                gcut_inspect_direct                 (GString *string,
                                                             gconstpointer data,
                                                             gpointer user_data);
    void                gcut_inspect_int                    (GString *string,
                                                             gconstpointer data,
                                                             gpointer user_data);
    void                gcut_inspect_uint                   (GString *string,
                                                             gconstpointer data,
                                                             gpointer user_data);
    void                gcut_inspect_int64                  (GString *string,
                                                             gconstpointer data,
                                                             gpointer user_data);
    void                gcut_inspect_uint64                 (GString *string,
                                                             gconstpointer data,
                                                             gpointer user_data);
    void                gcut_inspect_size                   (GString *string,
                                                             gconstpointer data,
                                                             gpointer user_data);
    void                gcut_inspect_char                   (GString *string,
                                                             gconstpointer data,
                                                             gpointer user_data);
    void                gcut_inspect_string                 (GString *string,
                                                             gconstpointer data,
                                                             gpointer user_data);
    void                gcut_inspect_type                   (GString *string,
                                                             gconstpointer data,
                                                             gpointer user_data);
    void                gcut_inspect_flags                  (GString *string,
                                                             gconstpointer data,
                                                             gpointer user_data);
    void                gcut_inspect_enum                   (GString *string,
                                                             gconstpointer data,
                                                             gpointer user_data);
    void                gcut_inspect_pointer                (GString *string,
                                                             gconstpointer data,
                                                             gpointer user_data);
    void                gcut_inspect_boolean                (GString *string,
                                                             gconstpointer data,
                                                             gpointer user_data);
    void                gcut_inspect_double                 (GString *string,
                                                             gconstpointer data,
                                                             gpointer user_data);

## Description

In test result, we need to know detail of inspected objects for debugging. Functions of this section help us to inspect interested objects.

## Details

### gcut_inspect_direct ()

    void                gcut_inspect_direct                 (GString *string,
                                                             gconstpointer data,
                                                             gpointer user_data);

Shows `data` as unsigned integer.

e.g.:

    gcut_inspect_direct(string, GUINT_TO_POINTER(100), NULL) -> "100"

`string` : | the output string.
`data` : | the interested target.
`user_data` : | the data passed by user. (ignored)

Since 1.0.6

### gcut_inspect_int ()

    void                gcut_inspect_int                    (GString *string,
                                                             gconstpointer data,
                                                             gpointer user_data);

Shows `data` as integer.

e.g.:

    gint int_value = 100;
    gcut_inspect_int(string, &int_value, NULL) -> "100"

`string` : | the output string.
`data` : | the interested target.
`user_data` : | the data passed by user. (ignored)

Since 1.0.6

### gcut_inspect_uint ()

    void                gcut_inspect_uint                   (GString *string,
                                                             gconstpointer data,
                                                             gpointer user_data);

Shows `data` as unsigned integer.

e.g.:

    guint uint_value = 100;
    gcut_inspect_uint(string, &uint_value, NULL) -> "100"

`string` : | the output string.
`data` : | the interested target.
`user_data` : | the data passed by user. (ignored)

Since 1.0.6

### gcut_inspect_int64 ()

    void                gcut_inspect_int64                  (GString *string,
                                                             gconstpointer data,
                                                             gpointer user_data);

Shows `data` as 64-bit integer.

e.g.:

    gint64 int64_value = 100;
    gcut_inspect_int64(string, &int64_value, NULL) -> "100"

`string` : | the output string.
`data` : | the interested target.
`user_data` : | the data passed by user. (ignored)

Since 1.1.3

### gcut_inspect_uint64 ()

    void                gcut_inspect_uint64                 (GString *string,
                                                             gconstpointer data,
                                                             gpointer user_data);

Shows `data` as 64-bit unsigned integer.

e.g.:

    guint64 uint64_value = 100;
    gcut_inspect_uint64(string, &uint64_value, NULL) -> "100"

`string` : | the output string.
`data` : | the interested target.
`user_data` : | the data passed by user. (ignored)

Since 1.1.3

### gcut_inspect_size ()

    void                gcut_inspect_size                   (GString *string,
                                                             gconstpointer data,
                                                             gpointer user_data);

Shows `data` as unsigned integer.

e.g.:

    gsize size_value = 100;
    gcut_inspect_size(string, &size_value, NULL) -> "100"

`string` : | the output string.
`data` : | the interested target.
`user_data` : | the data passed by user. (ignored)

Since 1.1.3

### gcut_inspect_char ()

    void                gcut_inspect_char                   (GString *string,
                                                             gconstpointer data,
                                                             gpointer user_data);

Shows `data` as character.

e.g.:

    gcut_inspect_char(string, 'C', NULL) -> "'C'"
    gcut_inspect_char(string, '\0', NULL) -> "'\0'"
    gcut_inspect_char(string, '\n', NULL) -> "'\n'"

`string` : | the output string.
`data` : | the interested target.
`user_data` : | the data passed by user. (ignored)

Since 1.1.3

### gcut_inspect_string ()

    void                gcut_inspect_string                 (GString *string,
                                                             gconstpointer data,
                                                             gpointer user_data);

Shows `data` as string. It also accepts `NULL`.

e.g.:

    gcut_inspect_string(string, "string", NULL) -> "\"string\""

`string` : | the output string.
`data` : | the interested target.
`user_data` : | the data passed by user. (ignored)

Since 1.0.6

### gcut_inspect_type ()

    void                gcut_inspect_type                   (GString *string,
                                                             gconstpointer data,
                                                             gpointer user_data);

Shows `data` as `GType`.

e.g.:

    gcut_inspect_type(string, GTK_TYPE_WINDOW, NULL) -> "<GtkWindow>"

`string` : | the output string.
`data` : | the interested target.
`user_data` : | the data passed by user. (ignored)

Since 1.0.6

### gcut_inspect_flags ()

    void                gcut_inspect_flags                  (GString *string,
                                                             gconstpointer data,
                                                             gpointer user_data);

Shows `data` as value a GFlags type.

e.g.:

    GType flags_type;
    GtkWidgetFlags flags;

    flags_type = GTK_TYPE_WIDGET_FLAGS;
    flags = GTK_TOPLEVEL | GTK_VISIBLE;
    gcut_inspect_flags(string, &flags, &flags_type);
    -> #<GtkWidgetFlags: toplevel|visible (GTK_TOPLEVEL:0x10)|(GTK_VISIBLE:0x100)>

`string` : | the output string.
`data` : | the interested target.
`user_data` : | the pointer of GFlags type.

Since 1.0.6

### gcut_inspect_enum ()

    void                gcut_inspect_enum                   (GString *string,
                                                             gconstpointer data,
                                                             gpointer user_data);

Shows `data` as value of a GEnum type.

e.g.:

    GType enum_type;
    GtkWidgetHelpType value;

    enum_type = GTK_TYPE_WIDGET_HELP_TYPE;
    value = GTK_WIDGET_HELP_TOOLTIP;
    gcut_inspect_enum(string, &value, &enum_type);
    -> #<GtkWidgetHelpType: tooltip(GTK_WIDGET_HELP_TOOLTIP:0)>

`string` : | the output string.
`data` : | the interested target.
`user_data` : | the pointer of GEnum type.

Since 1.0.6

### gcut_inspect_pointer ()

    void                gcut_inspect_pointer                (GString *string,
                                                             gconstpointer data,
                                                             gpointer user_data);

Shows `data` as a pointer.

e.g.:

    memory = malloc(1);
    gcut_inspect_pointer(string, memory, NULL) -> "#<0xXXXXXXX>"

`string` : | the output string.
`data` : | the interested target.
`user_data` : | the data passed by user. (ignored)

Since 1.0.6

### gcut_inspect_boolean ()

    void                gcut_inspect_boolean                (GString *string,
                                                             gconstpointer data,
                                                             gpointer user_data);

Shows `data` as boolean.

e.g.:

    gboolean boolean_value;

    boolean_value = TRUE;
    gcut_inspect_boolean(string, &boolean_value, NULL) -> "TRUE"
    boolean_value = FALSE;
    gcut_inspect_boolean(string, &boolean_value, NULL) -> "FALSE"

`string` : | the output string.
`data` : | the interested target.
`user_data` : | the data passed by user. (ignored)

Since 1.1.3

### gcut_inspect_double ()

    void                gcut_inspect_double                 (GString *string,
                                                             gconstpointer data,
                                                             gpointer user_data);

Shows `data` as double floating point number.

e.g.:

    gdouble double_value = 2.9;
    gcut_inspect_double(string, &double_value, NULL) -> "2.9"

`string` : | the output string.
`data` : | the interested target.
`user_data` : | the data passed by user. (ignored)

Since 1.1.3