1
/* ipuz-barred.h
2
 *
3
 * Copyright 2023 Jonathan Blandford <jrb@gnome.org>
4
 *
5
 * This library is free software; you can redistribute it and/or
6
 * modify it under the terms of the GNU Lesser General Public
7
 * License as published by the Free Software Foundation; either
8
 * version 2.1 of the License, or (at your option) any later version.
9
 *
10
 * This library is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13
 * Lesser General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU Lesser General Public
16
 * License along with this library; if not, write to the Free Software
17
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
18
 *
19
 * SPDX-License-Identifier: (LGPL-2.1-or-later OR MIT)
20
 */
21

            
22
#pragma once
23

            
24
#include <glib-object.h>
25
#include <libipuz/ipuz-crossword.h>
26
#include <libipuz/ipuz-style.h>
27
#include <libipuz/ipuz-symmetry.h>
28

            
29
G_BEGIN_DECLS
30

            
31

            
32
#define IPUZ_BARRED_STYLE_T  "T"
33
#define IPUZ_BARRED_STYLE_L  "L"
34
#define IPUZ_BARRED_STYLE_TL "TL"
35

            
36

            
37
#define IPUZ_TYPE_BARRED (ipuz_barred_get_type ())
38
1539
G_DECLARE_DERIVABLE_TYPE  (IPuzBarred, ipuz_barred, IPUZ, BARRED, IPuzCrossword);
39

            
40

            
41
typedef struct _IPuzBarredClass
42
{
43
  IPuzCrosswordClass parent_class;
44
} IPuzBarredClass;
45

            
46

            
47
IPuzPuzzle     *ipuz_barred_new                   (void);
48
IPuzStyleSides  ipuz_barred_calculate_side_toggle (IPuzBarred     *self,
49
                                                   IPuzCellCoord   coord,
50
                                                   IPuzStyleSides  side,
51
                                                   IPuzSymmetry    symmetry);
52
IPuzStyleSides  ipuz_barred_get_cell_bars         (IPuzBarred     *self,
53
                                                   IPuzCellCoord   coord);
54
gboolean        ipuz_barred_set_cell_bars         (IPuzBarred     *self,
55
                                                   IPuzCellCoord   coord,
56
                                                   IPuzStyleSides  sides);
57

            
58

            
59
G_END_DECLS