1 /***** 2 * Xnee's Not an Event Emulator 3 * 4 * Xnee enables recording and replaying of X protocol data 5 * 6 * Copyright (C) 2006, 2007 Henrik Sandklef 7 * 8 * This program is free software; you can redistribute it and/or 9 * modify it under the terms of the GNU General Public License 10 * as published by the Free Software Foundation; either version 3 11 * of the License, or any later version. 12 * 13 * 14 * This program is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 * GNU General Public License for more details. 18 * 19 * You should have received a copy of the GNU General Public License 20 * along with this program; if not, write to the Free Software 21 * Foundation, Inc., 51 Franklin Street, Boston, 22 * MA 02110-1301, USA. 23 ****/ 24 25 #include "libxnee/xnee.h" 26 27 28 typedef struct 29 { 30 int rel_x ; 31 int rel_y ; 32 int x ; 33 int y ; 34 int border_w; 35 int border_h; 36 int width ; 37 int height ; 38 int window ; 39 int event ; 40 int parent ; 41 char* name ; 42 } xnee_win_pos; 43 44 45 enum 46 { 47 XNEE_WINDOW_RECEIVED, 48 XNEE_WINDOW_SESSION 49 }; 50 51 52 int 53 xnee_window_add_attribue_impl(xnee_data *xd, 54 XWindowAttributes *attributes, 55 Window win, 56 int where); 57 int 58 xnee_window_add_impl(xnee_data *xd, 59 xnee_win_pos *xwp, 60 int where); 61 62 int 63 xnee_window_add_attribute_impl(xnee_data *xd, 64 XWindowAttributes *attributes, 65 Window win, 66 Window parent, 67 int where); 68 69 #define xnee_window_add_session(xd, xwp) \ 70 xnee_window_add_impl(xd, xwp, XNEE_WINDOW_SESSION) 71 72 #define xnee_window_add_received(xd, xwp) \ 73 xnee_window_add_impl(xd, xwp, XNEE_WINDOW_RECEIVED) 74 75 #define xnee_window_add_attribute_received(xd, xwp, win, par) \ 76 xnee_window_add_attribute_impl(xd, xwp, win, par, XNEE_WINDOW_RECEIVED) 77 78 #define xnee_window_add_attribute_session(xd, xwp, win, par) \ 79 xnee_window_add_attribute_impl(xd, xwp, win, par, XNEE_WINDOW_SESSION) 80 81 int 82 xnee_window_try_move(xnee_data *xd); 83