Commit 85f05a28831ce32809b48ebd4e560364a6733562

Authored by Seoyeon Kim
1 parent be0e3334

Remove deprecated APIs in Tizen 3.0

- Changed deprecated APIs of dali-core and dali-toolkit

Change-Id: I8e6858cf5415e47362e95e8e7482771ae8307666
Signed-off-by: Seoyeon Kim <seoyeon2.kim@samsung.com>
examples/item-view/item-view-example.cpp
... ... @@ -356,7 +356,7 @@ public:
356 356 }
357 357 case GRID_LAYOUT:
358 358 {
359   - stage.GetRootLayer().SetBehavior(Layer::LAYER_2D);
  359 + stage.GetRootLayer().SetBehavior(Layer::LAYER_UI);
360 360 break;
361 361 }
362 362 }
... ...
examples/primitive-shapes/primitive-shapes-example.cpp
... ... @@ -95,7 +95,7 @@ public:
95 95 layer.SetParentOrigin( ParentOrigin::CENTER );
96 96 layer.SetAnchorPoint( AnchorPoint::CENTER );
97 97 layer.SetResizePolicy( ResizePolicy::FILL_TO_PARENT, Dimension::ALL_DIMENSIONS );
98   - layer.SetBehavior( Layer::LAYER_2D ); //We use a 2D layer as this is closer to UI work than full 3D scene creation.
  98 + layer.SetBehavior( Layer::LAYER_UI ); //We use a 2D layer as this is closer to UI work than full 3D scene creation.
99 99 layer.SetDepthTestDisabled( false ); //Enable depth testing, as otherwise the 2D layer would not do so.
100 100 stage.Add( layer );
101 101  
... ...
examples/renderer-stencil/renderer-stencil-example.cpp
... ... @@ -158,7 +158,7 @@ private:
158 158 layer.SetAnchorPoint( AnchorPoint::CENTER );
159 159 // Set the parent origin to a small percentage below the center (so the demo will scale for different resolutions).
160 160 layer.SetParentOrigin( Vector3( 0.5f, 0.58f, 0.5f ) );
161   - layer.SetBehavior( Layer::LAYER_2D );
  161 + layer.SetBehavior( Layer::LAYER_UI );
162 162 layer.SetDepthTestDisabled( false );
163 163 stage.Add( layer );
164 164  
... ...
examples/text-fonts/text-fonts-example.cpp
... ... @@ -80,8 +80,10 @@ public:
80 80 }
81 81 else
82 82 {
83   - textLabel.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 0.3f, 0.3f ) );
84   - textLabel.SetProperty( TextLabel::Property::SHADOW_COLOR, Color::BLACK );
  83 + Property::Map shadowMap;
  84 + shadowMap.Insert( "color", Color::BLACK );
  85 + shadowMap.Insert( "offset", Vector2( 0.3f, 0.3f ) );
  86 + textLabel.SetProperty( TextLabel::Property::SHADOW, shadowMap );
