
@c %start of fragment

@deffn Function gtk-selection-owner-set  (self@tie{}@code{<gtk-widget>}) (selection@tie{}@code{<gdk-atom>}) (time@tie{}@code{unsigned-int32}) @result{}@tie{} (ret@tie{}@code{bool})
Claims ownership of a given selection for a particular widget, or, if
@var{widget} is @samp{@code{#f}}, release ownership of the selection.

@table @var
@item widget
a @code{<gtk-widget>}, or @samp{@code{#f}}.

@item selection
an interned atom representing the selection to claim

@item time
timestamp with which to claim the selection

@item ret
@samp{@code{#t}} if the operation succeeded

@end table

@end deffn

@deffn Function gtk-selection-owner-set-for-display  (display@tie{}@code{<gdk-display>}) (widget@tie{}@code{<gtk-widget>}) (selection@tie{}@code{<gdk-atom>}) (time@tie{}@code{unsigned-int32}) @result{}@tie{} (ret@tie{}@code{bool})
Claim ownership of a given selection for a particular widget, or, if
@var{widget} is @samp{@code{#f}}, release ownership of the selection.

@table @var
@item display
the @code{<gdkdisplay>} where the selection is set

@item widget
new selection owner (a @code{<gdk-widget>}), or @samp{@code{#f}}.

@item selection
an interned atom representing the selection to claim.

@item time
timestamp with which to claim the selection

@item ret
TRUE if the operation succeeded

@end table

Since 2.2

@end deffn

@deffn Function gtk-selection-add-target  (self@tie{}@code{<gtk-widget>}) (selection@tie{}@code{<gdk-atom>}) (target@tie{}@code{<gdk-atom>}) (info@tie{}@code{unsigned-int})
Appends a specified target to the list of supported targets for a given widget
and selection.

@table @var
@item widget
a @code{<gtk-target>}

@item selection
the selection

@item target
target to add.

@item info
A unsigned integer which will be passed back to the application.

@end table

@end deffn

@deffn Function gtk-selection-clear-targets  (self@tie{}@code{<gtk-widget>}) (selection@tie{}@code{<gdk-atom>})
Remove all targets registered for the given selection for the widget.

@table @var
@item widget
a @code{<gtk-widget>}

@item selection
an atom representing a selection

@end table

@end deffn

@deffn Function gtk-selection-convert  (self@tie{}@code{<gtk-widget>}) (selection@tie{}@code{<gdk-atom>}) (target@tie{}@code{<gdk-atom>}) (time@tie{}@code{unsigned-int32}) @result{}@tie{} (ret@tie{}@code{bool})
Requests the contents of a selection. When received, a "selection_received"
signal will be generated.

@table @var
@item widget
The widget which acts as requestor

@item selection
Which selection to get

@item target
Form of information desired (e.g., STRING)

@item time
Time of request (usually of triggering event) In emergency, you could use
@code{<gdk-current-time>}

@item ret
@samp{@code{#t}} if requested succeeded. @samp{@code{#f}} if we could not
process request. (e.g., there was already a request in process for this widget).

@end table

@end deffn

@deffn Function gtk-selection-data-set-text  (self@tie{}@code{<gtk-selection-data>}) (str@tie{}@code{mchars}) (len@tie{}@code{int}) @result{}@tie{} (ret@tie{}@code{bool})
Sets the contents of the selection from a UTF-8 encoded string. The string is
converted to the form determined by @var{selection-data->target}.

@table @var
@item selection-data
a @code{<gtk-selection-data>}

@item str
a UTF-8 string

@item len
the length of @var{str}, or -1 if @var{str} is nul-terminated.

@item ret
@samp{@code{#t}} if the selection was successfully set, otherwise
@samp{@code{#f}}.

@end table

@end deffn

@deffn Function gtk-selection-data-set-pixbuf  (self@tie{}@code{<gtk-selection-data>}) (pixbuf@tie{}@code{<gdk-pixbuf>}) @result{}@tie{} (ret@tie{}@code{bool})
Sets the contents of the selection from a @code{<gdk-pixbuf>} The pixbuf is
converted to the form determined by @var{selection-data->target}.

@table @var
@item selection-data
a @code{<gtk-selection-data>}

@item pixbuf
a @code{<gdk-pixbuf>}

@item ret
@samp{@code{#t}} if the selection was successfully set, otherwise
@samp{@code{#f}}.

@end table

Since 2.6

@end deffn

@deffn Function gtk-selection-data-get-pixbuf  (self@tie{}@code{<gtk-selection-data>}) @result{}@tie{} (ret@tie{}@code{<gdk-pixbuf>})
Gets the contents of the selection data as a @code{<gdk-pixbuf>}.

@table @var
@item selection-data
a @code{<gtk-selection-data>}

@item ret
if the selection data contained a recognized image type and it could be
converted to a @code{<gdk-pixbuf>}, a newly allocated pixbuf is returned,
otherwise @samp{@code{#f}}. If the result is non-@samp{@code{#f}} it must be
freed with @code{g-object-unref}.

@end table

Since 2.6

@end deffn

@deffn Function gtk-selection-remove-all  (self@tie{}@code{<gtk-widget>})
Removes all handlers and unsets ownership of all selections for a widget. Called
when widget is being destroyed. This function will not generally be called by
applications.

@table @var
@item widget
a @code{<gtk-widget>}

@end table

@end deffn


@c %end of fragment
