Struct

IpuzClueId

Description [src]

struct IpuzClueId {
  IpuzClueDirection direction;
  guint index;
}

Represents a unique id for a clue.

Within a puzzle, clues can be identified by a IpuzClueId. For example, this id:

IpuzClueId clue_id = {
   .direction = IPUZ_CLUE_DIRECTION_DOWN,
   .index = 5
};

would refer to the 6th clue in the down direction.

Note that index is an offset into the list of clues, and has nothing to do with the numbering the user sees. The clue at 1 Across would have an index of 0.

If direction == IPUZ_CLUE_DIRECTION_NONE, then the number is meaningless, and this means that there is no clue to be identified (e.g. equivalent to a NULL pointer for clue).

Note

IpuzClueIds aren’t guaranteed to be stable when editing puzzles. Changing the grid my lead to a change in index for a given clue.

Structure members
direction

Direction of the clue.

index

Index of the clue.

Instance methods

ipuz_clue_id_copy

Returns a newly allocated copy of clue_id.

ipuz_clue_id_equal

Returns TRUE if clue_id1 and clue_id2 are identical.

ipuz_clue_id_free

Frees clue_id.