#endif /* USE_CAIRO */
#if defined HAVE_PGTK && defined HAVE_IMAGEMAGICK
-/* On pgtk, we don't want to create scaled image.
- * If we create scaled image on scale=2.0 environment,
- * the created image is half size and Gdk scales it back,
- * and the result is blurry.
- * To avoid this, we hold original size image as far as
- * we can, and let Gdk to scale it when it is shown.
- */
+/* In pgtk, we don't want to create scaled image. If we create scaled
+ * image on scale=2.0 environment, the created image is half size and
+ * Gdk scales it back, and the result is blurry. To avoid this, we
+ * hold original size image as far as we can, and let Gdk to scale it
+ * when it is shown. */
# define DONT_CREATE_TRANSFORMED_IMAGEMAGICK_IMAGE
#endif
#ifdef HAVE_PGTK
-//static EmacsTooltip *pgtk_tooltip = nil;
-
/* Static variables to handle applescript execution. */
static Lisp_Object as_script, *as_result;
static int as_status;
static const char *pgtk_app_name = "Emacs";
-/* scale factor manually set per monitor */
+/* Scale factor manually set per monitor. */
static Lisp_Object monitor_scale_factor_alist;
/* ==========================================================================
if (NILP (cdr))
return 0;
if (FIXNUMP (cdr))
- {
- return XFIXNUM (cdr);
- }
+ return XFIXNUM (cdr);
else if (FLOATP (cdr))
- {
- return XFLOAT_DATA (cdr);
- }
+ return XFLOAT_DATA (cdr);
else
error ("unknown type of scale-factor");
}
return dpyinfo;
}
-/* On Wayland,
- * even if without WAYLAND_DISPLAY, --display DISPLAY works, but
- * gdk_display_get_name() always return "wayland-0", which may be
- * different from DISPLAY.
- * If with WAYLAND_DISPLAY, then it always returns WAYLAND_DISPLAY.
- * So pgtk emacs is confused and enter multi display environment.
- * To workaround this situation, treat all the wayland-* as the same
- * display.
- */
+/* On Wayland, even if without WAYLAND_DISPLAY, --display DISPLAY
+ works, but gdk_display_get_name always return "wayland-0", which
+ may be different from DISPLAY. If with WAYLAND_DISPLAY, then it
+ always returns WAYLAND_DISPLAY. So pgtk Emacs is confused and
+ enters multi display environment. To workaround this situation,
+ treat all the wayland-* as the same display. */
static Lisp_Object
is_wayland_display (Lisp_Object dpyname)
{
if (FRAME_GTK_WIDGET (f))
{
update_face_from_frame_parameter (f, Qforeground_color, arg);
- /*recompute_basic_faces (f); */
if (FRAME_VISIBLE_P (f))
SET_FRAME_GARBAGED (f);
}
bg = x_decode_color (f, arg, WHITE_PIX_DEFAULT (f));
FRAME_BACKGROUND_PIXEL (f) = bg;
- /* clear the frame */
+ /* Clear the frame. */
if (FRAME_VISIBLE_P (f))
pgtk_clear_frame (f);
return;
if (TYPE_RANGED_FIXNUMP (int, value))
- nlines = XFIXNUM (value);
+ nlines = XFIXNUM (value);
else
nlines = 0;
}
}
-
-/* toolbar support */
+/* Toolbar support. */
static void
x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
{
}
-
static void
x_set_internal_border_width (struct frame *f, Lisp_Object arg,
Lisp_Object oldval)
}
}
-
static void
x_set_icon_type (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
{
unblock_input ();
}
-
static void
x_set_icon_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
{
monitor_scale_factor_alist);
}
else
- {
- Fsetcdr (tem, scale_factor);
- }
+ Fsetcdr (tem, scale_factor);
return scale_factor;
}
========================================================================== */
-/* called from frame.c */
+/* Called from frame.c. */
struct pgtk_display_info *
check_x_display_info (Lisp_Object frame)
{
FRAME_CONFIG_SCROLL_BAR_LINES (f) = (min_height + height - 1) / height;
}
-/* terms impl this instead of x-get-resource directly */
+/* Terminals implement this instead of x-get-resource directly. */
const char *
pgtk_get_string_resource (XrmDatabase rdb, const char *name,
const char *class)
}
DEFUN ("pgtk-backend-display-class", Fpgtk_backend_display_class, Spgtk_backend_display_class, 0, 1, "",
- doc: /* Returns the name of the Gdk backend display class of the TERMINAL.
+ doc: /* Return the name of the Gdk backend display class of TERMINAL.
The optional argument TERMINAL specifies which display to ask about.
TERMINAL should be a terminal object, a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display. */)