Add gtk_window_[sg]et_deletable. Add

2005-08-30  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtk-sections.txt: Add gtk_window_[sg]et_deletable.
	Add gtk_selection_data_targets_include_uri.
This commit is contained in:
Matthias Clasen 2005-08-30 05:06:36 +00:00 committed by Matthias Clasen
parent adb16c5b89
commit 60d6b85399
5 changed files with 51 additions and 0 deletions

View File

@ -1,6 +1,7 @@
2005-08-30 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk-sections.txt: Add gtk_window_[sg]et_deletable.
Add gtk_selection_data_targets_include_uri.
2005-08-29 Matthias Clasen <mclasen@redhat.com>

View File

@ -5146,6 +5146,7 @@ gtk_selection_data_get_uris
gtk_selection_data_get_targets
gtk_selection_data_targets_include_image
gtk_selection_data_targets_include_text
gtk_selection_data_targets_include_uri
gtk_selection_remove_all
gtk_selection_clear
gtk_selection_data_copy

View File

@ -2611,6 +2611,7 @@ gtk_selection_data_set_text
gtk_selection_data_set_uris
gtk_selection_data_targets_include_image
gtk_selection_data_targets_include_text
gtk_selection_data_targets_include_uri
gtk_selection_owner_set
gtk_selection_owner_set_for_display
gtk_selection_remove_all

View File

@ -1587,6 +1587,8 @@ gtk_selection_data_targets_include_text (GtkSelectionData *selection_data)
gint i;
gboolean result = FALSE;
/* Keep in sync with gtk_target_list_add_text_targets()
*/
init_atoms ();
if (gtk_selection_data_get_targets (selection_data, &targets, &n_targets))
@ -1638,6 +1640,8 @@ gtk_selection_data_targets_include_image (GtkSelectionData *selection_data,
GtkTargetList *list;
GList *l;
/* Keep in sync with gtk_target_list_add_image_targets()
*/
init_atoms ();
if (gtk_selection_data_get_targets (selection_data, &targets, &n_targets))
@ -1659,6 +1663,49 @@ gtk_selection_data_targets_include_image (GtkSelectionData *selection_data,
return result;
}
/**
* gtk_selection_data_targets_include_uri:
* @selection_data: a #GtkSelectionData object
*
* Given a #GtkSelectionData object holding a list of targets,
* determines if any of the targets in @targets can be used to
* provide a list or URIs.
*
* Return value: %TRUE if @selection_data holds a list of targets,
* and a suitable target for text is included, otherwise %FALSE.
*
* Since: 2.10
**/
gboolean
gtk_selection_data_targets_include_uri (GtkSelectionData *selection_data)
{
GdkAtom *targets;
gint n_targets;
gint i;
gboolean result = FALSE;
/* Keep in sync with gtk_target_list_add_uri_targets()
*/
init_atoms ();
if (gtk_selection_data_get_targets (selection_data, &targets, &n_targets))
{
for (i=0; i < n_targets; i++)
{
if (targets[i] == text_uri_list_atom)
{
result = TRUE;
break;
}
}
g_free (targets);
}
return result;
}
/*************************************************************
* gtk_selection_init:

View File

@ -155,6 +155,7 @@ gboolean gtk_selection_data_get_targets (GtkSelectionData *selection_d
gboolean gtk_selection_data_targets_include_text (GtkSelectionData *selection_data);
gboolean gtk_selection_data_targets_include_image (GtkSelectionData *selection_data,
gboolean writable);
gboolean gtk_selection_data_targets_include_uri (GtkSelectionData *selection_data);
/* Called when a widget is destroyed */