![]() |
![]() |
![]() |
Cutter Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
Object inspection functionsObject inspection functions — Functions to inspect an object for debugging. |
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_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);
In test result, we need to know detail of inspected objects for debugging. Functions of this section help us to inspect interested objects.
void gcut_inspect_direct (GString *string, gconstpointer data, gpointer user_data);
Shows data
as unsigned integer.
e.g.:
1 |
gcut_inspect_direct(string, GUINT_TO_POINTER(100), NULL) -> "100" |
|
the output string. |
|
the interested target. |
|
the data passed by user. (ignored) |
Since 1.0.6
void gcut_inspect_int (GString *string, gconstpointer data, gpointer user_data);
Shows data
as integer.
e.g.:
1 |
gcut_inspect_int(string, GINT_TO_POINTER(100), NULL) -> "100" |
|
the output string. |
|
the interested target. |
|
the data passed by user. (ignored) |
Since 1.0.6
void gcut_inspect_uint (GString *string, gconstpointer data, gpointer user_data);
Shows data
as unsigned integer.
e.g.:
1 |
gcut_inspect_uint(string, GUINT_TO_POINTER(100), NULL) -> "100" |
|
the output string. |
|
the interested target. |
|
the data passed by user. (ignored) |
Since 1.0.6
void gcut_inspect_string (GString *string, gconstpointer data, gpointer user_data);
Shows data
as string. It also accepts NULL
.
e.g.:
1 |
gcut_inspect_string(string, "string", NULL) -> "\"string\"" |
|
the output string. |
|
the interested target. |
|
the data passed by user. (ignored) |
Since 1.0.6
void gcut_inspect_type (GString *string, gconstpointer data, gpointer user_data);
Shows data
as GType
.
e.g.:
1 |
gcut_inspect_type(string, GTK_TYPE_WINDOW, NULL) -> "<GtkWindow>" |
|
the output string. |
|
the interested target. |
|
the data passed by user. (ignored) |
Since 1.0.6
void gcut_inspect_flags (GString *string, gconstpointer data, gpointer user_data);
Shows data
as value a GFlags type.
e.g.:
1 2 3 4 5 6 7 |
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)> |
|
the output string. |
|
the interested target. |
|
the pointer of GFlags type. |
Since 1.0.6
void gcut_inspect_enum (GString *string, gconstpointer data, gpointer user_data);
Shows data
as value of a GEnum type.
e.g.:
1 2 3 4 5 6 7 |
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)> |
|
the output string. |
|
the interested target. |
|
the pointer of GEnum type. |
Since 1.0.6
void gcut_inspect_pointer (GString *string, gconstpointer data, gpointer user_data);
Shows data
as a pointer.
e.g.:
1 2 |
memory = malloc(1); gcut_inspect_pointer(string, memory, NULL) -> "#<0xXXXXXXX>" |
|
the output string. |
|
the interested target. |
|
the data passed by user. (ignored) |
Since 1.0.6