## GtkBoolFilter GtkBoolFilter — Filtering by boolean expressions |

## Functions

GtkBoolFilter * | gtk_bool_filter_new ()
GtkExpression * | gtk_bool_filter_get_expression ()
void | gtk_bool_filter_set_expression ()
gboolean | gtk_bool_filter_get_invert ()
void | gtk_bool_filter_set_invert ()

## Properties

GtkExpression * | expression | Read / Write
gboolean | invert | Read / Write

## Types and Values

| GtkBoolFilter

## Object Hierarchy

        GObject
        ╰── GtkFilter
            ╰── GtkBoolFilter

## Includes

    #include <gtk/gtk.h>

## Description

GtkBoolFilter is a simple filter that takes a boolean GtkExpression to determine whether to include items.

## Functions

### gtk_bool_filter_new ()

    GtkBoolFilter *
    gtk_bool_filter_new (GtkExpression *expression);

Creates a new bool filter.

#### Parameters

expression | The expression to evaluate or `NULL` for none. | [transfer full][nullable]

#### Returns

a new GtkBoolFilter

### gtk_bool_filter_get_expression ()

    GtkExpression *
    gtk_bool_filter_get_expression (GtkBoolFilter *self);

Gets the expression that the filter uses to evaluate if an item should be filtered.

#### Parameters

self | a GtkBoolFilter |

#### Returns

a GtkExpression.

[transfer none]

### gtk_bool_filter_set_expression ()

    void
    gtk_bool_filter_set_expression (GtkBoolFilter *self,
                                    GtkExpression *expression);

Sets the expression that the filter uses to check if items should be filtered. The expression must have a value type of G_TYPE_BOOLEAN.

#### Parameters

self | a GtkBoolFilter |
expression | a GtkExpression |

### gtk_bool_filter_get_invert ()

    gboolean
    gtk_bool_filter_get_invert (GtkBoolFilter *self);

Returns whether the filter inverts the expression.

#### Parameters

self | a GtkBoolFilter |

#### Returns

`TRUE` if the filter inverts

### gtk_bool_filter_set_invert ()

    void
    gtk_bool_filter_set_invert (GtkBoolFilter *self,
                                gboolean invert);

Sets whether the filter should invert the expression.

#### Parameters

self | a GtkBoolFilter |
invert | `TRUE` to invert |

## Types and Values

### GtkBoolFilter

    typedef struct _GtkBoolFilter GtkBoolFilter;

## Property Details

### The `“expression”` property

      “expression”               GtkExpression *

The boolean expression to evaluate on item

[type GtkExpression]

Owner: GtkBoolFilter

Flags: Read / Write

### The `“invert”` property

      “invert”                   gboolean

If the expression result should be inverted

Owner: GtkBoolFilter

Flags: Read / Write

Default value: FALSE