Gtk2HsContentsIndex
Graphics.UI.Gtk.General.Structs
Portabilityportable (depends on GHC)
Stabilityprovisional
Maintainergtk2hs-users@lists.sourceforge.net
Description
Synopsis
type Point = (Int, Int)
data Rectangle = Rectangle Int Int Int Int
data Color = Color Word16 Word16 Word16
data GCValues = GCValues {
foreground :: Color
background :: Color
function :: Function
fill :: Fill
tile :: (Maybe Pixmap)
stipple :: (Maybe Pixmap)
clipMask :: (Maybe Pixmap)
subwindowMode :: SubwindowMode
tsXOrigin :: Int
tsYOrigin :: Int
clipXOrigin :: Int
clipYOrigin :: Int
graphicsExposure :: Bool
lineWidth :: Int
lineStyle :: LineStyle
capStyle :: CapStyle
joinStyle :: JoinStyle
}
pokeGCValues :: Ptr GCValues -> GCValues -> IO CInt
newGCValues :: GCValues
widgetGetState :: WidgetClass w => w -> IO StateType
widgetGetSavedState :: WidgetClass w => w -> IO StateType
type Allocation = Rectangle
data Requisition = Requisition Int Int
treeIterSize :: Int
textIterSize :: Int
inputError :: Int32
dialogGetUpper :: DialogClass dc => dc -> IO VBox
dialogGetActionArea :: DialogClass dc => dc -> IO HBox
fileSelectionGetButtons :: FileSelectionClass fsel => fsel -> IO (Button, Button)
data ResponseId
= ResponseNone
| ResponseReject
| ResponseAccept
| ResponseDeleteEvent
| ResponseOk
| ResponseCancel
| ResponseClose
| ResponseYes
| ResponseNo
| ResponseApply
| ResponseHelp
| ResponseUser Int
fromResponse :: Integral a => ResponseId -> a
toResponse :: Integral a => a -> ResponseId
toolbarChildButton :: CInt
toolbarChildToggleButton :: CInt
toolbarChildRadioButton :: CInt
type IconSize = Int
iconSizeInvalid :: IconSize
iconSizeMenu :: IconSize
iconSizeSmallToolbar :: IconSize
iconSizeLargeToolbar :: IconSize
iconSizeButton :: IconSize
iconSizeDialog :: IconSize
comboGetList :: Combo -> IO List
widgetGetDrawWindow :: WidgetClass widget => widget -> IO DrawWindow
widgetGetSize :: WidgetClass widget => widget -> IO (Int, Int)
layoutGetDrawWindow :: Layout -> IO DrawWindow
pangoScale :: Double
data PangoDirection
= PangoDirectionLtr
| PangoDirectionRtl
| PangoDirectionWeakLtr
| PangoDirectionWeakRtl
| PangoDirectionNeutral
pangodirToLevel :: PangoDirection -> Int
setAttrPos :: UTFCorrection -> Int -> Int -> IO (Ptr ()) -> IO (Ptr ())
pangoItemRawGetFont :: Ptr pangoItem -> IO Font
pangoItemRawGetLanguage :: Ptr pangoItem -> IO (Ptr CChar)
pangoItemRawAnalysis :: Ptr pangoItem -> Ptr pangoAnalysis
pangoItemRawGetLevel :: Ptr pangoItem -> IO Bool
styleGetForeground :: Style -> StateType -> IO Color
styleGetBackground :: Style -> StateType -> IO Color
styleGetLight :: Style -> StateType -> IO Color
styleGetMiddle :: Style -> StateType -> IO Color
styleGetDark :: Style -> StateType -> IO Color
styleGetText :: Style -> StateType -> IO Color
styleGetBase :: Style -> StateType -> IO Color
styleGetAntiAliasing :: Style -> StateType -> IO Color
colorSelectionDialogGetColor :: ColorSelectionDialog -> IO ColorSelection
colorSelectionDialogGetOkButton :: ColorSelectionDialog -> IO Button
colorSelectionDialogGetCancelButton :: ColorSelectionDialog -> IO Button
colorSelectionDialogGetHelpButton :: ColorSelectionDialog -> IO Button
dragContextGetActions :: DragContext -> IO Int
dragContextSetActions :: DragContext -> Int -> IO ()
dragContextGetSuggestedAction :: DragContext -> IO Int
dragContextSetSuggestedAction :: DragContext -> Int -> IO ()
dragContextGetAction :: DragContext -> IO Int
dragContextSetAction :: DragContext -> Int -> IO ()
Documentation
type Point = (Int, Int)
Represents the x and y coordinate of a point.
data Rectangle

