b99f8b29ad53283025e105afd3e15287e9f603f9
[profile/ivi/ico-uxf-homescreen.git] / tests / system-controller / test-dummy-hs / CicoBackground.cpp
1 /*
2  * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
3  *
4  * This program is licensed under the terms and conditions of the
5  * Apache License, version 2.0.  The full text of the Apache License is at
6  * http://www.apache.org/licenses/LICENSE-2.0
7  *
8  */
9
10 /*========================================================================*/    
11 /**
12  *  @file   CicoBackground.cpp
13  *
14  *  @brief  
15  */
16 /*========================================================================*/    
17
18 #include <exception>
19 #include <string>
20
21 #include "CicoBackground.h"
22 #include "CicoLog.h"
23
24 /**
25  *  Default Constructor
26  */
27 CicoBackground::CicoBackground(const Evas         *parent,
28                                const CicoGeometry &geometry,
29                                const CicoColor    &color)
30     : CicoEvasObject(parent, CicoEvasObject::OBJTYPE_RECTANGLE, geometry),
31       _color(color)
32 {
33     ICO_DBG("CicoBackground::CicoBackground entry");
34
35     /* setup attribute background object */
36     /* set color */
37     setColor(color);
38
39     /* show object */
40     show();
41
42     ICO_DBG("CicoBackground::CicoBackground exit");
43 }
44
45 /**
46  *  Destructor
47  */
48 CicoBackground::~CicoBackground()
49 {
50     ICO_DBG("CicoBackground::~CicoBackground entry");
51     ICO_DBG("CicoBackground::~CicoBackground exit");
52 }
53
54 /**
55  *  Set background color
56  */
57 void
58 CicoBackground::setColor(const CicoColor &color)
59 {
60     ICO_DBG("CicoBackground::setColor entry");
61     _color = color;
62     ICO_DBG("color(R:%03d G:%03d B:%03d A:%03d)",
63          _color._r, _color._g,
64          _color._b, _color._a);
65     evas_object_color_set(_object,
66                           _color._r, _color._g,
67                           _color._b, _color._a);
68     ICO_DBG("CicoBackground::setColor exit");
69 }
70 /* vim: set expandtab ts=4 sw=4: */