definition module Gtk.Types /** * This module provides common types for the Gtk library. * * Most of these types map directly to Glib, Gdk, or Gtk `enum`s --- for more * explanation, see the Gtk+ 3 reference manual: * https://developer.gnome.org/gtk3/stable/ * * Some types, like `GtkExpand`, map to booleans in the C libraries, and are * merely provided for more readable Clean code (in the case of `GtkExpand` for * example for `packBox`). */ from StdOverloaded import class fromInt, class toInt :: GType // This is not exhaustive = GTypeBool | GTypeChar | GTypeInt | GTypeReal | GTypeString instance toInt GType :: GValue // This is not exhaustive = GValueBool !Bool | GValueChar !Char | GValueInt !Int | GValueReal !Real | GValueString !String :: GdkModifier = ShiftMask | LockMask | ControlMask | Mod1Mask | Mod2Mask | Mod3Mask | Mod4Mask | Mod5Mask | Button1Mask | Button2Mask | Button3Mask | Button4Mask | Button5Mask | SuperMask | HyperMask | MetaMask instance toInt GdkModifier instance toInt [GdkModifier] :: GtkAlign = AlignFill | AlignStart | AlignEnd | AlignCenter | AlignBaseline instance toInt GtkAlign :: GtkButtonsType = NoButtons | OkButton | CloseButton | CancelButton | YesNoButtons | OkCancelButtons instance toInt GtkButtonsType :: GtkCompletionMode = InlineCompletion | NoInlineCompletion | InlineSelection | NoInlineSelection :: GtkCSSClass = Class !String :: GtkDirection = StartToEnd | EndToStart :: GtkExpand = Expand | NoExpand :: GtkFileChooserAction = OpenAction | SaveAction | SelectFolderAction | CreateFolderAction instance toInt GtkFileChooserAction :: GtkIconSize = MenuIconSize | SmallToolbarIconSize | LargeToolbarIconSize | ButtonIconSize | DragAndDropIconSize | DialogIconSize instance toInt GtkIconSize :: GtkJustification = JustifyLeft | JustifyRight | JustifyCenter | JustifyFill instance toInt GtkJustification :: GtkLineSpacingModifier = PixelsAboveLines !Int | PixelsBelowLines !Int | PixelsInsideWrap !Int :: GtkMargins = { left :: !Int , top :: !Int , right :: !Int , bottom :: !Int } //* Creates a `GtkMargins` record where all margins are the same. margin :: !Int -> GtkMargins /** * Used to avoid multiple `setMarkup` functions. This is like `GtkText`, but * assumes that the string contains Pango markup. For an overview of the Pango * markup language, see the documentation: * https://developer.gnome.org/pygtk/stable/pango-markup-language.html */ :: GtkMarkup =: Markup String :: GtkMessageType = InfoMessage | WarningMessage | QuestionMessage | ErrorMessage | OtherMessage instance toInt GtkMessageType :: GtkModal = Modal | NotModal :: GtkOrientation = Horizontal | Vertical :: GtkPanedHandleWidth = WideHandle | NarrowHandle :: GtkPropagate = Propagate | StopPropagation :: GtkResize = Resize | NoResize :: GtkResponse = ResponseNone | ResponseReject | ResponseAccept | ResponseDeleteEvent | ResponseOk | ResponseCancel | ResponseClose | ResponseYes | ResponseNo | ResponseApply | ResponseHelp //* Illegal values map to `ResponseNone`. instance fromInt GtkResponse instance toInt GtkResponse :: GtkScrollbarPolicy = PersistentScrollbar | AutoScrollbar | NoScrollbar instance toInt GtkScrollbarPolicy :: GtkSensitivity = Sensitive | Insensitive :: GtkShrink = Shrink | NoShrink :: GtkSizeRequest =: GtkSizeRequest (!Int,!Int) :: GtkSortable = Sortable | NotSortable :: GtkSpacing =: Spacing Int :: GtkStylePriority = StylePriorityFallback | StylePriorityTheme | StylePrioritySettings | StylePriorityApplication | StylePriorityUser instance toInt GtkStylePriority /** * Used to avoid multiple `setText` functions. * The string is assumed to be valid UTF-8. */ :: GtkText =: Text String :: GtkTimeout = Milliseconds !Int | Seconds !Int :: GtkTitle =: Title String :: GtkTreeViewColumnSizing = OnlyGrow | AutoSize | FixedSize instance toInt GtkTreeViewColumnSizing :: GtkWrapMode = WrapNone | WrapChar | WrapWord | WrapWordOrChar instance toInt GtkWrapMode