Hi Axel, I don't know how to handle iconViewGetTooltipContext, can you take a look?
Thanks, -- Andy Andy Stewart <lazycat.mana...@gmail.com> writes: > 1 patch for repository andystew...@code.haskell.org:/srv/code/gtk2hs: > > Wed Jun 2 00:52:55 CST 2010 Andy Stewart <lazycat.mana...@gmail.com> > * Add IconView support functions for Tooltip.chs (need help with > `iconViewGetTooltipContext`) > > > New patches: > > [Add IconView support functions for Tooltip.chs (need help with > `iconViewGetTooltipContext`) > Andy Stewart <lazycat.mana...@gmail.com>**20100601165255 > Ignore-this: 3349d7261460d91f6625c8bb517f6043 > ] { > hunk ./gtk/Graphics/UI/Gtk/ModelView/IconView.chs 102 > iconViewGetCursor, > iconViewScrollToPath, > iconViewGetVisibleRange, > +#if GTK_CHECK_VERSION(2,12,0) > + iconViewSetTooltipItem, > + iconViewSetTooltipCell, > + -- iconViewGetTooltipContext, > +#endif > #if GTK_CHECK_VERSION(2,10,0) > iconViewEnableModelDragSource, > iconViewEnableModelDragDest, > hunk ./gtk/Graphics/UI/Gtk/ModelView/IconView.chs 120 > -- * Attributes > iconViewSelectionMode, > iconViewTextColumn, > + iconViewTooltipColumn, > iconViewMarkupColumn, > iconViewPixbufColumn, > iconViewModel, > hunk ./gtk/Graphics/UI/Gtk/ModelView/IconView.chs 726 > l <- fromTreePath lPtr > return (Just (f,l)) > > +#if GTK_CHECK_VERSION(2,12,0) > +-- | Sets the tip area of @tooltip@ to be the area covered by the item at > +-- @p...@. See also 'iconViewSetTooltipColumn' for a simpler alternative. See > +-- also 'tooltipSetTipArea'. > +-- > +-- * Available since Gtk+ version 2.12 > +-- > +iconViewSetTooltipItem :: (IconViewClass self, TooltipClass tooltip) => self > + -> tooltip -- ^ @tooltip@ - a 'Tooltip' > + -> TreePath -- ^ @path@ - a 'TreePath' > + -> IO () > +iconViewSetTooltipItem self tooltip path = > + withTreePath path $ \path -> > + {# call gtk_icon_view_set_tooltip_item #} > + (toIconView self) > + (toTooltip tooltip) > + path > + > +-- | Sets the tip area of @tooltip@ to the area which @cell@ occupies in the > +-- item pointed to by @p...@. See also 'tooltipSetTipArea'. > +-- > +-- See also 'iconViewSetTooltipColumn' for a simpler alternative. > +-- > +-- * Available since Gtk+ version 2.12 > +-- > +iconViewSetTooltipCell :: (IconViewClass self, TooltipClass tooltip, > CellRendererClass cell) => self > + -> tooltip -- ^ @tooltip@ - a 'Tooltip' > + -> TreePath -- ^ @path@ - a 'TreePath' > + -> Maybe cell -- ^ @cell@ a 'CellRenderer' or 'Nothing'. > + -> IO () > +iconViewSetTooltipCell self tooltip path cell = > + withTreePath path $ \path -> > + {# call gtk_icon_view_set_tooltip_cell #} > + (toIconView self) > + (toTooltip tooltip) > + path > + (maybe (CellRenderer nullForeignPtr) toCellRenderer cell) > + > +-- | This function is supposed to be used in a 'queryTooltip' signal handler > for 'IconView'. The x, y > +-- and @keyboardTip@ values which are received in the signal handler, should > be passed to this function > +-- without modification. > +-- > +-- The return value indicates whether there is an icon view item at the > given coordinates ('True') or not > +-- ('False') for mouse tooltips. For keyboard tooltips the item returned > will be the cursor item. When > +-- 'True', then any of model, path and iter which have been provided will be > set to point to that row and > +-- the corresponding model. x and y will always be converted to be relative > to @iconView@'s @binWindow@ > +-- if @keyboardTooltip@ is 'False'. > +-- > +-- * Available since Gtk+ version 2.12 > +-- > +-- iconViewGetTooltipContext :: IconViewClass self => self > +-- -> Int -- ^ @x@ the x coordinate (relative to widget > coordinates) > +-- -> Int -- ^ @y@ the y coordinate (relative to widget > coordinates) > +-- -> Bool -- ^ @keyboardTip@ whether this is a keyboard tooltip or not > > +-- -> IO (Maybe (TreeModel, TreePath, TreeIter)) > +-- iconViewGetTooltipContext self x y keyboardTip = > +-- alloca $ \treeModelPtr -> > +-- alloca $ \treePathPtr -> > +-- alloca $ \treeIterPtr -> do > +-- success <- liftM toBool $ > +-- {#call gtk_icon_view_get_tooltip_context #} > +-- (toIconView self) > +-- (fromIntegral x) > +-- (fromIntegral y) > +-- (fromBool keyboardTip) > +-- treeModelPtr > +-- treePathPtr > +-- treeIterPtr > +-- if success > +-- then do > +-- treeModel <- makeNewGObject mkTreeModel (return treeModelPtr) > +-- treePath <- fromTreePath treePathPtr > +-- treeIter <- peek treeIterPtr > +-- return (Just (treeModel, treePath, treeIter)) > +-- else return Nothing > +#endif > + > #if GTK_CHECK_VERSION(2,10,0) > -- %hash c:bd16 d:3f4f > -- | Turns @iconView@ into a drag source for automatic DND. > hunk ./gtk/Graphics/UI/Gtk/ModelView/IconView.chs 947 > iconViewGetTextColumn > iconViewSetTextColumn > > +-- | The column in the model containing the tooltip texts for the items. > +-- > +-- Allowed values: >= GMaxulong > +-- > +-- Default value: -1 > +iconViewTooltipColumn :: IconViewClass self => Attr self Int > +iconViewTooltipColumn = newAttrFromIntProperty "tooltip_column" > + > -- %hash c:37cb d:ee83 > -- | The 'iconViewMarkupColumn' property contains the number of the model > column > -- containing markup information to be displayed. If this property and the > } > > Context: > > [Fix `widgetTooltipMarkup` and docs. > Andy Stewart <lazycat.mana...@gmail.com>**20100601144701 > Ignore-this: 3fc33fd561f18f221d8b7b0215c71826 > ] > [Fix function `tooltipSetMarkup` > Andy Stewart <lazycat.mana...@gmail.com>**20100601143948 > Ignore-this: b4af7ecca1bc74b22e20727f33729a8b > ] > [Add Widget support functions for Tooltip.chs > Andy Stewart <lazycat.mana...@gmail.com>**20100601140304 > Ignore-this: 6b10098119f7a416d763c834bd892cae > ] > [Add Tooltip.chs (The new module to replace Tooltips.chs) > Andy Stewart <lazycat.mana...@gmail.com>**20100601131828 > Ignore-this: ca64d1d45d3c526494a41fb537d16c6c > ] > [Clean bootstrap.sh > Andy Stewart <lazycat.mana...@gmail.com>**20100601122113 > Ignore-this: f59b5f9bf21945c39258a39432621a03 > ] > [Note that Cabal 1.8 is required for ghci support under Windows. > axel.si...@in.tum.de**20100527181310 > Ignore-this: 1c5fc3bb7ad83f5d1094e0083ddd9913 > ] > [Do not query g_object_get_type as it only exists in newer Gtk+ versions. > axel.si...@in.tum.de**20100527163435 > Ignore-this: 70d62f66a2eb159c7fd3e23079c5debf > ] > [Remove gnomevfs sourceview mozembed since those packages has deprecated. > Andy Stewart <lazycat.mana...@gmail.com>**20100527124728 > Ignore-this: a1dfda3669b7417a7b09c3b4acfaa2d > > Below are backup repositories for those deprecated packages: > > * gnomevfs : http://www2.in.tum.de/~simona/gnomevfs/ > * sourceview : http://www2.in.tum.de/~simona/sourceview/ > * mozembed : http://www2.in.tum.de/~simona/mozembed/ > > ] > [Fix IconTheme.chs docs. > Andy Stewart <lazycat.mana...@gmail.com>**20100527102140 > Ignore-this: 2f2b7ab508c688cc73f1b59012966d13 > ] > [Fix Gtk2HsSetup.hs bug. > Andy Stewart <lazycat.mana...@gmail.com>**20100527095530 > Ignore-this: 1b65945da174e05d0ad2a1f01e2ee651 > ] > [Add gnomevfs demo directory. > Andy Stewart <lazycat.mana...@gmail.com>**20100527061234 > Ignore-this: 40c6dd74b460d7546937212dacf1f9e1 > ] > [Add gtk demo directory. > Andy Stewart <lazycat.mana...@gmail.com>**20100527061041 > Ignore-this: 876a827c6f1bac1a8b26a99cd68c6005 > ] > [Add cairo demo directory. > Andy Stewart <lazycat.mana...@gmail.com>**20100527051924 > Ignore-this: b1a70c2a24812fb84c899e4e8ce3ca6c > ] > [Add pango demo directory. > Andy Stewart <lazycat.mana...@gmail.com>**20100527051205 > Ignore-this: af1ff611ab459ee2b6c5bc09a3f63c11 > ] > [Fix the license of gnomevfs > Andy Stewart <lazycat.mana...@gmail.com>**20100527035350 > Ignore-this: 9ac7c768af168d6f0c7af8c8790e8643 > ] > [Fix the license of gio. > axel.si...@in.tum.de**20100526152125 > Ignore-this: 42fe27de2030e0395227f889ba5345d8 > ] > [Fix Trac #1164. toGSList was reversing lists. > m.ni...@gmail.com**20090514122933 > Ignore-this: c466eadbc5ae61ba71721fe15b44735a > ] > [Remove gconf glade gstreamer gtkglext gtksourceview2 soegtk svgcairo vte > webkit since these all now have their own repos. > axel.si...@in.tum.de**20100525211947] > [Documentation fix for EventM. > axel.si...@in.tum.de**20100525131428 > Ignore-this: 25c3bf3513ec6467cbd0febe397ab53e > ] > [Put upper bounds on base version. > axel.si...@in.tum.de**20100525082101 > Ignore-this: f92b2d9970c436c9fcbcf141fc988e8 > ] > [Make documentation parsable. > axel.si...@in.tum.de**20100525080209 > Ignore-this: 60f44b8251a9f3e933c874f72d8e8801 > ] > [Make the version test in pango less complex as Cabal 1.6 doesn't parse it > otherwise. > axel.si...@in.tum.de**20100525075706 > Ignore-this: f3446237cf66abf49e81bd4ba8ef9744 > ] > [Fix an incorrect pattern in windowSetIcon. > axel.si...@in.tum.de**20100525075639 > Ignore-this: eb596c778897b4ae4fd7f9a8dde59726 > ] > [Get rid of stock images under ./docs/reference/images > Andy Stewart <lazycat.mana...@gmail.com>**20100524235315 > Ignore-this: 1094aaf32c73ba189937e1beee24ee49 > ] > [Redirect image link to library.gnome.org and update image items to GTK+ 2.20 > Andy Stewart <lazycat.mana...@gmail.com>**20100524233947 > Ignore-this: f33362d57605d16365e4dfac59c01122 > ] > [Add an upper version to the requirement on base. > axel.si...@in.tum.de**20100524211158] > [Be more specific as to the prerequisites of packages. > axel.si...@in.tum.de**20100524210210] > [Fix docu. > axel.si...@in.tum.de**20100524210157] > [Make soegtk compile by fixing dependency on old-time and by not relying on > Gtk 2.18. > axel.si...@in.tum.de**20100524210032] > [don't mention tools in the docs for unregistering. > axel.si...@in.tum.de**20100524201401] > [TAG 0.11.0 > axel.si...@in.tum.de**20100524200857] > Patch bundle hash: > c54119d3a2cfeefe13f6dbd3c518b87be6d444a7 > > ------------------------------------------------------------------------------ > > _______________________________________________ > Gtk2hs-devel mailing list > Gtk2hs-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel ------------------------------------------------------------------------------ _______________________________________________ Gtk2hs-devel mailing list Gtk2hs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gtk2hs-devel