Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
location.c File Reference
#include "common/darktable.h"
#include "common/geo.h"
#include "common/curl_tools.h"
#include "control/conf.h"
#include "control/control.h"
#include "control/jobs.h"
#include "dtgtk/icon.h"
#include "gui/gtk.h"
#include "libs/lib.h"
#include "libs/lib_api.h"
#include <curl/curl.h>
#include <gdk/gdkkeysyms.h>
+ Include dependency graph for location.c:

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

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 

Function Documentation

◆ __attribute__()

◆ _clear_markers()

◆ _event_box_enter_leave()

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

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?

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

◆ _lib_location_search()

◆ _lib_location_search_finish()

◆ _show_location()

◆ clear_search()

◆ container()

uint32_t container ( dt_lib_module_t self)

◆ free_location()

static void free_location ( _lib_location_result_t location)
static

◆ get_params()

◆ gui_cleanup()

void gui_cleanup ( dt_lib_module_t self)

References dt_lib_module_t::data.

◆ gui_init()

◆ gui_reset()

◆ name()

const char * name ( struct dt_lib_module_t self)

◆ position()

int position ( )

◆ set_params()

◆ views()

const char ** views ( dt_lib_module_t self)

Variable Documentation

◆ _lib_location_parser

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

Referenced by _lib_location_search().

◆ bbox

◆ lat

◆ lon

◆ marker_type

dt_geo_map_display_t marker_type

◆ relevance

int32_t relevance

Referenced by _match_text().

◆ type