mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-11 19:30:10 +00:00
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:
parent
adb16c5b89
commit
60d6b85399
@ -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>
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -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 */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user