genode/repos/os/include/xev_track/xev_track.h

76 lines
1.6 KiB
C
Raw Normal View History

2011-12-22 15:19:25 +00:00
/*
* \brief XEvent tracker
* \author Norman Feske
* \date 2009-11-05
*/
/*
2013-01-10 20:44:47 +00:00
* Copyright (C) 2009-2013 Genode Labs GmbH
2011-12-22 15:19:25 +00:00
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU General Public License version 2.
*/
#include <X11/Xlib.h>
enum { MAX_VIEWS = 100 };
extern int config_force_top;
/******************************************************
** Functions provided by the X window event tracker **
******************************************************/
/**
* Initialize window-event tracking facility
*
* \return true on success
*/
bool xev_track_init(Display *dpy);
/**
* Evaluate X event for window or screen updates
*/
void xev_track_handle_event(Display *dpy, XEvent &ev);
/**
* Track dirty pixels caused by the mouse cursor
*/
void xev_track_handle_cursor(Display *dpy);
/******************************************************
** Functions called from the X window event tracker **
******************************************************/
/**
* Called when a window is created
*/
extern void create_view(int view_id);
/**
* Called when a window get destroyed
*/
extern void destroy_view(int view_id);
/**
* Called to define the view that displays the desktop
*/
extern void set_background_view(int view_id);
/**
* Called when a window gets a new size or position
*/
extern void place_view(int view_id, int x, int y, int w, int h);
/**
* Move view to another view-stacking position
*/
extern void stack_view(int view_id, int neighbor_id, bool behind);
/**
* Refresh screen region
*/
extern void refresh(int x, int y, int w, int h);