mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-16 07:04:29 +00:00
Move some remaining api over
This commit is contained in:
parent
aa276a181e
commit
69e3fee5e2
31
gtk/gtkdnd.c
31
gtk/gtkdnd.c
@ -269,37 +269,6 @@ gtk_drag_get_data (GtkWidget *widget,
|
||||
data);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_drag_highlight: (method)
|
||||
* @widget: a widget to highlight
|
||||
*
|
||||
* Highlights a widget as a currently hovered drop target.
|
||||
* To end the highlight, call gtk_drag_unhighlight().
|
||||
* GTK+ calls this automatically if %GTK_DEST_DEFAULT_HIGHLIGHT is set.
|
||||
*/
|
||||
void
|
||||
gtk_drag_highlight (GtkWidget *widget)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
|
||||
gtk_widget_set_state_flags (widget, GTK_STATE_FLAG_DROP_ACTIVE, FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_drag_unhighlight: (method)
|
||||
* @widget: a widget to remove the highlight from
|
||||
*
|
||||
* Removes a highlight set by gtk_drag_highlight() from
|
||||
* a widget.
|
||||
*/
|
||||
void
|
||||
gtk_drag_unhighlight (GtkWidget *widget)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
|
||||
gtk_widget_unset_state_flags (widget, GTK_STATE_FLAG_DROP_ACTIVE);
|
||||
}
|
||||
|
||||
/*
|
||||
* _gtk_drag_dest_handle_event:
|
||||
* @toplevel: Toplevel widget that received the event
|
||||
|
@ -44,11 +44,6 @@ void gtk_drag_get_data (GtkWidget *widget,
|
||||
GdkDrop *drop,
|
||||
GdkAtom target);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gtk_drag_highlight (GtkWidget *widget);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gtk_drag_unhighlight (GtkWidget *widget);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@ -1057,3 +1057,34 @@ gtk_drop_target_emit_drag_data_received (GtkDropTarget *dest,
|
||||
set_drop (dest, drop);
|
||||
g_signal_emit (dest, signals[DRAG_DATA_RECEIVED], 0, sdata);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_drag_highlight: (method)
|
||||
* @widget: a widget to highlight
|
||||
*
|
||||
* Highlights a widget as a currently hovered drop target.
|
||||
* To end the highlight, call gtk_drag_unhighlight().
|
||||
*
|
||||
* GTK calls this automatically if %GTK_DEST_DEFAULT_HIGHLIGHT is set.
|
||||
*/
|
||||
void
|
||||
gtk_drag_highlight (GtkWidget *widget)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
|
||||
gtk_widget_set_state_flags (widget, GTK_STATE_FLAG_DROP_ACTIVE, FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_drag_unhighlight: (method)
|
||||
* @widget: a widget to remove the highlight from
|
||||
*
|
||||
* Removes a highlight set by gtk_drag_highlight() from a widget.
|
||||
*/
|
||||
void
|
||||
gtk_drag_unhighlight (GtkWidget *widget)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_WIDGET (widget));
|
||||
|
||||
gtk_widget_unset_state_flags (widget, GTK_STATE_FLAG_DROP_ACTIVE);
|
||||
}
|
||||
|
@ -156,6 +156,12 @@ GtkWidget *gtk_drop_target_get_target (GtkDropTarget *dest);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
const char *gtk_drop_target_find_mimetype (GtkDropTarget *dest);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gtk_drag_highlight (GtkWidget *widget);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gtk_drag_unhighlight (GtkWidget *widget);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user