![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
Private interface shared between the thumbtable engine (thumbtable.c) and its two frontends (filemanager.c, filmstrip.c). More...
#include "dtgtk/thumbtable.h"#include "dtgtk/thumbnail.h"#include <gtk/gtk.h>#include <gdk/gdk.h>
Include dependency graph for thumbtable_internal.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | dt_thumbtable_layout_ops_t |
Per-mode layout strategy. One instance per frontend, shared (const) by all tables of that mode and stored on table->ops. Every method receives the table it operates on. More... | |
Macros | |
| #define | CLAMP_ROW(rowid) CLAMP(rowid, 0, table->collection_count - 1) |
| #define | IS_COLLECTION_EDGE(rowid) (rowid < 0 || rowid >= table->collection_count) |
Typedefs | |
| typedef enum dt_thumbtable_direction_t | dt_thumbtable_direction_t |
| typedef struct dt_thumbtable_layout_ops_t | dt_thumbtable_layout_ops_t |
Enumerations | |
| enum | dt_thumbtable_direction_t { DT_TT_MOVE_UP , DT_TT_MOVE_DOWN , DT_TT_MOVE_LEFT , DT_TT_MOVE_RIGHT , DT_TT_MOVE_PREVIOUS_PAGE , DT_TT_MOVE_NEXT_PAGE , DT_TT_MOVE_START , DT_TT_MOVE_END } |
Functions | |
| const dt_thumbtable_layout_ops_t * | dt_thumbtable_grid_ops (void) |
| const dt_thumbtable_layout_ops_t * | dt_thumbtable_filmstrip_ops (void) |
| int | dt_thumbtable_thumb_cell_decoration (void) |
| void | dt_thumbtable_schedule_focus (dt_thumbtable_t *table, const gint priority) |
| int | dt_thumbtable_find_rowid_from_imgid (dt_thumbtable_t *table, const int32_t imgid) |
| void | dt_thumbtable_move_in_grid (dt_thumbtable_t *table, GdkEventKey *event, dt_thumbtable_direction_t direction, int origin_imgid) |
Private interface shared between the thumbtable engine (thumbtable.c) and its two frontends (filemanager.c, filmstrip.c).
The engine owns the collection LUT, the thumbnail hash, populate/resize, DnD, selection and signal wiring; every place where the old code branched on dt_thumbtable_mode_t is now a call through the dt_thumbtable_layout_ops_t vtable that each frontend provides.
This header is NOT part of the public API. Only the three thumbtable translation units include it; external callers keep using dtgtk/thumbtable.h.
Definition in file thumbtable_internal.h.
| #define CLAMP_ROW | ( | rowid | ) | CLAMP(rowid, 0, table->collection_count - 1) |
Definition at line 42 of file thumbtable_internal.h.
| #define IS_COLLECTION_EDGE | ( | rowid | ) | (rowid < 0 || rowid >= table->collection_count) |
Definition at line 43 of file thumbtable_internal.h.
| typedef enum dt_thumbtable_direction_t dt_thumbtable_direction_t |
| typedef struct dt_thumbtable_layout_ops_t dt_thumbtable_layout_ops_t |
| Enumerator | |
|---|---|
| DT_TT_MOVE_UP | |
| DT_TT_MOVE_DOWN | |
| DT_TT_MOVE_LEFT | |
| DT_TT_MOVE_RIGHT | |
| DT_TT_MOVE_PREVIOUS_PAGE | |
| DT_TT_MOVE_NEXT_PAGE | |
| DT_TT_MOVE_START | |
| DT_TT_MOVE_END | |
Definition at line 46 of file thumbtable_internal.h.
| const dt_thumbtable_layout_ops_t * dt_thumbtable_filmstrip_ops | ( | void | ) |
Definition at line 249 of file filmstrip.c.
References _filmstrip_configure_dims(), _filmstrip_create_content_widget(), _filmstrip_get_row_ids(), _filmstrip_group_borders(), _filmstrip_is_rowid_visible(), _filmstrip_is_thumb_highlighted(), _filmstrip_move_child(), _filmstrip_on_drag_begin(), _filmstrip_on_thumbnail_added(), _filmstrip_place_child(), _filmstrip_position_to_rowid(), _filmstrip_relevant_scrollbar_changed(), _filmstrip_rowid_to_position(), _filmstrip_setup_parent(), _filmstrip_update_content_size(), _filmstrip_wants_page_size_notify(), _filmstrip_wants_scroll_value(), and dt_thumbtable_layout_ops_t::create_content_widget.
Referenced by _ops_for_mode().
| int dt_thumbtable_find_rowid_from_imgid | ( | dt_thumbtable_t * | table, |
| const int32_t | imgid | ||
| ) |
Definition at line 400 of file thumbtable.c.
References dt_thumbtable_t::collection_count, i, dt_thumbtable_cache_t::imgid, IS_NULL_PTR, dt_thumbtable_t::lut, and UNKNOWN_IMAGE.
Referenced by _dt_image_info_changed_callback(), _grid_handle_key(), dt_thumbtable_dispatch_over(), dt_thumbtable_scroll_to_imgid(), and dt_thumbtable_select_range().
| const dt_thumbtable_layout_ops_t * dt_thumbtable_grid_ops | ( | void | ) |
Definition at line 329 of file filemanager.c.
References _grid_configure_dims(), _grid_create_content_widget(), _grid_get_row_ids(), _grid_grab_focus(), _grid_group_borders(), _grid_handle_key(), _grid_is_rowid_visible(), _grid_is_thumb_highlighted(), _grid_move_child(), _grid_on_drag_begin(), _grid_on_thumbnail_added(), _grid_place_child(), _grid_position_to_rowid(), _grid_pre_activate(), _grid_relevant_scrollbar_changed(), _grid_rowid_to_position(), _grid_setup_parent(), _grid_update_content_size(), _grid_wants_page_size_notify(), _grid_wants_scroll_value(), and dt_thumbtable_layout_ops_t::create_content_widget.
Referenced by _ops_for_mode().
| void dt_thumbtable_move_in_grid | ( | dt_thumbtable_t * | table, |
| GdkEventKey * | event, | ||
| dt_thumbtable_direction_t | direction, | ||
| int | origin_imgid | ||
| ) |
Definition at line 1448 of file thumbtable.c.
References _imgid_to_rowid(), _is_rowid_visible(), dt_thumbtable_t::collection_count, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_thumbtable_dispatch_over(), dt_thumbtable_scroll_to_imgid(), dt_thumbtable_update(), DT_TT_MOVE_DOWN, DT_TT_MOVE_END, DT_TT_MOVE_LEFT, DT_TT_MOVE_NEXT_PAGE, DT_TT_MOVE_PREVIOUS_PAGE, DT_TT_MOVE_RIGHT, DT_TT_MOVE_START, DT_TT_MOVE_UP, FALSE, dt_thumbtable_cache_t::imgid, IS_NULL_PTR, dt_thumbtable_t::lock, dt_thumbtable_t::lut, dt_thumbtable_t::scroll_window, dt_thumbtable_t::thumb_height, dt_thumbtable_t::thumbs_inited, dt_thumbtable_t::thumbs_per_row, and dt_thumbtable_t::view_height.
Referenced by _grid_handle_key(), and dt_thumbtable_key_pressed_grid().
| void dt_thumbtable_schedule_focus | ( | dt_thumbtable_t * | table, |
| const gint | priority | ||
| ) |
Definition at line 191 of file thumbtable.c.
References _grab_focus(), dt_thumbtable_t::focus_idle_id, and IS_NULL_PTR.
Referenced by _dt_collection_changed_callback(), _thumbtable_idle_apply_grid_configuration(), dt_thumbtable_set_zoom(), and dt_thumbtable_update_parent().
| int dt_thumbtable_thumb_cell_decoration | ( | void | ) |
Definition at line 522 of file thumbtable.c.
References MAX.
Referenced by _filmstrip_configure_dims(), and _grid_configure_dims().