Compare commits
358 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7c0a9fc02b | |||
| 7b22c44b39 | |||
| 2e744260e0 | |||
| 7190a31b5f | |||
| 729f007379 | |||
| b75b359f19 | |||
| d7de720275 | |||
| ef86e46238 | |||
| 0a46baeb56 | |||
| fd3a6299ce | |||
| 803b147483 | |||
| 1f44319588 | |||
| 505478bc59 | |||
| de7833b6a0 | |||
| 3a1b2083d6 | |||
| 3e996f61ae | |||
| 56eac4f846 | |||
| 61dcb685b2 | |||
| bd0d75e237 | |||
| 179fc68355 | |||
| 9828756e05 | |||
| 40f2b49c0d | |||
| 8e81cbef2c | |||
| 47d572834b | |||
| 46601325f1 | |||
| 0abc7a3361 | |||
| 1e01b9079d | |||
| be688c46f2 | |||
| ab163f168d | |||
| e937f7eac8 | |||
| b84945e43f | |||
| b3dba1dca6 | |||
| 060cfc713f | |||
| 6be575992f | |||
| 4bec75c66b | |||
| 8e4cc59a7a | |||
| c17227966d | |||
| a2ce6268b2 | |||
| 5ab14ff7f6 | |||
| 8482b956d6 | |||
| 562c7b1ff3 | |||
| 8099de22f9 | |||
| a4c3bee4a1 | |||
| 5afa985e85 | |||
| e600a07237 | |||
| 8fa58c2e17 | |||
| d436c2e839 | |||
| b37634dcd5 | |||
| 2d636fdda0 | |||
| 28095641c5 | |||
| d58b06ceeb | |||
| 82b4c34eca | |||
| ee47ddf5fd | |||
| f32ae2964a | |||
| eae5eaeb21 | |||
| 09fd2d61c4 | |||
| 86d7ab7c50 | |||
| 88be92ceee | |||
| 04c4b387a0 | |||
| 7551f85d4c | |||
| 184886f893 | |||
| 36ef94b002 | |||
| 831ebe3ef2 | |||
| 76b8676955 | |||
| b3243132a0 | |||
| de461712a1 | |||
| dd7f52c59a | |||
| 3f1bc740e4 | |||
| 9128ad105b | |||
| 745cbc6c91 | |||
| b635736ac2 | |||
| ba081bf119 | |||
| 3003f37e9d | |||
| c1e05e7c52 | |||
| 6b475aacd2 | |||
| bc4969ec42 | |||
| 1c7daece7a | |||
| 37a8c138f9 | |||
| 34d547a2aa | |||
| 163c04c101 | |||
| f2284ff40f | |||
| eded9459df | |||
| 8fd1530848 | |||
| 77f9efa747 | |||
| 109ec523cb | |||
| 5cc5022a8f | |||
| 3c769bb11d | |||
| 33b07e4825 | |||
| 714e5c72f6 | |||
| 153c6424d3 | |||
| b76e514322 | |||
| 1501aa0603 | |||
| cf5a173a4f | |||
| 2b8c3731c1 | |||
| ade2f1030a | |||
| 4f12df5f1c | |||
| 9941799449 | |||
| 5a938ad83d | |||
| 835c807d7a | |||
| 2ef72442ec | |||
| 3bc2bf40a8 | |||
| cd4c0b6127 | |||
| fa79e8651e | |||
| 9a29487e25 | |||
| fceff93994 | |||
| acd8b08d35 | |||
| 2abee57421 | |||
| 437f902c9d | |||
| a7befc647e | |||
| 121e61cf01 | |||
| f7ac13b78f | |||
| c2ae73f247 | |||
| 4b0b6100d6 | |||
| 2c9bf55eea | |||
| 1d11d42aa0 | |||
| 361407201b | |||
| 50c29398e6 | |||
| dff8a9eb46 | |||
| 1bb4e660fd | |||
| ded6ec6424 | |||
| 47e49acc7d | |||
| 0996b178dc | |||
| 4befd13744 | |||
| bb1463871c | |||
| 12a9164414 | |||
| 108fe033aa | |||
| 9de2b4b0e1 | |||
| ee056fd8bd | |||
| bc4f71a107 | |||
| 125442297f | |||
| eec92b40ea | |||
| d392f6f2a4 | |||
| 41a9c46ec8 | |||
| 0530aeec17 | |||
| 22741a74ff | |||
| 23331c1919 | |||
| d266bd62de | |||
| 57c95937b1 | |||
| 1d86086434 | |||
| e2f26b0d9a | |||
| 7816fc2b83 | |||
| 04d802f7f4 | |||
| 994cc32d7b | |||
| f14ca28c4e | |||
| da9d32e472 | |||
| 08d6db4ab6 | |||
| 6891f40110 | |||
| cdbf24c3af | |||
| b30715da6a | |||
| 5e9883453d | |||
| b97b95b0c7 | |||
| dd0a854bbb | |||
| b8d0ad8643 | |||
| 65d57877a8 | |||
| afc73c38ce | |||
| f4e1c271ea | |||
| 8e42239439 | |||
| 5b4ac5456e | |||
| f1db73379e | |||
| 20918dbe8e | |||
| b5ec20db88 | |||
| d347df431d | |||
| 25e6988d95 | |||
| a7f05b8d91 | |||
| fe690265eb | |||
| f45ea3fa90 | |||
| bdc28cd870 | |||
| c648c1f235 | |||
| 8a92ee03ea | |||
| e3c72f8f09 | |||
| 1f472104ad | |||
| 4b41580041 | |||
| c136f84584 | |||
| 80de00a248 | |||
| 50a7e59623 | |||
| 92ca3a3419 | |||
| 8203d9cc40 | |||
| abc9b403f8 | |||
| b9ad3172a4 | |||
| 0d7fcdda28 | |||
| 75f9b83b1e | |||
| 61e980bfb6 | |||
| ebda736a09 | |||
| d4ddfdc265 | |||
| f8bb206034 | |||
| 87f92a93d3 | |||
| e49e084f4c | |||
| 995daa1e29 | |||
| d34936c1ea | |||
| a59889a274 | |||
| bfb054a023 | |||
| e940704018 | |||
| 429c7fc039 | |||
| 0d6e4f7a6e | |||
| 1f9eb5c64c | |||
| 056a073061 | |||
| e46522e4b5 | |||
| 7ac7919697 | |||
| 5d9799d4e3 | |||
| f95943a752 | |||
| ef88e9ffcc | |||
| 49613dca8e | |||
| a651a0ce69 | |||
| 08d59d3f68 | |||
| afff39c503 | |||
| a2897e1868 | |||
| 15172ebdb0 | |||
| 9ac4a7d99f | |||
| 8157717e03 | |||
| 9052f6dafe | |||
| 292576f312 | |||
| 2285382074 | |||
| 526f1e315b | |||
| 877a7f98ca | |||
| 73b14a3c3a | |||
| 40c0826921 | |||
| 27b9b2e76c | |||
| 04c4d293a7 | |||
| 033791b374 | |||
| 95ee5ff424 | |||
| 65d29e00c7 | |||
| 3b2cd972d5 | |||
| 428ec29598 | |||
| bfe5b0d1b7 | |||
| 82b855cc4b | |||
| 0db504edde | |||
| 5ed3ad6cc8 | |||
| 27c4c19333 | |||
| 74a7f73239 | |||
| a047b7d6d1 | |||
| a76f37a501 | |||
| d6a0948182 | |||
| 7215c74933 | |||
| e4be785c6c | |||
| 18779b9d67 | |||
| 9b056f57f7 | |||
| d6c753bde7 | |||
| d69a943661 | |||
| 0ececc7109 | |||
| 3cc0870084 | |||
| 2229d7f66c | |||
| ed7619ec16 | |||
| 7ed06480cf | |||
| f9db651f32 | |||
| c264254d4b | |||
| 6af89e9034 | |||
| 1bdc8b9061 | |||
| c442f9f05a | |||
| 6cbd7e29dd | |||
| 6079033cde | |||
| d63afaf5ad | |||
| 7e089664fc | |||
| 06fbad0b26 | |||
| 2a3c3b4c6a | |||
| eb3933cffd | |||
| d1de9234c5 | |||
| 3e8260d528 | |||
| 192f515682 | |||
| 2543c9f5a3 | |||
| a745dbfc15 | |||
| 14be50839e | |||
| a85d9cda07 | |||
| 7d49f1e250 | |||
| 6fa2936956 | |||
| b81463e7d3 | |||
| b622745501 | |||
| 5379a4bf34 | |||
| b966f593a5 | |||
| 706a8f9784 | |||
| 2dc7e327ad | |||
| 7b151c3ef0 | |||
| 0af6630521 | |||
| 4b459a99be | |||
| e093ed7d67 | |||
| ddbea8feda | |||
| 6b5dff5667 | |||
| 53cd499621 | |||
| 30c5a6f79c | |||
| 4e1191550c | |||
| 3b1363d31a | |||
| 160e29ea95 | |||
| b9adad304e | |||
| ef17d716d7 | |||
| 8ec01772be | |||
| 4084b4c6c6 | |||
| c3cb8e0a79 | |||
| 19b5e5349e | |||
| f87923e09e | |||
| 05684f6c3c | |||
| 08193ecf1c | |||
| 8c9a827516 | |||
| 638987f359 | |||
| 8190f0c420 | |||
| f7de0bc9c8 | |||
| 08f2990eac | |||
| e6d46ec5ad | |||
| db6d7dccd8 | |||
| 4e8a5f2ec8 | |||
| 63e9414210 | |||
| 4751ac1ac8 | |||
| 9d56c56117 | |||
| 0d82faa239 | |||
| fb27724042 | |||
| 90141ef305 | |||
| bc05da8dc0 | |||
| bf3e1e5b40 | |||
| 0ae93c8cdc | |||
| f9813019a7 | |||
| 5e907ebd58 | |||
| fa5fa3a881 | |||
| 9b9cc2f947 | |||
| 80f5be8b13 | |||
| ec5b5e8aaa | |||
| 95463719ae | |||
| 041415e9b4 | |||
| abd5383d40 | |||
| c5dc0e2e4c | |||
| 88116712f6 | |||
| 7dfa41bbc4 | |||
| c09ff35df4 | |||
| d526bcc71b | |||
| 13d1e497f7 | |||
| 3eaae748d3 | |||
| 7f16067383 | |||
| 024e048c26 | |||
| c31c3848df | |||
| b0e0af1838 | |||
| 3785bf1f17 | |||
| 79fb5724f9 | |||
| 65b2ea1888 | |||
| 6309bd12ac | |||
| 7444a151b2 | |||
| ce9cc2db86 | |||
| e91b930648 | |||
| ed78fb1366 | |||
| 388f12b7d9 | |||
| 8ae415acff | |||
| d2cc9365fc | |||
| dcfb6e5ef5 | |||
| 75f96b83de | |||
| 66bba1493e | |||
| 1dde54b872 | |||
| c48a990778 | |||
| 23c425618e | |||
| d2a7ecf72c | |||
| f220a1e3c7 | |||
| ba63aa76ca | |||
| 72415eaa49 | |||
| d88f7c9459 | |||
| 425d8ad02a | |||
| ae9758b964 | |||
| 828a067b2b | |||
| bb24b350ac | |||
| dafb2b0361 | |||
| 30210c7087 | |||
| d8a795df0a | |||
| 1340ff2bc2 | |||
| eef1097c90 |
@@ -1,3 +1,7 @@
|
||||
include:
|
||||
- project: 'gnome/citemplates'
|
||||
file: 'flatpak/flatpak_ci_initiative.yml'
|
||||
|
||||
stages:
|
||||
- build
|
||||
- analysis
|
||||
@@ -149,6 +153,7 @@ msys2-mingw64:
|
||||
artifacts:
|
||||
paths:
|
||||
- "${APPID}-dev.flatpak"
|
||||
- 'repo.tar'
|
||||
expire_in: 1 day
|
||||
script:
|
||||
- bash -x ./.gitlab-ci/flatpak-build.sh "${APPID}"
|
||||
@@ -200,6 +205,24 @@ flatpak-master:icon-browser:
|
||||
variables:
|
||||
APPID: org.gtk.IconBrowser4
|
||||
|
||||
# Publish the demo apps to the GNOME Nightly repo
|
||||
# https://wiki.gnome.org/Apps/Nightly
|
||||
# https://gitlab.gnome.org/GNOME/Initiatives/-/wikis/DevOps-with-Flatpak
|
||||
nightly demo:
|
||||
extends: '.publish_nightly'
|
||||
dependencies: ['flatpak-master:demo']
|
||||
needs: ['flatpak-master:demo']
|
||||
|
||||
nightly factory:
|
||||
extends: '.publish_nightly'
|
||||
dependencies: ['flatpak-master:widget-factory']
|
||||
needs: ['flatpak-master:widget-factory']
|
||||
|
||||
nightly icon-browser:
|
||||
extends: '.publish_nightly'
|
||||
dependencies: ['flatpak-master:icon-browser']
|
||||
needs: ['flatpak-master:icon-browser']
|
||||
|
||||
static-scan:
|
||||
image: $FEDORA_IMAGE
|
||||
stage: analysis
|
||||
|
||||
@@ -40,3 +40,8 @@ flatpak build-bundle \
|
||||
${appid}-dev.flatpak \
|
||||
--runtime-repo=https://nightly.gnome.org/gnome-nightly.flatpakrepo \
|
||||
${appid}
|
||||
|
||||
# to be consumed by the nightly publish jobs
|
||||
if [[ $CI_COMMIT_BRANCH == master ]]; then
|
||||
tar cf repo.tar ${repodir}
|
||||
fi
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Overview of Changes in master
|
||||
Overview of Changes in 3.99.4
|
||||
=============================
|
||||
|
||||
* GtkColumnView:
|
||||
@@ -23,6 +23,7 @@ Overview of Changes in master
|
||||
|
||||
* GtkTextView:
|
||||
- Fix rendering and positioning of anchored children
|
||||
- Fix positioning of touch handles
|
||||
|
||||
* Constraints:
|
||||
- Fix loading constraints from ui files
|
||||
@@ -37,6 +38,7 @@ Overview of Changes in master
|
||||
- Add documentation for app and widget developers
|
||||
- Handle HIDDEN state changes by adding/removing elements
|
||||
- Support setting accessibility attributes in ui files
|
||||
- Make window controls accessible
|
||||
|
||||
* Introspection:
|
||||
- Add some missing annotations
|
||||
@@ -44,10 +46,12 @@ Overview of Changes in master
|
||||
* gdk:
|
||||
- Deliver events on flush
|
||||
- Drop the unused GdkPoint struct from the API
|
||||
- Improve popup autohide behavior
|
||||
|
||||
* Demos:
|
||||
- Add another constraints demo
|
||||
- Tweak various demos to improve consistency
|
||||
- Small accessibility improvements
|
||||
|
||||
* Tools:
|
||||
- Improve gtk4-builder-tool handling of various
|
||||
@@ -65,6 +69,12 @@ Overview of Changes in master
|
||||
- Fix the build with cups 2.2.12
|
||||
- Make cloudprint support build without warnings
|
||||
|
||||
* Broadway:
|
||||
- Support modifiers for scroll events
|
||||
|
||||
* Windows:
|
||||
- Improve IME support
|
||||
|
||||
* OS X:
|
||||
- Fix various input issues
|
||||
- Make GtkGLArea work (with the cairo backend)
|
||||
|
||||
@@ -36,7 +36,7 @@ struct _ConstraintEditorWindow
|
||||
G_DEFINE_TYPE(ConstraintEditorWindow, constraint_editor_window, GTK_TYPE_APPLICATION_WINDOW);
|
||||
|
||||
static GtkConstraintTarget *
|
||||
find_target (GListModel *model,
|
||||
find_target (GListModel *model,
|
||||
GtkConstraintTarget *orig)
|
||||
{
|
||||
const char *name;
|
||||
@@ -163,20 +163,30 @@ constraint_editor_window_load (ConstraintEditorWindow *self,
|
||||
GtkConstraint *clone;
|
||||
GtkConstraintTarget *target;
|
||||
GtkConstraintTarget *source;
|
||||
GtkConstraintAttribute source_attr;
|
||||
|
||||
item = g_list_model_get_item (list, i);
|
||||
constraint = GTK_CONSTRAINT (item);
|
||||
|
||||
target = gtk_constraint_get_target (constraint);
|
||||
source = gtk_constraint_get_source (constraint);
|
||||
clone = gtk_constraint_new (find_target (constraint_view_get_model (CONSTRAINT_VIEW (self->view)), target),
|
||||
source_attr = gtk_constraint_get_source_attribute (constraint);
|
||||
|
||||
if (source == NULL && source_attr == GTK_CONSTRAINT_ATTRIBUTE_NONE)
|
||||
clone = gtk_constraint_new_constant (find_target (constraint_view_get_model (CONSTRAINT_VIEW (self->view)), target),
|
||||
gtk_constraint_get_target_attribute (constraint),
|
||||
gtk_constraint_get_relation (constraint),
|
||||
find_target (constraint_view_get_model (CONSTRAINT_VIEW (self->view)), source),
|
||||
gtk_constraint_get_target_attribute (constraint),
|
||||
gtk_constraint_get_multiplier (constraint),
|
||||
gtk_constraint_get_constant (constraint),
|
||||
gtk_constraint_get_strength (constraint));
|
||||
else
|
||||
clone = gtk_constraint_new (find_target (constraint_view_get_model (CONSTRAINT_VIEW (self->view)), target),
|
||||
gtk_constraint_get_target_attribute (constraint),
|
||||
gtk_constraint_get_relation (constraint),
|
||||
find_target (constraint_view_get_model (CONSTRAINT_VIEW (self->view)), source),
|
||||
source_attr,
|
||||
gtk_constraint_get_multiplier (constraint),
|
||||
gtk_constraint_get_constant (constraint),
|
||||
gtk_constraint_get_strength (constraint));
|
||||
|
||||
constraint_view_add_constraint (CONSTRAINT_VIEW (self->view), clone);
|
||||
|
||||
@@ -300,7 +310,7 @@ save_response_cb (GtkNativeDialog *dialog,
|
||||
model = constraint_view_get_model (CONSTRAINT_VIEW (self->view));
|
||||
text = serialize_model (model);
|
||||
file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (dialog));
|
||||
g_file_replace_contents (file, text, -1,
|
||||
g_file_replace_contents (file, text, strlen (text),
|
||||
NULL, FALSE,
|
||||
G_FILE_CREATE_NONE,
|
||||
NULL,
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<template class="ConstraintEditorWindow" parent="GtkApplicationWindow">
|
||||
<style>
|
||||
<class name="devel"/>
|
||||
</style>
|
||||
<property name="title" translatable="yes">GTK Constraint Editor</property>
|
||||
<property name="default-width">1024</property>
|
||||
<property name="default-height">768</property>
|
||||
|
||||
@@ -142,6 +142,9 @@ get_target (GListModel *model,
|
||||
{
|
||||
int i;
|
||||
|
||||
if (id == NULL)
|
||||
return NULL;
|
||||
|
||||
if (strcmp ("super", id) == 0)
|
||||
return NULL;
|
||||
|
||||
@@ -212,6 +215,22 @@ get_relation_nick (GtkConstraintRelation relation)
|
||||
return nick;
|
||||
}
|
||||
|
||||
static const char *
|
||||
get_relation_display_name (GtkConstraintRelation relation)
|
||||
{
|
||||
switch (relation)
|
||||
{
|
||||
case GTK_CONSTRAINT_RELATION_LE:
|
||||
return "≤";
|
||||
case GTK_CONSTRAINT_RELATION_EQ:
|
||||
return "=";
|
||||
case GTK_CONSTRAINT_RELATION_GE:
|
||||
return "≥";
|
||||
default:
|
||||
return "?";
|
||||
}
|
||||
}
|
||||
|
||||
static GtkConstraintStrength
|
||||
get_strength (const char *id)
|
||||
{
|
||||
@@ -331,6 +350,7 @@ source_attr_changed (ConstraintEditor *editor)
|
||||
{
|
||||
gtk_widget_set_sensitive (editor->source, TRUE);
|
||||
gtk_widget_set_sensitive (editor->multiplier, TRUE);
|
||||
gtk_editable_set_text (GTK_EDITABLE (editor->multiplier), "1");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -347,7 +367,7 @@ constraint_editor_constraint_to_string (GtkConstraint *constraint)
|
||||
|
||||
name = get_target_name (gtk_constraint_get_target (constraint));
|
||||
attr = get_attr_nick (gtk_constraint_get_target_attribute (constraint));
|
||||
relation = get_relation_nick (gtk_constraint_get_relation (constraint));
|
||||
relation = get_relation_display_name (gtk_constraint_get_relation (constraint));
|
||||
|
||||
if (name == NULL)
|
||||
name = "[ ]";
|
||||
@@ -441,8 +461,12 @@ update_preview (ConstraintEditor *editor)
|
||||
static void
|
||||
update_button (ConstraintEditor *editor)
|
||||
{
|
||||
if (gtk_combo_box_get_active_id (GTK_COMBO_BOX (editor->target)) != NULL &&
|
||||
gtk_combo_box_get_active_id (GTK_COMBO_BOX (editor->source)) != NULL)
|
||||
const char *target = gtk_combo_box_get_active_id (GTK_COMBO_BOX (editor->target));
|
||||
const char *source = gtk_combo_box_get_active_id (GTK_COMBO_BOX (editor->source));
|
||||
const char *source_attr = gtk_combo_box_get_active_id (GTK_COMBO_BOX (editor->source_attr));
|
||||
|
||||
if (target &&
|
||||
(source || (source_attr && get_target_attr (source_attr) == GTK_CONSTRAINT_ATTRIBUTE_NONE)))
|
||||
gtk_widget_set_sensitive (editor->button, TRUE);
|
||||
else
|
||||
gtk_widget_set_sensitive (editor->button, FALSE);
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
<object class="GtkComboBoxText" id="source_attr">
|
||||
<signal name="changed" handler="update_preview" swapped="yes"/>
|
||||
<signal name="changed" handler="source_attr_changed" swapped="yes"/>
|
||||
<signal name="changed" handler="update_button" swapped="yes"/>
|
||||
<layout>
|
||||
<property name="column">2</property>
|
||||
<property name="row">3</property>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.20"/>
|
||||
<object class="GtkWindow" id="window">
|
||||
<property name="resizable">0</property>
|
||||
<property name="title">CSS Blend Modes</property>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Builder
|
||||
* #Keywords: GMenu, GtkPopoverMenuBar, GtkBuilder, GtkStatusBar, toolbar
|
||||
* #Keywords: GMenu, GtkPopoverMenuBar, GtkBuilder, GtkStatusBar, GtkShortcutController, toolbar
|
||||
*
|
||||
* Demonstrates a traditional interface, loaded from a XML description,
|
||||
* and shows how to connect actions to the menu items and toolbar buttons.
|
||||
|
||||
@@ -1,106 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow" id="window1">
|
||||
<property name="title" translatable="yes">Constraints — Builder</property>
|
||||
<property name="default-width">260</property>
|
||||
<child>
|
||||
<object class="ConstraintsGrid">
|
||||
<property name="layout-manager">
|
||||
<object class="GtkConstraintLayout">
|
||||
<constraints>
|
||||
<guide name="space"
|
||||
min-width="10" min-height="10"
|
||||
nat-width="100" nat-height="10"
|
||||
max-width="200" max-height="20"
|
||||
strength="strong"/>
|
||||
<constraint target="button1" target-attribute="width"
|
||||
relation="le"
|
||||
constant="200"
|
||||
strength="required"/>
|
||||
<constraint target="super" target-attribute="start"
|
||||
relation="eq"
|
||||
source="button1" source-attribute="start"
|
||||
constant="-8"
|
||||
strength="required"/>
|
||||
<constraint target="button1" target-attribute="width"
|
||||
relation="eq"
|
||||
source="button2" source-attribute="width"
|
||||
strength="required"/>
|
||||
<constraint target="button1" target-attribute="end"
|
||||
relation="eq"
|
||||
source="space" source-attribute="start"
|
||||
strength="required"/>
|
||||
<constraint target="space" target-attribute="end"
|
||||
relation="eq"
|
||||
source="button2" source-attribute="start"
|
||||
strength="required"/>
|
||||
<constraint target="super" target-attribute="end"
|
||||
relation="eq"
|
||||
source="button2" source-attribute="end"
|
||||
constant="8"
|
||||
strength="required"/>
|
||||
<constraint target="super" target-attribute="start"
|
||||
relation="eq"
|
||||
source="button3" source-attribute="start"
|
||||
constant="-8"
|
||||
strength="required"/>
|
||||
<constraint target="super" target-attribute="end"
|
||||
relation="eq"
|
||||
source="button3" source-attribute="end"
|
||||
constant="8"
|
||||
strength="required"/>
|
||||
<constraint target="super" target-attribute="top"
|
||||
relation="eq"
|
||||
source="button1" source-attribute="top"
|
||||
constant="-8"
|
||||
strength="required"/>
|
||||
<constraint target="super" target-attribute="top"
|
||||
relation="eq"
|
||||
source="button2" source-attribute="top"
|
||||
constant="-8"
|
||||
strength="required"/>
|
||||
<constraint target="button1" target-attribute="bottom"
|
||||
relation="eq"
|
||||
source="button3" source-attribute="top"
|
||||
constant="-12"
|
||||
strength="required"/>
|
||||
<constraint target="button2" target-attribute="bottom"
|
||||
relation="eq"
|
||||
source="button3" source-attribute="top"
|
||||
constant="-12"
|
||||
strength="required"/>
|
||||
<constraint target="button3" target-attribute="height"
|
||||
relation="eq"
|
||||
source="button1" source-attribute="height"
|
||||
strength="required"/>
|
||||
<constraint target="button3" target-attribute="height"
|
||||
relation="eq"
|
||||
source="button2" source-attribute="height"
|
||||
strength="required"/>
|
||||
<constraint target="super" target-attribute="bottom"
|
||||
relation="eq"
|
||||
source="button3" source-attribute="bottom"
|
||||
constant="8"
|
||||
strength="required"/>
|
||||
</constraints>
|
||||
</object>
|
||||
</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="button1">
|
||||
<property name="label">Child 1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button2">
|
||||
<property name="label">Child 2</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button3">
|
||||
<property name="label">Child 3</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -1,8 +1,10 @@
|
||||
/* Constraints/Builder
|
||||
*
|
||||
* GtkConstraintLayouts can be created in .ui files, and constraints can be
|
||||
* set up at that time as well, as this example demonstrates. It uses the
|
||||
* same setup as the “Simple” constraints demo.
|
||||
* GtkConstraintLayouts can be created in .ui files, and constraints can
|
||||
* be set up at that time as well, as this example demonstrates. It shows
|
||||
* various ways to do spacing and sizing with constraints.
|
||||
*
|
||||
* Make the window wider to see the rows react differently
|
||||
*/
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
@@ -43,7 +45,7 @@ constraints_grid_class_init (ConstraintsGridClass *klass)
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_constraints4 (GtkWidget *do_widget)
|
||||
do_constraints_builder (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window;
|
||||
|
||||
@@ -53,7 +55,7 @@ do_constraints4 (GtkWidget *do_widget)
|
||||
|
||||
g_type_ensure (constraints_grid_get_type ());
|
||||
|
||||
builder = gtk_builder_new_from_resource ("/constraints4/constraints.ui");
|
||||
builder = gtk_builder_new_from_resource ("/constraints_builder/constraints_builder.ui");
|
||||
|
||||
window = GTK_WIDGET (gtk_builder_get_object (builder, "window1"));
|
||||
gtk_window_set_display (GTK_WINDOW (window),
|
||||
@@ -0,0 +1,460 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow" id="window1">
|
||||
<property name="title" translatable="yes">Constraints — Builder</property>
|
||||
<property name="default-width">260</property>
|
||||
<child>
|
||||
<object class="ConstraintsGrid">
|
||||
<property name="halign">fill</property>
|
||||
<property name="valign">fill</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="layout-manager">
|
||||
<object class="GtkConstraintLayout">
|
||||
<constraints>
|
||||
<guide name="guide1" min-width="10" nat-width="200" strength="weak"/>
|
||||
<guide name="guide2" min-width="10" nat-width="200" strength="weak"/>
|
||||
<guide name="guide3" min-width="10" nat-width="200" strength="weak"/>
|
||||
<guide name="guide4" min-width="10" nat-width="200" strength="weak"/>
|
||||
<guide name="guide5" min-width="10" nat-width="200" strength="weak"/>
|
||||
<guide name="guide6" min-width="10" nat-width="200" strength="weak"/>
|
||||
<guide name="guide7" min-width="10" nat-width="200" strength="weak"/>
|
||||
<guide name="guide8" min-width="10" nat-width="200" strength="weak"/>
|
||||
<guide name="guide9" min-width="0" nat-width="200" strength="weak"/>
|
||||
<guide name="guide10" min-width="0" nat-width="200" strength="weak"/>
|
||||
<guide name="barrier1" min-height="10"/>
|
||||
<guide name="barrier2" min-height="10"/>
|
||||
<guide name="barrier3" min-height="10"/>
|
||||
<guide name="barrier4" min-height="10"/>
|
||||
|
||||
<!-- Spread Chain -->
|
||||
<constraint target="super" target-attribute="top"
|
||||
relation="eq"
|
||||
source="button1" source-attribute="top"
|
||||
strength="required"/>
|
||||
<constraint target="super" target-attribute="top"
|
||||
relation="eq"
|
||||
source="button2" source-attribute="top"
|
||||
strength="required"/>
|
||||
<constraint target="super" target-attribute="top"
|
||||
relation="eq"
|
||||
source="button3" source-attribute="top"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="super" target-attribute="left"
|
||||
relation="eq"
|
||||
source="guide1" source-attribute="left"
|
||||
strength="required"/>
|
||||
<constraint target="button1" target-attribute="left"
|
||||
relation="eq"
|
||||
source="guide1" source-attribute="right"
|
||||
strength="required"/>
|
||||
<constraint target="guide2" target-attribute="left"
|
||||
relation="eq"
|
||||
source="button1" source-attribute="right"
|
||||
strength="required"/>
|
||||
<constraint target="button2" target-attribute="left"
|
||||
relation="eq"
|
||||
source="guide2" source-attribute="right"
|
||||
strength="required"/>
|
||||
<constraint target="guide3" target-attribute="left"
|
||||
relation="eq"
|
||||
source="button2" source-attribute="right"
|
||||
strength="required"/>
|
||||
<constraint target="button3" target-attribute="left"
|
||||
relation="eq"
|
||||
source="guide3" source-attribute="right"
|
||||
strength="required"/>
|
||||
<constraint target="guide4" target-attribute="left"
|
||||
relation="eq"
|
||||
source="button3" source-attribute="right"
|
||||
strength="required"/>
|
||||
<constraint target="super" target-attribute="right"
|
||||
relation="eq"
|
||||
source="guide4" source-attribute="right"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="guide1" target-attribute="width"
|
||||
relation="eq"
|
||||
source="guide2" source-attribute="width"
|
||||
strength="required"/>
|
||||
<constraint target="guide2" target-attribute="width"
|
||||
relation="eq"
|
||||
source="guide3" source-attribute="width"
|
||||
strength="required"/>
|
||||
<constraint target="guide3" target-attribute="width"
|
||||
relation="eq"
|
||||
source="guide4" source-attribute="width"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="button1" target-attribute="width"
|
||||
relation="eq"
|
||||
source="button2" source-attribute="width"
|
||||
strength="required"/>
|
||||
<constraint target="button2" target-attribute="width"
|
||||
relation="eq"
|
||||
source="button3" source-attribute="width"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="button1" target-attribute="bottom"
|
||||
relation="eq"
|
||||
source="barrier1" source-attribute="top"
|
||||
strength="required"/>
|
||||
<constraint target="button2" target-attribute="bottom"
|
||||
relation="eq"
|
||||
source="barrier1" source-attribute="top"
|
||||
strength="required"/>
|
||||
<constraint target="button3" target-attribute="bottom"
|
||||
relation="eq"
|
||||
source="barrier1" source-attribute="top"
|
||||
strength="required"/>
|
||||
|
||||
<!-- Spread Inside Chain -->
|
||||
|
||||
<constraint target="super" target-attribute="left"
|
||||
relation="eq"
|
||||
source="button4" source-attribute="left"
|
||||
strength="required"/>
|
||||
<constraint target="guide5" target-attribute="left"
|
||||
relation="eq"
|
||||
source="button4" source-attribute="right"
|
||||
strength="required"/>
|
||||
<constraint target="button5" target-attribute="left"
|
||||
relation="eq"
|
||||
source="guide5" source-attribute="right"
|
||||
strength="required"/>
|
||||
<constraint target="guide6" target-attribute="left"
|
||||
relation="eq"
|
||||
source="button5" source-attribute="right"
|
||||
strength="required"/>
|
||||
<constraint target="button6" target-attribute="left"
|
||||
relation="eq"
|
||||
source="guide6" source-attribute="right"
|
||||
strength="required"/>
|
||||
<constraint target="super" target-attribute="right"
|
||||
relation="eq"
|
||||
source="button6" source-attribute="right"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="guide5" target-attribute="width"
|
||||
relation="eq"
|
||||
source="guide6" source-attribute="width"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="button4" target-attribute="width"
|
||||
relation="eq"
|
||||
source="button5" source-attribute="width"
|
||||
strength="required"/>
|
||||
<constraint target="button5" target-attribute="width"
|
||||
relation="eq"
|
||||
source="button6" source-attribute="width"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="button4" target-attribute="top"
|
||||
relation="eq"
|
||||
source="barrier1" source-attribute="bottom"
|
||||
strength="required"/>
|
||||
<constraint target="button5" target-attribute="top"
|
||||
relation="eq"
|
||||
source="barrier1" source-attribute="bottom"
|
||||
strength="required"/>
|
||||
<constraint target="button6" target-attribute="top"
|
||||
relation="eq"
|
||||
source="barrier1" source-attribute="bottom"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="button4" target-attribute="bottom"
|
||||
relation="eq"
|
||||
source="barrier2" source-attribute="top"
|
||||
strength="required"/>
|
||||
<constraint target="button5" target-attribute="bottom"
|
||||
relation="eq"
|
||||
source="barrier2" source-attribute="top"
|
||||
strength="required"/>
|
||||
<constraint target="button6" target-attribute="bottom"
|
||||
relation="eq"
|
||||
source="barrier2" source-attribute="top"
|
||||
strength="required"/>
|
||||
|
||||
<!-- Weighted Chain -->
|
||||
|
||||
<constraint target="super" target-attribute="left"
|
||||
relation="eq"
|
||||
source="button7" source-attribute="left"
|
||||
strength="required"/>
|
||||
<constraint target="button8" target-attribute="left"
|
||||
relation="eq"
|
||||
source="button7" source-attribute="right"
|
||||
constant="10"
|
||||
strength="required"/>
|
||||
<constraint target="button9" target-attribute="left"
|
||||
relation="eq"
|
||||
source="button8" source-attribute="right"
|
||||
constant="10"
|
||||
strength="required"/>
|
||||
<constraint target="super" target-attribute="right"
|
||||
relation="eq"
|
||||
source="button9" source-attribute="right"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="button8" target-attribute="width"
|
||||
relation="eq"
|
||||
source="button7" source-attribute="width"
|
||||
multiplier="2"
|
||||
strength="required"/>
|
||||
<constraint target="button9" target-attribute="width"
|
||||
relation="eq"
|
||||
source="button7" source-attribute="width"
|
||||
multiplier="3"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="button7" target-attribute="top"
|
||||
relation="eq"
|
||||
source="barrier2" source-attribute="bottom"
|
||||
strength="required"/>
|
||||
<constraint target="button8" target-attribute="top"
|
||||
relation="eq"
|
||||
source="barrier2" source-attribute="bottom"
|
||||
strength="required"/>
|
||||
<constraint target="button9" target-attribute="top"
|
||||
relation="eq"
|
||||
source="barrier2" source-attribute="bottom"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="button7" target-attribute="bottom"
|
||||
relation="eq"
|
||||
source="barrier3" source-attribute="top"
|
||||
strength="required"/>
|
||||
<constraint target="button8" target-attribute="bottom"
|
||||
relation="eq"
|
||||
source="barrier3" source-attribute="top"
|
||||
strength="required"/>
|
||||
<constraint target="button9" target-attribute="bottom"
|
||||
relation="eq"
|
||||
source="barrier3" source-attribute="top"
|
||||
strength="required"/>
|
||||
|
||||
<!-- Packed Chain -->
|
||||
|
||||
<constraint target="super" target-attribute="left"
|
||||
relation="eq"
|
||||
source="guide7" source-attribute="left"
|
||||
strength="required"/>
|
||||
<constraint target="button10" target-attribute="left"
|
||||
relation="eq"
|
||||
source="guide7" source-attribute="right"
|
||||
strength="required"/>
|
||||
<constraint target="button11" target-attribute="left"
|
||||
relation="eq"
|
||||
source="button10" source-attribute="right"
|
||||
constant="10"
|
||||
strength="required"/>
|
||||
<constraint target="button12" target-attribute="left"
|
||||
relation="eq"
|
||||
source="button11" source-attribute="right"
|
||||
constant="10"
|
||||
strength="required"/>
|
||||
<constraint target="guide8" target-attribute="left"
|
||||
relation="eq"
|
||||
source="button12" source-attribute="right"
|
||||
strength="required"/>
|
||||
<constraint target="super" target-attribute="right"
|
||||
relation="eq"
|
||||
source="guide8" source-attribute="right"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="guide7" target-attribute="width"
|
||||
relation="eq"
|
||||
source="guide8" source-attribute="width"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="button10" target-attribute="width"
|
||||
relation="eq"
|
||||
source="button11" source-attribute="width"
|
||||
strength="required"/>
|
||||
<constraint target="button11" target-attribute="width"
|
||||
relation="eq"
|
||||
source="button12" source-attribute="width"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="button10" target-attribute="top"
|
||||
relation="eq"
|
||||
source="barrier3" source-attribute="bottom"
|
||||
strength="required"/>
|
||||
<constraint target="button11" target-attribute="top"
|
||||
relation="eq"
|
||||
source="barrier3" source-attribute="bottom"
|
||||
strength="required"/>
|
||||
<constraint target="button12" target-attribute="top"
|
||||
relation="eq"
|
||||
source="barrier3" source-attribute="bottom"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="button10" target-attribute="bottom"
|
||||
relation="eq"
|
||||
source="barrier4" source-attribute="top"
|
||||
strength="required"/>
|
||||
<constraint target="button11" target-attribute="bottom"
|
||||
relation="eq"
|
||||
source="barrier4" source-attribute="top"
|
||||
strength="required"/>
|
||||
<constraint target="button12" target-attribute="bottom"
|
||||
relation="eq"
|
||||
source="barrier4" source-attribute="top"
|
||||
strength="required"/>
|
||||
|
||||
<!-- Packed Chain with Bias -->
|
||||
|
||||
<constraint target="super" target-attribute="left"
|
||||
relation="eq"
|
||||
source="guide9" source-attribute="left"
|
||||
strength="required"/>
|
||||
<constraint target="button13" target-attribute="left"
|
||||
relation="eq"
|
||||
source="guide9" source-attribute="right"
|
||||
constant="10"
|
||||
strength="required"/>
|
||||
<constraint target="button14" target-attribute="left"
|
||||
relation="eq"
|
||||
source="button13" source-attribute="right"
|
||||
constant="10"
|
||||
strength="required"/>
|
||||
<constraint target="button15" target-attribute="left"
|
||||
relation="eq"
|
||||
source="button14" source-attribute="right"
|
||||
constant="10"
|
||||
strength="required"/>
|
||||
<constraint target="guide10" target-attribute="left"
|
||||
relation="eq"
|
||||
source="button15" source-attribute="right"
|
||||
constant="10"
|
||||
strength="required"/>
|
||||
<constraint target="super" target-attribute="right"
|
||||
relation="eq"
|
||||
source="guide10" source-attribute="right"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="guide9" target-attribute="width"
|
||||
relation="eq"
|
||||
source="guide10" source-attribute="width"
|
||||
multiplier="4"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="button13" target-attribute="width"
|
||||
relation="eq"
|
||||
source="button14" source-attribute="width"
|
||||
strength="required"/>
|
||||
<constraint target="button14" target-attribute="width"
|
||||
relation="eq"
|
||||
source="button15" source-attribute="width"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="button13" target-attribute="top"
|
||||
relation="eq"
|
||||
source="barrier4" source-attribute="bottom"
|
||||
strength="required"/>
|
||||
<constraint target="button14" target-attribute="top"
|
||||
relation="eq"
|
||||
source="barrier4" source-attribute="bottom"
|
||||
strength="required"/>
|
||||
<constraint target="button15" target-attribute="top"
|
||||
relation="eq"
|
||||
source="barrier4" source-attribute="bottom"
|
||||
strength="required"/>
|
||||
|
||||
<constraint target="super" target-attribute="bottom"
|
||||
relation="ge"
|
||||
source="button13" source-attribute="bottom"
|
||||
strength="required"/>
|
||||
<constraint target="super" target-attribute="bottom"
|
||||
relation="ge"
|
||||
source="button14" source-attribute="bottom"
|
||||
strength="required"/>
|
||||
<constraint target="super" target-attribute="bottom"
|
||||
relation="ge"
|
||||
source="button15" source-attribute="bottom"
|
||||
strength="required"/>
|
||||
</constraints>
|
||||
</object>
|
||||
</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="button1">
|
||||
<property name="label">A</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button2">
|
||||
<property name="label">B</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button3">
|
||||
<property name="label">C</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button4">
|
||||
<property name="label">A</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button5">
|
||||
<property name="label">B</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button6">
|
||||
<property name="label">C</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button7">
|
||||
<property name="label">A</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button8">
|
||||
<property name="label">B</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button9">
|
||||
<property name="label">C</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button10">
|
||||
<property name="label">A</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button11">
|
||||
<property name="label">B</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button12">
|
||||
<property name="label">C</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button13">
|
||||
<property name="label">A</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button14">
|
||||
<property name="label">B</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button15">
|
||||
<property name="label">C</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -205,7 +205,7 @@ interactive_grid_init (InteractiveGrid *self)
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_constraints2 (GtkWidget *do_widget)
|
||||
do_constraints_interactive (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window;
|
||||
|
||||
@@ -128,7 +128,7 @@ vfl_grid_init (VflGrid *self)
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_constraints3 (GtkWidget *do_widget)
|
||||
do_constraints_vfl (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window;
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
<file>demoimage.c</file>
|
||||
<file>demoimage.h</file>
|
||||
</gresource>
|
||||
<gresource prefix="/constraints4">
|
||||
<file>constraints.ui</file>
|
||||
<gresource prefix="/constraints_builder">
|
||||
<file>constraints_builder.ui</file>
|
||||
</gresource>
|
||||
<gresource prefix="/css_accordion">
|
||||
<file>css_accordion.css</file>
|
||||
@@ -43,6 +43,11 @@
|
||||
<file>cssview.css</file>
|
||||
<file>reset.css</file>
|
||||
</gresource>
|
||||
<gresource prefix="/dropdown">
|
||||
<file>suggestionentry.h</file>
|
||||
<file>suggestionentry.c</file>
|
||||
<file>suggestionentry.css</file>
|
||||
</gresource>
|
||||
<gresource prefix="/theming_style_classes">
|
||||
<file>theming.ui</file>
|
||||
</gresource>
|
||||
@@ -208,6 +213,8 @@
|
||||
<file>demo3widget.ui</file>
|
||||
</gresource>
|
||||
<gresource prefix="/paintable_svg">
|
||||
<file>svgpaintable.h</file>
|
||||
<file>svgpaintable.c</file>
|
||||
<file>org.gtk.gtk4.NodeEditor.Devel.svg</file>
|
||||
</gresource>
|
||||
<gresource prefix="/shortcuts">
|
||||
@@ -246,9 +253,9 @@
|
||||
<file>clipboard.c</file>
|
||||
<file>combobox.c</file>
|
||||
<file>constraints.c</file>
|
||||
<file>constraints2.c</file>
|
||||
<file>constraints3.c</file>
|
||||
<file>constraints4.c</file>
|
||||
<file>constraints_interactive.c</file>
|
||||
<file>constraints_vfl.c</file>
|
||||
<file>constraints_builder.c</file>
|
||||
<file>css_accordion.c</file>
|
||||
<file>css_basics.c</file>
|
||||
<file>css_blendmodes.c</file>
|
||||
@@ -287,7 +294,7 @@
|
||||
<file>layoutmanager2.c</file>
|
||||
<file>links.c</file>
|
||||
<file>listbox.c</file>
|
||||
<file>listbox2.c</file>
|
||||
<file>listbox_controls.c</file>
|
||||
<file>listview_applauncher.c</file>
|
||||
<file>listview_colors.c</file>
|
||||
<file>listview_clocks.c</file>
|
||||
@@ -302,7 +309,7 @@
|
||||
<file>markup.c</file>
|
||||
<file>menu.c</file>
|
||||
<file>overlay.c</file>
|
||||
<file>overlay2.c</file>
|
||||
<file>overlay_decorative.c</file>
|
||||
<file>paint.c</file>
|
||||
<file>pagesetup.c</file>
|
||||
<file>paintable.c</file>
|
||||
@@ -352,8 +359,8 @@
|
||||
<file>messages.txt</file>
|
||||
<file>apple-red.png</file>
|
||||
</gresource>
|
||||
<gresource prefix="/listbox2">
|
||||
<file>listbox2.ui</file>
|
||||
<gresource prefix="/listbox_controls">
|
||||
<file>listbox_controls.ui</file>
|
||||
</gresource>
|
||||
<gresource prefix="/glarea">
|
||||
<file>glarea-gl.fs.glsl</file>
|
||||
|
||||
@@ -96,13 +96,18 @@
|
||||
<child>
|
||||
<object class="GtkPopoverMenuBar" id="menubar1">
|
||||
<property name="menu-model">menubar</property>
|
||||
<accessibility>
|
||||
<property name="label">Main Menu</property>
|
||||
</accessibility>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="toolbar1">
|
||||
<style>
|
||||
<class name="toolbar"/>
|
||||
</style>
|
||||
<property name="accessible-role">toolbar</property>
|
||||
<property name="css-classes">toolbar</property>
|
||||
<accessibility>
|
||||
<property name="label">Toolbar</property>
|
||||
</accessibility>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="label" translatable="yes">New</property>
|
||||
|
||||
@@ -311,6 +311,7 @@ do_drawingarea (GtkWidget *do_widget)
|
||||
gtk_window_set_display (GTK_WINDOW (window),
|
||||
gtk_widget_get_display (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Drawing Area");
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 250, -1);
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (close_window), NULL);
|
||||
|
||||
+237
-26
@@ -1,17 +1,16 @@
|
||||
/* Drop Downs
|
||||
/* Lists/Selections
|
||||
*
|
||||
* The GtkDropDown widget is a modern alternative to GtkComboBox.
|
||||
* It uses list models instead of tree models, and the content is
|
||||
* displayed using widgets instead of cell renderers.
|
||||
*
|
||||
* The examples here demonstrate how to use different kinds of
|
||||
* list models with GtkDropDown, how to use search and how to
|
||||
* display the selected item differently from the presentation
|
||||
* in the popup.
|
||||
* This example also shows a custom widget that can replace
|
||||
* GtkEntryCompletion or GtkComboBoxText. It is not currently
|
||||
* part of GTK.
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "suggestionentry.h"
|
||||
|
||||
#define STRING_TYPE_HOLDER (string_holder_get_type ())
|
||||
G_DECLARE_FINAL_TYPE (StringHolder, string_holder, STRING, HOLDER, GObject)
|
||||
@@ -273,13 +272,110 @@ get_title (gpointer item)
|
||||
return g_strdup (STRING_HOLDER (item)->title);
|
||||
}
|
||||
|
||||
static char *
|
||||
get_file_name (gpointer item)
|
||||
{
|
||||
return g_strdup (g_file_info_get_display_name (G_FILE_INFO (item)));
|
||||
}
|
||||
|
||||
static void
|
||||
setup_item (GtkSignalListItemFactory *factory,
|
||||
GtkListItem *item)
|
||||
{
|
||||
GtkWidget *box;
|
||||
GtkWidget *icon;
|
||||
GtkWidget *label;
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
|
||||
icon = gtk_image_new ();
|
||||
label = gtk_label_new ("");
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
||||
gtk_box_append (GTK_BOX (box), icon);
|
||||
gtk_box_append (GTK_BOX (box), label);
|
||||
gtk_list_item_set_child (item, box);
|
||||
}
|
||||
|
||||
static void
|
||||
bind_item (GtkSignalListItemFactory *factory,
|
||||
GtkListItem *item)
|
||||
{
|
||||
MatchObject *match = MATCH_OBJECT (gtk_list_item_get_item (item));
|
||||
GFileInfo *info = G_FILE_INFO (match_object_get_item (match));
|
||||
GtkWidget *box = gtk_list_item_get_child (item);
|
||||
GtkWidget *icon = gtk_widget_get_first_child (box);
|
||||
GtkWidget *label = gtk_widget_get_last_child (box);
|
||||
|
||||
gtk_image_set_from_gicon (GTK_IMAGE (icon), g_file_info_get_icon (info));
|
||||
gtk_label_set_label (GTK_LABEL (label), g_file_info_get_display_name (info));
|
||||
}
|
||||
|
||||
static void
|
||||
setup_highlight_item (GtkSignalListItemFactory *factory,
|
||||
GtkListItem *item)
|
||||
{
|
||||
GtkWidget *label;
|
||||
|
||||
label = gtk_label_new ("");
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
||||
gtk_list_item_set_child (item, label);
|
||||
}
|
||||
|
||||
static void
|
||||
bind_highlight_item (GtkSignalListItemFactory *factory,
|
||||
GtkListItem *item)
|
||||
{
|
||||
MatchObject *obj;
|
||||
GtkWidget *label;
|
||||
PangoAttrList *attrs;
|
||||
PangoAttribute *attr;
|
||||
const char *str;
|
||||
|
||||
obj = MATCH_OBJECT (gtk_list_item_get_item (item));
|
||||
label = gtk_list_item_get_child (item);
|
||||
|
||||
str = match_object_get_string (obj);
|
||||
|
||||
gtk_label_set_label (GTK_LABEL (label), str);
|
||||
attrs = pango_attr_list_new ();
|
||||
attr = pango_attr_weight_new (PANGO_WEIGHT_BOLD);
|
||||
attr->start_index = match_object_get_match_start (obj);
|
||||
attr->end_index = match_object_get_match_end (obj);
|
||||
pango_attr_list_insert (attrs, attr);
|
||||
gtk_label_set_attributes (GTK_LABEL (label), attrs);
|
||||
pango_attr_list_unref (attrs);
|
||||
}
|
||||
|
||||
static void
|
||||
match_func (MatchObject *obj,
|
||||
const char *search,
|
||||
gpointer user_data)
|
||||
{
|
||||
char *tmp1, *tmp2;
|
||||
char *p;
|
||||
|
||||
tmp1 = g_utf8_normalize (match_object_get_string (obj), -1, G_NORMALIZE_ALL);
|
||||
tmp2 = g_utf8_normalize (search, -1, G_NORMALIZE_ALL);
|
||||
|
||||
if ((p = strstr (tmp1, tmp2)) != NULL)
|
||||
match_object_set_match (obj,
|
||||
p - tmp1,
|
||||
(p - tmp1) + g_utf8_strlen (search, -1),
|
||||
1);
|
||||
else
|
||||
match_object_set_match (obj, 0, 0, 0);
|
||||
|
||||
g_free (tmp1);
|
||||
g_free (tmp2);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_dropdown (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
GtkWidget *button, *box, *spin, *check;
|
||||
GtkWidget *button, *box, *spin, *check, *hbox, *label, *entry;
|
||||
GListModel *model;
|
||||
GtkExpression *expression;
|
||||
GtkListItemFactory *factory;
|
||||
const char * const times[] = { "1 minute", "2 minutes", "5 minutes", "20 minutes", NULL };
|
||||
const char * const many_times[] = {
|
||||
"1 minute", "2 minutes", "5 minutes", "10 minutes", "15 minutes", "20 minutes",
|
||||
@@ -292,22 +388,49 @@ do_dropdown (GtkWidget *do_widget)
|
||||
const char * const device_descriptions[] = {
|
||||
"Built-in Audio", "Built-in audio", "Thinkpad Tunderbolt 3 Dock USB Audio", "Thinkpad Tunderbolt 3 Dock USB Audio", NULL
|
||||
};
|
||||
char *cwd;
|
||||
GFile *file;
|
||||
GListModel *dir;
|
||||
GtkStringList *strings;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
window = gtk_window_new ();
|
||||
gtk_window_set_display (GTK_WINDOW (window),
|
||||
gtk_widget_get_display (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Drop Downs");
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Selections");
|
||||
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
|
||||
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *)&window);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 20);
|
||||
|
||||
gtk_widget_set_margin_start (hbox, 20);
|
||||
gtk_widget_set_margin_end (hbox, 20);
|
||||
gtk_widget_set_margin_top (hbox, 20);
|
||||
gtk_widget_set_margin_bottom (hbox, 20);
|
||||
gtk_window_set_child (GTK_WINDOW (window), hbox);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
|
||||
gtk_widget_set_margin_start (box, 10);
|
||||
gtk_widget_set_margin_end (box, 10);
|
||||
gtk_widget_set_margin_top (box, 10);
|
||||
gtk_widget_set_margin_bottom (box, 10);
|
||||
gtk_window_set_child (GTK_WINDOW (window), box);
|
||||
gtk_box_append (GTK_BOX (hbox), box);
|
||||
|
||||
label = gtk_label_new ("Dropdowns");
|
||||
gtk_widget_add_css_class (label, "title-4");
|
||||
gtk_box_append (GTK_BOX (box), label);
|
||||
|
||||
/* A basic dropdown */
|
||||
button = drop_down_new_from_strings (times, NULL, NULL);
|
||||
gtk_box_append (GTK_BOX (box), button);
|
||||
|
||||
/* A dropdown using an expression to obtain strings */
|
||||
button = drop_down_new_from_strings (many_times, NULL, NULL);
|
||||
gtk_drop_down_set_enable_search (GTK_DROP_DOWN (button), TRUE);
|
||||
expression = gtk_cclosure_expression_new (G_TYPE_STRING, NULL,
|
||||
0, NULL,
|
||||
(GCallback)get_title,
|
||||
NULL, NULL);
|
||||
gtk_drop_down_set_expression (GTK_DROP_DOWN (button), expression);
|
||||
gtk_expression_unref (expression);
|
||||
gtk_box_append (GTK_BOX (box), button);
|
||||
|
||||
button = gtk_drop_down_new (NULL, NULL);
|
||||
|
||||
@@ -325,30 +448,118 @@ do_dropdown (GtkWidget *do_widget)
|
||||
|
||||
spin = gtk_spin_button_new_with_range (-1, g_list_model_get_n_items (G_LIST_MODEL (model)), 1);
|
||||
gtk_widget_set_halign (spin, GTK_ALIGN_START);
|
||||
gtk_widget_set_margin_start (spin, 20);
|
||||
g_object_bind_property (button, "selected", spin, "value", G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
|
||||
gtk_box_append (GTK_BOX (box), spin);
|
||||
|
||||
check = gtk_check_button_new_with_label ("Enable search");
|
||||
gtk_widget_set_margin_start (check, 20);
|
||||
g_object_bind_property (button, "enable-search", check, "active", G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
|
||||
gtk_box_append (GTK_BOX (box), check);
|
||||
|
||||
g_object_unref (model);
|
||||
|
||||
button = drop_down_new_from_strings (times, NULL, NULL);
|
||||
gtk_box_append (GTK_BOX (box), button);
|
||||
|
||||
button = drop_down_new_from_strings (many_times, NULL, NULL);
|
||||
gtk_drop_down_set_enable_search (GTK_DROP_DOWN (button), TRUE);
|
||||
expression = gtk_cclosure_expression_new (G_TYPE_STRING, NULL,
|
||||
0, NULL,
|
||||
(GCallback)get_title,
|
||||
NULL, NULL);
|
||||
gtk_drop_down_set_expression (GTK_DROP_DOWN (button), expression);
|
||||
gtk_expression_unref (expression);
|
||||
gtk_box_append (GTK_BOX (box), button);
|
||||
|
||||
/* A dropdown with a separate list factory */
|
||||
button = drop_down_new_from_strings (device_titles, device_icons, device_descriptions);
|
||||
gtk_box_append (GTK_BOX (box), button);
|
||||
|
||||
gtk_box_append (GTK_BOX (hbox), gtk_separator_new (GTK_ORIENTATION_VERTICAL));
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
|
||||
gtk_box_append (GTK_BOX (hbox), box);
|
||||
|
||||
label = gtk_label_new ("Suggestions");
|
||||
gtk_widget_add_css_class (label, "title-4");
|
||||
gtk_box_append (GTK_BOX (box), label);
|
||||
|
||||
/* A basic suggestion entry */
|
||||
entry = suggestion_entry_new ();
|
||||
g_object_set (entry, "placeholder-text", "Words with T or G…", NULL);
|
||||
strings = gtk_string_list_new ((const char *[]){
|
||||
"GNOME",
|
||||
"gnominious",
|
||||
"Gnomonic projection",
|
||||
"total",
|
||||
"totally",
|
||||
"toto",
|
||||
"tottery",
|
||||
"totterer",
|
||||
"Totten trust",
|
||||
"totipotent",
|
||||
"totipotency",
|
||||
"totemism",
|
||||
"totem pole",
|
||||
"Totara",
|
||||
"totalizer",
|
||||
"totalizator",
|
||||
"totalitarianism",
|
||||
"total parenteral nutrition",
|
||||
"total hysterectomy",
|
||||
"total eclipse",
|
||||
"Totipresence",
|
||||
"Totipalmi",
|
||||
"Tomboy",
|
||||
"zombie",
|
||||
NULL});
|
||||
suggestion_entry_set_model (SUGGESTION_ENTRY (entry), G_LIST_MODEL (strings));
|
||||
g_object_unref (strings);
|
||||
|
||||
gtk_box_append (GTK_BOX (box), entry);
|
||||
|
||||
/* A suggestion entry using a custom model, and no filtering */
|
||||
entry = suggestion_entry_new ();
|
||||
|
||||
cwd = g_get_current_dir ();
|
||||
file = g_file_new_for_path (cwd);
|
||||
dir = G_LIST_MODEL (gtk_directory_list_new ("standard::display-name,standard::content-type,standard::icon,standard::size", file));
|
||||
suggestion_entry_set_model (SUGGESTION_ENTRY (entry), dir);
|
||||
g_object_unref (dir);
|
||||
g_object_unref (file);
|
||||
g_free (cwd);
|
||||
|
||||
expression = gtk_cclosure_expression_new (G_TYPE_STRING, NULL,
|
||||
0, NULL,
|
||||
(GCallback)get_file_name,
|
||||
NULL, NULL);
|
||||
suggestion_entry_set_expression (SUGGESTION_ENTRY (entry), expression);
|
||||
gtk_expression_unref (expression);
|
||||
|
||||
factory = gtk_signal_list_item_factory_new ();
|
||||
g_signal_connect (factory, "setup", G_CALLBACK (setup_item), NULL);
|
||||
g_signal_connect (factory, "bind", G_CALLBACK (bind_item), NULL);
|
||||
|
||||
suggestion_entry_set_factory (SUGGESTION_ENTRY (entry), factory);
|
||||
g_object_unref (factory);
|
||||
|
||||
suggestion_entry_set_use_filter (SUGGESTION_ENTRY (entry), FALSE);
|
||||
suggestion_entry_set_show_arrow (SUGGESTION_ENTRY (entry), TRUE);
|
||||
|
||||
gtk_box_append (GTK_BOX (box), entry);
|
||||
|
||||
/* A suggestion entry with match highlighting */
|
||||
entry = suggestion_entry_new ();
|
||||
g_object_set (entry, "placeholder-text", "Destination", NULL);
|
||||
|
||||
strings = gtk_string_list_new ((const char *[]){
|
||||
"app-mockups",
|
||||
"settings-mockups",
|
||||
"os-mockups",
|
||||
"software-mockups",
|
||||
"mocktails",
|
||||
NULL});
|
||||
suggestion_entry_set_model (SUGGESTION_ENTRY (entry), G_LIST_MODEL (strings));
|
||||
g_object_unref (strings);
|
||||
|
||||
gtk_box_append (GTK_BOX (box), entry);
|
||||
|
||||
suggestion_entry_set_match_func (SUGGESTION_ENTRY (entry), match_func, NULL, NULL);
|
||||
|
||||
factory = gtk_signal_list_item_factory_new ();
|
||||
g_signal_connect (factory, "setup", G_CALLBACK (setup_highlight_item), NULL);
|
||||
g_signal_connect (factory, "bind", G_CALLBACK (bind_highlight_item), NULL);
|
||||
suggestion_entry_set_factory (SUGGESTION_ENTRY (entry), factory);
|
||||
g_object_unref (factory);
|
||||
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.16"/>
|
||||
<object class="GtkListStore" id="liststore1">
|
||||
<columns>
|
||||
<column type="gint"/>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.12"/>
|
||||
<object class="GtkWindow" id="window">
|
||||
<property name="default-width">600</property>
|
||||
<property name="default-height">500</property>
|
||||
|
||||
@@ -501,7 +501,7 @@ fontify (const char *format,
|
||||
char *theme;
|
||||
gboolean prefer_dark;
|
||||
const char *style_arg;
|
||||
const char *text;
|
||||
char *text;
|
||||
GtkTextIter start, end;
|
||||
GBytes *bytes;
|
||||
GError *error = NULL;
|
||||
@@ -553,7 +553,7 @@ fontify (const char *format,
|
||||
|
||||
gtk_text_buffer_get_bounds (source_buffer, &start, &end);
|
||||
text = gtk_text_buffer_get_text (source_buffer, &start, &end, TRUE);
|
||||
bytes = g_bytes_new_static (text, strlen (text));
|
||||
bytes = g_bytes_new_take (text, strlen (text));
|
||||
|
||||
#ifdef HAVE_GIO_UNIX
|
||||
/* Work around https://gitlab.gnome.org/GNOME/glib/-/issues/2182 */
|
||||
@@ -570,4 +570,5 @@ fontify (const char *format,
|
||||
NULL,
|
||||
fontify_finish,
|
||||
g_object_ref (source_buffer));
|
||||
g_bytes_unref (bytes);
|
||||
}
|
||||
|
||||
@@ -179,6 +179,9 @@ gtk_fishbowl_add (GtkFishbowl *fishbowl,
|
||||
child_info->dy = new_speed ();
|
||||
|
||||
gtk_widget_set_parent (widget, GTK_WIDGET (fishbowl));
|
||||
gtk_accessible_update_state (GTK_ACCESSIBLE (widget),
|
||||
GTK_ACCESSIBLE_STATE_HIDDEN, TRUE,
|
||||
-1);
|
||||
|
||||
g_hash_table_insert (priv->children, widget, child_info);
|
||||
priv->count++;
|
||||
@@ -342,6 +345,8 @@ gtk_fishbowl_class_init (GtkFishbowlClass *klass)
|
||||
G_PARAM_READWRITE);
|
||||
|
||||
g_object_class_install_properties (object_class, NUM_PROPERTIES, props);
|
||||
|
||||
gtk_widget_class_set_accessible_role (widget_class, GTK_ACCESSIBLE_ROLE_PRESENTATION);
|
||||
}
|
||||
|
||||
guint
|
||||
|
||||
@@ -13,7 +13,7 @@ static GtkWidget *window = NULL;
|
||||
static GtkWidget *scrolledwindow;
|
||||
static int selected;
|
||||
|
||||
#define N_WIDGET_TYPES 6
|
||||
#define N_WIDGET_TYPES 7
|
||||
|
||||
|
||||
static int hincrement = 5;
|
||||
@@ -177,6 +177,24 @@ populate_grid (void)
|
||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (scrolledwindow), list);
|
||||
}
|
||||
|
||||
extern GtkWidget *create_ucd_view (GtkWidget *label);
|
||||
|
||||
static void
|
||||
populate_list2 (void)
|
||||
{
|
||||
GtkWidget *list;
|
||||
|
||||
list = create_ucd_view (NULL);
|
||||
|
||||
hincrement = 0;
|
||||
vincrement = 5;
|
||||
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledwindow),
|
||||
GTK_POLICY_AUTOMATIC,
|
||||
GTK_POLICY_AUTOMATIC);
|
||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (scrolledwindow), list);
|
||||
}
|
||||
|
||||
static void
|
||||
set_widget_type (int type)
|
||||
{
|
||||
@@ -216,6 +234,11 @@ set_widget_type (int type)
|
||||
break;
|
||||
|
||||
case 5:
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Scrolling a columned list");
|
||||
populate_list2 ();
|
||||
break;
|
||||
|
||||
case 6:
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Scrolling a grid");
|
||||
populate_grid ();
|
||||
break;
|
||||
|
||||
@@ -34,7 +34,7 @@ row_activated (GtkListBox *list,
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_listbox2 (GtkWidget *do_widget)
|
||||
do_listbox_controls (GtkWidget *do_widget)
|
||||
{
|
||||
if (!window)
|
||||
{
|
||||
@@ -47,7 +47,7 @@ do_listbox2 (GtkWidget *do_widget)
|
||||
builder = gtk_builder_new ();
|
||||
gtk_builder_set_scope (builder, scope);
|
||||
|
||||
gtk_builder_add_from_resource (builder, "/listbox2/listbox2.ui", NULL);
|
||||
gtk_builder_add_from_resource (builder, "/listbox_controls/listbox_controls.ui", NULL);
|
||||
|
||||
window = GTK_WIDGET (gtk_builder_get_object (builder, "window"));
|
||||
gtk_window_set_display (GTK_WINDOW (window),
|
||||
@@ -80,7 +80,7 @@ ucd_model_new (void)
|
||||
iter = g_variant_iter_new (v);
|
||||
|
||||
store = g_list_store_new (G_TYPE_OBJECT);
|
||||
while (g_variant_iter_next (iter, "(us)", &u, &name))
|
||||
while (g_variant_iter_next (iter, "(u&s)", &u, &name))
|
||||
{
|
||||
if (u == 0)
|
||||
continue;
|
||||
@@ -259,7 +259,7 @@ selection_changed (GObject *object,
|
||||
gtk_label_set_label (GTK_LABEL (label), buffer);
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
GtkWidget *
|
||||
create_ucd_view (GtkWidget *label)
|
||||
{
|
||||
GtkWidget *cv;
|
||||
@@ -273,7 +273,8 @@ create_ucd_view (GtkWidget *label)
|
||||
selection = gtk_single_selection_new (ucd_model);
|
||||
gtk_single_selection_set_autoselect (selection, TRUE);
|
||||
gtk_single_selection_set_can_unselect (selection, FALSE);
|
||||
g_signal_connect (selection, "notify::selected", G_CALLBACK (selection_changed), label);
|
||||
if (label)
|
||||
g_signal_connect (selection, "notify::selected", G_CALLBACK (selection_changed), label);
|
||||
|
||||
cv = gtk_column_view_new (GTK_SELECTION_MODEL (selection));
|
||||
gtk_column_view_set_show_column_separators (GTK_COLUMN_VIEW (cv), TRUE);
|
||||
@@ -283,12 +284,14 @@ create_ucd_view (GtkWidget *label)
|
||||
g_signal_connect (factory, "bind", G_CALLBACK (bind_codepoint), NULL);
|
||||
column = gtk_column_view_column_new ("Codepoint", factory);
|
||||
gtk_column_view_append_column (GTK_COLUMN_VIEW (cv), column);
|
||||
g_object_unref (column);
|
||||
|
||||
factory = gtk_signal_list_item_factory_new ();
|
||||
g_signal_connect (factory, "setup", G_CALLBACK (setup_centered_label), NULL);
|
||||
g_signal_connect (factory, "bind", G_CALLBACK (bind_char), NULL);
|
||||
column = gtk_column_view_column_new ("Char", factory);
|
||||
gtk_column_view_append_column (GTK_COLUMN_VIEW (cv), column);
|
||||
g_object_unref (column);
|
||||
|
||||
factory = gtk_signal_list_item_factory_new ();
|
||||
g_signal_connect (factory, "setup", G_CALLBACK (setup_ellipsizing_label), NULL);
|
||||
@@ -296,6 +299,7 @@ create_ucd_view (GtkWidget *label)
|
||||
column = gtk_column_view_column_new ("Name", factory);
|
||||
gtk_column_view_column_set_resizable (column, TRUE);
|
||||
gtk_column_view_append_column (GTK_COLUMN_VIEW (cv), column);
|
||||
g_object_unref (column);
|
||||
|
||||
factory = gtk_signal_list_item_factory_new ();
|
||||
g_signal_connect (factory, "setup", G_CALLBACK (setup_ellipsizing_label), NULL);
|
||||
@@ -303,6 +307,7 @@ create_ucd_view (GtkWidget *label)
|
||||
column = gtk_column_view_column_new ("Type", factory);
|
||||
gtk_column_view_column_set_resizable (column, TRUE);
|
||||
gtk_column_view_append_column (GTK_COLUMN_VIEW (cv), column);
|
||||
g_object_unref (column);
|
||||
|
||||
factory = gtk_signal_list_item_factory_new ();
|
||||
g_signal_connect (factory, "setup", G_CALLBACK (setup_ellipsizing_label), NULL);
|
||||
@@ -310,6 +315,7 @@ create_ucd_view (GtkWidget *label)
|
||||
column = gtk_column_view_column_new ("Break Type", factory);
|
||||
gtk_column_view_column_set_resizable (column, TRUE);
|
||||
gtk_column_view_append_column (GTK_COLUMN_VIEW (cv), column);
|
||||
g_object_unref (column);
|
||||
|
||||
factory = gtk_signal_list_item_factory_new ();
|
||||
g_signal_connect (factory, "setup", G_CALLBACK (setup_label), NULL);
|
||||
@@ -317,6 +323,7 @@ create_ucd_view (GtkWidget *label)
|
||||
column = gtk_column_view_column_new ("Combining Class", factory);
|
||||
gtk_column_view_column_set_resizable (column, TRUE);
|
||||
gtk_column_view_append_column (GTK_COLUMN_VIEW (cv), column);
|
||||
g_object_unref (column);
|
||||
|
||||
factory = gtk_signal_list_item_factory_new ();
|
||||
g_signal_connect (factory, "setup", G_CALLBACK (setup_label), NULL);
|
||||
@@ -324,6 +331,7 @@ create_ucd_view (GtkWidget *label)
|
||||
column = gtk_column_view_column_new ("Script", factory);
|
||||
gtk_column_view_column_set_resizable (column, TRUE);
|
||||
gtk_column_view_append_column (GTK_COLUMN_VIEW (cv), column);
|
||||
g_object_unref (column);
|
||||
|
||||
return cv;
|
||||
}
|
||||
|
||||
@@ -337,8 +337,8 @@ display_text (const char *format,
|
||||
|
||||
bytes = g_resources_lookup_data (resource, 0, NULL);
|
||||
g_assert (bytes);
|
||||
|
||||
g_assert (g_utf8_validate (g_bytes_get_data (bytes, NULL), g_bytes_get_size (bytes), NULL));
|
||||
text = g_bytes_get_data (bytes, &len);
|
||||
g_assert (g_utf8_validate (text, len, NULL));
|
||||
|
||||
textview = gtk_text_view_new ();
|
||||
gtk_text_view_set_left_margin (GTK_TEXT_VIEW (textview), 20);
|
||||
@@ -354,9 +354,8 @@ display_text (const char *format,
|
||||
gtk_text_view_set_monospace (GTK_TEXT_VIEW (textview), TRUE);
|
||||
|
||||
buffer = gtk_text_buffer_new (NULL);
|
||||
|
||||
text = g_bytes_unref_to_data (bytes, &len);
|
||||
gtk_text_buffer_set_text (buffer, text, len);
|
||||
g_bytes_unref (bytes);
|
||||
|
||||
if (format)
|
||||
fontify (format, buffer);
|
||||
|
||||
+24
-15
@@ -17,9 +17,6 @@
|
||||
</section>
|
||||
</menu>
|
||||
<object class="GtkApplicationWindow" id="window">
|
||||
<style>
|
||||
<class name="devel"/>
|
||||
</style>
|
||||
<property name="default-width">800</property>
|
||||
<property name="default-height">600</property>
|
||||
<child type="titlebar">
|
||||
@@ -28,14 +25,7 @@
|
||||
<object class="GtkButton">
|
||||
<property name="valign">center</property>
|
||||
<property name="action-name">win.run</property>
|
||||
<style>
|
||||
<class name="text-button"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label" translatable="yes">Run</property>
|
||||
</object>
|
||||
</child>
|
||||
<property name="label" translatable="yes">Run</property>
|
||||
</object>
|
||||
</child>
|
||||
<child type="end">
|
||||
@@ -43,6 +33,9 @@
|
||||
<property name="valign">center</property>
|
||||
<property name="menu-model">gear_menu</property>
|
||||
<property name="icon-name">open-menu-symbolic</property>
|
||||
<accessibility>
|
||||
<property name="label" translatable="yes">Primary menu</property>
|
||||
</accessibility>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
@@ -51,6 +44,9 @@
|
||||
<object class="GtkBox">
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<style>
|
||||
<class name="sidebar"/>
|
||||
</style>
|
||||
<property name="width-request">120</property>
|
||||
<property name="hscrollbar-policy">never</property>
|
||||
<property name="min-content-width">150</property>
|
||||
@@ -63,7 +59,11 @@
|
||||
<object class="GtkSearchBar" id="searchbar">
|
||||
<property name="key-capture-widget">window</property>
|
||||
<child>
|
||||
<object class="GtkSearchEntry" id="search-entry"/>
|
||||
<object class="GtkSearchEntry" id="search-entry">
|
||||
<accessibility>
|
||||
<relation name="controls">listview</relation>
|
||||
</accessibility>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
@@ -78,6 +78,10 @@
|
||||
<property name="resource">/ui/main-listitem.ui</property>
|
||||
</object>
|
||||
</property>
|
||||
<accessibility>
|
||||
<property name="label" translatable="yes">Demo list</property>
|
||||
<relation name="controls">notebook</relation>
|
||||
</accessibility>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
@@ -85,9 +89,6 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparator"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkNotebook" id="notebook">
|
||||
<property name="scrollable">1</property>
|
||||
@@ -112,6 +113,10 @@
|
||||
<property name="editable">0</property>
|
||||
<property name="wrap-mode">word</property>
|
||||
<property name="cursor-visible">0</property>
|
||||
<accessibility>
|
||||
<property name="label" translatable="yes">Info</property>
|
||||
<property name="description" translatable="yes">A description of the demo</property>
|
||||
</accessibility>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
@@ -142,6 +147,10 @@
|
||||
<property name="wrap-mode">word</property>
|
||||
<property name="pixels-above-lines">2</property>
|
||||
<property name="pixels-below-lines">2</property>
|
||||
<accessibility>
|
||||
<property name="label" translatable="yes">Source</property>
|
||||
<property name="description" translatable="yes">The source code of the demo</property>
|
||||
</accessibility>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
||||
@@ -7,9 +7,9 @@ demos = files([
|
||||
'clipboard.c',
|
||||
'combobox.c',
|
||||
'constraints.c',
|
||||
'constraints2.c',
|
||||
'constraints3.c',
|
||||
'constraints4.c',
|
||||
'constraints_interactive.c',
|
||||
'constraints_vfl.c',
|
||||
'constraints_builder.c',
|
||||
'css_accordion.c',
|
||||
'css_basics.c',
|
||||
'css_blendmodes.c',
|
||||
@@ -19,7 +19,6 @@ demos = files([
|
||||
'cursors.c',
|
||||
'dialog.c',
|
||||
'drawingarea.c',
|
||||
'dropdown.c',
|
||||
'dnd.c',
|
||||
'editable_cells.c',
|
||||
'entry_completion.c',
|
||||
@@ -45,7 +44,7 @@ demos = files([
|
||||
'layoutmanager2.c',
|
||||
'links.c',
|
||||
'listbox.c',
|
||||
'listbox2.c',
|
||||
'listbox_controls.c',
|
||||
'menu.c',
|
||||
'flowbox.c',
|
||||
'list_store.c',
|
||||
@@ -54,12 +53,14 @@ demos = files([
|
||||
'listview_colors.c',
|
||||
'listview_filebrowser.c',
|
||||
'listview_minesweeper.c',
|
||||
'dropdown.c',
|
||||
'listview_settings.c',
|
||||
'listview_ucd.c',
|
||||
'listview_weather.c',
|
||||
'listview_words.c',
|
||||
'markup.c',
|
||||
'overlay.c',
|
||||
'overlay2.c',
|
||||
'overlay_decorative.c',
|
||||
'paint.c',
|
||||
'paintable.c',
|
||||
'paintable_animated.c',
|
||||
@@ -120,11 +121,14 @@ extra_demo_sources = files(['main.c',
|
||||
'four_point_transform.c',
|
||||
'demo2widget.c',
|
||||
'demo3widget.c',
|
||||
'pixbufpaintable.c'])
|
||||
'pixbufpaintable.c',
|
||||
'script-names.c',
|
||||
'unicode-names.c',
|
||||
'suggestionentry.c'])
|
||||
|
||||
if harfbuzz_dep.found() and pangoft_dep.found()
|
||||
demos += files(['font_features.c', 'listview_ucd.c'])
|
||||
extra_demo_sources += files(['script-names.c', 'language-names.c', 'unicode-names.c'])
|
||||
demos += files(['font_features.c'])
|
||||
extra_demo_sources += files(['language-names.c'])
|
||||
gtkdemo_deps += [ harfbuzz_dep, epoxy_dep ]
|
||||
endif
|
||||
|
||||
@@ -136,6 +140,7 @@ librsvg_dep = dependency('librsvg-2.0', version: '>= 2.46.0', required: false)
|
||||
|
||||
if librsvg_dep.found()
|
||||
demos += files('paintable_svg.c')
|
||||
extra_demo_sources += files(['svgpaintable.c'])
|
||||
gtkdemo_deps += [ librsvg_dep ]
|
||||
endif
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ margin_changed (GtkAdjustment *adjustment,
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_overlay2 (GtkWidget *do_widget)
|
||||
do_overlay_decorative (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
@@ -153,7 +153,7 @@ do_paintable_emblem (GtkWidget *do_widget)
|
||||
window = gtk_window_new ();
|
||||
gtk_window_set_display (GTK_WINDOW (window),
|
||||
gtk_widget_get_display (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Emblems");
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Paintable — Emblems");
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 300, 200);
|
||||
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *)&window);
|
||||
|
||||
|
||||
@@ -9,183 +9,20 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include <librsvg/rsvg.h>
|
||||
|
||||
#define SVG_TYPE_PAINTABLE (svg_paintable_get_type ())
|
||||
#include "svgpaintable.h"
|
||||
|
||||
G_DECLARE_FINAL_TYPE (SvgPaintable, svg_paintable, SVG, PAINTABLE, GObject)
|
||||
|
||||
struct _SvgPaintable
|
||||
{
|
||||
GObject parent_instance;
|
||||
GFile *file;
|
||||
RsvgHandle *handle;
|
||||
};
|
||||
|
||||
struct _SvgPaintableClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
};
|
||||
|
||||
enum {
|
||||
PROP_FILE = 1,
|
||||
NUM_PROPERTIES
|
||||
};
|
||||
|
||||
static void
|
||||
svg_paintable_snapshot (GdkPaintable *paintable,
|
||||
GdkSnapshot *snapshot,
|
||||
double width,
|
||||
double height)
|
||||
{
|
||||
SvgPaintable *self = SVG_PAINTABLE (paintable);
|
||||
cairo_t *cr;
|
||||
GError *error = NULL;
|
||||
|
||||
cr = gtk_snapshot_append_cairo (GTK_SNAPSHOT (snapshot),
|
||||
&GRAPHENE_RECT_INIT (0, 0, width, height));
|
||||
|
||||
if (!rsvg_handle_render_document (self->handle, cr,
|
||||
&(RsvgRectangle) {0, 0, width, height},
|
||||
&error))
|
||||
{
|
||||
g_error ("%s", error->message);
|
||||
}
|
||||
|
||||
cairo_destroy (cr);
|
||||
}
|
||||
|
||||
static int
|
||||
svg_paintable_get_intrinsic_width (GdkPaintable *paintable)
|
||||
{
|
||||
SvgPaintable *self = SVG_PAINTABLE (paintable);
|
||||
RsvgDimensionData data;
|
||||
|
||||
rsvg_handle_get_dimensions (self->handle, &data);
|
||||
|
||||
return data.width;
|
||||
}
|
||||
|
||||
static int
|
||||
svg_paintable_get_intrinsic_height (GdkPaintable *paintable)
|
||||
{
|
||||
SvgPaintable *self = SVG_PAINTABLE (paintable);
|
||||
RsvgDimensionData data;
|
||||
|
||||
rsvg_handle_get_dimensions (self->handle, &data);
|
||||
|
||||
return data.height;
|
||||
}
|
||||
|
||||
static void
|
||||
svg_paintable_init_interface (GdkPaintableInterface *iface)
|
||||
{
|
||||
iface->snapshot = svg_paintable_snapshot;
|
||||
iface->get_intrinsic_width = svg_paintable_get_intrinsic_width;
|
||||
iface->get_intrinsic_height = svg_paintable_get_intrinsic_height;
|
||||
}
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (SvgPaintable, svg_paintable, G_TYPE_OBJECT,
|
||||
G_IMPLEMENT_INTERFACE (GDK_TYPE_PAINTABLE,
|
||||
svg_paintable_init_interface))
|
||||
|
||||
static void
|
||||
svg_paintable_init (SvgPaintable *self)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
svg_paintable_dispose (GObject *object)
|
||||
{
|
||||
SvgPaintable *self = SVG_PAINTABLE (object);
|
||||
|
||||
g_clear_object (&self->file);
|
||||
g_clear_object (&self->handle);
|
||||
|
||||
G_OBJECT_CLASS (svg_paintable_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
svg_paintable_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
SvgPaintable *self = SVG_PAINTABLE (object);
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_FILE:
|
||||
{
|
||||
GFile *file = g_value_get_object (value);
|
||||
RsvgHandle *handle = rsvg_handle_new_from_gfile_sync (file,
|
||||
RSVG_HANDLE_FLAGS_NONE,
|
||||
NULL,
|
||||
NULL);
|
||||
rsvg_handle_set_dpi (handle, 90);
|
||||
|
||||
g_set_object (&self->file, file);
|
||||
g_set_object (&self->handle, handle);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
svg_paintable_get_property (GObject *object,
|
||||
guint prop_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
SvgPaintable *self = SVG_PAINTABLE (object);
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_FILE:
|
||||
g_value_set_object (value, self->file);
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
svg_paintable_class_init (SvgPaintableClass *class)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (class);
|
||||
|
||||
object_class->dispose = svg_paintable_dispose;
|
||||
object_class->set_property = svg_paintable_set_property;
|
||||
object_class->get_property = svg_paintable_get_property;
|
||||
|
||||
g_object_class_install_property (object_class, PROP_FILE,
|
||||
g_param_spec_object ("file", "File", "File",
|
||||
G_TYPE_FILE,
|
||||
G_PARAM_READWRITE));
|
||||
}
|
||||
|
||||
static SvgPaintable *
|
||||
svg_paintable_new (GFile *file)
|
||||
{
|
||||
return g_object_new (SVG_TYPE_PAINTABLE,
|
||||
"file", file,
|
||||
NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
file_set (GtkFileChooserButton *button,
|
||||
GtkWidget *picture)
|
||||
{
|
||||
GFile *file;
|
||||
SvgPaintable *paintable;
|
||||
GdkPaintable *paintable;
|
||||
|
||||
file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (button));
|
||||
|
||||
paintable = svg_paintable_new (file);
|
||||
gtk_picture_set_paintable (GTK_PICTURE (picture), GDK_PAINTABLE (paintable));
|
||||
gtk_picture_set_paintable (GTK_PICTURE (picture), paintable);
|
||||
|
||||
g_object_unref (paintable);
|
||||
g_object_unref (file);
|
||||
@@ -201,14 +38,15 @@ do_paintable_svg (GtkWidget *do_widget)
|
||||
GtkFileFilter *filter;
|
||||
GtkWidget *button;
|
||||
GFile *file;
|
||||
SvgPaintable *paintable;
|
||||
GdkPaintable *paintable;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
window = gtk_window_new ();
|
||||
header = gtk_header_bar_new ();
|
||||
gtk_window_set_titlebar (GTK_WINDOW (window), header);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 300, 200);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 330, 330);
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Paintable — SVG");
|
||||
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *)&window);
|
||||
|
||||
button = gtk_file_chooser_button_new ("Select an SVG file", GTK_FILE_CHOOSER_ACTION_OPEN);
|
||||
@@ -227,7 +65,7 @@ do_paintable_svg (GtkWidget *do_widget)
|
||||
|
||||
file = g_file_new_for_uri ("resource:///paintable_svg/org.gtk.gtk4.NodeEditor.Devel.svg");
|
||||
paintable = svg_paintable_new (file);
|
||||
gtk_picture_set_paintable (GTK_PICTURE (picture), GDK_PAINTABLE (paintable));
|
||||
gtk_picture_set_paintable (GTK_PICTURE (picture), paintable);
|
||||
g_object_unref (paintable);
|
||||
g_object_unref (file);
|
||||
}
|
||||
|
||||
@@ -57,6 +57,8 @@ do_shortcut_triggers (GtkWidget *do_widget)
|
||||
gtk_window_set_display (GTK_WINDOW (window),
|
||||
gtk_widget_get_display (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Shortcuts");
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 200, -1);
|
||||
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
|
||||
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *)&window);
|
||||
|
||||
list = gtk_list_box_new ();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Sliding Puzzle
|
||||
* #Keywords: GdkPaintable, GdkGesture, game
|
||||
* #Keywords: GdkPaintable, GdkGesture, GtkShortcutController, game
|
||||
*
|
||||
* This demo demonstrates how to use gestures and paintables to create a
|
||||
* small sliding puzzle game.
|
||||
@@ -281,7 +281,8 @@ start_puzzle (GdkPaintable *paintable)
|
||||
gtk_aspect_frame_set_obey_child (GTK_ASPECT_FRAME (frame), FALSE);
|
||||
|
||||
/* Add shortcuts so people can use the arrow
|
||||
* keys to move the puzzle */
|
||||
* keys to move the puzzle
|
||||
*/
|
||||
controller = gtk_shortcut_controller_new ();
|
||||
gtk_shortcut_controller_set_scope (GTK_SHORTCUT_CONTROLLER (controller),
|
||||
GTK_SHORTCUT_SCOPE_LOCAL);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,28 @@
|
||||
entry.suggestion > popover.menu.background > contents {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
entry.suggestion arrow {
|
||||
-gtk-icon-source: -gtk-icontheme('pan-down-symbolic');
|
||||
min-height: 16px;
|
||||
min-width: 16px;
|
||||
}
|
||||
|
||||
entry.suggestion > popover {
|
||||
margin-top: 6px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
entry.suggestion > popover listview {
|
||||
margin: 8px 0;
|
||||
}
|
||||
|
||||
entry.suggestion > popover listview > row {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
entry.suggestion > popover listview > row:selected {
|
||||
outline-color: rgba(1,1,1,0.2);
|
||||
color: @theme_text_color;
|
||||
background-color: shade(#f6f5f4, 0.97);
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
#pragma once
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
||||
#define MATCH_TYPE_OBJECT (match_object_get_type ())
|
||||
#define MATCH_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MATCH_TYPE_OBJECT, MatchObject))
|
||||
#define MATCH_IS_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MATCH_TYPE_OBJECT))
|
||||
|
||||
typedef struct _MatchObject MatchObject;
|
||||
|
||||
GType match_object_get_type (void) G_GNUC_CONST;
|
||||
|
||||
gpointer match_object_get_item (MatchObject *object);
|
||||
const char * match_object_get_string (MatchObject *object);
|
||||
guint match_object_get_match_start (MatchObject *object);
|
||||
guint match_object_get_match_end (MatchObject *object);
|
||||
guint match_object_get_score (MatchObject *object);
|
||||
void match_object_set_match (MatchObject *object,
|
||||
guint start,
|
||||
guint end,
|
||||
guint score);
|
||||
|
||||
#define SUGGESTION_TYPE_ENTRY (suggestion_entry_get_type ())
|
||||
#define SUGGESTION_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SUGGESTION_TYPE_ENTRY, SuggestionEntry))
|
||||
#define SUGGESTION_IS_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SUGGESTION_TYPE_ENTRY))
|
||||
|
||||
typedef struct _SuggestionEntry SuggestionEntry;
|
||||
|
||||
GType suggestion_entry_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GtkWidget* suggestion_entry_new (void);
|
||||
|
||||
void suggestion_entry_set_model (SuggestionEntry *self,
|
||||
GListModel *model);
|
||||
GListModel * suggestion_entry_get_model (SuggestionEntry *self);
|
||||
|
||||
void suggestion_entry_set_factory (SuggestionEntry *self,
|
||||
GtkListItemFactory *factory);
|
||||
GtkListItemFactory *
|
||||
suggestion_entry_get_factory (SuggestionEntry *self);
|
||||
|
||||
void suggestion_entry_set_use_filter (SuggestionEntry *self,
|
||||
gboolean use_ilter);
|
||||
gboolean suggestion_entry_get_use_filter (SuggestionEntry *self);
|
||||
|
||||
void suggestion_entry_set_expression (SuggestionEntry *self,
|
||||
GtkExpression *expression);
|
||||
GtkExpression * suggestion_entry_get_expression (SuggestionEntry *self);
|
||||
|
||||
void suggestion_entry_set_show_arrow (SuggestionEntry *self,
|
||||
gboolean show_arrow);
|
||||
gboolean suggestion_entry_get_show_arrow (SuggestionEntry *self);
|
||||
|
||||
typedef void (* SuggestionEntryMatchFunc) (MatchObject *object,
|
||||
const char *search,
|
||||
gpointer user_data);
|
||||
|
||||
void suggestion_entry_set_match_func (SuggestionEntry *self,
|
||||
SuggestionEntryMatchFunc func,
|
||||
gpointer user_data,
|
||||
GDestroyNotify destroy);
|
||||
|
||||
G_END_DECLS
|
||||
@@ -0,0 +1,166 @@
|
||||
#include "svgpaintable.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <librsvg/rsvg.h>
|
||||
|
||||
struct _SvgPaintable
|
||||
{
|
||||
GObject parent_instance;
|
||||
GFile *file;
|
||||
RsvgHandle *handle;
|
||||
};
|
||||
|
||||
struct _SvgPaintableClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
};
|
||||
|
||||
enum {
|
||||
PROP_FILE = 1,
|
||||
NUM_PROPERTIES
|
||||
};
|
||||
|
||||
static void
|
||||
svg_paintable_snapshot (GdkPaintable *paintable,
|
||||
GdkSnapshot *snapshot,
|
||||
double width,
|
||||
double height)
|
||||
{
|
||||
SvgPaintable *self = SVG_PAINTABLE (paintable);
|
||||
cairo_t *cr;
|
||||
GError *error = NULL;
|
||||
|
||||
cr = gtk_snapshot_append_cairo (GTK_SNAPSHOT (snapshot),
|
||||
&GRAPHENE_RECT_INIT (0, 0, width, height));
|
||||
|
||||
if (!rsvg_handle_render_document (self->handle, cr,
|
||||
&(RsvgRectangle) {0, 0, width, height},
|
||||
&error))
|
||||
{
|
||||
g_error ("%s", error->message);
|
||||
}
|
||||
|
||||
cairo_destroy (cr);
|
||||
}
|
||||
|
||||
static int
|
||||
svg_paintable_get_intrinsic_width (GdkPaintable *paintable)
|
||||
{
|
||||
SvgPaintable *self = SVG_PAINTABLE (paintable);
|
||||
RsvgDimensionData data;
|
||||
|
||||
rsvg_handle_get_dimensions (self->handle, &data);
|
||||
|
||||
return data.width;
|
||||
}
|
||||
|
||||
static int
|
||||
svg_paintable_get_intrinsic_height (GdkPaintable *paintable)
|
||||
{
|
||||
SvgPaintable *self = SVG_PAINTABLE (paintable);
|
||||
RsvgDimensionData data;
|
||||
|
||||
rsvg_handle_get_dimensions (self->handle, &data);
|
||||
|
||||
return data.height;
|
||||
}
|
||||
|
||||
static void
|
||||
svg_paintable_init_interface (GdkPaintableInterface *iface)
|
||||
{
|
||||
iface->snapshot = svg_paintable_snapshot;
|
||||
iface->get_intrinsic_width = svg_paintable_get_intrinsic_width;
|
||||
iface->get_intrinsic_height = svg_paintable_get_intrinsic_height;
|
||||
}
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (SvgPaintable, svg_paintable, G_TYPE_OBJECT,
|
||||
G_IMPLEMENT_INTERFACE (GDK_TYPE_PAINTABLE,
|
||||
svg_paintable_init_interface))
|
||||
|
||||
static void
|
||||
svg_paintable_init (SvgPaintable *self)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
svg_paintable_dispose (GObject *object)
|
||||
{
|
||||
SvgPaintable *self = SVG_PAINTABLE (object);
|
||||
|
||||
g_clear_object (&self->file);
|
||||
g_clear_object (&self->handle);
|
||||
|
||||
G_OBJECT_CLASS (svg_paintable_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
svg_paintable_set_property (GObject *object,
|
||||
guint prop_id,
|
||||
const GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
SvgPaintable *self = SVG_PAINTABLE (object);
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_FILE:
|
||||
{
|
||||
GFile *file = g_value_get_object (value);
|
||||
RsvgHandle *handle = rsvg_handle_new_from_gfile_sync (file,
|
||||
RSVG_HANDLE_FLAGS_NONE,
|
||||
NULL,
|
||||
NULL);
|
||||
rsvg_handle_set_dpi (handle, 90);
|
||||
|
||||
g_set_object (&self->file, file);
|
||||
g_set_object (&self->handle, handle);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
svg_paintable_get_property (GObject *object,
|
||||
guint prop_id,
|
||||
GValue *value,
|
||||
GParamSpec *pspec)
|
||||
{
|
||||
SvgPaintable *self = SVG_PAINTABLE (object);
|
||||
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_FILE:
|
||||
g_value_set_object (value, self->file);
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
svg_paintable_class_init (SvgPaintableClass *class)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (class);
|
||||
|
||||
object_class->dispose = svg_paintable_dispose;
|
||||
object_class->set_property = svg_paintable_set_property;
|
||||
object_class->get_property = svg_paintable_get_property;
|
||||
|
||||
g_object_class_install_property (object_class, PROP_FILE,
|
||||
g_param_spec_object ("file", "File", "File",
|
||||
G_TYPE_FILE,
|
||||
G_PARAM_READWRITE));
|
||||
}
|
||||
|
||||
GdkPaintable *
|
||||
svg_paintable_new (GFile *file)
|
||||
{
|
||||
return g_object_new (SVG_TYPE_PAINTABLE,
|
||||
"file", file,
|
||||
NULL);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define SVG_TYPE_PAINTABLE (svg_paintable_get_type ())
|
||||
|
||||
G_DECLARE_FINAL_TYPE (SvgPaintable, svg_paintable, SVG, PAINTABLE, GObject)
|
||||
|
||||
GdkPaintable * svg_paintable_new (GFile *file);
|
||||
|
||||
G_END_DECLS
|
||||
@@ -13,9 +13,6 @@
|
||||
</section>
|
||||
</menu>
|
||||
<template class="IconBrowserWindow" parent="GtkApplicationWindow">
|
||||
<style>
|
||||
<class name="devel"/>
|
||||
</style>
|
||||
<property name="title" translatable="yes">Icon Browser</property>
|
||||
<property name="default-width">1024</property>
|
||||
<property name="default-height">768</property>
|
||||
@@ -66,11 +63,14 @@
|
||||
<object class="GtkBox">
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<style>
|
||||
<class name="sidebar"/>
|
||||
</style>
|
||||
<property name="hscrollbar-policy">never</property>
|
||||
<child>
|
||||
<object class="GtkListView">
|
||||
<style>
|
||||
<class name="navigation-sidebar" />
|
||||
<class name="navigation-sidebar"/>
|
||||
</style>
|
||||
<property name="model">
|
||||
<object class="GtkSingleSelection" id="context_model">
|
||||
@@ -108,11 +108,6 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparator">
|
||||
<property name="orientation">vertical</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="content_box">
|
||||
<property name="orientation">vertical</property>
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow" id="window">
|
||||
<style>
|
||||
<class name="devel"/>
|
||||
</style>
|
||||
<property name="title" translatable="yes">Help</property>
|
||||
<property name="default-width">720</property>
|
||||
<property name="default-height">520</property>
|
||||
|
||||
@@ -102,12 +102,11 @@ text_buffer_remove_all_tags (GtkTextBuffer *buffer)
|
||||
}
|
||||
|
||||
static void
|
||||
deserialize_error_func (const GtkCssSection *section,
|
||||
const GError *error,
|
||||
gpointer user_data)
|
||||
deserialize_error_func (const GskParseLocation *start_location,
|
||||
const GskParseLocation *end_location,
|
||||
const GError *error,
|
||||
gpointer user_data)
|
||||
{
|
||||
const GtkCssLocation *start_location = gtk_css_section_get_start_location (section);
|
||||
const GtkCssLocation *end_location = gtk_css_section_get_end_location (section);
|
||||
NodeEditorWindow *self = user_data;
|
||||
GtkTextIter start_iter, end_iter;
|
||||
TextViewError text_view_error;
|
||||
@@ -466,7 +465,7 @@ save_response_cb (GtkWidget *dialog,
|
||||
text = get_current_text (self->text_buffer);
|
||||
|
||||
file = gtk_file_chooser_get_file (GTK_FILE_CHOOSER (dialog));
|
||||
g_file_replace_contents (file, text, -1,
|
||||
g_file_replace_contents (file, text, strlen (text),
|
||||
NULL, FALSE,
|
||||
G_FILE_CREATE_NONE,
|
||||
NULL,
|
||||
|
||||
@@ -94,9 +94,6 @@
|
||||
</object>
|
||||
|
||||
<template class="NodeEditorWindow" parent="GtkApplicationWindow">
|
||||
<style>
|
||||
<class name="devel"/>
|
||||
</style>
|
||||
<property name="title" translatable="yes">GTK Node Editor</property>
|
||||
<property name="default-width">1024</property>
|
||||
<property name="default-height">768</property>
|
||||
|
||||
@@ -812,8 +812,6 @@ activate (GApplication *app)
|
||||
gtk_application_window_set_show_menubar (GTK_APPLICATION_WINDOW (main_window), TRUE);
|
||||
update_title (GTK_WINDOW (main_window));
|
||||
|
||||
gtk_widget_add_css_class (main_window, "devel");
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
gtk_window_set_child (GTK_WINDOW (main_window), box);
|
||||
|
||||
|
||||
@@ -433,9 +433,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
</columns>
|
||||
</object>
|
||||
<object class="GtkApplicationWindow" id="window">
|
||||
<style>
|
||||
<class name="devel"/>
|
||||
</style>
|
||||
<property name="title">GTK Widget Factory</property>
|
||||
<child type="titlebar">
|
||||
<object class="GtkHeaderBar" id="headerbar1">
|
||||
@@ -1145,7 +1142,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label">Caption</property>
|
||||
<style><class name="Caption"/></style>
|
||||
<style><class name="caption"/></style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
@@ -3304,246 +3301,6 @@ bad things might happen.</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkPopover" id="new_style_menu">
|
||||
<style><class name="menu"/></style>
|
||||
<child>
|
||||
<object class="GtkStack">
|
||||
<child>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">main</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<style>
|
||||
<class name="circular-buttons"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="icon">
|
||||
<object class="GThemedIcon">
|
||||
<property name="name">printer-symbolic</property>
|
||||
</object>
|
||||
</property>
|
||||
<property name="iconic">1</property>
|
||||
<property name="action-name">win.print</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="halign">center</property>
|
||||
<style>
|
||||
<class name="circular"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="icon">
|
||||
<object class="GThemedIcon">
|
||||
<property name="name">emblem-shared-symbolic</property>
|
||||
</object>
|
||||
</property>
|
||||
<property name="iconic">1</property>
|
||||
<property name="action-name">app.share</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="halign">center</property>
|
||||
<style>
|
||||
<class name="circular"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparator"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="text">Open in New Window</property>
|
||||
<property name="action-name">app.open-in</property>
|
||||
<property name="indicator-size-group">main-indicators</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparator"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<style>
|
||||
<class name="inline-buttons"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkLabel" id="cut_copy_paste_filler"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="label">Edit</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="hexpand">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="icon">
|
||||
<object class="GThemedIcon">
|
||||
<property name="name">edit-cut-symbolic</property>
|
||||
</object>
|
||||
</property>
|
||||
<property name="iconic">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="icon">
|
||||
<object class="GThemedIcon">
|
||||
<property name="name">edit-copy-symbolic</property>
|
||||
</object>
|
||||
</property>
|
||||
<property name="iconic">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="icon">
|
||||
<object class="GThemedIcon">
|
||||
<property name="name">edit-paste-symbolic</property>
|
||||
</object>
|
||||
</property>
|
||||
<property name="iconic">1</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparator"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="text">Pin</property>
|
||||
<property name="action-name">app.pin</property>
|
||||
<property name="indicator-size-group">main-indicators</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="text">Select Labels…</property>
|
||||
<property name="action-name">app.labels</property>
|
||||
<property name="indicator-size-group">main-indicators</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="text">Share…</property>
|
||||
<property name="action-name">app.share</property>
|
||||
<property name="indicator-size-group">main-indicators</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparator"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="text">Basement</property>
|
||||
<property name="menu-name">basement</property>
|
||||
<property name="indicator-size-group">main-indicators</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparator"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="text">Large</property>
|
||||
<property name="action-name">app.size</property>
|
||||
<property name="action-target">'large'</property>
|
||||
<property name="indicator-size-group">main-indicators</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="text">Medium</property>
|
||||
<property name="action-name">app.size</property>
|
||||
<property name="action-target">'medium'</property>
|
||||
<property name="indicator-size-group">main-indicators</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="text">Small</property>
|
||||
<property name="action-name">app.size</property>
|
||||
<property name="action-target">'small'</property>
|
||||
<property name="indicator-size-group">main-indicators</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparator"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="text">Move to Trash</property>
|
||||
<property name="action-name">win.delete</property>
|
||||
<property name="indicator-size-group">main-indicators</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStackPage">
|
||||
<property name="name">basement</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="text">Basement</property>
|
||||
<property name="role">title</property>
|
||||
<property name="menu-name">main</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparator"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="text">Berk</property>
|
||||
<property name="action-name">app.berk</property>
|
||||
<property name="indicator-size-group">basement-indicators</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="text">Broni</property>
|
||||
<property name="action-name">app.broni</property>
|
||||
<property name="indicator-size-group">basement-indicators</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="text">Drutt</property>
|
||||
<property name="action-name">app.drutt</property>
|
||||
<property name="indicator-size-group">basement-indicators</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="text">The Thing Upstairs</property>
|
||||
<property name="action-name">app.upstairs</property>
|
||||
<property name="indicator-size-group">basement-indicators</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkSizeGroup" id="main-indicators">
|
||||
<widgets>
|
||||
<widget name="cut_copy_paste_filler"/>
|
||||
</widgets>
|
||||
</object>
|
||||
<object class="GtkSizeGroup" id="basement-indicators"/>
|
||||
<menu id="new_style_menu_model">
|
||||
<section>
|
||||
|
||||
@@ -965,7 +965,7 @@ gdk_wayland_seat_get_wl_seat
|
||||
gdk_wayland_device_get_wl_seat
|
||||
gdk_wayland_device_get_wl_pointer
|
||||
gdk_wayland_device_get_wl_keyboard
|
||||
gdk_wayland_device_get_node_ath
|
||||
gdk_wayland_device_get_node_path
|
||||
|
||||
<SUBSECTION Monitor>
|
||||
gdk_wayland_monitor_get_wl_output
|
||||
|
||||
@@ -64,46 +64,46 @@ gsk_render_node_get_bounds
|
||||
|
||||
<SUBSECTION Nodes>
|
||||
gsk_color_node_new
|
||||
gsk_color_node_peek_color
|
||||
gsk_color_node_get_color
|
||||
gsk_texture_node_new
|
||||
gsk_texture_node_get_texture
|
||||
GskColorStop
|
||||
gsk_linear_gradient_node_new
|
||||
gsk_linear_gradient_node_peek_start
|
||||
gsk_linear_gradient_node_peek_end
|
||||
gsk_linear_gradient_node_get_start
|
||||
gsk_linear_gradient_node_get_end
|
||||
gsk_linear_gradient_node_get_n_color_stops
|
||||
gsk_linear_gradient_node_peek_color_stops
|
||||
gsk_linear_gradient_node_get_color_stops
|
||||
gsk_repeating_linear_gradient_node_new
|
||||
gsk_radial_gradient_node_new
|
||||
gsk_radial_gradient_node_get_n_color_stops
|
||||
gsk_radial_gradient_node_peek_color_stops
|
||||
gsk_radial_gradient_node_get_color_stops
|
||||
gsk_radial_gradient_node_get_start
|
||||
gsk_radial_gradient_node_get_end
|
||||
gsk_radial_gradient_node_get_hradius
|
||||
gsk_radial_gradient_node_get_vradius
|
||||
gsk_radial_gradient_node_peek_center
|
||||
gsk_radial_gradient_node_get_center
|
||||
gsk_repeating_radial_gradient_node_new
|
||||
gsk_border_node_new
|
||||
gsk_border_node_peek_outline
|
||||
gsk_border_node_peek_widths
|
||||
gsk_border_node_peek_colors
|
||||
gsk_border_node_get_outline
|
||||
gsk_border_node_get_widths
|
||||
gsk_border_node_get_colors
|
||||
gsk_inset_shadow_node_new
|
||||
gsk_inset_shadow_node_peek_outline
|
||||
gsk_inset_shadow_node_peek_color
|
||||
gsk_inset_shadow_node_get_outline
|
||||
gsk_inset_shadow_node_get_color
|
||||
gsk_inset_shadow_node_get_dx
|
||||
gsk_inset_shadow_node_get_dy
|
||||
gsk_inset_shadow_node_get_spread
|
||||
gsk_inset_shadow_node_get_blur_radius
|
||||
gsk_outset_shadow_node_new
|
||||
gsk_outset_shadow_node_peek_outline
|
||||
gsk_outset_shadow_node_peek_color
|
||||
gsk_outset_shadow_node_get_outline
|
||||
gsk_outset_shadow_node_get_color
|
||||
gsk_outset_shadow_node_get_dx
|
||||
gsk_outset_shadow_node_get_dy
|
||||
gsk_outset_shadow_node_get_spread
|
||||
gsk_outset_shadow_node_get_blur_radius
|
||||
gsk_cairo_node_new
|
||||
gsk_cairo_node_get_draw_context
|
||||
gsk_cairo_node_peek_surface
|
||||
gsk_cairo_node_get_surface
|
||||
gsk_container_node_new
|
||||
gsk_container_node_get_n_children
|
||||
gsk_container_node_get_child
|
||||
@@ -115,20 +115,20 @@ gsk_opacity_node_get_child
|
||||
gsk_opacity_node_get_opacity
|
||||
gsk_color_matrix_node_new
|
||||
gsk_color_matrix_node_get_child
|
||||
gsk_color_matrix_node_peek_color_matrix
|
||||
gsk_color_matrix_node_peek_color_offset
|
||||
gsk_color_matrix_node_get_color_matrix
|
||||
gsk_color_matrix_node_get_color_offset
|
||||
gsk_repeat_node_new
|
||||
gsk_repeat_node_get_child
|
||||
gsk_repeat_node_peek_child_bounds
|
||||
gsk_repeat_node_get_child_bounds
|
||||
gsk_clip_node_new
|
||||
gsk_clip_node_get_child
|
||||
gsk_clip_node_peek_clip
|
||||
gsk_clip_node_get_clip
|
||||
gsk_rounded_clip_node_new
|
||||
gsk_rounded_clip_node_get_child
|
||||
gsk_rounded_clip_node_peek_clip
|
||||
gsk_rounded_clip_node_get_clip
|
||||
GskShadow
|
||||
gsk_shadow_node_new
|
||||
gsk_shadow_node_peek_shadow
|
||||
gsk_shadow_node_get_shadow
|
||||
gsk_shadow_node_get_n_shadows
|
||||
gsk_shadow_node_get_child
|
||||
GskBlendMode
|
||||
@@ -141,9 +141,9 @@ gsk_cross_fade_node_get_start_child
|
||||
gsk_cross_fade_node_get_end_child
|
||||
gsk_cross_fade_node_get_progress
|
||||
gsk_text_node_new
|
||||
gsk_text_node_peek_font
|
||||
gsk_text_node_peek_glyphs
|
||||
gsk_text_node_peek_color
|
||||
gsk_text_node_get_font
|
||||
gsk_text_node_get_glyphs
|
||||
gsk_text_node_get_color
|
||||
gsk_text_node_has_color_glyphs
|
||||
gsk_text_node_get_num_glyphs
|
||||
gsk_text_node_get_offset
|
||||
|
||||
@@ -107,7 +107,9 @@ The `plain` build type provided by Meson should only be used when
|
||||
packaging GTK, and it's expected that packagers will provide their
|
||||
own compiler flags when building GTK. See the previous section for
|
||||
the list of environment variables to be used to define compiler and
|
||||
linker flags.
|
||||
linker flags. Note that with the plain build type, you are also
|
||||
responsible for controlling the debugging features of GTK with
|
||||
`-DG_ENABLE_DEBUG` and `-DG_DISABLE_CAST_CHECKS`.
|
||||
|
||||
## Dependencies {#dependencies}
|
||||
|
||||
@@ -159,7 +161,8 @@ Other libraries are maintained separately.
|
||||
fonts and matching them against font names.
|
||||
- [Cairo](https://www.cairographics.org) is a graphics library that
|
||||
supports vector graphics and image compositing. Both Pango and GTK
|
||||
use Cairo for drawing.
|
||||
use Cairo for drawing. Note that we also need the auxiliary cairo-gobject
|
||||
library.
|
||||
- [libepoxy](https://github.com/anholt/libepoxy) is a library that
|
||||
abstracts the differences between different OpenGL libraries. GTK
|
||||
uses it for cross-platform GL support and for its own drawing.
|
||||
|
||||
@@ -1432,6 +1432,7 @@ GTK_TYPE_BOOKMARK_LIST
|
||||
<FILE>gtkfilter</FILE>
|
||||
<TITLE>GtkFilter</TITLE>
|
||||
GtkFilter
|
||||
GtkFilterMatch
|
||||
gtk_filter_match
|
||||
gtk_filter_get_strictness
|
||||
<SUBSECTION>
|
||||
@@ -2107,6 +2108,7 @@ gtk_native_dialog_get_type
|
||||
<TITLE>GtkNotebook</TITLE>
|
||||
GtkNotebook
|
||||
GtkNotebookPage
|
||||
GtkNotebookTab
|
||||
gtk_notebook_new
|
||||
gtk_notebook_get_page
|
||||
gtk_notebook_get_pages
|
||||
@@ -2163,7 +2165,6 @@ GTK_NOTEBOOK_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
gtk_notebook_get_type
|
||||
gtk_notebook_page_get_type
|
||||
GtkNotebookTab
|
||||
GtkNotebookPrivate
|
||||
</SECTION>
|
||||
|
||||
@@ -4335,7 +4336,6 @@ gtk_snapshot_render_background
|
||||
gtk_snapshot_render_frame
|
||||
gtk_snapshot_render_focus
|
||||
gtk_snapshot_render_layout
|
||||
gtk_snapshot_render_insertion_cursor
|
||||
<SUBSECTION Private>
|
||||
gtk_snapshot_get_type
|
||||
</SECTION>
|
||||
@@ -4845,7 +4845,6 @@ gtk_render_line
|
||||
gtk_render_option
|
||||
gtk_render_activity
|
||||
gtk_render_icon
|
||||
gtk_render_insertion_cursor
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_TYPE_STYLE_CONTEXT
|
||||
|
||||
@@ -445,6 +445,9 @@ gtk4-builder-tool simplify command can perform many of the
|
||||
necessary changes automatically, when called with the --3to4
|
||||
option. You should always review the resulting changes.
|
||||
|
||||
The <requires> tag now supports for the 'lib' attribute the
|
||||
'gtk' value only, instead of the 'gtk+' one previously.
|
||||
|
||||
### Adapt to event controller API changes
|
||||
|
||||
A few changes to the event controller and #GtkGesture APIs
|
||||
@@ -1133,6 +1136,14 @@ gtk_buildable_get_buildable_id().
|
||||
GtkAboutDialog now directly derives from GtkWindow, the GtkDialog API can no
|
||||
longer be used on it.
|
||||
|
||||
### Adapt to GtkTreeView and GtkIconView tooltip context changes
|
||||
|
||||
The getter functions for retrieving the data from #GtkTreeView
|
||||
and #GtkIconView inside a #GtkWidget::query-tooltip signal do not take the
|
||||
pointer coordinates as inout arguments any more, but as normal in ones.
|
||||
|
||||
See: gtk_tree_view_get_tooltip_context(), gtk_icon_view_get_tooltip_context()
|
||||
|
||||
## Changes to consider after the switch
|
||||
|
||||
GTK 4 has a number of new features that you may want to take
|
||||
|
||||
@@ -11,9 +11,9 @@ environment variables.
|
||||
|
||||
### GTK_DEBUG {#GTK_Debug-Options}
|
||||
|
||||
Unless GTK has been configured with `-Ddebug=false`, this variable
|
||||
can be set to a list of debug options, which cause GTK to print out
|
||||
different types of debugging information.
|
||||
This variable can be set to a list of debug options, which cause GTK to
|
||||
print out different types of debugging information. Some of these options
|
||||
are only available when GTK has been configured with `-Ddebug=true`.
|
||||
|
||||
actions
|
||||
: Actions and menu models
|
||||
@@ -98,6 +98,14 @@ be used for the default IM module. This also can be a colon-separated
|
||||
list of input-methods, which GTK will try in turn until it finds one
|
||||
available on the system.
|
||||
|
||||
### GTK_MEDIA
|
||||
|
||||
Specifies what backend to load for #GtkMediaFile. The possible values
|
||||
depend on what options GTK was built with, and can include 'gstreamer',
|
||||
'ffmpeg' and 'none'. If set to 'none', media playback will be unavailable.
|
||||
The special value 'help' can be used to obtain a list of all supported
|
||||
media backends.
|
||||
|
||||
### GTK_EXE_PREFIX
|
||||
|
||||
If set, GTK uses `$GTK_EXE_PREFIX/lib` instead of the libdir
|
||||
@@ -133,9 +141,9 @@ The `loaders.cache` file is generated by the
|
||||
|
||||
### GDK_DEBUG
|
||||
|
||||
Unless GTK has been configured with `-Ddebug=false`, this variable
|
||||
can be set to a list of debug options, which cause GDK to print out
|
||||
different types of debugging information.
|
||||
This variable can be set to a list of debug options, which cause GDK to
|
||||
print out different types of debugging information. Some of these options
|
||||
are only available when GTK has been configured with `-Ddebug=true`.
|
||||
|
||||
cursor
|
||||
: Information about cursor objects (only win32)
|
||||
@@ -183,10 +191,9 @@ to obtain a list of all supported debug options.
|
||||
|
||||
### GSK_DEBUG {#GSK-Debug-Options}
|
||||
|
||||
Unless GTK has been configured with `-Ddebug=false`,
|
||||
this variable can be set to a list of debug options,
|
||||
which cause GSK to print out different types of debugging
|
||||
information.
|
||||
This variable can be set to a list of debug options, which cause GSK to
|
||||
print out different types of debugging information. Some of these options
|
||||
are only available when GTK has been configured with `-Ddebug=true`.
|
||||
|
||||
renderer
|
||||
: General renderer information
|
||||
@@ -285,6 +292,24 @@ CSD is always used for windows with a custom titlebar widget set,
|
||||
as the WM should not draw another titlebar or other decorations
|
||||
around the custom one.
|
||||
|
||||
### GTK_A11Y
|
||||
|
||||
If set, selects the accessibility backend to use. The following
|
||||
backends can be selected, provided they are included in the GTK
|
||||
library you are using:
|
||||
|
||||
help
|
||||
: Prints information about available options
|
||||
atspi
|
||||
: Selects the AT-SPI accessibility backend
|
||||
test
|
||||
: Selects the test backend
|
||||
none
|
||||
: Disables the accessibility backend
|
||||
|
||||
The `test` accessibility backend is recommended for test suites and remote
|
||||
continuous integration pipelines.
|
||||
|
||||
### XDG_DTA_HOME, XDG_DATA_DIRS
|
||||
|
||||
GTK uses these environment variables to locate icon themes
|
||||
|
||||
@@ -165,13 +165,13 @@ Each relation name is part of the #GtkAccessibleRelation enumeration.
|
||||
| %GTK_ACCESSIBLE_RELATION_COL_INDEX | “aria-colindex” | integer |
|
||||
| %GTK_ACCESSIBLE_RELATION_COL_INDEX_TEXT | “aria-colindextext” | translatable string |
|
||||
| %GTK_ACCESSIBLE_RELATION_COL_SPAN | “aria-colspan” | integer |
|
||||
| %GTK_ACCESSIBLE_RELATION_CONTROLS | “aria-controls” | a #GList of #GtkAccessible |
|
||||
| %GTK_ACCESSIBLE_RELATION_DESCRIBED_BY | “aria-describedby” | a #GList of #GtkAccessible |
|
||||
| %GTK_ACCESSIBLE_RELATION_DETAILS | “aria-details” | a #GList of #GtkAccessible |
|
||||
| %GTK_ACCESSIBLE_RELATION_CONTROLS | “aria-controls” | a list of #GtkAccessible |
|
||||
| %GTK_ACCESSIBLE_RELATION_DESCRIBED_BY | “aria-describedby” | a list of #GtkAccessible |
|
||||
| %GTK_ACCESSIBLE_RELATION_DETAILS | “aria-details” | a list of #GtkAccessible |
|
||||
| %GTK_ACCESSIBLE_RELATION_ERROR_MESSAGE | “aria-errormessage” | #GtkAccessible |
|
||||
| %GTK_ACCESSIBLE_RELATION_FLOW_TO | “aria-flowto” | a #GList of #GtkAccessible |
|
||||
| %GTK_ACCESSIBLE_RELATION_LABELLED_BY | “aria-labelledby” | a #GList of #GtkAccessible |
|
||||
| %GTK_ACCESSIBLE_RELATION_OWNS | “aria-owns” | a #GList of #GtkAccessible |
|
||||
| %GTK_ACCESSIBLE_RELATION_FLOW_TO | “aria-flowto” | a list of #GtkAccessible |
|
||||
| %GTK_ACCESSIBLE_RELATION_LABELLED_BY | “aria-labelledby” | a list of #GtkAccessible |
|
||||
| %GTK_ACCESSIBLE_RELATION_OWNS | “aria-owns” | a list of #GtkAccessible |
|
||||
| %GTK_ACCESSIBLE_RELATION_POS_IN_SET | “aria-posinset” | integer |
|
||||
| %GTK_ACCESSIBLE_RELATION_ROW_COUNT | “aria-rowcount” | integer |
|
||||
| %GTK_ACCESSIBLE_RELATION_ROW_INDEX | “aria-rowindex” | integer |
|
||||
@@ -179,6 +179,10 @@ Each relation name is part of the #GtkAccessibleRelation enumeration.
|
||||
| %GTK_ACCESSIBLE_RELATION_ROW_SPAN | “aria-rowspan” | integer |
|
||||
| %GTK_ACCESSIBLE_RELATION_SET_SIZE | “aria-setsize” | integer |
|
||||
|
||||
*Note*: When using gtk_accessible_update_relation() with a relation that
|
||||
requires a list of #GtkAccessible instances, you should pass every
|
||||
accessible object separately, followed by %NULL.
|
||||
|
||||
## Application development rules
|
||||
|
||||
Even if standard UI controls provided by GTK have accessibility information
|
||||
@@ -292,12 +296,36 @@ The power of hiding and enhancing can be a double-edged sword, as it can
|
||||
lead to inadvertently overriding the accessible semantics of existing
|
||||
widgets.
|
||||
|
||||
## Hiding UI elements from the accessible tree
|
||||
|
||||
The accessibility API is mainly used to express semantics useful for
|
||||
assistive technologies, but it can also be used to hide elements. The
|
||||
canonical way to do so is to use the %GTK_ACCESSIBLE_ROLE_PRESENTATION,
|
||||
which declares that a UI element is purely meant for presentation purposes,
|
||||
and as such it has no meaningful impact on the accessibility of the
|
||||
interface.
|
||||
|
||||
A "presentation" role should not be confused with the
|
||||
%GTK_ACCESSIBLE_STATE_HIDDEN state; the "hidden" state is transient, and is
|
||||
typically controlled by showing and hiding a widget using the #GtkWidget
|
||||
API.
|
||||
|
||||
## Design patterns and custom widgets
|
||||
|
||||
When creating custom widgets, following established patterns can help
|
||||
ensuring that the widgets work well for users of accessible technologies
|
||||
as well.
|
||||
|
||||
### Buttons
|
||||
|
||||
A button is a widget that enables users to trigger an action. While it is
|
||||
recommended you use #GtkButton for anything that looks and behaves like a
|
||||
button, it is possible to apply a button behavior to UI elements like images
|
||||
by using a #GtkGestureClick gesture. When doing so, you should:
|
||||
|
||||
- Give your widget the role %GTK_ACCESSIBLE_ROLE_BUTTON
|
||||
- Install an action with no parameters, which will activate the widget
|
||||
|
||||
### Custom entries
|
||||
|
||||
For custom entries, it is highly recommended that you implement the
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
<interface>
|
||||
<!-- interface-requires gtk+ 3.17 -->
|
||||
<object class="GtkShortcutsWindow" id="help_overlay">
|
||||
<property name="modal">1</property>
|
||||
<child>
|
||||
|
||||
@@ -45,6 +45,7 @@ typedef struct
|
||||
const char *key;
|
||||
guint value;
|
||||
const char *help;
|
||||
gboolean always_enabled;
|
||||
} GdkDebugKey;
|
||||
|
||||
guint gdk_parse_debug_var (const char *variable,
|
||||
|
||||
@@ -128,7 +128,6 @@ static int gdk_initialized = 0; /* 1 if the library is initi
|
||||
* 0 otherwise.
|
||||
*/
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
static const GdkDebugKey gdk_debug_keys[] = {
|
||||
{ "misc", GDK_DEBUG_MISC, "Miscellaneous information" },
|
||||
{ "events", GDK_DEBUG_EVENTS, "Information about events" },
|
||||
@@ -152,7 +151,6 @@ static const GdkDebugKey gdk_debug_keys[] = {
|
||||
{ "vulkan-validate", GDK_DEBUG_VULKAN_VALIDATE, "Load the Vulkan validation layer" },
|
||||
{ "default-settings",GDK_DEBUG_DEFAULT_SETTINGS, "Force default values for xsettings" },
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef G_HAS_CONSTRUCTORS
|
||||
@@ -212,6 +210,13 @@ gdk_parse_debug_var (const char *variable,
|
||||
const char *q;
|
||||
gboolean invert;
|
||||
gboolean help;
|
||||
gboolean debug_enabled;
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
debug_enabled = TRUE;
|
||||
#else
|
||||
debug_enabled = FALSE;
|
||||
#endif
|
||||
|
||||
string = g_getenv (variable);
|
||||
if (string == NULL)
|
||||
@@ -237,21 +242,25 @@ gdk_parse_debug_var (const char *variable,
|
||||
}
|
||||
else
|
||||
{
|
||||
char *val = g_strndup (p, q - p);
|
||||
for (i = 0; i < nkeys; i++)
|
||||
{
|
||||
if (strlen (keys[i].key) == q - p &&
|
||||
g_ascii_strncasecmp (keys[i].key, p, q - p) == 0)
|
||||
{
|
||||
if (!debug_enabled && !keys[i].always_enabled)
|
||||
{
|
||||
fprintf (stderr, "\"%s\" is only available when building GTK with G_ENABLE_DEBUG. See %s=help\n",
|
||||
val, variable);
|
||||
break;
|
||||
}
|
||||
result |= keys[i].value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i == nkeys)
|
||||
{
|
||||
char *val = g_strndup (p, q - p);
|
||||
fprintf (stderr, "Unrecognized value \"%s\". Try %s=help\n", val, variable);
|
||||
g_free (val);
|
||||
}
|
||||
fprintf (stderr, "Unrecognized value \"%s\". Try %s=help\n", val, variable);
|
||||
g_free (val);
|
||||
}
|
||||
|
||||
p = q;
|
||||
@@ -267,11 +276,17 @@ gdk_parse_debug_var (const char *variable,
|
||||
max_width += 4;
|
||||
|
||||
fprintf (stderr, "Supported %s values:\n", variable);
|
||||
for (i = 0; i < nkeys; i++)
|
||||
fprintf (stderr, " %s%*s%s\n", keys[i].key, (int)(max_width - strlen (keys[i].key)), " ", keys[i].help);
|
||||
for (i = 0; i < nkeys; i++) {
|
||||
fprintf (stderr, " %s%*s%s", keys[i].key, (int)(max_width - strlen (keys[i].key)), " ", keys[i].help);
|
||||
if (!debug_enabled && !keys[i].always_enabled)
|
||||
fprintf (stderr, " [unavailable]");
|
||||
fprintf (stderr, "\n");
|
||||
}
|
||||
fprintf (stderr, " %s%*s%s\n", "all", max_width - 3, " ", "Enable all values");
|
||||
fprintf (stderr, " %s%*s%s\n", "help", max_width - 4, " ", "Print this help");
|
||||
fprintf (stderr, "\nMultiple values can be given, separated by : or space.\n");
|
||||
if (!debug_enabled)
|
||||
fprintf (stderr, "Values marked as [unavailable] are only accessible if GTK is built with G_ENABLE_DEBUG.\n");
|
||||
}
|
||||
|
||||
if (invert)
|
||||
@@ -279,7 +294,10 @@ gdk_parse_debug_var (const char *variable,
|
||||
guint all_flags = 0;
|
||||
|
||||
for (i = 0; i < nkeys; i++)
|
||||
all_flags |= keys[i].value;
|
||||
{
|
||||
if (debug_enabled || keys[i].always_enabled)
|
||||
all_flags |= keys[i].value;
|
||||
}
|
||||
|
||||
result = all_flags & (~result);
|
||||
}
|
||||
@@ -294,14 +312,9 @@ gdk_pre_parse (void)
|
||||
|
||||
gdk_ensure_resources ();
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
_gdk_debug_flags = gdk_parse_debug_var ("GDK_DEBUG",
|
||||
gdk_debug_keys,
|
||||
G_N_ELEMENTS (gdk_debug_keys));
|
||||
#else
|
||||
if (g_getenv ("GDK_DEBUG"))
|
||||
g_warning ("GDK_DEBUG set but ignored because GTK isn't built with G_ENABLE_DEBUG");
|
||||
#endif /* G_ENABLE_DEBUG */
|
||||
|
||||
#ifndef G_HAS_CONSTRUCTORS
|
||||
stash_desktop_startup_notification_id ();
|
||||
|
||||
+4
-4
@@ -272,9 +272,9 @@ gdk_cursor_equal (gconstpointer a,
|
||||
|
||||
/**
|
||||
* gdk_cursor_new_from_name:
|
||||
* @name: the name of the cursor
|
||||
* @fallback: (allow-none): %NULL or the #GdkCursor to fall back to when
|
||||
* this one cannot be supported
|
||||
* @name: the name of the cursor
|
||||
*
|
||||
* Creates a new cursor by looking up @name in the current cursor
|
||||
* theme.
|
||||
@@ -321,9 +321,9 @@ gdk_cursor_equal (gconstpointer a,
|
||||
* Returns: (nullable): a new #GdkCursor, or %NULL if there is no
|
||||
* cursor with the given name
|
||||
*/
|
||||
GdkCursor*
|
||||
GdkCursor *
|
||||
gdk_cursor_new_from_name (const char *name,
|
||||
GdkCursor *fallback)
|
||||
GdkCursor *fallback)
|
||||
{
|
||||
g_return_val_if_fail (name != NULL, NULL);
|
||||
g_return_val_if_fail (fallback == NULL || GDK_IS_CURSOR (fallback), NULL);
|
||||
@@ -357,7 +357,7 @@ gdk_cursor_new_from_texture (GdkTexture *texture,
|
||||
g_return_val_if_fail (0 <= hotspot_y && hotspot_y < gdk_texture_get_height (texture), NULL);
|
||||
g_return_val_if_fail (fallback == NULL || GDK_IS_CURSOR (fallback), NULL);
|
||||
|
||||
return g_object_new (GDK_TYPE_CURSOR,
|
||||
return g_object_new (GDK_TYPE_CURSOR,
|
||||
"texture", texture,
|
||||
"hotspot-x", hotspot_x,
|
||||
"hotspot-y", hotspot_y,
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ typedef enum
|
||||
* GdkTimeCoord:
|
||||
* @time: The timestamp for this event.
|
||||
* @flags: Flags indicating what axes are present
|
||||
* @axes: axis values
|
||||
* @axes: (array fixed-size=12): axis values
|
||||
*
|
||||
* A #GdkTimeCoord stores a single event in a motion history.
|
||||
*/
|
||||
|
||||
@@ -300,10 +300,10 @@ gdk_popup_layout_set_offset (GdkPopupLayout *layout,
|
||||
/**
|
||||
* gdk_popup_layout_get_offset:
|
||||
* @layout: a #GdkPopupLayout
|
||||
* @dx: a pointer to where to store the delta x coordinate
|
||||
* @dy: a pointer to where to store the delta y coordinate
|
||||
* @dx: (out): return location for the delta X coordinate
|
||||
* @dy: (out): return location for the delta Y coordinate
|
||||
*
|
||||
* Get the delta the anchor rectangle is offset with
|
||||
* Retrieves the offset for the anchor rectangle.
|
||||
*/
|
||||
void
|
||||
gdk_popup_layout_get_offset (GdkPopupLayout *layout,
|
||||
|
||||
+20
-17
@@ -1408,9 +1408,13 @@ impl_surface_add_update_area (GdkSurface *impl_surface,
|
||||
void
|
||||
gdk_surface_queue_render (GdkSurface *surface)
|
||||
{
|
||||
cairo_region_t *region;
|
||||
|
||||
g_return_if_fail (GDK_IS_SURFACE (surface));
|
||||
|
||||
gdk_surface_invalidate_rect (surface, NULL);
|
||||
region = cairo_region_create ();
|
||||
impl_surface_add_update_area (surface, region);
|
||||
cairo_region_destroy (region);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1491,9 +1495,7 @@ gdk_surface_freeze_updates (GdkSurface *surface)
|
||||
|
||||
surface->update_freeze_count++;
|
||||
if (surface->update_freeze_count == 1)
|
||||
{
|
||||
_gdk_frame_clock_uninhibit_freeze (surface->frame_clock);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2657,18 +2659,6 @@ gdk_synthesize_surface_state (GdkSurface *surface,
|
||||
gdk_surface_set_state (surface, (surface->state | set_flags) & ~unset_flags);
|
||||
}
|
||||
|
||||
static void
|
||||
hide_popup_chain (GdkSurface *surface)
|
||||
{
|
||||
GdkSurface *parent;
|
||||
|
||||
gdk_surface_hide (surface);
|
||||
|
||||
parent = surface->parent;
|
||||
if (parent->autohide)
|
||||
hide_popup_chain (parent);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
check_autohide (GdkEvent *event)
|
||||
{
|
||||
@@ -2695,10 +2685,23 @@ check_autohide (GdkEvent *event)
|
||||
device = gdk_event_get_device (event);
|
||||
if (gdk_device_grab_info (display, device, &grab_surface, NULL))
|
||||
{
|
||||
if (grab_surface != gdk_event_get_surface (event) &&
|
||||
GdkSurface *event_surface;
|
||||
|
||||
event_surface = gdk_event_get_surface (event);
|
||||
|
||||
if (grab_surface != event_surface &&
|
||||
grab_surface != event_surface->parent &&
|
||||
grab_surface->autohide)
|
||||
{
|
||||
hide_popup_chain (grab_surface);
|
||||
GdkSurface *surface = grab_surface;
|
||||
|
||||
do
|
||||
{
|
||||
gdk_surface_hide (surface);
|
||||
surface = surface->parent;
|
||||
}
|
||||
while (surface->autohide && surface != event_surface);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
#include "gdkconfig.h"
|
||||
|
||||
#include <CoreGraphics/CoreGraphics.h>
|
||||
#include <cairo-quartz.h>
|
||||
|
||||
#import "GdkMacosCairoView.h"
|
||||
|
||||
@@ -58,7 +57,12 @@ create_cairo_surface_for_surface (GdkSurface *surface)
|
||||
width = scale * gdk_surface_get_width (surface);
|
||||
height = scale * gdk_surface_get_height (surface);
|
||||
|
||||
cairo_surface = cairo_quartz_surface_create (CAIRO_FORMAT_ARGB32, width, height);
|
||||
/* We use a cairo image surface here instead of a quartz surface because we
|
||||
* get strange artifacts with the quartz surface such as empty cross-fades
|
||||
* when hovering buttons. For performance, we want to be using GL rendering
|
||||
* so there isn't much point here as correctness is better.
|
||||
*/
|
||||
cairo_surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);
|
||||
|
||||
if (cairo_surface != NULL)
|
||||
cairo_surface_set_device_scale (cairo_surface, scale, scale);
|
||||
|
||||
@@ -136,8 +136,6 @@ void _gdk_macos_display_add_frame_callback (GdkMacosDisp
|
||||
GdkMacosSurface *surface);
|
||||
void _gdk_macos_display_remove_frame_callback (GdkMacosDisplay *self,
|
||||
GdkMacosSurface *surface);
|
||||
void _gdk_macos_display_synthesize_motion (GdkMacosDisplay *self,
|
||||
GdkMacosSurface *surface);
|
||||
NSWindow *_gdk_macos_display_find_native_under_pointer (GdkMacosDisplay *self,
|
||||
int *x,
|
||||
int *y);
|
||||
|
||||
@@ -1155,41 +1155,6 @@ _gdk_macos_display_translate (GdkMacosDisplay *self,
|
||||
return ret;
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_macos_display_synthesize_motion (GdkMacosDisplay *self,
|
||||
GdkMacosSurface *surface)
|
||||
{
|
||||
GdkModifierType state;
|
||||
GdkEvent *event;
|
||||
GdkSeat *seat;
|
||||
NSPoint point;
|
||||
GList *node;
|
||||
int x;
|
||||
int y;
|
||||
|
||||
g_return_if_fail (GDK_IS_MACOS_DISPLAY (self));
|
||||
g_return_if_fail (GDK_IS_MACOS_SURFACE (surface));
|
||||
|
||||
seat = gdk_display_get_default_seat (GDK_DISPLAY (self));
|
||||
point = [NSEvent mouseLocation];
|
||||
_gdk_macos_display_from_display_coords (self, point.x, point.y, &x, &y);
|
||||
|
||||
state = _gdk_macos_display_get_current_keyboard_modifiers (self) |
|
||||
_gdk_macos_display_get_current_mouse_modifiers (self);
|
||||
|
||||
event = gdk_motion_event_new (GDK_SURFACE (surface),
|
||||
gdk_seat_get_pointer (seat),
|
||||
NULL,
|
||||
get_time_from_ns_event ([NSApp currentEvent]),
|
||||
state,
|
||||
x,
|
||||
y,
|
||||
NULL);
|
||||
node = _gdk_event_queue_append (GDK_DISPLAY (self), event);
|
||||
_gdk_windowing_got_event (GDK_DISPLAY (self), node, event,
|
||||
_gdk_display_get_next_serial (GDK_DISPLAY (self)));
|
||||
}
|
||||
|
||||
void
|
||||
_gdk_macos_display_send_button_event (GdkMacosDisplay *self,
|
||||
NSEvent *nsevent)
|
||||
|
||||
@@ -512,7 +512,7 @@ _gdk_macos_display_surface_became_key (GdkMacosDisplay *self,
|
||||
* ("is not key"). We send a dummy motion notify event now, so that
|
||||
* everything in the window is set to correct state.
|
||||
*/
|
||||
_gdk_macos_display_synthesize_motion (self, surface);
|
||||
gdk_surface_request_motion (GDK_SURFACE (surface));
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -525,8 +525,8 @@ select_thread_start_poll (GPollFD *ufds,
|
||||
have_new_pollfds = TRUE;
|
||||
else
|
||||
{
|
||||
if (!((nfds == 1 && poll_fd_index < 0 && g_thread_supported ()) ||
|
||||
(nfds == 2 && poll_fd_index >= 0 && g_thread_supported ())))
|
||||
if (!((nfds == 1 && poll_fd_index < 0) ||
|
||||
(nfds == 2 && poll_fd_index >= 0)))
|
||||
select_thread_set_state (POLLING_RESTART);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,6 +44,9 @@ struct _GdkMacosGLContext
|
||||
NSWindow *dummy_window;
|
||||
NSView *dummy_view;
|
||||
|
||||
cairo_region_t *damage;
|
||||
cairo_rectangle_int_t flush_rect;
|
||||
|
||||
guint is_attached : 1;
|
||||
guint needs_resize : 1;
|
||||
};
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "gdkmacosglcontext-private.h"
|
||||
#include "gdkmacossurface-private.h"
|
||||
#include "gdkmacostoplevelsurface-private.h"
|
||||
|
||||
#include "gdkinternals.h"
|
||||
#include "gdkintl.h"
|
||||
@@ -99,6 +100,9 @@ create_pixel_format (int major,
|
||||
NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersionLegacy,
|
||||
NSOpenGLPFAAccelerated,
|
||||
NSOpenGLPFADoubleBuffer,
|
||||
NSOpenGLPFABackingStore,
|
||||
NSOpenGLPFAColorSize, 32,
|
||||
NSOpenGLPFAAlphaSize, 8,
|
||||
|
||||
(NSOpenGLPixelFormatAttribute)nil
|
||||
};
|
||||
@@ -143,6 +147,18 @@ ensure_gl_view (GdkMacosGLContext *self)
|
||||
[nsview setNeedsDisplay:YES];
|
||||
[nswindow setContentView:nsview];
|
||||
[nsview release];
|
||||
|
||||
if (self->dummy_view != NULL)
|
||||
{
|
||||
NSView *dummy_view = g_steal_pointer (&self->dummy_view);
|
||||
[dummy_view release];
|
||||
}
|
||||
|
||||
if (self->dummy_window != NULL)
|
||||
{
|
||||
NSWindow *dummy_window = g_steal_pointer (&self->dummy_window);
|
||||
[dummy_window release];
|
||||
}
|
||||
}
|
||||
|
||||
return [nswindow contentView];
|
||||
@@ -159,9 +175,8 @@ gdk_macos_gl_context_real_realize (GdkGLContext *context,
|
||||
NSOpenGLPixelFormat *pixelFormat;
|
||||
GdkGLContext *shared;
|
||||
GdkGLContext *shared_data;
|
||||
GdkGLContext *existing;
|
||||
NSOpenGLContext *existing;
|
||||
GLint sync_to_framerate = 1;
|
||||
GLint opaque = 0;
|
||||
GLint validate = 0;
|
||||
int major, minor;
|
||||
|
||||
@@ -170,7 +185,7 @@ gdk_macos_gl_context_real_realize (GdkGLContext *context,
|
||||
if (self->gl_context != nil)
|
||||
return TRUE;
|
||||
|
||||
existing = gdk_gl_context_get_current ();
|
||||
existing = [NSOpenGLContext currentContext];
|
||||
|
||||
gdk_gl_context_get_required_version (context, &major, &minor);
|
||||
|
||||
@@ -212,24 +227,17 @@ gdk_macos_gl_context_real_realize (GdkGLContext *context,
|
||||
}
|
||||
|
||||
[gl_context setValues:&sync_to_framerate forParameter:NSOpenGLCPSwapInterval];
|
||||
[gl_context setValues:&opaque forParameter:NSOpenGLCPSurfaceOpacity];
|
||||
[gl_context setValues:&validate forParameter:NSOpenGLContextParameterStateValidation];
|
||||
|
||||
if (self->is_attached || shared == NULL)
|
||||
{
|
||||
NSRect frame = NSMakeRect (0, 0, 1, 1);
|
||||
self->dummy_window = [[NSWindow alloc] initWithContentRect:NSZeroRect
|
||||
styleMask:0
|
||||
backing:NSBackingStoreBuffered
|
||||
defer:NO
|
||||
screen:nil];
|
||||
self->dummy_view = [[NSView alloc] initWithFrame:NSZeroRect];
|
||||
[self->dummy_window setContentView:self->dummy_view];
|
||||
[gl_context setView:self->dummy_view];
|
||||
|
||||
self->dummy_window = [[NSWindow alloc] initWithContentRect:frame
|
||||
styleMask:0
|
||||
backing:NSBackingStoreBuffered
|
||||
defer:NO
|
||||
screen:nil];
|
||||
self->dummy_view = [[NSView alloc] initWithFrame:frame];
|
||||
[self->dummy_window setContentView:self->dummy_view];
|
||||
[gl_context setView:self->dummy_view];
|
||||
}
|
||||
|
||||
[gl_context makeCurrentContext];
|
||||
GLint renderer_id = 0;
|
||||
[gl_context getValues:&renderer_id forParameter:NSOpenGLContextParameterCurrentRendererID];
|
||||
GDK_DISPLAY_NOTE (gdk_draw_context_get_display (GDK_DRAW_CONTEXT (context)),
|
||||
@@ -237,12 +245,11 @@ gdk_macos_gl_context_real_realize (GdkGLContext *context,
|
||||
g_message ("Created NSOpenGLContext[%p] using %s",
|
||||
gl_context,
|
||||
get_renderer_name (renderer_id)));
|
||||
[NSOpenGLContext clearCurrentContext];
|
||||
|
||||
self->gl_context = g_steal_pointer (&gl_context);
|
||||
|
||||
if (existing != NULL)
|
||||
[GDK_MACOS_GL_CONTEXT (existing)->gl_context makeCurrentContext];
|
||||
[existing makeCurrentContext];
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -257,24 +264,46 @@ gdk_macos_gl_context_begin_frame (GdkDrawContext *context,
|
||||
|
||||
/* If begin frame is called, that means we are trying to draw to
|
||||
* the NSWindow using our view. That might be a GdkMacosCairoView
|
||||
* but we need it to be a GL view.
|
||||
* but we need it to be a GL view. Also, only in this case do we
|
||||
* want to replace our damage region for the next frame (to avoid
|
||||
* doing it multiple times).
|
||||
*/
|
||||
if (!self->is_attached &&
|
||||
gdk_gl_context_get_shared_context (GDK_GL_CONTEXT (context)))
|
||||
ensure_gl_view (self);
|
||||
{
|
||||
ensure_gl_view (self);
|
||||
|
||||
g_clear_pointer (&self->damage, cairo_region_destroy);
|
||||
self->damage = cairo_region_copy (painted);
|
||||
|
||||
cairo_region_get_extents (painted, &self->flush_rect);
|
||||
}
|
||||
|
||||
if (self->needs_resize)
|
||||
{
|
||||
GdkSurface *surface = gdk_draw_context_get_surface (context);
|
||||
GLint opaque;
|
||||
|
||||
self->needs_resize = FALSE;
|
||||
|
||||
if (self->dummy_view != NULL)
|
||||
{
|
||||
GdkSurface *surface = gdk_draw_context_get_surface (context);
|
||||
GLint vals[2] = { surface->width, surface->height };
|
||||
NSRect frame = NSMakeRect (0, 0, surface->width, surface->height);
|
||||
|
||||
[self->gl_context setValues:vals forParameter:NSOpenGLContextParameterSurfaceBackingSize];
|
||||
[self->dummy_window setFrame:frame display:NO];
|
||||
[self->dummy_view setFrame:frame];
|
||||
}
|
||||
|
||||
/* Possibly update our opaque setting depending on a resize. We can
|
||||
* rely on getting a resize if decoarated is changed, so this reduces
|
||||
* how much we adjust the parameter.
|
||||
*/
|
||||
if (GDK_IS_MACOS_TOPLEVEL_SURFACE (surface))
|
||||
opaque = GDK_MACOS_TOPLEVEL_SURFACE (surface)->decorated;
|
||||
else
|
||||
opaque = FALSE;
|
||||
[self->gl_context setValues:&opaque forParameter:NSOpenGLCPSurfaceOpacity];
|
||||
|
||||
[self->gl_context update];
|
||||
}
|
||||
|
||||
@@ -297,27 +326,20 @@ gdk_macos_gl_context_end_frame (GdkDrawContext *context,
|
||||
cairo_region_t *painted)
|
||||
{
|
||||
GdkMacosGLContext *self = GDK_MACOS_GL_CONTEXT (context);
|
||||
GdkMacosSurface *surface;
|
||||
NSView *nsview;
|
||||
cairo_rectangle_int_t extents;
|
||||
|
||||
g_assert (GDK_IS_MACOS_GL_CONTEXT (self));
|
||||
g_assert (self->gl_context != nil);
|
||||
|
||||
surface = GDK_MACOS_SURFACE (gdk_draw_context_get_surface (context));
|
||||
nsview = self->dummy_view ?
|
||||
self->dummy_view :
|
||||
_gdk_macos_surface_get_view (surface);
|
||||
|
||||
GDK_DRAW_CONTEXT_CLASS (gdk_macos_gl_context_parent_class)->end_frame (context, painted);
|
||||
|
||||
/* We want to limit how much gets moved to the front buffer so here
|
||||
* we adjust the clip rectangle before flushBuffer is called.
|
||||
*/
|
||||
G_STATIC_ASSERT (sizeof (GLint) == sizeof (int));
|
||||
|
||||
cairo_region_get_extents (painted, &extents);
|
||||
|
||||
[self->gl_context
|
||||
setValues:(GLint *)&extents
|
||||
setValues:(GLint *)&self->flush_rect
|
||||
forParameter:NSOpenGLCPSwapRectangle];
|
||||
|
||||
[self->gl_context flushBuffer];
|
||||
}
|
||||
|
||||
@@ -329,6 +351,21 @@ gdk_macos_gl_context_surface_resized (GdkDrawContext *draw_context)
|
||||
g_assert (GDK_IS_MACOS_GL_CONTEXT (self));
|
||||
|
||||
self->needs_resize = TRUE;
|
||||
|
||||
g_clear_pointer (&self->damage, cairo_region_destroy);
|
||||
}
|
||||
|
||||
static cairo_region_t *
|
||||
gdk_macos_gl_context_get_damage (GdkGLContext *context)
|
||||
{
|
||||
GdkMacosGLContext *self = (GdkMacosGLContext *)context;
|
||||
|
||||
g_assert (GDK_IS_MACOS_GL_CONTEXT (self));
|
||||
|
||||
if (self->damage != NULL)
|
||||
return cairo_region_copy (self->damage);
|
||||
|
||||
return GDK_GL_CONTEXT_CLASS (gdk_macos_gl_context_parent_class)->get_damage (context);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -339,17 +376,12 @@ gdk_macos_gl_context_dispose (GObject *gobject)
|
||||
if (self->dummy_view != nil)
|
||||
{
|
||||
NSView *nsview = g_steal_pointer (&self->dummy_view);
|
||||
|
||||
if (GDK_IS_MACOS_GL_VIEW (nsview))
|
||||
[(GdkMacosGLView *)nsview setOpenGLContext:nil];
|
||||
|
||||
[nsview release];
|
||||
}
|
||||
|
||||
if (self->dummy_window != nil)
|
||||
{
|
||||
NSWindow *nswindow = g_steal_pointer (&self->dummy_window);
|
||||
|
||||
[nswindow release];
|
||||
}
|
||||
|
||||
@@ -364,6 +396,8 @@ gdk_macos_gl_context_dispose (GObject *gobject)
|
||||
[gl_context release];
|
||||
}
|
||||
|
||||
g_clear_pointer (&self->damage, cairo_region_destroy);
|
||||
|
||||
G_OBJECT_CLASS (gdk_macos_gl_context_parent_class)->dispose (gobject);
|
||||
}
|
||||
|
||||
@@ -380,6 +414,7 @@ gdk_macos_gl_context_class_init (GdkMacosGLContextClass *klass)
|
||||
draw_context_class->end_frame = gdk_macos_gl_context_end_frame;
|
||||
draw_context_class->surface_resized = gdk_macos_gl_context_surface_resized;
|
||||
|
||||
gl_class->get_damage = gdk_macos_gl_context_get_damage;
|
||||
gl_class->realize = gdk_macos_gl_context_real_realize;
|
||||
}
|
||||
|
||||
|
||||
@@ -256,7 +256,7 @@ gdk_macos_surface_get_device_state (GdkSurface *surface,
|
||||
| _gdk_macos_display_get_current_mouse_modifiers (GDK_MACOS_DISPLAY (display));
|
||||
|
||||
*x = point.x;
|
||||
*y = point.y - surface->height;
|
||||
*y = surface->height - point.y;
|
||||
|
||||
return *x >= 0 && *y >= 0 && *x < surface->width && *y < surface->height;
|
||||
}
|
||||
|
||||
@@ -24,13 +24,24 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct _GdkMacosToplevelSurface GdkMacosToplevelSurface;
|
||||
typedef struct _GdkMacosToplevelSurfaceClass GdkMacosToplevelSurfaceClass;
|
||||
|
||||
#define GDK_TYPE_MACOS_TOPLEVEL_SURFACE (_gdk_macos_toplevel_surface_get_type())
|
||||
#define GDK_MACOS_TOPLEVEL_SURFACE(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_MACOS_TOPLEVEL_SURFACE, GdkMacosToplevelSurface))
|
||||
#define GDK_IS_MACOS_TOPLEVEL_SURFACE(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_MACOS_TOPLEVEL_SURFACE))
|
||||
|
||||
typedef struct _GdkMacosToplevelSurface GdkMacosToplevelSurface;
|
||||
typedef struct _GdkMacosToplevelSurfaceClass GdkMacosToplevelSurfaceClass;
|
||||
|
||||
struct _GdkMacosToplevelSurface
|
||||
{
|
||||
GdkMacosSurface parent_instance;
|
||||
guint decorated : 1;
|
||||
};
|
||||
|
||||
struct _GdkMacosToplevelSurfaceClass
|
||||
{
|
||||
GdkMacosSurfaceClass parent_instance;
|
||||
};
|
||||
|
||||
GType _gdk_macos_toplevel_surface_get_type (void);
|
||||
GdkMacosSurface *_gdk_macos_toplevel_surface_new (GdkMacosDisplay *display,
|
||||
GdkSurface *parent,
|
||||
|
||||
@@ -29,17 +29,6 @@
|
||||
#include "gdkmacostoplevelsurface-private.h"
|
||||
#include "gdkmacosutils-private.h"
|
||||
|
||||
struct _GdkMacosToplevelSurface
|
||||
{
|
||||
GdkMacosSurface parent_instance;
|
||||
guint decorated : 1;
|
||||
};
|
||||
|
||||
struct _GdkMacosToplevelSurfaceClass
|
||||
{
|
||||
GdkMacosSurfaceClass parent_instance;
|
||||
};
|
||||
|
||||
static void
|
||||
_gdk_macos_toplevel_surface_fullscreen (GdkMacosToplevelSurface *self)
|
||||
{
|
||||
|
||||
@@ -34,7 +34,20 @@ gdk_wayland_app_launch_context_get_startup_notify_id (GAppLaunchContext *context
|
||||
GAppInfo *info,
|
||||
GList *files)
|
||||
{
|
||||
return NULL;
|
||||
GdkWaylandDisplay *display;
|
||||
gchar *id = NULL;
|
||||
|
||||
g_object_get (context, "display", &display, NULL);
|
||||
|
||||
if (display->gtk_shell_version >= 3)
|
||||
{
|
||||
id = g_uuid_string_random ();
|
||||
gtk_shell1_notify_launch (display->gtk_shell, id);
|
||||
}
|
||||
|
||||
g_object_unref (display);
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
|
||||
#define MIN_SYSTEM_BELL_DELAY_MS 20
|
||||
|
||||
#define GTK_SHELL1_VERSION 2
|
||||
#define GTK_SHELL1_VERSION 3
|
||||
#define OUTPUT_VERSION_WITH_DONE 2
|
||||
#define NO_XDG_OUTPUT_DONE_SINCE_VERSION 3
|
||||
|
||||
@@ -1076,6 +1076,8 @@ get_cursor_theme (GdkWaylandDisplay *display_wayland,
|
||||
/**
|
||||
* gdk_wayland_display_set_cursor_theme:
|
||||
* @display: (type GdkWaylandDisplay): a #GdkDisplay
|
||||
* @name: the new cursor theme
|
||||
* @size: the size to use for cursors
|
||||
*
|
||||
* Sets the cursor theme for the given @display.
|
||||
*/
|
||||
|
||||
@@ -1270,6 +1270,7 @@ configure_surface_geometry (GdkSurface *surface)
|
||||
|
||||
monitor = g_list_model_get_item (gdk_display_get_monitors (display), 0);
|
||||
gdk_monitor_get_geometry (monitor, &monitor_geometry);
|
||||
g_object_unref (monitor);
|
||||
bounds_width = monitor_geometry.width;
|
||||
bounds_height = monitor_geometry.height;
|
||||
|
||||
@@ -1765,6 +1766,8 @@ gdk_wayland_surface_create_xdg_toplevel (GdkSurface *surface)
|
||||
case GDK_WAYLAND_SHELL_VARIANT_XDG_SHELL:
|
||||
if (surface->state & GDK_TOPLEVEL_STATE_MAXIMIZED)
|
||||
xdg_toplevel_set_maximized (impl->display_server.xdg_toplevel);
|
||||
if (surface->state & GDK_TOPLEVEL_STATE_MINIMIZED)
|
||||
xdg_toplevel_set_minimized (impl->display_server.xdg_toplevel);
|
||||
if (surface->state & GDK_TOPLEVEL_STATE_FULLSCREEN)
|
||||
xdg_toplevel_set_fullscreen (impl->display_server.xdg_toplevel,
|
||||
impl->initial_fullscreen_output);
|
||||
@@ -1772,6 +1775,8 @@ gdk_wayland_surface_create_xdg_toplevel (GdkSurface *surface)
|
||||
case GDK_WAYLAND_SHELL_VARIANT_ZXDG_SHELL_V6:
|
||||
if (surface->state & GDK_TOPLEVEL_STATE_MAXIMIZED)
|
||||
zxdg_toplevel_v6_set_maximized (impl->display_server.zxdg_toplevel_v6);
|
||||
if (surface->state & GDK_TOPLEVEL_STATE_MINIMIZED)
|
||||
zxdg_toplevel_v6_set_minimized (impl->display_server.zxdg_toplevel_v6);
|
||||
if (surface->state & GDK_TOPLEVEL_STATE_FULLSCREEN)
|
||||
zxdg_toplevel_v6_set_fullscreen (impl->display_server.zxdg_toplevel_v6,
|
||||
impl->initial_fullscreen_output);
|
||||
@@ -2798,6 +2803,7 @@ gdk_wayland_surface_hide_surface (GdkSurface *surface)
|
||||
}
|
||||
|
||||
impl->has_uncommitted_ack_configure = FALSE;
|
||||
impl->input_region_dirty = TRUE;
|
||||
|
||||
unset_transient_for_exported (surface);
|
||||
|
||||
@@ -3230,14 +3236,20 @@ gdk_wayland_surface_focus (GdkSurface *surface,
|
||||
if (!impl->display_server.gtk_surface)
|
||||
return;
|
||||
|
||||
/* We didn't have an event to fetch a time from, meaning we have nothing valid
|
||||
* to send. This should rather be translated to a 'needs-attention' request or
|
||||
* something.
|
||||
*/
|
||||
if (timestamp == GDK_CURRENT_TIME)
|
||||
return;
|
||||
{
|
||||
GdkWaylandDisplay *display_wayland =
|
||||
GDK_WAYLAND_DISPLAY (gdk_surface_get_display (surface));
|
||||
|
||||
gtk_surface1_present (impl->display_server.gtk_surface, timestamp);
|
||||
if (display_wayland->gtk_shell_version >= 3)
|
||||
{
|
||||
gtk_surface1_request_focus (impl->display_server.gtk_surface,
|
||||
display_wayland->startup_notification_id);
|
||||
g_clear_pointer (&display_wayland->startup_notification_id, g_free);
|
||||
}
|
||||
}
|
||||
else
|
||||
gtk_surface1_present (impl->display_server.gtk_surface, timestamp);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -3539,6 +3551,9 @@ gdk_wayland_toplevel_set_transient_for (GdkWaylandToplevel *toplevel,
|
||||
static void
|
||||
gdk_wayland_surface_minimize (GdkSurface *surface)
|
||||
{
|
||||
GdkWaylandSurface *impl = GDK_WAYLAND_SURFACE (surface);
|
||||
GdkWaylandDisplay *display_wayland;
|
||||
|
||||
if (GDK_SURFACE_DESTROYED (surface) ||
|
||||
!SURFACE_IS_TOPLEVEL (surface))
|
||||
return;
|
||||
@@ -3546,13 +3561,9 @@ gdk_wayland_surface_minimize (GdkSurface *surface)
|
||||
if (!is_realized_toplevel (GDK_WAYLAND_SURFACE (surface)))
|
||||
return;
|
||||
|
||||
#if 0
|
||||
GdkWaylandSurface *impl = GDK_WAYLAND_SURFACE (surface);
|
||||
GdkWaylandDisplay *display_wayland;
|
||||
|
||||
/* We cannot use set_minimized() because it does not come with a
|
||||
* minimized state that we can query or get notified of. This means
|
||||
* we cannot implement the full GdkSurface API
|
||||
/* FIXME: xdg_toplevel does not come with a minimized state that we can
|
||||
* query or get notified of. This means we cannot implement the full
|
||||
* GdkSurface API, and our state will not reflect minimization.
|
||||
*/
|
||||
display_wayland = GDK_WAYLAND_DISPLAY (gdk_surface_get_display (surface));
|
||||
switch (display_wayland->shell_variant)
|
||||
@@ -3566,7 +3577,6 @@ gdk_wayland_surface_minimize (GdkSurface *surface)
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -51,7 +51,7 @@ GDK_AVAILABLE_IN_ALL
|
||||
struct wl_compositor *gdk_wayland_display_get_wl_compositor (GdkDisplay *display);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_wayland_display_set_cursor_theme (GdkDisplay *display,
|
||||
const char *theme,
|
||||
const char *name,
|
||||
int size);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
const char * gdk_wayland_display_get_startup_notification_id (GdkDisplay *display);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<protocol name="gtk">
|
||||
|
||||
<interface name="gtk_shell1" version="2">
|
||||
<interface name="gtk_shell1" version="3">
|
||||
<description summary="gtk specific extensions">
|
||||
gtk_shell is a protocol extension providing additional features for
|
||||
clients implementing it.
|
||||
@@ -28,9 +28,14 @@
|
||||
<request name="system_bell">
|
||||
<arg name="surface" type="object" interface="gtk_surface1" allow-null="true"/>
|
||||
</request>
|
||||
|
||||
<!-- Version 3 additions -->
|
||||
<request name="notify_launch" since="3">
|
||||
<arg name="startup_id" type="string"/>
|
||||
</request>
|
||||
</interface>
|
||||
|
||||
<interface name="gtk_surface1" version="2">
|
||||
<interface name="gtk_surface1" version="3">
|
||||
<request name="set_dbus_properties">
|
||||
<arg name="application_id" type="string" allow-null="true"/>
|
||||
<arg name="app_menu_path" type="string" allow-null="true"/>
|
||||
@@ -72,6 +77,11 @@
|
||||
<event name="configure_edges" since="2">
|
||||
<arg name="constraints" type="array"/>
|
||||
</event>
|
||||
|
||||
<!-- Version 3 additions -->
|
||||
<request name="request_focus" since="3">
|
||||
<arg name="startup_id" type="string" allow-null="true"/>
|
||||
</request>
|
||||
</interface>
|
||||
|
||||
</protocol>
|
||||
|
||||
@@ -509,7 +509,7 @@ populate_monitor_devices_from_display_config (GPtrArray *monitors)
|
||||
|
||||
refresh = &dispconf_paths[path_index].targetInfo.refreshRate;
|
||||
gdk_monitor_set_refresh_rate (mon,
|
||||
refresh->Numerator * 1000 / refresh->Denominator);
|
||||
refresh->Numerator * (UINT64) 1000 / refresh->Denominator);
|
||||
}
|
||||
|
||||
g_free (dispconf_paths);
|
||||
|
||||
@@ -332,9 +332,8 @@ get_default_title (void)
|
||||
static ATOM
|
||||
RegisterGdkClass (GdkSurfaceType wtype)
|
||||
{
|
||||
static ATOM klassTOPLEVEL = 0;
|
||||
static ATOM klassTEMP = 0;
|
||||
static ATOM klassTEMPSHADOW = 0;
|
||||
static ATOM klassTOPLEVEL = 0;
|
||||
static ATOM klassTEMP = 0;
|
||||
static HICON hAppIcon = NULL;
|
||||
static HICON hAppIconSm = NULL;
|
||||
static WNDCLASSEXW wcl;
|
||||
@@ -416,32 +415,16 @@ RegisterGdkClass (GdkSurfaceType wtype)
|
||||
break;
|
||||
|
||||
case GDK_SURFACE_TEMP:
|
||||
if (TRUE)
|
||||
if (klassTEMP == 0)
|
||||
{
|
||||
if (klassTEMPSHADOW == 0)
|
||||
{
|
||||
wcl.lpszClassName = L"gdkSurfaceTempShadow";
|
||||
wcl.style |= CS_SAVEBITS;
|
||||
wcl.style |= 0x00020000; /* CS_DROPSHADOW */
|
||||
|
||||
ONCE_PER_CLASS ();
|
||||
klassTEMPSHADOW = RegisterClassExW (&wcl);
|
||||
}
|
||||
|
||||
klass = klassTEMPSHADOW;
|
||||
wcl.lpszClassName = L"gdkSurfaceTemp";
|
||||
wcl.style |= CS_SAVEBITS;
|
||||
ONCE_PER_CLASS ();
|
||||
klassTEMP = RegisterClassExW (&wcl);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (klassTEMP == 0)
|
||||
{
|
||||
wcl.lpszClassName = L"gdkSurfaceTemp";
|
||||
wcl.style |= CS_SAVEBITS;
|
||||
ONCE_PER_CLASS ();
|
||||
klassTEMP = RegisterClassExW (&wcl);
|
||||
}
|
||||
|
||||
klass = klassTEMP;
|
||||
}
|
||||
klass = klassTEMP;
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -1999,6 +1982,7 @@ calculate_aerosnap_regions (GdkW32DragMoveResizeContext *context)
|
||||
GdkMonitor *monitor;
|
||||
|
||||
monitor = g_list_model_get_item (monitors, monitor_idx);
|
||||
g_object_unref (monitor);
|
||||
gdk_win32_monitor_get_workarea (monitor, &wa);
|
||||
gdk_monitor_get_geometry (monitor, &geometry);
|
||||
|
||||
|
||||
@@ -613,10 +613,8 @@ init_randr15 (GdkX11Screen *x11_screen)
|
||||
notify_surface_monitor_change (x11_display, GDK_MONITOR (monitor));
|
||||
if (monitor->remove)
|
||||
{
|
||||
g_object_ref (monitor);
|
||||
g_list_store_remove (x11_display->monitors, i);
|
||||
gdk_monitor_invalidate (GDK_MONITOR (monitor));
|
||||
g_object_unref (monitor);
|
||||
}
|
||||
g_object_unref (monitor);
|
||||
}
|
||||
@@ -764,11 +762,10 @@ init_randr13 (GdkX11Screen *x11_screen)
|
||||
notify_surface_monitor_change (x11_display, GDK_MONITOR (monitor));
|
||||
if (monitor->remove)
|
||||
{
|
||||
g_object_ref (monitor);
|
||||
g_list_store_remove (x11_display->monitors, i);
|
||||
gdk_monitor_invalidate (GDK_MONITOR (monitor));
|
||||
g_object_unref (monitor);
|
||||
}
|
||||
g_object_unref (monitor);
|
||||
}
|
||||
|
||||
x11_display->primary_monitor = 0;
|
||||
@@ -852,10 +849,8 @@ init_no_multihead (GdkX11Screen *x11_screen)
|
||||
notify_surface_monitor_change (x11_display, GDK_MONITOR (monitor));
|
||||
if (monitor->remove)
|
||||
{
|
||||
g_object_ref (monitor);
|
||||
g_list_store_remove (x11_display->monitors, i);
|
||||
gdk_monitor_invalidate (GDK_MONITOR (monitor));
|
||||
g_object_unref (monitor);
|
||||
}
|
||||
g_object_unref (monitor);
|
||||
}
|
||||
|
||||
@@ -583,7 +583,7 @@ gsk_broadway_renderer_add_node (GskRenderer *renderer,
|
||||
case GSK_CAIRO_NODE:
|
||||
if (add_new_node (renderer, node, BROADWAY_NODE_TEXTURE, clip_bounds))
|
||||
{
|
||||
cairo_surface_t *surface = gsk_cairo_node_peek_surface (node);
|
||||
cairo_surface_t *surface = gsk_cairo_node_get_surface (node);
|
||||
cairo_surface_t *image_surface = NULL;
|
||||
GdkTexture *texture;
|
||||
guint32 texture_id;
|
||||
@@ -620,7 +620,7 @@ gsk_broadway_renderer_add_node (GskRenderer *renderer,
|
||||
if (add_new_node (renderer, node, BROADWAY_NODE_COLOR, clip_bounds))
|
||||
{
|
||||
add_rect (nodes, &node->bounds, offset_x, offset_y);
|
||||
add_rgba (nodes, gsk_color_node_peek_color (node));
|
||||
add_rgba (nodes, gsk_color_node_get_color (node));
|
||||
}
|
||||
return;
|
||||
|
||||
@@ -628,19 +628,19 @@ gsk_broadway_renderer_add_node (GskRenderer *renderer,
|
||||
if (add_new_node (renderer, node, BROADWAY_NODE_BORDER, clip_bounds))
|
||||
{
|
||||
int i;
|
||||
add_rounded_rect (nodes, gsk_border_node_peek_outline (node), offset_x, offset_y);
|
||||
add_rounded_rect (nodes, gsk_border_node_get_outline (node), offset_x, offset_y);
|
||||
for (i = 0; i < 4; i++)
|
||||
add_float (nodes, gsk_border_node_peek_widths (node)[i]);
|
||||
add_float (nodes, gsk_border_node_get_widths (node)[i]);
|
||||
for (i = 0; i < 4; i++)
|
||||
add_rgba (nodes, &gsk_border_node_peek_colors (node)[i]);
|
||||
add_rgba (nodes, &gsk_border_node_get_colors (node)[i]);
|
||||
}
|
||||
return;
|
||||
|
||||
case GSK_OUTSET_SHADOW_NODE:
|
||||
if (add_new_node (renderer, node, BROADWAY_NODE_OUTSET_SHADOW, clip_bounds))
|
||||
{
|
||||
add_rounded_rect (nodes, gsk_outset_shadow_node_peek_outline (node), offset_x, offset_y);
|
||||
add_rgba (nodes, gsk_outset_shadow_node_peek_color (node));
|
||||
add_rounded_rect (nodes, gsk_outset_shadow_node_get_outline (node), offset_x, offset_y);
|
||||
add_rgba (nodes, gsk_outset_shadow_node_get_color (node));
|
||||
add_float (nodes, gsk_outset_shadow_node_get_dx (node));
|
||||
add_float (nodes, gsk_outset_shadow_node_get_dy (node));
|
||||
add_float (nodes, gsk_outset_shadow_node_get_spread (node));
|
||||
@@ -651,8 +651,8 @@ gsk_broadway_renderer_add_node (GskRenderer *renderer,
|
||||
case GSK_INSET_SHADOW_NODE:
|
||||
if (add_new_node (renderer, node, BROADWAY_NODE_INSET_SHADOW, clip_bounds))
|
||||
{
|
||||
add_rounded_rect (nodes, gsk_inset_shadow_node_peek_outline (node), offset_x, offset_y);
|
||||
add_rgba (nodes, gsk_inset_shadow_node_peek_color (node));
|
||||
add_rounded_rect (nodes, gsk_inset_shadow_node_get_outline (node), offset_x, offset_y);
|
||||
add_rgba (nodes, gsk_inset_shadow_node_get_color (node));
|
||||
add_float (nodes, gsk_inset_shadow_node_get_dx (node));
|
||||
add_float (nodes, gsk_inset_shadow_node_get_dy (node));
|
||||
add_float (nodes, gsk_inset_shadow_node_get_spread (node));
|
||||
@@ -666,12 +666,12 @@ gsk_broadway_renderer_add_node (GskRenderer *renderer,
|
||||
guint i, n;
|
||||
|
||||
add_rect (nodes, &node->bounds, offset_x, offset_y);
|
||||
add_point (nodes, gsk_linear_gradient_node_peek_start (node), offset_x, offset_y);
|
||||
add_point (nodes, gsk_linear_gradient_node_peek_end (node), offset_x, offset_y);
|
||||
add_point (nodes, gsk_linear_gradient_node_get_start (node), offset_x, offset_y);
|
||||
add_point (nodes, gsk_linear_gradient_node_get_end (node), offset_x, offset_y);
|
||||
n = gsk_linear_gradient_node_get_n_color_stops (node);
|
||||
add_uint32 (nodes, n);
|
||||
for (i = 0; i < n; i++)
|
||||
add_color_stop (nodes, &gsk_linear_gradient_node_peek_color_stops (node, NULL)[i]);
|
||||
add_color_stop (nodes, &gsk_linear_gradient_node_get_color_stops (node, NULL)[i]);
|
||||
}
|
||||
return;
|
||||
|
||||
@@ -685,7 +685,7 @@ gsk_broadway_renderer_add_node (GskRenderer *renderer,
|
||||
add_uint32 (nodes, n_shadows);
|
||||
for (i = 0; i < n_shadows; i++)
|
||||
{
|
||||
const GskShadow *shadow = gsk_shadow_node_peek_shadow (node, i);
|
||||
const GskShadow *shadow = gsk_shadow_node_get_shadow (node, i);
|
||||
add_rgba (nodes, &shadow->color);
|
||||
add_float (nodes, shadow->dx);
|
||||
add_float (nodes, shadow->dy);
|
||||
@@ -710,7 +710,7 @@ gsk_broadway_renderer_add_node (GskRenderer *renderer,
|
||||
case GSK_ROUNDED_CLIP_NODE:
|
||||
if (add_new_node (renderer, node, BROADWAY_NODE_ROUNDED_CLIP, clip_bounds))
|
||||
{
|
||||
const GskRoundedRect *rclip = gsk_rounded_clip_node_peek_clip (node);
|
||||
const GskRoundedRect *rclip = gsk_rounded_clip_node_get_clip (node);
|
||||
graphene_rect_t child_bounds = rclip->bounds;
|
||||
|
||||
if (clip_bounds)
|
||||
@@ -728,7 +728,7 @@ gsk_broadway_renderer_add_node (GskRenderer *renderer,
|
||||
case GSK_CLIP_NODE:
|
||||
if (add_new_node (renderer, node, BROADWAY_NODE_CLIP, clip_bounds))
|
||||
{
|
||||
const graphene_rect_t *clip = gsk_clip_node_peek_clip (node);
|
||||
const graphene_rect_t *clip = gsk_clip_node_get_clip (node);
|
||||
graphene_rect_t child_bounds = *clip;
|
||||
|
||||
if (clip_bounds)
|
||||
@@ -828,8 +828,8 @@ gsk_broadway_renderer_add_node (GskRenderer *renderer,
|
||||
GskRenderNode *child = gsk_color_matrix_node_get_child (node);
|
||||
if (gsk_render_node_get_node_type (child) == GSK_TEXTURE_NODE)
|
||||
{
|
||||
const graphene_matrix_t *color_matrix = gsk_color_matrix_node_peek_color_matrix (node);
|
||||
const graphene_vec4_t *color_offset = gsk_color_matrix_node_peek_color_offset (node);
|
||||
const graphene_matrix_t *color_matrix = gsk_color_matrix_node_get_color_matrix (node);
|
||||
const graphene_vec4_t *color_offset = gsk_color_matrix_node_get_color_offset (node);
|
||||
GdkTexture *texture = gsk_texture_node_get_texture (child);
|
||||
GdkTexture *colorized_texture = get_colorized_texture (texture, color_matrix, color_offset);
|
||||
if (add_new_node (renderer, node, BROADWAY_NODE_TEXTURE, clip_bounds))
|
||||
|
||||
+11
-5
@@ -18,6 +18,7 @@ struct _GskGLProfiler
|
||||
GLuint gl_queries[N_QUERIES];
|
||||
GLuint active_query;
|
||||
|
||||
gboolean has_queries : 1;
|
||||
gboolean has_timer : 1;
|
||||
gboolean first_frame : 1;
|
||||
};
|
||||
@@ -37,7 +38,8 @@ gsk_gl_profiler_finalize (GObject *gobject)
|
||||
{
|
||||
GskGLProfiler *self = GSK_GL_PROFILER (gobject);
|
||||
|
||||
glDeleteQueries (N_QUERIES, self->gl_queries);
|
||||
if (self->has_queries)
|
||||
glDeleteQueries (N_QUERIES, self->gl_queries);
|
||||
|
||||
g_clear_object (&self->gl_context);
|
||||
|
||||
@@ -106,10 +108,14 @@ gsk_gl_profiler_class_init (GskGLProfilerClass *klass)
|
||||
static void
|
||||
gsk_gl_profiler_init (GskGLProfiler *self)
|
||||
{
|
||||
glGenQueries (N_QUERIES, self->gl_queries);
|
||||
self->has_queries = epoxy_is_desktop_gl();
|
||||
self->has_timer = epoxy_is_desktop_gl() && (epoxy_gl_version () >= 33 || epoxy_has_gl_extension ("GL_ARB_timer_query"));
|
||||
|
||||
if (!self->has_queries)
|
||||
return;
|
||||
|
||||
glGenQueries (N_QUERIES, self->gl_queries);
|
||||
self->first_frame = TRUE;
|
||||
self->has_timer = epoxy_gl_version () >= 33 || epoxy_has_gl_extension ("GL_ARB_timer_query");
|
||||
}
|
||||
|
||||
GskGLProfiler *
|
||||
@@ -127,7 +133,7 @@ gsk_gl_profiler_begin_gpu_region (GskGLProfiler *profiler)
|
||||
|
||||
g_return_if_fail (GSK_IS_GL_PROFILER (profiler));
|
||||
|
||||
if (!profiler->has_timer)
|
||||
if (!profiler->has_timer || !profiler->has_queries)
|
||||
return;
|
||||
|
||||
query_id = profiler->gl_queries[profiler->active_query];
|
||||
@@ -143,7 +149,7 @@ gsk_gl_profiler_end_gpu_region (GskGLProfiler *profiler)
|
||||
|
||||
g_return_val_if_fail (GSK_IS_GL_PROFILER (profiler), 0);
|
||||
|
||||
if (!profiler->has_timer)
|
||||
if (!profiler->has_timer || !profiler->has_queries)
|
||||
return 0;
|
||||
|
||||
glEndQuery (GL_TIME_ELAPSED);
|
||||
|
||||
+48
-35
@@ -128,7 +128,7 @@ print_render_node_tree (GskRenderNode *root, int level)
|
||||
break;
|
||||
|
||||
case GSK_COLOR_NODE:
|
||||
g_print ("%*s Color %s\n", level * INDENT, " ", gdk_rgba_to_string (gsk_color_node_peek_color (root)));
|
||||
g_print ("%*s Color %s\n", level * INDENT, " ", gdk_rgba_to_string (gsk_color_node_get_color (root)));
|
||||
break;
|
||||
|
||||
case GSK_SHADOW_NODE:
|
||||
@@ -291,8 +291,8 @@ init_projection_matrix (graphene_matrix_t *out_proj,
|
||||
static inline gboolean G_GNUC_PURE
|
||||
color_matrix_modifies_alpha (GskRenderNode *node)
|
||||
{
|
||||
const graphene_matrix_t *matrix = gsk_color_matrix_node_peek_color_matrix (node);
|
||||
const graphene_vec4_t *offset = gsk_color_matrix_node_peek_color_offset (node);
|
||||
const graphene_matrix_t *matrix = gsk_color_matrix_node_get_color_matrix (node);
|
||||
const graphene_vec4_t *offset = gsk_color_matrix_node_get_color_offset (node);
|
||||
graphene_vec4_t row3;
|
||||
|
||||
if (graphene_vec4_get_w (offset) != 0.0f)
|
||||
@@ -750,8 +750,8 @@ render_text_node (GskGLRenderer *self,
|
||||
const GdkRGBA *color,
|
||||
gboolean force_color)
|
||||
{
|
||||
const PangoFont *font = gsk_text_node_peek_font (node);
|
||||
const PangoGlyphInfo *glyphs = gsk_text_node_peek_glyphs (node, NULL);
|
||||
const PangoFont *font = gsk_text_node_get_font (node);
|
||||
const PangoGlyphInfo *glyphs = gsk_text_node_get_glyphs (node, NULL);
|
||||
const float text_scale = ops_get_scale (builder);
|
||||
const graphene_point_t *offset = gsk_text_node_get_offset (node);
|
||||
const guint num_glyphs = gsk_text_node_get_num_glyphs (node);
|
||||
@@ -834,9 +834,9 @@ render_border_node (GskGLRenderer *self,
|
||||
GskRenderNode *node,
|
||||
RenderOpBuilder *builder)
|
||||
{
|
||||
const GdkRGBA *colors = gsk_border_node_peek_colors (node);
|
||||
const GskRoundedRect *rounded_outline = gsk_border_node_peek_outline (node);
|
||||
const float *widths = gsk_border_node_peek_widths (node);
|
||||
const GdkRGBA *colors = gsk_border_node_get_colors (node);
|
||||
const GskRoundedRect *rounded_outline = gsk_border_node_get_outline (node);
|
||||
const float *widths = gsk_border_node_get_widths (node);
|
||||
int i;
|
||||
struct {
|
||||
float w;
|
||||
@@ -975,7 +975,7 @@ render_color_node (GskGLRenderer *self,
|
||||
RenderOpBuilder *builder)
|
||||
{
|
||||
ops_set_program (builder, &self->programs->color_program);
|
||||
ops_set_color (builder, gsk_color_node_peek_color (node));
|
||||
ops_set_color (builder, gsk_color_node_get_color (node));
|
||||
load_vertex_data (ops_draw (builder, NULL), &node->bounds, builder);
|
||||
}
|
||||
|
||||
@@ -1426,9 +1426,9 @@ render_linear_gradient_node (GskGLRenderer *self,
|
||||
|
||||
if (n_color_stops < GL_MAX_GRADIENT_STOPS)
|
||||
{
|
||||
const GskColorStop *stops = gsk_linear_gradient_node_peek_color_stops (node, NULL);
|
||||
const graphene_point_t *start = gsk_linear_gradient_node_peek_start (node);
|
||||
const graphene_point_t *end = gsk_linear_gradient_node_peek_end (node);
|
||||
const GskColorStop *stops = gsk_linear_gradient_node_get_color_stops (node, NULL);
|
||||
const graphene_point_t *start = gsk_linear_gradient_node_get_start (node);
|
||||
const graphene_point_t *end = gsk_linear_gradient_node_get_end (node);
|
||||
|
||||
ops_set_program (builder, &self->programs->linear_gradient_program);
|
||||
ops_set_linear_gradient (builder,
|
||||
@@ -1456,8 +1456,8 @@ render_radial_gradient_node (GskGLRenderer *self,
|
||||
|
||||
if (n_color_stops < GL_MAX_GRADIENT_STOPS)
|
||||
{
|
||||
const GskColorStop *stops = gsk_radial_gradient_node_peek_color_stops (node, NULL);
|
||||
const graphene_point_t *center = gsk_radial_gradient_node_peek_center (node);
|
||||
const GskColorStop *stops = gsk_radial_gradient_node_get_color_stops (node, NULL);
|
||||
const graphene_point_t *center = gsk_radial_gradient_node_get_center (node);
|
||||
const float start = gsk_radial_gradient_node_get_start (node);
|
||||
const float end = gsk_radial_gradient_node_get_end (node);
|
||||
const float hradius = gsk_radial_gradient_node_get_hradius (node);
|
||||
@@ -1628,7 +1628,7 @@ render_clip_node (GskGLRenderer *self,
|
||||
GskRenderNode *node,
|
||||
RenderOpBuilder *builder)
|
||||
{
|
||||
const graphene_rect_t *clip = gsk_clip_node_peek_clip (node);
|
||||
const graphene_rect_t *clip = gsk_clip_node_get_clip (node);
|
||||
GskRenderNode *child = gsk_clip_node_get_child (node);
|
||||
|
||||
render_clipped_child (self, builder, clip, child);
|
||||
@@ -1641,7 +1641,7 @@ render_rounded_clip_node (GskGLRenderer *self,
|
||||
{
|
||||
const float scale_x = builder->scale_x;
|
||||
const float scale_y = builder->scale_y;
|
||||
const GskRoundedRect *clip = gsk_rounded_clip_node_peek_clip (node);
|
||||
const GskRoundedRect *clip = gsk_rounded_clip_node_get_clip (node);
|
||||
GskRenderNode *child = gsk_rounded_clip_node_get_child (node);
|
||||
GskRoundedRect transformed_clip;
|
||||
gboolean need_offscreen;
|
||||
@@ -1761,8 +1761,8 @@ render_color_matrix_node (GskGLRenderer *self,
|
||||
|
||||
ops_set_program (builder, &self->programs->color_matrix_program);
|
||||
ops_set_color_matrix (builder,
|
||||
gsk_color_matrix_node_peek_color_matrix (node),
|
||||
gsk_color_matrix_node_peek_color_offset (node));
|
||||
gsk_color_matrix_node_get_color_matrix (node),
|
||||
gsk_color_matrix_node_get_color_offset (node));
|
||||
|
||||
ops_set_texture (builder, region.texture_id);
|
||||
|
||||
@@ -1978,9 +1978,9 @@ render_unblurred_inset_shadow_node (GskGLRenderer *self,
|
||||
g_assert (blur_radius == 0);
|
||||
|
||||
ops_set_program (builder, &self->programs->inset_shadow_program);
|
||||
ops_set_inset_shadow (builder, transform_rect (self, builder, gsk_inset_shadow_node_peek_outline (node)),
|
||||
ops_set_inset_shadow (builder, transform_rect (self, builder, gsk_inset_shadow_node_get_outline (node)),
|
||||
spread,
|
||||
gsk_inset_shadow_node_peek_color (node),
|
||||
gsk_inset_shadow_node_get_color (node),
|
||||
dx, dy);
|
||||
|
||||
load_vertex_data (ops_draw (builder, NULL), &node->bounds, builder);
|
||||
@@ -1997,7 +1997,7 @@ render_inset_shadow_node (GskGLRenderer *self,
|
||||
const float blur_extra = blur_radius * 2.0; /* 2.0 = shader radius_multiplier */
|
||||
const float dx = gsk_inset_shadow_node_get_dx (node);
|
||||
const float dy = gsk_inset_shadow_node_get_dy (node);
|
||||
const GskRoundedRect *node_outline = gsk_inset_shadow_node_peek_outline (node);
|
||||
const GskRoundedRect *node_outline = gsk_inset_shadow_node_get_outline (node);
|
||||
float texture_width;
|
||||
float texture_height;
|
||||
int blurred_texture_id;
|
||||
@@ -2069,7 +2069,7 @@ render_inset_shadow_node (GskGLRenderer *self,
|
||||
ops_set_program (builder, &self->programs->inset_shadow_program);
|
||||
ops_set_inset_shadow (builder, transform_rect (self, builder, &outline_to_blur),
|
||||
spread * MAX (scale_x, scale_y),
|
||||
gsk_inset_shadow_node_peek_color (node),
|
||||
gsk_inset_shadow_node_get_color (node),
|
||||
dx * scale_x, dy * scale_y);
|
||||
|
||||
load_float_vertex_data (ops_draw (builder, NULL), builder,
|
||||
@@ -2130,7 +2130,7 @@ render_unblurred_outset_shadow_node (GskGLRenderer *self,
|
||||
GskRenderNode *node,
|
||||
RenderOpBuilder *builder)
|
||||
{
|
||||
const GskRoundedRect *outline = gsk_outset_shadow_node_peek_outline (node);
|
||||
const GskRoundedRect *outline = gsk_outset_shadow_node_get_outline (node);
|
||||
const float x = node->bounds.origin.x;
|
||||
const float y = node->bounds.origin.y;
|
||||
const float w = node->bounds.size.width;
|
||||
@@ -2151,7 +2151,7 @@ render_unblurred_outset_shadow_node (GskGLRenderer *self,
|
||||
ops_set_program (builder, &self->programs->unblurred_outset_shadow_program);
|
||||
ops_set_unblurred_outset_shadow (builder, transform_rect (self, builder, outline),
|
||||
spread,
|
||||
gsk_outset_shadow_node_peek_color (node),
|
||||
gsk_outset_shadow_node_get_color (node),
|
||||
dx, dy);
|
||||
|
||||
/* Corners... */
|
||||
@@ -2200,8 +2200,8 @@ render_outset_shadow_node (GskGLRenderer *self,
|
||||
const float scale = ops_get_scale (builder);
|
||||
const float scale_x = builder->scale_x;
|
||||
const float scale_y = builder->scale_y;
|
||||
const GskRoundedRect *outline = gsk_outset_shadow_node_peek_outline (node);
|
||||
const GdkRGBA *color = gsk_outset_shadow_node_peek_color (node);
|
||||
const GskRoundedRect *outline = gsk_outset_shadow_node_get_outline (node);
|
||||
const GdkRGBA *color = gsk_outset_shadow_node_get_color (node);
|
||||
const float blur_radius = gsk_outset_shadow_node_get_blur_radius (node);
|
||||
const float blur_extra = blur_radius * 2.0f; /* 2.0 = shader radius_multiplier */
|
||||
const int extra_blur_pixels = (int) ceilf(blur_extra / 2.0 * scale);
|
||||
@@ -2529,7 +2529,7 @@ render_shadow_node (GskGLRenderer *self,
|
||||
|
||||
for (i = 0; i < n_shadows; i ++)
|
||||
{
|
||||
const GskShadow *shadow = gsk_shadow_node_peek_shadow (node, i);
|
||||
const GskShadow *shadow = gsk_shadow_node_get_shadow (node, i);
|
||||
const float dx = shadow->dx;
|
||||
const float dy = shadow->dy;
|
||||
TextureRegion region;
|
||||
@@ -2713,7 +2713,7 @@ render_repeat_node (GskGLRenderer *self,
|
||||
RenderOpBuilder *builder)
|
||||
{
|
||||
GskRenderNode *child = gsk_repeat_node_get_child (node);
|
||||
const graphene_rect_t *child_bounds = gsk_repeat_node_peek_child_bounds (node);
|
||||
const graphene_rect_t *child_bounds = gsk_repeat_node_get_child_bounds (node);
|
||||
TextureRegion region;
|
||||
gboolean is_offscreen;
|
||||
OpRepeat *op;
|
||||
@@ -2793,8 +2793,12 @@ apply_modelview_op (const Program *program,
|
||||
{
|
||||
float mat[16];
|
||||
|
||||
OP_PRINT (" -> Modelview");
|
||||
graphene_matrix_to_float (&op->matrix, mat);
|
||||
OP_PRINT (" -> Modelview { { %f,%f,%f,%f }, { %f,%f,%f,%f }, { %f,%f,%f,%f }, { %f,%f,%f,%f }",
|
||||
mat[0], mat[1], mat[2], mat[3],
|
||||
mat[4], mat[5], mat[6], mat[7],
|
||||
mat[8], mat[9], mat[10], mat[11],
|
||||
mat[12], mat[13], mat[14], mat[15]);
|
||||
glUniformMatrix4fv (program->modelview_location, 1, GL_FALSE, mat);
|
||||
}
|
||||
|
||||
@@ -2804,8 +2808,12 @@ apply_projection_op (const Program *program,
|
||||
{
|
||||
float mat[16];
|
||||
|
||||
OP_PRINT (" -> Projection");
|
||||
graphene_matrix_to_float (&op->matrix, mat);
|
||||
OP_PRINT (" -> Projection { { %f,%f,%f,%f }, { %f,%f,%f,%f }, { %f,%f,%f,%f }, { %f,%f,%f,%f }",
|
||||
mat[0], mat[1], mat[2], mat[3],
|
||||
mat[4], mat[5], mat[6], mat[7],
|
||||
mat[8], mat[9], mat[10], mat[11],
|
||||
mat[12], mat[13], mat[14], mat[15]);
|
||||
glUniformMatrix4fv (program->projection_location, 1, GL_FALSE, mat);
|
||||
}
|
||||
|
||||
@@ -3260,6 +3268,7 @@ gsk_gl_renderer_create_programs (GskGLRenderer *self,
|
||||
{
|
||||
Program *prog = &programs->programs[i];
|
||||
|
||||
prog->name = program_definitions[i].name;
|
||||
prog->index = i;
|
||||
prog->id = gsk_gl_shader_builder_create_program (&shader_builder,
|
||||
program_definitions[i].resource_path,
|
||||
@@ -3663,7 +3672,7 @@ gsk_gl_renderer_add_render_ops (GskGLRenderer *self,
|
||||
|
||||
case GSK_TEXT_NODE:
|
||||
render_text_node (self, node, builder,
|
||||
gsk_text_node_peek_color (node), FALSE);
|
||||
gsk_text_node_get_color (node), FALSE);
|
||||
break;
|
||||
|
||||
case GSK_COLOR_MATRIX_NODE:
|
||||
@@ -4052,8 +4061,9 @@ gsk_gl_renderer_render_ops (GskGLRenderer *self)
|
||||
{
|
||||
const OpDraw *op = ptr;
|
||||
|
||||
OP_PRINT (" -> draw %ld, size %ld and program %d\n",
|
||||
op->vao_offset, op->vao_size, program->index);
|
||||
OP_PRINT (" -> draw %ld, size %ld and program %d: %s",
|
||||
op->vao_offset, op->vao_size, program->index,
|
||||
program->name ?: "");
|
||||
glDrawArrays (GL_TRIANGLES, op->vao_offset, op->vao_size);
|
||||
break;
|
||||
}
|
||||
@@ -4273,7 +4283,7 @@ gsk_gl_renderer_render_texture (GskRenderer *renderer,
|
||||
g_type_name_from_instance ((GTypeInstance *) root),
|
||||
root,
|
||||
fbo_id);
|
||||
glFramebufferTexture (GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, texture_id, 0);
|
||||
glFramebufferTexture2D (GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, texture_id, 0);
|
||||
|
||||
/* Render the actual scene */
|
||||
gsk_gl_renderer_do_render (renderer, root, viewport, fbo_id, 1);
|
||||
@@ -4303,7 +4313,7 @@ gsk_gl_renderer_render_texture (GskRenderer *renderer,
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
|
||||
|
||||
glFramebufferTexture (GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, final_texture_id, 0);
|
||||
glFramebufferTexture2D (GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, final_texture_id, 0);
|
||||
g_assert_cmphex (glCheckFramebufferStatus (GL_FRAMEBUFFER), ==, GL_FRAMEBUFFER_COMPLETE);
|
||||
|
||||
ops_set_render_target (&self->op_builder, final_fbo_id);
|
||||
@@ -4324,6 +4334,9 @@ gsk_gl_renderer_render_texture (GskRenderer *renderer,
|
||||
gsk_gl_renderer_render_ops (self);
|
||||
|
||||
ops_finish (&self->op_builder);
|
||||
|
||||
glDeleteTextures (1, &texture_id);
|
||||
|
||||
texture_id = final_texture_id;
|
||||
}
|
||||
|
||||
|
||||
@@ -90,6 +90,8 @@ typedef struct
|
||||
|
||||
struct _Program
|
||||
{
|
||||
const char *name;
|
||||
|
||||
int index; /* Into the renderer's program array -1 for custom */
|
||||
|
||||
int id;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "gskdebugprivate.h"
|
||||
#include "gdk/gdk-private.h"
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
static const GdkDebugKey gsk_debug_keys[] = {
|
||||
{ "renderer", GSK_DEBUG_RENDERER, "General renderer information" },
|
||||
{ "cairo", GSK_DEBUG_CAIRO, "Cairo renderer information" },
|
||||
@@ -17,14 +16,12 @@ static const GdkDebugKey gsk_debug_keys[] = {
|
||||
{ "vulkan-staging-image", GSK_DEBUG_VULKAN_STAGING_IMAGE, "Use a staging image for Vulkan texture upload" },
|
||||
{ "vulkan-staging-buffer", GSK_DEBUG_VULKAN_STAGING_BUFFER, "Use a staging buffer for Vulkan texture upload" }
|
||||
};
|
||||
#endif
|
||||
|
||||
static guint gsk_debug_flags;
|
||||
|
||||
static void
|
||||
init_debug_flags (void)
|
||||
{
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
static volatile gsize gsk_debug_flags__set;
|
||||
|
||||
if (g_once_init_enter (&gsk_debug_flags__set))
|
||||
@@ -35,7 +32,6 @@ init_debug_flags (void)
|
||||
|
||||
g_once_init_leave (&gsk_debug_flags__set, TRUE);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
||||
+4
-4
@@ -1092,7 +1092,7 @@ G_DEFINE_BOXED_TYPE (GskShaderArgsBuilder, gsk_shader_args_builder,
|
||||
|
||||
|
||||
/**
|
||||
* gsk_gl_shader_build_args:
|
||||
* gsk_shader_args_builder_new:
|
||||
* @shader: a #GskGLShader
|
||||
* @initial_values: (nullable): optional #Bytes with initial values
|
||||
*
|
||||
@@ -1100,7 +1100,7 @@ G_DEFINE_BOXED_TYPE (GskShaderArgsBuilder, gsk_shader_args_builder,
|
||||
* chunk.
|
||||
*
|
||||
* Returns: (transfer full): The newly allocated builder, free with
|
||||
* gsk_shader_args_builder_free()
|
||||
* gsk_shader_args_builder_unref()
|
||||
*/
|
||||
GskShaderArgsBuilder *
|
||||
gsk_shader_args_builder_new (GskGLShader *shader,
|
||||
@@ -1149,8 +1149,8 @@ gsk_shader_args_builder_to_args (GskShaderArgsBuilder *builder)
|
||||
}
|
||||
|
||||
/**
|
||||
* gdk_content_formats_builder_free_to_args: (skip)
|
||||
* @builder: a #GdkContentFormatsBuilder
|
||||
* gdk_shader_args_builder_free_to_args: (skip)
|
||||
* @builder: a #GskShaderArgsBuilder
|
||||
*
|
||||
* Creates a new #GBytes args from the current state of the
|
||||
* given @builder, and frees the @builder instance. Any uniforms
|
||||
|
||||
+41
-28
@@ -54,18 +54,31 @@ struct _GskShadow
|
||||
float radius;
|
||||
};
|
||||
|
||||
typedef struct _GskParseLocation GskParseLocation;
|
||||
|
||||
struct _GskParseLocation
|
||||
{
|
||||
gsize bytes;
|
||||
gsize chars;
|
||||
gsize lines;
|
||||
gsize line_bytes;
|
||||
gsize line_chars;
|
||||
};
|
||||
|
||||
/**
|
||||
* GskParseErrorFunc:
|
||||
* @section: the #GtkCssSection where the error occurred
|
||||
* @error: the error
|
||||
* @start: start of the error location
|
||||
* @end: end of the error location
|
||||
* @error: the error
|
||||
* @user_data: user data
|
||||
*
|
||||
* The type of callback that is called when a parse error occurs
|
||||
* during deserialization of node data.
|
||||
*/
|
||||
typedef void (* GskParseErrorFunc) (const GtkCssSection *section,
|
||||
const GError *error,
|
||||
gpointer user_data);
|
||||
typedef void (* GskParseErrorFunc) (const GskParseLocation *start,
|
||||
const GskParseLocation *end,
|
||||
const GError *error,
|
||||
gpointer user_data);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GType gsk_render_node_get_type (void) G_GNUC_CONST;
|
||||
@@ -166,7 +179,7 @@ GDK_AVAILABLE_IN_ALL
|
||||
GskRenderNode * gsk_color_node_new (const GdkRGBA *rgba,
|
||||
const graphene_rect_t *bounds);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
const GdkRGBA * gsk_color_node_peek_color (GskRenderNode *node);
|
||||
const GdkRGBA * gsk_color_node_get_color (GskRenderNode *node);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GType gsk_texture_node_get_type (void) G_GNUC_CONST;
|
||||
@@ -185,13 +198,13 @@ GskRenderNode * gsk_linear_gradient_node_new (const graph
|
||||
const GskColorStop *color_stops,
|
||||
gsize n_color_stops);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
const graphene_point_t * gsk_linear_gradient_node_peek_start (GskRenderNode *node);
|
||||
const graphene_point_t * gsk_linear_gradient_node_get_start (GskRenderNode *node);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
const graphene_point_t * gsk_linear_gradient_node_peek_end (GskRenderNode *node);
|
||||
const graphene_point_t * gsk_linear_gradient_node_get_end (GskRenderNode *node);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gsize gsk_linear_gradient_node_get_n_color_stops (GskRenderNode *node);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
const GskColorStop * gsk_linear_gradient_node_peek_color_stops (GskRenderNode *node,
|
||||
const GskColorStop * gsk_linear_gradient_node_get_color_stops (GskRenderNode *node,
|
||||
gsize *n_stops);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
@@ -217,10 +230,10 @@ GskRenderNode * gsk_radial_gradient_node_new (const graphene_rect_t
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gsize gsk_radial_gradient_node_get_n_color_stops (GskRenderNode *node);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
const GskColorStop * gsk_radial_gradient_node_peek_color_stops (GskRenderNode *node,
|
||||
const GskColorStop * gsk_radial_gradient_node_get_color_stops (GskRenderNode *node,
|
||||
gsize *n_stops);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
const graphene_point_t *gsk_radial_gradient_node_peek_center (GskRenderNode *node);
|
||||
const graphene_point_t *gsk_radial_gradient_node_get_center (GskRenderNode *node);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
float gsk_radial_gradient_node_get_hradius (GskRenderNode *node);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
@@ -249,11 +262,11 @@ GskRenderNode * gsk_border_node_new (const GskRounde
|
||||
const float border_width[4],
|
||||
const GdkRGBA border_color[4]);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
const GskRoundedRect * gsk_border_node_peek_outline (GskRenderNode *node);
|
||||
const GskRoundedRect * gsk_border_node_get_outline (GskRenderNode *node);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
const float * gsk_border_node_peek_widths (GskRenderNode *node);
|
||||
const float * gsk_border_node_get_widths (GskRenderNode *node);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
const GdkRGBA * gsk_border_node_peek_colors (GskRenderNode *node);
|
||||
const GdkRGBA * gsk_border_node_get_colors (GskRenderNode *node);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GType gsk_inset_shadow_node_get_type (void) G_GNUC_CONST;
|
||||
@@ -265,9 +278,9 @@ GskRenderNode * gsk_inset_shadow_node_new (const GskRounde
|
||||
float spread,
|
||||
float blur_radius);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
const GskRoundedRect * gsk_inset_shadow_node_peek_outline (GskRenderNode *node);
|
||||
const GskRoundedRect * gsk_inset_shadow_node_get_outline (GskRenderNode *node);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
const GdkRGBA * gsk_inset_shadow_node_peek_color (GskRenderNode *node);
|
||||
const GdkRGBA * gsk_inset_shadow_node_get_color (GskRenderNode *node);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
float gsk_inset_shadow_node_get_dx (GskRenderNode *node);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
@@ -287,9 +300,9 @@ GskRenderNode * gsk_outset_shadow_node_new (const GskRounde
|
||||
float spread,
|
||||
float blur_radius);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
const GskRoundedRect * gsk_outset_shadow_node_peek_outline (GskRenderNode *node);
|
||||
const GskRoundedRect * gsk_outset_shadow_node_get_outline (GskRenderNode *node);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
const GdkRGBA * gsk_outset_shadow_node_peek_color (GskRenderNode *node);
|
||||
const GdkRGBA * gsk_outset_shadow_node_get_color (GskRenderNode *node);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
float gsk_outset_shadow_node_get_dx (GskRenderNode *node);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
@@ -306,7 +319,7 @@ GskRenderNode * gsk_cairo_node_new (const graphene_
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
cairo_t * gsk_cairo_node_get_draw_context (GskRenderNode *node);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
cairo_surface_t * gsk_cairo_node_peek_surface (GskRenderNode *node);
|
||||
cairo_surface_t * gsk_cairo_node_get_surface (GskRenderNode *node);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GType gsk_container_node_get_type (void) G_GNUC_CONST;
|
||||
@@ -349,9 +362,9 @@ GDK_AVAILABLE_IN_ALL
|
||||
GskRenderNode * gsk_color_matrix_node_get_child (GskRenderNode *node);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
const graphene_matrix_t *
|
||||
gsk_color_matrix_node_peek_color_matrix (GskRenderNode *node);
|
||||
gsk_color_matrix_node_get_color_matrix (GskRenderNode *node);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
const graphene_vec4_t * gsk_color_matrix_node_peek_color_offset (GskRenderNode *node);
|
||||
const graphene_vec4_t * gsk_color_matrix_node_get_color_offset (GskRenderNode *node);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GType gsk_repeat_node_get_type (void) G_GNUC_CONST;
|
||||
@@ -362,7 +375,7 @@ GskRenderNode * gsk_repeat_node_new (const graphene_
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GskRenderNode * gsk_repeat_node_get_child (GskRenderNode *node);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
const graphene_rect_t * gsk_repeat_node_peek_child_bounds (GskRenderNode *node);
|
||||
const graphene_rect_t * gsk_repeat_node_get_child_bounds (GskRenderNode *node);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GType gsk_clip_node_get_type (void) G_GNUC_CONST;
|
||||
@@ -372,7 +385,7 @@ GskRenderNode * gsk_clip_node_new (GskRenderNode
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GskRenderNode * gsk_clip_node_get_child (GskRenderNode *node);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
const graphene_rect_t * gsk_clip_node_peek_clip (GskRenderNode *node);
|
||||
const graphene_rect_t * gsk_clip_node_get_clip (GskRenderNode *node);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GType gsk_rounded_clip_node_get_type (void) G_GNUC_CONST;
|
||||
@@ -382,7 +395,7 @@ GskRenderNode * gsk_rounded_clip_node_new (GskRenderNode
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GskRenderNode * gsk_rounded_clip_node_get_child (GskRenderNode *node);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
const GskRoundedRect * gsk_rounded_clip_node_peek_clip (GskRenderNode *node);
|
||||
const GskRoundedRect * gsk_rounded_clip_node_get_clip (GskRenderNode *node);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GType gsk_shadow_node_get_type (void) G_GNUC_CONST;
|
||||
@@ -393,7 +406,7 @@ GskRenderNode * gsk_shadow_node_new (GskRenderNode
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GskRenderNode * gsk_shadow_node_get_child (GskRenderNode *node);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
const GskShadow * gsk_shadow_node_peek_shadow (GskRenderNode *node,
|
||||
const GskShadow * gsk_shadow_node_get_shadow (GskRenderNode *node,
|
||||
gsize i);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gsize gsk_shadow_node_get_n_shadows (GskRenderNode *node);
|
||||
@@ -432,15 +445,15 @@ GskRenderNode * gsk_text_node_new (PangoFont
|
||||
const GdkRGBA *color,
|
||||
const graphene_point_t *offset);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
PangoFont * gsk_text_node_peek_font (GskRenderNode *node);
|
||||
PangoFont * gsk_text_node_get_font (GskRenderNode *node);
|
||||
gboolean gsk_text_node_has_color_glyphs (GskRenderNode *node);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
guint gsk_text_node_get_num_glyphs (GskRenderNode *node);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
const PangoGlyphInfo *gsk_text_node_peek_glyphs (GskRenderNode *node,
|
||||
const PangoGlyphInfo *gsk_text_node_get_glyphs (GskRenderNode *node,
|
||||
guint *n_glyphs);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
const GdkRGBA * gsk_text_node_peek_color (GskRenderNode *node);
|
||||
const GdkRGBA * gsk_text_node_get_color (GskRenderNode *node);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
const graphene_point_t *gsk_text_node_get_offset (GskRenderNode *node);
|
||||
|
||||
|
||||
+53
-52
@@ -86,7 +86,7 @@ gsk_color_node_diff (GskRenderNode *node1,
|
||||
}
|
||||
|
||||
/**
|
||||
* gsk_color_node_peek_color:
|
||||
* gsk_color_node_get_color:
|
||||
* @node: (type GskColorNode): a #GskColorNode
|
||||
*
|
||||
* Retrieves the color of the given @node.
|
||||
@@ -94,7 +94,7 @@ gsk_color_node_diff (GskRenderNode *node1,
|
||||
* Returns: (transfer none): the color of the node
|
||||
*/
|
||||
const GdkRGBA *
|
||||
gsk_color_node_peek_color (GskRenderNode *node)
|
||||
gsk_color_node_get_color (GskRenderNode *node)
|
||||
{
|
||||
GskColorNode *self = (GskColorNode *) node;
|
||||
|
||||
@@ -322,7 +322,7 @@ gsk_repeating_linear_gradient_node_new (const graphene_rect_t *bounds,
|
||||
}
|
||||
|
||||
/**
|
||||
* gsk_linear_gradient_node_peek_start:
|
||||
* gsk_linear_gradient_node_get_start:
|
||||
* @node: (type GskLinearGradientNode): a #GskRenderNode for a linear gradient
|
||||
*
|
||||
* Retrieves the initial point of the linear gradient.
|
||||
@@ -330,7 +330,7 @@ gsk_repeating_linear_gradient_node_new (const graphene_rect_t *bounds,
|
||||
* Returns: (transfer none): the initial point
|
||||
*/
|
||||
const graphene_point_t *
|
||||
gsk_linear_gradient_node_peek_start (GskRenderNode *node)
|
||||
gsk_linear_gradient_node_get_start (GskRenderNode *node)
|
||||
{
|
||||
GskLinearGradientNode *self = (GskLinearGradientNode *) node;
|
||||
|
||||
@@ -338,7 +338,7 @@ gsk_linear_gradient_node_peek_start (GskRenderNode *node)
|
||||
}
|
||||
|
||||
/**
|
||||
* gsk_linear_gradient_node_peek_end:
|
||||
* gsk_linear_gradient_node_get_end:
|
||||
* @node: (type GskLinearGradientNode): a #GskRenderNode for a linear gradient
|
||||
*
|
||||
* Retrieves the final point of the linear gradient.
|
||||
@@ -346,7 +346,7 @@ gsk_linear_gradient_node_peek_start (GskRenderNode *node)
|
||||
* Returns: (transfer none): the final point
|
||||
*/
|
||||
const graphene_point_t *
|
||||
gsk_linear_gradient_node_peek_end (GskRenderNode *node)
|
||||
gsk_linear_gradient_node_get_end (GskRenderNode *node)
|
||||
{
|
||||
GskLinearGradientNode *self = (GskLinearGradientNode *) node;
|
||||
|
||||
@@ -370,7 +370,7 @@ gsk_linear_gradient_node_get_n_color_stops (GskRenderNode *node)
|
||||
}
|
||||
|
||||
/**
|
||||
* gsk_linear_gradient_node_peek_color_stops:
|
||||
* gsk_linear_gradient_node_get_color_stops:
|
||||
* @node: (type GskLinearGradientNode): a #GskRenderNode for a linear gradient
|
||||
* @n_stops: (out) (optional): the number of color stops in the returned array
|
||||
*
|
||||
@@ -379,8 +379,8 @@ gsk_linear_gradient_node_get_n_color_stops (GskRenderNode *node)
|
||||
* Returns: (array length=n_stops): the color stops in the gradient
|
||||
*/
|
||||
const GskColorStop *
|
||||
gsk_linear_gradient_node_peek_color_stops (GskRenderNode *node,
|
||||
gsize *n_stops)
|
||||
gsk_linear_gradient_node_get_color_stops (GskRenderNode *node,
|
||||
gsize *n_stops)
|
||||
{
|
||||
GskLinearGradientNode *self = (GskLinearGradientNode *) node;
|
||||
|
||||
@@ -641,7 +641,7 @@ gsk_radial_gradient_node_get_n_color_stops (GskRenderNode *node)
|
||||
}
|
||||
|
||||
/**
|
||||
* gsk_radial_gradient_node_peek_color_stops:
|
||||
* gsk_radial_gradient_node_get_color_stops:
|
||||
* @node: (type GskRadialGradientNode): a #GskRenderNode for a radial gradient
|
||||
* @n_stops: (out) (optional): the number of color stops in the returned array
|
||||
*
|
||||
@@ -650,8 +650,8 @@ gsk_radial_gradient_node_get_n_color_stops (GskRenderNode *node)
|
||||
* Returns: (array length=n_stops): the color stops in the gradient
|
||||
*/
|
||||
const GskColorStop *
|
||||
gsk_radial_gradient_node_peek_color_stops (GskRenderNode *node,
|
||||
gsize *n_stops)
|
||||
gsk_radial_gradient_node_get_color_stops (GskRenderNode *node,
|
||||
gsize *n_stops)
|
||||
{
|
||||
GskRadialGradientNode *self = (GskRadialGradientNode *) node;
|
||||
|
||||
@@ -662,7 +662,7 @@ gsk_radial_gradient_node_peek_color_stops (GskRenderNode *node,
|
||||
}
|
||||
|
||||
/**
|
||||
* gsk_radial_gradient_node_peek_center:
|
||||
* gsk_radial_gradient_node_get_center:
|
||||
* @node: (type GskRadialGradientNode): a #GskRenderNode for a radial gradient
|
||||
*
|
||||
* Retrieves the center pointer for the gradient.
|
||||
@@ -670,7 +670,7 @@ gsk_radial_gradient_node_peek_color_stops (GskRenderNode *node,
|
||||
* Returns: the center point for the gradient
|
||||
*/
|
||||
const graphene_point_t *
|
||||
gsk_radial_gradient_node_peek_center (GskRenderNode *node)
|
||||
gsk_radial_gradient_node_get_center (GskRenderNode *node)
|
||||
{
|
||||
GskRadialGradientNode *self = (GskRadialGradientNode *) node;
|
||||
|
||||
@@ -919,7 +919,7 @@ gsk_border_node_diff (GskRenderNode *node1,
|
||||
}
|
||||
|
||||
/**
|
||||
* gsk_border_node_peek_outline:
|
||||
* gsk_border_node_get_outline:
|
||||
* @node: (type GskBorderNode): a #GskRenderNode for a border
|
||||
*
|
||||
* Retrieves the outline of the border.
|
||||
@@ -927,7 +927,7 @@ gsk_border_node_diff (GskRenderNode *node1,
|
||||
* Returns: the outline of the border
|
||||
*/
|
||||
const GskRoundedRect *
|
||||
gsk_border_node_peek_outline (GskRenderNode *node)
|
||||
gsk_border_node_get_outline (GskRenderNode *node)
|
||||
{
|
||||
GskBorderNode *self = (GskBorderNode *) node;
|
||||
|
||||
@@ -935,16 +935,17 @@ gsk_border_node_peek_outline (GskRenderNode *node)
|
||||
}
|
||||
|
||||
/**
|
||||
* gsk_border_node_peek_widths:
|
||||
* gsk_border_node_get_widths:
|
||||
* @node: (type GskBorderNode): a #GskRenderNode for a border
|
||||
*
|
||||
* Retrieves the stroke widths of the border.
|
||||
*
|
||||
* Returns: (transfer none): an array of 4 floats for the top,
|
||||
* right, bottom and left stroke width of the border
|
||||
* Returns: (transfer none) (array fixed-size=4): an array of 4 floats
|
||||
* for the top, right, bottom and left stroke width of the border,
|
||||
* respectively
|
||||
*/
|
||||
const float *
|
||||
gsk_border_node_peek_widths (GskRenderNode *node)
|
||||
gsk_border_node_get_widths (GskRenderNode *node)
|
||||
{
|
||||
GskBorderNode *self = (GskBorderNode *) node;
|
||||
|
||||
@@ -952,7 +953,7 @@ gsk_border_node_peek_widths (GskRenderNode *node)
|
||||
}
|
||||
|
||||
/**
|
||||
* gsk_border_node_peek_colors:
|
||||
* gsk_border_node_get_colors:
|
||||
* @node: (type GskBorderNode): a #GskRenderNode for a border
|
||||
*
|
||||
* Retrieves the colors of the border.
|
||||
@@ -961,7 +962,7 @@ gsk_border_node_peek_widths (GskRenderNode *node)
|
||||
* for the top, right, bottom and left color of the border
|
||||
*/
|
||||
const GdkRGBA *
|
||||
gsk_border_node_peek_colors (GskRenderNode *node)
|
||||
gsk_border_node_get_colors (GskRenderNode *node)
|
||||
{
|
||||
GskBorderNode *self = (GskBorderNode *) node;
|
||||
|
||||
@@ -1587,7 +1588,7 @@ gsk_inset_shadow_node_new (const GskRoundedRect *outline,
|
||||
}
|
||||
|
||||
/**
|
||||
* gsk_inset_shadow_node_peek_outline:
|
||||
* gsk_inset_shadow_node_get_outline:
|
||||
* @node: (type GskInsetShadowNode): a #GskRenderNode for an inset shadow
|
||||
*
|
||||
* Retrieves the outline rectangle of the inset shadow.
|
||||
@@ -1595,7 +1596,7 @@ gsk_inset_shadow_node_new (const GskRoundedRect *outline,
|
||||
* Returns: (transfer none): a rounded rectangle
|
||||
*/
|
||||
const GskRoundedRect *
|
||||
gsk_inset_shadow_node_peek_outline (GskRenderNode *node)
|
||||
gsk_inset_shadow_node_get_outline (GskRenderNode *node)
|
||||
{
|
||||
GskInsetShadowNode *self = (GskInsetShadowNode *) node;
|
||||
|
||||
@@ -1605,7 +1606,7 @@ gsk_inset_shadow_node_peek_outline (GskRenderNode *node)
|
||||
}
|
||||
|
||||
/**
|
||||
* gsk_inset_shadow_node_peek_color:
|
||||
* gsk_inset_shadow_node_get_color:
|
||||
* @node: (type GskInsetShadowNode): a #GskRenderNode for an inset shadow
|
||||
*
|
||||
* Retrieves the color of the inset shadow.
|
||||
@@ -1613,7 +1614,7 @@ gsk_inset_shadow_node_peek_outline (GskRenderNode *node)
|
||||
* Returns: (transfer none): the color of the shadow
|
||||
*/
|
||||
const GdkRGBA *
|
||||
gsk_inset_shadow_node_peek_color (GskRenderNode *node)
|
||||
gsk_inset_shadow_node_get_color (GskRenderNode *node)
|
||||
{
|
||||
GskInsetShadowNode *self = (GskInsetShadowNode *) node;
|
||||
|
||||
@@ -1896,7 +1897,7 @@ gsk_outset_shadow_node_new (const GskRoundedRect *outline,
|
||||
}
|
||||
|
||||
/**
|
||||
* gsk_outset_shadow_node_peek_outline:
|
||||
* gsk_outset_shadow_node_get_outline:
|
||||
* @node: (type GskOutsetShadowNode): a #GskRenderNode for an outset shadow
|
||||
*
|
||||
* Retrieves the outline rectangle of the outset shadow.
|
||||
@@ -1904,7 +1905,7 @@ gsk_outset_shadow_node_new (const GskRoundedRect *outline,
|
||||
* Returns: (transfer none): a rounded rectangle
|
||||
*/
|
||||
const GskRoundedRect *
|
||||
gsk_outset_shadow_node_peek_outline (GskRenderNode *node)
|
||||
gsk_outset_shadow_node_get_outline (GskRenderNode *node)
|
||||
{
|
||||
GskOutsetShadowNode *self = (GskOutsetShadowNode *) node;
|
||||
|
||||
@@ -1914,7 +1915,7 @@ gsk_outset_shadow_node_peek_outline (GskRenderNode *node)
|
||||
}
|
||||
|
||||
/**
|
||||
* gsk_outset_shadow_node_peek_color:
|
||||
* gsk_outset_shadow_node_get_color:
|
||||
* @node: (type GskOutsetShadowNode): a #GskRenderNode for an outset shadow
|
||||
*
|
||||
* Retrieves the color of the outset shadow.
|
||||
@@ -1922,7 +1923,7 @@ gsk_outset_shadow_node_peek_outline (GskRenderNode *node)
|
||||
* Returns: (transfer none): a color
|
||||
*/
|
||||
const GdkRGBA *
|
||||
gsk_outset_shadow_node_peek_color (GskRenderNode *node)
|
||||
gsk_outset_shadow_node_get_color (GskRenderNode *node)
|
||||
{
|
||||
GskOutsetShadowNode *self = (GskOutsetShadowNode *) node;
|
||||
|
||||
@@ -2038,7 +2039,7 @@ gsk_cairo_node_draw (GskRenderNode *node,
|
||||
}
|
||||
|
||||
/**
|
||||
* gsk_cairo_node_peek_surface:
|
||||
* gsk_cairo_node_get_surface:
|
||||
* @node: (type GskCairoNode): a #GskRenderNode for a Cairo surface
|
||||
*
|
||||
* Retrieves the Cairo surface used by the render node.
|
||||
@@ -2046,7 +2047,7 @@ gsk_cairo_node_draw (GskRenderNode *node,
|
||||
* Returns: (transfer none): a Cairo surface
|
||||
*/
|
||||
cairo_surface_t *
|
||||
gsk_cairo_node_peek_surface (GskRenderNode *node)
|
||||
gsk_cairo_node_get_surface (GskRenderNode *node)
|
||||
{
|
||||
GskCairoNode *self = (GskCairoNode *) node;
|
||||
|
||||
@@ -2823,7 +2824,7 @@ gsk_color_matrix_node_get_child (GskRenderNode *node)
|
||||
}
|
||||
|
||||
/**
|
||||
* gsk_color_matrix_node_peek_color_matrix:
|
||||
* gsk_color_matrix_node_get_color_matrix:
|
||||
* @node: (type GskColorMatrixNode): a color matrix #GskRenderNode
|
||||
*
|
||||
* Retrieves the color matrix used by the @node.
|
||||
@@ -2831,7 +2832,7 @@ gsk_color_matrix_node_get_child (GskRenderNode *node)
|
||||
* Returns: a 4x4 color matrix
|
||||
*/
|
||||
const graphene_matrix_t *
|
||||
gsk_color_matrix_node_peek_color_matrix (GskRenderNode *node)
|
||||
gsk_color_matrix_node_get_color_matrix (GskRenderNode *node)
|
||||
{
|
||||
GskColorMatrixNode *self = (GskColorMatrixNode *) node;
|
||||
|
||||
@@ -2841,7 +2842,7 @@ gsk_color_matrix_node_peek_color_matrix (GskRenderNode *node)
|
||||
}
|
||||
|
||||
/**
|
||||
* gsk_color_matrix_node_peek_color_offset:
|
||||
* gsk_color_matrix_node_get_color_offset:
|
||||
* @node: (type GskColorMatrixNode): a color matrix #GskRenderNode
|
||||
*
|
||||
* Retrieves the color offset used by the @node.
|
||||
@@ -2849,7 +2850,7 @@ gsk_color_matrix_node_peek_color_matrix (GskRenderNode *node)
|
||||
* Returns: a color vector
|
||||
*/
|
||||
const graphene_vec4_t *
|
||||
gsk_color_matrix_node_peek_color_offset (GskRenderNode *node)
|
||||
gsk_color_matrix_node_get_color_offset (GskRenderNode *node)
|
||||
{
|
||||
GskColorMatrixNode *self = (GskColorMatrixNode *) node;
|
||||
|
||||
@@ -2973,7 +2974,7 @@ gsk_repeat_node_get_child (GskRenderNode *node)
|
||||
}
|
||||
|
||||
/**
|
||||
* gsk_repeat_node_peek_child_bounds:
|
||||
* gsk_repeat_node_get_child_bounds:
|
||||
* @node: (type GskRepeatNode): a repeat #GskRenderNode
|
||||
*
|
||||
* Retrieves the bounding rectangle of the child of @node.
|
||||
@@ -2981,7 +2982,7 @@ gsk_repeat_node_get_child (GskRenderNode *node)
|
||||
* Returns: (transfer none): a bounding rectangle
|
||||
*/
|
||||
const graphene_rect_t *
|
||||
gsk_repeat_node_peek_child_bounds (GskRenderNode *node)
|
||||
gsk_repeat_node_get_child_bounds (GskRenderNode *node)
|
||||
{
|
||||
GskRepeatNode *self = (GskRepeatNode *) node;
|
||||
|
||||
@@ -3103,7 +3104,7 @@ gsk_clip_node_get_child (GskRenderNode *node)
|
||||
}
|
||||
|
||||
/**
|
||||
* gsk_clip_node_peek_clip:
|
||||
* gsk_clip_node_get_clip:
|
||||
* @node: (type GskClipNode): a #GskClipNode
|
||||
*
|
||||
* Retrieves the clip rectangle for @node.
|
||||
@@ -3111,7 +3112,7 @@ gsk_clip_node_get_child (GskRenderNode *node)
|
||||
* Returns: a clip rectangle
|
||||
*/
|
||||
const graphene_rect_t *
|
||||
gsk_clip_node_peek_clip (GskRenderNode *node)
|
||||
gsk_clip_node_get_clip (GskRenderNode *node)
|
||||
{
|
||||
GskClipNode *self = (GskClipNode *) node;
|
||||
|
||||
@@ -3233,7 +3234,7 @@ gsk_rounded_clip_node_get_child (GskRenderNode *node)
|
||||
}
|
||||
|
||||
/**
|
||||
* gsk_rounded_clip_node_peek_clip:
|
||||
* gsk_rounded_clip_node_get_clip:
|
||||
* @node: (type GskRoundedClipNode): a rounded clip #GskRenderNode
|
||||
*
|
||||
* Retrievs the rounded rectangle used to clip the contents of the @node.
|
||||
@@ -3241,7 +3242,7 @@ gsk_rounded_clip_node_get_child (GskRenderNode *node)
|
||||
* Returns: (transfer none): a rounded rectangle
|
||||
*/
|
||||
const GskRoundedRect *
|
||||
gsk_rounded_clip_node_peek_clip (GskRenderNode *node)
|
||||
gsk_rounded_clip_node_get_clip (GskRenderNode *node)
|
||||
{
|
||||
GskRoundedClipNode *self = (GskRoundedClipNode *) node;
|
||||
|
||||
@@ -3451,7 +3452,7 @@ gsk_shadow_node_get_child (GskRenderNode *node)
|
||||
}
|
||||
|
||||
/**
|
||||
* gsk_shadow_node_peek_shadow:
|
||||
* gsk_shadow_node_get_shadow:
|
||||
* @node: (type GskShadowNode): a shadow #GskRenderNode
|
||||
* @i: the given index
|
||||
*
|
||||
@@ -3460,8 +3461,8 @@ gsk_shadow_node_get_child (GskRenderNode *node)
|
||||
* Returns: (transfer none): the shadow data
|
||||
*/
|
||||
const GskShadow *
|
||||
gsk_shadow_node_peek_shadow (GskRenderNode *node,
|
||||
gsize i)
|
||||
gsk_shadow_node_get_shadow (GskRenderNode *node,
|
||||
gsize i)
|
||||
{
|
||||
GskShadowNode *self = (GskShadowNode *) node;
|
||||
|
||||
@@ -3983,7 +3984,7 @@ gsk_text_node_new (PangoFont *font,
|
||||
}
|
||||
|
||||
/**
|
||||
* gsk_text_node_peek_color:
|
||||
* gsk_text_node_get_color:
|
||||
* @node: (type GskTextNode): a text #GskRenderNode
|
||||
*
|
||||
* Retrieves the color used by the text @node.
|
||||
@@ -3991,7 +3992,7 @@ gsk_text_node_new (PangoFont *font,
|
||||
* Returns: (transfer none): the text color
|
||||
*/
|
||||
const GdkRGBA *
|
||||
gsk_text_node_peek_color (GskRenderNode *node)
|
||||
gsk_text_node_get_color (GskRenderNode *node)
|
||||
{
|
||||
GskTextNode *self = (GskTextNode *) node;
|
||||
|
||||
@@ -4001,7 +4002,7 @@ gsk_text_node_peek_color (GskRenderNode *node)
|
||||
}
|
||||
|
||||
/**
|
||||
* gsk_text_node_peek_font:
|
||||
* gsk_text_node_get_font:
|
||||
* @node: (type GskTextNode): The #GskRenderNode
|
||||
*
|
||||
* Returns the font used by the text @node.
|
||||
@@ -4009,7 +4010,7 @@ gsk_text_node_peek_color (GskRenderNode *node)
|
||||
* Returns: (transfer none): the font
|
||||
*/
|
||||
PangoFont *
|
||||
gsk_text_node_peek_font (GskRenderNode *node)
|
||||
gsk_text_node_get_font (GskRenderNode *node)
|
||||
{
|
||||
GskTextNode *self = (GskTextNode *) node;
|
||||
|
||||
@@ -4055,7 +4056,7 @@ gsk_text_node_get_num_glyphs (GskRenderNode *node)
|
||||
}
|
||||
|
||||
/**
|
||||
* gsk_text_node_peek_glyphs:
|
||||
* gsk_text_node_get_glyphs:
|
||||
* @node: (type GskTextNode): a text #GskRenderNode
|
||||
* @n_glyphs: (out) (optional): the number of glyphs returned
|
||||
*
|
||||
@@ -4064,8 +4065,8 @@ gsk_text_node_get_num_glyphs (GskRenderNode *node)
|
||||
* Returns: (transfer none) (array length=n_glyphs): the glyph information
|
||||
*/
|
||||
const PangoGlyphInfo *
|
||||
gsk_text_node_peek_glyphs (GskRenderNode *node,
|
||||
guint *n_glyphs)
|
||||
gsk_text_node_get_glyphs (GskRenderNode *node,
|
||||
guint *n_glyphs)
|
||||
{
|
||||
GskTextNode *self = (GskTextNode *) node;
|
||||
|
||||
|
||||
+29
-31
@@ -1859,12 +1859,10 @@ gsk_render_node_parser_error (GtkCssParser *parser,
|
||||
} *error_func_pair = user_data;
|
||||
|
||||
if (error_func_pair->error_func)
|
||||
{
|
||||
GtkCssSection *section = gtk_css_section_new (gtk_css_parser_get_file (parser), start, end);
|
||||
|
||||
error_func_pair->error_func (section, error, error_func_pair->user_data);
|
||||
gtk_css_section_unref (section);
|
||||
}
|
||||
error_func_pair->error_func ((const GskParseLocation *)start,
|
||||
(const GskParseLocation *)end,
|
||||
error,
|
||||
error_func_pair->user_data);
|
||||
}
|
||||
|
||||
GskRenderNode *
|
||||
@@ -2276,7 +2274,7 @@ render_node_print (Printer *p,
|
||||
{
|
||||
start_node (p, "color");
|
||||
append_rect_param (p, "bounds", &node->bounds);
|
||||
append_rgba_param (p, "color", gsk_color_node_peek_color (node));
|
||||
append_rgba_param (p, "color", gsk_color_node_get_color (node));
|
||||
end_node (p);
|
||||
}
|
||||
break;
|
||||
@@ -2297,7 +2295,7 @@ render_node_print (Printer *p,
|
||||
case GSK_LINEAR_GRADIENT_NODE:
|
||||
{
|
||||
const gsize n_stops = gsk_linear_gradient_node_get_n_color_stops (node);
|
||||
const GskColorStop *stops = gsk_linear_gradient_node_peek_color_stops (node, NULL);
|
||||
const GskColorStop *stops = gsk_linear_gradient_node_get_color_stops (node, NULL);
|
||||
gsize i;
|
||||
|
||||
if (gsk_render_node_get_node_type (node) == GSK_REPEATING_LINEAR_GRADIENT_NODE)
|
||||
@@ -2306,8 +2304,8 @@ render_node_print (Printer *p,
|
||||
start_node (p, "linear-gradient");
|
||||
|
||||
append_rect_param (p, "bounds", &node->bounds);
|
||||
append_point_param (p, "end", gsk_linear_gradient_node_peek_end (node));
|
||||
append_point_param (p, "start", gsk_linear_gradient_node_peek_start (node));
|
||||
append_point_param (p, "end", gsk_linear_gradient_node_get_end (node));
|
||||
append_point_param (p, "start", gsk_linear_gradient_node_get_start (node));
|
||||
|
||||
_indent (p);
|
||||
g_string_append (p->str, "stops: ");
|
||||
@@ -2330,7 +2328,7 @@ render_node_print (Printer *p,
|
||||
case GSK_RADIAL_GRADIENT_NODE:
|
||||
{
|
||||
const gsize n_stops = gsk_radial_gradient_node_get_n_color_stops (node);
|
||||
const GskColorStop *stops = gsk_radial_gradient_node_peek_color_stops (node, NULL);
|
||||
const GskColorStop *stops = gsk_radial_gradient_node_get_color_stops (node, NULL);
|
||||
gsize i;
|
||||
|
||||
if (gsk_render_node_get_node_type (node) == GSK_REPEATING_RADIAL_GRADIENT_NODE)
|
||||
@@ -2339,7 +2337,7 @@ render_node_print (Printer *p,
|
||||
start_node (p, "radial-gradient");
|
||||
|
||||
append_rect_param (p, "bounds", &node->bounds);
|
||||
append_point_param (p, "center", gsk_radial_gradient_node_peek_center (node));
|
||||
append_point_param (p, "center", gsk_radial_gradient_node_get_center (node));
|
||||
append_float_param (p, "hradius", gsk_radial_gradient_node_get_hradius (node), 0.0f);
|
||||
append_float_param (p, "vradius", gsk_radial_gradient_node_get_vradius (node), 0.0f);
|
||||
append_float_param (p, "start", gsk_radial_gradient_node_get_start (node), 0.0f);
|
||||
@@ -2375,7 +2373,7 @@ render_node_print (Printer *p,
|
||||
|
||||
case GSK_OUTSET_SHADOW_NODE:
|
||||
{
|
||||
const GdkRGBA *color = gsk_outset_shadow_node_peek_color (node);
|
||||
const GdkRGBA *color = gsk_outset_shadow_node_get_color (node);
|
||||
|
||||
start_node (p, "outset-shadow");
|
||||
|
||||
@@ -2384,7 +2382,7 @@ render_node_print (Printer *p,
|
||||
append_rgba_param (p, "color", color);
|
||||
append_float_param (p, "dx", gsk_outset_shadow_node_get_dx (node), 1.0f);
|
||||
append_float_param (p, "dy", gsk_outset_shadow_node_get_dy (node), 1.0f);
|
||||
append_rounded_rect_param (p, "outline", gsk_outset_shadow_node_peek_outline (node));
|
||||
append_rounded_rect_param (p, "outline", gsk_outset_shadow_node_get_outline (node));
|
||||
append_float_param (p, "spread", gsk_outset_shadow_node_get_spread (node), 0.0f);
|
||||
|
||||
end_node (p);
|
||||
@@ -2396,7 +2394,7 @@ render_node_print (Printer *p,
|
||||
start_node (p, "clip");
|
||||
|
||||
append_node_param (p, "child", gsk_clip_node_get_child (node));
|
||||
append_rect_param (p, "clip", gsk_clip_node_peek_clip (node));
|
||||
append_rect_param (p, "clip", gsk_clip_node_get_clip (node));
|
||||
|
||||
end_node (p);
|
||||
}
|
||||
@@ -2407,7 +2405,7 @@ render_node_print (Printer *p,
|
||||
start_node (p, "rounded-clip");
|
||||
|
||||
append_node_param (p, "child", gsk_rounded_clip_node_get_child (node));
|
||||
append_rounded_rect_param (p, "clip", gsk_rounded_clip_node_peek_clip (node));
|
||||
append_rounded_rect_param (p, "clip", gsk_rounded_clip_node_get_clip (node));
|
||||
|
||||
|
||||
end_node (p);
|
||||
@@ -2432,10 +2430,10 @@ render_node_print (Printer *p,
|
||||
start_node (p, "color-matrix");
|
||||
|
||||
append_node_param (p, "child", gsk_color_matrix_node_get_child (node));
|
||||
if (!graphene_matrix_is_identity (gsk_color_matrix_node_peek_color_matrix (node)))
|
||||
append_matrix_param (p, "matrix", gsk_color_matrix_node_peek_color_matrix (node));
|
||||
if (!graphene_vec4_equal (gsk_color_matrix_node_peek_color_offset (node), graphene_vec4_zero ()))
|
||||
append_vec4_param (p, "offset", gsk_color_matrix_node_peek_color_offset (node));
|
||||
if (!graphene_matrix_is_identity (gsk_color_matrix_node_get_color_matrix (node)))
|
||||
append_matrix_param (p, "matrix", gsk_color_matrix_node_get_color_matrix (node));
|
||||
if (!graphene_vec4_equal (gsk_color_matrix_node_get_color_offset (node), graphene_vec4_zero ()))
|
||||
append_vec4_param (p, "offset", gsk_color_matrix_node_get_color_offset (node));
|
||||
|
||||
end_node (p);
|
||||
}
|
||||
@@ -2443,8 +2441,8 @@ render_node_print (Printer *p,
|
||||
|
||||
case GSK_BORDER_NODE:
|
||||
{
|
||||
const GdkRGBA *colors = gsk_border_node_peek_colors (node);
|
||||
const float *widths = gsk_border_node_peek_widths (node);
|
||||
const GdkRGBA *colors = gsk_border_node_get_colors (node);
|
||||
const float *widths = gsk_border_node_get_widths (node);
|
||||
guint i, n;
|
||||
start_node (p, "border");
|
||||
|
||||
@@ -2472,7 +2470,7 @@ render_node_print (Printer *p,
|
||||
g_string_append (p->str, ";\n");
|
||||
}
|
||||
|
||||
append_rounded_rect_param (p, "outline", gsk_border_node_peek_outline (node));
|
||||
append_rounded_rect_param (p, "outline", gsk_border_node_get_outline (node));
|
||||
|
||||
if (widths[3] != widths[1])
|
||||
n = 4;
|
||||
@@ -2515,7 +2513,7 @@ render_node_print (Printer *p,
|
||||
g_string_append (p->str, "shadows: ");
|
||||
for (i = 0; i < n_shadows; i ++)
|
||||
{
|
||||
const GskShadow *s = gsk_shadow_node_peek_shadow (node, i);
|
||||
const GskShadow *s = gsk_shadow_node_get_shadow (node, i);
|
||||
char *color;
|
||||
|
||||
if (i > 0)
|
||||
@@ -2545,7 +2543,7 @@ render_node_print (Printer *p,
|
||||
|
||||
case GSK_INSET_SHADOW_NODE:
|
||||
{
|
||||
const GdkRGBA *color = gsk_inset_shadow_node_peek_color (node);
|
||||
const GdkRGBA *color = gsk_inset_shadow_node_get_color (node);
|
||||
start_node (p, "inset-shadow");
|
||||
|
||||
append_float_param (p, "blur", gsk_inset_shadow_node_get_blur_radius (node), 0.0f);
|
||||
@@ -2553,7 +2551,7 @@ render_node_print (Printer *p,
|
||||
append_rgba_param (p, "color", color);
|
||||
append_float_param (p, "dx", gsk_inset_shadow_node_get_dx (node), 1.0f);
|
||||
append_float_param (p, "dy", gsk_inset_shadow_node_get_dy (node), 1.0f);
|
||||
append_rounded_rect_param (p, "outline", gsk_inset_shadow_node_peek_outline (node));
|
||||
append_rounded_rect_param (p, "outline", gsk_inset_shadow_node_get_outline (node));
|
||||
append_float_param (p, "spread", gsk_inset_shadow_node_get_spread (node), 0.0f);
|
||||
|
||||
end_node (p);
|
||||
@@ -2589,10 +2587,10 @@ render_node_print (Printer *p,
|
||||
case GSK_TEXT_NODE:
|
||||
{
|
||||
const guint n_glyphs = gsk_text_node_get_num_glyphs (node);
|
||||
const PangoGlyphInfo *glyphs = gsk_text_node_peek_glyphs (node, NULL);
|
||||
const PangoGlyphInfo *glyphs = gsk_text_node_get_glyphs (node, NULL);
|
||||
const graphene_point_t *offset = gsk_text_node_get_offset (node);
|
||||
const GdkRGBA *color = gsk_text_node_peek_color (node);
|
||||
PangoFont *font = gsk_text_node_peek_font (node);
|
||||
const GdkRGBA *color = gsk_text_node_get_color (node);
|
||||
PangoFont *font = gsk_text_node_get_font (node);
|
||||
PangoFontDescription *desc;
|
||||
char *font_name;
|
||||
GString *str;
|
||||
@@ -2827,7 +2825,7 @@ render_node_print (Printer *p,
|
||||
case GSK_REPEAT_NODE:
|
||||
{
|
||||
GskRenderNode *child = gsk_repeat_node_get_child (node);
|
||||
const graphene_rect_t *child_bounds = gsk_repeat_node_peek_child_bounds (node);
|
||||
const graphene_rect_t *child_bounds = gsk_repeat_node_get_child_bounds (node);
|
||||
|
||||
start_node (p, "repeat");
|
||||
|
||||
@@ -2874,7 +2872,7 @@ render_node_print (Printer *p,
|
||||
|
||||
case GSK_CAIRO_NODE:
|
||||
{
|
||||
cairo_surface_t *surface = gsk_cairo_node_peek_surface (node);
|
||||
cairo_surface_t *surface = gsk_cairo_node_get_surface (node);
|
||||
GByteArray *array;
|
||||
|
||||
start_node (p, "cairo");
|
||||
|
||||
@@ -337,7 +337,7 @@ gsk_vulkan_render_pass_add_node (GskVulkanRenderPass *self,
|
||||
return;
|
||||
|
||||
case GSK_CAIRO_NODE:
|
||||
if (gsk_cairo_node_peek_surface (node) == NULL)
|
||||
if (gsk_cairo_node_get_surface (node) == NULL)
|
||||
return;
|
||||
/* We're using recording surfaces, so drawing them to an image
|
||||
* surface and uploading them is the right thing.
|
||||
@@ -347,8 +347,8 @@ gsk_vulkan_render_pass_add_node (GskVulkanRenderPass *self,
|
||||
|
||||
case GSK_TEXT_NODE:
|
||||
{
|
||||
const PangoFont *font = gsk_text_node_peek_font (node);
|
||||
const PangoGlyphInfo *glyphs = gsk_text_node_peek_glyphs (node, NULL);
|
||||
const PangoFont *font = gsk_text_node_get_font (node);
|
||||
const PangoGlyphInfo *glyphs = gsk_text_node_get_glyphs (node, NULL);
|
||||
guint num_glyphs = gsk_text_node_get_num_glyphs (node);
|
||||
gboolean has_color_glyphs = gsk_text_node_has_color_glyphs (node);
|
||||
int i;
|
||||
@@ -571,7 +571,7 @@ gsk_vulkan_render_pass_add_node (GskVulkanRenderPass *self,
|
||||
|
||||
case GSK_CLIP_NODE:
|
||||
{
|
||||
if (!gsk_vulkan_push_constants_intersect_rect (&op.constants.constants, constants, gsk_clip_node_peek_clip (node)))
|
||||
if (!gsk_vulkan_push_constants_intersect_rect (&op.constants.constants, constants, gsk_clip_node_get_clip (node)))
|
||||
FALLBACK ("Failed to find intersection between clip of type %u and rectangle", constants->clip.type);
|
||||
if (op.constants.constants.clip.type == GSK_VULKAN_CLIP_ALL_CLIPPED)
|
||||
return;
|
||||
@@ -590,7 +590,7 @@ gsk_vulkan_render_pass_add_node (GskVulkanRenderPass *self,
|
||||
{
|
||||
if (!gsk_vulkan_push_constants_intersect_rounded (&op.constants.constants,
|
||||
constants,
|
||||
gsk_rounded_clip_node_peek_clip (node)))
|
||||
gsk_rounded_clip_node_get_clip (node)))
|
||||
FALLBACK ("Failed to find intersection between clip of type %u and rounded rectangle", constants->clip.type);
|
||||
if (op.constants.constants.clip.type == GSK_VULKAN_CLIP_ALL_CLIPPED)
|
||||
return;
|
||||
@@ -932,7 +932,7 @@ gsk_vulkan_render_pass_upload (GskVulkanRenderPass *self,
|
||||
{
|
||||
GskRenderNode *child = gsk_repeat_node_get_child (op->render.node);
|
||||
const graphene_rect_t *bounds = &op->render.node->bounds;
|
||||
const graphene_rect_t *child_bounds = gsk_repeat_node_peek_child_bounds (op->render.node);
|
||||
const graphene_rect_t *child_bounds = gsk_repeat_node_get_child_bounds (op->render.node);
|
||||
|
||||
op->render.source = gsk_vulkan_render_pass_get_node_as_texture (self,
|
||||
render,
|
||||
@@ -1195,10 +1195,10 @@ gsk_vulkan_render_pass_collect_vertex_data (GskVulkanRenderPass *self,
|
||||
data + n_bytes + offset,
|
||||
GSK_VULKAN_RENDERER (gsk_vulkan_render_get_renderer (render)),
|
||||
&op->text.node->bounds,
|
||||
(PangoFont *)gsk_text_node_peek_font (op->text.node),
|
||||
(PangoFont *)gsk_text_node_get_font (op->text.node),
|
||||
gsk_text_node_get_num_glyphs (op->text.node),
|
||||
gsk_text_node_peek_glyphs (op->text.node, NULL),
|
||||
gsk_text_node_peek_color (op->text.node),
|
||||
gsk_text_node_get_glyphs (op->text.node, NULL),
|
||||
gsk_text_node_get_color (op->text.node),
|
||||
gsk_text_node_get_offset (op->text.node),
|
||||
op->text.start_glyph,
|
||||
op->text.num_glyphs,
|
||||
@@ -1214,9 +1214,9 @@ gsk_vulkan_render_pass_collect_vertex_data (GskVulkanRenderPass *self,
|
||||
data + n_bytes + offset,
|
||||
GSK_VULKAN_RENDERER (gsk_vulkan_render_get_renderer (render)),
|
||||
&op->text.node->bounds,
|
||||
(PangoFont *)gsk_text_node_peek_font (op->text.node),
|
||||
(PangoFont *)gsk_text_node_get_font (op->text.node),
|
||||
gsk_text_node_get_num_glyphs (op->text.node),
|
||||
gsk_text_node_peek_glyphs (op->text.node, NULL),
|
||||
gsk_text_node_get_glyphs (op->text.node, NULL),
|
||||
gsk_text_node_get_offset (op->text.node),
|
||||
op->text.start_glyph,
|
||||
op->text.num_glyphs,
|
||||
@@ -1231,7 +1231,7 @@ gsk_vulkan_render_pass_collect_vertex_data (GskVulkanRenderPass *self,
|
||||
gsk_vulkan_color_pipeline_collect_vertex_data (GSK_VULKAN_COLOR_PIPELINE (op->render.pipeline),
|
||||
data + n_bytes + offset,
|
||||
&op->render.node->bounds,
|
||||
gsk_color_node_peek_color (op->render.node));
|
||||
gsk_color_node_get_color (op->render.node));
|
||||
n_bytes += op->render.vertex_count;
|
||||
}
|
||||
break;
|
||||
@@ -1242,11 +1242,11 @@ gsk_vulkan_render_pass_collect_vertex_data (GskVulkanRenderPass *self,
|
||||
gsk_vulkan_linear_gradient_pipeline_collect_vertex_data (GSK_VULKAN_LINEAR_GRADIENT_PIPELINE (op->render.pipeline),
|
||||
data + n_bytes + offset,
|
||||
&op->render.node->bounds,
|
||||
gsk_linear_gradient_node_peek_start (op->render.node),
|
||||
gsk_linear_gradient_node_peek_end (op->render.node),
|
||||
gsk_linear_gradient_node_get_start (op->render.node),
|
||||
gsk_linear_gradient_node_get_end (op->render.node),
|
||||
gsk_render_node_get_node_type (op->render.node) == GSK_REPEATING_LINEAR_GRADIENT_NODE,
|
||||
gsk_linear_gradient_node_get_n_color_stops (op->render.node),
|
||||
gsk_linear_gradient_node_peek_color_stops (op->render.node, NULL));
|
||||
gsk_linear_gradient_node_get_color_stops (op->render.node, NULL));
|
||||
n_bytes += op->render.vertex_count;
|
||||
}
|
||||
break;
|
||||
@@ -1295,8 +1295,8 @@ gsk_vulkan_render_pass_collect_vertex_data (GskVulkanRenderPass *self,
|
||||
data + n_bytes + offset,
|
||||
&op->render.node->bounds,
|
||||
&op->render.source_rect,
|
||||
gsk_color_matrix_node_peek_color_matrix (op->render.node),
|
||||
gsk_color_matrix_node_peek_color_offset (op->render.node));
|
||||
gsk_color_matrix_node_get_color_matrix (op->render.node),
|
||||
gsk_color_matrix_node_get_color_offset (op->render.node));
|
||||
n_bytes += op->render.vertex_count;
|
||||
}
|
||||
break;
|
||||
@@ -1306,9 +1306,9 @@ gsk_vulkan_render_pass_collect_vertex_data (GskVulkanRenderPass *self,
|
||||
op->render.vertex_offset = offset + n_bytes;
|
||||
gsk_vulkan_border_pipeline_collect_vertex_data (GSK_VULKAN_BORDER_PIPELINE (op->render.pipeline),
|
||||
data + n_bytes + offset,
|
||||
gsk_border_node_peek_outline (op->render.node),
|
||||
gsk_border_node_peek_widths (op->render.node),
|
||||
gsk_border_node_peek_colors (op->render.node));
|
||||
gsk_border_node_get_outline (op->render.node),
|
||||
gsk_border_node_get_widths (op->render.node),
|
||||
gsk_border_node_get_colors (op->render.node));
|
||||
n_bytes += op->render.vertex_count;
|
||||
}
|
||||
break;
|
||||
@@ -1318,8 +1318,8 @@ gsk_vulkan_render_pass_collect_vertex_data (GskVulkanRenderPass *self,
|
||||
op->render.vertex_offset = offset + n_bytes;
|
||||
gsk_vulkan_box_shadow_pipeline_collect_vertex_data (GSK_VULKAN_BOX_SHADOW_PIPELINE (op->render.pipeline),
|
||||
data + n_bytes + offset,
|
||||
gsk_inset_shadow_node_peek_outline (op->render.node),
|
||||
gsk_inset_shadow_node_peek_color (op->render.node),
|
||||
gsk_inset_shadow_node_get_outline (op->render.node),
|
||||
gsk_inset_shadow_node_get_color (op->render.node),
|
||||
gsk_inset_shadow_node_get_dx (op->render.node),
|
||||
gsk_inset_shadow_node_get_dy (op->render.node),
|
||||
gsk_inset_shadow_node_get_spread (op->render.node),
|
||||
@@ -1333,8 +1333,8 @@ gsk_vulkan_render_pass_collect_vertex_data (GskVulkanRenderPass *self,
|
||||
op->render.vertex_offset = offset + n_bytes;
|
||||
gsk_vulkan_box_shadow_pipeline_collect_vertex_data (GSK_VULKAN_BOX_SHADOW_PIPELINE (op->render.pipeline),
|
||||
data + n_bytes + offset,
|
||||
gsk_outset_shadow_node_peek_outline (op->render.node),
|
||||
gsk_outset_shadow_node_peek_color (op->render.node),
|
||||
gsk_outset_shadow_node_get_outline (op->render.node),
|
||||
gsk_outset_shadow_node_get_color (op->render.node),
|
||||
gsk_outset_shadow_node_get_dx (op->render.node),
|
||||
gsk_outset_shadow_node_get_dy (op->render.node),
|
||||
gsk_outset_shadow_node_get_spread (op->render.node),
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<property name="Description" type="s" access="read"/>
|
||||
|
||||
<property name="Parent" type="(so)" access="read">
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName" value="QSpiObjectReference"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName" value="QSpiObjectReference"/>
|
||||
</property>
|
||||
|
||||
<property name="ChildCount" type="i" access="read"/>
|
||||
@@ -19,12 +19,12 @@
|
||||
<method name="GetChildAtIndex">
|
||||
<arg direction="in" name="index" type="i"/>
|
||||
<arg direction="out" type="(so)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QSpiObjectReference"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiObjectReference"/>
|
||||
</method>
|
||||
|
||||
<method name="GetChildren">
|
||||
<arg direction="out" type="a(so)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QSpiObjectReferenceArray"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiObjectReferenceArray"/>
|
||||
</method>
|
||||
|
||||
<method name="GetIndexInParent">
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
<method name="GetRelationSet">
|
||||
<arg direction="out" type="a(ua(so))"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QSpiRelationArray"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiRelationArray"/>
|
||||
</method>
|
||||
|
||||
<method name="GetRole">
|
||||
@@ -50,17 +50,17 @@
|
||||
|
||||
<method name="GetState">
|
||||
<arg direction="out" type="au"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QSpiIntList"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiIntList"/>
|
||||
</method>
|
||||
|
||||
<method name="GetAttributes">
|
||||
<arg direction="out" type="a{ss}"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QSpiAttributeSet"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiAttributeSet"/>
|
||||
</method>
|
||||
|
||||
<method name="GetApplication">
|
||||
<arg direction="out" type="(so)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QSpiObjectReference"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiObjectReference"/>
|
||||
</method>
|
||||
|
||||
<method name="GetInterfaces">
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
<method name="GetActions">
|
||||
<arg direction="out" type="a(sss)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QSpiActionArray"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiActionArray"/>
|
||||
</method>
|
||||
|
||||
<method name="DoAction">
|
||||
|
||||
@@ -3,18 +3,18 @@
|
||||
<interface name="org.a11y.atspi.Cache">
|
||||
|
||||
<method name="GetItems">
|
||||
<arg name="nodes" type="a((so)(so)iiassusau)" direction="out"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QSpiAccessibleCacheArray"/>
|
||||
<arg direction="out" name="nodes" type="a((so)(so)(so)iiassusau)"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiAccessibleCacheArray"/>
|
||||
</method>
|
||||
|
||||
<signal name="AddAccessible">
|
||||
<arg name="nodeAdded" type="((so)(so)iiassusau)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiAccessibleCacheItem"/>
|
||||
<arg direction="in" name="nodeAdded" type="((so)(so)(so)iiassusau)"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiAccessibleCacheItem"/>
|
||||
</signal>
|
||||
|
||||
<signal name="RemoveAccessible">
|
||||
<arg name="nodeRemoved" type="(so)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiObjectReference"/>
|
||||
<arg direction="in" name="nodeRemoved" type="(so)"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiObjectReference"/>
|
||||
</signal>
|
||||
|
||||
</interface>
|
||||
|
||||
@@ -4,44 +4,44 @@
|
||||
|
||||
<method name="GetMatches">
|
||||
<arg direction="in" name="rule" type="(auuasuauusub)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In1" value="QSpiMatchRule"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiMatchRule"/>
|
||||
<arg direction="in" name="sortby" type="u"/>
|
||||
<arg direction="in" name="count" type="i"/>
|
||||
<arg direction="in" name="traverse" type="b"/>
|
||||
<arg direction="out" type="a(so)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QSpiReferenceSet"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiReferenceSet"/>
|
||||
</method>
|
||||
|
||||
<method name="GetMatchesTo">
|
||||
<arg direction="in" name="current_object" type="o"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiObjectReference"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiObjectReference"/>
|
||||
<arg direction="in" name="rule" type="(auuasuauusub)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In1" value="QSpiMatchRule"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QSpiMatchRule"/>
|
||||
<arg direction="in" name="sortby" type="u"/>
|
||||
<arg direction="in" name="tree" type="u"/>
|
||||
<arg direction="in" name="limit_scope" type="b"/>
|
||||
<arg direction="in" name="count" type="i"/>
|
||||
<arg direction="in" name="traverse" type="b"/>
|
||||
<arg direction="out" type="a(so)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QSpiReferenceSet"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiReferenceSet"/>
|
||||
</method>
|
||||
|
||||
<method name="GetMatchesFrom">
|
||||
<arg direction="in" name="current_object" type="o"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiObjectReference"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiObjectReference"/>
|
||||
<arg direction="in" name="rule" type="(auuasuauusub)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In1" value="QSpiMatchRule"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QSpiMatchRule"/>
|
||||
<arg direction="in" name="sortby" type="u"/>
|
||||
<arg direction="in" name="tree" type="u"/>
|
||||
<arg direction="in" name="count" type="i"/>
|
||||
<arg direction="in" name="traverse" type="b"/>
|
||||
<arg direction="out" type="a(so)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QSpiReferenceSet"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiReferenceSet"/>
|
||||
</method>
|
||||
|
||||
<method name="GetActiveDescendant">
|
||||
<arg direction="out" type="(so)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QSpiReferenceSet"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiReferenceSet"/>
|
||||
</method>
|
||||
|
||||
</interface>
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
<arg direction="in" name="y" type="i"/>
|
||||
<arg direction="in" name="coord_type" type="u"/>
|
||||
<arg direction="out" type="(so)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QSpiObjectReference"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiObjectReference"/>
|
||||
</method>
|
||||
|
||||
<method name="GetExtents">
|
||||
<arg direction="in" name="coord_type" type="u"/>
|
||||
<arg direction="out" type="(iiii)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QSpiRect"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiRect"/>
|
||||
</method>
|
||||
|
||||
<method name="GetPosition">
|
||||
|
||||
@@ -4,24 +4,20 @@
|
||||
|
||||
<method name="RegisterKeystrokeListener">
|
||||
<arg direction="in" name="listener" type="o"/>
|
||||
<arg direction="in" name="keys" type="a(iisi)">
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In1" value="QSpiKeyTypeArray"/>
|
||||
</arg>
|
||||
<arg direction="in" name="keys" type="a(iisi)"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QSpiKeyTypeArray"/>
|
||||
<arg direction="in" name="mask" type="u"/>
|
||||
<arg direction="in" name="type" type="au">
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In3" value="QSpiEventTypeArray"/>
|
||||
</arg>
|
||||
<arg direction="in" name="mode" type="(bbb)">
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In4" value="QSpiEventMode"/>
|
||||
</arg>
|
||||
<arg direction="in" name="type" type="au"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In3" value="QSpiEventTypeArray"/>
|
||||
<arg direction="in" name="mode" type="(bbb)"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In4" value="QSpiEventMode"/>
|
||||
<arg direction="out" type="b"/>
|
||||
</method>
|
||||
|
||||
<method name="DeregisterKeystrokeListener">
|
||||
<arg direction="in" name="listener" type="o"/>
|
||||
<arg direction="in" name="keys" type="a(iisi)">
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In1" value="QSpiKeyTypeArray"/>
|
||||
</arg>
|
||||
<arg direction="in" name="keys" type="a(iisi)"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In1" value="QSpiKeyTypeArray"/>
|
||||
<arg direction="in" name="mask" type="u"/>
|
||||
<arg direction="in" name="type" type="u"/>
|
||||
</method>
|
||||
@@ -52,12 +48,12 @@
|
||||
<method name="NotifyListenersSync">
|
||||
<arg direction="in" name="event" type="(uiuuisb)"/>
|
||||
<arg direction="out" type="b"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiDeviceEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiDeviceEvent"/>
|
||||
</method>
|
||||
|
||||
<method name="NotifyListenersAsync">
|
||||
<arg direction="in" name="event" type="(uiuuisb)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiDeviceEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiDeviceEvent"/>
|
||||
</method>
|
||||
|
||||
</interface>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
<method name="NotifyEvent">
|
||||
<arg direction="in" name="event" type="(uiuuisb)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiDeviceEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiDeviceEvent"/>
|
||||
<arg direction="out" type="b"/>
|
||||
</method>
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<method name="GetAttributes">
|
||||
<arg direction="out" type="{ss}"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QSpiAttrubutes"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiAttributeSet"/>
|
||||
</method>
|
||||
|
||||
</interface>
|
||||
|
||||
+56
-56
@@ -3,190 +3,190 @@
|
||||
|
||||
<interface name="org.a11y.atspi.Event.Object">
|
||||
<signal name="PropertyChange"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="BoundsChanged"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="LinkSelected"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="StateChanged"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="ChildrenChanged"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="VisibleDataChanged"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="SelectionChanged"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="ModelChanged"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="ActiveDescendantChanged"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="RowInserted"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="RowReordered"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="RowDeleted"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="ColumnInserted"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="ColumnReordered"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="ColumnDeleted"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="TextBoundsChanged"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="TextSelectionChanged"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="TextChanged"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="TextAttributesChanged"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="TextCaretMoved"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="AttributesChanged"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
</interface>
|
||||
|
||||
<interface name="org.a11y.atspi.Event.Window">
|
||||
<signal name="PropertyChange"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="Minimize"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="Maximize"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="Restore"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="Close"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="Create"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="Reparent"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="DesktopCreate"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="DesktopDestroy"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="Destroy"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="Activate"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="Deactivate"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="Raise"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="Lower"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="Move"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="Resize"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="Shade"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="uUshade"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="Restyle"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
</interface>
|
||||
|
||||
<interface name="org.a11y.atspi.Event.Mouse">
|
||||
<signal name="Abs"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="Rel"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="Button"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
</interface>
|
||||
|
||||
<interface name="org.a11y.atspi.Event.Keyboard">
|
||||
<signal name="Modifiers"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
</interface>
|
||||
|
||||
<interface name="org.a11y.atspi.Event.Terminal">
|
||||
<signal name="LineChanged"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="ColumncountChanged"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="LinecountChanged"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="ApplicationChanged"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="CharwidthChanged"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
</interface>
|
||||
|
||||
<interface name="org.a11y.atspi.Event.Document">
|
||||
<signal name="LoadComplete"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="Reload"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="LoadStopped"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="ContentChanged"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="AttributesChanged"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
<signal name="PageChanged"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
</interface>
|
||||
|
||||
<interface name="org.a11y.atspi.Event.Focus">
|
||||
<signal name="Focus"><arg direction="in" type="(suuv)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="QSpiEvent"/>
|
||||
</signal>
|
||||
</interface>
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<method name="GetObject">
|
||||
<arg direction="in" name="i" type="i"/>
|
||||
<arg direction="out" type="(so)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QSpiObjectReference"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiObjectReference"/>
|
||||
</method>
|
||||
|
||||
<method name="GetURI">
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<method name="GetLink">
|
||||
<arg direction="in" name="linkIndex" type="i"/>
|
||||
<arg direction="out" type="(so)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QSpiObjectReference"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiObjectReference"/>
|
||||
</method>
|
||||
|
||||
<method name="GetLinkIndex">
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<method name="GetImageExtents">
|
||||
<arg direction="in" name="coordType" type="u"/>
|
||||
<arg direction="out" type="(iiii)"/>
|
||||
<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QSpiRect"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiRect"/>
|
||||
</method>
|
||||
|
||||
<method name="GetImagePosition">
|
||||
|
||||
@@ -13,8 +13,8 @@
|
||||
</method>
|
||||
|
||||
<method name="GetRegisteredEvents">
|
||||
<arg direction="out" name="events" type="a(ss)">
|
||||
</arg>
|
||||
<arg direction="out" name="events" type="a(ss)"/>
|
||||
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QSpiEventListenerArray"/>
|
||||
</method>
|
||||
|
||||
<signal name="EventListenerRegistered">
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user