From: Andy S. <And...@co...> - 2010-03-28 04:47:32
|
Sun Mar 28 00:45:22 EDT 2010 Andy Stewart <laz...@gm...> * Fix docs and change some function with Maybe Ignore-this: 6b9df4a768aad7f4be7b0a8a8f9daf6e hunk ./gtk/Graphics/UI/Gtk/Abstract/Container.chs.pp 538 - -> IO Widget -- ^ returns The child widget which has the focus inside - -- @container@, or {@NULL@, FIXME: this should probably be - -- converted to a Maybe data type} if none is set. -containerGetFocusChild self = - makeNewObject mkWidget $ - {# call gtk_container_get_focus_child #} - (toContainer self) + -> IO (Maybe Widget) -- ^ returns The child widget which has the focus inside + -- @container@, or 'Nothing' if none is set. +containerGetFocusChild self = do + childPtr <- {# call gtk_container_get_focus_child #} + (toContainer self) + if childPtr == nullPtr [_$_] + then return Nothing + else liftM Just $ makeNewObject mkWidget (return childPtr) hunk ./gtk/Graphics/UI/Gtk/Abstract/Widget.chs.pp 2126 - -> Atom -- ^ @selection@ - a {GdkAtom, FIXME: struct type} which + -> Atom -- ^ @selection@ - a 'Atom' which hunk ./gtk/Graphics/UI/Gtk/ActionMenuToolbar/Action.chs.pp 339 - -> IO Widget -- ^ returns the menu item provided by the action, or {@NULL@, - -- FIXME: this should probably be converted to a Maybe data - -- type}. -actionCreateMenu self = - makeNewObject mkWidget $ - {# call gtk_action_create_menu #} - (toAction self) + -> IO (Maybe Widget) -- ^ returns the menu item provided by the action, or 'Nothing' +actionCreateMenu self = do + widgetPtr <- {# call gtk_action_create_menu #} + (toAction self) + if widgetPtr == nullPtr + then return Nothing + else liftM Just (makeNewObject mkWidget (return widgetPtr)) hunk ./gtk/Graphics/UI/Gtk/ActionMenuToolbar/Activatable.chs.pp 43 --- '{FIXME: gtk-doc cross reference to:}' hunk ./gtk/Graphics/UI/Gtk/ActionMenuToolbar/Activatable.chs.pp 83 --- --- When implementing 'Activatable' you must call this when handling changes --- of the {\"related-action\", FIXME: unknown type\/value}, and you must also --- use this to break references in {GObject-, FIXME: unknown --- type\/value}>'dispose'. --- --- This function adds a reference to the currently set related action for --- you, it also makes sure the {GtkActivatable-, FIXME: unknown --- type\/value}>'update' method is called when the related 'Action' properties --- change and registers to the action's proxy list. --- +-- [_$_] +-- When implementing 'Activatable' you must call this when handling changes of the 'relatedAction', +-- and you must also use this to break references in GObject->dispose(). +-- [_$_] +-- This function adds a reference to the currently set related action for you, it also makes sure the +-- 'Activatable'->update() method is called when the related 'Action' properties change and registers +-- to the action's proxy list. +-- [_$_] +-- Note +-- [_$_] +-- Be careful to call this before setting the local copy of the 'Action' property, since this function +-- uses 'activatableGetAction' to retrieve the previous action hunk ./gtk/Graphics/UI/Gtk/ActionMenuToolbar/Activatable.chs.pp 103 --- | This is called to update the activatable completely, this is called --- internally when the {\"related-action\", FIXME: unknown type\/value} --- property is set or unset and by the implementing class when --- {\"use-action-appearance\", FIXME: unknown type\/value} changes. +-- | This is called to update the activatable completely, this is called internally when the +-- 'relatedAction' property is set or unset and by the implementing class when 'useActionAppearance' +-- changes. hunk ./gtk/Graphics/UI/Gtk/ActionMenuToolbar/Activatable.chs.pp 108 - -> action -- ^ @action@ - the related 'Action' or {@NULL@, FIXME: this should - -- probably be converted to a Maybe data type} + -> action -- ^ @action@ - the related 'Action' hunk ./gtk/Graphics/UI/Gtk/ActionMenuToolbar/RecentAction.chs.pp 63 - -- recentActionNewForManager, + recentActionNewForManager, hunk ./gtk/Graphics/UI/Gtk/ActionMenuToolbar/RecentAction.chs.pp 71 +import Data.Maybe (fromMaybe) hunk ./gtk/Graphics/UI/Gtk/ActionMenuToolbar/RecentAction.chs.pp 92 - -> String -- ^ @label@ - the label displayed in menu items and on buttons, or - -- {@NULL@, FIXME: this should probably be converted to a Maybe data - -- type} - -> String -- ^ @tooltip@ - a tooltip for the action, or {@NULL@, FIXME: this - -- should probably be converted to a Maybe data type} - -> String -- ^ @stockId@ - the stock icon to display in widgets representing - -- the action, or {@NULL@, FIXME: this should probably be converted - -- to a Maybe data type} + -> Maybe String -- ^ @label@ - the label displayed in menu items and on buttons, or 'Nothing' + -> Maybe String -- ^ @tooltip@ - a tooltip for the action, or 'Nothing' [_$_] + -> Maybe String -- ^ @stockId@ - the stock icon to display in widgets representing + -- the action, or 'Nothing' hunk ./gtk/Graphics/UI/Gtk/ActionMenuToolbar/RecentAction.chs.pp 100 - withUTFString stockId $ \stockIdPtr -> - withUTFString tooltip $ \tooltipPtr -> - withUTFString label $ \labelPtr -> hunk ./gtk/Graphics/UI/Gtk/ActionMenuToolbar/RecentAction.chs.pp 101 + maybeWith withUTFString label $ \labelPtr -> + maybeWith withUTFString tooltip $ \tooltipPtr -> + maybeWith withUTFString stockId $ \stockIdPtr -> hunk ./gtk/Graphics/UI/Gtk/ActionMenuToolbar/RecentAction.chs.pp 114 --- recentActionNewForManager :: RecentManagerClass manager => --- String -- ^ @name@ - a unique name for the action --- -> String -- ^ @label@ - the label displayed in menu items and on buttons, --- -- or {@NULL@, FIXME: this should probably be converted to a Maybe --- -- data type} --- -> String -- ^ @tooltip@ - a tooltip for the action, or {@NULL@, FIXME: this --- -- should probably be converted to a Maybe data type} --- -> String -- ^ @stockId@ - the stock icon to display in widgets representing --- -- the action, or {@NULL@, FIXME: this should probably be converted --- -- to a Maybe data type} --- -> manager -- ^ @manager@ - a 'RecentManager', or {@NULL@, FIXME: this should --- -- probably be converted to a Maybe data type} for using the --- -- default 'RecentManager' --- -> IO RecentAction --- recentActionNewForManager name label tooltip stockId manager = --- constructNewGObject mkRecentAction $ --- withUTFString stockId $ \stockIdPtr -> --- withUTFString tooltip $ \tooltipPtr -> --- withUTFString label $ \labelPtr -> --- withUTFString name $ \namePtr -> --- {# call gtk_recent_action_new_for_manager #} --- namePtr --- labelPtr --- tooltipPtr --- stockIdPtr --- (toRecentAction manager) +recentActionNewForManager :: RecentManagerClass manager => + String -- ^ @name@ - a unique name for the action + -> Maybe String -- ^ @label@ - the label displayed in menu items and on buttons, + -- or 'Nothing' + -> Maybe String -- ^ @tooltip@ - a tooltip for the action, or 'Nothing' + -> Maybe String -- ^ @stockId@ - the stock icon to display in widgets representing + -- the action, or 'Nothing' + -> Maybe manager -- ^ @manager@ - a 'RecentManager', or 'Nothing' for using the + -- default 'RecentManager' + -> IO RecentAction +recentActionNewForManager name label tooltip stockId Nothing = + constructNewGObject mkRecentAction $ liftM castPtr $ + withUTFString name $ \namePtr -> + maybeWith withUTFString label $ \labelPtr -> + maybeWith withUTFString tooltip $ \tooltipPtr -> + maybeWith withUTFString stockId $ \stockIdPtr -> do + {# call gtk_recent_action_new_for_manager #} + namePtr + labelPtr + tooltipPtr + stockIdPtr + (RecentManager nullForeignPtr) +recentActionNewForManager name label tooltip stockId (Just manager) = + constructNewGObject mkRecentAction $ liftM castPtr $ + withUTFString name $ \namePtr -> + maybeWith withUTFString label $ \labelPtr -> + maybeWith withUTFString tooltip $ \tooltipPtr -> + maybeWith withUTFString stockId $ \stockIdPtr -> do + {# call gtk_recent_action_new_for_manager #} + namePtr + labelPtr + tooltipPtr + stockIdPtr + (toRecentManager manager) hunk ./gtk/Graphics/UI/Gtk/Display/InfoBar.chs.pp 52 --- * Simple GtkInfoBar usage. --- --- > FIXME: if the follwing is a C code example, port it to Haskell or remove it --- > [_$_] --- > /* set up info bar */ --- > info_bar = gtk_info_bar_new (); --- > gtk_widget_set_no_show_all (info_bar, TRUE); --- > message_label = gtk_label_new (""); --- > gtk_widget_show (message_label); --- > content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (info_bar)); --- > gtk_container_add (GTK_CONTAINER (content_area), message_label); --- > gtk_info_bar_add_button (GTK_INFO_BAR (info_bar), --- > GTK_STOCK_OK, GTK_RESPONSE_OK); --- > g_signal_connect (info_bar, "response", --- > G_CALLBACK (gtk_widget_hide), NULL); --- > gtk_table_attach (GTK_TABLE (table), --- > info_bar, --- > 0, 1, 2, 3, --- > GTK_EXPAND | GTK_FILL, 0, --- > 0, 0); --- > [_$_] --- > /* ... */ --- > [_$_] --- > /* show an error message */ --- > gtk_label_set_text (GTK_LABEL (message_label), error_message); --- > gtk_info_bar_set_message_type (GTK_INFO_BAR (info_bar), --- > GTK_MESSAGE_ERROR); --- > gtk_widget_show (info_bar); --- --- '{FIXME: gtk-doc cross reference to:}' - hunk ./gtk/Graphics/UI/Gtk/Display/InfoBar.chs.pp 135 --- | Add an activatable widget to the action area of a 'InfoBar', connecting a --- signal handler that will emit the {\"response\", FIXME: unknown type\/value} --- signal on the message area when the widget is activated. The widget is --- appended to the end of the message areas action area. +-- | Add an activatable widget to the action area of a 'InfoBar', connecting a signal handler that will +-- emit the "response" signal on the message area when the widget is activated. The widget is appended +-- to the end of the message areas action area. hunk ./gtk/Graphics/UI/Gtk/Display/StatusIcon.chs.pp 464 --- FIXME: it's a partial binding, the potentially returned Screen is ignored --- %hash c:7939 d:5ea hunk ./gtk/Graphics/UI/Gtk/Embedding/Socket.chs.pp 192 - -> IO DrawWindow -- ^ returns the window of the plug if available, or - -- {@NULL@, FIXME: this should probably be converted to a - -- Maybe data type} -socketGetPlugWindow self = - makeNewGObject mkDrawWindow $ - {# call gtk_socket_get_plug_window #} - (toSocket self) + -> IO (Maybe DrawWindow) -- ^ returns the window of the plug if available, [_$_] + -- or 'Nothing' [_$_] +socketGetPlugWindow self = do + winPtr <- {# call gtk_socket_get_plug_window #} + (toSocket self) + if winPtr == nullPtr + then return Nothing + else liftM Just $ (makeNewGObject mkDrawWindow (return winPtr)) hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 222 +import Data.Maybe (fromMaybe) hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 404 - -- the cursor is moved, or {@NULL@, FIXME: this should probably - -- be converted to a Maybe data type} + -- the cursor is moved hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 412 - -> IO Adjustment -- ^ returns the horizontal cursor adjustment, or {@NULL@, - -- FIXME: this should probably be converted to a Maybe data - -- type} if none has been set. + -> IO Adjustment -- ^ returns the horizontal cursor adjustment hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 657 --- If @pixbuf@ is {@NULL@, FIXME: this should probably be converted to a --- Maybe data type}, no icon will be shown in the specified position. +-- If @pixbuf@ is 'Nothing', no icon will be shown in the specified position. hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 663 - -> Pixbuf -- ^ @pixbuf@ - A 'Pixbuf', or {@NULL@, FIXME: this - -- should probably be converted to a Maybe data type} + -> Maybe Pixbuf -- ^ @pixbuf@ - A 'Pixbuf', or 'Nothing' hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 669 - pixbuf + (fromMaybe (Pixbuf nullForeignPtr) pixbuf) hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 674 --- If @stockId@ is {@NULL@, FIXME: this should probably be converted to a --- Maybe data type}, no icon will be shown in the specified position. +-- If @stockId@ is 'Nothing', no icon will be shown in the specified position. hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 680 - -> String -- ^ @stockId@ - The name of the stock item, or {@NULL@, - -- FIXME: this should probably be converted to a Maybe - -- data type} + -> Maybe String -- ^ @stockId@ - The name of the stock item, or 'Nothing' hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 683 - withUTFString stockId $ \stockIdPtr -> + maybeWith withUTFString stockId $ \stockIdPtr -> hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 695 --- If @iconName@ is {@NULL@, FIXME: this should probably be converted to a --- Maybe data type}, no icon will be shown in the specified position. +-- If @iconName@ is 'Nothing', no icon will be shown in the specified position. hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 701 - -> String -- ^ @iconName@ - An icon name, or {@NULL@, FIXME: this - -- should probably be converted to a Maybe data type} + -> Maybe String -- ^ @iconName@ - An icon name, or 'Nothing' hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 704 - withUTFString iconName $ \iconNamePtr -> + maybeWith withUTFString iconName $ \iconNamePtr -> hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 714 --- If @icon@ is {@NULL@, FIXME: this should probably be converted to a Maybe --- data type}, no icon will be shown in the specified position. +-- If @icon@ is 'Nothing', no icon will be shown in the specified position. hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 720 --- -> GIcon -- ^ @icon@ - The icon to set, or {@NULL@, FIXME: this --- -- should probably be converted to a Maybe data type} +-- -> Maybe GIcon -- ^ @icon@ - The icon to set, or 'Nothing' hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 743 --- --- Unlike the other methods of setting and getting icon data, this method --- will work regardless of whether the icon was set using a 'Pixbuf', a {GIcon, --- FIXME: unknown type\/value}, a stock item, or an icon name. +-- [_$_] +-- Unlike the other methods of setting and getting icon data, this method will work regardless of +-- whether the icon was set using a 'Pixbuf', a GIcon, a stock item, or an icon name. hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 751 - -> IO Pixbuf -- ^ returns A 'Pixbuf', or {@NULL@, FIXME: this should - -- probably be converted to a Maybe data type} if no icon + -> IO (Maybe Pixbuf) -- ^ returns A 'Pixbuf', or 'Nothing' if no icon hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 753 -entryGetIconPixbuf self iconPos = - makeNewGObject mkPixbuf $ - {# call entry_get_icon_pixbuf #} - (toEntry self) - ((fromIntegral . fromEnum) iconPos) +entryGetIconPixbuf self iconPos = do + pixbufPtr <- {# call entry_get_icon_pixbuf #} + (toEntry self) + ((fromIntegral . fromEnum) iconPos) + if pixbufPtr == nullPtr + then return Nothing + else liftM Just (makeNewGObject mkPixbuf (return pixbufPtr)) hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 761 --- | Retrieves the stock id used for the icon, or {@NULL@, FIXME: this should --- probably be converted to a Maybe data type} if there is no icon or if the --- icon was set by some other method (e.g., by pixbuf, icon name or gicon). +-- | Retrieves the stock id used for the icon, or 'Nothing' if there is no icon or if the icon was set by some +-- other method (e.g., by pixbuf, icon name or gicon). hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 768 - -> IO String -- ^ returns A stock id, or {@NULL@, FIXME: this should - -- probably be converted to a Maybe data type} if no icon + -> IO (Maybe String) -- ^ returns A stock id, or 'Nothing' if no icon hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 770 -entryGetIconStock self iconPos = - {# call entry_get_icon_stock #} - (toEntry self) - ((fromIntegral . fromEnum) iconPos) - >>= peekUTFString +entryGetIconStock self iconPos = do + strPtr <- {# call entry_get_icon_stock #} + (toEntry self) + ((fromIntegral . fromEnum) iconPos) + if strPtr == nullPtr + then return Nothing + else liftM Just (peekUTFString strPtr) hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 778 --- | Retrieves the icon name used for the icon, or {@NULL@, FIXME: this should --- probably be converted to a Maybe data type} if there is no icon or if the --- icon was set by some other method (e.g., by pixbuf, stock or gicon). +-- | Retrieves the icon name used for the icon, or 'Nothing' if there is no icon or if the icon was set by +-- some other method (e.g., by pixbuf, stock or gicon). hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 785 - -> IO String -- ^ returns An icon name, or {@NULL@, FIXME: this - -- should probably be converted to a Maybe data type} if + -> IO (Maybe String) -- ^ returns An icon name, or 'Nothing' if hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 788 -entryGetIconName self iconPos = - {# call entry_get_icon_name #} - (toEntry self) - ((fromIntegral . fromEnum) iconPos) - >>= peekUTFString +entryGetIconName self iconPos = do + strPtr <- {# call entry_get_icon_name #} + (toEntry self) + ((fromIntegral . fromEnum) iconPos) + if strPtr == nullPtr + then return Nothing + else liftM Just (peekUTFString strPtr) hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 796 --- | Retrieves the {GIcon, FIXME: unknown type\/value} used for the icon, or --- {@NULL@, FIXME: this should probably be converted to a Maybe data type} if --- there is no icon or if the icon was set by some other method (e.g., by --- stock, pixbuf, or icon name). +-- | Retrieves the GIcon used for the icon, or 'Nothing' if there is no icon or if the icon was set by some +-- other method (e.g., by stock, pixbuf, or icon name). hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 868 --- | Finds the icon at the given position and return its index. If @x@, @y@ --- doesn't lie inside an icon, -1 is returned. This function is intended for --- use in a {\"query-tooltip\", FIXME: unknown type\/value} signal handler. +-- | Finds the icon at the given position and return its index. If x, y doesn't lie inside an icon, -1 is +-- returned. This function is intended for use in a 'queryTooltip' signal handler. hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 884 --- | Sets @tooltip@ as the contents of the tooltip for the icon at the --- specified position. --- --- Use {@NULL@, FIXME: this should probably be converted to a Maybe data --- type} for @tooltip@ to remove an existing tooltip. --- +-- | Sets tooltip as the contents of the tooltip for the icon at the specified position. +-- [_$_] hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 892 - -> String -- ^ @tooltip@ - the contents of the tooltip for the - -- icon, or {@NULL@, FIXME: this should probably be - -- converted to a Maybe data type} + -> String -- ^ @tooltip@ - the contents of the tooltip for the icon hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 908 - -> IO String -- ^ returns the tooltip text, or {@NULL@, FIXME: this - -- should probably be converted to a Maybe data type}. - -- Free the returned string with 'gFree' when done. + -> IO String -- ^ returns the tooltip text hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 915 --- | Sets @tooltip@ as the contents of the tooltip for the icon at the --- specified position. @tooltip@ is assumed to be marked up with the Pango text --- markup language. --- --- Use {@NULL@, FIXME: this should probably be converted to a Maybe data --- type} for @tooltip@ to remove an existing tooltip. --- --- See also 'widgetSetTooltipMarkup' and 'entySetIconTooltipText'. +-- | Sets tooltip as the contents of the tooltip for the icon at the specified position. tooltip is +-- assumed to be marked up with the Pango text markup language. +-- [_$_] +-- See also 'widgetSetTooltipMarkup'. hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 925 - -- icon, or {@NULL@, FIXME: this should probably be - -- converted to a Maybe data type} + -- icon hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 941 - -> IO String -- ^ returns the tooltip text, or {@NULL@, FIXME: this - -- should probably be converted to a Maybe data type}. - -- Free the returned string with 'gFree' when done. + -> IO String -- ^ returns the tooltip text hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 948 --- | Sets up the icon at the given position so that Gtk+ will start a drag --- operation when the user clicks and drags the icon. --- --- To handle the drag operation, you need to connect to the usual --- {\"drag-data-get\", FIXME: unknown type\/value} (or possibly --- {\"drag-data-delete\", FIXME: unknown type\/value}) signal, and use --- 'entryGetCurrentIconDragSource' in your signal handler to find out if the --- drag was started from an icon. --- --- By default, Gtk+ uses the icon as the drag icon. You can use the --- {\"drag-begin\", FIXME: unknown type\/value} signal to set a different icon. --- Note that you have to use 'gSignalConnectAfter' to ensure that your signal +-- | Sets up the icon at the given position so that GTK+ will start a drag operation when the user clicks +-- and drags the icon. +-- [_$_] +-- To handle the drag operation, you need to connect to the usual 'dragDataGet' (or possibly +-- 'dragDataDelete') signal, and use 'entryGetCurrentIconDragSource' in your signal handler +-- to find out if the drag was started from an icon. +-- [_$_] +-- By default, GTK+ uses the icon as the drag icon. You can use the 'dragBegin' signal to set a +-- different icon. Note that you have to use 'signalConnectAfter' to ensure that your signal hunk ./gtk/Graphics/UI/Gtk/Entry/Entry.chs.pp 985 --- | Returns the index of the icon which is the source of the current DND --- operation, or -1. --- --- This function is meant to be used in a {\"drag-data-get\", FIXME: unknown --- type\/value} callback. +-- | Returns the index of the icon which is the source of the current DND operation, or -1. +-- [_$_] +-- This function is meant to be used in a 'dragDataGet' callback. hunk ./gtk/Graphics/UI/Gtk/Entry/EntryCompletion.chs.pp 490 --- or {@NULL@, FIXME: this should probably be converted to a Maybe data type} hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs.pp 412 --- | Emits the signal {\"toolbar_reconfigured\", FIXME: unknown type\/value} --- on @toolItem@. 'Toolbar' and other 'ToolShell' implementations use this --- function to notify children, when some aspect of their configuration +-- | Emits the signal "@toolbarReconfigured@" on @toolItem@. 'Toolbar' and other 'ToolShell' +-- implementations use this function to notify children, when some aspect of their configuration hunk ./gtk/Graphics/UI/Gtk/MenuComboToolbar/ToolItem.chs.pp 487 --- {@NULL@, FIXME: this should probably be converted to a Maybe data type} hunk ./gtk/Graphics/UI/Gtk/ModelView/CellEditable.chs.pp 71 --- | Begins editing on a @cellEditable@. @event@ is the {GdkEvent, FIXME: +-- | Begins editing on a @cellEditable@. @event@ is the 'Event'{GdkEvent, FIXME: hunk ./gtk/Graphics/UI/Gtk/ModelView/CellEditable.chs.pp 86 --- | Emits the {\"editing-done\", FIXME: unknown type\/value} signal. +-- | Emits the 'editingDone' signal. hunk ./gtk/Graphics/UI/Gtk/ModelView/CellEditable.chs.pp 93 --- | Emits the {\"remove-widget\", FIXME: unknown type\/value} signal. +-- | Emits the 'removeWidget' signal. hunk ./gtk/Graphics/UI/Gtk/ModelView/CellEditable.chs.pp 121 --- {\"editing-done\", FIXME: unknown type\/value} signal, to give the cell +-- 'editingDone' signal, to give the cell hunk ./gtk/Graphics/UI/Gtk/ModelView/CellRenderer.chs.pp 286 - -> IO (Float, Float) -- ^ @(xalign, yalign)@ {FIXME: merge return value docs} - -- @xalign@ - location to fill in with the x alignment of - -- the cell, or {@NULL@, FIXME: this should probably be - -- converted to a Maybe data type}@yalign@ - location to - -- fill in with the y alignment of the cell, or {@NULL@, - -- FIXME: this should probably be converted to a Maybe - -- data type} + -> IO (Float, Float) hunk ./gtk/Graphics/UI/Gtk/ModelView/CellRenderer.chs.pp 317 - -> IO (Int, Int) -- ^ @(xpad, ypad)@ {FIXME: merge return value docs} @xpad@ - -- - location to fill in with the x padding of the cell, or - -- {@NULL@, FIXME: this should probably be converted to a - -- Maybe data type}@ypad@ - location to fill in with the y - -- padding of the cell, or {@NULL@, FIXME: this should - -- probably be converted to a Maybe data type} + -> IO (Int, Int) hunk ./gtk/Graphics/UI/Gtk/ModelView/CellView.chs.pp 160 +-- | Returns the model for @cellView@. If no model is used 'Nothing' is returned. hunk ./gtk/Graphics/UI/Gtk/ModelView/CellView.chs.pp 162 - -> IO TreeModel -- ^ returns a 'TreeModel' used or {@NULL@, FIXME: this - -- should probably be converted to a Maybe data type} -cellViewGetModel self = - makeNewGObject mkTreeModel $ - {# call gtk_cell_view_get_model #} - (toCellView self) + -> IO (Maybe TreeModel) -- ^ returns a 'TreeModel' used or 'Nothing' +cellViewGetModel self = do + modelPtr <- {# call gtk_cell_view_get_model #} + (toCellView self) + if modelPtr == nullPtr + then return Nothing + else liftM Just (makeNewGObject mkTreeModel (return modelPtr)) hunk ./gtk/Graphics/UI/Gtk/ModelView/IconView.chs.pp 864 - -> IO (Int, Int) -- ^ @(bx, by)@ {FIXME: merge return value docs} @bx@ - - -- return location for bin_window X coordinate @by@ - return - -- location for bin_window Y coordinate + -> IO (Int, Int) -- ^ @(bx, by)@ @bx@ - return location for bin_window X coordinate [_$_] + -- @by@ - return location for bin_window Y coordinate hunk ./gtk/Graphics/UI/Gtk/ModelView/IconView.chs.pp 905 - -> cell -- ^ @cell@ - a 'CellRenderer' or {@NULL@, FIXME: this should - -- probably be converted to a Maybe data type} + -> cell -- ^ @cell@ - a 'CellRenderer' [_$_] hunk ./gtk/Graphics/UI/Gtk/ModelView/IconView.chs.pp 915 --- | This function is supposed to be used in a {\"query-tooltip\", FIXME: --- unknown type\/value} 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 bin_window if @keyboardTooltip@ is @False@. +-- | 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'. hunk ./gtk/Graphics/UI/Gtk/ModelView/IconView.chs.pp 969 - -> TreePath -- ^ @path@ - The path of the item to highlight, or - -- {@NULL@, FIXME: this should probably be converted - -- to a Maybe data type}. + -> TreePath -- ^ @path@ - The path of the item to highlight hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1021 - -> IO DrawWindow -- ^ returns A 'DrawWindow', or {@NULL@, FIXME: this should - -- probably be converted to a Maybe data type} when + -> IO (Maybe DrawWindow) -- ^ returns A 'DrawWindow', or 'Nothing' when hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1023 -treeViewGetBinWindow self = - makeNewGObject mkDrawWindow $ - {# call gtk_tree_view_get_bin_window #} - (toTreeView self) +treeViewGetBinWindow self = do + winPtr <- {# call gtk_tree_view_get_bin_window #} + (toTreeView self) + if winPtr == nullPtr + then return Nothing + else liftM Just (makeNewGObject mkDrawWindow (return winPtr)) [_$_] hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1059 - -> IO (Int, Int) -- ^ @(tx, ty)@ {FIXME: merge return value docs} @tx@ - + -> IO (Int, Int) -- ^ @(tx, ty)@ @tx@ - hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1083 - -> IO (Int, Int) -- ^ @(wx, wy)@ {FIXME: merge return value docs} @wx@ - + -> IO (Int, Int) -- ^ @(wx, wy)@ @wx@ - hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1107 - -> IO (Int, Int) -- ^ @(bx, by)@ {FIXME: merge return value docs} @bx@ - + -> IO (Int, Int) -- ^ @(bx, by)@ @bx@ - hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1132 - -> IO (Int, Int) -- ^ @(wx, wy)@ {FIXME: merge return value docs} @wx@ - + -> IO (Int, Int) -- ^ @(wx, wy)@ @wx@ - hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1156 - -> IO (Int, Int) -- ^ @(bx, by)@ {FIXME: merge return value docs} @bx@ - + -> IO (Int, Int) -- ^ @(bx, by)@ @bx@ - hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1180 - -> IO (Int, Int) -- ^ @(tx, ty)@ {FIXME: merge return value docs} @tx@ - + -> IO (Int, Int) -- ^ @(tx, ty)@ @tx@ - hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1714 --- | Sets the tip area of @tooltip@ to the area @path@, @column@ and @cell@ --- have in common. For example if @path@ is {@NULL@, FIXME: this should --- probably be converted to a Maybe data type} and @column@ is set, the tip --- area will be set to the full area covered by @column@. See also +-- | Sets the tip area of tooltip to the area path, column and cell have in common. For example if path +-- is 'Nothing' and column is set, the tip area will be set to the full area covered by column. See also hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1717 --- --- Note that if @path@ is not specified and @cell@ is set and part of a --- column containing the expander, the tooltip might not show and hide at the --- correct position. In such cases @path@ must be set to the current node under --- the mouse cursor for this function to operate correctly. --- +-- [_$_] +-- Note that if path is not specified and cell is set and part of a column containing the expander, the +-- tooltip might not show and hide at the correct position. In such cases path must be set to the +-- current node under the mouse cursor for this function to operate correctly. +-- [_$_] hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeView.chs.pp 1728 - -> TreePath -- ^ @path@ - a 'TreePath' or {@NULL@, FIXME: this should - -- probably be converted to a Maybe data type} - -> TreeViewColumn -- ^ @column@ - a 'TreeViewColumn' or {@NULL@, FIXME: this - -- should probably be converted to a Maybe data type} - -> cell -- ^ @cell@ - a 'CellRenderer' or {@NULL@, FIXME: this - -- should probably be converted to a Maybe data type} + -> TreePath -- ^ @path@ - a 'TreePath' [_$_] + -> TreeViewColumn -- ^ @column@ - a 'TreeViewColumn' + -> cell -- ^ @cell@ - a 'CellRenderer' [_$_] hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeViewColumn.chs.pp 607 - -- will be allocated, or {@NULL@, FIXME: this - -- should probably be converted to a Maybe data - -- type} - -> IO (Int, Int, Int, Int) -- ^ @(xOffset, yOffset, width, height)@ {FIXME: - -- merge return value docs} @xOffset@ - location to - -- return x offset of a cell relative to - -- @cellArea@, or {@NULL@, FIXME: this should - -- probably be converted to a Maybe data - -- type}@yOffset@ - location to return y offset of - -- a cell relative to @cellArea@, or {@NULL@, - -- FIXME: this should probably be converted to a - -- Maybe data type}@width@ - location to return - -- width needed to render a cell, or {@NULL@, - -- FIXME: this should probably be converted to a - -- Maybe data type}@height@ - location to return - -- height needed to render a cell, or {@NULL@, - -- FIXME: this should probably be converted to a - -- Maybe data type} + -- will be allocated, [_$_] + -> IO (Int, Int, Int, Int) -- ^ @(xOffset, yOffset, width, height)@ [_$_] + -- @xOffset@ - location to return x offset of a cell relative to + -- @cellArea@, @yOffset@ - location to return y offset of + -- a cell relative to @cellArea@, @width@ - location to return + -- width needed to render a cell, @height@ - location to return + -- height needed to render a cell, hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeViewColumn.chs.pp 639 - -> IO (Maybe (Int, Int)) -- ^ @(_, startPos, width)@ {FIXME: merge return value - -- docs} returns @True@ if @cell@ belongs to + -> IO (Maybe (Int, Int)) -- ^ @(_, startPos, width)@ returns @True@ if @cell@ belongs to hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeViewColumn.chs.pp 642 - -- may be {@NULL@, FIXME: this should probably be - -- converted to a Maybe data type}@width@ - return - -- location for the width of @cell@, may be {@NULL@, - -- FIXME: this should probably be converted to a Maybe - -- data type} + -- may be 'Nothing' @width@ - return + -- location for the width of @cell@, may be 'Nothing' hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeViewColumn.chs.pp 735 --- @column@ is currently not inserted in any tree view, {@NULL@, FIXME: this --- should probably be converted to a Maybe data type} is returned. +-- @column@ is currently not inserted in any tree view, 'Nothing' is returned. hunk ./gtk/Graphics/UI/Gtk/ModelView/TreeViewColumn.chs.pp 740 - -> IO Widget -- ^ returns The tree view wherein @column@ has been inserted if - -- any, {@NULL@, FIXME: this should probably be converted to a - -- Maybe data type} otherwise. -treeViewColumnGetTreeView self = - makeNewObject mkWidget $ - {# call gtk_tree_view_column_get_tree_view #} - self + -> IO (Maybe TreeView) -- ^ returns The tree view wherein @column@ has been inserted if + -- any, 'Nothing' +treeViewColumnGetTreeView self = do + treeViewPtr <- {# call gtk_tree_view_column_get_tree_view #} self + if treeViewPtr == nullPtr + then return Nothing + else liftM Just (makeNewObject mkTreeView (return $ castPtr treeViewPtr)) hunk ./gtk/Graphics/UI/Gtk/Recent/RecentChooser.chs.pp 142 --- To the comparison function will be passed two {GtkRecentInfo, FIXME: --- boxed type} structs and @sortData@; @sortFunc@ should return a positive +-- To the comparison function will be passed two 'RecentInfo' structs and @sortData@; @sortFunc@ should return a positive hunk ./gtk/Graphics/UI/Gtk/Recent/RecentChooser.chs.pp 189 --- | Gets the {GtkRecentInfo, FIXME: boxed type} currently selected by +-- | Gets the 'RecentInfo' currently selected by hunk ./gtk/Graphics/UI/Gtk/Recent/RecentChooser.chs.pp 193 --- -> IO RecentInfo -- ^ returns a {GtkRecentInfo, FIXME: boxed type}. +-- -> IO RecentInfo -- ^ returns a 'RecentInfo'. hunk ./gtk/Graphics/UI/Gtk/Recent/RecentChooser.chs.pp 240 --- | Gets the list of recently used resources in form of {GtkRecentInfo, --- FIXME: boxed type} objects. +-- | Gets the list of recently used resources in form of 'RecentInfo' hunk ./gtk/Graphics/UI/Gtk/Recent/RecentChooser.chs.pp 247 --- -- {GtkRecentInfo, FIXME: boxed type} objects. You +-- -- 'RecentInfo' objects. You hunk ./gtk/Graphics/UI/Gtk/Recent/RecentChooser.chs.pp 262 --- Since the returned array is {@NULL@, FIXME: this should probably be --- converted to a Maybe data type} terminated, @length@ may be {@NULL@, FIXME: --- this should probably be converted to a Maybe data type}. +-- Since the returned array [_$_] hunk ./gtk/Graphics/UI/Gtk/Recent/RecentChooser.chs.pp 265 - -> IO ([String], Int) -- ^ returns A newly allocated, {@NULL@, FIXME: this should - -- probably be converted to a Maybe data type} terminated - -- array of strings. Use 'gStrfreev' to free it. + -> IO ([String], Int) hunk ./gtk/Graphics/UI/Gtk/Recent/RecentChooserDialog.chs.pp 40 --- {GtkRecentChooserIface, FIXME: unknown type\/value} interface, so you can +-- 'RecentChooserIface' interface, so you can hunk ./gtk/Graphics/UI/Gtk/Recent/RecentFilter.chs.pp 118 --- > FIXME: if the follwing is a C code example, port it to Haskell or remove it --- > [_$_] --- > GtkRecentFilter *filter = gtk_recent_filter_new (); --- > gtk_recent_filter_add_pattern (filter, "*"); +-- > filter <- recentFilterNew +-- > recentFilterAddPattern filter "*" hunk ./gtk/Graphics/UI/Gtk/Recent/RecentFilter.chs.pp 130 - -> IO String -- ^ returns the name of the filter, or {@NULL@, FIXME: this - -- should probably be converted to a Maybe data type}. The - -- returned string is owned by the filter object and should not - -- be freed. + -> IO String -- ^ returns the name of the filter hunk ./gtk/Graphics/UI/Gtk/Recent/RecentFilter.chs.pp 257 --- {GtkRecentFilterInfo, FIXME: struct type} structure @filterInfo@ should +-- 'RecentFilterInfo' structure @filterInfo@ should hunk ./gtk/Graphics/UI/Gtk/Recent/RecentFilter.chs.pp 264 - -> RecentFilterInfo -- ^ @filterInfo@ - a {GtkRecentFilterInfo, - -- FIXME: struct type} structure containing + -> RecentFilterInfo -- ^ @filterInfo@ - a 'RecentFilterInfo' structure containing hunk ./gtk/Graphics/UI/Gtk/Recent/RecentManager.chs.pp 158 --- list, using the metadata specified inside the {GtkRecentData, FIXME: struct --- type} structure passed in @recentData@. +-- list, using the metadata specified inside the 'RecentData' structure passed in @recentData@. hunk ./gtk/Graphics/UI/Gtk/Recent/RecentManager.chs.pp 164 --- {GtkRecentData, FIXME: struct type} structure, which must contain the MIME +-- 'RecentData' structure, which must contain the MIME hunk ./gtk/Graphics/UI/Gtk/Recent/RecentManager.chs.pp 168 --- Optionally, a {GtkRecentData, FIXME: struct type} structure might contain +-- Optionally, a 'RecentData' structure might contain hunk ./gtk/Graphics/UI/Gtk/Recent/RecentManager.chs.pp 211 --- -> IO RecentInfo -- ^ returns a {GtkRecentInfo, FIXME: boxed type} +-- -> IO RecentInfo -- ^ returns a 'RecentInfo' hunk ./gtk/Graphics/UI/Gtk/Recent/RecentManager.chs.pp 246 - -> String -- ^ @newUri@ - the new URI of the recently used resource, or - -- {@NULL@, FIXME: this should probably be converted to a Maybe - -- data type} to remove the item pointed by @uri@ in the list + -> String -- ^ @newUri@ - the new URI of the recently used resource to remove the item pointed by @uri@ in the list hunk ./gtk/Graphics/UI/Gtk/Recent/RecentManager.chs.pp 263 --- -- {GtkRecentInfo, FIXME: boxed type} objects. Use +-- -- 'RecentInfo' objects. Use hunk ./gtk/Graphics/UI/Gtk/Selectors/ColorSelection.chs 256 - -> IO ([Color], Int, Bool) -- ^ @(_, nColors)@ {FIXME: merge return value docs} + -> IO ([Color], Int, Bool) -- ^ @(_, nColors)@ [_$_] hunk ./gtk/Graphics/UI/Gtk/Selectors/FileChooser.chs.pp 1151 --- Please see the example code in '{FIXME: gtk-doc cross reference --- to:gtkfilechooser-preview}'. --- hunk ./gtk/Graphics/UI/Gtk/Selectors/FontSelection.chs 235 --- | This returns the {GtkTreeeView, FIXME: unknown type\/value} used to list +-- | This returns the 'TreeeView' used to list hunk ./gtk/Graphics/UI/Gtk/Selectors/HSV.chs.pp 119 - -> IO (Double, Double, Double) -- ^ @(h, s, v)@ {FIXME: merge return value - -- docs} @h@ - Return value for the hue @s@ - + -> IO (Double, Double, Double) -- ^ @(h, s, v)@ @h@ - Return value for the hue @s@ - hunk ./gtk/Graphics/UI/Gtk/Selectors/HSV.chs.pp 151 - -> IO (Int, Int) -- ^ @(size, ringWidth)@ {FIXME: merge return value docs} + -> IO (Int, Int) -- ^ @(size, ringWidth)@ [_$_] hunk ./gtk/Graphics/UI/Gtk/Selectors/HSV.chs.pp 186 - -> IO (Double, Double, Double) -- ^ @(r, g, b)@ {FIXME: merge return value - -- docs} @r@ - Return value for the red + -> IO (Double, Double, Double) -- ^ @(r, g, b)@ @r@ - Return value for the red hunk ./gtk/Graphics/UI/Gtk/Selectors/InputDialog.chs.pp 106 --- 'ModeScreen' or 'ModeWindow' to {GDK_MODE_ENABLED, FIXME: unknown --- type\/value}. +-- 'ModeScreen' or 'ModeWindow' to 'ModeEnabled' |