aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-map.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/misc/e-map.c')
-rw-r--r--widgets/misc/e-map.c65
1 files changed, 0 insertions, 65 deletions
diff --git a/widgets/misc/e-map.c b/widgets/misc/e-map.c
index 82ce1c17aa..d9114a5e82 100644
--- a/widgets/misc/e-map.c
+++ b/widgets/misc/e-map.c
@@ -37,13 +37,11 @@
#define SCROLL_STEP_SIZE 32
-
/* */
#define E_MAP_GET_WIDTH(map) gdk_pixbuf_get_width(((EMapPrivate *) E_MAP(map)->priv)->map_render_pixbuf)
#define E_MAP_GET_HEIGHT(map) gdk_pixbuf_get_height(((EMapPrivate *) E_MAP(map)->priv)->map_render_pixbuf)
-
/* Zoom state - keeps track of animation hacks */
typedef enum
@@ -55,7 +53,6 @@ typedef enum
}
EMapZoomState;
-
/* Private part of the EMap structure */
typedef struct
@@ -82,7 +79,6 @@ typedef struct
}
EMapPrivate;
-
/* Internal prototypes */
static void e_map_class_init (EMapClass *class);
@@ -116,12 +112,10 @@ static void repaint_point (EMap *map, EMapPoint *point);
static GtkWidgetClass *parent_class;
-
/* ----------------- *
* Widget management *
* ----------------- */
-
/**
* e_map_get_type:
* @void:
@@ -200,7 +194,6 @@ e_map_class_init (EMapClass *class)
widget_class->key_press_event = e_map_key_press;
}
-
/* Object initialization function for the map view */
static void
@@ -223,7 +216,6 @@ e_map_init (EMap *view)
GTK_WIDGET_UNSET_FLAGS (view, GTK_NO_WINDOW);
}
-
/* Destroy handler for the map view */
static void
@@ -245,7 +237,6 @@ e_map_destroy (GtkObject *object)
(*GTK_OBJECT_CLASS (parent_class)->destroy) (object);
}
-
/* Finalize handler for the map view */
static void
@@ -285,7 +276,6 @@ e_map_finalize (GObject *object)
(*G_OBJECT_CLASS (parent_class)->finalize) (object);
}
-
/* Unmap handler for the map view */
static void
@@ -298,7 +288,6 @@ e_map_unmap (GtkWidget *widget)
(*GTK_WIDGET_CLASS (parent_class)->unmap) (widget);
}
-
/* Realize handler for the map view */
static void
@@ -335,7 +324,6 @@ e_map_realize (GtkWidget *widget)
update_render_pixbuf (E_MAP (widget), GDK_INTERP_BILINEAR, TRUE);
}
-
/* Unrealize handler for the map view */
static void
@@ -348,7 +336,6 @@ e_map_unrealize (GtkWidget *widget)
(*GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
}
-
/* Size_request handler for the map view */
static void
@@ -370,7 +357,6 @@ e_map_size_request (GtkWidget *widget, GtkRequisition *requisition)
requisition->height = gdk_pixbuf_get_height (priv->map_pixbuf);
}
-
/* Size_allocate handler for the map view */
static void
@@ -403,7 +389,6 @@ e_map_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
update_render_pixbuf (view, GDK_INTERP_BILINEAR, TRUE);
}
-
/* Button press handler for the map view */
static gint
@@ -413,7 +398,6 @@ e_map_button_press (GtkWidget *widget, GdkEventButton *event)
return TRUE;
}
-
/* Button release handler for the map view */
static gint
@@ -425,7 +409,6 @@ e_map_button_release (GtkWidget *widget, GdkEventButton *event)
return TRUE;
}
-
/* Motion handler for the map view */
static gint
@@ -446,7 +429,6 @@ e_map_motion (GtkWidget *widget, GdkEventMotion *event)
*/
}
-
/* Expose handler for the map view */
static gint
@@ -464,7 +446,6 @@ e_map_expose (GtkWidget *widget, GdkEventExpose *event)
return TRUE;
}
-
/* Set_scroll_adjustments handler for the map view */
static void
@@ -529,7 +510,6 @@ e_map_set_scroll_adjustments (GtkWidget *widget, GtkAdjustment *hadj, GtkAdjustm
if (need_adjust) adjustment_changed_cb (NULL, view);
}
-
/* Key press handler for the map view */
static gint
@@ -601,12 +581,10 @@ e_map_key_press (GtkWidget *widget, GdkEventKey *event)
return TRUE;
}
-
/* ---------------- *
* Widget interface *
* ---------------- */
-
/**
* e_map_new:
* @void:
@@ -630,10 +608,8 @@ e_map_new (void)
return (E_MAP (widget));
}
-
/* --- Coordinate translation --- */
-
/* These functions translate coordinates between longitude/latitude and
* the image x/y offsets, using the equidistant cylindrical projection.
*
@@ -660,7 +636,6 @@ e_map_window_to_world (EMap *map, double win_x, double win_y, double *world_long
((double) height / 2.0) * 90.0;
}
-
void
e_map_world_to_window (EMap *map, double world_longitude, double world_latitude, double *win_x, double *win_y)
{
@@ -685,10 +660,8 @@ e_map_world_to_window (EMap *map, double world_longitude, double world_latitude,
#endif
}
-
/* --- Zoom --- */
-
gdouble
e_map_get_magnification (EMap *map)
{
@@ -699,7 +672,6 @@ e_map_get_magnification (EMap *map)
else return 1.0;
}
-
void
e_map_zoom_to_location (EMap *map, double longitude, double latitude)
{
@@ -720,7 +692,6 @@ e_map_zoom_to_location (EMap *map, double longitude, double latitude)
zoom_do (map);
}
-
void
e_map_zoom_out (EMap *map)
{
@@ -738,28 +709,24 @@ e_map_zoom_out (EMap *map)
priv->zoom_state = E_MAP_ZOOMED_OUT;
}
-
void
e_map_set_smooth_zoom (EMap *map, gboolean state)
{
((EMapPrivate *) map->priv)->smooth_zoom = state;
}
-
gboolean
e_map_get_smooth_zoom (EMap *map)
{
return (((EMapPrivate *) map->priv)->smooth_zoom);
}
-
void
e_map_freeze (EMap *map)
{
((EMapPrivate *) map->priv)->frozen = TRUE;
}
-
void
e_map_thaw (EMap *map)
{
@@ -767,10 +734,8 @@ e_map_thaw (EMap *map)
update_and_paint (map);
}
-
/* --- Point manipulation --- */
-
EMapPoint *
e_map_add_point (EMap *map, gchar *name, double longitude, double latitude, guint32 color_rgba)
{
@@ -796,7 +761,6 @@ e_map_add_point (EMap *map, gchar *name, double longitude, double latitude, guin
return point;
}
-
void
e_map_remove_point (EMap *map, EMapPoint *point)
{
@@ -817,7 +781,6 @@ e_map_remove_point (EMap *map, EMapPoint *point)
g_free (point);
}
-
void
e_map_point_get_location (EMapPoint *point, double *longitude, double *latitude)
{
@@ -825,21 +788,18 @@ e_map_point_get_location (EMapPoint *point, double *longitude, double *latitude)
*latitude = point->latitude;
}
-
gchar *
e_map_point_get_name (EMapPoint *point)
{
return point->name;
}
-
guint32
e_map_point_get_color_rgba (EMapPoint *point)
{
return point->rgba;
}
-
void
e_map_point_set_color_rgba (EMap *map, EMapPoint *point, guint32 color_rgba)
{
@@ -854,21 +814,18 @@ e_map_point_set_color_rgba (EMap *map, EMapPoint *point, guint32 color_rgba)
}
}
-
void
e_map_point_set_data (EMapPoint *point, gpointer data)
{
point->user_data = data;
}
-
gpointer
e_map_point_get_data (EMapPoint *point)
{
return point->user_data;
}
-
gboolean
e_map_point_is_in_view (EMap *map, EMapPoint *point)
{
@@ -887,7 +844,6 @@ e_map_point_is_in_view (EMap *map, EMapPoint *point)
return FALSE;
}
-
EMapPoint *
e_map_get_closest_point (EMap *map, double longitude, double latitude, gboolean in_view)
{
@@ -918,12 +874,10 @@ e_map_get_closest_point (EMap *map, double longitude, double latitude, gboolean
return point_chosen;
}
-
/* ------------------ *
* Internal functions *
* ------------------ */
-
static void
repaint_visible (EMap *map)
{
@@ -937,7 +891,6 @@ repaint_visible (EMap *map)
request_paint_area (map, &area);
}
-
static void
update_and_paint (EMap *map)
{
@@ -945,7 +898,6 @@ update_and_paint (EMap *map)
repaint_visible (map);
}
-
static gint
load_map_background (EMap *view, gchar *name)
{
@@ -965,7 +917,6 @@ load_map_background (EMap *view, gchar *name)
return TRUE;
}
-
static void
update_render_pixbuf (EMap *map, GdkInterpType interp, gboolean render_overlays)
{
@@ -1032,7 +983,6 @@ update_render_pixbuf (EMap *map, GdkInterpType interp, gboolean render_overlays)
set_scroll_area (map);
}
-
/* Queues a repaint of the specified area in window coordinates */
static void
@@ -1106,7 +1056,6 @@ put_pixel_with_clipping (GdkPixbuf *pixbuf, gint x, gint y, guint rgba)
}
}
-
/* Redraw point in client pixbuf */
static void
@@ -1140,7 +1089,6 @@ update_render_point (EMap *map, EMapPoint *point)
put_pixel_with_clipping (pb, px + 1, py + 1, 0x000000ff);
}
-
/* Repaint point on X server */
static void
@@ -1160,7 +1108,6 @@ repaint_point (EMap *map, EMapPoint *point)
request_paint_area (map, &area);
}
-
static void
center_at (EMap *map, gint x, gint y, gboolean scroll)
{
@@ -1187,7 +1134,6 @@ center_at (EMap *map, gint x, gint y, gboolean scroll)
}
}
-
static void
smooth_center_at (EMap *map, gint x, gint y)
{
@@ -1218,7 +1164,6 @@ smooth_center_at (EMap *map, gint x, gint y)
}
}
-
/* Scrolls the view to the specified offsets. Does not perform range checking! */
static void
@@ -1321,7 +1266,6 @@ scroll_to (EMap *view, gint x, gint y)
}
}
-
static gint divide_seq[] =
{
/* Dividends for divisor of 2 */
@@ -1397,7 +1341,6 @@ static gint divide_seq[] =
0
};
-
typedef enum
{
AXIS_X,
@@ -1405,7 +1348,6 @@ typedef enum
}
AxisType;
-
static void
blowup_window_area (GdkWindow *window, gint area_x, gint area_y, gint target_x, gint target_y, gint total_width, gint total_height, gfloat zoom_factor)
{
@@ -1419,7 +1361,6 @@ blowup_window_area (GdkWindow *window, gint area_x, gint area_y, gint target_x,
gint i, j;
gint line;
-
/* Set up the GC we'll be using */
gc = gdk_gc_new (window);
@@ -1541,7 +1482,6 @@ blowup_window_area (GdkWindow *window, gint area_x, gint area_y, gint target_x,
g_object_unref (gc);
}
-
static void
zoom_in_smooth (EMap *map)
{
@@ -1598,7 +1538,6 @@ zoom_in_smooth (EMap *map)
request_paint_area (map, &area);
}
-
static void
zoom_in (EMap *map)
{
@@ -1624,7 +1563,6 @@ zoom_in (EMap *map)
request_paint_area (map, &area);
}
-
static void
zoom_out (EMap *map)
{
@@ -1654,7 +1592,6 @@ zoom_out (EMap *map)
repaint_visible (map);
}
-
static void
zoom_do (EMap *map)
{
@@ -1681,7 +1618,6 @@ zoom_do (EMap *map)
set_scroll_area(map);
}
-
/* Callback used when an adjustment is changed */
static void
@@ -1696,7 +1632,6 @@ adjustment_changed_cb (GtkAdjustment *adj, gpointer data)
scroll_to (view, priv->hadj->value, priv->vadj->value);
}
-
static void
set_scroll_area (EMap *view)
{
commit/LEGAL?id=825c3f95ab8e3e260fd5c7b678773fa9d845ab38'>Sync (and improve) the NO_PACKAGE and IGNORE statements and the entrygerald2014-03-031-1/+1 * LEGAL: make text match porteadler2014-02-231-12/+12 * Remove expired port:nemysis2014-02-191-1/+0 * Cosmetic fixes, update the pkg-descr WWWfeld2014-02-181-0/+1 * emulators/fmsx:rene2014-01-311-1/+1 * - Update to 6.8.0tota2014-01-191-1/+1 * - Fix build on recent FreeBSD (10, 11)martymac2014-01-131-0/+1 * Welcome net-mgmt/unifi2 to the treefeld2014-01-041-0/+1 * Add CONFLICTS for incoming net-mgmt/unifi2feld2014-01-041-1/+1 * Remove entry for mplayer, it is no longer restrictedarved2014-01-031-1/+0 * sync with make -VLEGALnetchild2013-12-241-1/+1 * Remove expired ports:rene2013-12-221-2/+0 * multiple: sync legaleadler2013-12-131-4/+4 * Update distname for games/flightgear-mb339-panmartymac2013-12-121-1/+1 * math/emc2: modernize porteadler2013-12-121-1/+1 * multiple: sync LEGAL and 'make -VLEGAL'eadler2013-12-121-2/+2 * multiple: sync LEGAL and 'make -VLEGAL'eadler2013-12-121-3/+3 * LEGAL: sync LEGAL texteadler2013-12-121-1/+1 * - update LEGALdinoex2013-12-121-4/+3 * - Sync legal texts for my portsmva2013-12-121-7/+15 * LEGAL, chinese/moettf: sync LEGAL texteadler2013-12-121-1/+1 * LEGAL, sysutils/arcconf: canconicalize LEGAL texteadler2013-12-121-1/+1 * LEGAL: remove security/pgpdumpeadler2013-12-121-1/+0 * - Capitalize multimedia/vdr-plugin-markad RESTRICTED.nox2013-12-121-0/+1 * Fix typo.ehaupt2013-12-121-1/+1 * - Update f-prot entry to match the output of "make -VLEGAL"tdb2013-12-111-1/+1 * LEGAL: split emulators/fuse-roms into twoeadler2013-12-111-1/+2 * - Make 'make -VLEGAL' match the entry in LEGAL andrene2013-12-111-1/+1 * LEGAL: add games/kye to LEGALeadler2013-12-111-0/+1 * LEGAL: remove security/pam_authsrveadler2013-12-111-1/+0 * Preparing for new port net-mgmt/unififeld2013-11-261-0/+1 * Remove expired ports:rene2013-11-151-1/+0 * Add Opus-22.rom for emulators/fuse-romsrene2013-11-131-1/+1 * This port installs some extra ZX spectrum ROM images which have beenrene2013-11-131-0/+1 * No public distfiles available anymore, pkgname conflict with sysutils/trackerbapt2013-10-021-1/+0 * Remove expired ports:rene2013-08-281-2/+0 * Add new port print/hplip-plugin:makc2013-07-141-0/+1 * Remove net/urtwn-firmware-kmod, integrated to head/ as of r253139.gjb2013-07-131-1/+0 * Remove expired port:rene2013-07-071-1/+0 * Change comment for uzap. Distributing the source is OK (has beenjoerg2013-06-181-1/+1 * - Add new port: net/urtwn-firmware-kmod:gjb2013-06-081-0/+1 * Restore the LEGAL statement about ventrilo-serverbapt2013-06-061-0/+1 * fwtk has gonebapt2013-06-051-1/+0 * Remove expired ports:rene2013-06-031-1/+0 * - Finish removal of support for Linux 2.4 in bsd.linux-apps.mk andrene2013-05-301-1/+0 * I copied the text from the wrong open makefile :-\eadler2013-05-181-1/+1 * Add a new port with legal issues.eadler2013-05-181-0/+1 * qjail license resolved in r316638bdrewery2013-04-291-1/+0 * Add entry to LEGAL as RESTRICTED status was added in r314731eadler2013-03-281-0/+1 * No approval process was required in my testing.eadler2013-03-251-1/+0 * No approval process was required in my testing.eadler2013-03-251-1/+0 * The file 'COPYING' in the distfile seems to indicate that the line in LEGAL i...eadler2013-03-251-1/+1 * a license was added in r300998. Since there is now the option for AGPL no re...eadler2013-03-251-1/+0 * - A port which is restricted should must not hide this facteadler2013-03-251-1/+1 * Removed in r169678eadler2013-03-221-1/+0 * Remove as port is under the GPL (r255853)eadler2013-03-211-1/+0 * The only reference to the files being restricted is Makefile.icons.eadler2013-03-211-1/+0 * Expand globs. This makes some future work a lot easier.eadler2013-03-211-6/+16 * Add a few missing entrieseadler2013-03-211-0/+2 * - Remove fsharppgj2013-03-211-1/+0 * Removed entry from port Makefile in r267037.eadler2013-03-211-1/+0 * Removed entry from port Makefile in r46360.eadler2013-03-211-1/+0 * Remove non-existent WWWeadler2013-03-191-1/+0 * tkman is licensed under the "Artistic License"eadler2013-03-191-1/+0 * Per r301175 xteddy is GPL so remove entry from LEGALeadler2013-03-191-1/+0 * Removeeadler2013-03-191-1/+0 * french/gibi: IGNORE for more than 6 monthseadler2013-03-191-1/+0 * Per r306610eadler2013-03-181-1/+0 * According to r242466 the port is now GPL so remove this entry from LEGALeadler2013-03-181-1/+0 * This software is under the BSD license:eadler2013-03-181-1/+0 * This software is under the GPLeadler2013-03-181-1/+0 * Per r172016eadler2013-03-181-1/+0 * According to r142824 the port is now BSD so remove this entry from LEGALeadler2013-03-181-1/+0 * Sort by distname. This was kind of done before but clearly got out of wack.eadler2013-03-181-64/+64 * This port seems to be legally distributed based on the COPYING fileeadler2013-03-181-1/+0 * audio/faad:eadler2013-03-181-1/+0 * Remove dns/h2n: legally questionable and obsolete.eadler2013-03-181-1/+0 * According to r160671 the port is not restricted any longereadler2013-03-181-1/+0 * According to r123287 the port is now GPLed so remove this entry from LEGALeadler2013-03-181-1/+0 * add an additional missing porteadler2013-03-181-0/+1 * acroread8 is also legally restrictedeadler2013-03-181-0/+1 * According to r206652 the port is now GPLed so remove this entry from LEGALeadler2013-03-181-1/+0 * According to r249857 the port is now GPLed so remove this entry from LEGALeadler2013-03-181-2/+0 * IDEA was no longer covered by any patents conservatively in 2012.eadler2013-03-171-1/+0 * x11-fonts appears not to exist.eadler2013-03-171-2/+0 * Make LEGAL machine parsableeadler2013-03-171-378/+168 * Remove expired, unmaintained ports:rene2013-03-141-4/+0 * 2013-03-13 misc/gopod: does not work with modern iPods anymorebapt2013-03-131-2/+0