WebKitDOMDOMSelection: WebKitDOMGTK+ Reference Manual

## WebKitDOMDOMSelection WebKitDOMDOMSelection |

## Functions

void | webkit_dom_dom_selection_collapse ()
void | webkit_dom_dom_selection_collapse_to_end ()
void | webkit_dom_dom_selection_collapse_to_start ()
void | webkit_dom_dom_selection_delete_from_document ()
gboolean | webkit_dom_dom_selection_contains_node ()
void | webkit_dom_dom_selection_select_all_children ()
void | webkit_dom_dom_selection_extend ()
WebKitDOMRange * | webkit_dom_dom_selection_get_range_at ()
void | webkit_dom_dom_selection_remove_all_ranges ()
void | webkit_dom_dom_selection_add_range ()
void | webkit_dom_dom_selection_set_base_and_extent ()
void | webkit_dom_dom_selection_set_position ()
void | webkit_dom_dom_selection_empty ()
void | webkit_dom_dom_selection_modify ()
WebKitDOMNode * | webkit_dom_dom_selection_get_anchor_node ()
gulong | webkit_dom_dom_selection_get_anchor_offset ()
WebKitDOMNode * | webkit_dom_dom_selection_get_focus_node ()
gulong | webkit_dom_dom_selection_get_focus_offset ()
gboolean | webkit_dom_dom_selection_get_is_collapsed ()
gulong | webkit_dom_dom_selection_get_range_count ()
gchar * | webkit_dom_dom_selection_get_selection_type ()
WebKitDOMNode * | webkit_dom_dom_selection_get_base_node ()
gulong | webkit_dom_dom_selection_get_base_offset ()
WebKitDOMNode * | webkit_dom_dom_selection_get_extent_node ()
gulong | webkit_dom_dom_selection_get_extent_offset ()

## Properties

WebKitDOMNode * | anchor-node | Read
gulong | anchor-offset | Read
WebKitDOMNode * | base-node | Read
gulong | base-offset | Read
WebKitDOMNode * | extent-node | Read
gulong | extent-offset | Read
WebKitDOMNode * | focus-node | Read
gulong | focus-offset | Read
gboolean | is-collapsed | Read
gulong | range-count | Read
gchar * | type | Read

## Types and Values

struct | WebKitDOMDOMSelection

## Object Hierarchy

        GObject
        ╰── WebKitDOMObject
            ╰── WebKitDOMDOMSelection

## Description

## Functions

### webkit_dom_dom_selection_collapse ()

    void
    webkit_dom_dom_selection_collapse (WebKitDOMDOMSelection *self,
                                       WebKitDOMNode *node,
                                       gulong offset);

#### Parameters

self | A WebKitDOMDOMSelection |
node | A WebKitDOMNode |
offset | A gulong |

Since: 2.16

### webkit_dom_dom_selection_collapse_to_end ()

    void
    webkit_dom_dom_selection_collapse_to_end
                                   (WebKitDOMDOMSelection *self,
                                    GError **error);

#### Parameters

self | A WebKitDOMDOMSelection |
error | GError |

Since: 2.16

### webkit_dom_dom_selection_collapse_to_start ()

    void
    webkit_dom_dom_selection_collapse_to_start
                                   (WebKitDOMDOMSelection *self,
                                    GError **error);

#### Parameters

self | A WebKitDOMDOMSelection |
error | GError |

Since: 2.16

### webkit_dom_dom_selection_delete_from_document ()

    void
    webkit_dom_dom_selection_delete_from_document
                                   (WebKitDOMDOMSelection *self);

#### Parameters

self | A WebKitDOMDOMSelection |

Since: 2.16

### webkit_dom_dom_selection_contains_node ()

    gboolean
    webkit_dom_dom_selection_contains_node
                                   (WebKitDOMDOMSelection *self,
                                    WebKitDOMNode *node,
                                    gboolean allowPartial);

#### Parameters

self | A WebKitDOMDOMSelection |
node | A WebKitDOMNode |
allowPartial | A gboolean |

#### Returns

A gboolean

Since: 2.16

