diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-11-24 15:02:34 +0100 |
---|---|---|
committer | bstoeger <32835590+bstoeger@users.noreply.github.com> | 2019-12-04 13:00:23 +0100 |
commit | 4b1a3a1a6e1db60bda77fc70e5be6278426589cd (patch) | |
tree | d4d939b28ed65fe94dc2168163f12f3e8be16533 /core/selection.h | |
parent | 7787bfbf9e39595d98c459e4af121f3174762c7d (diff) | |
download | subsurface-4b1a3a1a6e1db60bda77fc70e5be6278426589cd.tar.gz |
Selection: move selection functions from divelist.c to selection.c
Since we now have a selection.c translation unit, put the selection-
related functions there.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/selection.h')
-rw-r--r-- | core/selection.h | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/core/selection.h b/core/selection.h index 0fb226949..e990a697c 100644 --- a/core/selection.h +++ b/core/selection.h @@ -4,13 +4,35 @@ #ifndef SELECTION_H #define SELECTION_H +struct dive; + +extern int amount_selected; + +/*** C and C++ functions ***/ + +#ifdef __cplusplus +extern "C" { +#endif + +extern void select_dive(struct dive *dive); +extern void deselect_dive(struct dive *dive); +extern struct dive *first_selected_dive(void); +extern struct dive *last_selected_dive(void); +extern bool consecutive_selected(void); + +#if DEBUG_SELECTION_TRACKING +extern void dump_selection(void); +#endif + +#ifdef __cplusplus +} +#endif + /*** C++-only functions ***/ #ifdef __cplusplus #include <vector> -struct dive; - // Reset the selection to the dives of the "selection" vector and send the appropriate signals. // Set the current dive to "currentDive". "currentDive" must be an element of "selection" (or // null if "seletion" is empty). |