MHEG5  18.9.0
MHEG5 Documentation
mh5visible.c
Go to the documentation of this file.
1 /*******************************************************************************
2  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
3  * Copyright © 2004 Ocean Blue Software Ltd
4  * Copyright © 2000 Koninklijke Philips Electronics N.V
5  *
6  * This file is part of a DTVKit Software Component
7  * You are permitted to copy, modify or distribute this file subject to the terms
8  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
9  *
10  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
11  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
12  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
13  *
14  * If you or your organisation is not a member of DTVKit then you have access
15  * to this source code outside of the terms of the licence agreement
16  * and you are expected to delete this and any associated files immediately.
17  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
18  *******************************************************************************/
30 /*---includes for this file--------------------------------------------------*/
31 #include "mh5visible.h"
32 #include "mh5display.h" /* API to real display */
33 #include "mh5application.h" /* display stack */
34 #include "mh5object.h" /* for actions */
35 #include "mh5variable.h" /* for actions */
36 #include "mh5queue.h" /* Events */
37 #include "mh5memory.h"
38 #include "mh5debug.h"
39 #include "mh5dynamiclineart.h"
40 #include "mh5profile.h"
41 
42 #include "mh5drawtext.h"
43 #include "mg_api.h"
44 
45 #include <string.h>
46 
47 /*---constant definitions for this file--------------------------------------*/
48 
49 
50 /*---local typedef structs for this file-------------------------------------*/
51 
52 /*---local (static) variable declarations for this file----------------------*/
53 
54 /*---local function definitions----------------------------------------------*/
55 
56 /*---global function definitions---------------------------------------------*/
57 
63 /*
64  Debug
65  */
66 #ifdef MH5PRINTOUT
67 
74 void MHEG5visiblePrint(MHEG5Visible *visible, char *out)
75 {
76  /* Base Class */
77  MHEG5ingredientPrint(&visible->ingredient, out);
78 
79  /* exchanged attributes */
80  MHEG5indent(out);
81  MHEG_PRINT(out, ":OrigBoxSize ");
82  MHEG5intPrint(visible->originalBoxSize[0], out);
83  MHEG_PRINT(out, " ");
84  MHEG5intPrint(visible->originalBoxSize[1], out);
85  MHEG5newLine(out);
86 
87  if (visible->originalPosition[0] || visible->originalPosition[1])
88  {
89  MHEG5indent(out);
90  MHEG_PRINT(out, ":OrigPosition ");
91  MHEG5intPrint(visible->originalPosition[0], out);
92  MHEG_PRINT(out, " ");
93  MHEG5intPrint(visible->originalPosition[1], out);
94  MHEG5newLine(out);
95  }
96 
97  if (visible->originalPaletteRefID != 0)
98  {
99  MHEG5indent(out);
100  MHEG_PRINT(out, ":OriginalPaletteRefID ");
101  MHEG5intPrint(visible->originalPaletteRefID, out);
102  MHEG5newLine(out);
103  }
104 
105  if (visible->originalPaletteRefGROUPID.len)
106  {
107  MHEG5indent(out);
108  MHEG_PRINT(out, ":OriginalPaletteRefGROUPID ");
109  MHEG5stringPrint( *((MHEG5String *)&visible->originalPaletteRefGROUPID), out );
110  MHEG5newLine(out);
111  }
112 
113  /* internal attributes */
114  if (visible->boxSize[0] || visible->boxSize[1])
115  {
116  MHEG5indent(out);
117  MHEG_PRINT(out, "// BoxSize:\t");
118  MHEG5intPrint(visible->boxSize[0], out);
119  MHEG_PRINT(out, " ");
120  MHEG5intPrint(visible->boxSize[1], out);
121  MHEG5newLine(out);
122  }
123  if (visible->position[0] || visible->position[1])
124  {
125  MHEG5indent(out);
126  MHEG_PRINT(out, "// Position:\t");
127  MHEG5intPrint(visible->position[0], out);
128  MHEG_PRINT(out, " ");
129  MHEG5intPrint(visible->position[1], out);
130  MHEG5newLine(out);
131  }
132 }
133 
134 #endif
135 
145 {
146  switch (target->clazz)
147  {
148  case MHEG5RTGRAPHICS:
149  case MHEG5LINEART:
150  case MHEG5BITMAP:
151  case MHEG5TEXT:
152  case MHEG5VIDEO:
153  case MHEG5SLIDER:
154  case MHEG5DYNAMICLINEART:
155  case MHEG5RECTANGLE:
156  case MHEG5ENTRYFIELD:
157  case MHEG5HYPERTEXT:
158  case MHEG5HOTSPOT:
159  case MHEG5PUSHBUTTON:
160  case MHEG5SWITCHBUTTON:
161  return MHEG5TRUE;
162  default:;
163  }
164  return MHEG5FALSE;
165 }
166 
173 {
174  assert(visible);
175 
176  MHEG5ingredientInit(&visible->ingredient);
177 }
178 
187 {
188  assert(visible);
189 
190  MHEG5ingredientFree(&visible->ingredient);
191 
192  if (visible->originalPaletteRefGROUPID.len)
193  {
195  }
196 }
197 
206 void MHEG5visibleClone(MHEG5Visible *destination, MHEG5Visible *source)
207 {
208  assert(source);
209  assert(destination);
210 
211  MHEG5ingredientClone(&destination->ingredient, &source->ingredient);
212 
213  destination->originalBoxSize[0] = source->originalBoxSize[0];
214  destination->originalBoxSize[1] = source->originalBoxSize[1];
215  destination->originalPosition[0] = source->originalPosition[0];
216  destination->originalPosition[1] = source->originalPosition[1];
217  destination->originalPaletteRefID = source->originalPaletteRefID;
218  if (destination->originalPaletteRefGROUPID.len)
219  {
220  MHEG5String name;
221  name.len = source->originalPaletteRefGROUPID.len;
222  name.data = source->originalPaletteRefGROUPID.ptr.name;
223  name = MHEG5stringCopy(name);
224  destination->originalPaletteRefGROUPID.len = name.len;
225  destination->originalPaletteRefGROUPID.ptr.name = name.data;
226  }
227 }
228 
240 {
241  CALL_PRINT((">> MHEG5visiblePrepare(%p)\n", visible));
242 
243  assert(visible);
244  if (visible->ingredient.root.runningStatus)
245  {
246  INFO_PRINT(("MHEG5visiblePrepare : RunningStatus == TRUE\n"));
247  CALL_PRINT(("<< MHEG5textPrepare\n"));
248  return;
249  }
250 
251  visible->boxSize[0] = visible->originalBoxSize[0];
252  visible->boxSize[1] = visible->originalBoxSize[1];
253  visible->position[0] = visible->originalPosition[0];
254  visible->position[1] = visible->originalPosition[1];
255 #if 0
256  visible->paletteRefID = visible->originalPaletteRefID;
257  visible->paletteRefGROUPID = visible->originalPaletteRefGROUPID;
258 #endif
259  assert( visible->graphic_data == NULL );
260 
263 
264  CALL_PRINT(("<< MHEG5textPrepare\n"));
265 }
266 
267 /*
268  Destruction
269  Execute the following sequence of actions:
270  1. If the Visible object is referenced in the DisplayStack of the active
271  Application object, remove the reference to this Visible from the
272  DisplayStack.
273  2. Execute the Destruction behaviour as defined in the base class.
274  */
275 
283 {
284  assert(visible);
285 
286  MHEG5displayStackDelete((MHEG5Root *) visible);
288 }
289 
290 /*
291  Activation
292  Execute the following sequence of actions:
293  1. Execute the Activation behaviour as defined in the base class.
294  2. Display the Visible according to its position in the DisplayStack and to the
295  position and the bounding box defined by the Position and BoxSize
296  attributes.
297  3. Set the RunningStatus to True and generate an IsRunning event.
298  */
307 {
308  assert(visible);
309  if (!visible->ingredient.root.runningStatus)
310  {
311  /* MHEG5ingredientActivate(&visible->ingredient); <- does nothing, so don't bother */
312 
314 
315  MHEG5displayShow(visible);
316 
317  MHEG5sendSync((MHEG5Root *) visible, MHEG5ISRUNNING, 0);
318  }
319 }
320 
321 /*
322  Deactivation
323  Execute the following sequence of actions:
324  1. If the RunningStatus attribute of the object is False, ignore the behaviour,
325  otherwise:
326  2. Stop displaying the Visible.
327  3. Execute Deactivation behaviour as defined in the base class.
328  */
329 
339 {
340  assert(visible);
341  if (visible->ingredient.root.runningStatus)
342  {
343  MHEG5displayHide(visible);
345  }
346 }
347 
348 /*
349  Actions
350  */
351 
362 {
363  MHEG5GList *thirdParam = 0;
364  MHEG5Int x = 0, y = 0;
365 
366  assert(target);
367 
368  if (!MHEG5visibleIs(target))
369  {
370  return MHEG5ERR_WRONGTARGET;
371  }
372  if (!params)
373  {
375  }
376 
377  thirdParam = MHEG5resolveGenericInteger(params, &x);
378  if (!thirdParam)
379  {
381  }
382 
383  MHEG5resolveGenericInteger(thirdParam, &y);
384 
385  MHEG5visibleSetPosition(((MHEG5Visible *) target), x, y);
386 
387  return MHEG5ERR_NOERROR;
388 }
389 
390 /*
391  For Listgroup
392  */
393 
401 {
402  MHEG5visibleSetPosition(visible,
403  visible->originalPosition[0],
404  visible->originalPosition[1]);
405 }
406 
416 {
417  MHEG5Root *root = (MHEG5Root *)visible;
418 
419  assert(visible);
420  if (!MHEG5visibleIs(root))
421  return;
422  if ((root->clazz != MHEG5DYNAMICLINEART) &&
423  (visible->position[0] == x) &&
424  (visible->position[1] == y))
425  {
426  return;
427  }
428 
429  if (root->runningStatus)
430  {
431  MHEG5displayHide(visible);
432  }
433 
434  visible->position[0] = x;
435  visible->position[1] = y;
436 
437  switch (root->clazz)
438  {
439  case MHEG5VIDEO:
440  if (root->runningStatus)
441  {
443  }
444  break;
445 
446  case MHEG5BITMAP:
447  if (((MHEG5Ingredient *)root)->contentHook == CHOOK_BITMAP_NORMAL_IFRAME ||
448  ((MHEG5Ingredient *)root)->contentHook == CHOOK_BITMAP_H264_IFRAME
449  #ifdef INCLUDE_FREESAT
450  || ((MHEG5Ingredient *)root)->contentHook == CHOOK_BITMAP_IMAGE_PLANE_IFRAME
451  #endif
452  )
453  {
454  if (root->runningStatus)
455  {
457  }
458  }
459  break;
460 
461  #ifdef DRAW_IN_ADVANCE
462  case MHEG5TEXT:
463  if (visible->restricted && visible->graphic_data != NULL)
464  {
465  MG_FreeData( visible->graphic_data );
466  visible->graphic_data = NULL;
467  }
468  break;
469  #endif
470 
471  default:;
472  }
473  if (root->runningStatus)
474  {
475  MHEG5displayShow(visible);
476  }
477 }
478 
488 {
489  MHEG5GList *thirdParam = 0;
490  MHEG5Root *xVar, *yVar;
491 
492  assert(target);
493 
494  if (!MHEG5visibleIs(target))
495  {
496  return MHEG5ERR_WRONGTARGET;
497  }
498 
499  if (!params)
500  {
502  }
503  thirdParam = MHEG5resolveORef(params, &xVar);
504 
505  if (!thirdParam)
506  {
508  }
509  MHEG5resolveORef(thirdParam, &yVar);
510 
511  if (xVar && yVar)
512  {
513  if ((xVar->clazz == MHEG5INTEGERVARIABLE) && (yVar->clazz == MHEG5INTEGERVARIABLE) &&
514  (xVar->runningStatus) && (yVar->runningStatus))
515  {
516  ((MHEG5IntegerVariable *) xVar)->value = ((MHEG5Visible *) target)->position[0];
517  ((MHEG5IntegerVariable *) yVar)->value = ((MHEG5Visible *) target)->position[1];
518  }
519  else
520  {
522  }
523  }
524  else
525  {
527  }
528  return MHEG5ERR_NOERROR;
529 }
530 
531 /*
532  SetBoxSize (XNewBoxSize, YNewBoxSize)
533  Change the size of the bounding box of the target Visible.
534  Execute the following sequence of actions:
535  1. Set the BoxSize attribute.
536  2. Redraw the graphic widget representing the object on the screen in the
537  bounding box defined by the BoxSize and Position attributes and according
538  to its position in the DisplayStack of the active Application object.
539 
540  Provisions of use:
541  The Target object shall be an available Visible object.
542  XNewBoxSize and YNewBoxSize shall be positive values and different from 0.
543  */
554 {
555  MHEG5GList *thirdParam = 0;
556  MHEG5Int x = 0, y = 0;
557 
558  assert(target);
559 
560  if (!MHEG5visibleIs(target))
561  {
562  return MHEG5ERR_WRONGTARGET;
563  }
564 
565  if (!params)
566  {
568  }
569  thirdParam = MHEG5resolveGenericInteger(params, &x);
570  if (!thirdParam)
571  {
573  }
574 
575  MHEG5resolveGenericInteger(thirdParam, &y);
576 
577  if ((x >= 0) && (y >= 0) &&
578  ((((MHEG5Visible *) target)->boxSize[0] != x) ||
579  (((MHEG5Visible *) target)->boxSize[1] != y))
580  )
581  {
582  MHEG5Visible *visible = (MHEG5Visible *)target;
583 
584  if (target->runningStatus)
585  {
586  MHEG5displayHide(visible);
587  }
588 
589  visible->boxSize[0] = x;
590  visible->boxSize[1] = y;
591 
592  #ifndef DRAW_IN_ADVANCE
593  if (target->clazz != MHEG5DYNAMICLINEART &&
594  visible->graphic_data != NULL)
595  {
596  MG_FreeData( visible->graphic_data );
597  visible->graphic_data = NULL;
598  }
599  #endif
600 
601  /* need to re-do graphical data if box size changes */
602  switch (target->clazz)
603  {
604  case MHEG5DYNAMICLINEART:
607  break;
608 
609  #ifdef DRAW_IN_ADVANCE
610  case MHEG5HYPERTEXT:
612  break;
613  case MHEG5ENTRYFIELD:
615  break;
616  case MHEG5TEXT:
617  MHEG5drawText((MHEG5Text *)target );
618  break;
619 
620  case MHEG5BITMAP:
621  if (visible->graphic_data != NULL)
622  {
623  MG_FreeData( visible->graphic_data );
624  visible->graphic_data = NULL;
625  }
626  switch (visible->ingredient.contentHook)
627  {
628  case CHOOK_BITMAP_PNG:
629  MG_DrawPng( visible->ingredient.data, visible->ingredient.dataLen, visible );
630  break;
631 
632  case CHOOK_BITMAP_JPG:
633  MG_DrawJpg( visible->ingredient.data, visible->ingredient.dataLen, visible );
634  break;
635 
636  default:;
637  }
638  break;
639  #endif /*DRAW_IN_ADVANCE*/
640 
641  default:;
642  }
643 
644  if (target->runningStatus)
645  {
646  MHEG5displayShow( visible );
647  }
648  }
649  return MHEG5ERR_NOERROR;
650 }
651 
652 /*
653  GetBoxSize (XBoxSizeVar, YBoxSizeVar)
654  Returns the size of the bounding box of the target Visible.
655  Set the Variables referenced by XBoxSizeVar and YBoxSizeVar to the value of the X
656  and Y position of the target visible respectively.
657 
658  Provisions of use:
659  The Target object shall be an available Visible object.
660  XBoxSizeVar and YBoxSizeVar shall refer to active IntegerVariable objects.
661  */
672 {
673  MHEG5GList *thirdParam = 0;
674  MHEG5Root *xVar, *yVar;
675 
676  assert(target);
677 
678  if (!MHEG5visibleIs(target))
679  {
680  return MHEG5ERR_WRONGTARGET;
681  }
682 
683  if (!params)
684  {
686  }
687  thirdParam = MHEG5resolveORef(params, &xVar);
688 
689  if (!thirdParam)
690  {
692  }
693  MHEG5resolveORef(thirdParam, &yVar);
694 
695  if (xVar && yVar)
696  {
697  if ((xVar->clazz == MHEG5INTEGERVARIABLE) && (yVar->clazz == MHEG5INTEGERVARIABLE) &&
698  (xVar->runningStatus) && (yVar->runningStatus))
699  {
700  ((MHEG5IntegerVariable *) xVar)->value = ((MHEG5Visible *) target)->boxSize[0];
701  ((MHEG5IntegerVariable *) yVar)->value = ((MHEG5Visible *) target)->boxSize[1];
702  }
703  else
704  {
706  }
707  }
708  else
709  {
711  }
712 
713  return MHEG5ERR_NOERROR;
714 }
715 
716 /*
717  BringToFront
718  Put a Visible at the foreground of the screen.
719  Execute the following sequence of actions:
720  1. If the target Visible object is not referenced in the DisplayStack of the active
721  Application object, ignore this action.
722  2. If the target Visible object is referenced in the DisplayStack of the active
723  Application object, move the reference to this Visible at the top of the
724  DisplayStack.
725  3. If the target Visible object is active, redraw the graphic widget representing
726  the object on the screen in the bounding box defined by the BoxSize and
727  Position attributes and according to its position in the DisplayStack of the
728  active Application object.
729 
730  Provisions of use:
731  The Target object shall be an available Visible object.
732  */
743 {
744  assert(target);
745 
746  if (!MHEG5visibleIs(target))
747  {
748  return MHEG5ERR_WRONGTARGET;
749  }
750 
751  MHEG5displayStackToTop(target);
752 
753  MHEG5displayRedraw((MHEG5Visible *) target);
754 
755  return MHEG5ERR_NOERROR;
756 }
757 
758 /*
759  SendToBack
760  Put a Visible at the background of the screen.
761  Execute the following sequence of actions:
762  1. If the target Visible object is not referenced in the DisplayStack of the active
763  Application object, ignore this action
764  2. If the target Visible object is referenced in the DisplayStack of the active
765  Application object, move the reference to this Visible at the bottom of the
766  DisplayStack.
767  3. If the target Visible object is active, redraw the graphic widget representing
768  the object on the screen in the bounding box defined by the BoxSize and
769  Position attributes and according to its position in the DisplayStack of the
770  active Application object.
771 
772  Provisions of use:
773  The Target object shall be an available Visible object.
774  */
785 {
786  assert(target);
787 
788  if (!MHEG5visibleIs(target))
789  {
790  return MHEG5ERR_WRONGTARGET;
791  }
792 
794 
795  MHEG5displayRedraw((MHEG5Visible *) target);
796 
797  return MHEG5ERR_NOERROR;
798 }
799 
800 /*
801  PutBefore (ReferenceVisible)
802  Put a Visible exactly in front of another Visible in the display stack.
803  Execute the following sequence of actions:
804  1. If the target Visible object is not referenced in the DisplayStack of the active
805  Application object, ignore this action.
806  2. If the target Visible object is referenced in the DisplayStack of the active
807  Application object, move the reference to this Visible at the position exactly
808  before the reference to the ReferenceVisible in the DisplayStack.
809  3. If the target Visible object is active, redraw the graphic widget representing
810  the object on the screen in the bounding box defined by the BoxSize and
811  Position attributes and according to its position in the DisplayStack of the
812  active Application object.
813 
814  Provisions of use:
815  The Target object shall be an available Visible object.
816  ReferenceVisible shall be a reference to an available Visible object.
817  The DisplayStack of the active Application object shall contain a reference to the
818  ReferenceVisible object.
819  */
830 {
831  MHEG5Root *refVisible = 0;
832 
833  assert(target);
834 
835  if (!MHEG5visibleIs(target))
836  {
837  return MHEG5ERR_WRONGTARGET;
838  }
839 
840  if (!params)
841  {
843  }
844  (void)MHEG5resolveGenericORef(params, &refVisible);
845  if (refVisible == NULL || !refVisible->availabilityStatus)
846  {
848  }
849  if (!MHEG5visibleIs(refVisible))
850  {
851  return MHEG5ERR_WRONGPARAM;
852  }
853 
854  MHEG5displayStackPutBefore(target, refVisible);
855 
856  MHEG5displayRedraw((MHEG5Visible *) target);
857 
858  return MHEG5ERR_NOERROR;
859 }
860 
861 /*
862  PutBehind (ReferenceVisible)
863  Put a Visible exactly below another Visible in the display stack.
864  Execute the following sequence of actions:
865  1. If the target Visible object is not referenced in the DisplayStack of the active
866  Application object, ignore this action.
867  2. If the target Visible object is referenced in the DisplayStack of the active
868  Application object, move the reference to this Visible at the position exactly
869  after the reference to the ReferenceVisible in the DisplayStack.
870  3. If the target Visible object is active, redraw the graphic widget representing
871  the object on the screen in the bounding box defined by the BoxSize and
872  Position attributes and according to its position in the DisplayStack of the
873  active Application object.
874 
875  Provisions of use:
876  The Target object shall be an available Visible object.
877  ReferenceVisible shall be set or refer to a reference to an available Visible
878  object.
879  The DisplayStack of the active Application object shall contain a reference to the
880  ReferenceVisible object.
881  */
892 {
893  MHEG5Root *refVisible = 0;
894 
895  assert(target);
896 
897  if (!MHEG5visibleIs(target))
898  {
899  return MHEG5ERR_WRONGTARGET;
900  }
901  if (!params)
902  {
904  }
905  (void)MHEG5resolveGenericORef(params, &refVisible);
906  if (refVisible == NULL || !refVisible->availabilityStatus)
907  {
909  }
910  if (!MHEG5visibleIs(refVisible))
911  {
912  return MHEG5ERR_WRONGPARAM;
913  }
914 
915  MHEG5displayStackPutBehind(target, refVisible);
916 
917  MHEG5displayRedraw((MHEG5Visible *) target);
918 
919  return MHEG5ERR_NOERROR;
920 }
921 
922 /*
923  SetPaletteRef(NewPaletteRef)
924  Change the colour look-up table used to render colours of the Visible object.
925  Execute the following sequence of actions:
926  1. Set PaletteRef of the target Visible to NewPaletteRef.
927  2. If the target Visible is active, redraw the Visible by taking into account the new
928  value of PaletteRef.
929 
930  Provisions of use:
931  The Target object shall be an available Visible object.
932  NewPaletteRef shall contain a reference to an active Palette object.
933  */
944 {
945  MHEG5Root *palette = 0;
946 
947  assert(target);
948 
949  if (!MHEG5visibleIs(target))
950  {
951  return MHEG5ERR_WRONGTARGET;
952  }
953 
954  if (!params)
955  {
957  }
958  (void)MHEG5resolveGenericORef(params, &palette);
959  if (palette == NULL || !palette->runningStatus)
960  {
962  }
963  if (palette->clazz != MHEG5PALETTE)
964  {
965  return MHEG5ERR_WRONGPARAM;
966  }
967 
968 #if 0
969  ((MHEG5Visible *) target)->paletteRefID = palette->id;
970  ((MHEG5Visible *) target)->paletteRefGROUPID.len = 0;
971  ((MHEG5Visible *) target)->paletteRefGROUPID.ptr.group = palette->grp;
972 #endif
973 
974  MHEG5displayRedraw((MHEG5Visible *) target);
975 
976  return MHEG5ERR_NOERROR;
977 }
978 
MHEG5Bool availabilityStatus
Definition: mh5root.h:52
void MHEG5ingredientInit(MHEG5Ingredient *ingredient)
Initialise a ingredient object with default values.
void MHEG5displayStackPutBehind(MHEG5Root *target, MHEG5Root *refVisible)
Put a Visible exactly below another Visible in the display stack.
MHEG5Byte * data
Definition: mh5ingredient.h:80
void MHEG5displayStackToBottom(MHEG5Root *visible)
Move a visible to the Bottom of the display stack.
MHEG5ErrorCode MHEG5setPosition(MHEG5Root *target, MHEG5GList *params)
Change the location of the target Visible. Implementation of the SetPosition (NewXPosition, NewYPosition) action of the visible class.
Definition: mh5visible.c:361
MHEG5ErrorCode MHEG5setPaletteRef(MHEG5Root *target, MHEG5GList *params)
Change the colour look-up table used to render colours of the Visible object. Implementation of the S...
Definition: mh5visible.c:943
MHEG5Int boxSize[2]
Definition: mh5visible.h:58
void MHEG5displayStackAdd(MHEG5Root *visible, MHEG5Bool atTop)
This function adds a visible to the display stack. The parameter atTop defines if the Visible is adde...
MH5GroupRef originalPaletteRefGROUPID
Definition: mh5visible.h:55
void MHEG5visibleDeactivate(MHEG5Visible *visible)
Apply the deactivation behaviour of the visible class. As this class has no own deactivation behaviou...
Definition: mh5visible.c:338
Implement the MHEG5 Dynamiclineart Class Defines means to dynamically draw vectorial graphical object...
MHEG5ErrorCode MHEG5putBefore(MHEG5Root *target, MHEG5GList *params)
Put a Visible exactly in front of another Visible in the display stack. Implementation of the PutBefo...
Definition: mh5visible.c:829
void MHEG5visibleResetPosition(MHEG5Visible *visible)
Reset the position of the visible back to its original values (as stored in originalPosition).
Definition: mh5visible.c:400
void MHEG5visibleSetPosition(MHEG5Visible *visible, MHEG5Int x, MHEG5Int y)
This procedure sets the position of the target visible object to the given values.
Definition: mh5visible.c:415
void MHEG5drawHypertext(MHEG5Hypertext *hypertxt)
Definition: mh5drawtext.c:578
void MHEG5visibleActivate(MHEG5Visible *visible)
Apply the activation behaviour of the visible class. Apply the activation behaviour off the visible c...
Definition: mh5visible.c:306
#define INFO_PRINT(x)
Definition: mh5debug.h:69
MHEG5GList * MHEG5resolveGenericInteger(MHEG5GList *params, MHEG5Int *value)
Definition: mh5object.c:510
MHEG5Int originalBoxSize[2]
Definition: mh5visible.h:52
#define CHOOK_BITMAP_NORMAL_IFRAME
Definition: mh5profile.h:94
MHEG5ErrorCode MHEG5sendToBack(MHEG5Root *target, MHEG5GList *params)
Put a Visible at the background of the screen. Implementation of the SendToBack action of the visible...
Definition: mh5visible.c:784
void MG_DrawJpg(void *data, int len, MHEG5Visible *visible)
Definition: mg_bmp.c:236
MHEG5Final clazz
Definition: mh5root.h:55
void MHEG5ingredientDestruct(MHEG5Ingredient *ingredient)
Implementation of the Destruction behaviour Execute the following sequence of actions: ...
void MG_FreeData(void *data)
free surface buffer
Definition: mg_osd.c:1536
union sMH5GroupRef::@5 ptr
MHEG5Bool MHEG5visibleIs(MHEG5Root *target)
<Function description>="">
Definition: mh5visible.c:144
void MHEG5drawEntry(MHEG5Entryfield *entry, entryfieldCursor_t cursor)
Definition: mh5drawtext.c:502
MHEG5String MHEG5stringCopy(MHEG5String source)
<Function description>="">
Definition: mh5base.c:574
void MG_DrawPng(void *data, int len, MHEG5Visible *visible)
Definition: mg_bmp.c:161
MH5GroupPtr grp
Definition: mh5root.h:57
Implement the MHEG5 Variable Class 21 Variable Class Defines a variable within the context of a Group...
void MHEG5displayVideoPositionUpdate(void)
Definition: mh5display.c:2729
void MHEG5stringDestruct(MHEG5String *item)
Destruct a MHEG5String.
Definition: mh5base.c:686
void * graphic_data
Definition: mh5visible.h:64
void MHEG5visibleFree(MHEG5Visible *visible)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
Definition: mh5visible.c:186
#define CHOOK_BITMAP_JPG
Definition: mh5profile.h:99
long MHEG5Int
Definition: mh5base.h:73
#define CHOOK_BITMAP_H264_IFRAME
Definition: mh5profile.h:100
MHEG5Int originalPosition[2]
Definition: mh5visible.h:53
MHEG5ErrorCode MHEG5bringToFront(MHEG5Root *target, MHEG5GList *params)
Put a Visible at the foreground of the screen, i.e. on top of the Display Stack Implementation of the...
Definition: mh5visible.c:742
void MHEG5displayStackPutBefore(MHEG5Root *target, MHEG5Root *refVisible)
Put a Visible exactly in front of another Visible in the display stack.
#define CALL_PRINT(x)
Definition: mh5debug.h:68
This file defines the profile for the MHEG engine.
#define MHEG5displayRedraw(v)
Definition: mh5display.h:47
short MHEG5Bool
Definition: mh5base.h:71
MHEG5ErrorCode
Definition: mh5base.h:222
MHEG5ErrorCode MHEG5getPosition(MHEG5Root *target, MHEG5GList *params)
Returns the location of the target Visible.
Definition: mh5visible.c:487
#define MHEG5displayHide(v)
Definition: mh5display.h:46
Event handling. Implementation of a combined queue for events and actions. This is the eventsystem wh...
MHEG5Byte * data
Definition: mh5base.h:85
void MHEG5displayStackToTop(MHEG5Root *visible)
Move a Visible to the Top of the display stack.
Implement the MHEG5 Visible Class Defines the behaviour of Presentables that have a visual representa...
void MHEG5visibleDestruct(MHEG5Visible *visible)
Destruct a visible object.
Definition: mh5visible.c:282
MHEG5GList * MHEG5resolveGenericORef(MHEG5GList *params, MHEG5Root **object)
Definition: mh5object.c:281
#define MHEG5TRUE
Definition: mh5base.h:49
void MHEG5ingredientClone(MHEG5Ingredient *destination, MHEG5Ingredient *source)
Implementation of the ingredient part of the clone action.
void MHEG5ingredientDeactivate(MHEG5Ingredient *ingredient)
Implementation of Deactivate behaviour Inherrited from Root class.
#define MHEG5displayShow(v)
Definition: mh5display.h:45
Implement functions to retrieve MHEG5objects by GroupID and ID.
void MHEG5ingredientPrepare(MHEG5Ingredient *ingredient)
Implementation of the Preparation behaviour Inherrited from Root class.
Implementation of the MHEG5 Application Class Defines a set of Ingredient objects, which are shared within an application scope. Base class: Group Subclasses: None Status: Concrete class.
Mheg5 logging and debug printing.
void MHEG5initDynamicLineart(MHEG5DynamicLineart *dynamicLineart)
Create the canvas for a dynamic lineart object.
MHEG class interface to graphics text render.
MHEG5Int len
Definition: mh5base.h:99
MHEG5Bool runningStatus
Definition: mh5root.h:51
BOOLEAN restricted
Definition: mh5visible.h:66
MHEG5Ingredient ingredient
Definition: mh5visible.h:49
MHEG5Byte * name
Definition: mh5base.h:102
redirection include
MHEG5Int id
Definition: mh5root.h:48
MHEG5ErrorCode MHEG5setBoxSize(MHEG5Root *target, MHEG5GList *params)
Change the size of the bounding box of the target Visible. Implementation of the SetBoxSize (XNewBoxS...
Definition: mh5visible.c:553
MHEG5Int len
Definition: mh5base.h:84
void MHEG5visibleInit(MHEG5Visible *visible)
Initialise a visible object with default values.
Definition: mh5visible.c:172
MHEG5ErrorCode MHEG5getBoxSize(MHEG5Root *target, MHEG5GList *params)
Returns the size of the bounding box of the target Visible. Implementation of the GetBoxSize (XBoxSiz...
Definition: mh5visible.c:671
void MHEG5freeDynamicLineart(MHEG5DynamicLineart *dynamicLineart)
Create the canvas for a dynamic lineart object.
MHEG5GList * MHEG5resolveORef(MHEG5GList *params, MHEG5Root **object)
Definition: mh5object.c:126
void MHEG5ingredientFree(MHEG5Ingredient *ingredient)
Free off all memory associated with the specified object, including any exchanged attributes and inte...
Implement generic MHEG5-display functions - independent from the OSD These are generic functions used...
MHEG5Int originalPaletteRefID
Definition: mh5visible.h:54
#define CHOOK_BITMAP_PNG
Definition: mh5profile.h:95
MHEG5Int contentHook
Definition: mh5ingredient.h:69
void MHEG5visiblePrepare(MHEG5Visible *visible)
Apply the preparation behaviour off the visible class Apply the preparation behaviour of the visible ...
Definition: mh5visible.c:239
MHEG5Int position[2]
Definition: mh5visible.h:59
#define MHEG5FALSE
Definition: mh5base.h:48
void MHEG5drawText(MHEG5Text *txt)
Definition: mh5drawtext.c:485
MHEG5ErrorCode MHEG5putBehind(MHEG5Root *target, MHEG5GList *params)
Put a Visible exactly below another Visible in the display stack. Implementation of the PutBehind (Re...
Definition: mh5visible.c:891
void MHEG5sendSync(MHEG5Root *source, MHEG5EventType event, MHEG5Int data)
Store an event in the synchronous event queue.
Definition: mh5queue.c:1651
MHEG5Bool MHEG5displayStackDelete(MHEG5Root *visible)
This function removes the reference to a visible object from the display stack.
void MHEG5visibleClone(MHEG5Visible *destination, MHEG5Visible *source)
Copy a visible object with original values.
Definition: mh5visible.c:206