compositor-xrender.c File Reference

Go to the source code of this file.

Data Structures

struct  _MetaCompositorXRender
struct  _conv
struct  _shadow
struct  _MetaCompScreen
struct  _MetaCompWindow


#define _GNU_SOURCE
#define _XOPEN_SOURCE   500
#define USE_IDLE_REPAINT   1
#define have_name_window_pixmap(display)   composite_at_least_version (display, 0, 2)
#define have_cow(display)   composite_at_least_version (display, 0, 3)
#define OPAQUE   0xffffffff
#define WINDOW_SOLID   0
#define WINDOW_ARGB   1
#define SHADOW_LARGE_RADIUS   12.0
#define SHADOW_OPACITY   0.66
#define TRANS_OPACITY   0.75
#define DISPLAY_COMPOSITOR(display)   ((MetaCompositorXRender *) meta_display_get_compositor (display))


typedef enum _MetaCompWindowType MetaCompWindowType
typedef enum _MetaShadowType MetaShadowType
typedef struct
typedef struct _conv conv
typedef struct _shadow shadow
typedef struct _MetaCompScreen MetaCompScreen
typedef struct _MetaCompWindow MetaCompWindow


enum  _MetaCompWindowType {


static gboolean composite_at_least_version (MetaDisplay *display, int maj, int min)
static double gaussian (double r, double x, double y)
static convmake_gaussian_map (double r)
static void dump_xserver_region (const char *location, MetaDisplay *display, XserverRegion region)
static guchar sum_gaussian (conv *map, double opacity, int x, int y, int width, int height)
static void presum_gaussian (shadow *shad)
static void generate_shadows (MetaCompScreen *info)
static XImage * make_shadow (MetaDisplay *display, MetaScreen *screen, MetaShadowType shadow_type, double opacity, int width, int height)
static Picture shadow_picture (MetaDisplay *display, MetaScreen *screen, MetaShadowType shadow_type, double opacity, Picture alpha_pict, int width, int height, int *wp, int *hp)
static MetaCompWindowfind_window_for_screen (MetaScreen *screen, Window xwindow)
static MetaCompWindowfind_window_in_display (MetaDisplay *display, Window xwindow)
static MetaCompWindowfind_window_for_child_window_in_display (MetaDisplay *display, Window xwindow)
static Picture solid_picture (MetaDisplay *display, MetaScreen *screen, gboolean argb, double a, double r, double g, double b)
static Picture root_tile (MetaScreen *screen)
static Picture create_root_buffer (MetaScreen *screen)
static void paint_root (MetaScreen *screen, Picture root_buffer)
static gboolean window_has_shadow (MetaCompWindow *cw)
static XserverRegion win_extents (MetaCompWindow *cw)
static XserverRegion border_size (MetaCompWindow *cw)
static XRenderPictFormat * get_window_format (MetaCompWindow *cw)
static Picture get_window_picture (MetaCompWindow *cw)
static void paint_dock_shadows (MetaScreen *screen, Picture root_buffer, XserverRegion region)
static void paint_windows (MetaScreen *screen, GList *windows, Picture root_buffer, XserverRegion region)
static void paint_all (MetaScreen *screen, XserverRegion region)
static void repair_screen (MetaScreen *screen)
static void repair_display (MetaDisplay *display)
static gboolean compositor_idle_cb (gpointer data)
static void add_repair (MetaDisplay *display)
static void add_damage (MetaScreen *screen, XserverRegion damage)
static void damage_screen (MetaScreen *screen)
static void repair_win (MetaCompWindow *cw)
static void free_win (MetaCompWindow *cw, gboolean destroy)
static void map_win (MetaDisplay *display, MetaScreen *screen, Window id)
static void unmap_win (MetaDisplay *display, MetaScreen *screen, Window id)
static void determine_mode (MetaDisplay *display, MetaScreen *screen, MetaCompWindow *cw)
static gboolean is_shaped (MetaDisplay *display, Window xwindow)
static void get_window_type (MetaDisplay *display, MetaCompWindow *cw)
static void add_win (MetaScreen *screen, MetaWindow *window, Window xwindow)
static void destroy_win (MetaDisplay *display, Window xwindow, gboolean gone)
static void restack_win (MetaCompWindow *cw, Window above)
static void resize_win (MetaCompWindow *cw, int x, int y, int width, int height, int border_width, gboolean override_redirect)
static void process_circulate_notify (MetaCompositorXRender *compositor, XCirculateEvent *event)
static void process_configure_notify (MetaCompositorXRender *compositor, XConfigureEvent *event)
static void process_property_notify (MetaCompositorXRender *compositor, XPropertyEvent *event)
static void expose_area (MetaScreen *screen, XRectangle *rects, int nrects)
static void process_expose (MetaCompositorXRender *compositor, XExposeEvent *event)
static void process_unmap (MetaCompositorXRender *compositor, XUnmapEvent *event)
static void process_map (MetaCompositorXRender *compositor, XMapEvent *event)
static void process_reparent (MetaCompositorXRender *compositor, XReparentEvent *event, MetaWindow *window)
static void process_create (MetaCompositorXRender *compositor, XCreateWindowEvent *event, MetaWindow *window)
static void process_destroy (MetaCompositorXRender *compositor, XDestroyWindowEvent *event)
static void process_damage (MetaCompositorXRender *compositor, XDamageNotifyEvent *event)
static void process_shape (MetaCompositorXRender *compositor, XShapeEvent *event)
static int timeout_debug (MetaCompositorXRender *compositor)
static void xrender_add_window (MetaCompositor *compositor, MetaWindow *window, Window xwindow, XWindowAttributes *attrs)
static void xrender_remove_window (MetaCompositor *compositor, Window xwindow)
static void show_overlay_window (MetaScreen *screen, Window cow)
static void hide_overlay_window (MetaScreen *screen, Window cow)
static Window get_output_window (MetaScreen *screen)
static void xrender_manage_screen (MetaCompositor *compositor, MetaScreen *screen)
static void xrender_unmanage_screen (MetaCompositor *compositor, MetaScreen *screen)
static void xrender_set_updates (MetaCompositor *compositor, MetaWindow *window, gboolean updates)
static void xrender_destroy (MetaCompositor *compositor)
static void xrender_process_event (MetaCompositor *compositor, XEvent *event, MetaWindow *window)
static Pixmap xrender_get_window_pixmap (MetaCompositor *compositor, MetaWindow *window)
static void xrender_set_active_window (MetaCompositor *compositor, MetaScreen *screen, MetaWindow *window)
MetaCompositormeta_compositor_xrender_new (MetaDisplay *display)


double shadow_offsets_x [LAST_SHADOW_TYPE]
double shadow_offsets_y [LAST_SHADOW_TYPE]
static MetaCompositor comp_info

Define Documentation

#define _GNU_SOURCE

Definition at line 24 of file compositor-xrender.c.

#define _XOPEN_SOURCE   500

Definition at line 25 of file compositor-xrender.c.

#define DISPLAY_COMPOSITOR ( display   )     ((MetaCompositorXRender *) meta_display_get_compositor (display))

#define have_cow ( display   )     composite_at_least_version (display, 0, 3)

Definition at line 79 of file compositor-xrender.c.

Referenced by get_output_window(), and show_overlay_window().

#define have_name_window_pixmap ( display   )     composite_at_least_version (display, 0, 2)

#define OPAQUE   0xffffffff


Definition at line 236 of file compositor-xrender.c.


Definition at line 237 of file compositor-xrender.c.

#define SHADOW_LARGE_RADIUS   12.0

Definition at line 230 of file compositor-xrender.c.

Referenced by generate_shadows().


Definition at line 234 of file compositor-xrender.c.


Definition at line 235 of file compositor-xrender.c.


Definition at line 229 of file compositor-xrender.c.

Referenced by generate_shadows().

#define SHADOW_OPACITY   0.66

Definition at line 239 of file compositor-xrender.c.

Referenced by win_extents().


Definition at line 232 of file compositor-xrender.c.


Definition at line 233 of file compositor-xrender.c.


Definition at line 228 of file compositor-xrender.c.

Referenced by generate_shadows().

#define TRANS_OPACITY   0.75

Definition at line 241 of file compositor-xrender.c.

#define USE_IDLE_REPAINT   1

Definition at line 61 of file compositor-xrender.c.

#define WINDOW_ARGB   1

Definition at line 226 of file compositor-xrender.c.

Referenced by determine_mode(), paint_windows(), and window_has_shadow().

#define WINDOW_SOLID   0

Definition at line 225 of file compositor-xrender.c.

Referenced by determine_mode(), and paint_windows().

Typedef Documentation

typedef struct _conv conv

typedef struct _shadow shadow

Enumeration Type Documentation


Definition at line 84 of file compositor-xrender.c.


Definition at line 95 of file compositor-xrender.c.

Function Documentation

static void add_damage ( MetaScreen screen,
XserverRegion  damage 
) [static]

static void add_repair ( MetaDisplay display  )  [static]

static void add_win ( MetaScreen screen,
MetaWindow window,
Window  xwindow 
) [static]

static XserverRegion border_size ( MetaCompWindow cw  )  [static]

static gboolean composite_at_least_version ( MetaDisplay display,
int  maj,
int  min 
) [inline, static]

Definition at line 65 of file compositor-xrender.c.

References meta_display_get_compositor_version().

static gboolean compositor_idle_cb ( gpointer  data  )  [static]

static Picture create_root_buffer ( MetaScreen screen  )  [static]

static void damage_screen ( MetaScreen screen  )  [static]

static void destroy_win ( MetaDisplay display,
Window  xwindow,
gboolean  gone 
) [static]

static void determine_mode ( MetaDisplay display,
MetaScreen screen,
MetaCompWindow cw 
) [static]

static void dump_xserver_region ( const char *  location,
MetaDisplay display,
XserverRegion  region 
) [static]

static void expose_area ( MetaScreen screen,
XRectangle *  rects,
int  nrects 
) [static]

static MetaCompWindow* find_window_for_child_window_in_display ( MetaDisplay display,
Window  xwindow 
) [static]

static MetaCompWindow* find_window_for_screen ( MetaScreen screen,
Window  xwindow 
) [static]

static MetaCompWindow* find_window_in_display ( MetaDisplay display,
Window  xwindow 
) [static]

static void free_win ( MetaCompWindow cw,
gboolean  destroy 
) [static]

static double gaussian ( double  r,
double  x,
double  y 
) [static]

Definition at line 247 of file compositor-xrender.c.

Referenced by make_gaussian_map().

static void generate_shadows ( MetaCompScreen info  )  [static]

static Window get_output_window ( MetaScreen screen  )  [static]

static XRenderPictFormat* get_window_format ( MetaCompWindow cw  )  [static]

static Picture get_window_picture ( MetaCompWindow cw  )  [static]

static void get_window_type ( MetaDisplay display,
MetaCompWindow cw 
) [static]

static void hide_overlay_window ( MetaScreen screen,
Window  cow 
) [static]

static gboolean is_shaped ( MetaDisplay display,
Window  xwindow 
) [static]

Definition at line 1724 of file compositor-xrender.c.

References FALSE, meta_display_get_xdisplay(), and meta_display_has_shape().

Referenced by add_win().

static conv* make_gaussian_map ( double  r  )  [static]

Definition at line 256 of file compositor-xrender.c.

References _conv::data, gaussian(), and _conv::size.

Referenced by generate_shadows().

static XImage* make_shadow ( MetaDisplay display,
MetaScreen screen,
MetaShadowType  shadow_type,
double  opacity,
int  width,
int  height 
) [static]

static void map_win ( MetaDisplay display,
MetaScreen screen,
Window  id 
) [static]

MetaCompositor* meta_compositor_xrender_new ( MetaDisplay display  ) 

static void paint_all ( MetaScreen screen,
XserverRegion  region 
) [static]

static void paint_dock_shadows ( MetaScreen screen,
Picture  root_buffer,
XserverRegion  region 
) [static]

static void paint_root ( MetaScreen screen,
Picture  root_buffer 
) [static]

static void paint_windows ( MetaScreen screen,
GList *  windows,
Picture  root_buffer,
XserverRegion  region 
) [static]

static void presum_gaussian ( shadow shad  )  [static]

static void process_circulate_notify ( MetaCompositorXRender compositor,
XCirculateEvent *  event 
) [static]

static void process_configure_notify ( MetaCompositorXRender compositor,
XConfigureEvent *  event 
) [static]

static void process_create ( MetaCompositorXRender compositor,
XCreateWindowEvent *  event,
MetaWindow window 
) [static]

static void process_damage ( MetaCompositorXRender compositor,
XDamageNotifyEvent *  event 
) [static]

static void process_destroy ( MetaCompositorXRender compositor,
XDestroyWindowEvent *  event 
) [static]

Definition at line 2397 of file compositor-xrender.c.

References destroy_win(), _MetaCompositorXRender::display, and FALSE.

Referenced by xrender_process_event().

static void process_expose ( MetaCompositorXRender compositor,
XExposeEvent *  event 
) [static]

static void process_map ( MetaCompositorXRender compositor,
XMapEvent *  event 
) [static]

static void process_property_notify ( MetaCompositorXRender compositor,
XPropertyEvent *  event 
) [static]

static void process_reparent ( MetaCompositorXRender compositor,
XReparentEvent *  event,
MetaWindow window 
) [static]

static void process_shape ( MetaCompositorXRender compositor,
XShapeEvent *  event 
) [static]

static void process_unmap ( MetaCompositorXRender compositor,
XUnmapEvent *  event 
) [static]

static void repair_display ( MetaDisplay display  )  [static]

static void repair_screen ( MetaScreen screen  )  [static]

static void repair_win ( MetaCompWindow cw  )  [static]

static void resize_win ( MetaCompWindow cw,
int  x,
int  y,
int  width,
int  height,
int  border_width,
gboolean  override_redirect 
) [static]

static void restack_win ( MetaCompWindow cw,
Window  above 
) [static]

static Picture root_tile ( MetaScreen screen  )  [static]

static Picture shadow_picture ( MetaDisplay display,
MetaScreen screen,
MetaShadowType  shadow_type,
double  opacity,
Picture  alpha_pict,
int  width,
int  height,
int *  wp,
int *  hp 
) [static]

Definition at line 596 of file compositor-xrender.c.

References make_shadow(), meta_display_get_xdisplay(), and meta_screen_get_xroot().

Referenced by win_extents().

static void show_overlay_window ( MetaScreen screen,
Window  cow 
) [static]

static Picture solid_picture ( MetaDisplay display,
MetaScreen screen,
gboolean  argb,
double  a,
double  r,
double  g,
double  b 
) [static]

static guchar sum_gaussian ( conv map,
double  opacity,
int  x,
int  y,
int  width,
int  height 
) [static]

Definition at line 342 of file compositor-xrender.c.

References _conv::data, and _conv::size.

Referenced by make_shadow(), and presum_gaussian().

static int timeout_debug ( MetaCompositorXRender compositor  )  [static]

static void unmap_win ( MetaDisplay display,
MetaScreen screen,
Window  id 
) [static]

static XserverRegion win_extents ( MetaCompWindow cw  )  [static]

static gboolean window_has_shadow ( MetaCompWindow cw  )  [static]

static void xrender_add_window ( MetaCompositor compositor,
MetaWindow window,
Window  xwindow,
XWindowAttributes *  attrs 
) [static]

static void xrender_destroy ( MetaCompositor compositor  )  [static]

Definition at line 2693 of file compositor-xrender.c.

static Pixmap xrender_get_window_pixmap ( MetaCompositor compositor,
MetaWindow window 
) [static]

static void xrender_manage_screen ( MetaCompositor compositor,
MetaScreen screen 
) [static]

static void xrender_process_event ( MetaCompositor compositor,
XEvent *  event,
MetaWindow window 
) [static]

static void xrender_remove_window ( MetaCompositor compositor,
Window  xwindow 
) [static]

Definition at line 2470 of file compositor-xrender.c.

static void xrender_set_active_window ( MetaCompositor compositor,
MetaScreen screen,
MetaWindow window 
) [static]

static void xrender_set_updates ( MetaCompositor compositor,
MetaWindow window,
gboolean  updates 
) [static]

Definition at line 2683 of file compositor-xrender.c.

static void xrender_unmanage_screen ( MetaCompositor compositor,
MetaScreen screen 
) [static]

Variable Documentation

double shadow_offsets_x[LAST_SHADOW_TYPE]

Initial value:

Definition at line 939 of file compositor-xrender.c.

Referenced by win_extents().

double shadow_offsets_y[LAST_SHADOW_TYPE]

Initial value:

Definition at line 942 of file compositor-xrender.c.

Referenced by win_extents().

Generated on Sat Aug 23 22:04:19 2008 for metacity by  doxygen 1.5.5