diff options
Diffstat (limited to 'src/xterm.h')
-rw-r--r-- | src/xterm.h | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/src/xterm.h b/src/xterm.h index a4ad57eddaa..33887be52b0 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -54,6 +54,10 @@ typedef Widget xt_or_gtk_widget; #define GTK_CHECK_VERSION(i, j, k) false #endif +#ifdef HAVE_XRENDER +#include <X11/extensions/Xrender.h> +#endif + #ifdef USE_GTK /* Some definitions to reduce conditionals. */ typedef GtkWidget *xt_or_gtk_widget; @@ -148,7 +152,7 @@ struct x_bitmap_record int height, width, depth; }; -#ifdef USE_CAIRO +#if defined USE_CAIRO || defined HAVE_XRENDER struct x_gc_ext_data { #define MAX_CLIP_RECTS 2 @@ -158,7 +162,9 @@ struct x_gc_ext_data /* Clipping rectangles. */ XRectangle clip_rects[MAX_CLIP_RECTS]; }; +#endif +#ifdef USE_CAIRO extern cairo_pattern_t *x_bitmap_stipple (struct frame *, Pixmap); #endif @@ -239,6 +245,11 @@ struct x_display_info /* The Visual being used for this display. */ Visual *visual; +#ifdef HAVE_XRENDER + /* The picture format for this display. */ + XRenderPictFormat *pict_format; +#endif + /* The colormap being used. */ Colormap cmap; @@ -509,7 +520,7 @@ struct x_display_info int xrandr_minor_version; #endif -#ifdef USE_CAIRO +#if defined USE_CAIRO || defined HAVE_XRENDER XExtCodes *ext_codes; #endif @@ -616,6 +627,13 @@ struct x_output window's back buffer. */ Drawable draw_desc; +#ifdef HAVE_XRENDER + /* The Xrender picture that corresponds to this drawable. None + means no picture format was found, or the Xrender extension is + not present. */ + Picture picture; +#endif + /* Flag that indicates whether we've modified the back buffer and need to publish our modifications to the front buffer at a convenient time. */ @@ -933,6 +951,17 @@ extern void x_mark_frame_dirty (struct frame *f); /* This is the Visual which frame F is on. */ #define FRAME_X_VISUAL(f) FRAME_DISPLAY_INFO (f)->visual +#ifdef HAVE_XRENDER +#define FRAME_X_PICTURE_FORMAT(f) FRAME_DISPLAY_INFO (f)->pict_format +#define FRAME_X_PICTURE(f) ((f)->output_data.x->picture) +#define FRAME_CHECK_XR_VERSION(f, major, minor) \ + (FRAME_DISPLAY_INFO (f)->xrender_supported_p \ + && ((FRAME_DISPLAY_INFO (f)->xrender_major == (major) \ + && FRAME_DISPLAY_INFO (f)->xrender_minor >= (minor)) \ + || (FRAME_DISPLAY_INFO (f)->xrender_major > (major)))) +#endif + + /* This is the Colormap which frame F uses. */ #define FRAME_X_COLORMAP(f) FRAME_DISPLAY_INFO (f)->cmap @@ -1212,6 +1241,11 @@ extern void x_cr_draw_frame (cairo_t *, struct frame *); extern Lisp_Object x_cr_export_frames (Lisp_Object, cairo_surface_type_t); #endif +#ifdef HAVE_XRENDER +extern void x_xrender_color_from_gc_foreground (struct frame *, GC, XRenderColor *); +extern void x_xrender_color_from_gc_background (struct frame *, GC, XRenderColor *); +#endif + INLINE int x_display_pixel_height (struct x_display_info *dpyinfo) { |