### webkit_dom_dom_selection_select_all_children ()

    void
    webkit_dom_dom_selection_select_all_children
                                   (WebKitDOMDOMSelection *self,
                                    WebKitDOMNode *node);

#### Parameters

self | A WebKitDOMDOMSelection |
node | A WebKitDOMNode |

Since: 2.16

### webkit_dom_dom_selection_extend ()

    void
    webkit_dom_dom_selection_extend (WebKitDOMDOMSelection *self,
                                     WebKitDOMNode *node,
                                     gulong offset,
                                     GError **error);

#### Parameters

self | A WebKitDOMDOMSelection |
node | A WebKitDOMNode |
offset | A gulong |
error | GError |

Since: 2.16

### webkit_dom_dom_selection_get_range_at ()

    WebKitDOMRange *
    webkit_dom_dom_selection_get_range_at (WebKitDOMDOMSelection *self,
                                           gulong index,
                                           GError **error);

#### Parameters

self | A WebKitDOMDOMSelection |
index | A gulong |
error | GError |

#### Returns

A WebKitDOMRange.

[transfer full]

Since: 2.16

### webkit_dom_dom_selection_remove_all_ranges ()

    void
    webkit_dom_dom_selection_remove_all_ranges
                                   (WebKitDOMDOMSelection *self);

#### Parameters

self | A WebKitDOMDOMSelection |

Since: 2.16

### webkit_dom_dom_selection_add_range ()

    void
    webkit_dom_dom_selection_add_range (WebKitDOMDOMSelection *self,
                                        WebKitDOMRange *range);

#### Parameters

self | A WebKitDOMDOMSelection |
range | A WebKitDOMRange |

Since: 2.16

### webkit_dom_dom_selection_set_base_and_extent ()

    void
    webkit_dom_dom_selection_set_base_and_extent
                                   (WebKitDOMDOMSelection *self,
                                    WebKitDOMNode *baseNode,
                                    gulong baseOffset,
                                    WebKitDOMNode *extentNode,
                                    gulong extentOffset);

#### Parameters

self | A WebKitDOMDOMSelection |
baseNode | A WebKitDOMNode |
baseOffset | A gulong |
extentNode | A WebKitDOMNode |
extentOffset | A gulong |

Since: 2.16

### webkit_dom_dom_selection_set_position ()

    void
    webkit_dom_dom_selection_set_position (WebKitDOMDOMSelection *self,
                                           WebKitDOMNode *node,
                                           gulong offset);

#### Parameters

self | A WebKitDOMDOMSelection |
node | A WebKitDOMNode |
offset | A gulong |

Since: 2.16

### webkit_dom_dom_selection_empty ()

    void
    webkit_dom_dom_selection_empty (WebKitDOMDOMSelection *self);

#### Parameters

self | A WebKitDOMDOMSelection |

Since: 2.16

### webkit_dom_dom_selection_modify ()

    void
    webkit_dom_dom_selection_modify (WebKitDOMDOMSelection *self,
                                     const gchar *alter,
                                     const gchar *direction,
                                     const gchar *granularity);

#### Parameters

self | A WebKitDOMDOMSelection |
alter | A gchar |
direction | A gchar |
granularity | A gchar |

Since: 2.16

### webkit_dom_dom_selection_get_anchor_node ()

    WebKitDOMNode *
    webkit_dom_dom_selection_get_anchor_node
                                   (WebKitDOMDOMSelection *self);

#### Parameters

self | A WebKitDOMDOMSelection |

#### Returns

A WebKitDOMNode.

[transfer none]

Since: 2.16

### webkit_dom_dom_selection_get_anchor_offset ()

    gulong
    webkit_dom_dom_selection_get_anchor_offset
                                   (WebKitDOMDOMSelection *self);

#### Parameters

self | A WebKitDOMDOMSelection |

#### Returns

A gulong

Since: 2.16

### webkit_dom_dom_selection_get_focus_node ()

    WebKitDOMNode *
    webkit_dom_dom_selection_get_focus_node
                                   (WebKitDOMDOMSelection *self);

#### Parameters

self | A WebKitDOMDOMSelection |

#### Returns

A WebKitDOMNode.

[transfer none]

Since: 2.16

