2 * Copyright (C) 2006 John Ellis
3 * Copyright (C) 2008 - 2016 The Geeqie Team
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 #include "image-overlay.h"
26 #include <gdk-pixbuf/gdk-pixbuf.h>
27 #include <glib-object.h>
29 #include <pango/pango.h>
34 #include "histogram.h"
35 #include "image-load.h"
40 #include "main-defines.h"
43 #include "pixbuf-renderer.h"
44 #include "pixbuf-util.h"
45 #include "slideshow.h"
47 #include "ui-fileops.h"
52 constexpr gint IMAGE_OSD_DEFAULT_DURATION = 30;
59 *----------------------------------------------------------------------------
61 *----------------------------------------------------------------------------
65 struct OverlayStateData {
67 ImageState changed_states;
73 OverlayRendererFlags origin;
80 gint icon_time[IMAGE_OSD_COUNT];
81 gint icon_id[IMAGE_OSD_COUNT];
83 guint idle_id; /* event source id */
84 guint timer_id; /* event source id */
90 gboolean reset; /* reset on new image */
91 gint x; /* x, y offset */
93 gchar *key; /* inline pixbuf */
96 static OSDIcon osd_icons[] = {
97 { TRUE, 0, 0, nullptr }, /* none */
98 { TRUE, -10, -10, nullptr }, /* auto rotated */
99 { TRUE, -10, -10, nullptr }, /* user rotated */
100 { TRUE, -40, -10, nullptr }, /* color embedded */
101 { TRUE, -70, -10, nullptr }, /* first image */
102 { TRUE, -70, -10, nullptr }, /* last image */
103 { FALSE, -70, -10, nullptr }, /* osd enabled */
104 { FALSE, 0, 0, nullptr }
107 #define OSD_DATA "overlay-data"
110 HISTOGRAM_HEIGHT = 140,
111 HISTOGRAM_WIDTH = 256
114 static void image_osd_timer_schedule(OverlayStateData *osd);
116 void set_image_overlay_template_string(gchar **template_string, const gchar *value)
118 g_assert(template_string);
120 g_free(*template_string);
121 *template_string = g_strdup(value);
125 void set_default_image_overlay_template_string(gchar **template_string)
127 set_image_overlay_template_string(template_string, DEFAULT_OVERLAY_INFO);
130 void set_image_overlay_font_string(gchar **font_string, const gchar *value)
132 g_assert(font_string);
134 g_free(*font_string);
135 *font_string = g_strdup(value);
138 static OverlayStateData *image_get_osd_data(ImageWindow *imd)
140 OverlayStateData *osd;
142 if (!imd) return nullptr;
146 osd = static_cast<OverlayStateData *>(g_object_get_data(G_OBJECT(imd->pr), "IMAGE_OVERLAY_DATA"));
150 static void image_set_osd_data(ImageWindow *imd, OverlayStateData *osd)
154 g_object_set_data(G_OBJECT(imd->pr), "IMAGE_OVERLAY_DATA", osd);
158 *----------------------------------------------------------------------------
160 *----------------------------------------------------------------------------
164 void image_osd_histogram_toggle_channel(ImageWindow *imd)
166 OverlayStateData *osd = image_get_osd_data(imd);
168 if (!osd || !osd->histogram) return;
170 histogram_toggle_channel(osd->histogram);
171 image_osd_update(imd);
174 void image_osd_histogram_toggle_mode(ImageWindow *imd)
176 OverlayStateData *osd = image_get_osd_data(imd);
178 if (!osd || !osd->histogram) return;
180 histogram_toggle_mode(osd->histogram);
181 image_osd_update(imd);
184 void image_osd_histogram_set_channel(ImageWindow *imd, gint chan)
186 OverlayStateData *osd = image_get_osd_data(imd);
188 if (!osd || !osd->histogram) return;
190 histogram_set_channel(osd->histogram, chan);
191 image_osd_update(imd);
194 void image_osd_histogram_set_mode(ImageWindow *imd, gint mode)
196 OverlayStateData *osd = image_get_osd_data(imd);
198 if (!osd || !osd->histogram) return;
200 histogram_set_mode(osd->histogram, mode);
201 image_osd_update(imd);
204 gint image_osd_histogram_get_channel(ImageWindow *imd)
206 OverlayStateData *osd = image_get_osd_data(imd);
208 if (!osd || !osd->histogram) return HCHAN_DEFAULT;
210 return histogram_get_channel(osd->histogram);
213 gint image_osd_histogram_get_mode(ImageWindow *imd)
215 OverlayStateData *osd = image_get_osd_data(imd);
217 if (!osd || !osd->histogram) return 0;
219 return histogram_get_mode(osd->histogram);
222 void image_osd_toggle(ImageWindow *imd)
227 show = image_osd_get(imd);
228 if (show == OSD_SHOW_NOTHING)
230 image_osd_set(imd, static_cast<OsdShowFlags>(OSD_SHOW_INFO | OSD_SHOW_STATUS));
234 if (show & OSD_SHOW_HISTOGRAM)
236 image_osd_set(imd, OSD_SHOW_NOTHING);
240 image_osd_set(imd, static_cast<OsdShowFlags>(show | OSD_SHOW_HISTOGRAM));
244 static GdkPixbuf *image_osd_info_render(OverlayStateData *osd)
246 GdkPixbuf *pixbuf = nullptr;
253 const HistMap *histmap = nullptr;
254 ImageWindow *imd = osd->imd;
255 FileData *fd = image_get_fd(imd);
256 PangoFontDescription *font_desc;
258 if (!fd) return nullptr;
260 name = image_get_name(imd);
269 vars = g_hash_table_new_full(g_str_hash, g_str_equal, nullptr, g_free);
271 cd = image_get_collection(imd, &info);
274 t = g_list_length(cd->list);
275 n = g_list_index(cd->list, info) + 1;
278 if (file_extension_match(cd->name, GQ_COLLECTION_EXT))
279 osd_template_insert(vars, "collection", remove_extension_from_path(cd->name), OSDT_FREE);
281 osd_template_insert(vars, "collection", cd->name, OSDT_NONE);
285 osd_template_insert(vars, "collection", _("Untitled"), OSDT_NONE);
290 LayoutWindow *lw = layout_find_by_image(imd);
295 n = g_list_length(lw->slideshow->list_done);
296 t = n + g_list_length(lw->slideshow->list);
301 t = layout_list_count(lw, nullptr);
302 n = layout_list_get_index(lw, image_get_fd(lw->image)) + 1;
305 else if (view_window_find_image(imd, &n, &t))
318 osd_template_insert(vars, "collection", nullptr, OSDT_NONE);
321 osd_template_insert(vars, "number", g_strdup_printf("%d", n), OSDT_NO_DUP);
322 osd_template_insert(vars, "total", g_strdup_printf("%d", t), OSDT_NO_DUP);
323 osd_template_insert(vars, "name", const_cast<gchar *>(name), OSDT_NONE);
324 osd_template_insert(vars, "path", const_cast<gchar *>(image_get_path(imd)), OSDT_NONE);
325 osd_template_insert(vars, "date", imd->image_fd ? (const_cast<gchar *>(text_from_time(imd->image_fd->date))) : "", OSDT_NONE);
326 osd_template_insert(vars, "size", imd->image_fd ? (text_from_size_abrev(imd->image_fd->size)) : g_strdup(""), OSDT_FREE);
327 osd_template_insert(vars, "zoom", image_zoom_get_as_text(imd), OSDT_FREE);
333 GdkPixbuf *load_pixbuf = image_loader_get_pixbuf(imd->il);
335 if (imd->delay_flip &&
336 imd->il && load_pixbuf &&
337 image_get_pixbuf(imd) != load_pixbuf)
339 w = gdk_pixbuf_get_width(load_pixbuf);
340 h = gdk_pixbuf_get_height(load_pixbuf);
344 image_get_image_size(imd, &w, &h);
348 osd_template_insert(vars, "width", g_strdup_printf("%d", w), OSDT_NO_DUP);
349 osd_template_insert(vars, "height", g_strdup_printf("%d", h), OSDT_NO_DUP);
350 osd_template_insert(vars, "res", g_strdup_printf("%d × %d", w, h), OSDT_FREE);
354 osd_template_insert(vars, "width", nullptr, OSDT_NONE);
355 osd_template_insert(vars, "height", nullptr, OSDT_NONE);
356 osd_template_insert(vars, "res", nullptr, OSDT_NONE);
359 text = image_osd_mkinfo(options->image_overlay.template_string, imd->image_fd, vars);
360 g_hash_table_destroy(vars);
363 /* When does this occur ?? */
364 text = g_markup_escape_text(_("Untitled"), -1);
367 with_hist = ((osd->show & OSD_SHOW_HISTOGRAM) && osd->histogram);
370 histmap = histmap_get(imd->image_fd);
373 histmap_start_idle(imd->image_fd);
380 gint active_marks = 0;
384 for (mark = 0; mark < FILEDATA_MARKS_SIZE; mark++)
386 active_marks += file_data_get_mark(fd, mark);
389 if (active_marks > 0)
391 GString *buf = g_string_sized_new(strlen(text) + 1 + FILEDATA_MARKS_SIZE * 2);
395 g_string_append_printf(buf, "%s\n", text);
398 for (mark = 0; mark < FILEDATA_MARKS_SIZE; mark++)
400 g_string_append_printf(buf, file_data_get_mark(fd, mark) ? " <span background='#FF00FF'>%c</span>" : " %c", '1' + (mark < 9 ? mark : -1) );
404 text = g_string_free(buf, FALSE);
409 gchar *escaped_histogram_label = g_markup_escape_text(histogram_label(osd->histogram), -1);
411 text2 = g_strdup_printf("%s\n%s", text, escaped_histogram_label);
413 text2 = g_strdup(escaped_histogram_label);
414 g_free(escaped_histogram_label);
420 font_desc = pango_font_description_from_string(options->image_overlay.font);
421 layout = gtk_widget_create_pango_layout(imd->pr, nullptr);
422 pango_layout_set_font_description(layout, font_desc);
424 pango_layout_set_markup(layout, text, -1);
427 pango_layout_get_pixel_size(layout, &width, &height);
428 /* with empty text width is set to 0, but not height) */
431 else if (height == 0)
433 if (width > 0) width += 10;
434 if (height > 0) height += 10;
438 if (width < HISTOGRAM_WIDTH + 10) width = HISTOGRAM_WIDTH + 10;
439 height += HISTOGRAM_HEIGHT + 5;
442 if (width > 0 && height > 0)
444 pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, width, height);
445 pixbuf_set_rect_fill(pixbuf, 3, 3, width-6, height-6, options->image_overlay.background_red, options->image_overlay.background_green,
446 options->image_overlay.background_blue, options->image_overlay.background_alpha);
447 pixbuf_set_rect(pixbuf, 0, 0, width, height, 240, 240, 240, 80, 1, 1, 1, 1);
448 pixbuf_set_rect(pixbuf, 1, 1, width-2, height-2, 240, 240, 240, 130, 1, 1, 1, 1);
449 pixbuf_set_rect(pixbuf, 2, 2, width-4, height-4, 240, 240, 240, 180, 1, 1, 1, 1);
450 pixbuf_pixel_set(pixbuf, 0, 0, 0, 0, 0, 0);
451 pixbuf_pixel_set(pixbuf, width - 1, 0, 0, 0, 0, 0);
452 pixbuf_pixel_set(pixbuf, 0, height - 1, 0, 0, 0, 0);
453 pixbuf_pixel_set(pixbuf, width - 1, height - 1, 0, 0, 0, 0);
458 gint y = height - HISTOGRAM_HEIGHT - 5;
461 pixbuf_set_rect_fill(pixbuf, x, y, w, HISTOGRAM_HEIGHT, 220, 220, 220, 210);
462 histogram_draw(osd->histogram, histmap, pixbuf, x, y, w, HISTOGRAM_HEIGHT);
464 pixbuf_draw_layout(pixbuf, layout, imd->pr, 5, 5, options->image_overlay.text_red, options->image_overlay.text_green,
465 options->image_overlay.text_blue, options->image_overlay.text_alpha);
468 g_object_unref(G_OBJECT(layout));
474 * @brief Create non-standard icons for the OSD
479 * \image html image-osd-color.png
481 * \image html image-osd-first.png
483 * \image html image-osd-icon.png
485 * \image html image-osd-last.png
486 * IMAGE_OSD_ROTATE_AUTO
487 * \image html image-osd-rotate-auto.png
490 static GdkPixbuf *image_osd_icon_pixbuf(ImageOSDFlag flag)
492 static GdkPixbuf **icons = nullptr;
493 GdkPixbuf *icon = nullptr;
495 if (!icons) icons = g_new0(GdkPixbuf *, IMAGE_OSD_COUNT);
496 if (icons[flag]) return icons[flag];
498 if (osd_icons[flag].key)
500 icon = pixbuf_inline(osd_icons[flag].key);
505 icon = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, 24, 24);
506 pixbuf_set_rect_fill(icon, 1, 1, 22, 22, 255, 255, 255, 200);
507 pixbuf_set_rect(icon, 0, 0, 24, 24, 0, 0, 0, 128, 1, 1, 1, 1);
510 case IMAGE_OSD_ROTATE_AUTO:
511 pixbuf_set_rect(icon, 3, 8, 11, 12,
514 pixbuf_draw_triangle(icon, 14, 3, 6, 12,
515 20, 9, 14, 15, 14, 3,
518 case IMAGE_OSD_ROTATE_USER:
520 case IMAGE_OSD_COLOR:
521 pixbuf_set_rect_fill(icon, 3, 3, 18, 6, 200, 0, 0, 255);
522 pixbuf_set_rect_fill(icon, 3, 9, 18, 6, 0, 200, 0, 255);
523 pixbuf_set_rect_fill(icon, 3, 15, 18, 6, 0, 0, 200, 255);
525 case IMAGE_OSD_FIRST:
526 pixbuf_set_rect(icon, 3, 3, 18, 18, 0, 0, 0, 200, 3, 3, 3, 0);
527 pixbuf_draw_triangle(icon, 6, 5, 12, 6,
528 12, 5, 18, 11, 6, 11,
532 pixbuf_set_rect(icon, 3, 3, 18, 18, 0, 0, 0, 200, 3, 3, 0, 3);
533 pixbuf_draw_triangle(icon, 6, 12, 12, 6,
534 12, 18, 6, 12, 18, 12,
538 pixbuf_set_rect_fill(icon, 11, 3, 3, 12, 0, 0, 0, 255);
539 pixbuf_set_rect_fill(icon, 11, 17, 3, 3, 0, 0, 0, 255);
551 static gint image_overlay_add(ImageWindow *imd, GdkPixbuf *pixbuf, gint x, gint y,
552 OverlayRendererFlags flags)
554 return pixbuf_renderer_overlay_add(reinterpret_cast<PixbufRenderer *>(imd->pr), pixbuf, x, y, flags);
557 static void image_overlay_set(ImageWindow *imd, gint id, GdkPixbuf *pixbuf, gint x, gint y)
559 pixbuf_renderer_overlay_set(reinterpret_cast<PixbufRenderer *>(imd->pr), id, pixbuf, x, y);
562 static void image_overlay_remove(ImageWindow *imd, gint id)
564 pixbuf_renderer_overlay_remove(reinterpret_cast<PixbufRenderer *>(imd->pr), id);
567 static void image_osd_icon_show(OverlayStateData *osd, ImageOSDFlag flag)
571 if (osd->icon_id[flag]) return;
573 pixbuf = image_osd_icon_pixbuf(flag);
576 osd->icon_id[flag] = image_overlay_add(osd->imd, pixbuf,
577 osd_icons[flag].x, osd_icons[flag].y,
581 static void image_osd_icon_hide(OverlayStateData *osd, ImageOSDFlag flag)
583 if (osd->icon_id[flag])
585 image_overlay_remove(osd->imd, osd->icon_id[flag]);
586 osd->icon_id[flag] = 0;
590 static void image_osd_icons_reset_time(OverlayStateData *osd)
594 for (i = 0; i < IMAGE_OSD_COUNT; i++)
596 if (osd_icons[i].reset)
598 osd->icon_time[i] = 0;
603 static void image_osd_icons_update(OverlayStateData *osd)
607 for (i = 0; i < IMAGE_OSD_COUNT; i++)
609 if (osd->icon_time[i] > 0)
611 image_osd_icon_show(osd, static_cast<ImageOSDFlag>(i));
615 image_osd_icon_hide(osd, static_cast<ImageOSDFlag>(i));
620 static void image_osd_icons_hide(OverlayStateData *osd)
624 for (i = 0; i < IMAGE_OSD_COUNT; i++)
626 image_osd_icon_hide(osd, static_cast<ImageOSDFlag>(i));
630 static void image_osd_info_show(OverlayStateData *osd, GdkPixbuf *pixbuf)
632 if (osd->ovl_info == 0)
634 osd->ovl_info = image_overlay_add(osd->imd, pixbuf, osd->x, osd->y, osd->origin);
638 image_overlay_set(osd->imd, osd->ovl_info, pixbuf, osd->x, osd->y);
642 static void image_osd_info_hide(OverlayStateData *osd)
644 if (osd->ovl_info == 0) return;
646 image_overlay_remove(osd->imd, osd->ovl_info);
650 static gboolean image_osd_update_cb(gpointer data)
652 auto osd = static_cast<OverlayStateData *>(data);
654 if (osd->show & OSD_SHOW_INFO)
656 /* redraw when the image was changed,
657 with histogram we have to redraw also when loading is finished */
658 if (osd->changed_states & IMAGE_STATE_IMAGE ||
659 (osd->changed_states & IMAGE_STATE_LOADING && osd->show & OSD_SHOW_HISTOGRAM) ||
660 osd->notify & NOTIFY_HISTMAP)
664 pixbuf = image_osd_info_render(osd);
667 image_osd_info_show(osd, pixbuf);
668 g_object_unref(pixbuf);
672 image_osd_info_hide(osd);
678 image_osd_info_hide(osd);
681 if (osd->show & OSD_SHOW_STATUS)
683 if (osd->changed_states & IMAGE_STATE_IMAGE)
684 image_osd_icons_reset_time(osd);
686 if (osd->changed_states & IMAGE_STATE_COLOR_ADJ)
688 osd->icon_time[IMAGE_OSD_COLOR] = IMAGE_OSD_DEFAULT_DURATION + 1;
689 image_osd_timer_schedule(osd);
692 if (osd->changed_states & IMAGE_STATE_ROTATE_AUTO)
696 if (osd->imd->state & IMAGE_STATE_ROTATE_AUTO)
699 if (!osd->imd->cm) n += IMAGE_OSD_DEFAULT_DURATION;
702 osd->icon_time[IMAGE_OSD_ROTATE_AUTO] = n;
703 image_osd_timer_schedule(osd);
706 image_osd_icons_update(osd);
710 image_osd_icons_hide(osd);
713 osd->changed_states = IMAGE_STATE_NONE;
714 osd->notify = static_cast<NotifyType>(0);
716 return G_SOURCE_REMOVE;
719 static void image_osd_update_schedule(OverlayStateData *osd, gboolean force)
721 if (force) osd->changed_states = static_cast<ImageState>(osd->changed_states | IMAGE_STATE_IMAGE);
725 osd->idle_id = g_idle_add_full(G_PRIORITY_HIGH, image_osd_update_cb, osd, nullptr);
729 void image_osd_update(ImageWindow *imd)
731 OverlayStateData *osd = image_get_osd_data(imd);
735 image_osd_update_schedule(osd, TRUE);
738 static gboolean image_osd_timer_cb(gpointer data)
740 auto osd = static_cast<OverlayStateData *>(data);
741 gboolean done = TRUE;
742 gboolean changed = FALSE;
745 for (i = 0; i < IMAGE_OSD_COUNT; i++)
747 if (osd->icon_time[i] > 1)
750 if (osd->icon_time[i] < 2)
752 osd->icon_time[i] = 0;
762 if (changed) image_osd_update_schedule(osd, FALSE);
773 static void image_osd_timer_schedule(OverlayStateData *osd)
777 osd->timer_id = g_timeout_add(100, image_osd_timer_cb, osd);
781 static void image_osd_state_cb(ImageWindow *, ImageState state, gpointer data)
783 auto osd = static_cast<OverlayStateData *>(data);
785 osd->changed_states = static_cast<ImageState>(osd->changed_states | state);
786 image_osd_update_schedule(osd, FALSE);
789 static void image_osd_notify_cb(FileData *fd, NotifyType type, gpointer data)
791 auto osd = static_cast<OverlayStateData *>(data);
793 if ((type & (NOTIFY_HISTMAP)) && osd->imd && fd == osd->imd->image_fd)
795 DEBUG_1("Notify osd: %s %04x", fd->path, type);
796 osd->notify = static_cast<NotifyType>(osd->notify | type);
797 image_osd_update_schedule(osd, FALSE);
802 static void image_osd_free(OverlayStateData *osd)
806 if (osd->idle_id) g_source_remove(osd->idle_id);
807 if (osd->timer_id) g_source_remove(osd->timer_id);
809 file_data_unregister_notify_func(image_osd_notify_cb, osd);
813 image_set_osd_data(osd->imd, nullptr);
814 g_signal_handler_disconnect(osd->imd->pr, osd->destroy_id);
816 image_set_state_func(osd->imd, nullptr, nullptr);
818 image_osd_info_hide(osd);
819 image_osd_icons_hide(osd);
822 if (osd->histogram) histogram_free(osd->histogram);
827 static void image_osd_destroy_cb(GtkWidget *, gpointer data)
829 auto osd = static_cast<OverlayStateData *>(data);
835 static void image_osd_enable(ImageWindow *imd, OsdShowFlags show)
837 OverlayStateData *osd = image_get_osd_data(imd);
841 osd = g_new0(OverlayStateData, 1);
843 osd->show = OSD_SHOW_NOTHING;
844 osd->x = options->image_overlay.x;
845 osd->y = options->image_overlay.y;
846 osd->origin = OVL_RELATIVE;
848 osd->histogram = histogram_new();
850 osd->destroy_id = g_signal_connect(G_OBJECT(imd->pr), "destroy",
851 G_CALLBACK(image_osd_destroy_cb), osd);
852 image_set_osd_data(imd, osd);
854 image_set_state_func(osd->imd, image_osd_state_cb, osd);
855 file_data_register_notify_func(image_osd_notify_cb, osd, NOTIFY_PRIORITY_LOW);
858 if (show & OSD_SHOW_STATUS)
859 image_osd_icon(imd, IMAGE_OSD_ICON, -1);
861 if (show != osd->show)
862 image_osd_update_schedule(osd, TRUE);
867 void image_osd_set(ImageWindow *imd, OsdShowFlags show)
871 image_osd_enable(imd, show);
874 OsdShowFlags image_osd_get(ImageWindow *imd)
876 OverlayStateData *osd = image_get_osd_data(imd);
878 return osd ? osd->show : OSD_SHOW_NOTHING;
881 Histogram *image_osd_get_histogram(ImageWindow *imd)
883 OverlayStateData *osd = image_get_osd_data(imd);
885 return osd ? osd->histogram : nullptr;
888 void image_osd_copy_status(ImageWindow *src, ImageWindow *dest)
892 image_osd_set(dest, image_osd_get(src));
894 h_src = image_osd_get_histogram(src);
895 h_dest = image_osd_get_histogram(dest);
897 h_dest->histogram_mode = h_src->histogram_mode;
898 h_dest->histogram_channel = h_src->histogram_channel;
905 2+ = show for duration tenths of a second
906 -1 = use default duration
908 void image_osd_icon(ImageWindow *imd, ImageOSDFlag flag, gint duration)
910 OverlayStateData *osd = image_get_osd_data(imd);
914 if (flag >= IMAGE_OSD_COUNT) return;
915 if (duration < 0) duration = IMAGE_OSD_DEFAULT_DURATION;
916 if (duration > 1) duration += 1;
918 osd->icon_time[flag] = duration;
920 image_osd_update_schedule(osd, FALSE);
921 image_osd_timer_schedule(osd);
923 /* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */