mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-12 20:00:09 +00:00
Merge branch 'backports-for-4-4' into 'gtk-4-4'
windowhandle: Quiet a compiler warning See merge request GNOME/gtk!3915
This commit is contained in:
commit
817cfcacce
@ -271,6 +271,12 @@ insert_tags_for_attributes (GtkTextBuffer *buffer,
|
||||
|
||||
#if PANGO_VERSION_CHECK(1,49,0)
|
||||
case PANGO_ATTR_TEXT_TRANSFORM:
|
||||
#endif
|
||||
#if PANGO_VERSION_CHECK(1,49,1)
|
||||
case PANGO_ATTR_WORD:
|
||||
case PANGO_ATTR_SENTENCE:
|
||||
case PANGO_ATTR_BASELINE_SHIFT:
|
||||
case PANGO_ATTR_FONT_SCALE:
|
||||
break;
|
||||
#endif
|
||||
|
||||
|
@ -5,6 +5,10 @@ gidocgen = find_program('gi-docgen', required: get_option('gtk_doc'))
|
||||
|
||||
docs_dir = gtk_datadir / 'doc'
|
||||
|
||||
if get_option('gtk_doc') and not build_gir
|
||||
error('API reference requires introspection.')
|
||||
endif
|
||||
|
||||
subdir('gdk')
|
||||
subdir('gsk')
|
||||
subdir('gtk')
|
||||
|
@ -132,7 +132,7 @@ static const GdkDebugKey gdk_debug_keys[] = {
|
||||
{ "gl-wgl", GDK_DEBUG_GL_WGL, "Use WGL on Windows" },
|
||||
{ "vulkan-disable", GDK_DEBUG_VULKAN_DISABLE, "Disable Vulkan support" },
|
||||
{ "vulkan-validate", GDK_DEBUG_VULKAN_VALIDATE, "Load the Vulkan validation layer" },
|
||||
{ "default-settings",GDK_DEBUG_DEFAULT_SETTINGS, "Force default values for xsettings" },
|
||||
{ "default-settings",GDK_DEBUG_DEFAULT_SETTINGS, "Force default values for xsettings", TRUE },
|
||||
};
|
||||
|
||||
|
||||
|
@ -70,17 +70,17 @@ typedef enum {
|
||||
* snapshot at or 0 if none. This is purely a hint. The object must still
|
||||
* be able to render at any size.
|
||||
* @get_intrinsic_aspect_ratio: The preferred aspect ratio for this object
|
||||
* or 0 if none. If both [vfunc@Gdk.PaintableInterface.get_intrinsic_width]
|
||||
* and [vfunc@Gdk.PaintableInterface.get_intrinsic_height] return non-zero
|
||||
* or 0 if none. If both [vfunc@Gdk.Paintable.get_intrinsic_width]
|
||||
* and [vfunc@Gdk.Paintable.get_intrinsic_height] return non-zero
|
||||
* values, this function should return the aspect ratio computed from those.
|
||||
*
|
||||
* The list of functions that can be implemented for the `GdkPaintable`
|
||||
* interface.
|
||||
*
|
||||
* Note that apart from the [vfunc@Gdk.PaintableInterface.snapshot] function,
|
||||
* Note that apart from the [vfunc@Gdk.Paintable.snapshot] function,
|
||||
* no virtual function of this interface is mandatory to implement, though it
|
||||
* is a good idea to implement [vfunc@Gdk.PaintableInterface.get_current_image]
|
||||
* for non-static paintables and [vfunc@Gdk.PaintableInterface.get_flags] if the
|
||||
* is a good idea to implement [vfunc@Gdk.Paintable.get_current_image]
|
||||
* for non-static paintables and [vfunc@Gdk.Paintable.get_flags] if the
|
||||
* image is not dynamic as the default implementation returns no flags and
|
||||
* that will make the implementation likely quite slow.
|
||||
*/
|
||||
|
@ -2117,7 +2117,7 @@ gdk_wayland_display_get_setting (GdkDisplay *display,
|
||||
{
|
||||
TranslationEntry *entry;
|
||||
|
||||
if (GDK_DISPLAY_DEBUG_CHECK (display, DEFAULT_SETTINGS))
|
||||
if (gdk_display_get_debug_flags (display) & GDK_DEBUG_DEFAULT_SETTINGS)
|
||||
return FALSE;
|
||||
|
||||
if (GDK_WAYLAND_DISPLAY (display)->settings != NULL &&
|
||||
|
@ -1037,8 +1037,8 @@ gdk_x11_display_translate_event (GdkEventTranslator *translator,
|
||||
if (xevent->type - display_x11->xrandr_event_base == RRScreenChangeNotify ||
|
||||
xevent->type - display_x11->xrandr_event_base == RRNotify)
|
||||
{
|
||||
if (x11_screen)
|
||||
_gdk_x11_screen_size_changed (x11_screen, xevent);
|
||||
if (display_x11->screen)
|
||||
_gdk_x11_screen_size_changed (display_x11->screen, xevent);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
@ -89,7 +89,7 @@ get_boolean_default (GdkX11Screen *x11_screen,
|
||||
char *v;
|
||||
int i;
|
||||
|
||||
if (GDK_DISPLAY_DEBUG_CHECK (GDK_SCREEN_DISPLAY (x11_screen), DEFAULT_SETTINGS))
|
||||
if (gdk_display_get_debug_flags (GDK_SCREEN_DISPLAY (x11_screen)) & GDK_DEBUG_DEFAULT_SETTINGS)
|
||||
return FALSE;
|
||||
|
||||
v = XGetDefault (dpy, "Xft", option);
|
||||
@ -114,7 +114,7 @@ get_double_default (GdkX11Screen *x11_screen,
|
||||
Display *dpy = GDK_SCREEN_XDISPLAY (x11_screen);
|
||||
char *v, *e;
|
||||
|
||||
if (GDK_DISPLAY_DEBUG_CHECK (GDK_SCREEN_DISPLAY (x11_screen), DEFAULT_SETTINGS))
|
||||
if (gdk_display_get_debug_flags (GDK_SCREEN_DISPLAY (x11_screen)) & GDK_DEBUG_DEFAULT_SETTINGS)
|
||||
return FALSE;
|
||||
|
||||
v = XGetDefault (dpy, "Xft", option);
|
||||
@ -141,7 +141,7 @@ get_integer_default (GdkX11Screen *x11_screen,
|
||||
Display *dpy = GDK_SCREEN_XDISPLAY (x11_screen);
|
||||
char *v, *e;
|
||||
|
||||
if (GDK_DISPLAY_DEBUG_CHECK (GDK_SCREEN_DISPLAY (x11_screen), DEFAULT_SETTINGS))
|
||||
if (gdk_display_get_debug_flags (GDK_SCREEN_DISPLAY (x11_screen)) & GDK_DEBUG_DEFAULT_SETTINGS)
|
||||
return FALSE;
|
||||
|
||||
v = XGetDefault (dpy, "Xft", option);
|
||||
|
@ -1408,7 +1408,10 @@ gsk_ngl_render_job_visit_color_node (GskNglRenderJob *job,
|
||||
program = CHOOSE_PROGRAM (job, coloring);
|
||||
batch = gsk_ngl_command_queue_get_batch (job->command_queue);
|
||||
|
||||
if (batch->any.kind == GSK_NGL_COMMAND_KIND_DRAW &&
|
||||
/* Limit the size, or we end up with a coordinate overflow somwhere. */
|
||||
if (node->bounds.size.width < 300 &&
|
||||
node->bounds.size.height < 300 &&
|
||||
batch->any.kind == GSK_NGL_COMMAND_KIND_DRAW &&
|
||||
batch->any.program == program->id)
|
||||
{
|
||||
GskNglRenderOffscreen offscreen = {0};
|
||||
|
@ -7,7 +7,8 @@
|
||||
* character data, and definitions for the builtin compose table of GTK.
|
||||
* Run it like this:
|
||||
*
|
||||
* compose-parse Compose sequences chars gtkcomposedata.h
|
||||
* cpp -DXCOMM='#' Compose.pre | sed -e 's/^ *#/#/' > Compose
|
||||
* compose-parse Compose sequences-little-endian sequences-big-endian chars gtkcomposedata.h
|
||||
*
|
||||
* The GTK build expects the output files to be in the source tree, in
|
||||
* the gtk/compose directory.
|
||||
@ -15,15 +16,19 @@
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
const guint16 *sequences_le;
|
||||
const guint16 *sequences_be;
|
||||
guint16 *other_sequences;
|
||||
GtkComposeTable *table;
|
||||
GError *error = NULL;
|
||||
GString *str;
|
||||
gsize i;
|
||||
|
||||
setlocale (LC_ALL, "");
|
||||
|
||||
if (argc < 5)
|
||||
{
|
||||
g_print ("Usage: compose-parse INPUT OUTPUT1 OUTPUT2 OUTPUT3\n");
|
||||
g_print ("Usage: compose-parse INPUT SEQUENCES-LE SEQUENCES-BE CHARS HEADER\n");
|
||||
exit (1);
|
||||
}
|
||||
|
||||
@ -31,11 +36,26 @@ main (int argc, char *argv[])
|
||||
if (!table)
|
||||
g_error ("Failed to parse %s", argv[1]);
|
||||
|
||||
#if G_BYTE_ORDER == G_BIG_ENDIAN
|
||||
sequences_le = other_sequences = g_new0 (guint16, table->data_size);
|
||||
sequences_be = (const guint16 *) table->data;
|
||||
#else
|
||||
sequences_le = (const guint16 *) table->data;
|
||||
sequences_be = other_sequences = g_new0 (guint16, table->data_size);
|
||||
#endif
|
||||
|
||||
for (i = 0; i < table->data_size; i++)
|
||||
other_sequences[i] = GUINT16_SWAP_LE_BE (table->data[i]);
|
||||
|
||||
/* data_size is the size in guint16 */
|
||||
if (!g_file_set_contents (argv[2], (char *)table->data, 2 * table->data_size, &error))
|
||||
if (!g_file_set_contents (argv[2], (char *) sequences_le, 2 * table->data_size, &error))
|
||||
g_error ("%s", error->message);
|
||||
|
||||
if (!g_file_set_contents (argv[3], table->char_data, table->n_chars + 1, &error))
|
||||
/* data_size is the size in guint16 */
|
||||
if (!g_file_set_contents (argv[3], (char *) sequences_be, 2 * table->data_size, &error))
|
||||
g_error ("%s", error->message);
|
||||
|
||||
if (!g_file_set_contents (argv[4], table->char_data, table->n_chars + 1, &error))
|
||||
g_error ("%s", error->message);
|
||||
|
||||
str = g_string_new ("");
|
||||
@ -55,10 +75,11 @@ main (int argc, char *argv[])
|
||||
"\n"
|
||||
"#endif\n");
|
||||
|
||||
if (!g_file_set_contents (argv[4], str->str, str->len, &error))
|
||||
if (!g_file_set_contents (argv[5], str->str, str->len, &error))
|
||||
g_error ("%s", error->message);
|
||||
|
||||
g_string_free (str, TRUE);
|
||||
g_free (other_sequences);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
#define MAX_SEQ_LEN 5
|
||||
#define N_INDEX_SIZE 30
|
||||
#define DATA_SIZE 16447
|
||||
#define DATA_SIZE 16477
|
||||
#define N_CHARS 1241
|
||||
|
||||
#endif
|
||||
|
BIN
gtk/compose/sequences-big-endian
Normal file
BIN
gtk/compose/sequences-big-endian
Normal file
Binary file not shown.
Binary file not shown.
@ -21,6 +21,7 @@ def replace_if_changed(new, old):
|
||||
os.remove(new)
|
||||
|
||||
srcdir = sys.argv[1]
|
||||
endian = sys.argv[2]
|
||||
|
||||
xml = '''<?xml version='1.0' encoding='UTF-8'?>
|
||||
<gresources>
|
||||
@ -84,13 +85,13 @@ for f in get_files('inspector', '.ui'):
|
||||
xml += '''
|
||||
<file>inspector/inspector.css</file>
|
||||
<file>emoji/en.data</file>
|
||||
<file>compose/sequences</file>
|
||||
<file alias="compose/sequences">compose/sequences-{0}-endian</file>
|
||||
<file>compose/chars</file>
|
||||
</gresource>
|
||||
</gresources>'''
|
||||
</gresources>'''.format(endian)
|
||||
|
||||
if len(sys.argv) > 2:
|
||||
outfile = sys.argv[2]
|
||||
if len(sys.argv) > 3:
|
||||
outfile = sys.argv[3]
|
||||
tmpfile = outfile + '~'
|
||||
with open(tmpfile, 'w') as f:
|
||||
f.write(xml)
|
||||
|
@ -428,64 +428,14 @@ append_separated (GString **s,
|
||||
g_string_append (*s, text);
|
||||
}
|
||||
|
||||
PangoAttrList *
|
||||
gtk_css_style_get_pango_attributes (GtkCssStyle *style)
|
||||
char *
|
||||
gtk_css_style_compute_font_features (GtkCssStyle *style)
|
||||
{
|
||||
PangoAttrList *attrs = NULL;
|
||||
GtkTextDecorationLine decoration_line;
|
||||
GtkTextDecorationStyle decoration_style;
|
||||
const GdkRGBA *color;
|
||||
const GdkRGBA *decoration_color;
|
||||
int letter_spacing;
|
||||
GtkCssFontVariantLigature ligatures;
|
||||
GtkCssFontVariantNumeric numeric;
|
||||
GtkCssFontVariantEastAsian east_asian;
|
||||
GString *s;
|
||||
char *settings;
|
||||
|
||||
/* text-decoration */
|
||||
decoration_line = _gtk_css_text_decoration_line_value_get (style->font_variant->text_decoration_line);
|
||||
decoration_style = _gtk_css_text_decoration_style_value_get (style->font_variant->text_decoration_style);
|
||||
color = gtk_css_color_value_get_rgba (style->core->color);
|
||||
decoration_color = gtk_css_color_value_get_rgba (style->font_variant->text_decoration_color
|
||||
? style->font_variant->text_decoration_color
|
||||
: style->core->color);
|
||||
|
||||
if (decoration_line & GTK_CSS_TEXT_DECORATION_LINE_UNDERLINE)
|
||||
{
|
||||
attrs = add_pango_attr (attrs, pango_attr_underline_new (get_pango_underline_from_style (decoration_style)));
|
||||
if (!gdk_rgba_equal (color, decoration_color))
|
||||
attrs = add_pango_attr (attrs, pango_attr_underline_color_new (decoration_color->red * 65535. + 0.5,
|
||||
decoration_color->green * 65535. + 0.5,
|
||||
decoration_color->blue * 65535. + 0.5));
|
||||
}
|
||||
if (decoration_line & GTK_CSS_TEXT_DECORATION_LINE_OVERLINE)
|
||||
{
|
||||
attrs = add_pango_attr (attrs, pango_attr_overline_new (get_pango_overline_from_style (decoration_style)));
|
||||
if (!gdk_rgba_equal (color, decoration_color))
|
||||
attrs = add_pango_attr (attrs, pango_attr_overline_color_new (decoration_color->red * 65535. + 0.5,
|
||||
decoration_color->green * 65535. + 0.5,
|
||||
decoration_color->blue * 65535. + 0.5));
|
||||
}
|
||||
if (decoration_line & GTK_CSS_TEXT_DECORATION_LINE_LINE_THROUGH)
|
||||
{
|
||||
attrs = add_pango_attr (attrs, pango_attr_strikethrough_new (TRUE));
|
||||
if (!gdk_rgba_equal (color, decoration_color))
|
||||
attrs = add_pango_attr (attrs, pango_attr_strikethrough_color_new (decoration_color->red * 65535. + 0.5,
|
||||
decoration_color->green * 65535. + 0.5,
|
||||
decoration_color->blue * 65535. + 0.5));
|
||||
}
|
||||
|
||||
/* letter-spacing */
|
||||
letter_spacing = _gtk_css_number_value_get (style->font->letter_spacing, 100);
|
||||
if (letter_spacing != 0)
|
||||
{
|
||||
attrs = add_pango_attr (attrs, pango_attr_letter_spacing_new (letter_spacing * PANGO_SCALE));
|
||||
}
|
||||
|
||||
/* OpenType features */
|
||||
|
||||
s = NULL;
|
||||
GString *s = NULL;
|
||||
|
||||
switch (_gtk_css_font_kerning_value_get (style->font_variant->font_kerning))
|
||||
{
|
||||
@ -635,10 +585,71 @@ gtk_css_style_get_pango_attributes (GtkCssStyle *style)
|
||||
}
|
||||
|
||||
if (s)
|
||||
return g_string_free (s, FALSE);
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
PangoAttrList *
|
||||
gtk_css_style_get_pango_attributes (GtkCssStyle *style)
|
||||
{
|
||||
PangoAttrList *attrs = NULL;
|
||||
GtkTextDecorationLine decoration_line;
|
||||
GtkTextDecorationStyle decoration_style;
|
||||
const GdkRGBA *color;
|
||||
const GdkRGBA *decoration_color;
|
||||
int letter_spacing;
|
||||
|
||||
/* text-decoration */
|
||||
decoration_line = _gtk_css_text_decoration_line_value_get (style->font_variant->text_decoration_line);
|
||||
decoration_style = _gtk_css_text_decoration_style_value_get (style->font_variant->text_decoration_style);
|
||||
color = gtk_css_color_value_get_rgba (style->core->color);
|
||||
decoration_color = gtk_css_color_value_get_rgba (style->font_variant->text_decoration_color
|
||||
? style->font_variant->text_decoration_color
|
||||
: style->core->color);
|
||||
|
||||
if (decoration_line & GTK_CSS_TEXT_DECORATION_LINE_UNDERLINE)
|
||||
{
|
||||
attrs = add_pango_attr (attrs, pango_attr_font_features_new (s->str));
|
||||
g_string_free (s, TRUE);
|
||||
attrs = add_pango_attr (attrs, pango_attr_underline_new (get_pango_underline_from_style (decoration_style)));
|
||||
if (!gdk_rgba_equal (color, decoration_color))
|
||||
attrs = add_pango_attr (attrs, pango_attr_underline_color_new (decoration_color->red * 65535. + 0.5,
|
||||
decoration_color->green * 65535. + 0.5,
|
||||
decoration_color->blue * 65535. + 0.5));
|
||||
}
|
||||
if (decoration_line & GTK_CSS_TEXT_DECORATION_LINE_OVERLINE)
|
||||
{
|
||||
attrs = add_pango_attr (attrs, pango_attr_overline_new (get_pango_overline_from_style (decoration_style)));
|
||||
if (!gdk_rgba_equal (color, decoration_color))
|
||||
attrs = add_pango_attr (attrs, pango_attr_overline_color_new (decoration_color->red * 65535. + 0.5,
|
||||
decoration_color->green * 65535. + 0.5,
|
||||
decoration_color->blue * 65535. + 0.5));
|
||||
}
|
||||
if (decoration_line & GTK_CSS_TEXT_DECORATION_LINE_LINE_THROUGH)
|
||||
{
|
||||
attrs = add_pango_attr (attrs, pango_attr_strikethrough_new (TRUE));
|
||||
if (!gdk_rgba_equal (color, decoration_color))
|
||||
attrs = add_pango_attr (attrs, pango_attr_strikethrough_color_new (decoration_color->red * 65535. + 0.5,
|
||||
decoration_color->green * 65535. + 0.5,
|
||||
decoration_color->blue * 65535. + 0.5));
|
||||
}
|
||||
|
||||
/* letter-spacing */
|
||||
letter_spacing = _gtk_css_number_value_get (style->font->letter_spacing, 100);
|
||||
if (letter_spacing != 0)
|
||||
{
|
||||
attrs = add_pango_attr (attrs, pango_attr_letter_spacing_new (letter_spacing * PANGO_SCALE));
|
||||
}
|
||||
|
||||
/* OpenType features */
|
||||
{
|
||||
char *font_features = gtk_css_style_compute_font_features (style);
|
||||
|
||||
if (font_features)
|
||||
{
|
||||
attrs = add_pango_attr (attrs, pango_attr_font_features_new (font_features));
|
||||
g_free (font_features);
|
||||
}
|
||||
}
|
||||
|
||||
return attrs;
|
||||
}
|
||||
|
@ -254,17 +254,17 @@ GtkCssValue * gtk_css_style_get_value (GtkCssStyle
|
||||
GtkCssSection * gtk_css_style_get_section (GtkCssStyle *style,
|
||||
guint id) G_GNUC_PURE;
|
||||
gboolean gtk_css_style_is_static (GtkCssStyle *style) G_GNUC_PURE;
|
||||
GtkCssStaticStyle * gtk_css_style_get_static_style (GtkCssStyle *style);
|
||||
|
||||
char * gtk_css_style_to_string (GtkCssStyle *style);
|
||||
gboolean gtk_css_style_print (GtkCssStyle *style,
|
||||
GString *string,
|
||||
guint indent,
|
||||
gboolean skip_initial);
|
||||
|
||||
char * gtk_css_style_compute_font_features (GtkCssStyle *style);
|
||||
PangoAttrList * gtk_css_style_get_pango_attributes (GtkCssStyle *style);
|
||||
|
||||
PangoFontDescription * gtk_css_style_get_pango_font (GtkCssStyle *style);
|
||||
GtkCssStaticStyle * gtk_css_style_get_static_style (GtkCssStyle *style);
|
||||
|
||||
|
||||
GtkCssValues *gtk_css_values_new (GtkCssValuesType type);
|
||||
GtkCssValues *gtk_css_values_ref (GtkCssValues *values);
|
||||
|
@ -945,11 +945,15 @@ gtk_editable_set_enable_undo (GtkEditable *editable,
|
||||
* @object_class: a `GObjectClass`
|
||||
* @first_prop: property ID to use for the first property
|
||||
*
|
||||
* Installs the `GtkEditable` properties for @class.
|
||||
* Overrides the `GtkEditable` properties for @class.
|
||||
*
|
||||
* This is a helper function that should be called in class_init,
|
||||
* after installing your own properties.
|
||||
*
|
||||
* Note that your class must have "text", "cursor-position",
|
||||
* "selection-bound", "editable", "width-chars", "max-width-chars",
|
||||
* "xalign" and "enable-undo" properties for this function to work.
|
||||
*
|
||||
* To handle the properties in your set_property and get_property
|
||||
* functions, you can either use [func@Gtk.Editable.delegate_set_property]
|
||||
* and [func@Gtk.Editable.delegate_get_property] (if you are using
|
||||
|
@ -461,6 +461,16 @@ gtk_font_button_activate (GtkFontButton *self)
|
||||
gtk_widget_activate (self->button);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_font_button_unrealize (GtkWidget *widget)
|
||||
{
|
||||
GtkFontButton *font_button = GTK_FONT_BUTTON (widget);
|
||||
|
||||
g_clear_pointer ((GtkWindow **) &font_button->font_dialog, gtk_window_destroy);
|
||||
|
||||
GTK_WIDGET_CLASS (gtk_font_button_parent_class)->unrealize (widget);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_font_button_class_init (GtkFontButtonClass *klass)
|
||||
{
|
||||
@ -476,6 +486,7 @@ gtk_font_button_class_init (GtkFontButtonClass *klass)
|
||||
|
||||
widget_class->grab_focus = gtk_widget_grab_focus_child;
|
||||
widget_class->focus = gtk_widget_focus_child;
|
||||
widget_class->unrealize = gtk_font_button_unrealize;
|
||||
|
||||
klass->font_set = NULL;
|
||||
klass->activate = gtk_font_button_activate;
|
||||
@ -628,9 +639,6 @@ gtk_font_button_finalize (GObject *object)
|
||||
{
|
||||
GtkFontButton *font_button = GTK_FONT_BUTTON (object);
|
||||
|
||||
if (font_button->font_dialog != NULL)
|
||||
gtk_window_destroy (GTK_WINDOW (font_button->font_dialog));
|
||||
|
||||
g_free (font_button->title);
|
||||
|
||||
clear_font_data (font_button);
|
||||
@ -968,6 +976,7 @@ gtk_font_button_clicked (GtkButton *button,
|
||||
font_button->font_dialog = gtk_font_chooser_dialog_new (font_button->title, NULL);
|
||||
gtk_window_set_hide_on_close (GTK_WINDOW (font_button->font_dialog), TRUE);
|
||||
gtk_window_set_modal (GTK_WINDOW (font_button->font_dialog), font_button->modal);
|
||||
gtk_window_set_display (GTK_WINDOW (font_button->font_dialog), gtk_widget_get_display (GTK_WIDGET (button)));
|
||||
|
||||
font_dialog = GTK_FONT_CHOOSER (font_button->font_dialog);
|
||||
|
||||
|
@ -262,6 +262,12 @@ attribute_from_text (GtkBuilder *builder,
|
||||
if (gtk_builder_value_from_string_type (builder, PANGO_TYPE_TEXT_TRANSFORM, value, &val, error))
|
||||
attribute = pango_attr_text_transform_new (g_value_get_enum (&val));
|
||||
break;
|
||||
#endif
|
||||
#if PANGO_VERSION_CHECK(1, 49, 1)
|
||||
case PANGO_ATTR_WORD:
|
||||
case PANGO_ATTR_SENTENCE:
|
||||
case PANGO_ATTR_BASELINE_SHIFT:
|
||||
case PANGO_ATTR_FONT_SCALE:
|
||||
#endif
|
||||
case PANGO_ATTR_INVALID:
|
||||
default:
|
||||
|
@ -20,31 +20,16 @@
|
||||
#include "gtkstylecontextprivate.h"
|
||||
|
||||
#include <gdk/gdk.h>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
#include <gobject/gvaluecollector.h>
|
||||
|
||||
#include "gtkcsscolorvalueprivate.h"
|
||||
#include "gtkcssenumvalueprivate.h"
|
||||
#include "gtkcssimagevalueprivate.h"
|
||||
#include "gtkcssnodedeclarationprivate.h"
|
||||
#include "gtkcssnumbervalueprivate.h"
|
||||
#include "gtkcsscolorvalueprivate.h"
|
||||
#include "gtkcsscolorvalueprivate.h"
|
||||
#include "gtkcssstylepropertyprivate.h"
|
||||
#include "gtkcsstransientnodeprivate.h"
|
||||
#include "gtkcsswidgetnodeprivate.h"
|
||||
#include "gtkdebug.h"
|
||||
#include "gtkintl.h"
|
||||
#include "gtkprivate.h"
|
||||
#include "gtkrenderbackgroundprivate.h"
|
||||
#include "gtkrendericonprivate.h"
|
||||
#include "gtksettings.h"
|
||||
#include "gtksettingsprivate.h"
|
||||
#include "gtkstylecascadeprivate.h"
|
||||
#include "gtkstyleproviderprivate.h"
|
||||
#include "gtktypebuiltins.h"
|
||||
#include "gtkwidgetprivate.h"
|
||||
#include "gtksnapshot.h"
|
||||
|
||||
|
||||
/**
|
||||
|
@ -4713,6 +4713,12 @@ insert_tags_for_attributes (GtkTextBuffer *buffer,
|
||||
|
||||
#if PANGO_VERSION_CHECK(1, 49, 0)
|
||||
case PANGO_ATTR_TEXT_TRANSFORM:
|
||||
#endif
|
||||
#if PANGO_VERSION_CHECK(1, 49, 1)
|
||||
case PANGO_ATTR_WORD:
|
||||
case PANGO_ATTR_SENTENCE:
|
||||
case PANGO_ATTR_BASELINE_SHIFT:
|
||||
case PANGO_ATTR_FONT_SCALE:
|
||||
break;
|
||||
#endif
|
||||
|
||||
|
@ -57,6 +57,7 @@
|
||||
#include "gtknative.h"
|
||||
#include "gtkwidgetprivate.h"
|
||||
#include "gtkjoinedmenuprivate.h"
|
||||
#include "gtkcssenumvalueprivate.h"
|
||||
|
||||
/**
|
||||
* GtkTextView:
|
||||
@ -4990,6 +4991,7 @@ gtk_text_view_css_changed (GtkWidget *widget,
|
||||
|
||||
if ((change == NULL ||
|
||||
gtk_css_style_change_affects (change, GTK_CSS_AFFECTS_TEXT |
|
||||
GTK_CSS_AFFECTS_TEXT_ATTRS |
|
||||
GTK_CSS_AFFECTS_BACKGROUND |
|
||||
GTK_CSS_AFFECTS_CONTENT)) &&
|
||||
priv->layout && priv->layout->default_style)
|
||||
@ -7633,6 +7635,29 @@ gtk_text_view_end_selection_drag (GtkTextView *text_view)
|
||||
* Layout utils
|
||||
*/
|
||||
|
||||
static PangoUnderline
|
||||
get_pango_underline_from_style (GtkTextDecorationStyle style)
|
||||
{
|
||||
switch (style)
|
||||
{
|
||||
case GTK_CSS_TEXT_DECORATION_STYLE_DOUBLE:
|
||||
return PANGO_UNDERLINE_DOUBLE;
|
||||
case GTK_CSS_TEXT_DECORATION_STYLE_WAVY:
|
||||
return PANGO_UNDERLINE_ERROR;
|
||||
case GTK_CSS_TEXT_DECORATION_STYLE_SOLID:
|
||||
default:
|
||||
return PANGO_UNDERLINE_SINGLE;
|
||||
}
|
||||
|
||||
g_return_val_if_reached (PANGO_UNDERLINE_SINGLE);
|
||||
}
|
||||
|
||||
static PangoOverline
|
||||
get_pango_overline_from_style (GtkTextDecorationStyle style)
|
||||
{
|
||||
return PANGO_OVERLINE_SINGLE;
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_text_view_set_attributes_from_style (GtkTextView *text_view,
|
||||
GtkTextAttributes *values)
|
||||
@ -7640,6 +7665,9 @@ gtk_text_view_set_attributes_from_style (GtkTextView *text_view,
|
||||
GtkCssStyle *style;
|
||||
const GdkRGBA black = { 0, };
|
||||
const GdkRGBA *color;
|
||||
const GdkRGBA *decoration_color;
|
||||
GtkTextDecorationLine decoration_line;
|
||||
GtkTextDecorationStyle decoration_style;
|
||||
|
||||
if (!values->appearance.bg_rgba)
|
||||
values->appearance.bg_rgba = gdk_rgba_copy (&black);
|
||||
@ -7657,6 +7685,69 @@ gtk_text_view_set_attributes_from_style (GtkTextView *text_view,
|
||||
pango_font_description_free (values->font);
|
||||
|
||||
values->font = gtk_css_style_get_pango_font (style);
|
||||
|
||||
values->letter_spacing = _gtk_css_number_value_get (style->font->letter_spacing, 100) * PANGO_SCALE;
|
||||
|
||||
/* text-decoration */
|
||||
|
||||
decoration_line = _gtk_css_text_decoration_line_value_get (style->font_variant->text_decoration_line);
|
||||
decoration_style = _gtk_css_text_decoration_style_value_get (style->font_variant->text_decoration_style);
|
||||
color = gtk_css_color_value_get_rgba (style->core->color);
|
||||
decoration_color = gtk_css_color_value_get_rgba (style->font_variant->text_decoration_color
|
||||
? style->font_variant->text_decoration_color
|
||||
: style->core->color);
|
||||
|
||||
if (decoration_line & GTK_CSS_TEXT_DECORATION_LINE_UNDERLINE)
|
||||
{
|
||||
values->appearance.underline = get_pango_underline_from_style (decoration_style);
|
||||
if (values->appearance.underline_rgba)
|
||||
*values->appearance.underline_rgba = *decoration_color;
|
||||
else
|
||||
values->appearance.underline_rgba = gdk_rgba_copy (decoration_color);
|
||||
}
|
||||
else
|
||||
{
|
||||
values->appearance.underline = PANGO_UNDERLINE_NONE;
|
||||
gdk_rgba_free (values->appearance.underline_rgba);
|
||||
values->appearance.underline_rgba = NULL;
|
||||
}
|
||||
|
||||
if (decoration_line & GTK_CSS_TEXT_DECORATION_LINE_OVERLINE)
|
||||
{
|
||||
values->appearance.overline = get_pango_overline_from_style (decoration_style);
|
||||
if (values->appearance.overline_rgba)
|
||||
*values->appearance.overline_rgba = *decoration_color;
|
||||
else
|
||||
values->appearance.overline_rgba = gdk_rgba_copy (decoration_color);
|
||||
}
|
||||
else
|
||||
{
|
||||
values->appearance.overline = PANGO_OVERLINE_NONE;
|
||||
gdk_rgba_free (values->appearance.overline_rgba);
|
||||
values->appearance.overline_rgba = NULL;
|
||||
}
|
||||
|
||||
if (decoration_line & GTK_CSS_TEXT_DECORATION_LINE_LINE_THROUGH)
|
||||
{
|
||||
values->appearance.strikethrough = TRUE;
|
||||
if (values->appearance.strikethrough_rgba)
|
||||
*values->appearance.strikethrough_rgba = *decoration_color;
|
||||
else
|
||||
values->appearance.strikethrough_rgba = gdk_rgba_copy (decoration_color);
|
||||
}
|
||||
else
|
||||
{
|
||||
values->appearance.strikethrough = FALSE;
|
||||
gdk_rgba_free (values->appearance.strikethrough_rgba);
|
||||
values->appearance.strikethrough_rgba = NULL;
|
||||
}
|
||||
|
||||
/* letter-spacing */
|
||||
values->letter_spacing = _gtk_css_number_value_get (style->font->letter_spacing, 100) * PANGO_SCALE;
|
||||
|
||||
/* OpenType features */
|
||||
g_free (values->font_features);
|
||||
values->font_features = gtk_css_style_compute_font_features (style);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -5796,16 +5796,14 @@ gtk_window_activate_menubar (GtkWidget *widget,
|
||||
GtkWidget *focus;
|
||||
GtkWidget *first;
|
||||
|
||||
focus = gtk_window_get_focus (window);
|
||||
|
||||
if (priv->title_box != NULL &&
|
||||
(focus == NULL || !gtk_widget_is_ancestor (focus, priv->title_box)) &&
|
||||
gtk_widget_child_focus (priv->title_box, GTK_DIR_TAB_FORWARD))
|
||||
return TRUE;
|
||||
|
||||
tmp_menubars = gtk_popover_menu_bar_get_viewable_menu_bars (window);
|
||||
if (tmp_menubars == NULL)
|
||||
return FALSE;
|
||||
{
|
||||
focus = gtk_window_get_focus (window);
|
||||
return priv->title_box != NULL &&
|
||||
(focus == NULL || !gtk_widget_is_ancestor (focus, priv->title_box)) &&
|
||||
gtk_widget_child_focus (priv->title_box, GTK_DIR_TAB_FORWARD);
|
||||
}
|
||||
|
||||
menubars = g_ptr_array_sized_new (g_list_length (tmp_menubars));;
|
||||
for (l = tmp_menubars; l; l = l->next)
|
||||
|
@ -343,7 +343,7 @@ perform_titlebar_action (GtkWindowHandle *self,
|
||||
gesture = GDK_TITLEBAR_GESTURE_RIGHT_CLICK;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (gdk_toplevel_titlebar_gesture (GDK_TOPLEVEL (surface), gesture))
|
||||
|
@ -835,6 +835,7 @@ gtk_gresources_xml = configure_file(output: 'gtk.gresources.xml',
|
||||
command: [
|
||||
gen_gtk_gresources_xml,
|
||||
meson.current_source_dir(),
|
||||
host_machine.endian(),
|
||||
'@OUTPUT@'
|
||||
],
|
||||
)
|
||||
|
@ -49,17 +49,9 @@ gstgl_dep = dependency('gstreamer-gl-1.0', version: '>= 1.12.3',
|
||||
if gstplayer_dep.found() and gstgl_dep.found()
|
||||
extra_win_cflags = []
|
||||
|
||||
if host_machine.system() == 'windows'
|
||||
new_gst_gl_display_code = \
|
||||
'''#include <gst/gl/gstgldisplay.h>
|
||||
int main (int a, char ** g) {
|
||||
GstGLDisplay *d = gst_gl_display_new_with_type (GST_GL_DISPLAY_TYPE_WIN32);
|
||||
return 0;
|
||||
}'''
|
||||
if cc.links(new_gst_gl_display_code, dependencies : gstgl_dep)
|
||||
message('libgstgl has gst_gl_display_new_with_type()')
|
||||
extra_win_cflags += '-DHAVE_GST_GL_DISPLAY_NEW_WITH_TYPE'
|
||||
endif
|
||||
if host_machine.system() == 'windows' and gstgl_dep.version().version_compare('>=1.19.1')
|
||||
message('libgstgl has gst_gl_display_new_with_type()')
|
||||
extra_win_cflags += '-DHAVE_GST_GL_DISPLAY_NEW_WITH_TYPE'
|
||||
endif
|
||||
|
||||
media_backends += 'gstreamer'
|
||||
|
@ -1,7 +1,7 @@
|
||||
# n_sequences: 4874
|
||||
# n_sequences: 4884
|
||||
# max_seq_len: 5
|
||||
# n_index_size: 30
|
||||
# data_size: 16447
|
||||
# data_size: 16477
|
||||
# n_chars: 1241
|
||||
<U7ae> <U7e9> : "ΐ" # U390
|
||||
<U7ae> <U7f5> : "ΰ" # U3b0
|
||||
@ -1959,6 +1959,7 @@
|
||||
<Uff20> <U47> <U2e> : "Ġ" # U120
|
||||
<Uff20> <U47> <U54> : ">" # U3e
|
||||
<Uff20> <U47> <U55> : "Ğ" # U11e
|
||||
<Uff20> <U47> <U75> : "Ğ" # U11e
|
||||
<Uff20> <U47> <U1a2> : "Ğ" # U11e
|
||||
<Uff20> <U48> <U2c> : "Ḩ" # U1e28
|
||||
<Uff20> <U49> <U22> : "Ï" # Ucf
|
||||
@ -2512,6 +2513,7 @@
|
||||
<Uff20> <U67> <U2e> : "ġ" # U121
|
||||
<Uff20> <U67> <U55> : "ğ" # U11f
|
||||
<Uff20> <U67> <U74> : ">" # U3e
|
||||
<Uff20> <U67> <U75> : "ğ" # U11f
|
||||
<Uff20> <U67> <U1a2> : "ğ" # U11f
|
||||
<Uff20> <U68> <U2c> : "ḩ" # U1e29
|
||||
<Uff20> <U69> <U22> : "ï" # Uef
|
||||
@ -2611,11 +2613,19 @@
|
||||
<Uff20> <U75> <U3b> : "ų" # U173
|
||||
<Uff20> <U75> <U3e> : "û" # Ufb
|
||||
<Uff20> <U75> <U41> : "Ă" # U102
|
||||
<Uff20> <U75> <U45> : "Ĕ" # U114
|
||||
<Uff20> <U75> <U47> : "Ğ" # U11e
|
||||
<Uff20> <U75> <U49> : "Ĭ" # U12c
|
||||
<Uff20> <U75> <U4f> : "Ŏ" # U14e
|
||||
<Uff20> <U75> <U55> : "Ŭ" # U16c
|
||||
<Uff20> <U75> <U5e> : "û" # Ufb
|
||||
<Uff20> <U75> <U5f> : "ū" # U16b
|
||||
<Uff20> <U75> <U60> : "ù" # Uf9
|
||||
<Uff20> <U75> <U61> : "ă" # U103
|
||||
<Uff20> <U75> <U65> : "ĕ" # U115
|
||||
<Uff20> <U75> <U67> : "ğ" # U11f
|
||||
<Uff20> <U75> <U69> : "ĭ" # U12d
|
||||
<Uff20> <U75> <U6f> : "ŏ" # U14f
|
||||
<Uff20> <U75> <U75> : "ŭ" # U16d
|
||||
<Uff20> <U75> <U7e> : "ũ" # U169
|
||||
<Uff20> <U75> <Ua8> : "ü" # Ufc
|
||||
|
@ -44,6 +44,10 @@ print_attribute (PangoAttribute *attr, GString *string)
|
||||
#if PANGO_VERSION_CHECK(1, 49, 0)
|
||||
case PANGO_ATTR_ABSOLUTE_LINE_HEIGHT:
|
||||
case PANGO_ATTR_TEXT_TRANSFORM:
|
||||
case PANGO_ATTR_WORD:
|
||||
case PANGO_ATTR_SENTENCE:
|
||||
case PANGO_ATTR_BASELINE_SHIFT:
|
||||
case PANGO_ATTR_FONT_SCALE:
|
||||
#endif
|
||||
g_string_append_printf (string, "%d", ((PangoAttrInt *)attr)->value);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user