### webkit_dom_dom_selection_get_focus_offset ()

    gulong
    webkit_dom_dom_selection_get_focus_offset
                                   (WebKitDOMDOMSelection *self);

#### Parameters

self | A WebKitDOMDOMSelection |

#### Returns

A gulong

Since: 2.16

### webkit_dom_dom_selection_get_is_collapsed ()

    gboolean
    webkit_dom_dom_selection_get_is_collapsed
                                   (WebKitDOMDOMSelection *self);

#### Parameters

self | A WebKitDOMDOMSelection |

#### Returns

A gboolean

Since: 2.16

### webkit_dom_dom_selection_get_range_count ()

    gulong
    webkit_dom_dom_selection_get_range_count
                                   (WebKitDOMDOMSelection *self);

#### Parameters

self | A WebKitDOMDOMSelection |

#### Returns

A gulong

Since: 2.16

### webkit_dom_dom_selection_get_selection_type ()

    gchar *
    webkit_dom_dom_selection_get_selection_type
                                   (WebKitDOMDOMSelection *self);

#### Parameters

self | A WebKitDOMDOMSelection |

#### Returns

A gchar

Since: 2.16

### webkit_dom_dom_selection_get_base_node ()

    WebKitDOMNode *
    webkit_dom_dom_selection_get_base_node
                                   (WebKitDOMDOMSelection *self);

#### Parameters

self | A WebKitDOMDOMSelection |

#### Returns

A WebKitDOMNode.

[transfer none]

Since: 2.16

### webkit_dom_dom_selection_get_base_offset ()

    gulong
    webkit_dom_dom_selection_get_base_offset
                                   (WebKitDOMDOMSelection *self);

#### Parameters

self | A WebKitDOMDOMSelection |

#### Returns

A gulong

Since: 2.16

### webkit_dom_dom_selection_get_extent_node ()

    WebKitDOMNode *
    webkit_dom_dom_selection_get_extent_node
                                   (WebKitDOMDOMSelection *self);

#### Parameters

self | A WebKitDOMDOMSelection |

#### Returns

A WebKitDOMNode.

[transfer none]

Since: 2.16

### webkit_dom_dom_selection_get_extent_offset ()

    gulong
    webkit_dom_dom_selection_get_extent_offset
                                   (WebKitDOMDOMSelection *self);

#### Parameters

self | A WebKitDOMDOMSelection |

#### Returns

A gulong

Since: 2.16

## Types and Values

### struct WebKitDOMDOMSelection

    struct WebKitDOMDOMSelection;

## Property Details

### The `“anchor-node”` property

      “anchor-node”              WebKitDOMNode *

read-only WebKitDOMNode* DOMSelection:anchor-node.

Flags: Read

### The `“anchor-offset”` property

      “anchor-offset”            gulong

read-only gulong DOMSelection:anchor-offset.

Flags: Read

### The `“base-node”` property

      “base-node”                WebKitDOMNode *

read-only WebKitDOMNode* DOMSelection:base-node.

Flags: Read

### The `“base-offset”` property

      “base-offset”              gulong

read-only gulong DOMSelection:base-offset.

Flags: Read

### The `“extent-node”` property

      “extent-node”              WebKitDOMNode *

read-only WebKitDOMNode* DOMSelection:extent-node.

Flags: Read

### The `“extent-offset”` property

      “extent-offset”            gulong

read-only gulong DOMSelection:extent-offset.

Flags: Read

### The `“focus-node”` property

      “focus-node”               WebKitDOMNode *

read-only WebKitDOMNode* DOMSelection:focus-node.

Flags: Read

### The `“focus-offset”` property

      “focus-offset”             gulong

read-only gulong DOMSelection:focus-offset.

Flags: Read

### The `“is-collapsed”` property

      “is-collapsed”             gboolean

read-only gboolean DOMSelection:is-collapsed.

Flags: Read

Default value: FALSE

### The `“range-count”` property

      “range-count”              gulong

read-only gulong DOMSelection:range-count.

Flags: Read

### The `“type”` property

      “type”                     gchar *

read-only gchar* DOMSelection:type.

Flags: Read

Default value: ""