50#include <gdk/gdkkeysyms.h>
110#define LIMIT_RESULT 5
125 return _(
"find location");
130 static const char *
v[] = {
"map",
NULL};
465 gpointer user_data,
GError **e)
489 int max_outline_nodes =
dt_conf_get_int(
"plugins/map/max_outline_nodes");
510 float lon1, lat1, lon2, lat2;
527 place->bbox.lon1 = lon1;
528 place->bbox.lat1 = lat1;
529 place->bbox.lon2 = lon2;
530 place->bbox.lat2 = lat2;
606 if(*
endptr !=
',' ||
i > max_outline_nodes)
712 points[0] =
point->lat;
713 points[1] =
point->lon;
void dt_accels_disconnect_on_text_input(GtkWidget *widget)
Disconnect accels while a text or search entry has the focus, and reconnect them when it loses it....
Handle default and user-set shortcuts (accelerators)
static void error(char *msg)
struct _GtkWidget GtkWidget
GtkWidget, opaque, spelled exactly as GTK spells it.
int dt_conf_get_bool(const char *name)
int dt_conf_get_int(const char *name)
Integer for name, clamped to the bounds declared in the XML.
const char * dt_conf_get_string_const(const char *name)
Borrow the stored string for name without copying it.
const char darktable_package_string[]
void dt_gui_container_destroy_children(GtkContainer *container)
struct dt_view_manager_t * dt_view_manager_get_global(void)
#define g_list_is_singleton(list)
static const dt_iop_drawlayer_params_t * params
static void _show_location(dt_lib_location_t *lib, _lib_location_result_t *p)
void gui_reset(dt_lib_module_t *self)
int set_params(dt_lib_module_t *self, const void *params, int size)
static void clear_search(dt_lib_location_t *lib)
void * get_params(dt_lib_module_t *self, int *size)
static void _clear_markers(dt_lib_location_t *lib)
static size_t _lib_location_curl_write_data(void *buffer, size_t size, size_t nmemb, void *userp)
void gui_cleanup(dt_lib_module_t *self)
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 _lib_location_entry_activated(GtkButton *button, gpointer user_data)
static GMarkupParser _lib_location_parser
uint32_t container(dt_lib_module_t *self)
static gboolean _lib_location_result_item_activated(GtkButton *button, GdkEventButton *ev, gpointer user_data)
static void _lib_location_search_finish(gpointer user_data)
static gboolean _event_box_enter_leave(GtkWidget *widget, GdkEventCrossing *event, gpointer user_data)
static void free_location(_lib_location_result_t *location)
void gui_init(dt_lib_module_t *self)
const char ** views(dt_lib_module_t *self)
@ LOCATION_TYPE_ADMINISTRATIVE
@ LOCATION_TYPE_RESIDENTIAL
static int32_t _lib_location_place_get_zoom(_lib_location_result_t *place)
static gboolean _lib_location_search(gpointer user_data)
static GtkWidget * _lib_location_place_widget_new(dt_lib_location_t *lib, _lib_location_result_t *place)
#define IS_NULL_PTR(p)
C is way too permissive with !=, == and if(var) checks, which can mean too many things depending on w...
static void dt_free_gpointer(gpointer ptr)
g_free() one pointer, with the signature GDestroyNotify wants.
#define dt_free(ptr)
g_free() ptr and set it to NULL, skipping both if it is already NULL.
#define DT_MODULE(MODVER)
Instantiate the version handshake every module must export. Use once, at file scope,...
#define DT_DEBUG_CONTROL_SIGNAL_RAISE(ctlsig, signal,...)
struct dt_control_signal_t * dt_control_signal_get_global(void)
@ DT_SIGNAL_LOCATION_CHANGED
float dt_aligned_pixel_simd_t __attribute__((vector_size(16), aligned(16)))
Apply one channel's tone curve to each of the three colour channels, or pass the channel through unto...
const float const float param
_lib_location_result_t * result
dt_geo_map_display_t marker_type
_lib_location_type_t type
_lib_location_result_t * selected_location
dt_geo_map_display_t marker_type
dt_geo_map_display_t marker_type
_lib_location_type_t type
gchar * dt_util_longitude_str(float longitude)
gchar * dt_util_latitude_str(float latitude)
void dt_view_map_center_on_location(const dt_view_manager_t *vm, gdouble lon, gdouble lat, gdouble zoom)
GObject * dt_view_map_add_marker(const dt_view_manager_t *vm, dt_geo_map_display_t type, GList *points)
void dt_view_map_center_on_bbox(const dt_view_manager_t *vm, gdouble lon1, gdouble lat1, gdouble lon2, gdouble lat2)
gboolean dt_view_map_remove_marker(const dt_view_manager_t *vm, dt_geo_map_display_t type, GObject *marker)
@ DT_UI_CONTAINER_PANEL_RIGHT_CENTER