packages feed

gtk 0.15.5 → 0.15.7

raw patch · 4 files changed

+46/−11 lines, 4 files

Files

Graphics/UI/Gtk/Abstract/Container.chs view
@@ -415,7 +415,7 @@ -- because toplevel windows can't leave space outside, they leave the space -- inside. The border is added on all sides of the container. To add space to -- only one side, one approach is to create a 'Alignment' widget, call--- 'widgetSetUsize' to give it a size, and place it on the side of the+-- 'widgetSetSizeRequest' to give it a size, and place it on the side of the -- container as a spacer. -- containerSetBorderWidth :: ContainerClass self => self
Graphics/UI/Gtk/Abstract/Widget.chs view
@@ -232,6 +232,9 @@   widgetHasScreen, #endif   widgetGetSizeRequest,+#if GTK_CHECK_VERSION(3,0,0)+  widgetGetPreferredSize,+#endif   widgetSetChildVisible,   widgetSetSizeRequest, #if GTK_CHECK_VERSION(2,4,0)@@ -821,7 +824,7 @@  -- | This function is only for use in widget implementations. Obtains the -- chached requisition information in the widget, unless someone has forced a--- particular geometry on the widget (e.g. with 'widgetSetUsize'), in which+-- particular geometry on the widget (e.g. with 'widgetSetSizeRequest'), in which -- case it returns that geometry instead of the widget's requisition. -- -- This function differs from 'widgetSizeRequest' in that it retrieves the@@ -2405,6 +2408,37 @@   width <- peek widthPtr   height <- peek heightPtr   return (fromIntegral width, fromIntegral height)++#if GTK_CHECK_VERSION(3,0,0)+-- | Retrieves the minimum and natural size of a widget, taking into account the+-- widget’s preference for height-for-width management.+--+-- This is used to retrieve a suitable size by container widgets which do not+-- impose any restrictions on the child placement. It can be used to deduce+-- toplevel window and menu sizes as well as child widgets in free-form containers+-- such as GtkLayout.+--+-- Handle with care. Note that the natural height of a height-for-width widget+-- will generally be a smaller size than the minimum height, since the required+-- height for the natural width is generally smaller than the required height for+-- the minimum width.+--+-- Use gtk_widget_get_preferred_height_and_baseline_for_width() if you want+-- to support baseline alignment.+--+-- * Available since Gtk+ version 3.0+--++widgetGetPreferredSize :: WidgetClass self => self+ -> IO (Requisition, Requisition) -- ^ @(minimumSize, naturalSize)@+widgetGetPreferredSize self =+  alloca $ \minReqPtr ->+  alloca $ \natReqPtr -> do+  {#call gtk_widget_get_preferred_size #} (toWidget self) (castPtr minReqPtr) (castPtr natReqPtr)+  min <- peek minReqPtr+  nat <- peek natReqPtr+  return (min, nat)+#endif  -- %hash c:546d d:3c7f -- | Sets whether @widget@ should be mapped along with its when its parent is
Graphics/UI/Gtk/Misc/Viewport.chs view
@@ -82,6 +82,7 @@   ) where  import Control.Monad    (liftM)+import Data.Maybe (fromMaybe)  import System.Glib.FFI import System.Glib.Attributes@@ -97,15 +98,15 @@ -- | Creates a new 'Viewport' with the given adjustments. -- viewportNew ::-    Adjustment  -- ^ @hadjustment@ - horizontal adjustment.- -> Adjustment  -- ^ @vadjustment@ - vertical adjustment.+    Maybe Adjustment  -- ^ @hadjustment@ - horizontal adjustment.+ -> Maybe Adjustment  -- ^ @vadjustment@ - vertical adjustment.  -> IO Viewport viewportNew hadjustment vadjustment =   makeNewObject mkViewport $   liftM (castPtr :: Ptr Widget -> Ptr Viewport) $   {# call unsafe viewport_new #}-    hadjustment-    vadjustment+    (fromMaybe (Adjustment nullForeignPtr) hadjustment)+    (fromMaybe (Adjustment nullForeignPtr) vadjustment)  -------------------- -- Methods
gtk.cabal view
@@ -1,12 +1,12 @@+cabal-version:  3.0 Name:           gtk-Version:        0.15.5-License:        LGPL-2.1+Version:        0.15.7+License:        LGPL-2.1-only License-file:   COPYING Copyright:      (c) 2001-2010 The Gtk2Hs Team Author:         Axel Simon, Duncan Coutts and many others Maintainer:     gtk2hs-users@lists.sourceforge.net Build-Type:     Custom-Cabal-Version:  >= 1.24 Stability:      provisional homepage:       http://projects.haskell.org/gtk2hs/ bug-reports:    https://github.com/gtk2hs/gtk2hs/issues@@ -135,7 +135,7 @@  custom-setup   setup-depends: base >= 4.6,-                 Cabal >= 1.24 && < 3.3,+                 Cabal >= 2.0 && < 3.7,                  gtk2hs-buildtools >= 0.13.2.0 && < 0.14  Library@@ -389,7 +389,7 @@         else           x-Types-Tag:  deprecated         if os(windows)-          cpp-options:    -DWIN32 -fno-exceptions+          cpp-options:    -DWIN32           cc-options:     -fno-exceptions           extra-libraries: kernel32