debug-manager: Remove weak pointer when needed
[anjuta.git] / libanjuta / anjuta-token-list.h
blobfa4943f633db3248b28c9f17105224d21e87cb2f
1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 4; tab-width: 4 -*- */
2 /*
3 * anjuta-token-list.h
4 * Copyright (C) Sébastien Granjoux 2009 <seb.sfo@free.fr>
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 * See the GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef _ANJUTA_TOKEN_LIST_H_
21 #define _ANJUTA_TOKEN_LIST_H_
23 #include <glib.h>
25 #include "anjuta-token.h"
27 G_BEGIN_DECLS
29 typedef struct _AnjutaTokenStyle AnjutaTokenStyle;
31 enum AnjutaTokenSearchFlag
33 ANJUTA_SEARCH_OVER = 0,
34 ANJUTA_SEARCH_INTO = 1 << 0,
35 ANJUTA_SEARCH_ALL = 1 << 1,
36 ANJUTA_SEARCH_BACKWARD = 1 << 2,
37 ANJUTA_TOKEN_SEARCH_LAST = 1 << 3,
38 ANJUTA_TOKEN_SEARCH_NOT = 1 << 4,
41 AnjutaTokenStyle *anjuta_token_style_new (const gchar *start, const gchar *next, const gchar *eol, const gchar *last, guint max_width);
42 AnjutaTokenStyle *anjuta_token_style_new_from_base (AnjutaTokenStyle *base);
43 void anjuta_token_style_free (AnjutaTokenStyle *style);
45 void anjuta_token_style_update (AnjutaTokenStyle *style, AnjutaToken *list);
46 void anjuta_token_style_format (AnjutaTokenStyle *style, AnjutaToken *list);
48 AnjutaToken *anjuta_token_first_word (AnjutaToken *list);
49 AnjutaToken *anjuta_token_nth_word (AnjutaToken *list, guint n);
50 AnjutaToken *anjuta_token_next_word (AnjutaToken *item);
52 AnjutaToken *anjuta_token_replace_nth_word (AnjutaToken *list, guint n, AnjutaToken *item);
53 AnjutaToken *anjuta_token_insert_word_before (AnjutaToken *list, AnjutaToken *sibling, AnjutaToken *baby);
54 AnjutaToken *anjuta_token_insert_word_after (AnjutaToken *list, AnjutaToken *sibling, AnjutaToken *baby);
55 AnjutaToken *anjuta_token_remove_word (AnjutaToken *token);
56 AnjutaToken *anjuta_token_remove_list (AnjutaToken *token);
58 AnjutaToken *anjuta_token_insert_token_list (gboolean after, AnjutaToken *list,...);
59 AnjutaToken *anjuta_token_find_type (AnjutaToken *list, gint flags, AnjutaTokenType* types);
60 AnjutaToken *anjuta_token_skip_comment (AnjutaToken *list);
62 G_END_DECLS
64 #endif