1 /*$
2  Copyright (C) 2016-2020 Azel.
3 
4  This file is part of AzPainterB.
5 
6  AzPainterB 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  AzPainterB 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 
20 #ifndef MLIB_DIALOG_H
21 #define MLIB_DIALOG_H
22 
23 #include "mWindowDef.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 #define M_DIALOG(p)  ((mDialog *)(p))
30 
31 typedef struct
32 {
33 	intptr_t retval;
34 }mDialogData;
35 
36 typedef struct _mDialog
37 {
38 	mWidget wg;
39 	mContainerData ct;
40 	mWindowData win;
41 	mDialogData dlg;
42 }mDialog;
43 
44 
45 int mDialogEventHandle(mWidget *wg,mEvent *ev);
46 
47 mWidget *mDialogNew(int size,mWindow *owner,uint32_t style);
48 intptr_t mDialogRun(mDialog *p,mBool destroy);
49 void mDialogEnd(mDialog *p,intptr_t ret);
50 
51 int mDialogEventHandle_okcancel(mWidget *wg,mEvent *ev);
52 
53 #ifdef __cplusplus
54 }
55 #endif
56 
57 #endif
58