1 /**************************************************************************
5 Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
7 Contact: Boram Park <boram1288.park@samsung.com>
8 Sangjin LEE <lsj119@samsung.com>
10 Permission is hereby granted, free of charge, to any person obtaining a
11 copy of this software and associated documentation files (the
12 "Software"), to deal in the Software without restriction, including
13 without limitation the rights to use, copy, modify, merge, publish,
14 distribute, sub license, and/or sell copies of the Software, and to
15 permit persons to whom the Software is furnished to do so, subject to
16 the following conditions:
18 The above copyright notice and this permission notice (including the
19 next paragraph) shall be included in all copies or substantial portions
22 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
23 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
25 IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
26 ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
27 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
28 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30 **************************************************************************/
39 #include <sys/types.h>
40 #include <sys/fcntl.h>
51 #include <X11/Xatom.h>
53 #include <windowstr.h>
54 #include <X11/extensions/Xcomposite.h>
55 #include <X11/extensions/compositeproto.h>
57 #include "xdbg_types.h"
58 #include "xdbg_evlog_composite.h"
59 #include "xdbg_evlog.h"
62 _EvlogRequestComposite(EvlogInfo *evinfo, char *reply, int *len)
64 xReq *req = evinfo->req.ptr;
68 case X_CompositeRedirectWindow:
70 xCompositeRedirectWindowReq *stuff = (xCompositeRedirectWindowReq *)req;
71 REPLY (": XID(0x%lx) Update(%d)",
78 case X_CompositeRedirectSubwindows:
80 xCompositeRedirectSubwindowsReq *stuff = (xCompositeRedirectSubwindowsReq *)req;
81 REPLY (": XID(0x%lx) Update(%d)",
88 case X_CompositeUnredirectWindow:
90 xCompositeUnredirectWindowReq *stuff = (xCompositeUnredirectWindowReq *)req;
91 REPLY (": XID(0x%lx) Update(%d)",
98 case X_CompositeUnredirectSubwindows:
100 xCompositeUnredirectSubwindowsReq *stuff = (xCompositeUnredirectSubwindowsReq *)req;
101 REPLY (": XID(0x%lx) Update(%d)",
108 case X_CompositeNameWindowPixmap:
110 xCompositeNameWindowPixmapReq *stuff = (xCompositeNameWindowPixmapReq *)req;
111 REPLY (": XID(0x%lx) Pixmap(0x%lx)",
126 _EvlogEventComposite (EvlogInfo *evinfo, int first_base, char *reply, int *len)
128 xEvent *evt = evinfo->evt.ptr;
130 switch ((evt->u.u.type & 0x7F) - first_base)
142 xDbgEvlogCompositeGetBase (ExtensionInfo *extinfo)
145 RETURN_IF_FAIL (extinfo != NULL);
147 extinfo->req_func = _EvlogRequestComposite;
148 extinfo->evt_func = _EvlogEventComposite;
150 ExtensionEntry *xext = CheckExtension (COMPOSITE_NAME);
151 RETURN_IF_FAIL (xext != NULL);
152 RETURN_IF_FAIL (extinfo != NULL);
154 extinfo->opcode = xext->base;
155 extinfo->evt_base = xext->eventBase;
156 extinfo->err_base = xext->errorBase;
157 extinfo->req_func = _EvlogRequestComposite;
158 extinfo->evt_func = _EvlogEventComposite;