aboutsummaryrefslogtreecommitdiffstats
path: root/src/image.c
diff options
context:
space:
mode:
authorPo Lu2024-04-23 15:57:45 +0800
committerPo Lu2024-04-23 15:57:45 +0800
commitcd7456e00d719d32c203c71b4e23c98b0c4e1967 (patch)
tree496bdb8d0a1f49aa4668d68c08e2f9309fd1868a /src/image.c
parentb9c191d690fd5d1480858469df23cc4509996fae (diff)
downloademacs-cd7456e00d719d32c203c71b4e23c98b0c4e1967.tar.gz
emacs-cd7456e00d719d32c203c71b4e23c98b0c4e1967.zip
Enable configuring Emacs for "pseudo-grayscale" systems on Android
* doc/emacs/android.texi (Android Windowing): Document how to configure Emacs for monochrome displays. * src/androidfns.c (Fx_display_visual_class): Return Qstatic_gray when n_planes is smaller than 24. (Fandroid_get_connection): Set n_planes by the value of android_display_planes. (syms_of_androidfns): <Qstatic_gray>: New function. * src/androidterm.c (android_alloc_nearest_color): Allocate monochrome colors similarly to the X server. (android_query_colors): Fix typos. (android_draw_fringe_bitmap): Create bitmaps of n_image_planes depth. (android_term_init): Initialize n_image_planes to 24. (syms_of_androidterm) <android_display_planes>: New variable. * src/androidterm.h (struct android_display_info): New field `n_image_planes'. * src/image.c (n_planes) [HAVE_ANDROID]: Define to n_image_planes.
Diffstat (limited to 'src/image.c')
-rw-r--r--src/image.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/image.c b/src/image.c
index 3028c2e707a..d1faadee968 100644
--- a/src/image.c
+++ b/src/image.c
@@ -198,6 +198,9 @@ typedef android_pixmap Pixmap;
198#define GREEN16_FROM_ULONG(color) (GREEN_FROM_ULONG (color) * 0x101) 198#define GREEN16_FROM_ULONG(color) (GREEN_FROM_ULONG (color) * 0x101)
199#define BLUE16_FROM_ULONG(color) (BLUE_FROM_ULONG (color) * 0x101) 199#define BLUE16_FROM_ULONG(color) (BLUE_FROM_ULONG (color) * 0x101)
200 200
201/* DPYINFO->n_planes is unsuitable for this file, because it accepts
202 values that may not be supported for pixmap creation. */
203#define n_planes n_image_planes
201#endif 204#endif
202 205
203static void image_disable_image (struct frame *, struct image *); 206static void image_disable_image (struct frame *, struct image *);