gi-gtk-4.0.2: Gtk bindings
CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gtk.Interfaces.Native

Description

Native is the interface implemented by all widgets that can provide a GdkSurface for widgets to render on.

The obvious example of a Native is Window.

Synopsis

Exported types

newtype Native Source #

Memory-managed wrapper type.

Constructors

Native (ManagedPtr Native) 

Instances

Instances details
Eq Native Source # 
Instance details

Defined in GI.Gtk.Interfaces.Native

Methods

(==) :: Native -> Native -> Bool #

(/=) :: Native -> Native -> Bool #

IsGValue Native Source #

Convert Native to and from GValue with toGValue and fromGValue.

Instance details

Defined in GI.Gtk.Interfaces.Native

ManagedPtrNewtype Native Source # 
Instance details

Defined in GI.Gtk.Interfaces.Native

TypedObject Native Source # 
Instance details

Defined in GI.Gtk.Interfaces.Native

Methods

glibType :: IO GType #

GObject Native Source # 
Instance details

Defined in GI.Gtk.Interfaces.Native

HasParentTypes Native Source # 
Instance details

Defined in GI.Gtk.Interfaces.Native

type ParentTypes Native Source # 
Instance details

Defined in GI.Gtk.Interfaces.Native

type ParentTypes Native = '[Widget, Object]

class (GObject o, IsDescendantOf Native o) => IsNative o Source #

Type class for types which can be safely cast to Native, for instance with toNative.

Instances

Instances details
(GObject o, IsDescendantOf Native o) => IsNative o Source # 
Instance details

Defined in GI.Gtk.Interfaces.Native

toNative :: (MonadIO m, IsNative o) => o -> m Native Source #

Cast to Native, for types for which this is known to be safe. For general casts, use castTo.

Methods

Overloaded methods

checkResize

nativeCheckResize Source #

Arguments

:: (HasCallStack, MonadIO m, IsNative a) 
=> a

self: a Native

-> m () 

Reposition and resize a Native.

Widgets need to call this function on their attached native widgets when they receive a new size allocation.

getForSurface

nativeGetForSurface Source #

Arguments

:: (HasCallStack, MonadIO m, IsSurface a) 
=> a

surface: a Surface

-> m Widget

Returns: the Native that is associated with surface

Finds the GtkNative associated with the surface.

getRenderer

nativeGetRenderer Source #

Arguments

:: (HasCallStack, MonadIO m, IsNative a) 
=> a

self: a Native

-> m Renderer

Returns: the renderer for self

Returns the renderer that is used for this Native.

getSurface

nativeGetSurface Source #

Arguments

:: (HasCallStack, MonadIO m, IsNative a) 
=> a

self: a Native

-> m Surface

Returns: the surface of self

Returns the surface of this Native.

getSurfaceTransform

nativeGetSurfaceTransform Source #

Arguments

:: (HasCallStack, MonadIO m, IsNative a) 
=> a

self: a gtkNative

-> m (Double, Double) 

Retrieves the surface transform of self. This is the translation from self's surface coordinates into self's widget coordinates.