Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
drag_and_drop.h
Go to the documentation of this file.
1/*
2 This file is part of darktable,
3 Copyright (C) 2012-2020 darktable developers.
4
5 darktable is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 darktable is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with darktable. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#pragma once
20
21#define _BYTE 8
22#define _WORD 16
23#define _DWORD 32
24
25/* common for all the drag&drop sources/destinations */
26enum
27{
31};
32
33/* drag & drop for internal image ids */
34static const GtkTargetEntry target_list_internal[] = { { "image-id", GTK_TARGET_SAME_APP, DND_TARGET_IMGID } };
35static const guint n_targets_internal = G_N_ELEMENTS(target_list_internal);
36
37/* drag & drop for global uris */
38static const GtkTargetEntry target_list_external[] = { { "text/uri-list", GTK_TARGET_OTHER_APP, DND_TARGET_URI } };
39static const guint n_targets_external = G_N_ELEMENTS(target_list_external);
40
41/* drag & drop for both internal image ids and global uris */
42static const GtkTargetEntry target_list_all[]
43 = { { "image-id", GTK_TARGET_SAME_APP, DND_TARGET_IMGID }, { "text/uri-list", GTK_TARGET_OTHER_APP, DND_TARGET_URI } };
44static const guint n_targets_all = G_N_ELEMENTS(target_list_all);
45
46static const GtkTargetEntry target_list_tags[] = { { "tags-dnd", GTK_TARGET_SAME_WIDGET, DND_TARGET_TAG } };
47static const guint n_targets_tags = G_N_ELEMENTS(target_list_tags);
48
49static const GtkTargetEntry target_list_tags_dest[]
50 = { { "image-id", GTK_TARGET_SAME_APP, DND_TARGET_IMGID }, { "tags-dnd", GTK_TARGET_SAME_WIDGET, DND_TARGET_TAG } };
51static const guint n_targets_tags_dest = G_N_ELEMENTS(target_list_tags_dest);
52
53// clang-format off
54// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
55// vim: shiftwidth=2 expandtab tabstop=2 cindent
56// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
57// clang-format on
58
static const GtkTargetEntry target_list_all[]
Definition drag_and_drop.h:43
static const GtkTargetEntry target_list_internal[]
Definition drag_and_drop.h:34
static const GtkTargetEntry target_list_tags_dest[]
Definition drag_and_drop.h:50
static const guint n_targets_internal
Definition drag_and_drop.h:35
@ DND_TARGET_URI
Definition drag_and_drop.h:29
@ DND_TARGET_IMGID
Definition drag_and_drop.h:28
@ DND_TARGET_TAG
Definition drag_and_drop.h:30
static const GtkTargetEntry target_list_external[]
Definition drag_and_drop.h:38
static const guint n_targets_tags
Definition drag_and_drop.h:47
static const guint n_targets_tags_dest
Definition drag_and_drop.h:51
static const guint n_targets_all
Definition drag_and_drop.h:44
static const guint n_targets_external
Definition drag_and_drop.h:39
static const GtkTargetEntry target_list_tags[]
Definition drag_and_drop.h:46