1 /* 2 * Copyright (C) 2002 Red Hat, Inc. 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Lesser General Public 6 * License as published by the Free Software Foundation; either 7 * version 2.1 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Lesser General Public License for more details. 13 * 14 * You should have received a copy of the GNU Lesser General Public 15 * License along with this library; if not, write to the Free Software 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 */ 18 19 /* The interfaces in this file are subject to change at any time. */ 20 21 #pragma once 22 23 #include <glib-object.h> 24 25 struct _vte_table; 26 27 class VteTerminalPrivate; 28 namespace vte { namespace parser { struct Params; } } 29 30 typedef void (VteTerminalPrivate::* sequence_handler_t)(vte::parser::Params const&); 31 32 /* Create an empty, one-level table. */ 33 struct _vte_table *_vte_table_new(void); 34 35 /* Free a table tree. */ 36 void _vte_table_free(struct _vte_table *table); 37 38 /* Add a string to the matching tree. */ 39 void _vte_table_add(struct _vte_table *table, const char *pattern, 40 gssize length, sequence_handler_t handler); 41 42 /* Check if a string matches something in the tree. */ 43 vte_matcher_result_t _vte_table_match(struct _vte_table *table, 44 const gunichar *pattern, 45 gssize length, 46 sequence_handler_t *handler, 47 const gunichar **consumed, 48 GValueArray **array); 49 /* Dump out the contents of a tree. */ 50 void _vte_table_print(struct _vte_table *table); 51 52 extern const struct _vte_matcher_class _vte_matcher_table; 53