85 87 textLabel.SetProperty( TextLabel::Property::TEXT_COLOR, Color::BLUE );
86 88 }
87 89 textLabel.SetBackgroundColor( color );
... ...
examples/text-label/text-label-example.cpp
... ... @@ -365,7 +365,7 @@ public:
365 365 case SHADOW :
366 366 {
367 367 Vector2 shadowOffset( SHADOW_OFFSET ); // Will be set to zeros if color already set
368   - Property::Value value = mLabel.GetProperty( TextLabel::Property::SHADOW_COLOR );
  368 + Property::Value value = mLabel.GetProperty( TextLabel::Property::SHADOW );
369 369 Vector4 currentShadowColor;
370 370 value.Get( currentShadowColor );
371 371  
... ... @@ -697,13 +697,19 @@ public:
697 697 }
698 698 case KEY_S: // Shadow color
699 699 {
700   - if( Color::BLACK == mLabel.GetProperty<Vector4>( TextLabel::Property::SHADOW_COLOR ) )
  700 + Property::Value value = mLabel.GetProperty( TextLabel::Property::SHADOW );
  701 + Vector4 shadowColor;
  702 + value.Get( shadowColor );
  703 + Property::Map shadowMap;
  704 + if( Color::BLACK == shadowColor )
701 705 {
702   - mLabel.SetProperty( TextLabel::Property::SHADOW_COLOR, Color::RED );
  706 + shadowMap.Insert( "color", Color::RED );
  707 + mLabel.SetProperty( TextLabel::Property::SHADOW, shadowMap );
703 708 }
704 709 else
705 710 {
706   - mLabel.SetProperty( TextLabel::Property::SHADOW_COLOR, Color::BLACK );
  711 + shadowMap.Insert( "color", Color::BLACK );
  712 + mLabel.SetProperty( TextLabel::Property::SHADOW, shadowMap );
707 713 }
708 714 break;
709 715 }
... ... @@ -715,12 +721,26 @@ public:
715 721 }
716 722 case KEY_PLUS: // Increase shadow offset
717 723 {
718   - mLabel.SetProperty( TextLabel::Property::SHADOW_OFFSET, mLabel.GetProperty<Vector2>( TextLabel::Property::SHADOW_OFFSET ) + Vector2( 1.0f, 1.0f ) );
  724 + Property::Value value = mLabel.GetProperty( TextLabel::Property::SHADOW );
  725 + Vector2 shadowOffset;
  726 + value.Get( shadowOffset );
  727 + shadowOffset += Vector2( 1.0f, 1.0f );
  728 +
  729 + Property::Map shadowMap;
  730 + shadowMap.Insert( "offset", shadowOffset );
  731 + mLabel.SetProperty( TextLabel::Property::SHADOW, shadowMap );
719 732 break;
720 733 }
721 734 case KEY_MINUS: // Decrease shadow offset
722 735 {
723   - mLabel.SetProperty( TextLabel::Property::SHADOW_OFFSET, mLabel.GetProperty<Vector2>( TextLabel::Property::SHADOW_OFFSET ) - Vector2( 1.0f, 1.0f ) );
  736 + Property::Value value = mLabel.GetProperty( TextLabel::Property::SHADOW );
  737 + Vector2 shadowOffset;
  738 + value.Get( shadowOffset );
  739 + shadowOffset -= Vector2( 1.0f, 1.0f );
  740 +
  741 + Property::Map shadowMap;
  742 + shadowMap.Insert( "offset", shadowOffset );
  743 + mLabel.SetProperty( TextLabel::Property::SHADOW, shadowMap );
724 744 break;
725 745 }
726 746  
... ...
examples/text-memory-profiling/text-memory-profiling-example.cpp
... ... @@ -102,7 +102,9 @@ public:
102 102 label.SetAnchorPoint( AnchorPoint::TOP_LEFT );
103 103 label.SetProperty( TextLabel::Property::TEXT_COLOR, Color::BLACK );
104 104 label.SetProperty( TextLabel::Property::POINT_SIZE, 12.0f );
105   - label.SetProperty( TextLabel::Property::SHADOW_COLOR, Color::YELLOW );
  105 + Property::Map shadowMap;
  106 + shadowMap.Insert( "color", Color::YELLOW );
  107 + label.SetProperty( TextLabel::Property::SHADOW, shadowMap );
106 108 label.SetProperty( TextLabel::Property::ENABLE_MARKUP, true );
107 109  
108 110 Vector2 stageSize = Stage::GetCurrent().GetSize();
... ... @@ -113,55 +115,73 @@ public:
113 115 case SINGLE_COLOR_TEXT:
114 116 {
115 117 label.SetProperty( TextLabel::Property::TEXT, "A Quick Brown Fox Jumps Over The Lazy Dog" );
116   - label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 0.0f, 0.0f ) );
  118 +
  119 + shadowMap.Insert( "offset", Vector2( 0.0f, 0.0f ) );
  120 + label.SetProperty( TextLabel::Property::SHADOW, shadowMap );
117 121 break;
118 122 }
119 123 case SINGLE_COLOR_TEXT_WITH_STYLE:
120 124 {
121 125 label.SetProperty( TextLabel::Property::TEXT, "A Quick Brown Fox Jumps Over The Lazy Dog" );
122   - label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 2.0f, 2.0f ) );
  126 +
  127 + shadowMap.Insert( "offset", Vector2( 2.0f, 2.0f ) );
  128 + label.SetProperty( TextLabel::Property::SHADOW, shadowMap );
123 129 break;
124 130 }
125 131 case SINGLE_COLOR_TEXT_WITH_EMOJI:
126 132 {
127 133 label.SetProperty( TextLabel::Property::TEXT, "\xF0\x9F\x98\x81 A Quick Brown Fox Jumps Over The Lazy Dog" );
128   - label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 0.0f, 0.0f ) );
  134 +
  135 + shadowMap.Insert( "offset", Vector2( 0.0f, 0.0f ) );
  136 + label.SetProperty( TextLabel::Property::SHADOW, shadowMap );
129 137 break;
130 138 }
131 139 case SINGLE_COLOR_TEXT_WITH_STYLE_EMOJI:
132 140 {
133 141 label.SetProperty( TextLabel::Property::TEXT, "\xF0\x9F\x98\x81 A Quick Brown Fox Jumps Over The Lazy Dog" );
134   - label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 2.0f, 2.0f ) );
  142 +
  143 + shadowMap.Insert( "offset", Vector2( 2.0f, 2.0f ) );
  144 + label.SetProperty( TextLabel::Property::SHADOW, shadowMap );
135 145 break;
136 146 }
137 147 case MULTI_COLOR_TEXT:
138 148 {
139 149 label.SetProperty( TextLabel::Property::TEXT, "A <color value='cyan'>Quick Brown Fox</color> Jumps Over The <color value='yellow'>Lazy Dog</color>" );
140   - label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 0.0f, 0.0f ) );
  150 +
  151 + shadowMap.Insert( "offset", Vector2( 0.0f, 0.0f ) );
  152 + label.SetProperty( TextLabel::Property::SHADOW, shadowMap );
