+ G_OBJECT_CLASS (gtk_text_mark_parent_class)->finalize (obj);
+}
+
+static void
+gtk_text_mark_set_property (GObject *object,
+ guint prop_id,
+ const GValue *value,
+ GParamSpec *pspec)
+{
+ gchar *tmp;
+ GtkTextMark *mark = GTK_TEXT_MARK (object);
+ GtkTextLineSegment *seg = mark->segment;
+
+ switch (prop_id)
+ {
+ case PROP_NAME:
+ tmp = seg->body.mark.name;
+ seg->body.mark.name = g_value_dup_string (value);
+ g_free (tmp);
+ break;
+
+ case PROP_LEFT_GRAVITY:
+ if (g_value_get_boolean (value))
+ seg->type = >k_text_left_mark_type;
+ else
+ seg->type = >k_text_right_mark_type;
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ }
+}
+
+static void
+gtk_text_mark_get_property (GObject *object,
+ guint prop_id,
+ GValue *value,
+ GParamSpec *pspec)
+{
+ GtkTextMark *mark = GTK_TEXT_MARK (object);
+
+ switch (prop_id)
+ {
+ case PROP_NAME:
+ g_value_set_string (value, gtk_text_mark_get_name (mark));
+ break;
+
+ case PROP_LEFT_GRAVITY:
+ g_value_set_boolean (value, gtk_text_mark_get_left_gravity (mark));
+ break;
+
+ default:
+ G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
+ }
+}
+
+/**
+ * gtk_text_mark_new:
+ * @name: (allow-none): mark name or %NULL
+ * @left_gravity: whether the mark should have left gravity
+ *
+ * Creates a text mark. Add it to a buffer using gtk_text_buffer_add_mark().
+ * If @name is %NULL, the mark is anonymous; otherwise, the mark can be
+ * retrieved by name using gtk_text_buffer_get_mark(). If a mark has left
+ * gravity, and text is inserted at the mark's current location, the mark
+ * will be moved to the left of the newly-inserted text. If the mark has
+ * right gravity (@left_gravity = %FALSE), the mark will end up on the
+ * right of newly-inserted text. The standard left-to-right cursor is a
+ * mark with right gravity (when you type, the cursor stays on the right
+ * side of the text you're typing).
+ *
+ * Return value: new #GtkTextMark
+ *
+ * Since: 2.12
+ **/
+GtkTextMark *
+gtk_text_mark_new (const gchar *name,
+ gboolean left_gravity)
+{
+ return g_object_new (GTK_TYPE_TEXT_MARK,
+ "name", name,
+ "left-gravity", left_gravity,
+ NULL);