Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
location.c File Reference
#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))
 
voidget_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
 

Macro Definition Documentation

◆ LIMIT_RESULT

#define LIMIT_RESULT   5

Definition at line 110 of file location.c.

Typedef Documentation

◆ _callback_param_t

◆ _lib_location_result_t

◆ _lib_location_type_t

◆ dt_lib_location_t

Enumeration Type Documentation

◆ _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.

Function Documentation

◆ __attribute__()

◆ _clear_markers()

◆ _event_box_enter_leave()

static gboolean _event_box_enter_leave ( GtkWidget widget,
GdkEventCrossing *  event,
gpointer  user_data 
)
static

Definition at line 181 of file location.c.

References FALSE.

Referenced by _lib_location_place_widget_new().

◆ _lib_location_curl_write_data()

static size_t _lib_location_curl_write_data ( void buffer,
size_t  size,
size_t  nmemb,
void userp 
)
static

◆ _lib_location_entry_activated()

void _lib_location_entry_activated ( GtkButton *  button,
gpointer  user_data 
)
static

◆ _lib_location_parser_start_element()

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
Todo:
: support holes in POLYGON and several forms in MULTIPOLYGON?

Definition at line 463 of file location.c.

◆ _lib_location_place_get_zoom()

◆ _lib_location_place_widget_new()

◆ _lib_location_result_item_activated()

gboolean _lib_location_result_item_activated ( GtkButton *  button,
GdkEventButton *  ev,
gpointer  user_data 
)
static

Definition at line 438 of file location.c.

References _show_location(), param, and TRUE.

Referenced by _lib_location_place_widget_new().

◆ _lib_location_search()

◆ _lib_location_search_finish()

static void _lib_location_search_finish ( gpointer  user_data)
static

◆ _show_location()

◆ clear_search()

◆ container()

uint32_t container ( dt_lib_module_t self)

Definition at line 134 of file location.c.

References DT_UI_CONTAINER_PANEL_RIGHT_CENTER.

◆ free_location()

static void free_location ( _lib_location_result_t location)
static

◆ get_params()

◆ gui_cleanup()

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.

◆ gui_init()

◆ gui_reset()

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.

◆ name()

const char * name ( struct dt_lib_module_t self)

Definition at line 123 of file location.c.

◆ position()

int position ( )

Definition at line 147 of file location.c.

◆ set_params()

◆ views()

const char ** views ( dt_lib_module_t self)

Definition at line 128 of file location.c.

References v.

Variable Documentation

◆ _lib_location_parser

GMarkupParser _lib_location_parser = { _lib_location_parser_start_element, NULL, NULL, NULL, NULL }
static

Definition at line 252 of file location.c.

Referenced by _lib_location_search().

◆ bbox

◆ lat

◆ lon

◆ marker_type

dt_geo_map_display_t marker_type

Definition at line 5 of file location.c.

◆ relevance

int32_t relevance

Definition at line 0 of file location.c.

◆ 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().