File: blur.h

package info (click to toggle)
lebiniou 3.67.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,500 kB
  • sloc: ansic: 28,670; makefile: 1,276; sh: 602; awk: 432; xml: 261; javascript: 23
file content (59 lines) | stat: -rw-r--r-- 1,595 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
 *  Copyright 1994-2022 Olivier Girondel
 *  Copyright 2019-2022 Laurent Marsac
 *
 *  This file is part of lebiniou.
 *
 *  lebiniou is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  lebiniou is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with lebiniou. If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef __BLUR_H
#define __BLUR_H

static enum BorderMode border_mode;

json_t *
get_parameters(const uint8_t fetch_all)
{
  json_t *params = json_object();

  plugin_parameters_add_string_list(params, BPP_BORDER_MODE, BM_NB, border_list, border_mode, BM_NB-1, "Border mode");

  return params;
}


void
set_parameters(const Context_t *ctx, const json_t *in_parameters)
{
  int border_mode_idx = 0;

  if (plugin_parameter_parse_string_list_as_int_range(in_parameters, BPP_BORDER_MODE, BM_NB, border_list, &border_mode_idx)) {
    border_mode = (enum BorderMode)border_mode_idx;
  }
}


json_t *
parameters(const Context_t *ctx, const json_t *in_parameters, const uint8_t fetch_all)
{
  if (NULL != in_parameters) {
    set_parameters(ctx, in_parameters);
  }

  return get_parameters(fetch_all);
}


#endif /* __BLUR_H */