PageRenderTime 303ms CodeModel.GetById 181ms app.highlight 3ms RepoModel.GetById 118ms app.codeStats 0ms

/src/ftk_input_pattern.h

http://ftk.googlecode.com/
C++ Header | 54 lines | 15 code | 9 blank | 30 comment | 0 complexity | ae61dddacefc8c33a4639013fd2b3d19 MD5 | raw file
 1/*
 2 * File: ftk_input_pattern.h    
 3 * Author:  Li XianJing <xianjimli@hotmail.com>
 4 * Brief:   input pattern to format some special input, such as date, 
 5 *  time and ip address.
 6 *
 7 * Copyright (c) 2009 - 2011  Li XianJing <xianjimli@hotmail.com>
 8 *
 9 * Licensed under the Academic Free License version 2.1
10 *
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
24 */
25
26/*
27 * History:
28 * ================================================================
29 * 2011-07-28 Li XianJing <xianjimli@hotmail.com> created
30 *
31 */
32#ifndef FTK_INPUT_PATTERN_H
33#define FTK_INPUT_PATTERN_H
34
35#include "ftk_key.h"
36
37FTK_BEGIN_DECLS
38
39struct _FtkInputPattern;
40typedef struct _FtkInputPattern FtkInputPattern;
41
42FtkInputPattern* ftk_input_pattern_create(const char* pattern, const char* init);
43Ret    ftk_input_pattern_input(FtkInputPattern* thiz, FtkKey key);
44Ret    ftk_input_pattern_set_caret(FtkInputPattern* thiz, size_t caret);
45Ret    ftk_input_pattern_set_text(FtkInputPattern* thiz, const char* text);
46size_t ftk_input_pattern_get_caret(FtkInputPattern* thiz);
47const char* ftk_input_pattern_get_text(FtkInputPattern* thiz);
48void ftk_input_pattern_destroy(FtkInputPattern* thiz);
49
50FTK_END_DECLS
51
52#endif/*FTK_INPUT_PATTERN_H*/
53
54