## CongLocation

CongLocation —

## Synopsis

    #define     CONG_LOCATION_BYTE_OFFSET_NULL_NODE
    #define     CONG_LOCATION_BYTE_OFFSET_MEANINGLESS
    gboolean    cong_location_is_valid          (const CongLocation *loc);
    void        cong_location_nullify           (CongLocation *loc);
    void        cong_location_set_to_start_of_node
                                                (CongLocation *loc,
                                                 CongNodePtr node);
    void        cong_location_set_to_end_of_node
                                                (CongLocation *loc,
                                                 CongNodePtr node);
    void        cong_location_set_node_and_byte_offset
                                                (CongLocation *loc,
                                                 CongNodePtr node,
                                                 int byte_offset);
    void        cong_location_set_node_and_char_offset
                                                (CongLocation *loc,
                                                 CongNodePtr node,
                                                 glong char_offset);
    gboolean    cong_location_exists            (const CongLocation *loc);
    gboolean    cong_location_equals            (const CongLocation *loc0,
                                                 const CongLocation *loc1);
    gunichar    cong_location_get_unichar       (const CongLocation *loc);
    gchar*      cong_location_get_utf8_pointer  (const CongLocation *loc);
    void        cong_location_del_next_char     (CongDocument *doc,
                                                 const CongLocation *loc);
    CongNodePtr cong_location_xml_frag_prev     (const CongLocation *loc);
    CongNodePtr cong_location_xml_frag_next     (const CongLocation *loc);
    CongNodePtr cong_location_node              (const CongLocation *loc);
    CongNodePtr cong_location_parent            (const CongLocation *loc);
    void        cong_location_copy              (CongLocation *dst,
                                                 const CongLocation *src);
    gboolean    cong_location_calc_prev_char    (const CongLocation *input_loc,
                                                 CongDocument *doc,
                                                 CongLocation *output_loc);
    gboolean    cong_location_calc_next_char    (const CongLocation *input_loc,
                                                 CongDocument *doc,
                                                 CongLocation *output_loc);
    gboolean    cong_location_calc_prev_word    (const CongLocation *input_loc,
                                                 CongDocument *doc,
                                                 CongLocation *output_loc);
    gboolean    cong_location_calc_next_word    (const CongLocation *input_loc,
                                                 CongDocument *doc,
                                                 CongLocation *output_loc);
    gboolean    cong_location_calc_document_start
                                                (const CongLocation *input_loc,
                                                 CongDocument *doc,
                                                 CongLocation *output_loc);
    gboolean    cong_location_calc_line_start   (const CongLocation *input_loc,
                                                 CongDocument *doc,
                                                 CongLocation *output_loc);
    gboolean    cong_location_calc_document_end (const CongLocation *input_loc,
                                                 CongDocument *doc,
                                                 CongLocation *output_loc);
    gboolean    cong_location_calc_line_end     (const CongLocation *input_loc,
                                                 CongDocument *doc,
                                                 CongLocation *output_loc);
    gboolean    cong_location_calc_prev_page    (const CongLocation *input_loc,
                                                 CongDocument *doc,
                                                 CongLocation *output_loc);
    gboolean    cong_location_calc_next_page    (const CongLocation *input_loc,
                                                 CongDocument *doc,
                                                 CongLocation *output_loc);
    gboolean    cong_location_calc_word_extent  (const CongLocation *input_loc,
                                                 CongDocument *doc,
                                                 CongLocation *output_start_of_word,
                                                 CongLocation *output_end_of_word);
    gboolean    cong_location_calc_prev_text_node
                                                (const CongLocation *input_loc,
                                                 CongDocument *doc,
                                                 CongLocation *output_loc);
    gboolean    cong_location_calc_next_text_node
                                                (const CongLocation *input_loc,
                                                 CongDocument *doc,
                                                 CongLocation *output_loc);
    void        cong_location_copy_with_ref     (CongDocument *doc,
                                                 CongLocation *dst,
                                                 const CongLocation *src);
    void        cong_location_nullify_with_ref  (CongDocument *doc,
                                                 CongLocation *loc);

