GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 2 / 0 / 2
Functions: 100.0% 1 / 0 / 1
Branches: 50.0% 10 / 0 / 20

shumate/shumate-vector-sprite-sheet.h
Line Branch Exec Source
1 /*
2 * Copyright (C) 2022 James Westman <james@jwestman.net>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, see <https://www.gnu.org/licenses/>.
16 */
17
18 #pragma once
19
20 #include <gdk/gdk.h>
21 #include <shumate/shumate-vector-sprite.h>
22 #include <shumate/shumate-version.h>
23
24 G_BEGIN_DECLS
25
26 SHUMATE_AVAILABLE_MACRO_IN_1_1
27 #define SHUMATE_TYPE_VECTOR_SPRITE_SHEET (shumate_vector_sprite_sheet_get_type())
28
10/20
None:
✓ Branch 28 → 29 taken 2 times.
✗ Branch 28 → 30 not taken.
✗ Branch 30 → 31 not taken.
✓ Branch 30 → 32 taken 2 times.
✓ Branch 73 → 74 taken 2 times.
✗ Branch 73 → 75 not taken.
✓ Branch 75 → 76 taken 2 times.
✓ Branch 75 → 77 taken 2 times.
✗ Branch 77 → 78 not taken.
✓ Branch 77 → 79 taken 2 times.
SHUMATE_IS_VECTOR_SPRITE_SHEET:
✓ Branch 3 → 4 taken 460 times.
✗ Branch 3 → 7 not taken.
✓ Branch 4 → 5 taken 460 times.
✗ Branch 4 → 6 not taken.
✗ Branch 5 → 6 not taken.
✓ Branch 5 → 7 taken 460 times.
✗ Branch 20 → 21 not taken.
✗ Branch 20 → 22 not taken.
✓ Branch 67 → 68 taken 2 times.
✗ Branch 67 → 69 not taken.
468 G_DECLARE_FINAL_TYPE (ShumateVectorSpriteSheet, shumate_vector_sprite_sheet, SHUMATE, VECTOR_SPRITE_SHEET, GObject)
29
30 SHUMATE_AVAILABLE_IN_1_1
31 ShumateVectorSpriteSheet *shumate_vector_sprite_sheet_new (void);
32
33 SHUMATE_AVAILABLE_IN_1_1
34 void shumate_vector_sprite_sheet_add_sprite (ShumateVectorSpriteSheet *self,
35 const char *name,
36 ShumateVectorSprite *sprite);
37 SHUMATE_AVAILABLE_IN_1_1
38 gboolean shumate_vector_sprite_sheet_add_page (ShumateVectorSpriteSheet *self,
39 GdkTexture *texture,
40 const char *json,
41 double default_scale,
42 GError **error);
43 SHUMATE_AVAILABLE_IN_1_1
44 ShumateVectorSprite *shumate_vector_sprite_sheet_get_sprite (ShumateVectorSpriteSheet *self,
45 const char *name,
46 double scale);
47 SHUMATE_AVAILABLE_TYPE_IN_1_1
48 typedef ShumateVectorSprite *(ShumateVectorSpriteFallbackFunc) (ShumateVectorSpriteSheet *sprite_sheet,
49 const char *name,
50 double scale,
51 gpointer user_data);
52 SHUMATE_AVAILABLE_IN_1_1
53 void shumate_vector_sprite_sheet_set_fallback (ShumateVectorSpriteSheet *self,
54 ShumateVectorSpriteFallbackFunc fallback,
55 gpointer user_data,
56 GDestroyNotify notify);
57
58 G_END_DECLS
59