Verified Commit c31f10bc authored by James Westman's avatar James Westman Committed by James Westman
Browse files

docs: ShumateViewport

parent 30d7e694
Pipeline #284288 passed with stage
in 2 minutes and 40 seconds
......@@ -28,9 +28,12 @@
#include "shumate-location.h"
/**
* SECTION:shumate-viewport
* @short_description: The Object holding the coordinate and zoom-level state of
* the current view.
* ShumateViewport:
*
* Contains the position and zoom level of the map.
*
* Every [class@ShumateView] has a viewport, which can be accessed with
* [prop@ShumateView.viewport].
*/
struct _ShumateViewport
......@@ -279,9 +282,9 @@ shumate_viewport_shumate_location_interface_init (ShumateLocationInterface *ifac
/**
* shumate_viewport_new:
*
* Creates a new #ShumateViewport
* Creates a new [class@Viewport].
*
* Returns: A new #ShumateViewport
* Returns: the newly created instance
*/
ShumateViewport *
shumate_viewport_new (void)
......@@ -291,10 +294,10 @@ shumate_viewport_new (void)
/**
* shumate_viewport_set_zoom_level:
* @self: a #ShumateViewport
* @self: a [class@Viewport]
* @zoom_level: the zoom level
*
* Set the zoom level
* Set the zoom level.
*/
void
shumate_viewport_set_zoom_level (ShumateViewport *self,
......@@ -313,7 +316,7 @@ shumate_viewport_set_zoom_level (ShumateViewport *self,
/**
* shumate_viewport_get_zoom_level:
* @self: a #ShumateViewport
* @self: a [class@Viewport]
*
* Get the current zoom level
*
......@@ -329,10 +332,10 @@ shumate_viewport_get_zoom_level (ShumateViewport *self)
/**
* shumate_viewport_set_max_zoom_level:
* @self: a #ShumateViewport
* @max_zoom_level: the maximal zoom level
* @self: a [class@Viewport]
* @max_zoom_level: the maximum zoom level
*
* Set the maximal zoom level
* Set the maximum zoom level
*/
void
shumate_viewport_set_max_zoom_level (ShumateViewport *self,
......@@ -353,11 +356,11 @@ shumate_viewport_set_max_zoom_level (ShumateViewport *self,
/**
* shumate_viewport_get_max_zoom_level:
* @self: a #ShumateViewport
* @self: a [class@Viewport]
*
* Get the maximal zoom level
* Get the maximum zoom level
*
* Returns: the maximal zoom level
* Returns: the maximum zoom level
*/
guint
shumate_viewport_get_max_zoom_level (ShumateViewport *self)
......@@ -369,10 +372,10 @@ shumate_viewport_get_max_zoom_level (ShumateViewport *self)
/**
* shumate_viewport_set_min_zoom_level:
* @self: a #ShumateViewport
* @min_zoom_level: the minimal zoom level
* @self: a [class@Viewport]
* @min_zoom_level: the minimum zoom level
*
* Set the minimal zoom level
* Set the minimum zoom level
*/
void
shumate_viewport_set_min_zoom_level (ShumateViewport *self,
......@@ -393,11 +396,11 @@ shumate_viewport_set_min_zoom_level (ShumateViewport *self,
/**
* shumate_viewport_get_min_zoom_level:
* @self: a #ShumateViewport
* @self: a [class@Viewport]
*
* Get the minimal zoom level
* Get the minimum zoom level
*
* Returns: the minimal zoom level
* Returns: the minimum zoom level
*/
guint
shumate_viewport_get_min_zoom_level (ShumateViewport *self)
......@@ -409,9 +412,9 @@ shumate_viewport_get_min_zoom_level (ShumateViewport *self)
/**
* shumate_viewport_zoom_in:
* @self: a #ShumateViewport
* @self: a [class@Viewport]
*
* Increases the zoom level
* Increases the zoom level.
*/
void shumate_viewport_zoom_in (ShumateViewport *self)
{
......@@ -428,9 +431,9 @@ void shumate_viewport_zoom_in (ShumateViewport *self)
/**
* shumate_viewport_zoom_out:
* @self: a #ShumateViewport
* @self: a [class@Viewport]
*
* Decreases the zoom level
* Decreases the zoom level.
*/
void shumate_viewport_zoom_out (ShumateViewport *self)
{
......@@ -444,10 +447,10 @@ void shumate_viewport_zoom_out (ShumateViewport *self)
/**
* shumate_viewport_set_reference_map_source:
* @self: a #ShumateViewport
* @map_source: (nullable): a #ShumateMapSource or %NULL to set none.
* @self: a [class@Viewport]
* @map_source: (nullable): a [class@MapSource] or %NULL to set none.
*
* Set the reference map source
* Sets the reference map source.
*/
void
shumate_viewport_set_reference_map_source (ShumateViewport *self,
......@@ -464,12 +467,12 @@ shumate_viewport_set_reference_map_source (ShumateViewport *self,
/**
* shumate_viewport_get_reference_map_source:
* @self: a #ShumateViewport
* @self: a [class@Viewport]
*
* Get the reference map source
* Gets the reference map source.
*
* Returns: (transfer none) (nullable): the reference #ShumateMapSource or %NULL
* when none has been set.
* Returns: (transfer none) (nullable): the reference [class@MapSource] or %NULL
* if none has been set.
*/
ShumateMapSource *
shumate_viewport_get_reference_map_source (ShumateViewport *self)
......@@ -481,8 +484,8 @@ shumate_viewport_get_reference_map_source (ShumateViewport *self)
/**
* shumate_viewport_widget_x_to_longitude:
* @self: a #ShumateViewport
* @widget: a #GtkWidget that uses @self as viewport
* @self: a [class@Viewport]
* @widget: a [class@Gtk.Widget] that uses @self as viewport
* @x: the x coordinate
*
* Get the longitude from an x coordinate of a widget.
......@@ -514,8 +517,8 @@ shumate_viewport_widget_x_to_longitude (ShumateViewport *self,
/**
* shumate_viewport_widget_y_to_latitude:
* @self: a #ShumateViewport
* @widget: a #GtkWidget that uses @self as viewport
* @self: a [class@Viewport]
* @widget: a [class@Gtk.Widget] that uses @self as viewport
* @y: the y coordinate
*
* Get the latitude from an y coordinate of a widget.
......@@ -547,9 +550,9 @@ shumate_viewport_widget_y_to_latitude (ShumateViewport *self,
/**
* shumate_viewport_longitude_to_widget_x:
* @self: a #ShumateViewport
* @widget: a #GtkWidget that uses @self as viewport
* @longitude: the longitude
* @self: a [class@Viewport]
* @widget: a [class@Gtk.Widget] that uses @self as viewport
* @longitude: a longitude
*
* Get an x coordinate of a widget from the longitude.
* The widget is assumed to be using the viewport.
......@@ -583,9 +586,9 @@ shumate_viewport_longitude_to_widget_x (ShumateViewport *self,
/**
* shumate_viewport_latitude_to_widget_y:
* @self: a #ShumateViewport
* @widget: a #GtkWidget that uses @self as viewport
* @latitude: the latitude
* @self: a [class@Viewport]
* @widget: a [class@Gtk.Widget] that uses @self as viewport
* @latitude: a latitude
*
* Get an y coordinate of a widget from the latitude.
* The widget is assumed to be using the viewport.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment