Merge "DALi Version 1.2.40" into devel/master
[platform/core/uifw/dali-toolkit.git] / plugins / dali-swig / examples / visuals-using-custom-view / ContactData.cs
1 /*
2  * Copyright (c) 2017 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 using System;
19 using Dali;
20 using Dali.Constants;
21
22 namespace VisualsUsingCustomView
23 {
24     // The collection of contacts
25     static class ContactsList
26     {
27         public static readonly ContactItem[] s_contactData = new ContactItem[]
28         {
29             new ContactItem ("Emmett Yates", "./images/gallery-small-43.jpg",
30                              new Color((73.0f/255.0f),(182.0f/255.0f), (245.0f/255.0f), 1.0f),
31                              (int)PrimitiveVisualShapeType.CONE),
32             new ContactItem ("Leslie Wong", "./images/gallery-2.jpg",
33                              new Color((51.0f/255.0f), (51.0f/255.0f), (102.0f/255.0f), 1.0f),
34                              (int)PrimitiveVisualShapeType.SPHERE),
35             new ContactItem ("Walter Jensen", "./images/gallery-0.jpg",
36                              new Color((151.0f/255.0f), (214.0f/255.0f), (240.0f/255.0f), 1.0f),
37                              (int)PrimitiveVisualShapeType.CYLINDER),
38             new ContactItem ("Dan Haynes", "./images/gallery-1.jpg",
39                              new Color((102.0f/255.0f), (251.0f/255.0f), (102.0f/255.0f), 1.0f),
40                              (int)PrimitiveVisualShapeType.CONICAL_FRUSTRUM),
41             new ContactItem ("Mable Hodges", "./images/gallery-3.jpg",
42                              new Color((255.0f/255.0f), (102.0f/255.0f), (102.0f/255.0f), 1.0f),
43                              (int)PrimitiveVisualShapeType.CUBE)
44         };
45     }
46
47     // The information for an individual contact
48     class ContactItem
49     {
50         private string _name;
51         private string _imageURL;
52         private Color _color;
53         private int _shape;
54
55         public ContactItem (string name, string imageURL, Color color, int shape)
56         {
57             _name = name;
58             _imageURL = imageURL;
59             _color = color;
60             _shape = shape;
61         }
62
63         public string ImageURL
64         {
65             get
66             {
67                 return _imageURL;
68             }
69             set
70             {
71                 _imageURL = value;
72             }
73         }
74
75         public string Name
76         {
77             get
78             {
79                 return _name;
80             }
81             set
82             {
83                 _name = value;
84             }
85         }
86
87         public Color Color
88         {
89             get
90             {
91                 return _color;
92             }
93             set
94             {
95                 _color = value;
96             }
97         }
98
99         public int Shape
100         {
101             get
102             {
103                 return _shape;
104             }
105             set
106             {
107                 _shape = value;
108             }
109         }
110     }
111 }