Rectangle

  • for Events
  • Specifies x, y, width and height
Constructors
Rectangle Int Int Int Int
show/hide Instances
data Color

Color

  • Specifies a color with three integer values for red, green and blue. All values range from 0 (least intense) to 65535 (highest intensity).
Constructors
Color Word16 Word16 Word16
show/hide Instances
data GCValues

Intermediate data structure for GCs.

  • If graphicsExposure is set then copying portions into a drawable will generate an "exposure" event, even if the destination area is not currently visible.
Constructors
GCValues
foreground :: Color
background :: Color
function :: Function
fill :: Fill
tile :: (Maybe Pixmap)
stipple :: (Maybe Pixmap)
clipMask :: (Maybe Pixmap)
subwindowMode :: SubwindowMode
tsXOrigin :: Int
tsYOrigin :: Int
clipXOrigin :: Int
clipYOrigin :: Int
graphicsExposure :: Bool
lineWidth :: Int
lineStyle :: LineStyle
capStyle :: CapStyle
joinStyle :: JoinStyle
show/hide Instances
pokeGCValues :: Ptr GCValues -> GCValues -> IO CInt
newGCValues :: GCValues
widgetGetState :: WidgetClass w => w -> IO StateType

Retrieve the current state of the widget.

  • The state refers to different modes of user interaction, see StateType for more information.
widgetGetSavedState :: WidgetClass w => w -> IO StateType

Retrieve the current state of the widget.

  • If a widget is turned insensitive, the previous state is stored in a specific location. This function retrieves this previous state.
type Allocation = Rectangle

Allocation

  • for Widget's size_allocate signal
data Requisition

Requisition

  • for Widget's size_request
Constructors
Requisition Int Int
show/hide Instances
treeIterSize :: Int
textIterSize :: Int
inputError :: Int32
dialogGetUpper :: DialogClass dc => dc -> IO VBox

Get the upper part of a dialog.

  • The upper part of a dialog window consists of a VBox. Add the required widgets into this box.
dialogGetActionArea :: DialogClass dc => dc -> IO HBox

Extract the action area of a dialog box.

  • This is useful to add some special widgets that cannot be added with dialogAddActionWidget.
fileSelectionGetButtons :: FileSelectionClass fsel => fsel -> IO (Button, Button)
Extract the buttons of a fileselection.
data ResponseId
Some constructors that can be used as response numbers for dialogs.
Constructors
ResponseNoneGTK returns this if a response widget has no response_id, or if the dialog gets programmatically hidden or destroyed.
ResponseRejectGTK won't return these unless you pass them in as the response for an action widget. They are for your convenience.
ResponseAccept(as above)
ResponseDeleteEventIf the dialog is deleted.
ResponseOk

"Ok" was pressed.

  • This value is returned from the "Ok" stock dialog button.
ResponseCancel

"Cancel" was pressed.

  • These value is returned from the "Cancel" stock dialog button.
ResponseClose

"Close" was pressed.

  • This value is returned from the "Close" stock dialog button.
ResponseYes

"Yes" was pressed.

  • This value is returned from the "Yes" stock dialog button.
ResponseNo

"No" was pressed.

  • This value is returned from the "No" stock dialog button.
ResponseApply

"Apply" was pressed.

  • This value is returned from the "Apply" stock dialog button.
ResponseHelp

"Help" was pressed.

  • This value is returned from the "Help" stock dialog button.
ResponseUser Int

A user-defined response

  • This value is returned from a user defined button
show/hide Instances
fromResponse :: Integral a => ResponseId -> a
toResponse :: Integral a => a -> ResponseId
toolbarChildButton :: CInt
toolbarChildToggleButton :: CInt
toolbarChildRadioButton :: CInt
type IconSize = Int
The size of an icon in pixels.
iconSizeInvalid :: IconSize
Don't scale but use any of the available sizes.
iconSizeMenu :: IconSize
Icon size to use in next to menu items in drop-down menus.
iconSizeSmallToolbar :: IconSize
Icon size for small toolbars.
iconSizeLargeToolbar :: IconSize
Icon size for larger toolbars.
iconSizeButton :: IconSize
Icon size for icons in buttons, next to the label.
iconSizeDialog :: IconSize
Icon size for icons next to dialog text.
comboGetList :: Combo -> IO List
Extract the List container from a Combo box.
widgetGetDrawWindow :: WidgetClass widget => widget -> IO DrawWindow

Retrieves the DrawWindow that the widget draws onto.

This may be Nothing if the widget has not yet been realized, since a widget does not allocate its window resources until just before it is displayed on the screen. You can use the onRealize signal to give you the opportunity to use a widget's DrawWindow as soon as it has been created but before the widget is displayed.

