packages feed

gtk3 0.15.5 → 0.15.6

raw patch · 4 files changed

+43/−8 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
gtk3.cabal view
@@ -1,5 +1,5 @@ Name:           gtk3-Version:        0.15.5+Version:        0.15.6 License:        LGPL-2.1 License-file:   COPYING Copyright:      (c) 2001-2010 The Gtk2Hs Team@@ -376,7 +376,7 @@         if os(darwin) || os(freebsd)           cpp-options: -D_Nullable= -D_Nonnull= -D_Noreturn= -D__attribute__(x)=         if os(windows)-          cpp-options:    -DWIN32 -fno-exceptions+          cpp-options:    -DWIN32           cc-options:     -fno-exceptions           extra-libraries: kernel32