## Description

## Details

### CONG_LOCATION_BYTE_OFFSET_NULL_NODE

    #define CONG_LOCATION_BYTE_OFFSET_NULL_NODE (-2)

### CONG_LOCATION_BYTE_OFFSET_MEANINGLESS

    #define CONG_LOCATION_BYTE_OFFSET_MEANINGLESS (-1)

### cong_location_is_valid ()

    gboolean    cong_location_is_valid          (const CongLocation *loc);

TODO: Write me

`loc` : |
Returns : |

### cong_location_nullify ()

    void        cong_location_nullify           (CongLocation *loc);

TODO: Write me

`loc` : |

### cong_location_set_to_start_of_node ()

    void        cong_location_set_to_start_of_node
                                                (CongLocation *loc,
                                                 CongNodePtr node);

TODO: Write me

`loc` : |
`node` : |

### cong_location_set_to_end_of_node ()

    void        cong_location_set_to_end_of_node
                                                (CongLocation *loc,
                                                 CongNodePtr node);

TODO: Write me

`loc` : |
`node` : |

### cong_location_set_node_and_byte_offset ()

    void        cong_location_set_node_and_byte_offset
                                                (CongLocation *loc,
                                                 CongNodePtr node,
                                                 int byte_offset);

TODO: Write me

`loc` : |
`node` : |
`byte_offset` : |

### cong_location_set_node_and_char_offset ()

    void        cong_location_set_node_and_char_offset
                                                (CongLocation *loc,
                                                 CongNodePtr node,
                                                 glong char_offset);

TODO: Write me

`loc` : |
`node` : |
`char_offset` : |

### cong_location_exists ()

    gboolean    cong_location_exists            (const CongLocation *loc);

TODO: Write me

`loc` : |
Returns : |

### cong_location_equals ()

    gboolean    cong_location_equals            (const CongLocation *loc0,
                                                 const CongLocation *loc1);

TODO: Write me

`loc0` : |
`loc1` : |
Returns : |

### cong_location_get_unichar ()

    gunichar    cong_location_get_unichar       (const CongLocation *loc);

`loc` : | a "textual" location in the document (text or comment node)
Returns : | the unicode character at that location

### cong_location_get_utf8_pointer ()

    gchar*      cong_location_get_utf8_pointer  (const CongLocation *loc);

`loc` : |
Returns : |

### cong_location_del_next_char ()

    void        cong_location_del_next_char     (CongDocument *doc,
                                                 const CongLocation *loc);

TODO: Write me

`doc` : |
`loc` : |

### cong_location_xml_frag_prev ()

    CongNodePtr cong_location_xml_frag_prev     (const CongLocation *loc);

TODO: Write me

`loc` : | a CongLocation
Returns : |

### cong_location_xml_frag_next ()

    CongNodePtr cong_location_xml_frag_next     (const CongLocation *loc);

TODO: Write me

`loc` : |
Returns : |

### cong_location_node ()

    CongNodePtr cong_location_node              (const CongLocation *loc);

TODO: Write me

`loc` : |
Returns : |

### cong_location_parent ()

    CongNodePtr cong_location_parent            (const CongLocation *loc);

TODO: Write me

`loc` : |
Returns : |

### cong_location_copy ()

    void        cong_location_copy              (CongLocation *dst,
                                                 const CongLocation *src);

TODO: Write me

`dst` : |
`src` : |

### cong_location_calc_prev_char ()

    gboolean    cong_location_calc_prev_char    (const CongLocation *input_loc,
                                                 CongDocument *doc,
                                                 CongLocation *output_loc);

Calculates a new CongLocation when the left key is pressed

`input_loc` : | the current CongLocation
`doc` : | the CongDocument containing this CongLocation
`output_loc` : | the CongLocation that is computed
Returns : | `TRUE` if succeeded

### cong_location_calc_next_char ()

    gboolean    cong_location_calc_next_char    (const CongLocation *input_loc,
                                                 CongDocument *doc,
                                                 CongLocation *output_loc);

