1 /** -*- mode: c++ ; c-basic-offset: 2 -*- 2 * 3 * @file gmic_qt.h 4 * 5 * Copyright 2017 Sebastien Fourey 6 * 7 * This file is part of G'MIC-Qt, a generic plug-in for raster graphics 8 * editors, offering hundreds of filters thanks to the underlying G'MIC 9 * image processing framework. 10 * 11 * gmic_qt 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 3 of the License, or 14 * (at your option) any later version. 15 * 16 * gmic_qt 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 gmic_qt. If not, see <http://www.gnu.org/licenses/>. 23 * 24 */ 25 #ifndef GMIC_QT_GMIC_QT_H 26 #define GMIC_QT_GMIC_QT_H 27 28 #ifndef gmic_pixel_type 29 #define gmic_pixel_type float 30 #endif 31 32 #define GMIC_QT_STRINGIFY(X) #X 33 #define GMIC_QT_XSTRINGIFY(X) GMIC_QT_STRINGIFY(X) 34 #define gmic_pixel_type_str GMIC_QT_XSTRINGIFY(gmic_pixel_type) 35 36 class QString; 37 38 namespace GmicQt 39 { 40 enum InputMode 41 { 42 NoInput, 43 Active, 44 All, 45 ActiveAndBelow, 46 ActiveAndAbove, 47 AllVisibles, 48 AllInvisibles, 49 AllVisiblesDesc, 50 AllInvisiblesDesc, 51 AllDesc, 52 UnspecifiedInputMode = 100 53 }; 54 extern const InputMode DefaultInputMode; 55 56 enum OutputMode 57 { 58 InPlace, 59 NewLayers, 60 NewActiveLayers, 61 NewImage, 62 UnspecifiedOutputMode = 100 63 }; 64 extern const OutputMode DefaultOutputMode; 65 66 enum OutputMessageMode 67 { 68 Quiet, 69 VerboseLayerName, 70 VerboseConsole, 71 VerboseLogFile, 72 VeryVerboseConsole, 73 VeryVerboseLogFile, 74 DebugConsole, 75 DebugLogFile, 76 UnspecifiedOutputMessageMode = 100 77 }; 78 extern const OutputMessageMode DefaultOutputMessageMode; 79 80 const QString & gmicVersionString(); 81 } // namespace GmicQt 82 83 int launchPlugin(); 84 85 int launchPluginHeadlessUsingLastParameters(); 86 87 int launchPluginHeadless(const char * command, GmicQt::InputMode input, GmicQt::OutputMode output); 88 89 #endif // GMIC_QT_GMIC_QT_H 90