Guiliani  Version 2.6 revision 7293 (documentation build 12)
GUIAnimationResource.h
Go to the documentation of this file.
1/*
2* Copyright (C) TES Electronic Solutions GmbH,
3* All Rights Reserved.
4* Contact: info@guiliani.de
5*
6* This file is part of the Guiliani HMI framework
7* for the development of graphical user interfaces on embedded systems.
8*/
9
10#ifndef GUI_ANIMATION_RESOURCE__H_
11#define GUI_ANIMATION_RESOURCE__H_
12
13#include "eC_Types.h"
14#include <limits.h>
15
17//
18// DO NOT EDIT THIS FILE!!! Add your own IDS within UserXXXResource.h files!
19// DO NOT EDIT THIS FILE!!! Add your own IDS within UserXXXResource.h files!
20// DO NOT EDIT THIS FILE!!! Add your own IDS within UserXXXResource.h files!
21//
22
23// -----------------------------------------------------------------------------------------
25// Attention: If a new ID is added, please also change the number of OBJ_START_TAG,
26// so that DUMMY_ANIMATION is always 0, which should guarantee that the user
27// ID numbers will not be affected when adding Guiliani IDs.
28// If you add a new Guiliani ID you should add it in front of the enumeration
29// so that the other Guiliani IDs will not be shifted, i.e. add the
30// new Guiliani ID below.
31
32// Please add Guiliani AnimationIDs right here:
33#define ANIMATION_TABLE \
34 ENTRY(DUMMY_ANIMATION)
35
36// Calculate the value for the START_TAG used in th enum definition below.
37#define ENTRY_ENUM(a) -1
38#define ENTRY(anim_id) -1
40#undef ENTRY
41#undef ENTRY_ENUM
42
43#ifndef GUILIANI_GUILIANILIB
44 #include "UserAnimationResource.h"
45#endif
46
49{
50 ANIMATION_START_TAG = ciCalculatedAnimStartTag,
51#define ENTRY_ENUM(a) a,
52#define ENTRY(anim_id) anim_id,
54#ifndef GUILIANI_GUILIANILIB
55 USER_ANIMATION_TABLE
56#endif
57#undef ENTRY
58#undef ENTRY_ENUM
59 NOF_ANIMATIONIDS,
60 GUILIANI_INTERNAL_ANIMID = INT_MAX // Do not touch this. Required for ensuring consistent enum type size across libraries.
61};
62
63// Check if the DUMMY value is always 0. If not compile error!
64typedef int static_assert_something[(DUMMY_ANIMATION == 0) ? 1 : -1];
65
67#define MAP_ANIMID_TO_ARRAY(ANIM_ID) static_cast<eC_UInt>(ANIM_ID-ANIMATION_START_TAG-1)
69#define UNMAP_ANIM_ENTRY_TO_ARRAY(ANIM_ENTRY) static_cast<AnimationHandle_t>(ANIM_ENTRY+ANIMATION_START_TAG+1)
70// Amount of resources.
71extern const eC_UInt cuiNOFAnimationHandles;
72
73#endif
int static_assert_something[(DUMMY_ANIMATION==0) ? 1 :-1]
Will throw compile error negative subscript if NO_HANDLE is NOT 0!
Definition: GUIAnimationResource.h:64
#define ANIMATION_TABLE
AnimationIDs.
Definition: GUIAnimationResource.h:33
AnimationHandle_t
List of animation resource ids.
Definition: GUIAnimationResource.h:49
const eC_UInt cuiNOFAnimationHandles
Used to contain the highest index cuiNOFXXXClasses = MAP_PROPID_TO_ARRAY(NOF_XXXCLASSES);.
const int ciCalculatedAnimStartTag
preprocessor generates for all entries of ANIMATION_TABLE: -1 -1 -1..., resulting in a mathematical e...
Definition: GUIAnimationResource.h:39