33 using namespace CdlCompilerToolkit; |
33 using namespace CdlCompilerToolkit; |
34 |
34 |
35 #define AKNLAYOUT_DEFINE_BYTECODE(name,byte) const char name = char(byte); |
35 #define AKNLAYOUT_DEFINE_BYTECODE(name,byte) const char name = char(byte); |
36 #include "AknLayoutByteCodes.h" |
36 #include "AknLayoutByteCodes.h" |
37 |
37 |
38 |
38 extern string KMultiLine; |
39 extern string KMultiLine("Multiline_"); |
39 string KMultiLine("Multiline_"); |
40 typedef LayoutProcessArgsErr<LayoutCdlInstanceOpt> LayoutCdlInstanceOptArgsErr; |
40 typedef LayoutProcessArgsErr<LayoutCdlInstanceOpt> LayoutCdlInstanceOptArgsErr; |
41 |
41 |
42 |
42 |
43 /** |
43 /** |
44 * gTheFuncs |
44 * gTheFuncs |
366 TValues& values = line[outputOrder[ii]]; |
366 TValues& values = line[outputOrder[ii]]; |
367 if (values.iNeedsIndex && values.ParamName() == paramName) |
367 if (values.iNeedsIndex && values.ParamName() == paramName) |
368 { |
368 { |
369 if (maxVal == 0) |
369 if (maxVal == 0) |
370 maxVal = values.size(); |
370 maxVal = values.size(); |
371 else if (maxVal != values.size()) |
371 else if (static_cast<unsigned int>(maxVal) != values.size()) |
372 throw CdlTkAssert(string("param range mismatch ") + line.Name() + " " + param.Name()); |
372 throw CdlTkAssert(string("param range mismatch ") + line.Name() + " " + param.Name()); |
373 cells |= nextCell; |
373 cells |= nextCell; |
374 } |
374 } |
375 nextCell = nextCell << 1; |
375 nextCell = nextCell << 1; |
376 } |
376 } |
462 // the C++ customisation instance. |
462 // the C++ customisation instance. |
463 // So far, the implementations are actually just 16-bit values, typically indexes into |
463 // So far, the implementations are actually just 16-bit values, typically indexes into |
464 // the data lookup table. These need to be turned into an array by adding declarations |
464 // the data lookup table. These need to be turned into an array by adding declarations |
465 // and brackets to the first and last implementations. Extra support functions are also |
465 // and brackets to the first and last implementations. Extra support functions are also |
466 // added. |
466 // added. |
467 extern string KExtraCpp = "\ |
467 extern string KExtraCpp; |
|
468 string KExtraCpp = "\ |
468 #include \"aknlayout2decode.h\"\n\ |
469 #include \"aknlayout2decode.h\"\n\ |
469 namespace $INTERFACE_NS { extern const TUint8 KByteCodedData[]; }\n"; |
470 namespace $INTERFACE_NS { extern const TUint8 KByteCodedData[]; }\n"; |
470 |
471 extern string KInitialCpp; |
471 extern string KInitialCpp ="\ |
472 string KInitialCpp ="\ |
472 extern const TUint16 KDataLookup[$INTERFACE_NS::E_TApiId_TableSize];\n\ |
473 extern const TUint16 KDataLookup[$INTERFACE_NS::E_TApiId_TableSize];\n\ |
473 const SImplData KImplData = { KDataLookup, $INTERFACE_NS::KByteCodedData };\n\ |
474 const SImplData KImplData = { KDataLookup, $INTERFACE_NS::KByteCodedData };\n\ |
474 \n\ |
475 \n\ |
475 $FUNCTIONS\ |
476 $FUNCTIONS\ |
476 \n\ |
477 \n\ |
546 char* iStr; |
547 char* iStr; |
547 }; |
548 }; |
548 |
549 |
549 #include <avkon.hrh> |
550 #include <avkon.hrh> |
550 const int KScalableFontIdOffset(0x1000); |
551 const int KScalableFontIdOffset(0x1000); |
551 extern SIdToInt gIdToIntTable[] = |
552 extern SIdToInt gIdToIntTable[]; |
|
553 SIdToInt gIdToIntTable[] = |
552 { |
554 { |
553 { ELayoutAlignLeft, "ELayoutAlignLeft" }, |
555 { ELayoutAlignLeft, "ELayoutAlignLeft" }, |
554 { ELayoutAlignRight, "ELayoutAlignRight" }, |
556 { ELayoutAlignRight, "ELayoutAlignRight" }, |
555 { ELayoutAlignCenter, "ELayoutAlignCenter" }, |
557 { ELayoutAlignCenter, "ELayoutAlignCenter" }, |
556 { ELayoutAlignBidi, "ELayoutAlignBidi" }, |
558 { ELayoutAlignBidi, "ELayoutAlignBidi" }, |
719 auto_ptr<CCdlTkInterface> iface(parser.LoadAndParse(true)); |
721 auto_ptr<CCdlTkInterface> iface(parser.LoadAndParse(true)); |
720 |
722 |
721 LayoutCdlInstanceOpt process(*iface); |
723 LayoutCdlInstanceOpt process(*iface); |
722 |
724 |
723 TLayout* base = NULL; |
725 TLayout* base = NULL; |
724 for (int arg = 3; arg < args.size(); arg += 2) |
726 for (unsigned int arg = 3; arg < args.size(); arg += 2) |
725 { |
727 { |
726 string layoutName = args[arg]; |
728 string layoutName = args[arg]; |
727 string instName = args[arg+1]; |
729 string instName = args[arg+1]; |
728 if (!instList.IsInstanceOk(instName)) |
730 if (!instList.IsInstanceOk(instName)) |
729 continue; |
731 continue; |