Skip to content

Gtk.ScrollInfo

record (struct)

Provides detailed information on how a scroll operation should be performed.

Scrolling functions usually allow passing a NULL scroll info which will cause the default values to be used and just scroll the element into view.

Constructors

new

@classmethod
def new(cls) -> ScrollInfo

Creates a new scroll info for scrolling an element into view.

Methods

get_enable_horizontal

def get_enable_horizontal(self) -> bool

Checks if horizontal scrolling is enabled.

get_enable_vertical

def get_enable_vertical(self) -> bool

Checks if vertical scrolling is enabled.

ref

def ref(self) -> ScrollInfo

Increases the reference count of a GtkScrollInfo by one.

set_enable_horizontal

def set_enable_horizontal(self, horizontal: bool) -> None

Turns horizontal scrolling on or off.

Parameters:

  • horizontal — if scrolling in the horizontal direction should happen

set_enable_vertical

def set_enable_vertical(self, vertical: bool) -> None

Turns vertical scrolling on or off.

Parameters:

  • vertical — if scrolling in the vertical direction should happen

unref

def unref(self) -> None

Decreases the reference count of a GtkScrollInfo by one.

If the resulting reference count is zero, frees the self.