141 153 break;
142 154 }
143 155 case MULTI_COLOR_TEXT_WITH_STYLE:
144 156 {
145 157 label.SetProperty( TextLabel::Property::TEXT, "A <color value='cyan'>Quick Brown Fox</color> Jumps Over The <color value='yellow'>Lazy Dog</color>" );
146   - label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 2.0f, 2.0f ) );
  158 +
  159 + shadowMap.Insert( "offset", Vector2( 2.0f, 2.0f ) );
  160 + label.SetProperty( TextLabel::Property::SHADOW, shadowMap );
147 161 break;
148 162 }
149 163 case MULTI_COLOR_TEXT_WITH_EMOJI:
150 164 {
151 165 label.SetProperty( TextLabel::Property::TEXT, " \xF0\x9F\x98\x81 A <color value='cyan'>Quick Brown Fox</color> Jumps Over The <color value='yellow'>Lazy Dog</color>" );
152   - label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 0.0f, 0.0f ) );
  166 +
  167 + shadowMap.Insert( "offset", Vector2( 0.0f, 0.0f ) );
  168 + label.SetProperty( TextLabel::Property::SHADOW, shadowMap );
153 169 break;
154 170 }
155 171 case MULTI_COLOR_TEXT_WITH_STYLE_EMOJI:
156 172 {
157 173 label.SetProperty( TextLabel::Property::TEXT, " \xF0\x9F\x98\x81 A <color value='cyan'>Quick Brown Fox</color> Jumps Over The <color value='yellow'>Lazy Dog</color>" );
158   - label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 2.0f, 2.0f ) );
  174 +
  175 + shadowMap.Insert( "offset", Vector2( 2.0f, 2.0f ) );
  176 + label.SetProperty( TextLabel::Property::SHADOW, shadowMap );
159 177 break;
160 178 }
161 179 case SMALL_TEXT_IN_LARGE_TEXT_LABEL:
162 180 {
163 181 label.SetProperty( TextLabel::Property::TEXT, "A Quick Brown Fox Jumps Over The Lazy Dog" );
164   - label.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 0.0f, 0.0f ) );
  182 +
  183 + shadowMap.Insert( "offset", Vector2( 0.0f, 0.0f ) );
  184 + label.SetProperty( TextLabel::Property::SHADOW, shadowMap );
165 185 label.SetSize(stageSize.x, stageSize.y * 0.25f); // Set the text label in larger size
166 186 break;
167 187 }
... ...
examples/text-scrolling/text-scrolling-example.cpp
... ... @@ -174,15 +174,16 @@ public:
174 174 scrollLargeButton.ClickedSignal().Connect( this, &TextScrollingExample::OnButtonClickedLarge );
175 175 CreateLabel( mLargeLabel, "A Quick Brown Fox Jumps Over The Lazy Dog", boxB, false ,scrollLargeButton );
176 176  
177   -
178 177 CreateBox( "boxC", boxC, desktop, SCROLLING_BOX_SIZE );
179 178 boxC.SetPosition( 0.0f, -300.0f, 1.0f );
180 179 Toolkit::PushButton scrollSmallButton = Toolkit::PushButton::New();
181 180 scrollSmallButton.ClickedSignal().Connect( this, &TextScrollingExample::OnButtonClickedSmall );
182 181 CreateLabel( mSmallLabel, "Hello Text", boxC , true, scrollSmallButton );
183 182 mSmallLabel.SetProperty( TextLabel::Property::TEXT_COLOR, Color::BLACK );
184   - mSmallLabel.SetProperty( TextLabel::Property::SHADOW_OFFSET, Vector2( 1.0f, 1.0f ) );
185   - mSmallLabel.SetProperty( TextLabel::Property::SHADOW_COLOR, Color::CYAN );
  183 + Property::Map shadowMap;
  184 + shadowMap.Insert( "color", Color::CYAN );
  185 + shadowMap.Insert( "offset", Vector2( 1.0f, 1.0f ) );
  186 + mSmallLabel.SetProperty( TextLabel::Property::SHADOW, shadowMap );
186 187  
187 188 CreateBox( "boxD", boxD, desktop, SCROLLING_BOX_SIZE );
188 189 boxD.SetPosition( 0.0f, -200.0f, 1.0f );
... ... @@ -320,7 +321,9 @@ public:
320 321 mToggleColor = true;
321 322 }
322 323  
323   - mSmallLabel.SetProperty( TextLabel::Property::SHADOW_COLOR, Color::BLACK );
  324 + Property::Map shadowMap;
  325 + shadowMap.Insert( "color", Color::BLACK );
  326 + mSmallLabel.SetProperty( TextLabel::Property::SHADOW, shadowMap );
324 327 mSmallLabel.SetProperty( TextLabel::Property::TEXT_COLOR, color );
325 328 mRtlLabel.SetProperty( TextLabel::Property::TEXT_COLOR, color );
326 329 mLargeLabel.SetProperty( TextLabel::Property::TEXT_COLOR, color );
... ...