1 /* options.h
2 
3 Copyright 1999-2000 Tom Gilbert <tom@linuxbrit.co.uk,
4                                   gilbertt@linuxbrit.co.uk,
5                                   scrot_sucks@linuxbrit.co.uk>
6 Copyright 2009      James Cameron <quozl@us.netrek.org>
7 Copyright 2010      Ibragimov Rinat <ibragimovrinat@mail.ru>
8 Copyright 2017      Stoney Sauce <stoneysauce@gmail.com>
9 Copyright 2019-2021 Daniel T. Borelli <danieltborelli@gmail.com>
10 Copyright 2020      Sean Brennan <zettix1@gmail.com>
11 Copyright 2021      IFo Hancroft <contact@ifohancroft.com>
12 Copyright 2021      Peter Wu <peterwu@hotmail.com>
13 Copyright 2021      Wilson Smith <01wsmith+gh@gmail.com>
14 
15 Permission is hereby granted, free of charge, to any person obtaining a copy
16 of this software and associated documentation files (the "Software"), to
17 deal in the Software without restriction, including without limitation the
18 rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
19 sell copies of the Software, and to permit persons to whom the Software is
20 furnished to do so, subject to the following conditions:
21 
22 The above copyright notice and this permission notice shall be included in
23 all copies of the Software and its documentation and acknowledgment shall be
24 given in the documentation and software packages that this Software was
25 used.
26 
27 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
29 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
30 THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
31 IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
32 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33 
34 */
35 
36 #include "structs.h"
37 #include "scrot_selection.h"
38 
39 #pragma once
40 
41 // General purpose enum
42 enum Direction {
43     // see main.c:stalkImageConcat(...)
44     HORIZONTAL,
45     VERTICAL,
46 };
47 
48 struct __ScrotOptions {
49     int delay;
50     int countdown;
51     int focused;
52     int quality;
53     int border;
54     int silent;
55     int multidisp;
56     int thumb;
57     int thumbWidth;
58     int thumbHeight;
59     int pointer;
60     int ignoreKeyboard;
61     int freeze;
62     int overwrite;
63     int lineStyle;
64     int lineWidth;
65     int lineOpacity;
66     int stack;
67     enum Direction stackDirection;
68     char* lineColor;
69     char* lineMode;
70     char* outputFile;
71     char* thumbFile;
72     char* exec;
73     char* display;
74     char* note;
75     char* windowClassName;
76     char* script;
77     int autoselect;
78     int autoselectX;
79     int autoselectY;
80     int autoselectH;
81     int autoselectW;
82     SelectionMode selection;
83 };
84 
85 void optionsParse(int, char**);
86 char* optionsNameThumbnail(const char*);
87 void optionsParseFileName(const char*);
88 void optionsParseThumbnail(char*);
89 void optionsParseAutoselect(char*);
90 void optionsParseDisplay(char*);
91 void optionsParseNote(char*);
92 int optionsParseRequiredNumber(char const *);
93 int optionsCompareWindowClassName(const char*);
94 int optionsParseRequireRange(int, int, int);
95 extern ScrotOptions opt;
96