Merge "Pause adaptor when the window is hidden" into devel/master
[platform/core/uifw/dali-adaptor.git] / adaptors / x11 / ecore-x-window-interface.h
1 #ifndef __DALI_INTERNAL_ECORE_X_RENDER_SURFACE_H__
2 #define __DALI_INTERNAL_ECORE_X_RENDER_SURFACE_H__
3
4 /*
5  * Copyright (c) 2014 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <string>
23
24 #include <Ecore_X.h>
25 #include <X11/Xlib.h>
26
27 // INTERNAL INCLUDES
28
29 namespace Dali
30 {
31
32 namespace Internal
33 {
34
35 namespace Adaptor
36 {
37
38 namespace ECore
39 {
40
41 namespace WindowInterface
42 {
43 /**
44  * X11 Window interface, to separate X11 calls within adaptor.
45  */
46
47 /**
48  * Gets the Ecore X Window
49  * @return window
50  */
51  Ecore_X_Window GetWindow();
52
53  /**
54   * Gets a specified X window property
55   * @param[in] property the required property id
56   * @param[in] xDataType the type
57   * @param[in] num the offset / index of the property
58   * @return string the property value
59   */
60  std::string GetWindowProperty( Ecore_X_Atom property, Ecore_X_Atom *xDataType, unsigned int num  );
61
62  /**
63   * Send an X Event
64   * @param[in] display target display
65   * @param[in] window target window
66   * @param[in] propagate to propagate to other windows
67   * @parma[in] eventMask event mask
68   * @param[in] messageType Ecore_X_Atom message type
69   * @param[in] messageFormat format of message
70   * @param[in] msg message to send
71   */
72  void SendXEvent(Ecore_X_Display* display, Ecore_X_Window window, bool propagate,
73                  long int eventMask, Ecore_X_Atom messageType, int messageFormat, const char *msg );
74
75 } // namespace WindowInterface
76
77
78 } // namespace ECore
79
80 } // namespace Adaptor
81
82 } // namespace internal
83
84 } // namespace Dali
85
86 #endif // __DALI_INTERNAL_ECORE_X_RENDER_SURFACE_H__