1 /*$ 2 Copyright (C) 2013-2020 Azel. 3 4 This file is part of AzPainter. 5 6 AzPainter 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 AzPainter 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 /************************************ 21 * MainWindow 関数 22 ************************************/ 23 24 #ifndef MAINWINDOW_H 25 #define MAINWINDOW_H 26 27 typedef struct _MainWindow MainWindow; 28 typedef struct _LayerItem LayerItem; 29 30 enum 31 { 32 MAINWINDOW_SAVEFILE_OVERWRITE, 33 MAINWINDOW_SAVEFILE_RENAME, 34 MAINWINDOW_SAVEFILE_DUP 35 }; 36 37 38 void MainWindow_new(); 39 void MainWindow_showStart(MainWindow *p); 40 41 void MainWindow_quit(); 42 43 void MainWindow_setTitle(MainWindow *p); 44 void MainWindow_apperr(int err,const char *detail); 45 mBool MainWindow_confirmSave(MainWindow *p); 46 void MainWindow_updateNewCanvas(MainWindow *p,const char *filename); 47 48 void MainWindow_getProgressBarPos(mPoint *pt); 49 50 void MainWindow_newImage(MainWindow *p); 51 void MainWindow_openFile(MainWindow *p,int recentno); 52 mBool MainWindow_loadImage(MainWindow *p,const char *filename,int loadopt); 53 mBool MainWindow_saveFile(MainWindow *p,int savetype,int recentno); 54 55 void MainWindow_undoredo(MainWindow *p,mBool redo); 56 void MainWindow_onCanvasKeyCommand(int cmdid); 57 58 void MainWindow_layer_new_dialog(MainWindow *p,LayerItem *pi_above); 59 void MainWindow_layer_setoption(MainWindow *p,LayerItem *pi); 60 void MainWindow_layer_setcolor(MainWindow *p,LayerItem *pi); 61 void MainWindow_layer_settype(MainWindow *p,LayerItem *pi); 62 63 #endif 64