widgetGetSize :: WidgetClass widget => widget -> IO (Int, Int)

Returns the current size.

  • This information may be out of date if the user is resizing the window.
layoutGetDrawWindow :: Layout -> IO DrawWindow
Retrieves the Drawable part.
pangoScale :: Double
data PangoDirection

The PangoDirection type represents a direction in the Unicode bidirectional algorithm.

  • The "weak" values denote a left-to-right or right-to-left direction only if there is no character with a strong direction in a paragraph. An example is a sequence of special, graphical characters which are neutral with respect to their rendering direction. A fresh PangoContext is by default weakly left-to-right.
  • Not every value in this enumeration makes sense for every usage of PangoDirection; for example, the return value of unicharDirection and findBaseDir cannot be PangoDirectionWeakLtr or PangoDirectionWeakRtl, since every character is either neutral or has a strong direction; on the other hand PangoDirectionNeutral doesn't make sense to pass to log2visGetEmbeddingLevels.
Constructors
PangoDirectionLtr
PangoDirectionRtl
PangoDirectionWeakLtr
PangoDirectionWeakRtl
PangoDirectionNeutral
show/hide Instances
pangodirToLevel :: PangoDirection -> Int
setAttrPos :: UTFCorrection -> Int -> Int -> IO (Ptr ()) -> IO (Ptr ())
pangoItemRawGetFont :: Ptr pangoItem -> IO Font
pangoItemRawGetLanguage :: Ptr pangoItem -> IO (Ptr CChar)
pangoItemRawAnalysis :: Ptr pangoItem -> Ptr pangoAnalysis
pangoItemRawGetLevel :: Ptr pangoItem -> IO Bool
styleGetForeground :: Style -> StateType -> IO Color

Retrieve the the foreground color.

  • The parameter state determines for which widget state (one of StateType) the Color should be retrieved. Use widgetGetState to determine the current state of the widget.
styleGetBackground :: Style -> StateType -> IO Color

Retrieve the background color.

  • The parameter state determines for which widget state (one of StateType) the Color should be retrieved. Use widgetGetState to determine the current state of the widget.
styleGetLight :: Style -> StateType -> IO Color

Retrieve a light color.

  • The parameter state determines for which widget state (one of StateType) the Color should be retrieved. Use widgetGetState to determine the current state of the widget.
styleGetMiddle :: Style -> StateType -> IO Color

Retrieve a middle color.

  • The parameter state determines for which widget state (one of StateType) the Color should be retrieved. Use widgetGetState to determine the current state of the widget.
styleGetDark :: Style -> StateType -> IO Color

Retrieve a dark color.

  • The parameter state determines for which widget state (one of StateType) the Color should be retrieved. Use widgetGetState to determine the current state of the widget.
styleGetText :: Style -> StateType -> IO Color

Retrieve the text color.

  • The parameter state determines for which widget state (one of StateType) the Color should be retrieved. Use widgetGetState to determine the current state of the widget.
styleGetBase :: Style -> StateType -> IO Color

Retrieve the base color.

  • The base color is the standard text background of a widget.
  • The parameter state determines for which widget state (one of StateType) the Color should be retrieved. Use widgetGetState to determine the current state of the widget.
styleGetAntiAliasing :: Style -> StateType -> IO Color

Retrieve the color for drawing anti-aliased text.

  • The anti-aliasing color is the color which is used when the rendering of a character does not make it clear if a certain pixel shoud be set or not. This color is between the text and the base color.
  • The parameter state determines for which widget state (one of StateType) the Color should be retrieved. Use widgetGetState to determine the current state of the widget.
colorSelectionDialogGetColor :: ColorSelectionDialog -> IO ColorSelection
Retrieve the ColorSelection object contained within the dialog.
colorSelectionDialogGetOkButton :: ColorSelectionDialog -> IO Button
Retrieve the OK button widget contained within the dialog.
colorSelectionDialogGetCancelButton :: ColorSelectionDialog -> IO Button
Retrieve the Cancel button widget contained within the dialog.
colorSelectionDialogGetHelpButton :: ColorSelectionDialog -> IO Button
Retrieve the Help button widget contained within the dialog.
dragContextGetActions :: DragContext -> IO Int
dragContextSetActions :: DragContext -> Int -> IO ()
dragContextGetSuggestedAction :: DragContext -> IO Int
dragContextSetSuggestedAction :: DragContext -> Int -> IO ()
dragContextGetAction :: DragContext -> IO Int
dragContextSetAction :: DragContext -> Int -> IO ()
Produced by Haddock version 0.8