![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "metadata/geo.h"#include "control/settings.h"#include "common/curl_tools.h"#include "common/glib_utils.h"#include "system/macros.h"#include "common/module_versioning.h"#include "common/utility.h"#include "common/conf.h"#include "control/jobs.h"#include "libs/lib.h"#include "libs/lib_api.h"#include "views/view.h"#include <curl/curl.h>#include <gdk/gdkkeysyms.h>#include "gui/window_manager.h"#include "widgets/accelerators.h"#include "widgets/container.h"#include "widgets/widget_settings.h"#include "control/signal.h"
Include dependency graph for location.c:Go to the source code of this file.
Data Structures | |
| struct | _lib_location_result_t |
| struct | dt_lib_location_t |
| struct | _callback_param_t |
| struct | params_fixed_t |
Macros | |
| #define | LIMIT_RESULT 5 |
Typedefs | |
| typedef enum _lib_location_type_t | _lib_location_type_t |
| typedef struct _lib_location_result_t | _lib_location_result_t |
| typedef struct dt_lib_location_t | dt_lib_location_t |
| typedef struct _callback_param_t | _callback_param_t |
Enumerations | |
| enum | _lib_location_type_t { LOCATION_TYPE_VILLAGE , LOCATION_TYPE_HAMLET , LOCATION_TYPE_CITY , LOCATION_TYPE_ADMINISTRATIVE , LOCATION_TYPE_RESIDENTIAL , LOCATION_TYPE_UNKNOWN } |
Functions | |
| static void | _lib_location_entry_activated (GtkButton *button, gpointer user_data) |
| static gboolean | _lib_location_result_item_activated (GtkButton *button, GdkEventButton *ev, gpointer user_data) |
| static void | _lib_location_parser_start_element (GMarkupParseContext *cxt, const char *element_name, const char **attribute_names, const gchar **attribute_values, gpointer user_data, GError **error) |
| static void | clear_search (dt_lib_location_t *lib) |
| const char * | name (struct dt_lib_module_t *self) |
| const char ** | views (dt_lib_module_t *self) |
| uint32_t | container (dt_lib_module_t *self) |
| void | gui_reset (dt_lib_module_t *self) |
| int | position () |
| void | gui_init (dt_lib_module_t *self) |
| void | gui_cleanup (dt_lib_module_t *self) |
| static gboolean | _event_box_enter_leave (GtkWidget *widget, GdkEventCrossing *event, gpointer user_data) |
| static GtkWidget * | _lib_location_place_widget_new (dt_lib_location_t *lib, _lib_location_result_t *place) |
| static size_t | _lib_location_curl_write_data (void *buffer, size_t size, size_t nmemb, void *userp) |
| static int32_t | _lib_location_place_get_zoom (_lib_location_result_t *place) |
| static void | _clear_markers (dt_lib_location_t *lib) |
| static void | free_location (_lib_location_result_t *location) |
| static void | _show_location (dt_lib_location_t *lib, _lib_location_result_t *p) |
| static void | _lib_location_search_finish (gpointer user_data) |
| static gboolean | _lib_location_search (gpointer user_data) |
| struct params_fixed_t | __attribute__ ((packed)) |
| void * | get_params (dt_lib_module_t *self, int *size) |
| int | set_params (dt_lib_module_t *self, const void *params, int size) |
Variables | |
| static GMarkupParser | _lib_location_parser = { _lib_location_parser_start_element, NULL, NULL, NULL, NULL } |
| int32_t | relevance |
| _lib_location_type_t | type |
| float | lon |
| float | lat |
| dt_map_box_t | bbox |
| dt_geo_map_display_t | marker_type |
| #define LIMIT_RESULT 5 |
Definition at line 110 of file location.c.
| typedef struct _callback_param_t _callback_param_t |
| typedef struct _lib_location_result_t _lib_location_result_t |
| typedef enum _lib_location_type_t _lib_location_type_t |
| typedef struct dt_lib_location_t dt_lib_location_t |
| enum _lib_location_type_t |
| Enumerator | |
|---|---|
| LOCATION_TYPE_VILLAGE | |
| LOCATION_TYPE_HAMLET | |
| LOCATION_TYPE_CITY | |
| LOCATION_TYPE_ADMINISTRATIVE | |
| LOCATION_TYPE_RESIDENTIAL | |
| LOCATION_TYPE_UNKNOWN | |
Definition at line 59 of file location.c.
| struct params_fixed_t __attribute__ | ( | (packed) | ) |
References _lib_location_result_t::bbox, dt_conf_get_bool(), dt_conf_get_int(), dt_free, dt_free_gpointer(), error(), FALSE, i, IS_NULL_PTR, lat, _lib_location_result_t::lat, dt_map_box_t::lat1, dt_map_box_t::lat2, LOCATION_TYPE_ADMINISTRATIVE, LOCATION_TYPE_CITY, LOCATION_TYPE_HAMLET, LOCATION_TYPE_RESIDENTIAL, lon, _lib_location_result_t::lon, dt_map_box_t::lon1, dt_map_box_t::lon2, MAP_DISPLAY_NONE, MAP_DISPLAY_POINT, MAP_DISPLAY_POLYGON, MAP_DISPLAY_TRACK, _lib_location_result_t::marker_points, dt_lib_location_t::marker_points, _lib_location_result_t::marker_type, _lib_location_result_t::name, p, dt_lib_location_t::places, TRUE, and _lib_location_result_t::type.
|
static |
Definition at line 279 of file location.c.
References dt_view_manager_get_global(), dt_view_map_remove_marker(), MAP_DISPLAY_NONE, dt_lib_location_t::marker, and dt_lib_location_t::marker_type.
Referenced by _show_location(), and clear_search().
|
static |
Definition at line 181 of file location.c.
References FALSE.
Referenced by _lib_location_place_widget_new().
|
static |
Definition at line 237 of file location.c.
References dt_free, IS_NULL_PTR, dt_lib_location_t::response, and dt_lib_location_t::response_size.
Referenced by _lib_location_search().
|
static |
Definition at line 447 of file location.c.
References _lib_location_search(), _lib_location_search_finish(), dt_lib_module_t::data, FALSE, IS_NULL_PTR, and dt_lib_location_t::search.
Referenced by gui_init().
|
static |
Definition at line 463 of file location.c.
|
static |
Definition at line 255 of file location.c.
References LOCATION_TYPE_ADMINISTRATIVE, LOCATION_TYPE_CITY, LOCATION_TYPE_HAMLET, LOCATION_TYPE_RESIDENTIAL, LOCATION_TYPE_UNKNOWN, LOCATION_TYPE_VILLAGE, and _lib_location_result_t::type.
Referenced by _show_location().
|
static |
Definition at line 191 of file location.c.
References _event_box_enter_leave(), _lib_location_result_item_activated(), dt_lib_location_t::callback_params, dt_free, DT_GUI_BOX_SPACING, dt_util_latitude_str(), dt_util_longitude_str(), FALSE, lat, _lib_location_result_t::lat, lon, _lib_location_result_t::lon, _lib_location_result_t::name, param, dt_lib_location_t::result, and TRUE.
Referenced by _lib_location_search_finish().
|
static |
Definition at line 438 of file location.c.
References _show_location(), param, and TRUE.
Referenced by _lib_location_place_widget_new().
|
static |
Definition at line 361 of file location.c.
References _lib_location_curl_write_data(), _lib_location_parser, clear_search(), darktable_package_string, dt_lib_module_t::data, dt_conf_get_string_const(), dt_curl_init(), dt_free, FALSE, IS_NULL_PTR, LIMIT_RESULT, dt_lib_location_t::places, res, dt_lib_location_t::response, dt_lib_location_t::response_size, dt_lib_location_t::search, and TRUE.
Referenced by _lib_location_entry_activated().
|
static |
Definition at line 336 of file location.c.
References _lib_location_place_widget_new(), _show_location(), dt_lib_module_t::data, g_list_is_singleton, IS_NULL_PTR, dt_lib_location_t::places, dt_lib_location_t::result, and TRUE.
Referenced by _lib_location_entry_activated(), and set_params().
|
static |
Definition at line 312 of file location.c.
References _clear_markers(), _lib_location_place_get_zoom(), dt_control_signal_get_global(), DT_DEBUG_CONTROL_SIGNAL_RAISE, DT_SIGNAL_LOCATION_CHANGED, dt_view_manager_get_global(), dt_view_map_add_marker(), dt_view_map_center_on_bbox(), dt_view_map_center_on_location(), MAP_DISPLAY_POLYGON, dt_lib_location_t::marker, dt_lib_location_t::marker_type, p, and dt_lib_location_t::selected_location.
Referenced by _lib_location_result_item_activated(), and _lib_location_search_finish().
|
static |
Definition at line 296 of file location.c.
References _clear_markers(), dt_lib_location_t::callback_params, dt_free, dt_free_gpointer(), dt_gui_container_destroy_children(), free_location(), dt_lib_location_t::places, dt_lib_location_t::response, dt_lib_location_t::response_size, dt_lib_location_t::result, and dt_lib_location_t::selected_location.
Referenced by _lib_location_search(), gui_reset(), and set_params().
| uint32_t container | ( | dt_lib_module_t * | self | ) |
Definition at line 134 of file location.c.
References DT_UI_CONTAINER_PANEL_RIGHT_CENTER.
|
static |
Definition at line 288 of file location.c.
References dt_free, dt_free_gpointer(), _lib_location_result_t::marker_points, and _lib_location_result_t::name.
Referenced by clear_search().
| void * get_params | ( | dt_lib_module_t * | self, |
| int * | size | ||
| ) |
Definition at line 681 of file location.c.
References _lib_location_result_t::bbox, params_fixed_t::bbox, dt_lib_module_t::data, IS_NULL_PTR, _lib_location_result_t::lat, params_fixed_t::lat, dt_map_box_t::lat1, dt_map_box_t::lat2, _lib_location_result_t::lon, params_fixed_t::lon, dt_map_box_t::lon1, dt_map_box_t::lon2, _lib_location_result_t::marker_points, _lib_location_result_t::marker_type, params_fixed_t::marker_type, _lib_location_result_t::name, _lib_location_result_t::relevance, params_fixed_t::relevance, dt_lib_location_t::selected_location, size, _lib_location_result_t::type, and params_fixed_t::type.
| void gui_cleanup | ( | dt_lib_module_t * | self | ) |
Definition at line 175 of file location.c.
References dt_lib_module_t::data, dt_free, and IS_NULL_PTR.
| void gui_init | ( | dt_lib_module_t * | self | ) |
Definition at line 155 of file location.c.
References _lib_location_entry_activated(), dt_lib_module_t::data, dt_accels_disconnect_on_text_input(), DT_GUI_BOX_SPACING, FALSE, dt_lib_location_t::result, dt_lib_location_t::search, TRUE, and dt_lib_module_t::widget.
| void gui_reset | ( | dt_lib_module_t * | self | ) |
Definition at line 140 of file location.c.
References clear_search(), dt_lib_module_t::data, and dt_lib_location_t::search.
| const char * name | ( | struct dt_lib_module_t * | self | ) |
Definition at line 123 of file location.c.
| int position | ( | ) |
Definition at line 147 of file location.c.
| int set_params | ( | dt_lib_module_t * | self, |
| const void * | params, | ||
| int | size | ||
| ) |
Definition at line 720 of file location.c.
References _lib_location_search_finish(), _lib_location_result_t::bbox, params_fixed_t::bbox, clear_search(), dt_lib_module_t::data, _lib_location_result_t::lat, params_fixed_t::lat, dt_geo_map_display_point_t::lat, dt_map_box_t::lat1, dt_map_box_t::lat2, _lib_location_result_t::lon, params_fixed_t::lon, dt_map_box_t::lon1, dt_map_box_t::lon2, _lib_location_result_t::marker_points, _lib_location_result_t::marker_type, params_fixed_t::marker_type, name, _lib_location_result_t::name, p, dt_lib_location_t::places, _lib_location_result_t::relevance, params_fixed_t::relevance, dt_lib_location_t::search, size, _lib_location_result_t::type, and params_fixed_t::type.
| const char ** views | ( | dt_lib_module_t * | self | ) |
Definition at line 128 of file location.c.
References v.
|
static |
Definition at line 252 of file location.c.
Referenced by _lib_location_search().
| dt_map_box_t bbox |
Definition at line 4 of file location.c.
Referenced by _bbox_include_array(), _check_hidpi_placement(), _gui_points_bbox_extend(), _outline_discs_from_outline(), _outline_grid_build(), _session_bbox_from_points(), _view_map_add_location(), _view_map_draw_other_locations(), _view_map_get_bounding_box(), dt_location_repository_get_in_bbox(), dt_map_location_convert_polygons(), dt_map_location_get_locations_on_map(), dt_masks_outline_boundary_skips(), and dt_thumbnail_create_widget().
| float lat |
Definition at line 3 of file location.c.
Referenced by __attribute__(), _drag_and_drop_received(), _is_point_in_polygon(), _lib_location_place_widget_new(), _toast_log_lat_lon(), _track_add_point(), _view_map_add_location(), _view_map_angles(), _view_map_button_press_callback(), _view_map_center_on_location(), _view_map_changed_callback_delayed(), _view_map_display_selected(), _view_map_drag_motion_callback(), _view_map_motion_notify_callback(), _view_map_scroll_event(), _view_map_thumb_angles(), dt_gpx_geodesic_intermediate_point(), dt_gpx_get_location(), dt_map_location_included(), and dt_view_map_center_on_location().
| float lon |
Definition at line 2 of file location.c.
Referenced by __attribute__(), _drag_and_drop_received(), _lib_location_place_widget_new(), _toast_log_lat_lon(), _track_add_point(), _view_map_add_location(), _view_map_angles(), _view_map_button_press_callback(), _view_map_center_on_location(), _view_map_changed_callback_delayed(), _view_map_display_selected(), _view_map_drag_motion_callback(), _view_map_motion_notify_callback(), _view_map_scroll_event(), _view_map_thumb_angles(), dt_gpx_geodesic_intermediate_point(), dt_gpx_get_location(), dt_map_location_included(), and dt_view_map_center_on_location().
| dt_geo_map_display_t marker_type |
Definition at line 5 of file location.c.
| int32_t relevance |
Definition at line 0 of file location.c.
| _lib_location_type_t type |
Definition at line 1 of file location.c.
Referenced by __OMP_DECLARE_SIMD__(), _add_shape(), _add_tag_button_clicked(), _brush_events_button_pressed(), _build_embedded_profile(), _button_clicked(), _circle_sanitize_config(), _colorout_input_format_cst(), _create_one_button(), _create_profile(), _debug_type_to_string(), _draw_basic_line(), _dt_CGATS_get_type_value(), _dt_colorchecker_get_standard_type(), _dt_colorchecker_label_build_name(), _ellipse_sanitize_config(), _folder_survey_collect(), _generate_profile_info(), _get_bounded_inside(), _get_exiv2_type(), _get_near(), _get_profile(), _get_profiles(), _gradient_events_button_pressed(), _group_member(), _gui_init_datetime(), _hash_endpoint(), _icc_blob_from_profile_key(), _image_buf_type_to_string(), _is_image_derived(), _is_valid_widget(), _lens_type_name(), _mask_indicator_tooltip(), _masks_shape_button_def(), _masks_shape_button_pressed(), _menu_add_shape(), _menuitem_preferences(), _polygon_events_button_pressed(), _pop_undo(), _pop_undo(), _pop_undo(), _pop_undo(), _pop_undo(), _profile_choice_differs(), _set_input_profile_metadata(), _show_drawlayer_modal_message(), _synch_all_snapshot(), _synch_top_snapshot(), _tag_get_tags(), _transform_from_to_rgb_lab_lcms2(), _tree_add_shape(), _tree_add_shape_menu_item(), _undo_record(), _update_layout(), _update_lines_count(), _view_map_add_marker(), _view_map_remove_marker(), _warning_error_handler(), _widget_label(), button_pressed(), button_pressed(), commit_params(), dt_collection_name(), dt_colorchecker_label_init(), dt_colorprofiles_set_display_profile_choice(), dt_colorprofiles_set_softproof_profile_choice(), dt_colorspaces_get_embedded_profile(), dt_colorspaces_get_input_profile_from_image(), dt_colorspaces_get_name(), dt_colorspaces_get_profile(), dt_colorspaces_is_raw_matrix_profile_type(), dt_colorspaces_new_image_profile(), dt_colorspaces_profile_exists(), dt_colorspaces_profile_index(), dt_control_button_pressed(), dt_control_signal_raise(), dt_dev_get_raster_mask(), dt_dev_pixelpipe_change(), dt_dev_pixelpipe_process_rec(), dt_display_profile_read(), dt_draw_curve_new(), dt_draw_dash_lengths(), dt_draw_set_dash_style(), dt_exif_xmp_attach_export(), dt_history_snapshot_undo_pop(), dt_image_get_embedded_output_profile(), dt_image_get_input_profile(), dt_imageio_dng_make_tag(), dt_imageio_jpeg_write_with_icc_profile(), dt_interpolation_new(), dt_ioppr_get_iop_work_profile_info(), dt_ioppr_set_pipe_input_profile_info(), dt_ioppr_set_pipe_output_profile_info(), dt_ioppr_set_pipe_work_profile_info(), dt_masks_create(), dt_masks_create_ext(), dt_masks_creation_mode_enter(), dt_masks_shape_menu_item_new(), dt_masks_type_name(), dt_opencl_device_init(), dt_pixelpipe_get_global_hash(), dt_thumbtable_dispatch_over(), dt_undo_record(), dt_undo_start_group(), dt_view_manager_button_pressed(), dt_view_map_add_marker(), dt_view_map_remove_marker(), get_points(), gui_reset(), interpolate_set(), interpolate_val(), interpolate_val_V2(), interpolate_val_V2_periodic(), legacy_params(), line_detect(), metadata_changed(), model_fitness(), process(), rt_select_algorithm_callback(), rt_shape_buttons_form_type(), and update_colors().