| 83 | } |
| 84 | |
| 85 | void PiuContentDictionary(xsMachine* the, void* it) |
| 86 | { |
| 87 | PiuContent* self = it; |
| 88 | xsBooleanValue boolean; |
| 89 | xsIntegerValue integer; |
| 90 | xsNumberValue number; |
| 91 | |
| 92 | //@@ remove this |
| 93 | if (0 == (*self)->recordSize) |
| 94 | xsUnknownError("size not initialized"); |
| 95 | |
| 96 | if (xsFindBoolean(xsArg(1), xsID_active, &boolean)) { |
| 97 | if (boolean) |
| 98 | (*self)->flags |= piuActive; |
| 99 | else |
| 100 | (*self)->flags &= ~piuActive; |
| 101 | } |
| 102 | if (xsFindBoolean(xsArg(1), xsID_backgroundTouch, &boolean)) { |
| 103 | if (boolean) |
| 104 | (*self)->flags |= piuBackgroundTouch; |
| 105 | else |
| 106 | (*self)->flags &= ~piuBackgroundTouch; |
| 107 | } |
| 108 | if (xsFindBoolean(xsArg(1), xsID_exclusiveTouch, &boolean)) { |
| 109 | if (boolean) |
| 110 | (*self)->flags |= piuExclusiveTouch; |
| 111 | else |
| 112 | (*self)->flags &= ~piuExclusiveTouch; |
| 113 | } |
| 114 | if (xsFindBoolean(xsArg(1), xsID_multipleTouch, &boolean)) { |
| 115 | if (boolean) |
| 116 | (*self)->flags |= piuMultipleTouch; |
| 117 | else |
| 118 | (*self)->flags &= ~piuMultipleTouch; |
| 119 | } |
| 120 | if (xsFindBoolean(xsArg(1), xsID_visible, &boolean)) { |
| 121 | if (boolean) |
| 122 | (*self)->flags |= piuVisible; |
| 123 | else |
| 124 | (*self)->flags &= ~piuVisible; |
| 125 | } |
| 126 | |
| 127 | if (xsFindResult(xsArg(1), xsID_anchor)) { |
| 128 | if (xsTest(xsArg(0))) { |
| 129 | xsSetAt(xsArg(0), xsResult, xsThis); |
| 130 | } |
| 131 | } |
| 132 | if (xsFindResult(xsArg(1), xsID_Behavior)) { |
| 133 | if (xsIsInstanceOf(xsResult, xsFunctionPrototype)) { |
| 134 | fxPush(xsResult); |
| 135 | fxNew(the); |
| 136 | fxRunCount(the, 0); |
| 137 | xsResult = fxPop(); |
| 138 | (*self)->behavior = xsToReference(xsResult); |
| 139 | } |
| 140 | } |
| 141 | else if (xsFindResult(xsArg(1), xsID_behavior)) { |
| 142 | if (xsIsInstanceOf(xsResult, xsObjectPrototype)) { |
no test coverage detected