mGNCS API Reference  v1.2.0
A new control set and a new framework for MiniGUI apps
msimplelistpiece.h
1 /*
2  * This file is part of mGNCS, a component for MiniGUI.
3  *
4  * Copyright (C) 2008~2018, Beijing FMSoft Technologies Co., Ltd.
5  *
6  * This program is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  *
19  * Or,
20  *
21  * As this program is a library, any link to this program must follow
22  * GNU General Public License version 3 (GPLv3). If you cannot accept
23  * GPLv3, you need to be licensed from FMSoft.
24  *
25  * If you have got a commercial license of this program, please use it
26  * under the terms and conditions of the commercial license.
27  *
28  * For more information about the commercial license, please refer to
29  * <http://www.minigui.com/en/about/licensing-policy/>.
30  */
31 #ifdef _MGNCSCTRL_IMWORDSEL
32 
33 #ifndef _MGUI_SIMPLE_LIST_H
34 #define _MGUI_SIMPLE_LIST_H
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 typedef struct _mSimpleListPieceClass mSimpleListPieceClass;
41 typedef struct _mSimpleListPiece mSimpleListPiece;
42 
43 #define mSimpleListPieceClassHeader(clss, superCls) \
44  mContainerPieceClassHeader(clss, superCls) \
45  void (*reset)(clss*, void(*free_piece)(mHotPiece*));
46 
47 
48 #define mSimpleListPieceHeader(clss) \
49  mContainerPieceHeader(clss) \
50  mLineLayoutPieceNode * cur_node;
51 
52 struct _mSimpleListPieceClass {
53  mSimpleListPieceClassHeader(mSimpleListPiece, mContainerPiece)
54 };
55 
56 struct _mSimpleListPiece {
57  mSimpleListPieceHeader(mSimpleListPiece)
58 };
59 
60 extern mSimpleListPieceClass g_stmSimpleListPieceCls;
61 
62 enum mSimpleListPieceProps {
63  NCSP_SIMPLELISTPIECE_CURINDEX = SIMPLELISTPIECE_PROP_BEGIN,
64 };
65 
66 enum mSimpleListPieceEvent {
67  NCSN_SIMPLELISTPIECE_REACHHEAD = SIMPLELISTPIECE_EVENT_BEGIN,
68  NCSN_SIMPLELISTPIECE_REACHTAIL,
69  NCSN_SIMPLELISTPIECE_CHANGED
70 };
71 
72 #define mSimpleListPiece_getLineLayout(slp) \
73  ((mLineLayoutPiece*)((slp)?(slp)->body:NULL))
74 
75 
76 #ifdef __cplusplus
77 }
78 #endif
79 
80 
81 #endif
82 #endif //_MGNCSCTRL_IMWORDSEL
83 
84