1
/* ipuz-puzzle-info.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-charset.h>
26

            
27

            
28
G_BEGIN_DECLS
29

            
30

            
31
typedef enum
32
{
33
  IPUZ_PUZZLE_FLAG_USES_EXTENSIONS = 1 << 0, /* @ uses custom extensions to the ipuz spec @ */
34
  IPUZ_PUZZLE_FLAG_HAS_SOLUTION    = 1 << 1, /* @ includes the solution @ */
35
  IPUZ_PUZZLE_FLAG_HAS_CHECKSUM    = 1 << 2, /* @ has a checksum @ */
36
  IPUZ_PUZZLE_FLAG_HAS_CLUES       = 1 << 3, /* @ has clues @ */
37
  IPUZ_PUZZLE_FLAG_HAS_SAVED       = 1 << 4, /* @ has guesses already within the ipuz file @ */
38
  IPUZ_PUZZLE_FLAG_INVALID_CHARS   = 1 << 5, /* @ solution contains characters not present in the charset */
39
} IPuzPuzzleFlags;
40

            
41
typedef struct _IPuzCellStats
42
{
43
  guint block_count;
44
  guint normal_count;
45
  guint null_count;
46
} IPuzCellStats;
47

            
48

            
49
#define IPUZ_TYPE_PUZZLE_INFO (ipuz_puzzle_info_get_type ())
50
8
G_DECLARE_FINAL_TYPE (IPuzPuzzleInfo, ipuz_puzzle_info, IPUZ, PUZZLE_INFO, GObject);
51

            
52

            
53
IPuzPuzzleFlags  ipuz_puzzle_info_get_flags          (IPuzPuzzleInfo *self);
54
IPuzCellStats    ipuz_puzzle_info_get_cell_stats     (IPuzPuzzleInfo *self);
55
IPuzCharset     *ipuz_puzzle_info_get_charset        (IPuzPuzzleInfo *self);
56

            
57
/* Crossword Info */
58
IPuzCharset     *ipuz_puzzle_info_get_solution_chars (IPuzPuzzleInfo *self);
59
IPuzCharset     *ipuz_puzzle_info_get_clue_lengths   (IPuzPuzzleInfo *self);
60
guint            ipuz_puzzle_info_get_pangram_count  (IPuzPuzzleInfo *self);
61
GArray          *ipuz_puzzle_info_get_unches         (IPuzPuzzleInfo *self);
62

            
63

            
64
G_END_DECLS