Calculates a new CongLocation when the right key is pressed

`input_loc` : | the current CongLocation
`doc` : | the CongDocument containing this CongLocation
`output_loc` : | the CongLocation that is computed
Returns : | `TRUE` if succeeded

### cong_location_calc_prev_word ()

    gboolean    cong_location_calc_prev_word    (const CongLocation *input_loc,
                                                 CongDocument *doc,
                                                 CongLocation *output_loc);

TODO: Write me

`input_loc` : |
`doc` : |
`output_loc` : |
Returns : |

### cong_location_calc_next_word ()

    gboolean    cong_location_calc_next_word    (const CongLocation *input_loc,
                                                 CongDocument *doc,
                                                 CongLocation *output_loc);

TODO: Write me

`input_loc` : |
`doc` : |
`output_loc` : |
Returns : |

### cong_location_calc_document_start ()

    gboolean    cong_location_calc_document_start
                                                (const CongLocation *input_loc,
                                                 CongDocument *doc,
                                                 CongLocation *output_loc);

TODO: Write me

`input_loc` : |
`doc` : |
`output_loc` : |
Returns : |

### cong_location_calc_line_start ()

    gboolean    cong_location_calc_line_start   (const CongLocation *input_loc,
                                                 CongDocument *doc,
                                                 CongLocation *output_loc);

TODO: Write me

`input_loc` : |
`doc` : |
`output_loc` : |
Returns : |

### cong_location_calc_document_end ()

    gboolean    cong_location_calc_document_end (const CongLocation *input_loc,
                                                 CongDocument *doc,
                                                 CongLocation *output_loc);

TODO: Write me

`input_loc` : |
`doc` : |
`output_loc` : |
Returns : |

### cong_location_calc_line_end ()

    gboolean    cong_location_calc_line_end     (const CongLocation *input_loc,
                                                 CongDocument *doc,
                                                 CongLocation *output_loc);

TODO: Write me

`input_loc` : |
`doc` : |
`output_loc` : |
Returns : |

### cong_location_calc_prev_page ()

    gboolean    cong_location_calc_prev_page    (const CongLocation *input_loc,
                                                 CongDocument *doc,
                                                 CongLocation *output_loc);

TODO: Write me

`input_loc` : |
`doc` : |
`output_loc` : |
Returns : |

### cong_location_calc_next_page ()

    gboolean    cong_location_calc_next_page    (const CongLocation *input_loc,
                                                 CongDocument *doc,
                                                 CongLocation *output_loc);

TODO: Write me

`input_loc` : |
`doc` : |
`output_loc` : |
Returns : |

### cong_location_calc_word_extent ()

    gboolean    cong_location_calc_word_extent  (const CongLocation *input_loc,
                                                 CongDocument *doc,
                                                 CongLocation *output_start_of_word,
                                                 CongLocation *output_end_of_word);

TODO: Write me

`input_loc` : |
`doc` : |
`output_start_of_word` : |
`output_end_of_word` : |
Returns : |

### cong_location_calc_prev_text_node ()

    gboolean    cong_location_calc_prev_text_node
                                                (const CongLocation *input_loc,
                                                 CongDocument *doc,
                                                 CongLocation *output_loc);

`input_loc` : |
`doc` : |
`output_loc` : |
Returns : |

### cong_location_calc_next_text_node ()

    gboolean    cong_location_calc_next_text_node
                                                (const CongLocation *input_loc,
                                                 CongDocument *doc,
                                                 CongLocation *output_loc);

`input_loc` : |
`doc` : |
`output_loc` : |
Returns : |

### cong_location_copy_with_ref ()

    void        cong_location_copy_with_ref     (CongDocument *doc,
                                                 CongLocation *dst,
                                                 const CongLocation *src);

TODO: Write me

`doc` : |
`dst` : |
`src` : |

### cong_location_nullify_with_ref ()

    void        cong_location_nullify_with_ref  (CongDocument *doc,
                                                 CongLocation *loc);

TODO: Write me

`doc` : |
`loc` : |