1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Take a look at the license at the top of the repository in the LICENSE file.

use crate::TabOverview;
use glib::translate::*;

impl TabOverview {
    /// Sets the supported types for this drop target.
    ///
    /// Sets up an extra drop target on tabs.
    ///
    /// This allows to drag arbitrary content onto tabs, for example URLs in a web
    /// browser.
    ///
    /// If a tab is hovered for a certain period of time while dragging the content,
    /// it will be automatically selected.
    ///
    /// The [`extra-drag-drop`][struct@crate::TabOverview#extra-drag-drop] signal can be used to handle the
    /// drop.
    /// ## `actions`
    /// the supported actions
    /// ## `types`
    ///
    ///   all supported `GType`s that can be dropped
    #[doc(alias = "adw_tab_overview_setup_extra_drop_target")]
    pub fn setup_extra_drop_target(&self, actions: gdk::DragAction, types: &[glib::Type]) {
        unsafe {
            ffi::adw_tab_overview_setup_extra_drop_target(
                self.to_glib_none().0,
                actions.into_glib(),
                types.to_glib_none().0,
                types.len(),
            )
        }
    }
}