From: Andy S. <And...@co...> - 2010-03-22 14:57:49
|
Mon Mar 22 10:56:57 EDT 2010 Andy Stewart <laz...@gm...> * Update all `Buttons` modules to Gtk+ 2.18.3 Ignore-this: 5104ae0d2c5813c6de782e7b7d874c4a hunk ./ApiUpdateTodoList.txt 82 -*** TODO LinkButton.chs +*** DONE LinkButton.chs hunk ./ApiUpdateTodoList.txt 171 -*** TODO VolumeButton.chs +*** DONE VolumeButton.chs hunk ./ApiUpdateTodoList.txt 201 -** TODO Directory: gtk-modules/Graphics/UI/Gtk/Buttons -*** TODO Button.chs.pp -*** TODO CheckButton.chs -*** TODO RadioButton.chs.pp -*** TODO ToggleButton.chs +** DONE Directory: gtk-modules/Graphics/UI/Gtk/Buttons +*** DONE Button.chs.pp +*** DONE CheckButton.chs +*** DONE RadioButton.chs.pp +*** DONE ToggleButton.chs hunk ./Makefile.am 628 + gtk/Graphics/UI/Gtk/Buttons/LinkButton.chs.pp \ + gtk/Graphics/UI/Gtk/Buttons/ScaleButton.chs.pp \ + gtk/Graphics/UI/Gtk/Buttons/VolumeButton.chs.pp \ hunk ./gtk/Graphics/UI/Gtk.hs.pp 90 + module Graphics.UI.Gtk.Buttons.LinkButton, + module Graphics.UI.Gtk.Buttons.ScaleButton, + module Graphics.UI.Gtk.Buttons.VolumeButton, hunk ./gtk/Graphics/UI/Gtk.hs.pp 289 +import Graphics.UI.Gtk.Buttons.LinkButton +import Graphics.UI.Gtk.Buttons.ScaleButton +import Graphics.UI.Gtk.Buttons.VolumeButton hunk ./gtk/Graphics/UI/Gtk/Buttons/Button.chs.pp 8 --- Copyright (C) 1999-2005 Axel Simon +-- Copyright (C) 1999-2009 Axel Simon hunk ./gtk/Graphics/UI/Gtk/Buttons/Button.chs.pp 116 + activated, + clicked, + enter, + leave, + pressed, + released, + + -- * Compatibilty aliases hunk ./gtk/Graphics/UI/Gtk/Buttons/Button.chs.pp 139 - afterReleased + afterReleased, hunk ./gtk/Graphics/UI/Gtk/Buttons/Button.chs.pp 610 -buttonActivated :: ButtonClass self => Signal self (IO ()) -buttonActivated = Signal (connect_NONE__NONE "clicked") +activated :: ButtonClass self => Signal self (IO ()) +activated = Signal (connect_NONE__NONE "clicked") + +-- | Emitted when the button is pressed. +-- +pressed :: ButtonClass self => Signal self (IO ()) +pressed = Signal (connect_NONE__NONE "pressed") + +-- | Emitted when the button is released. +-- +released :: ButtonClass self => Signal self (IO ()) +released = Signal (connect_NONE__NONE "released") + +-- | Emitted when the button has been activated (pressed and released). +-- +clicked :: ButtonClass self => Signal self (IO ()) +clicked = Signal (connect_NONE__NONE "clicked") + +-- | Emitted when the pointer enters the button. +-- +enter :: ButtonClass self => Signal self (IO ()) +enter = Signal (connect_NONE__NONE "enter") + +-- | Emitted when the pointer leaves the button. +-- +leave :: ButtonClass self => Signal self (IO ()) +leave = Signal (connect_NONE__NONE "leave") hunk ./gtk/Graphics/UI/Gtk/Buttons/Button.chs.pp 638 +--------------------- +-- Compatibility aliases. +buttonActivated :: ButtonClass self => Signal self (IO ()) +buttonActivated = activated hunk ./gtk/Graphics/UI/Gtk/Buttons/Button.chs.pp 685 + hunk ./gtk/Graphics/UI/Gtk/Buttons/Button.chs.pp 687 + hunk ./gtk/Graphics/UI/Gtk/Buttons/CheckButton.chs 8 --- Copyright (C) 1999-2005 Axel Simon +-- Copyright (C) 1999-2009 Axel Simon hunk ./gtk/Graphics/UI/Gtk/Buttons/CheckButton.chs 28 + hunk ./gtk/Graphics/UI/Gtk/Buttons/CheckButton.chs 38 +-- addfile ./gtk/Graphics/UI/Gtk/Buttons/LinkButton.chs.pp hunk ./gtk/Graphics/UI/Gtk/Buttons/LinkButton.chs.pp 1 +-- -*-haskell-*- +-- GIMP Toolkit (GTK) Widget LinkButton +-- +-- Author : Andy Stewart +-- +-- Created: 22 Mar 2010 +-- +-- Copyright (C) 2010 Andy Stewart +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License, or (at your option) any later version. +-- +-- This library is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- | +-- Maintainer : gtk...@li... +-- Stability : provisional +-- Portability : portable (depends on GHC) +-- +-- Create buttons bound to a URL +-- +-- * Module available since Gtk+ version 2.10 +-- +module Graphics.UI.Gtk.Buttons.LinkButton ( + +-- * Detail +-- +-- | A 'LinkButton' is a 'Button' with a hyperlink, similar to the one used by +-- web browsers, which triggers an action when clicked. It is useful to show +-- quick links to resources. +-- +-- A link button is created by calling either 'linkButtonNew' or +-- 'linkButtonNewWithLabel'. If using the former, the URI you pass to the +-- constructor is used as a label for the widget. +-- +-- The URI bound to a 'LinkButton' can be set specifically using +-- 'linkButtonSetURI', and retrieved using 'linkButtonGetURI'. +-- +-- 'LinkButton' offers a global hook, which is called when the used clicks +-- on it: see 'linkButtonSetURIHook'. +-- +-- 'LinkButton' was added in Gtk+ 2.10. + +-- * Class Hierarchy +-- +-- | +-- @ +-- | 'GObject' +-- | +----'Object' +-- | +----'Widget' +-- | +----'Container' +-- | +----'Bin' +-- | +----'Button' +-- | +----LinkButton +-- @ + +#if GTK_CHECK_VERSION(2,10,0) +-- * Types + LinkButton, + LinkButtonClass, + LinkButtonUri, + castToLinkButton, + toLinkButton, + +-- * Constructors + linkButtonNew, + linkButtonNewWithLabel, + +-- * Methods + linkButtonSetURIHook, + +-- * Attributes + linkButtonURI, + linkButtonVisited, + +-- * Deprecated +#ifndef DISABLE_DEPRECATED + linkButtonGetURI, + linkButtonSetURI, +#if GTK_CHECK_VERSION(2,14,0) + linkButtonGetVisited, + linkButtonSetVisited, +#endif +#endif +#endif + ) where + +import Control.Monad (liftM, unless) + +import System.Glib.FFI +import System.Glib.UTFString +import System.Glib.Attributes +import System.Glib.Properties +import Graphics.UI.Gtk.Abstract.Object (makeNewObject) +{#import Graphics.UI.Gtk.Types#} +{#import Graphics.UI.Gtk.Signals#} + +{# context lib="gtk" prefix="gtk" #} + +#if GTK_CHECK_VERSION(2,10,0) + +-------------------- +-- Types [_$_] +type LinkButtonUri = String -> () + +{#pointer LinkButtonUriFunc#} + +foreign import ccall "wrapper" mkLinkButtonUriFunc :: + (Ptr LinkButton -> CString -> Ptr () -> IO ()) + -> IO LinkButtonUriFunc + +-------------------- +-- Constructors + +-- | Creates a new 'LinkButton' with the URI as its text. +-- +linkButtonNew :: + String -- ^ @uri@ - a valid URI + -> IO LinkButton +linkButtonNew uri = + makeNewObject mkLinkButton $ + liftM (castPtr :: Ptr Widget -> Ptr LinkButton) $ + withUTFString uri $ \uriPtr -> + {# call gtk_link_button_new #} + uriPtr + +-- | Creates a new 'LinkButton' containing a label. +-- +linkButtonNewWithLabel :: + String -- ^ @uri@ - a valid URI + -> String -- ^ @label@ - the text of the button + -> IO LinkButton +linkButtonNewWithLabel uri label = + makeNewObject mkLinkButton $ + liftM (castPtr :: Ptr Widget -> Ptr LinkButton) $ + withUTFString label $ \labelPtr -> + withUTFString uri $ \uriPtr -> + {# call gtk_link_button_new_with_label #} + uriPtr + labelPtr + +-------------------- +-- Methods + +#ifndef DISABLE_DEPRECATED +linkButtonGetURI :: LinkButtonClass self => self + -> IO String -- ^ returns a valid URI. The returned string is owned by the + -- link button and should not be modified or freed. +linkButtonGetURI self = + {# call gtk_link_button_get_uri #} + (toLinkButton self) + >>= peekUTFString +{-# DEPRECATED linkButtonGetURI "instead of 'linkButtonGetURI obj' use 'get obj linkButtonURI'" #-} + +linkButtonSetURI :: LinkButtonClass self => self + -> String -- ^ @uri@ - a valid URI + -> IO () +linkButtonSetURI self uri = + withUTFString uri $ \uriPtr -> + {# call gtk_link_button_set_uri #} + (toLinkButton self) + uriPtr +{-# DEPRECATED linkButtonSetURI "instead of 'linkButtonSetURI obj value' use 'set obj [ linkButtonURI := value ]'" #-} +#endif + +-- | Sets @func@ as the function that should be invoked every time a user +-- clicks a 'LinkButton'. This function is called before every callback +-- registered for the \"clicked\" signal. +-- +-- If no uri hook has been set, Gtk+ defaults to calling 'showURI'. +-- +linkButtonSetURIHook :: Maybe LinkButtonUri + -> DestroyNotify [_$_] + -> IO () +linkButtonSetURIHook func destroy = do + pfPtr <- case func of + Just pf -> mkLinkButtonUriFunc $ \_ cstr _ -> do + str <- peekCString cstr + return (pf str) + Nothing -> return nullFunPtr + {# call gtk_link_button_set_uri_hook #} pfPtr nullPtr destroy + unless (pfPtr == nullFunPtr) $ freeHaskellFunPtr pfPtr + [_$_] +#ifndef DISABLE_DEPRECATED + +#if GTK_CHECK_VERSION(2,14,0) +linkButtonGetVisited :: LinkButtonClass self => self + -> IO Bool -- ^ returns @True@ if the link has been visited, @False@ + -- otherwise +linkButtonGetVisited self = + liftM toBool $ + {# call gtk_link_button_get_visited #} + (toLinkButton self) +{-# DEPRECATED linkButtonGetVisited "instead of 'linkButtonGetVisited obj' use 'get obj linkButtonVisited'" #-} + +linkButtonSetVisited :: LinkButtonClass self => self + -> Bool -- ^ @visited@ - the new \'visited\' state + -> IO () +linkButtonSetVisited self visited = + {# call gtk_link_button_set_visited #} + (toLinkButton self) + (fromBool visited) +{-# DEPRECATED linkButtonSetVisited "instead of 'linkButtonSetVisited obj value' use 'set obj [ linkButtonVisited := value ]'" #-} +#endif +#endif + +-------------------- +-- Attributes + +-- | +-- +linkButtonURI :: LinkButtonClass self => Attr self String +linkButtonURI = newAttrFromStringProperty "uri" + +-- | +-- +linkButtonVisited :: LinkButtonClass self => Attr self Bool +linkButtonVisited = newAttrFromBoolProperty "visited" +#endif hunk ./gtk/Graphics/UI/Gtk/Buttons/RadioButton.chs.pp 8 --- Copyright (C) 1999-2005 Axel Simon +-- Copyright (C) 1999-2009 Axel Simon hunk ./gtk/Graphics/UI/Gtk/Buttons/RadioButton.chs.pp 34 + hunk ./gtk/Graphics/UI/Gtk/Buttons/RadioButton.chs.pp 90 +-- addfile ./gtk/Graphics/UI/Gtk/Buttons/ScaleButton.chs.pp hunk ./gtk/Graphics/UI/Gtk/Buttons/ScaleButton.chs.pp 1 +-- -*-haskell-*- +-- GIMP Toolkit (GTK) Widget ScaleButton +-- +-- Author : Andy Stewart +-- +-- Created: 22 Mar 2010 +-- +-- Copyright (C) 2010 Andy Stewart +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License, or (at your option) any later version. +-- +-- This library is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- | +-- Maintainer : gtk...@li... +-- Stability : provisional +-- Portability : portable (depends on GHC) +-- +-- A button which pops up a scale +-- +-- * Module available since Gtk+ version 2.12 +-- +module Graphics.UI.Gtk.Buttons.ScaleButton ( + +-- * Detail +-- +-- | 'ScaleButton' provides a button which pops up a scale widget. This kind +-- of widget is commonly used for volume controls in multimedia applications, +-- and Gtk+ provides a 'VolumeButton' subclass that is tailored for this use +-- case. + +-- * Class Hierarchy +-- +-- | +-- @ +-- | 'GObject' +-- | +----'Object' +-- | +----'Widget' +-- | +----'Container' +-- | +----'Bin' +-- | +----'Button' +-- | +----ScaleButton +-- | +----'VolumeButton' +-- @ + +#if GTK_CHECK_VERSION(2,12,0) +-- * Types + ScaleButton, + ScaleButtonClass, + castToScaleButton, + toScaleButton, + +-- * Constructors + scaleButtonNew, + +-- * Methods + scaleButtonSetIcons, +#if GTK_CHECK_VERSION(2,14,0) + scaleButtonGetPopup, + scaleButtonGetPlusButton, + scaleButtonGetMinusButton, +#endif + +-- * Attributes + scaleButtonValue, + scaleButtonSize, + scaleButtonAdjustment, + -- scaleButtonIcons, + +-- * Signals + scaleButtonPopdown, + scaleButtonPopup, + scaleButtonValueChanged, + +-- * Deprecated +#ifndef DISABLE_DEPRECATED + scaleButtonSetAdjustment, + scaleButtonSetValue, + scaleButtonGetAdjustment, + scaleButtonGetValue, +#endif +#endif + ) where + +import Control.Monad (liftM) + +import System.Glib.FFI +import System.Glib.UTFString +import System.Glib.Attributes +import System.Glib.Properties +import Graphics.UI.Gtk.Abstract.Object (makeNewObject) +import Graphics.UI.Gtk.General.Structs (IconSize(..)) +{#import Graphics.UI.Gtk.Types#} +{#import Graphics.UI.Gtk.Signals#} + +{# context lib="gtk" prefix="gtk" #} + +#if GTK_CHECK_VERSION(2,12,0) +-------------------- +-- Interfaces + +-- instance OrientableClass ScaleButton + +-------------------- +-- Constructors + +-- | Creates a 'ScaleButton', with a range between @min@ and @max@, with a +-- stepping of @step@. +-- +scaleButtonNew :: + IconSize -- ^ @size@ - a stock icon size + -> Double -- ^ @min@ - the minimum value of the scale (usually 0) + -> Double -- ^ @max@ - the maximum value of the scale (usually 100) + -> Double -- ^ @step@ - the stepping of value when a scroll-wheel event, or + -- up\/down arrow event occurs (usually 2) + -> [String] -- ^ @icons@ + -> IO ScaleButton +scaleButtonNew size min max step icons = + makeNewObject mkScaleButton $ + liftM (castPtr :: Ptr Widget -> Ptr ScaleButton) $ + withUTFStringArray0 icons $ \iconsPtr -> + {# call gtk_scale_button_new #} + ((fromIntegral . fromEnum) size) + (realToFrac min) + (realToFrac max) + (realToFrac step) + iconsPtr + +-------------------- +-- Methods + +#ifndef DISABLE_DEPRECATED +scaleButtonSetAdjustment :: ScaleButtonClass self => self + -> Adjustment -- ^ @adjustment@ - a 'Adjustment' + -> IO () +scaleButtonSetAdjustment self adjustment = + {# call gtk_scale_button_set_adjustment #} + (toScaleButton self) + adjustment +{-# DEPRECATED scaleButtonSetAdjustment "instead of 'scaleButtonSetAdjustment obj value' use 'set obj [ scaleButtonAdjustment := value ]'" #-} +#endif + +-- | Sets the icons to be used by the scale button. For details, see the "icons" property. +scaleButtonSetIcons :: ScaleButtonClass self => self + -> [String] -- ^ @icons@ + -> IO () +scaleButtonSetIcons self icons = + withUTFStringArray0 icons $ \iconsPtr -> + {# call gtk_scale_button_set_icons #} + (toScaleButton self) + iconsPtr + +#ifndef DISABLE_DEPRECATED +scaleButtonSetValue :: ScaleButtonClass self => self + -> Double -- ^ @value@ - new value of the scale button + -> IO () +scaleButtonSetValue self value = + {# call gtk_scale_button_set_value #} + (toScaleButton self) + (realToFrac value) +{-# DEPRECATED scaleButtonSetValue "instead of 'scaleButtonSetValue obj value' use 'set obj [ scaleButtonValue := value ]'" #-} + +scaleButtonGetAdjustment :: ScaleButtonClass self => self + -> IO Adjustment -- ^ returns the adjustment associated with the scale +scaleButtonGetAdjustment self = + makeNewObject mkAdjustment $ + {# call gtk_scale_button_get_adjustment #} + (toScaleButton self) +{-# DEPRECATED scaleButtonGetAdjustment "instead of 'scaleButtonGetAdjustment obj' use 'get obj scaleButtonAdjustment'" #-} + +scaleButtonGetValue :: ScaleButtonClass self => self + -> IO Double -- ^ returns current value of the scale button +scaleButtonGetValue self = + liftM realToFrac $ + {# call gtk_scale_button_get_value #} + (toScaleButton self) +{-# DEPRECATED scaleButtonGetValue "instead of 'scaleButtonGetValue obj' use 'get obj scaleButtonValue'" #-} +#endif + +#if GTK_CHECK_VERSION(2,14,0) +-- | Retrieves the popup of the 'ScaleButton'. +-- +-- * Available since Gtk+ version 2.14 +-- +scaleButtonGetPopup :: ScaleButtonClass self => self + -> IO Widget -- ^ returns the popup of the 'ScaleButton' +scaleButtonGetPopup self = + makeNewObject mkWidget $ + {# call gtk_scale_button_get_popup #} + (toScaleButton self) + +-- | Retrieves the plus button of the 'ScaleButton'. +-- +-- * Available since Gtk+ version 2.14 +-- +scaleButtonGetPlusButton :: ScaleButtonClass self => self + -> IO Widget -- ^ returns the plus button of the 'ScaleButton'. +scaleButtonGetPlusButton self = + makeNewObject mkWidget $ + {# call gtk_scale_button_get_plus_button #} + (toScaleButton self) + +-- | Retrieves the minus button of the 'ScaleButton'. +-- +-- * Available since Gtk+ version 2.14 +-- +scaleButtonGetMinusButton :: ScaleButtonClass self => self + -> IO Widget -- ^ returns the minus button of the 'ScaleButton'. +scaleButtonGetMinusButton self = + makeNewObject mkWidget $ + {# call gtk_scale_button_get_minus_button #} + (toScaleButton self) +#endif + +-------------------- +-- Attributes + +-- | The value of the scale. +-- [_$_] +-- Default value: 0 +scaleButtonValue :: ScaleButtonClass self => Attr self Double +scaleButtonValue = newAttrFromDoubleProperty "value" + +-- | The icon size. +-- [_$_] +-- Default value: ''IconSizeSmallToolbar'' +scaleButtonSize :: ScaleButtonClass self => Attr self IconSize +scaleButtonSize = newAttrFromEnumProperty "size" + {# call pure unsafe gtk_icon_size_get_type #} + +-- | The 'Adjustment' that contains the current value of this scale button object. +scaleButtonAdjustment :: ScaleButtonClass self => Attr self Adjustment +scaleButtonAdjustment = newAttrFromObjectProperty "adjustment" + {# call pure unsafe gtk_adjustment_get_type #} + +-- | The names of the icons to be used by the scale button. The first item in the array will be used in +-- the button when the current value is the lowest value, the second item for the highest value. All +-- the subsequent icons will be used for all the other values, spread evenly over the range of values. +-- [_$_] +-- If there's only one icon name in the icons array, it will be used for all the values. If only two +-- icon names are in the icons array, the first one will be used for the bottom 50% of the scale, and +-- the second one for the top 50%. +-- [_$_] +-- It is recommended to use at least 3 icons so that the 'ScaleButton' reflects the current value of +-- the scale better for the users. +-- [_$_] +-- Since 2.12 +-- scaleButtonIcons :: ScaleButtonClass self => Attr self [String] +-- scaleButtonIcons = newAttrFromStringsProperty "icons" + +-------------------- +-- Signals + +-- | The ::value-changed signal is emitted when the value field has changed. +-- +scaleButtonValueChanged :: ScaleButtonClass self => Signal self (Double -> IO ()) +scaleButtonValueChanged = Signal (connect_DOUBLE__NONE "value-changed") + +-- | The 'popup' signal is a keybinding signal which gets emitted to popup the scale widget. +-- [_$_] +-- The default bindings for this signal are Space, Enter and Return. +scaleButtonPopup :: ScaleButtonClass self => Signal self (IO ()) +scaleButtonPopup = Signal (connect_NONE__NONE "popup") + +-- | The 'popdown' signal is a keybinding signal which gets emitted to popdown the scale widget. +-- [_$_] +-- The default binding for this signal is Escape. +scaleButtonPopdown :: ScaleButtonClass self => Signal self (IO ()) +scaleButtonPopdown = Signal (connect_NONE__NONE "popdown") +#endif hunk ./gtk/Graphics/UI/Gtk/Buttons/ToggleButton.chs.pp 8 --- Copyright (C) 1999-2005 Axel Simon +-- Copyright (C) 1999-2009 Axel Simon hunk ./gtk/Graphics/UI/Gtk/Buttons/ToggleButton.chs.pp 28 + addfile ./gtk/Graphics/UI/Gtk/Buttons/VolumeButton.chs.pp hunk ./gtk/Graphics/UI/Gtk/Buttons/VolumeButton.chs.pp 1 +-- -*-haskell-*- +-- GIMP Toolkit (GTK) Widget VolumeButton +-- +-- Author : Andy Stewart +-- +-- Created: 22 Mar 2010 +-- +-- Copyright (C) 2010 Andy Stewart +-- +-- This library is free software; you can redistribute it and/or +-- modify it under the terms of the GNU Lesser General Public +-- License as published by the Free Software Foundation; either +-- version 2.1 of the License, or (at your option) any later version. +-- +-- This library is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +-- Lesser General Public License for more details. +-- +-- | +-- Maintainer : gtk...@li... +-- Stability : provisional +-- Portability : portable (depends on GHC) +-- +-- A button which pops up a volume control +-- +-- * Module available since Gtk+ version 2.12 +-- +module Graphics.UI.Gtk.Buttons.VolumeButton ( + +-- * Detail +-- +-- | 'VolumeButton' is a subclass of 'ScaleButton' that has been tailored for +-- use as a volume control widget with suitable icons, tooltips and accessible +-- labels. + +-- * Class Hierarchy +-- +-- | +-- @ +-- | 'GObject' +-- | +----'Object' +-- | +----'Widget' +-- | +----'Container' +-- | +----'Bin' +-- | +----'Button' +-- | +----'ScaleButton' +-- | +----VolumeButton +-- @ + +#if GTK_CHECK_VERSION(2,12,0) +-- * Types + VolumeButton, + VolumeButtonClass, + castToVolumeButton, + toVolumeButton, + +-- * Constructors + volumeButtonNew, +#endif + ) where + +import Control.Monad (liftM) + +import System.Glib.FFI +import Graphics.UI.Gtk.Abstract.Object (makeNewObject) +{#import Graphics.UI.Gtk.Types#} + +{# context lib="gtk" prefix="gtk" #} + +#if GTK_CHECK_VERSION(2,12,0) +-------------------- +-- Constructors + +-- | Creates a 'VolumeButton', with a range between 0.0 and 1.0, with a +-- stepping of 0.02. Volume values can be obtained and modified using the +-- functions from 'ScaleButton'. +-- +volumeButtonNew :: IO VolumeButton +volumeButtonNew = + makeNewObject mkVolumeButton $ + liftM (castPtr :: Ptr Widget -> Ptr VolumeButton) $ + {# call gtk_volume_button_new #} +#endif hunk ./tools/hierarchyGen/hierarchy.list 66 + GtkScaleButton + GtkVolumeButton + GtkLinkButton |