Tizen 2.0 Release
[profile/ivi/libscl-ui.git] / xmlresource / include / autopopup_configure_parser.h
1 /*
2  * Copyright 2012-2013 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Flora License, Version 1.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://floralicense.org/license/
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 #ifndef __AutoPopup_Configure_Parser__H__
19 #define __AutoPopup_Configure_Parser__H__
20 #include <libxml/parser.h>
21 #include "sclres_type.h"
22
23 typedef SclAutoPopupConfigure *PSclAutoPopupConfigure;
24
25 class AutoPopup_Configure_Parser {
26 public:
27     ~AutoPopup_Configure_Parser();
28     static AutoPopup_Configure_Parser *get_instance();
29     void init();
30
31     PSclAutoPopupConfigure get_autopopup_configure();
32
33     //just for debug
34     void print_default_configure_table();
35
36     //These private methods for parsing
37 private:
38     AutoPopup_Configure_Parser();
39     void parsing_autopopup_configure();
40     void parsing_background_color(const xmlNodePtr);
41     void parsing_background_line_color(const xmlNodePtr);
42     void parsing_button_image_path(const xmlNodePtr);
43     void parsing_button_size(const xmlNodePtr);
44     void parsing_window_decorator_iamge_path(const xmlNodePtr);
45     void parsing_grab_area(const xmlNodePtr);
46
47     int get_button_state_prop(const xmlNodePtr cur_node);
48     SCLDisplayMode get_content_displaymode(const xmlNodePtr cur_node);
49
50 private:
51     static AutoPopup_Configure_Parser *m_instance;
52     SclAutoPopupConfigure m_autopopup_configure;
53
54 private:
55     class DestructHelper {
56     public:
57         ~DestructHelper() {
58             if (AutoPopup_Configure_Parser::m_instance != NULL)
59                 delete m_instance;
60         }
61     };
62     static DestructHelper des;
63 };
64
65
66 #endif