Compare commits
68 Commits
7d8121fba1
...
3cbac9d277
Author | SHA1 | Date | |
---|---|---|---|
|
3cbac9d277 | ||
|
d3cb9d638d | ||
|
a931a75c4f | ||
|
79c57b5b80 | ||
|
a84c67da71 | ||
|
ecc9904996 | ||
|
b8db83940b | ||
|
110e76a140 | ||
|
3bd477b454 | ||
|
1b7336583c | ||
|
3ab13ddc4b | ||
|
73d913519d | ||
|
4a73fbda8b | ||
|
fd2295c545 | ||
|
8bf5873272 | ||
|
dfe6d0f8ce | ||
|
929f2ae06b | ||
|
ef57fa8a29 | ||
|
a7da10fea8 | ||
|
a807604ef6 | ||
|
a31479316d | ||
|
fc01879341 | ||
|
a49815926c | ||
|
2e7e51be56 | ||
|
325a9af5e0 | ||
|
8d0bf4ed39 | ||
|
c48fd73189 | ||
|
a8b52cd9d6 | ||
|
de71e95041 | ||
|
202d345a82 | ||
|
fc72d920cd | ||
|
3993d8db52 | ||
|
8320085557 | ||
|
cdcb179808 | ||
|
7878938e9a | ||
|
caf7f8ef49 | ||
|
da3510575e | ||
|
b29f249544 | ||
|
70784b99b1 | ||
|
22d699943d | ||
|
f953212cc5 | ||
|
f4d944119c | ||
|
85c8a7c0d8 | ||
|
41d34f4976 | ||
|
38faeca62e | ||
|
047010a278 | ||
|
964abbd07d | ||
|
5de4d59c31 | ||
|
e0d5d0f3d1 | ||
|
04b79f91e8 | ||
|
b89dba22cd | ||
|
7f8201d7af | ||
|
14b3d5da90 | ||
|
1b41818f50 | ||
|
9e498da9bb | ||
|
2ebcff9349 | ||
|
6daebde9a6 | ||
|
f08952d5fe | ||
|
62acd02c49 | ||
|
7b435dfa7c | ||
|
b32e1b63ee | ||
|
616749c1e2 | ||
|
935dd89622 | ||
|
22c6aa9407 | ||
|
d64336e1a9 | ||
|
e2a36f8b05 | ||
|
98854efa74 | ||
|
0e994ead0f |
@ -691,7 +691,6 @@ macos-x86_64:
|
||||
- source .venv/bin/activate
|
||||
- pip3 install meson==1.2.3
|
||||
- pip3 install ninja==1.11.1
|
||||
- pip3 install packaging==23.2
|
||||
script:
|
||||
# FIXME: Use --wrap-mode=default so we download dependencies each time,
|
||||
# until the macOS runner is a VM where we can use a pre-made image which
|
||||
|
@ -37,7 +37,6 @@ RUN apt-get update -qq && apt-get install --no-install-recommends -qq -y \
|
||||
locales \
|
||||
ninja-build \
|
||||
python3 \
|
||||
python3-packaging \
|
||||
python3-pip \
|
||||
python3-setuptools \
|
||||
python3-wheel \
|
||||
|
@ -50,7 +50,6 @@ RUN dnf -y update \
|
||||
pcre2-devel \
|
||||
"python3-dbusmock >= 0.18.3-2" \
|
||||
python3-docutils \
|
||||
python3-packaging \
|
||||
python3-pip \
|
||||
python3-pygments \
|
||||
python3-wheel \
|
||||
|
@ -12,7 +12,7 @@ for %%x in (%*) do (
|
||||
set args=%args:~1%
|
||||
|
||||
:: FIXME: make warnings fatal
|
||||
pip3 install --upgrade --user meson==1.2.3 packaging==23.2 || goto :error
|
||||
pip3 install --upgrade --user meson==1.2.3 || goto :error
|
||||
meson setup %args% _build || goto :error
|
||||
meson compile -C _build || goto :error
|
||||
|
||||
|
@ -29,8 +29,6 @@ CCACHE_BASEDIR="$(pwd)"
|
||||
CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
|
||||
export CCACHE_BASEDIR CCACHE_DIR
|
||||
|
||||
pip3 install --upgrade --user packaging==23.2
|
||||
|
||||
PATH="$(cygpath "$USERPROFILE")/.local/bin:$HOME/.local/bin:$PATH"
|
||||
DIR="$(pwd)"
|
||||
export PATH CFLAGS
|
||||
|
235
NEWS
@ -1,3 +1,238 @@
|
||||
Overview of changes in GLib 2.81.0, 2024-06-28
|
||||
==============================================
|
||||
|
||||
* Add a strong recommendation to build with a toolchain that supports C11; this
|
||||
will become a hard requirement in future stable release cycles (!4082, work by
|
||||
Emmanuele Bassi)
|
||||
|
||||
* Fix CVE-2024-34397: GDBus signal subscriptions for well-known names are
|
||||
vulnerable to unicast spoofing (#3268, work by Simon McVittie, reported by
|
||||
Alicia Boya García)
|
||||
|
||||
* Fix a regression with IBus caused by the fix for CVE-2024-34397 (#3353,
|
||||
work by Simon McVittie)
|
||||
|
||||
* Fix Devhelp documentation indexes (#3287, work by Philip Withnall)
|
||||
|
||||
* Fix installation directory of the GVariant specification (#3351, work by
|
||||
Michael Catanzaro)
|
||||
|
||||
* Change `dtrace` and `systemtap` Meson options to auto-enabled features, and
|
||||
change default for `sysprof` from `disabled` to `auto` (#3354, work by Michael
|
||||
Catanzaro)
|
||||
|
||||
* Change how Python is found at configure time and in script shebangs
|
||||
(#3301, #3331, work by multiple people)
|
||||
|
||||
* Make various libgirepository APIs return reproducible results by defining an
|
||||
order over namespaces (#3303, work by Philip Withnall)
|
||||
|
||||
* Ignore `SIGPIPE` for the entire parent process when creating a `GSubprocess`
|
||||
(#3310, work by Philip Withnall)
|
||||
|
||||
* Use alternate signal stack to receive signals if the process provides one
|
||||
(!3983, #3314, #3315, #3337, work by Marco Trevisan, Pablo Correa Gomez,
|
||||
Philip Withnall)
|
||||
|
||||
* Allow multiple parameters for D-Bus activation of app actions (#3333, work by
|
||||
Philip Withnall, Julian Sparber)
|
||||
|
||||
* Fix out-of-bounds access when reading >4GiB files (#3397, work by
|
||||
Benjamin Otte, Philip Withnall)
|
||||
|
||||
* Use `ppoll()` rather than `poll()` where possible for more precise timeouts
|
||||
(!3958, work by Christian Hergert)
|
||||
|
||||
* Port various parts of the documentation to gi-docgen format (#3250, work by
|
||||
Sudhanshu Tiwari, Philip Withnall)
|
||||
|
||||
* Fix `futex_time64()` use on Android ≤ 10 (!3987, work by Amyspark)
|
||||
|
||||
* Various improvements to bash completion for GLib utilities (!3989, !4012,
|
||||
!4013, work by Ville Skyttä, Philip Withnall)
|
||||
|
||||
* Bugs fixed:
|
||||
- GNOME/tracker-miners#315 3.7.0 - GLib-GIO-WARNING **: 09:27:12.186: Error
|
||||
creating IO channel for /proc/self/mountinfo: Invalid argument (g-io-error-
|
||||
quark, 13) (Ondrej Holy)
|
||||
- GNOME/gobject-introspection#509 Gio Typelib error on method call:
|
||||
'gi.repository.Gio' object has no attribute 'content_type_get_icon'
|
||||
(Biswapriyo Nath)
|
||||
- #564 create introspection-friendly version of g_settings_bind_with_mapping
|
||||
(Philip Chimento)
|
||||
- #1767 Fix scan-build reports and gate CI pipeline success on scan-build
|
||||
success (Philip Withnall)
|
||||
- #2896 Links to docs for glib-compile-resources are broken (Emmanuele Bassi)
|
||||
- #3184 g_socket_client_connect_to_host_async leaks memory when target host
|
||||
doesn't respond to ARP (Philip Withnall)
|
||||
- #3254 Property deprecation warning can be issued in cases when deprecated
|
||||
property isn't used (Philip Withnall)
|
||||
- #3268 CVE-2024-34397: GDBus signal subscriptions for well-known names are
|
||||
vulnerable to unicast spoofing (Simon McVittie)
|
||||
- #3286 g_strrstr, g_strrstr_len, g_strstr_len return ownership note is
|
||||
incorrect (Philip Withnall)
|
||||
- #3287 Devhelp does not show indexes for GLib, GIO, or GObject (Philip
|
||||
Withnall)
|
||||
- #3289 readlink -f fails in CI on macOS (Simon McVittie)
|
||||
- #3290 Cleanup after G_TEST_OPTION_ISOLATE_DIRS follows symlinks (Will
|
||||
Thompson)
|
||||
- #3301 consider glib development binaries usable without external python
|
||||
modules
|
||||
- #3303 gi_repository_find_by_gtype is nondeterministic (Philip Withnall)
|
||||
- #3310 Race condition in `g_subprocess_communicate()` with
|
||||
`G_SUBPROCESS_FLAGS_STDIN_PIPE` (Philip Withnall)
|
||||
- #3313 GBookmarkFile documentation links to non-existant page (Philip
|
||||
Withnall)
|
||||
- #3314 unix test fails on macOS due to alternate signal stack changes
|
||||
- #3317 test failures during glib bootstrap
|
||||
- #3326 Switch TRUE and FALSE to C99 constants (Emmanuele Bassi)
|
||||
- #3333 Gio.Application: Takes only first parameter when activating an action
|
||||
via D-Bus Activation (Julian Sparber)
|
||||
- #3337 unix test fails under valgrind due to alternate stack changes (Marco
|
||||
Trevisan (Treviño))
|
||||
- #3342 Crash in gdbus schedule_callbacks() due to missing NULL check before
|
||||
g_str_equal() (Philip Withnall)
|
||||
- #3351 GVariant specification installed in wrong directory (Michael
|
||||
Catanzaro)
|
||||
- #3353 Fixing CVE-2024-34397 caused regressions for ibus (Simon McVittie)
|
||||
- #3354 Reconsider default values for certain build options
|
||||
- #3355 GIBaseInfo/GIBaseInfoStack bitfield definition doesn't match on
|
||||
16-bit-aligned-pointer systems
|
||||
- #3361 Documentation for i18n is limited, i18n macros not available
|
||||
(Emmanuele Bassi)
|
||||
- #3363 Factor out untranslatable parts of translatable error messages
|
||||
- #3366 Crash in error path of g_dbus_connection_export_menu_model() (Philip
|
||||
Withnall)
|
||||
- #3369 Remove links to dead developer-old.gnome.org (Philip Withnall)
|
||||
- #3372 G_LIKELY doesn’t appear in gi-docgen documentation (Emmanuele Bassi)
|
||||
- #3394 GLib unit tests fail on macOS runner due to localhost being out of
|
||||
addresses (Philip Withnall)
|
||||
- #3397 g_file_load_contents reads large (>4GiB) files past end of array due
|
||||
to gsize to guint truncation
|
||||
- #3401 Random failures to build glib 2.80.3 (Philip Withnall)
|
||||
- #3402 g_output_stream_write fails assertion if buffer is NULL and count is 0
|
||||
(Gary Li)
|
||||
- !3697 GLocalFile: support trashing long file name
|
||||
- !3939 Add g_file_copy_async_with_closures() and
|
||||
g_file_move_async_with_closures()
|
||||
- !3952 Add unref-to-strv to GStrvBuilder
|
||||
- !3954 [th/performance] add script for combining performance results
|
||||
- !3958 Use ppoll() when possible for more precise timeouts
|
||||
- !3959 [th/gobject-toggle-refs-check] Fix critical warning for toggle
|
||||
notifications in g_object_ref()/g_object_unref()
|
||||
- !3962 meson: Fix a needless recompilation of some gdbus tests
|
||||
- !3966 girparser: Don't assume sizeof(size_t) == sizeof(void *)
|
||||
- !3967 girparser: Allow time_t, off_t, etc. to appear in GIR XML
|
||||
- !3969 Ported the first few documentation comments in `gio/gaction.c` to gi-
|
||||
docgen
|
||||
- !3970 girparser: Make sizes in integer_aliases more obviously correct
|
||||
- !3972 girparser: Adjust signedness() macro
|
||||
- !3973 glib/gvariant: fix compile error with GCC 14.0.1
|
||||
- !3974 tests: Mark several additional tests as can_fail on GNU Hurd
|
||||
- !3975 build: Post-release version bump
|
||||
- !3977 tests: Remove unnecessary subprocess from dataset tests
|
||||
- !3978 gio: Fix docs links to description of I/O priority
|
||||
- !3979 Don't assume CPU_ISSET will return 0 or 1
|
||||
- !3983 gmain: Use alternate signal stack if the application provides one
|
||||
- !3984 Fix a typo
|
||||
- !3985 gio: Change ‘unrecognised’ to ‘unrecognized’ in various user-visible
|
||||
places
|
||||
- !3986 Port the remaining documentation comments in `gio/gaction.c` to GI-
|
||||
Docgen
|
||||
- !3987 glib/gthread-posix: Block futex_time64 usage on Android API level < 30
|
||||
- !3988 Introspection: Fix running g-ir-scanner 1.80.x+ on Windows
|
||||
- !3989 completion: make gsettings work in nounset mode
|
||||
- !3990 docs: spelling and grammar fixes
|
||||
- !3993 Convert __BIONIC__ usages that check for Android to __ANDROID__
|
||||
- !3994 glib/gthread-posix: Fix missing saved_errno variable in Android's
|
||||
g_futex_simple
|
||||
- !3996 docs: Fix g_object_connect()'s docblock
|
||||
- !4000 Revert "gmain: Use alternate signal stack if the application provides
|
||||
one"
|
||||
- !4002 Ports the documentation comments in gio/gactiongroup.c to GI-Docgen
|
||||
- !4003 Remove unused cmph files
|
||||
- !4005 Fix various bugs found by scan-build and refresh scan-build config in
|
||||
CI
|
||||
- !4008 docs: Update Code of Conduct URI
|
||||
- !4011 docs: Minor GVariant fixes
|
||||
- !4012 tests: Enable shellcheck for bash completion scripts
|
||||
- !4013 completion: Invoke the command being completed
|
||||
- !4014 Add a few more missing license and copyright headers to files
|
||||
- !4016 gunicode.h: fix warning with -Wcast-qual for define g_utf8_next_char()
|
||||
- !4017 docs(gio/overview): Restore missing heading
|
||||
- !4020 girepository/introspection: correctly install .gir files into custom
|
||||
locations
|
||||
- !4022 gfileinfo: Fixed broken link to gio/file-attributes.html
|
||||
- !4023 Fix various implicit conversions from size_t to smaller types
|
||||
- !4024 gdatetime: Fix string type used to initialise array
|
||||
- !4031 gdocumentportal: Handle EROFS and similar errors more gracefully
|
||||
- !4034 link with -latomic when needed
|
||||
- !4035 Add g_converter_convert_bytes
|
||||
- !4045 gapplication: Fix a small leak on an error handling path
|
||||
- !4051 gdbusconnection: Fix test signal subscription ordering
|
||||
- !4057 gdbusmessage: Clean the cached arg0 when setting the message body
|
||||
- !4058 Tests: Build fixes when running `meson test` without previous builds
|
||||
- !4059 tests: Fix various memory leaks and valgrind / ASAN errors
|
||||
- !4063 gdbusconnection: Fix a misleading comment
|
||||
- !4064 girepository/build: Actually use our compiler to generate GLib
|
||||
typelibs and fix parser leaks
|
||||
- !4066 Fix several GCC 14 warnings to please msys2-mingw32 CI
|
||||
- !4067 Remove unused struct
|
||||
- !4068 docs: Fix string-utils paragraph heading
|
||||
- !4069 gdbus: Make more use of symbolic constants for various aspects of the
|
||||
D-Bus protocol
|
||||
- !4075 ci: Update Fedora CI image to Fedora 39
|
||||
- !4078 tests: Fix clang compilation failure due to unrecognised option in
|
||||
pragma
|
||||
- !4081 gpattern: Port the docs to gi-docgen syntax
|
||||
- !4082 docs: Update toolchain requirement to C11
|
||||
- !4083 gobject: fix broken links to parameters and signals naming rules
|
||||
- !4084 docs: Improve g_strescape & g_strcompress descriptions
|
||||
- !4087 ci: Disable systemtap on musl CI build
|
||||
- !4088 girepository: add support for relocations
|
||||
- !4089 Revert "Alias TRUE and FALSE to C99's true and false"
|
||||
- !4091 build: Use C89 for the standard version check
|
||||
- !4092 docs: Improve conversion-macros formatting and add
|
||||
GTYPE_TO_POINTER/GPOINTER_TO_TYPE
|
||||
- !4093 gmem.c: Update g_clear_pointer() documentation
|
||||
- !4094 tests: Fix compilation failure on macOS due to missing include
|
||||
- !4095 Improve handling of standard types' signedness
|
||||
- !4097 docs: Fix docs reference to main-loop
|
||||
- !4098 Dump pointer types in the introspection blob
|
||||
- !4099 gfile: Fix finish-func annotations
|
||||
- !4100 docs: Mention XDG_DATA_HOME in glib-compile-schemas manual
|
||||
- !4101 gio/g-i: Mark Application:action-group property as deprecated
|
||||
- !4102 tests: Add basic tests for gdump.c in libgirepository
|
||||
- !4108 build: Rename meson_options.txt to meson.options
|
||||
- !4114 glocalfileinfo: A few fixes on win32
|
||||
- !4115 tests: Use g_assert_*() rather than g_assert() in notification tests
|
||||
- !4117 tests: Improve 4GB file loading test to work on i386
|
||||
- !4120 gtestutils: Free test_data when freeing a test case
|
||||
- !4121 gmacros: Avoid casting functions
|
||||
|
||||
* Translation updates:
|
||||
- Catalan (Jordi Mas i Hernandez)
|
||||
- Czech (Daniel Rusek)
|
||||
- Danish (Ask Hjorth Larsen)
|
||||
- French (Vincent Chatelain)
|
||||
- Galician (Fran Dieguez)
|
||||
- Georgian (Ekaterine Papava)
|
||||
- German (Christian Kirbach)
|
||||
- Hungarian (Balázs Úr)
|
||||
- Indonesian (Andika Triwidada)
|
||||
- Italian (Milo Casagrande)
|
||||
- Kabyle (Rachida SACI, Athmane MOKRAOUI)
|
||||
- Korean (Changwoo Ryu)
|
||||
- Latvian (Rūdolfs Mazurs)
|
||||
- Persian (Danial Behzadi)
|
||||
- Polish (Piotr Drąg)
|
||||
- Portuguese (Hugo Carvalho)
|
||||
- Portuguese (Brazil) (Juliano de Souza Camargo, Leônidas Araújo)
|
||||
- Slovenian (Martin)
|
||||
- Turkish (Sabri Ünal)
|
||||
- Ukrainian (Yuri Chornoivan)
|
||||
|
||||
|
||||
Overview of changes in GLib 2.80.0, 2024-03-07
|
||||
==============================================
|
||||
|
||||
|
@ -41,6 +41,9 @@ name = "basic"
|
||||
show_index_summary = true
|
||||
show_class_hierarchy = true
|
||||
|
||||
[source-location]
|
||||
base_url = "https://gitlab.gnome.org/GNOME/glib/-/blob/main/"
|
||||
|
||||
[extra]
|
||||
urlmap_file = "../urlmap.js"
|
||||
# The same order will be used when generating the index
|
||||
|
@ -41,6 +41,9 @@ name = "basic"
|
||||
show_index_summary = true
|
||||
show_class_hierarchy = true
|
||||
|
||||
[source-location]
|
||||
base_url = "https://gitlab.gnome.org/GNOME/glib/-/blob/main/"
|
||||
|
||||
[extra]
|
||||
urlmap_file = "../urlmap.js"
|
||||
# The same order will be used when generating the index
|
||||
|
@ -36,6 +36,9 @@ name = "basic"
|
||||
show_index_summary = true
|
||||
show_class_hierarchy = true
|
||||
|
||||
[source-location]
|
||||
base_url = "https://gitlab.gnome.org/GNOME/glib/-/blob/main/"
|
||||
|
||||
[extra]
|
||||
urlmap_file = "../urlmap.js"
|
||||
# The same order will be used when generating the index
|
||||
@ -67,5 +70,6 @@ content_files = [
|
||||
content_images = [
|
||||
"gvfs-overview.png",
|
||||
"menu-example.png",
|
||||
"menu-model.png",
|
||||
"menu-model-dark.svg",
|
||||
"menu-model-light.svg",
|
||||
]
|
||||
|
453
docs/reference/gio/menu-model-dark.svg
Normal file
@ -0,0 +1,453 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!--
|
||||
SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
SPDX-FileCopyrightText: 2011 Red Hat, Inc.
|
||||
SPDX-FileCopyrightText: 2024 Frank Dana
|
||||
-->
|
||||
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
width="724"
|
||||
height="174"
|
||||
viewBox="0 0 724 174"
|
||||
sodipodi:docname="menu-model-dark.svg"
|
||||
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs1">
|
||||
<marker
|
||||
style="overflow:visible"
|
||||
id="marker9"
|
||||
refX="0"
|
||||
refY="0"
|
||||
orient="auto"
|
||||
inkscape:stockid="Dot"
|
||||
markerWidth="1"
|
||||
markerHeight="1"
|
||||
viewBox="0 0 1 1"
|
||||
inkscape:isstock="true"
|
||||
inkscape:collect="always"
|
||||
preserveAspectRatio="xMidYMid">
|
||||
<path
|
||||
transform="scale(0.5)"
|
||||
style="fill:context-stroke;fill-rule:evenodd;stroke:none"
|
||||
d="M 5,0 C 5,2.76 2.76,5 0,5 -2.76,5 -5,2.76 -5,0 c 0,-2.76 2.3,-5 5,-5 2.76,0 5,2.24 5,5 z"
|
||||
sodipodi:nodetypes="sssss"
|
||||
id="path9" />
|
||||
</marker>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="true"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="2.9"
|
||||
inkscape:cx="255.51724"
|
||||
inkscape:cy="123.10345"
|
||||
inkscape:window-width="1364"
|
||||
inkscape:window-height="934"
|
||||
inkscape:window-x="26"
|
||||
inkscape:window-y="23"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="layer1"
|
||||
showguides="true">
|
||||
<sodipodi:guide
|
||||
position="4.1775457,133.79112"
|
||||
orientation="1,0"
|
||||
id="guide16"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="126.10966,126.74151"
|
||||
orientation="1,0"
|
||||
id="guide17"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="65,130"
|
||||
orientation="1,0"
|
||||
id="guide18"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="659,33.999995"
|
||||
orientation="1,0"
|
||||
id="guide19"
|
||||
inkscape:locked="false" />
|
||||
</sodipodi:namedview>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
inkscape:label="Vector"
|
||||
style="display:inline">
|
||||
<rect
|
||||
style="opacity:1;fill:#808080;fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect1"
|
||||
width="128"
|
||||
height="86"
|
||||
x="1"
|
||||
y="1" />
|
||||
<rect
|
||||
style="opacity:1;fill:#808080;fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect2"
|
||||
width="127.84461"
|
||||
height="63.357819"
|
||||
x="149.36996"
|
||||
y="39.197231" />
|
||||
<rect
|
||||
style="opacity:1;fill:#808080;fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect3"
|
||||
width="127.12172"
|
||||
height="44"
|
||||
x="298.27048"
|
||||
y="1" />
|
||||
<rect
|
||||
style="opacity:1;fill:#808080;fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect4"
|
||||
width="129.12172"
|
||||
height="24.054026"
|
||||
x="297.27048"
|
||||
y="58.93121" />
|
||||
<rect
|
||||
style="opacity:1;fill:#808080;fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect5"
|
||||
width="131.12172"
|
||||
height="23.299458"
|
||||
x="296.27048"
|
||||
y="98.764931" />
|
||||
<rect
|
||||
style="opacity:1;fill:#808080;fill-opacity:1;stroke:#ffffff;stroke-width:2;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect6"
|
||||
width="126.48524"
|
||||
height="45.761452"
|
||||
x="448.23373"
|
||||
y="97.764931" />
|
||||
<rect
|
||||
style="opacity:1;fill:#808080;fill-opacity:1;stroke:#ffffff;stroke-width:1.5;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect7"
|
||||
width="126.00208"
|
||||
height="44.002083"
|
||||
x="595.99896"
|
||||
y="69.998962" />
|
||||
<rect
|
||||
style="opacity:1;fill:#808080;fill-opacity:1;stroke:#ffffff;stroke-width:1.96917;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect8"
|
||||
width="126.03082"
|
||||
height="44.030827"
|
||||
x="595.98456"
|
||||
y="127.98459" />
|
||||
<rect
|
||||
style="opacity:1;fill:#800000;fill-opacity:1;stroke:#000000;stroke-width:0.984898;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect17"
|
||||
width="122.32765"
|
||||
height="18.015102"
|
||||
x="3.7895689"
|
||||
y="4.1460066" />
|
||||
<rect
|
||||
style="display:inline;fill:#800000;fill-opacity:1;stroke:#000000;stroke-width:0.984898;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect17-3"
|
||||
width="122.32765"
|
||||
height="18.015102"
|
||||
x="3.7895689"
|
||||
y="66.008728" />
|
||||
<rect
|
||||
style="display:inline;fill:#800000;fill-opacity:1;stroke:#000000;stroke-width:0.984898;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect17-1"
|
||||
width="122.32765"
|
||||
height="18.015102"
|
||||
x="3.7895689"
|
||||
y="45.628914" />
|
||||
<rect
|
||||
style="display:inline;fill:#800000;fill-opacity:1;stroke:#000000;stroke-width:0.984898;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect17-36"
|
||||
width="122.32765"
|
||||
height="18.015102"
|
||||
x="3.7895689"
|
||||
y="24.918364" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-weight:500;font-size:14px;line-height:125%;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';font-variant-ligatures:none;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="64.5159"
|
||||
y="18.211914"
|
||||
id="text17"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan17"
|
||||
x="64.5159"
|
||||
y="18.211914"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';fill:#ffffff;fill-opacity:1;stroke:none">File</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-weight:500;font-size:14px;line-height:125%;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';font-variant-ligatures:none;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="65.2659"
|
||||
y="79.711914"
|
||||
id="text17-4"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan17-9"
|
||||
x="65.2659"
|
||||
y="79.711914"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';fill:#ffffff;fill-opacity:1;stroke:none">Help</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-weight:500;font-size:14px;line-height:125%;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';font-variant-ligatures:none;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="64.730743"
|
||||
y="59.636719"
|
||||
id="text17-9"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan17-94"
|
||||
x="64.730743"
|
||||
y="59.636719"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';fill:#ffffff;fill-opacity:1;stroke:none">View</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-weight:500;font-size:14px;line-height:125%;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';font-variant-ligatures:none;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="64.79715"
|
||||
y="39.136719"
|
||||
id="text17-7"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan17-0"
|
||||
x="64.79715"
|
||||
y="39.136719"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';fill:#ffffff;fill-opacity:1;stroke:none">Edit</tspan></text>
|
||||
<rect
|
||||
style="opacity:1;fill:#800000;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect18"
|
||||
width="126"
|
||||
height="17"
|
||||
x="298.5"
|
||||
y="102" />
|
||||
<rect
|
||||
style="display:inline;fill:#008000;fill-opacity:1;stroke:#000000;stroke-width:0.98451;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect18-0"
|
||||
width="122.01549"
|
||||
height="17.01549"
|
||||
x="152.49225"
|
||||
y="42.673256" />
|
||||
<rect
|
||||
style="display:inline;fill:#000080;fill-opacity:1;stroke:#000000;stroke-width:1.01214;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect18-0-0"
|
||||
width="121.98786"
|
||||
height="17.987865"
|
||||
x="300.83743"
|
||||
y="4.0060701" />
|
||||
<rect
|
||||
style="display:inline;fill:#000080;fill-opacity:1;stroke:#000000;stroke-width:1.01214;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect18-0-0-1"
|
||||
width="121.98786"
|
||||
height="17.987865"
|
||||
x="300.8374"
|
||||
y="24.406069" />
|
||||
<rect
|
||||
style="display:inline;fill:#000080;fill-opacity:1;stroke:#000000;stroke-width:0.98451;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect18-0-0-6"
|
||||
width="122.01549"
|
||||
height="17.01549"
|
||||
x="300.82358"
|
||||
y="62.450478" />
|
||||
<rect
|
||||
style="display:inline;fill:#000080;fill-opacity:1;stroke:#000000;stroke-width:0.980597;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect18-0-0-2"
|
||||
width="121.0194"
|
||||
height="17.019403"
|
||||
x="598.49023"
|
||||
y="151.49031" />
|
||||
<rect
|
||||
style="display:inline;fill:#000080;fill-opacity:1;stroke:#000000;stroke-width:0.980598;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect18-0-0-7"
|
||||
width="121.0194"
|
||||
height="17.019402"
|
||||
x="598.4903"
|
||||
y="72.982552" />
|
||||
<rect
|
||||
style="display:inline;fill:#000080;fill-opacity:1;stroke:#000000;stroke-width:0.980598;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect18-0-0-46"
|
||||
width="121.0194"
|
||||
height="17.019402"
|
||||
x="598.4903"
|
||||
y="93.490295" />
|
||||
<rect
|
||||
style="display:inline;fill:#000080;fill-opacity:1;stroke:#000000;stroke-width:0.980598;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect18-0-0-4"
|
||||
width="121.01934"
|
||||
height="17.019402"
|
||||
x="598.49036"
|
||||
y="131.4903" />
|
||||
<rect
|
||||
style="display:inline;fill:#008000;fill-opacity:1;stroke:#000000;stroke-width:0.98451;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect18-0-1"
|
||||
width="122.01549"
|
||||
height="17.01549"
|
||||
x="152.28452"
|
||||
y="82.063545" />
|
||||
<rect
|
||||
style="display:inline;fill:#008000;fill-opacity:1;stroke:#000000;stroke-width:1.00811;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect18-0-7"
|
||||
width="120.99189"
|
||||
height="17.991892"
|
||||
x="451.00406"
|
||||
y="101.00406" />
|
||||
<rect
|
||||
style="display:inline;fill:#008000;fill-opacity:1;stroke:#000000;stroke-width:1.00811;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect18-0-4"
|
||||
width="120.99189"
|
||||
height="17.991892"
|
||||
x="451.00406"
|
||||
y="122.40406" />
|
||||
<rect
|
||||
style="display:inline;fill:#008000;fill-opacity:1;stroke:#000000;stroke-width:0.98451;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect18-0-11"
|
||||
width="122.01549"
|
||||
height="17.01549"
|
||||
x="152.28452"
|
||||
y="62.368401" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-weight:500;font-size:14px;line-height:125%;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';font-variant-ligatures:none;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="361.80469"
|
||||
y="114.5479"
|
||||
id="text17-7-5"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan17-0-3"
|
||||
x="361.80469"
|
||||
y="114.5479"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';fill:#ffffff;fill-opacity:1;stroke:none">Highlight Mode</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-weight:500;font-size:14px;line-height:125%;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';font-variant-ligatures:none;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="659.3999"
|
||||
y="87.249084"
|
||||
id="text17-7-5-0"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan17-0-3-9"
|
||||
x="659.3999"
|
||||
y="87.249084"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';fill:#ffffff;fill-opacity:1;stroke:none">Vala</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-weight:500;font-size:14px;line-height:125%;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';font-variant-ligatures:none;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="658.94873"
|
||||
y="106.63672"
|
||||
id="text17-7-5-43"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan17-0-3-7"
|
||||
x="658.94873"
|
||||
y="106.63672"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';fill:#ffffff;fill-opacity:1;stroke:none">Python</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-weight:500;font-size:14px;line-height:125%;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';font-variant-ligatures:none;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="659.1333"
|
||||
y="145.21924"
|
||||
id="text17-7-5-9"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan17-0-3-79"
|
||||
x="659.1333"
|
||||
y="145.21924"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';fill:#ffffff;fill-opacity:1;stroke:none">asciidoc</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-weight:500;font-size:14px;line-height:125%;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';font-variant-ligatures:none;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="658.85303"
|
||||
y="165.60303"
|
||||
id="text17-7-5-371"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan17-0-3-22"
|
||||
x="658.85303"
|
||||
y="165.60303"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';fill:#ffffff;fill-opacity:1;stroke:none">HTML</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-weight:500;font-size:14px;line-height:125%;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';font-variant-ligatures:none;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="361.77667"
|
||||
y="18.711914"
|
||||
id="text17-7-5-7"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan17-0-3-5"
|
||||
x="361.77667"
|
||||
y="18.711914"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';fill:#ffffff;fill-opacity:1;stroke:none">Toolbar</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-weight:500;font-size:14px;line-height:125%;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';font-variant-ligatures:none;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="361.77667"
|
||||
y="75.711914"
|
||||
id="text17-7-5-37"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan17-0-3-8"
|
||||
x="361.77667"
|
||||
y="75.711914"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';fill:#ffffff;fill-opacity:1;stroke:none">Fullscreen</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-weight:500;font-size:14px;line-height:125%;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';font-variant-ligatures:none;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="361.77664"
|
||||
y="38.636719"
|
||||
id="text17-7-5-3"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan17-0-3-3"
|
||||
x="361.77664"
|
||||
y="38.636719"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';fill:#ffffff;fill-opacity:1;stroke:none">Statusbar</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-weight:500;font-size:14px;line-height:125%;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';font-variant-ligatures:none;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="511.44531"
|
||||
y="135.8922"
|
||||
id="text17-7-5-8"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan17-0-3-2"
|
||||
x="511.44531"
|
||||
y="135.8922"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';fill:#ffffff;fill-opacity:1;stroke:none">Markup</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-weight:500;font-size:14px;line-height:125%;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';font-variant-ligatures:none;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="511.44531"
|
||||
y="113.85206"
|
||||
id="text17-7-5-4"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan17-0-3-6"
|
||||
x="511.44531"
|
||||
y="113.85206"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';fill:#ffffff;fill-opacity:1;stroke:none">Sources</tspan></text>
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer3"
|
||||
inkscape:label="Connectors">
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker9)"
|
||||
d="M 275.51806,53.862154 296.79998,33.696882"
|
||||
id="path10" />
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker9)"
|
||||
d="m 274.62615,70.881199 22.50718,0.07702"
|
||||
id="path12" />
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker9)"
|
||||
d="m 275.22705,90.477028 20.60422,19.360792"
|
||||
id="path13" />
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker9)"
|
||||
d="m 425,110.41466 h 22.97751"
|
||||
id="path14" />
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker9)"
|
||||
d="m 572.53738,108.95218 23.24489,-5.83147"
|
||||
id="path15" />
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker9)"
|
||||
d="m 572.75284,129.26136 22.74964,11.68278"
|
||||
id="path16" />
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker9)"
|
||||
d="m 126.60967,51.412573 h 22.34904"
|
||||
id="path8" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 21 KiB |
453
docs/reference/gio/menu-model-light.svg
Normal file
@ -0,0 +1,453 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!--
|
||||
SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
SPDX-FileCopyrightText: 2011 Red Hat, Inc.
|
||||
SPDX-FileCopyrightText: 2024 Frank Dana
|
||||
-->
|
||||
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
width="724"
|
||||
height="174"
|
||||
viewBox="0 0 724 174"
|
||||
sodipodi:docname="menu-model-light.svg"
|
||||
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25)"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg">
|
||||
<defs
|
||||
id="defs1">
|
||||
<marker
|
||||
style="overflow:visible"
|
||||
id="marker9"
|
||||
refX="0"
|
||||
refY="0"
|
||||
orient="auto"
|
||||
inkscape:stockid="Dot"
|
||||
markerWidth="1"
|
||||
markerHeight="1"
|
||||
viewBox="0 0 1 1"
|
||||
inkscape:isstock="true"
|
||||
inkscape:collect="always"
|
||||
preserveAspectRatio="xMidYMid">
|
||||
<path
|
||||
transform="scale(0.5)"
|
||||
style="fill:context-stroke;fill-rule:evenodd;stroke:none"
|
||||
d="M 5,0 C 5,2.76 2.76,5 0,5 -2.76,5 -5,2.76 -5,0 c 0,-2.76 2.3,-5 5,-5 2.76,0 5,2.24 5,5 z"
|
||||
sodipodi:nodetypes="sssss"
|
||||
id="path9" />
|
||||
</marker>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="true"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
inkscape:zoom="2.9"
|
||||
inkscape:cx="255.51724"
|
||||
inkscape:cy="123.10345"
|
||||
inkscape:window-width="1364"
|
||||
inkscape:window-height="934"
|
||||
inkscape:window-x="26"
|
||||
inkscape:window-y="23"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="layer1"
|
||||
showguides="true">
|
||||
<sodipodi:guide
|
||||
position="4.1775457,133.79112"
|
||||
orientation="1,0"
|
||||
id="guide16"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="126.10966,126.74151"
|
||||
orientation="1,0"
|
||||
id="guide17"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="65,130"
|
||||
orientation="1,0"
|
||||
id="guide18"
|
||||
inkscape:locked="false" />
|
||||
<sodipodi:guide
|
||||
position="659,33.999995"
|
||||
orientation="1,0"
|
||||
id="guide19"
|
||||
inkscape:locked="false" />
|
||||
</sodipodi:namedview>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
inkscape:label="Vector"
|
||||
style="display:inline">
|
||||
<rect
|
||||
style="opacity:1;fill:#808080;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect1"
|
||||
width="128"
|
||||
height="86"
|
||||
x="1"
|
||||
y="1" />
|
||||
<rect
|
||||
style="opacity:1;fill:#808080;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect2"
|
||||
width="127.84461"
|
||||
height="63.357819"
|
||||
x="149.36996"
|
||||
y="39.197231" />
|
||||
<rect
|
||||
style="opacity:1;fill:#808080;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect3"
|
||||
width="127.12172"
|
||||
height="44"
|
||||
x="298.27048"
|
||||
y="1" />
|
||||
<rect
|
||||
style="opacity:1;fill:#808080;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect4"
|
||||
width="129.12172"
|
||||
height="24.054026"
|
||||
x="297.27048"
|
||||
y="58.93121" />
|
||||
<rect
|
||||
style="opacity:1;fill:#808080;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect5"
|
||||
width="131.12172"
|
||||
height="23.299458"
|
||||
x="296.27048"
|
||||
y="98.764931" />
|
||||
<rect
|
||||
style="opacity:1;fill:#808080;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect6"
|
||||
width="126.48524"
|
||||
height="45.761452"
|
||||
x="448.23373"
|
||||
y="97.764931" />
|
||||
<rect
|
||||
style="opacity:1;fill:#808080;fill-opacity:1;stroke:#000000;stroke-width:1.5;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect7"
|
||||
width="126.00208"
|
||||
height="44.002083"
|
||||
x="595.99896"
|
||||
y="69.998962" />
|
||||
<rect
|
||||
style="opacity:1;fill:#808080;fill-opacity:1;stroke:#000000;stroke-width:1.96917;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect8"
|
||||
width="126.03082"
|
||||
height="44.030827"
|
||||
x="595.98456"
|
||||
y="127.98459" />
|
||||
<rect
|
||||
style="opacity:1;fill:#800000;fill-opacity:1;stroke:#000000;stroke-width:0.984898;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect17"
|
||||
width="122.32765"
|
||||
height="18.015102"
|
||||
x="3.7895689"
|
||||
y="4.1460066" />
|
||||
<rect
|
||||
style="display:inline;fill:#800000;fill-opacity:1;stroke:#000000;stroke-width:0.984898;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect17-3"
|
||||
width="122.32765"
|
||||
height="18.015102"
|
||||
x="3.7895689"
|
||||
y="66.008728" />
|
||||
<rect
|
||||
style="display:inline;fill:#800000;fill-opacity:1;stroke:#000000;stroke-width:0.984898;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect17-1"
|
||||
width="122.32765"
|
||||
height="18.015102"
|
||||
x="3.7895689"
|
||||
y="45.628914" />
|
||||
<rect
|
||||
style="display:inline;fill:#800000;fill-opacity:1;stroke:#000000;stroke-width:0.984898;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect17-36"
|
||||
width="122.32765"
|
||||
height="18.015102"
|
||||
x="3.7895689"
|
||||
y="24.918364" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-weight:500;font-size:14px;line-height:125%;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';font-variant-ligatures:none;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="64.5159"
|
||||
y="18.211914"
|
||||
id="text17"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan17"
|
||||
x="64.5159"
|
||||
y="18.211914"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';fill:#ffffff;fill-opacity:1;stroke:none">File</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-weight:500;font-size:14px;line-height:125%;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';font-variant-ligatures:none;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="65.2659"
|
||||
y="79.711914"
|
||||
id="text17-4"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan17-9"
|
||||
x="65.2659"
|
||||
y="79.711914"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';fill:#ffffff;fill-opacity:1;stroke:none">Help</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-weight:500;font-size:14px;line-height:125%;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';font-variant-ligatures:none;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="64.730743"
|
||||
y="59.636719"
|
||||
id="text17-9"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan17-94"
|
||||
x="64.730743"
|
||||
y="59.636719"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';fill:#ffffff;fill-opacity:1;stroke:none">View</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-weight:500;font-size:14px;line-height:125%;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';font-variant-ligatures:none;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="64.79715"
|
||||
y="39.136719"
|
||||
id="text17-7"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan17-0"
|
||||
x="64.79715"
|
||||
y="39.136719"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';fill:#ffffff;fill-opacity:1;stroke:none">Edit</tspan></text>
|
||||
<rect
|
||||
style="opacity:1;fill:#800000;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect18"
|
||||
width="126"
|
||||
height="17"
|
||||
x="298.5"
|
||||
y="102" />
|
||||
<rect
|
||||
style="display:inline;fill:#008000;fill-opacity:1;stroke:#000000;stroke-width:0.98451;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect18-0"
|
||||
width="122.01549"
|
||||
height="17.01549"
|
||||
x="152.49225"
|
||||
y="42.673256" />
|
||||
<rect
|
||||
style="display:inline;fill:#000080;fill-opacity:1;stroke:#000000;stroke-width:1.01214;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect18-0-0"
|
||||
width="121.98786"
|
||||
height="17.987865"
|
||||
x="300.83743"
|
||||
y="4.0060701" />
|
||||
<rect
|
||||
style="display:inline;fill:#000080;fill-opacity:1;stroke:#000000;stroke-width:1.01214;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect18-0-0-1"
|
||||
width="121.98786"
|
||||
height="17.987865"
|
||||
x="300.8374"
|
||||
y="24.406069" />
|
||||
<rect
|
||||
style="display:inline;fill:#000080;fill-opacity:1;stroke:#000000;stroke-width:0.98451;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect18-0-0-6"
|
||||
width="122.01549"
|
||||
height="17.01549"
|
||||
x="300.82358"
|
||||
y="62.450478" />
|
||||
<rect
|
||||
style="display:inline;fill:#000080;fill-opacity:1;stroke:#000000;stroke-width:0.980597;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect18-0-0-2"
|
||||
width="121.0194"
|
||||
height="17.019403"
|
||||
x="598.49023"
|
||||
y="151.49031" />
|
||||
<rect
|
||||
style="display:inline;fill:#000080;fill-opacity:1;stroke:#000000;stroke-width:0.980598;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect18-0-0-7"
|
||||
width="121.0194"
|
||||
height="17.019402"
|
||||
x="598.4903"
|
||||
y="72.982552" />
|
||||
<rect
|
||||
style="display:inline;fill:#000080;fill-opacity:1;stroke:#000000;stroke-width:0.980598;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect18-0-0-46"
|
||||
width="121.0194"
|
||||
height="17.019402"
|
||||
x="598.4903"
|
||||
y="93.490295" />
|
||||
<rect
|
||||
style="display:inline;fill:#000080;fill-opacity:1;stroke:#000000;stroke-width:0.980598;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect18-0-0-4"
|
||||
width="121.01934"
|
||||
height="17.019402"
|
||||
x="598.49036"
|
||||
y="131.4903" />
|
||||
<rect
|
||||
style="display:inline;fill:#008000;fill-opacity:1;stroke:#000000;stroke-width:0.98451;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect18-0-1"
|
||||
width="122.01549"
|
||||
height="17.01549"
|
||||
x="152.28452"
|
||||
y="82.063545" />
|
||||
<rect
|
||||
style="display:inline;fill:#008000;fill-opacity:1;stroke:#000000;stroke-width:1.00811;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect18-0-7"
|
||||
width="120.99189"
|
||||
height="17.991892"
|
||||
x="451.00406"
|
||||
y="101.00406" />
|
||||
<rect
|
||||
style="display:inline;fill:#008000;fill-opacity:1;stroke:#000000;stroke-width:1.00811;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect18-0-4"
|
||||
width="120.99189"
|
||||
height="17.991892"
|
||||
x="451.00406"
|
||||
y="122.40406" />
|
||||
<rect
|
||||
style="display:inline;fill:#008000;fill-opacity:1;stroke:#000000;stroke-width:0.98451;stroke-linejoin:bevel;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect18-0-11"
|
||||
width="122.01549"
|
||||
height="17.01549"
|
||||
x="152.28452"
|
||||
y="62.368401" />
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-weight:500;font-size:14px;line-height:125%;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';font-variant-ligatures:none;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="361.80469"
|
||||
y="114.5479"
|
||||
id="text17-7-5"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan17-0-3"
|
||||
x="361.80469"
|
||||
y="114.5479"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';fill:#ffffff;fill-opacity:1;stroke:none">Highlight Mode</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-weight:500;font-size:14px;line-height:125%;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';font-variant-ligatures:none;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="659.3999"
|
||||
y="87.249084"
|
||||
id="text17-7-5-0"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan17-0-3-9"
|
||||
x="659.3999"
|
||||
y="87.249084"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';fill:#ffffff;fill-opacity:1;stroke:none">Vala</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-weight:500;font-size:14px;line-height:125%;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';font-variant-ligatures:none;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="658.94873"
|
||||
y="106.63672"
|
||||
id="text17-7-5-43"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan17-0-3-7"
|
||||
x="658.94873"
|
||||
y="106.63672"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';fill:#ffffff;fill-opacity:1;stroke:none">Python</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-weight:500;font-size:14px;line-height:125%;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';font-variant-ligatures:none;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="659.1333"
|
||||
y="145.21924"
|
||||
id="text17-7-5-9"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan17-0-3-79"
|
||||
x="659.1333"
|
||||
y="145.21924"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';fill:#ffffff;fill-opacity:1;stroke:none">asciidoc</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-weight:500;font-size:14px;line-height:125%;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';font-variant-ligatures:none;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="658.85303"
|
||||
y="165.60303"
|
||||
id="text17-7-5-371"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan17-0-3-22"
|
||||
x="658.85303"
|
||||
y="165.60303"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';fill:#ffffff;fill-opacity:1;stroke:none">HTML</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-weight:500;font-size:14px;line-height:125%;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';font-variant-ligatures:none;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="361.77667"
|
||||
y="18.711914"
|
||||
id="text17-7-5-7"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan17-0-3-5"
|
||||
x="361.77667"
|
||||
y="18.711914"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';fill:#ffffff;fill-opacity:1;stroke:none">Toolbar</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-weight:500;font-size:14px;line-height:125%;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';font-variant-ligatures:none;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="361.77667"
|
||||
y="75.711914"
|
||||
id="text17-7-5-37"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan17-0-3-8"
|
||||
x="361.77667"
|
||||
y="75.711914"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';fill:#ffffff;fill-opacity:1;stroke:none">Fullscreen</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-weight:500;font-size:14px;line-height:125%;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';font-variant-ligatures:none;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="361.77664"
|
||||
y="38.636719"
|
||||
id="text17-7-5-3"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan17-0-3-3"
|
||||
x="361.77664"
|
||||
y="38.636719"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';fill:#ffffff;fill-opacity:1;stroke:none">Statusbar</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-weight:500;font-size:14px;line-height:125%;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';font-variant-ligatures:none;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="511.44531"
|
||||
y="135.8922"
|
||||
id="text17-7-5-8"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan17-0-3-2"
|
||||
x="511.44531"
|
||||
y="135.8922"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';fill:#ffffff;fill-opacity:1;stroke:none">Markup</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-weight:500;font-size:14px;line-height:125%;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';font-variant-ligatures:none;text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;display:inline;fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||
x="511.44531"
|
||||
y="113.85206"
|
||||
id="text17-7-5-4"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan17-0-3-6"
|
||||
x="511.44531"
|
||||
y="113.85206"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:14px;font-family:'DejaVu Sans Mono';-inkscape-font-specification:'DejaVu Sans Mono';fill:#ffffff;fill-opacity:1;stroke:none">Sources</tspan></text>
|
||||
</g>
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
id="layer3"
|
||||
inkscape:label="Connectors">
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker9)"
|
||||
d="M 275.51806,53.862154 296.79998,33.696882"
|
||||
id="path10" />
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker9)"
|
||||
d="m 274.62615,70.881199 22.50718,0.07702"
|
||||
id="path12" />
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker9)"
|
||||
d="m 275.22705,90.477028 20.60422,19.360792"
|
||||
id="path13" />
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker9)"
|
||||
d="m 425,110.41466 h 22.97751"
|
||||
id="path14" />
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker9)"
|
||||
d="m 572.53738,108.95218 23.24489,-5.83147"
|
||||
id="path15" />
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker9)"
|
||||
d="m 572.75284,129.26136 22.74964,11.68278"
|
||||
id="path16" />
|
||||
<path
|
||||
style="display:inline;opacity:1;fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-end:url(#marker9)"
|
||||
d="m 126.60967,51.412573 h 22.34904"
|
||||
id="path8" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 20 KiB |
@ -41,6 +41,9 @@ name = "basic"
|
||||
show_index_summary = true
|
||||
show_class_hierarchy = true
|
||||
|
||||
[source-location]
|
||||
base_url = "https://gitlab.gnome.org/GNOME/glib/-/blob/main/"
|
||||
|
||||
[extra]
|
||||
urlmap_file = "../urlmap.js"
|
||||
# The same order will be used when generating the index
|
||||
|
@ -0,0 +1,138 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-License-Identifier: CC0-1.0
|
||||
SPDX-FileCopyrightText: Rory O'Kane at Wikimedia Commons
|
||||
<https://commons.wikimedia.org/wiki/File:Sorted_binary_tree_breadth-first_traversal.svg>
|
||||
SPDX-FileCopyrightText: 2024 Frank Dana
|
||||
-->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="266px" height="212px" viewBox="0 0 266 212" enable-background="new 0 0 266 212" xml:space="preserve">
|
||||
<g>
|
||||
<g>
|
||||
<line fill="none" stroke="#90c2ff" stroke-width="2" stroke-miterlimit="10" x1="27.23" y1="23.192" x2="29.23" y2="23.192"/>
|
||||
|
||||
<line fill="none" stroke="#90c2ff" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="3.9562,3.9562" x1="33.187" y1="23.192" x2="236.932" y2="23.192"/>
|
||||
<polyline fill="none" stroke="#90c2ff" stroke-width="2" stroke-miterlimit="10" points="238.91,23.192 240.91,23.192
|
||||
238.97,23.677 "/>
|
||||
|
||||
<line fill="none" stroke="#90c2ff" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="3.9907,3.9907" x1="235.099" y1="24.646" x2="27.971" y2="76.427"/>
|
||||
<polyline fill="none" stroke="#90c2ff" stroke-width="2" stroke-miterlimit="10" points="26.035,76.912 24.095,77.396
|
||||
26.095,77.396 "/>
|
||||
|
||||
<line fill="none" stroke="#90c2ff" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="4.0154,4.0154" x1="30.11" y1="77.396" x2="236.902" y2="77.396"/>
|
||||
<polyline fill="none" stroke="#90c2ff" stroke-width="2" stroke-miterlimit="10" points="238.91,77.396 240.91,77.396
|
||||
238.97,77.881 "/>
|
||||
|
||||
<line fill="none" stroke="#90c2ff" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="3.9907,3.9907" x1="235.099" y1="78.85" x2="27.971" y2="130.631"/>
|
||||
<polyline fill="none" stroke="#90c2ff" stroke-width="2" stroke-miterlimit="10" points="26.035,131.114 24.095,131.6
|
||||
26.095,131.6 "/>
|
||||
|
||||
<line fill="none" stroke="#90c2ff" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="4.0154,4.0154" x1="30.11" y1="131.6" x2="236.902" y2="131.6"/>
|
||||
<polyline fill="none" stroke="#90c2ff" stroke-width="2" stroke-miterlimit="10" points="238.91,131.6 240.91,131.6
|
||||
238.97,132.085 "/>
|
||||
|
||||
<line fill="none" stroke="#90c2ff" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="3.9907,3.9907" x1="235.099" y1="133.053" x2="27.971" y2="184.835"/>
|
||||
<polyline fill="none" stroke="#90c2ff" stroke-width="2" stroke-miterlimit="10" points="26.035,185.318 24.095,185.804
|
||||
26.095,185.804 "/>
|
||||
|
||||
<line fill="none" stroke="#90c2ff" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="4.0086,4.0086" x1="30.104" y1="185.804" x2="228.53" y2="185.804"/>
|
||||
|
||||
<line fill="none" stroke="#90c2ff" stroke-width="2" stroke-miterlimit="10" x1="230.534" y1="185.804" x2="232.534" y2="185.804"/>
|
||||
<g>
|
||||
<rect fill="#90c2ff" x="24.095" y="19.892" width="6.602" height="6.602"/>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#90c2ff" d="M238.569,185.804c-2.84,1.054-6.363,2.852-8.548,4.756l1.721-4.756l-1.721-4.755
|
||||
C232.206,182.953,235.729,184.751,238.569,185.804z"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="graph0">
|
||||
<title>sorted_binary_tree</title>
|
||||
<g id="node1">
|
||||
<title>C</title>
|
||||
<ellipse fill="#FFFFFF" stroke="#ffffff" cx="60.23" cy="185.804" rx="18.067" ry="18.067"/>
|
||||
<text transform="matrix(1 0 0 1 55.5435 190.8223)" font-family="'Times-Roman'" font-size="14.0528">C</text>
|
||||
</g>
|
||||
<g id="node2">
|
||||
<title>E</title>
|
||||
<ellipse fill="#FFFFFF" stroke="#ffffff" cx="132.502" cy="185.804" rx="18.067" ry="18.067"/>
|
||||
<text transform="matrix(1 0 0 1 128.21 190.8223)" font-family="'Times-Roman'" font-size="14.0528">E</text>
|
||||
</g>
|
||||
<g id="node3">
|
||||
<title>H</title>
|
||||
<ellipse fill="#FFFFFF" stroke="#ffffff" cx="204.773" cy="185.804" rx="17.064" ry="18.067"/>
|
||||
<text transform="matrix(1 0 0 1 199.6992 190.8223)" font-family="'Times-Roman'" font-size="14.0528">H</text>
|
||||
</g>
|
||||
<g id="node4">
|
||||
<title>A</title>
|
||||
<ellipse fill="#FFFFFF" stroke="#ffffff" cx="24.094" cy="131.6" rx="17.064" ry="18.068"/>
|
||||
<text transform="matrix(1 0 0 1 19.02 136.6191)" font-family="'Times-Roman'" font-size="14.0528">A</text>
|
||||
</g>
|
||||
<g id="node5">
|
||||
<title>D</title>
|
||||
<ellipse fill="#FFFFFF" stroke="#ffffff" cx="96.366" cy="131.6" rx="17.064" ry="18.068"/>
|
||||
<text transform="matrix(1 0 0 1 91.292 136.6191)" font-family="'Times-Roman'" font-size="14.0528">D</text>
|
||||
</g>
|
||||
<g id="edge6">
|
||||
<title>D->C</title>
|
||||
<path fill="none" stroke="#ffffff" d="M86.328,147.66c-3.011,4.016-7.026,9.034-10.038,14.053"/>
|
||||
<polygon fill="#ffffff" stroke="#ffffff" points="78.298,164.725 70.268,170.747 73.279,160.709 "/>
|
||||
</g>
|
||||
<g id="edge8">
|
||||
<title>D->E</title>
|
||||
<path fill="none" stroke="#ffffff" d="M106.404,147.66c3.011,4.016,7.026,9.034,10.038,14.053"/>
|
||||
<polygon fill="#ffffff" stroke="#ffffff" points="119.453,160.709 122.464,170.747 114.434,164.725 "/>
|
||||
</g>
|
||||
<g id="node6">
|
||||
<title>I</title>
|
||||
<ellipse fill="#FFFFFF" stroke="#ffffff" cx="240.909" cy="131.6" rx="18.068" ry="18.068"/>
|
||||
<text transform="matrix(1 0 0 1 238.5693 136.6191)" font-family="'Times-Roman'" font-size="14.0528">I</text>
|
||||
</g>
|
||||
<g id="edge12">
|
||||
<title>I->H</title>
|
||||
<path fill="none" stroke="#ffffff" d="M230.871,146.656c-3.011,5.02-6.021,10.038-10.037,15.057"/>
|
||||
<polygon fill="#ffffff" stroke="#ffffff" points="223.846,163.721 214.812,169.743 217.822,159.705 "/>
|
||||
</g>
|
||||
<g id="node7">
|
||||
<title>B</title>
|
||||
<ellipse fill="#FFFFFF" stroke="#ffffff" cx="60.23" cy="77.396" rx="18.068" ry="18.068"/>
|
||||
<text transform="matrix(1 0 0 1 55.5435 82.415)" font-family="'Times-Roman'" font-size="14.0528">B</text>
|
||||
</g>
|
||||
<g id="edge3">
|
||||
<title>B->A</title>
|
||||
<path fill="none" stroke="#ffffff" d="M50.192,92.453c-3.011,5.019-6.022,10.038-10.038,15.057"/>
|
||||
<polygon fill="#ffffff" stroke="#ffffff" points="43.166,109.518 34.132,115.539 37.144,105.502 "/>
|
||||
</g>
|
||||
<g id="edge5">
|
||||
<title>B->D</title>
|
||||
<path fill="none" stroke="#ffffff" d="M70.268,92.453c3.011,5.019,6.022,10.038,10.038,15.057"/>
|
||||
<polygon fill="#ffffff" stroke="#ffffff" points="83.317,105.502 86.328,115.539 77.294,109.518 "/>
|
||||
</g>
|
||||
<g id="node8">
|
||||
<title>G</title>
|
||||
<ellipse fill="#FFFFFF" stroke="#ffffff" cx="204.773" cy="77.396" rx="17.064" ry="18.068"/>
|
||||
<text transform="matrix(1 0 0 1 199.6992 82.415)" font-family="'Times-Roman'" font-size="14.0528">G</text>
|
||||
</g>
|
||||
<g id="edge11">
|
||||
<title>G->I</title>
|
||||
<path fill="none" stroke="#ffffff" d="M214.812,93.457c3.011,4.015,7.026,9.034,10.038,14.053"/>
|
||||
<polygon fill="#ffffff" stroke="#ffffff" points="227.86,106.506 230.871,116.543 222.842,110.521 "/>
|
||||
</g>
|
||||
<g id="node9">
|
||||
<title>F</title>
|
||||
<ellipse fill="#FFFFFF" stroke="#ffffff" cx="132.502" cy="23.192" rx="18.068" ry="18.068"/>
|
||||
<text transform="matrix(1 0 0 1 128.5942 28.2109)" font-family="'Times-Roman'" font-size="14.0528">F</text>
|
||||
</g>
|
||||
<g id="edge2">
|
||||
<title>F->B</title>
|
||||
<path fill="none" stroke="#ffffff" d="M117.445,34.234c-11.042,8.03-23.087,17.064-34.128,26.098"/>
|
||||
<polygon fill="#ffffff" stroke="#ffffff" points="85.325,63.343 75.287,66.354 81.31,57.321 "/>
|
||||
</g>
|
||||
<g id="edge10">
|
||||
<title>F->G</title>
|
||||
<path fill="none" stroke="#ffffff" d="M147.559,34.234c11.041,8.03,23.087,17.064,34.129,26.098"/>
|
||||
<polygon fill="#ffffff" stroke="#ffffff" points="183.694,57.321 189.717,66.354 179.68,63.343 "/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 7.2 KiB |
@ -1,134 +1,138 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="266px" height="212px" viewBox="0 0 266 212" enable-background="new 0 0 266 212" xml:space="preserve">
|
||||
<g>
|
||||
<g>
|
||||
<line fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" x1="27.23" y1="23.192" x2="29.23" y2="23.192"/>
|
||||
|
||||
<line fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="3.9562,3.9562" x1="33.187" y1="23.192" x2="236.932" y2="23.192"/>
|
||||
<polyline fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" points="238.91,23.192 240.91,23.192
|
||||
238.97,23.677 "/>
|
||||
|
||||
<line fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="3.9907,3.9907" x1="235.099" y1="24.646" x2="27.971" y2="76.427"/>
|
||||
<polyline fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" points="26.035,76.912 24.095,77.396
|
||||
26.095,77.396 "/>
|
||||
|
||||
<line fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="4.0154,4.0154" x1="30.11" y1="77.396" x2="236.902" y2="77.396"/>
|
||||
<polyline fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" points="238.91,77.396 240.91,77.396
|
||||
238.97,77.881 "/>
|
||||
|
||||
<line fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="3.9907,3.9907" x1="235.099" y1="78.85" x2="27.971" y2="130.631"/>
|
||||
<polyline fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" points="26.035,131.114 24.095,131.6
|
||||
26.095,131.6 "/>
|
||||
|
||||
<line fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="4.0154,4.0154" x1="30.11" y1="131.6" x2="236.902" y2="131.6"/>
|
||||
<polyline fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" points="238.91,131.6 240.91,131.6
|
||||
238.97,132.085 "/>
|
||||
|
||||
<line fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="3.9907,3.9907" x1="235.099" y1="133.053" x2="27.971" y2="184.835"/>
|
||||
<polyline fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" points="26.035,185.318 24.095,185.804
|
||||
26.095,185.804 "/>
|
||||
|
||||
<line fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="4.0086,4.0086" x1="30.104" y1="185.804" x2="228.53" y2="185.804"/>
|
||||
|
||||
<line fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" x1="230.534" y1="185.804" x2="232.534" y2="185.804"/>
|
||||
<g>
|
||||
<rect x="24.095" y="19.892" width="6.602" height="6.602"/>
|
||||
</g>
|
||||
<g>
|
||||
<path d="M238.569,185.804c-2.84,1.054-6.363,2.852-8.548,4.756l1.721-4.756l-1.721-4.755
|
||||
C232.206,182.953,235.729,184.751,238.569,185.804z"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="graph0">
|
||||
<title>sorted_binary_tree</title>
|
||||
<g id="node1">
|
||||
<title>C</title>
|
||||
<ellipse fill="#FFFFFF" stroke="#000000" cx="60.23" cy="185.804" rx="18.067" ry="18.067"/>
|
||||
<text transform="matrix(1 0 0 1 55.5435 190.8223)" font-family="'Times-Roman'" font-size="14.0528">C</text>
|
||||
</g>
|
||||
<g id="node2">
|
||||
<title>E</title>
|
||||
<ellipse fill="#FFFFFF" stroke="#000000" cx="132.502" cy="185.804" rx="18.067" ry="18.067"/>
|
||||
<text transform="matrix(1 0 0 1 128.21 190.8223)" font-family="'Times-Roman'" font-size="14.0528">E</text>
|
||||
</g>
|
||||
<g id="node3">
|
||||
<title>H</title>
|
||||
<ellipse fill="#FFFFFF" stroke="#000000" cx="204.773" cy="185.804" rx="17.064" ry="18.067"/>
|
||||
<text transform="matrix(1 0 0 1 199.6992 190.8223)" font-family="'Times-Roman'" font-size="14.0528">H</text>
|
||||
</g>
|
||||
<g id="node4">
|
||||
<title>A</title>
|
||||
<ellipse fill="#FFFFFF" stroke="#000000" cx="24.094" cy="131.6" rx="17.064" ry="18.068"/>
|
||||
<text transform="matrix(1 0 0 1 19.02 136.6191)" font-family="'Times-Roman'" font-size="14.0528">A</text>
|
||||
</g>
|
||||
<g id="node5">
|
||||
<title>D</title>
|
||||
<ellipse fill="#FFFFFF" stroke="#000000" cx="96.366" cy="131.6" rx="17.064" ry="18.068"/>
|
||||
<text transform="matrix(1 0 0 1 91.292 136.6191)" font-family="'Times-Roman'" font-size="14.0528">D</text>
|
||||
</g>
|
||||
<g id="edge6">
|
||||
<title>D->C</title>
|
||||
<path fill="none" stroke="#000000" d="M86.328,147.66c-3.011,4.016-7.026,9.034-10.038,14.053"/>
|
||||
<polygon stroke="#000000" points="78.298,164.725 70.268,170.747 73.279,160.709 "/>
|
||||
</g>
|
||||
<g id="edge8">
|
||||
<title>D->E</title>
|
||||
<path fill="none" stroke="#000000" d="M106.404,147.66c3.011,4.016,7.026,9.034,10.038,14.053"/>
|
||||
<polygon stroke="#000000" points="119.453,160.709 122.464,170.747 114.434,164.725 "/>
|
||||
</g>
|
||||
<g id="node6">
|
||||
<title>I</title>
|
||||
<ellipse fill="#FFFFFF" stroke="#000000" cx="240.909" cy="131.6" rx="18.068" ry="18.068"/>
|
||||
<text transform="matrix(1 0 0 1 238.5693 136.6191)" font-family="'Times-Roman'" font-size="14.0528">I</text>
|
||||
</g>
|
||||
<g id="edge12">
|
||||
<title>I->H</title>
|
||||
<path fill="none" stroke="#000000" d="M230.871,146.656c-3.011,5.02-6.021,10.038-10.037,15.057"/>
|
||||
<polygon stroke="#000000" points="223.846,163.721 214.812,169.743 217.822,159.705 "/>
|
||||
</g>
|
||||
<g id="node7">
|
||||
<title>B</title>
|
||||
<ellipse fill="#FFFFFF" stroke="#000000" cx="60.23" cy="77.396" rx="18.068" ry="18.068"/>
|
||||
<text transform="matrix(1 0 0 1 55.5435 82.415)" font-family="'Times-Roman'" font-size="14.0528">B</text>
|
||||
</g>
|
||||
<g id="edge3">
|
||||
<title>B->A</title>
|
||||
<path fill="none" stroke="#000000" d="M50.192,92.453c-3.011,5.019-6.022,10.038-10.038,15.057"/>
|
||||
<polygon stroke="#000000" points="43.166,109.518 34.132,115.539 37.144,105.502 "/>
|
||||
</g>
|
||||
<g id="edge5">
|
||||
<title>B->D</title>
|
||||
<path fill="none" stroke="#000000" d="M70.268,92.453c3.011,5.019,6.022,10.038,10.038,15.057"/>
|
||||
<polygon stroke="#000000" points="83.317,105.502 86.328,115.539 77.294,109.518 "/>
|
||||
</g>
|
||||
<g id="node8">
|
||||
<title>G</title>
|
||||
<ellipse fill="#FFFFFF" stroke="#000000" cx="204.773" cy="77.396" rx="17.064" ry="18.068"/>
|
||||
<text transform="matrix(1 0 0 1 199.6992 82.415)" font-family="'Times-Roman'" font-size="14.0528">G</text>
|
||||
</g>
|
||||
<g id="edge11">
|
||||
<title>G->I</title>
|
||||
<path fill="none" stroke="#000000" d="M214.812,93.457c3.011,4.015,7.026,9.034,10.038,14.053"/>
|
||||
<polygon stroke="#000000" points="227.86,106.506 230.871,116.543 222.842,110.521 "/>
|
||||
</g>
|
||||
<g id="node9">
|
||||
<title>F</title>
|
||||
<ellipse fill="#FFFFFF" stroke="#000000" cx="132.502" cy="23.192" rx="18.068" ry="18.068"/>
|
||||
<text transform="matrix(1 0 0 1 128.5942 28.2109)" font-family="'Times-Roman'" font-size="14.0528">F</text>
|
||||
</g>
|
||||
<g id="edge2">
|
||||
<title>F->B</title>
|
||||
<path fill="none" stroke="#000000" d="M117.445,34.234c-11.042,8.03-23.087,17.064-34.128,26.098"/>
|
||||
<polygon stroke="#000000" points="85.325,63.343 75.287,66.354 81.31,57.321 "/>
|
||||
</g>
|
||||
<g id="edge10">
|
||||
<title>F->G</title>
|
||||
<path fill="none" stroke="#000000" d="M147.559,34.234c11.041,8.03,23.087,17.064,34.129,26.098"/>
|
||||
<polygon stroke="#000000" points="183.694,57.321 189.717,66.354 179.68,63.343 "/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SPDX-License-Identifier: CC0-1.0
|
||||
SPDX-FileCopyrightText: Rory O'Kane at Wikimedia Commons
|
||||
<https://commons.wikimedia.org/wiki/File:Sorted_binary_tree_breadth-first_traversal.svg>
|
||||
SPDX-FileCopyrightText: 2024 Frank Dana
|
||||
-->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="266px" height="212px" viewBox="0 0 266 212" enable-background="new 0 0 266 212" xml:space="preserve">
|
||||
<g>
|
||||
<g>
|
||||
<line fill="none" stroke="#1c76e4" stroke-width="2" stroke-miterlimit="10" x1="27.23" y1="23.192" x2="29.23" y2="23.192"/>
|
||||
|
||||
<line fill="none" stroke="#1c76e4" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="3.9562,3.9562" x1="33.187" y1="23.192" x2="236.932" y2="23.192"/>
|
||||
<polyline fill="none" stroke="#1c76e4" stroke-width="2" stroke-miterlimit="10" points="238.91,23.192 240.91,23.192
|
||||
238.97,23.677 "/>
|
||||
|
||||
<line fill="none" stroke="#1c76e4" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="3.9907,3.9907" x1="235.099" y1="24.646" x2="27.971" y2="76.427"/>
|
||||
<polyline fill="none" stroke="#1c76e4" stroke-width="2" stroke-miterlimit="10" points="26.035,76.912 24.095,77.396
|
||||
26.095,77.396 "/>
|
||||
|
||||
<line fill="none" stroke="#1c76e4" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="4.0154,4.0154" x1="30.11" y1="77.396" x2="236.902" y2="77.396"/>
|
||||
<polyline fill="none" stroke="#1c76e4" stroke-width="2" stroke-miterlimit="10" points="238.91,77.396 240.91,77.396
|
||||
238.97,77.881 "/>
|
||||
|
||||
<line fill="none" stroke="#1c76e4" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="3.9907,3.9907" x1="235.099" y1="78.85" x2="27.971" y2="130.631"/>
|
||||
<polyline fill="none" stroke="#1c76e4" stroke-width="2" stroke-miterlimit="10" points="26.035,131.114 24.095,131.6
|
||||
26.095,131.6 "/>
|
||||
|
||||
<line fill="none" stroke="#1c76e4" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="4.0154,4.0154" x1="30.11" y1="131.6" x2="236.902" y2="131.6"/>
|
||||
<polyline fill="none" stroke="#1c76e4" stroke-width="2" stroke-miterlimit="10" points="238.91,131.6 240.91,131.6
|
||||
238.97,132.085 "/>
|
||||
|
||||
<line fill="none" stroke="#1c76e4" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="3.9907,3.9907" x1="235.099" y1="133.053" x2="27.971" y2="184.835"/>
|
||||
<polyline fill="none" stroke="#1c76e4" stroke-width="2" stroke-miterlimit="10" points="26.035,185.318 24.095,185.804
|
||||
26.095,185.804 "/>
|
||||
|
||||
<line fill="none" stroke="#1c76e4" stroke-width="2" stroke-miterlimit="10" stroke-dasharray="4.0086,4.0086" x1="30.104" y1="185.804" x2="228.53" y2="185.804"/>
|
||||
|
||||
<line fill="none" stroke="#1c76e4" stroke-width="2" stroke-miterlimit="10" x1="230.534" y1="185.804" x2="232.534" y2="185.804"/>
|
||||
<g>
|
||||
<rect fill="#1c76e4" x="24.095" y="19.892" width="6.602" height="6.602"/>
|
||||
</g>
|
||||
<g>
|
||||
<path fill="#1c76e4" d="M238.569,185.804c-2.84,1.054-6.363,2.852-8.548,4.756l1.721-4.756l-1.721-4.755
|
||||
C232.206,182.953,235.729,184.751,238.569,185.804z"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g id="graph0">
|
||||
<title>sorted_binary_tree</title>
|
||||
<g id="node1">
|
||||
<title>C</title>
|
||||
<ellipse fill="#FFFFFF" stroke="#000000" cx="60.23" cy="185.804" rx="18.067" ry="18.067"/>
|
||||
<text transform="matrix(1 0 0 1 55.5435 190.8223)" font-family="'Times-Roman'" font-size="14.0528">C</text>
|
||||
</g>
|
||||
<g id="node2">
|
||||
<title>E</title>
|
||||
<ellipse fill="#FFFFFF" stroke="#000000" cx="132.502" cy="185.804" rx="18.067" ry="18.067"/>
|
||||
<text transform="matrix(1 0 0 1 128.21 190.8223)" font-family="'Times-Roman'" font-size="14.0528">E</text>
|
||||
</g>
|
||||
<g id="node3">
|
||||
<title>H</title>
|
||||
<ellipse fill="#FFFFFF" stroke="#000000" cx="204.773" cy="185.804" rx="17.064" ry="18.067"/>
|
||||
<text transform="matrix(1 0 0 1 199.6992 190.8223)" font-family="'Times-Roman'" font-size="14.0528">H</text>
|
||||
</g>
|
||||
<g id="node4">
|
||||
<title>A</title>
|
||||
<ellipse fill="#FFFFFF" stroke="#000000" cx="24.094" cy="131.6" rx="17.064" ry="18.068"/>
|
||||
<text transform="matrix(1 0 0 1 19.02 136.6191)" font-family="'Times-Roman'" font-size="14.0528">A</text>
|
||||
</g>
|
||||
<g id="node5">
|
||||
<title>D</title>
|
||||
<ellipse fill="#FFFFFF" stroke="#000000" cx="96.366" cy="131.6" rx="17.064" ry="18.068"/>
|
||||
<text transform="matrix(1 0 0 1 91.292 136.6191)" font-family="'Times-Roman'" font-size="14.0528">D</text>
|
||||
</g>
|
||||
<g id="edge6">
|
||||
<title>D->C</title>
|
||||
<path fill="none" stroke="#000000" d="M86.328,147.66c-3.011,4.016-7.026,9.034-10.038,14.053"/>
|
||||
<polygon stroke="#000000" points="78.298,164.725 70.268,170.747 73.279,160.709 "/>
|
||||
</g>
|
||||
<g id="edge8">
|
||||
<title>D->E</title>
|
||||
<path fill="none" stroke="#000000" d="M106.404,147.66c3.011,4.016,7.026,9.034,10.038,14.053"/>
|
||||
<polygon stroke="#000000" points="119.453,160.709 122.464,170.747 114.434,164.725 "/>
|
||||
</g>
|
||||
<g id="node6">
|
||||
<title>I</title>
|
||||
<ellipse fill="#FFFFFF" stroke="#000000" cx="240.909" cy="131.6" rx="18.068" ry="18.068"/>
|
||||
<text transform="matrix(1 0 0 1 238.5693 136.6191)" font-family="'Times-Roman'" font-size="14.0528">I</text>
|
||||
</g>
|
||||
<g id="edge12">
|
||||
<title>I->H</title>
|
||||
<path fill="none" stroke="#000000" d="M230.871,146.656c-3.011,5.02-6.021,10.038-10.037,15.057"/>
|
||||
<polygon stroke="#000000" points="223.846,163.721 214.812,169.743 217.822,159.705 "/>
|
||||
</g>
|
||||
<g id="node7">
|
||||
<title>B</title>
|
||||
<ellipse fill="#FFFFFF" stroke="#000000" cx="60.23" cy="77.396" rx="18.068" ry="18.068"/>
|
||||
<text transform="matrix(1 0 0 1 55.5435 82.415)" font-family="'Times-Roman'" font-size="14.0528">B</text>
|
||||
</g>
|
||||
<g id="edge3">
|
||||
<title>B->A</title>
|
||||
<path fill="none" stroke="#000000" d="M50.192,92.453c-3.011,5.019-6.022,10.038-10.038,15.057"/>
|
||||
<polygon stroke="#000000" points="43.166,109.518 34.132,115.539 37.144,105.502 "/>
|
||||
</g>
|
||||
<g id="edge5">
|
||||
<title>B->D</title>
|
||||
<path fill="none" stroke="#000000" d="M70.268,92.453c3.011,5.019,6.022,10.038,10.038,15.057"/>
|
||||
<polygon stroke="#000000" points="83.317,105.502 86.328,115.539 77.294,109.518 "/>
|
||||
</g>
|
||||
<g id="node8">
|
||||
<title>G</title>
|
||||
<ellipse fill="#FFFFFF" stroke="#000000" cx="204.773" cy="77.396" rx="17.064" ry="18.068"/>
|
||||
<text transform="matrix(1 0 0 1 199.6992 82.415)" font-family="'Times-Roman'" font-size="14.0528">G</text>
|
||||
</g>
|
||||
<g id="edge11">
|
||||
<title>G->I</title>
|
||||
<path fill="none" stroke="#000000" d="M214.812,93.457c3.011,4.015,7.026,9.034,10.038,14.053"/>
|
||||
<polygon stroke="#000000" points="227.86,106.506 230.871,116.543 222.842,110.521 "/>
|
||||
</g>
|
||||
<g id="node9">
|
||||
<title>F</title>
|
||||
<ellipse fill="#FFFFFF" stroke="#000000" cx="132.502" cy="23.192" rx="18.068" ry="18.068"/>
|
||||
<text transform="matrix(1 0 0 1 128.5942 28.2109)" font-family="'Times-Roman'" font-size="14.0528">F</text>
|
||||
</g>
|
||||
<g id="edge2">
|
||||
<title>F->B</title>
|
||||
<path fill="none" stroke="#000000" d="M117.445,34.234c-11.042,8.03-23.087,17.064-34.128,26.098"/>
|
||||
<polygon stroke="#000000" points="85.325,63.343 75.287,66.354 81.31,57.321 "/>
|
||||
</g>
|
||||
<g id="edge10">
|
||||
<title>F->G</title>
|
||||
<path fill="none" stroke="#000000" d="M147.559,34.234c11.041,8.03,23.087,17.064,34.129,26.098"/>
|
||||
<polygon stroke="#000000" points="183.694,57.321 189.717,66.354 179.68,63.343 "/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.0 KiB |
758
docs/reference/glib/Sorted_binary_tree_inorder-dark.svg
Normal file
After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
755
docs/reference/glib/Sorted_binary_tree_postorder-dark.svg
Normal file
After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
755
docs/reference/glib/Sorted_binary_tree_preorder-dark.svg
Normal file
After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
@ -42,6 +42,9 @@ name = "basic"
|
||||
show_index_summary = true
|
||||
show_class_hierarchy = true
|
||||
|
||||
[source-location]
|
||||
base_url = "https://gitlab.gnome.org/GNOME/glib/-/blob/main/"
|
||||
|
||||
[extra]
|
||||
urlmap_file = "../urlmap.js"
|
||||
# The same order will be used when generating the index
|
||||
|
@ -42,6 +42,9 @@ name = "basic"
|
||||
show_index_summary = true
|
||||
show_class_hierarchy = true
|
||||
|
||||
[source-location]
|
||||
base_url = "https://gitlab.gnome.org/GNOME/glib/-/blob/main/"
|
||||
|
||||
[extra]
|
||||
urlmap_file = "../urlmap.js"
|
||||
# The same order will be used when generating the index
|
||||
|
@ -36,6 +36,9 @@ name = "basic"
|
||||
show_index_summary = true
|
||||
show_class_hierarchy = true
|
||||
|
||||
[source-location]
|
||||
base_url = "https://gitlab.gnome.org/GNOME/glib/-/blob/main/"
|
||||
|
||||
[extra]
|
||||
urlmap_file = "../urlmap.js"
|
||||
# The same order will be used when generating the index
|
||||
@ -96,6 +99,10 @@ content_images = [
|
||||
"Sorted_binary_tree_inorder.svg",
|
||||
"Sorted_binary_tree_postorder.svg",
|
||||
"Sorted_binary_tree_preorder.svg",
|
||||
"Sorted_binary_tree_breadth-first_traversal-dark.svg",
|
||||
"Sorted_binary_tree_inorder-dark.svg",
|
||||
"Sorted_binary_tree_postorder-dark.svg",
|
||||
"Sorted_binary_tree_preorder-dark.svg",
|
||||
]
|
||||
|
||||
[[object]]
|
||||
|
@ -38,6 +38,9 @@ name = "basic"
|
||||
show_index_summary = true
|
||||
show_class_hierarchy = true
|
||||
|
||||
[source-location]
|
||||
base_url = "https://gitlab.gnome.org/GNOME/glib/-/blob/main/"
|
||||
|
||||
[extra]
|
||||
urlmap_file = "../urlmap.js"
|
||||
# The same order will be used when generating the index
|
||||
|
@ -34,7 +34,7 @@
|
||||
/**
|
||||
* GActionGroupExporter:
|
||||
*
|
||||
* These functions support exporting a [class@Gio.ActionGroup] on D-Bus.
|
||||
* These functions support exporting a [iface@Gio.ActionGroup] on D-Bus.
|
||||
* The D-Bus interface that is used is a private implementation
|
||||
* detail.
|
||||
*
|
||||
@ -556,10 +556,9 @@ g_action_group_exporter_free (GActionGroupExporter *exporter)
|
||||
|
||||
/**
|
||||
* g_dbus_connection_export_action_group:
|
||||
* @connection: a #GDBusConnection
|
||||
* @connection: the D-Bus connection
|
||||
* @object_path: a D-Bus object path
|
||||
* @action_group: a #GActionGroup
|
||||
* @error: a pointer to a %NULL #GError, or %NULL
|
||||
* @action_group: an action group
|
||||
*
|
||||
* Exports @action_group on @connection at @object_path.
|
||||
*
|
||||
@ -571,7 +570,7 @@ g_action_group_exporter_free (GActionGroupExporter *exporter)
|
||||
* returned (with @error set accordingly).
|
||||
*
|
||||
* You can unexport the action group using
|
||||
* g_dbus_connection_unexport_action_group() with the return value of
|
||||
* [method@Gio.DBusConnection.unexport_action_group] with the return value of
|
||||
* this function.
|
||||
*
|
||||
* The thread default main context is taken at the time of this call.
|
||||
@ -641,15 +640,15 @@ g_dbus_connection_export_action_group (GDBusConnection *connection,
|
||||
|
||||
/**
|
||||
* g_dbus_connection_unexport_action_group:
|
||||
* @connection: a #GDBusConnection
|
||||
* @export_id: the ID from g_dbus_connection_export_action_group()
|
||||
* @connection: the D-Bus connection
|
||||
* @export_id: the ID from [method@Gio.DBusConnection.export_action_group]
|
||||
*
|
||||
* Reverses the effect of a previous call to
|
||||
* g_dbus_connection_export_action_group().
|
||||
* [method@Gio.DBusConnection.export_action_group].
|
||||
*
|
||||
* It is an error to call this function with an ID that wasn't returned
|
||||
* from g_dbus_connection_export_action_group() or to call it with the
|
||||
* same ID more than once.
|
||||
* It is an error to call this function with an ID that wasn’t returned from
|
||||
* [method@Gio.DBusConnection.export_action_group] or to call it with the same
|
||||
* ID more than once.
|
||||
*
|
||||
* Since: 2.32
|
||||
**/
|
||||
|
@ -37,7 +37,7 @@
|
||||
* One useful application of this interface is to map the
|
||||
* names of actions from various action groups to unique,
|
||||
* prefixed names (e.g. by prepending "app." or "win.").
|
||||
* This is the motivation for the 'Map' part of the interface
|
||||
* This is the motivation for the ‘Map’ part of the interface
|
||||
* name.
|
||||
*
|
||||
* Since: 2.32
|
||||
@ -45,11 +45,14 @@
|
||||
|
||||
/**
|
||||
* GActionMapInterface:
|
||||
* @lookup_action: the virtual function pointer for g_action_map_lookup_action()
|
||||
* @add_action: the virtual function pointer for g_action_map_add_action()
|
||||
* @remove_action: the virtual function pointer for g_action_map_remove_action()
|
||||
* @lookup_action: the virtual function pointer for
|
||||
* [method@Gio.ActionMap.lookup_action]
|
||||
* @add_action: the virtual function pointer for
|
||||
* [method@Gio.ActionMap.add_action]
|
||||
* @remove_action: the virtual function pointer for
|
||||
* [method@Gio.ActionMap.remove_action]
|
||||
*
|
||||
* The virtual function table for #GActionMap.
|
||||
* The virtual function table for [iface@Gio.ActionMap].
|
||||
*
|
||||
* Since: 2.32
|
||||
**/
|
||||
@ -63,14 +66,14 @@ g_action_map_default_init (GActionMapInterface *iface)
|
||||
|
||||
/**
|
||||
* g_action_map_lookup_action:
|
||||
* @action_map: a #GActionMap
|
||||
* @action_map: an action map
|
||||
* @action_name: the name of an action
|
||||
*
|
||||
* Looks up the action with the name @action_name in @action_map.
|
||||
*
|
||||
* If no such action exists, returns %NULL.
|
||||
* If no such action exists, returns `NULL`.
|
||||
*
|
||||
* Returns: (nullable) (transfer none): a #GAction, or %NULL
|
||||
* Returns: (nullable) (transfer none): a [iface@Gio.Action]
|
||||
*
|
||||
* Since: 2.32
|
||||
*/
|
||||
@ -84,8 +87,8 @@ g_action_map_lookup_action (GActionMap *action_map,
|
||||
|
||||
/**
|
||||
* g_action_map_add_action:
|
||||
* @action_map: a #GActionMap
|
||||
* @action: a #GAction
|
||||
* @action_map: an action map
|
||||
* @action: a [iface@Gio.Action]
|
||||
*
|
||||
* Adds an action to the @action_map.
|
||||
*
|
||||
@ -105,7 +108,7 @@ g_action_map_add_action (GActionMap *action_map,
|
||||
|
||||
/**
|
||||
* g_action_map_remove_action:
|
||||
* @action_map: a #GActionMap
|
||||
* @action_map: an action map
|
||||
* @action_name: the name of the action
|
||||
*
|
||||
* Removes the named action from the action map.
|
||||
@ -124,51 +127,49 @@ g_action_map_remove_action (GActionMap *action_map,
|
||||
/**
|
||||
* GActionEntry:
|
||||
* @name: the name of the action
|
||||
* @activate: the callback to connect to the "activate" signal of the
|
||||
* action. Since GLib 2.40, this can be %NULL for stateful
|
||||
* actions, in which case the default handler is used. For
|
||||
* boolean-stated actions with no parameter, this is a
|
||||
* toggle. For other state types (and parameter type equal
|
||||
* to the state type) this will be a function that
|
||||
* just calls @change_state (which you should provide).
|
||||
* @activate: the callback to connect to the "activate" signal of the action.
|
||||
* Since GLib 2.40, this can be `NULL` for stateful actions, in which case
|
||||
* the default handler is used. For boolean-stated actions with no
|
||||
* parameter, this is a toggle. For other state types (and parameter type
|
||||
* equal to the state type) this will be a function that just calls
|
||||
* @change_state (which you should provide).
|
||||
* @parameter_type: the type of the parameter that must be passed to the
|
||||
* activate function for this action, given as a single
|
||||
* GVariant type string (or %NULL for no parameter)
|
||||
* activate function for this action, given as a single GVariant type string
|
||||
* (or `NULL` for no parameter)
|
||||
* @state: the initial state for this action, given in
|
||||
* [GVariant text format](gvariant-text-format.html). The state is parsed
|
||||
* with no extra type information, so type tags must be added to
|
||||
* the string if they are necessary. Stateless actions should
|
||||
* give %NULL here.
|
||||
* @change_state: the callback to connect to the "change-state" signal
|
||||
* of the action. All stateful actions should provide a
|
||||
* handler here; stateless actions should not.
|
||||
* [GVariant text format](gvariant-text-format.html). The state is parsed
|
||||
* with no extra type information, so type tags must be added to the string
|
||||
* if they are necessary. Stateless actions should give `NULL` here.
|
||||
* @change_state: the callback to connect to the "change-state" signal of the
|
||||
* action. All stateful actions should provide a handler here; stateless
|
||||
* actions should not.
|
||||
*
|
||||
* This struct defines a single action. It is for use with
|
||||
* g_action_map_add_action_entries().
|
||||
* [method@Gio.ActionMap.add_action_entries].
|
||||
*
|
||||
* The order of the items in the structure are intended to reflect
|
||||
* frequency of use. It is permissible to use an incomplete initialiser
|
||||
* in order to leave some of the later values as %NULL. All values
|
||||
* in order to leave some of the later values as `NULL`. All values
|
||||
* after @name are optional. Additional optional fields may be added in
|
||||
* the future.
|
||||
*
|
||||
* See g_action_map_add_action_entries() for an example.
|
||||
* See [method@Gio.ActionMap.add_action_entries] for an example.
|
||||
**/
|
||||
|
||||
/**
|
||||
* g_action_map_add_action_entries:
|
||||
* @action_map: a #GActionMap
|
||||
* @action_map: an action map
|
||||
* @entries: (array length=n_entries) (element-type GActionEntry): a pointer to
|
||||
* the first item in an array of #GActionEntry structs
|
||||
* @n_entries: the length of @entries, or -1 if @entries is %NULL-terminated
|
||||
* the first item in an array of [struct@Gio.ActionEntry] structs
|
||||
* @n_entries: the length of @entries, or -1 if @entries is `NULL`-terminated
|
||||
* @user_data: the user data for signal connections
|
||||
*
|
||||
* A convenience function for creating multiple #GSimpleAction instances
|
||||
* and adding them to a #GActionMap.
|
||||
* A convenience function for creating multiple [class@Gio.SimpleAction]
|
||||
* instances and adding them to a [iface@Gio.ActionMap].
|
||||
*
|
||||
* Each action is constructed as per one #GActionEntry.
|
||||
* Each action is constructed as per one [struct@Gio.ActionEntry].
|
||||
*
|
||||
* |[<!-- language="C" -->
|
||||
* ```c
|
||||
* static void
|
||||
* activate_quit (GSimpleAction *simple,
|
||||
* GVariant *parameter,
|
||||
@ -199,7 +200,7 @@ g_action_map_remove_action (GActionMap *action_map,
|
||||
*
|
||||
* return G_ACTION_GROUP (group);
|
||||
* }
|
||||
* ]|
|
||||
* ```
|
||||
*
|
||||
* Since: 2.32
|
||||
*/
|
||||
@ -278,16 +279,16 @@ g_action_map_add_action_entries (GActionMap *action_map,
|
||||
|
||||
/**
|
||||
* g_action_map_remove_action_entries:
|
||||
* @action_map: The #GActionMap
|
||||
* @action_map: The [iface@Gio.ActionMap]
|
||||
* @entries: (array length=n_entries) (element-type GActionEntry): a pointer to
|
||||
* the first item in an array of #GActionEntry structs
|
||||
* @n_entries: the length of @entries, or -1 if @entries is %NULL-terminated
|
||||
* the first item in an array of [struct@Gio.ActionEntry] structs
|
||||
* @n_entries: the length of @entries, or -1 if @entries is `NULL`-terminated
|
||||
*
|
||||
* Remove actions from a #GActionMap. This is meant as the reverse of
|
||||
* g_action_map_add_action_entries().
|
||||
* Remove actions from a [iface@Gio.ActionMap]. This is meant as the reverse of
|
||||
* [method@Gio.ActionMap.add_action_entries].
|
||||
*
|
||||
*
|
||||
* |[<!-- language="C" -->
|
||||
* ```c
|
||||
* static const GActionEntry entries[] = {
|
||||
* { "quit", activate_quit },
|
||||
* { "print-string", activate_print_string, "s" }
|
||||
@ -304,7 +305,7 @@ g_action_map_add_action_entries (GActionMap *action_map,
|
||||
* {
|
||||
* g_action_map_remove_action_entries (map, entries, G_N_ELEMENTS (entries));
|
||||
* }
|
||||
* ]|
|
||||
* ```
|
||||
*
|
||||
* Since: 2.78
|
||||
*/
|
||||
|
392
gio/gappinfo.c
@ -56,15 +56,19 @@
|
||||
* As of GLib 2.20, URIs will always be converted to POSIX paths
|
||||
* (using [method@Gio.File.get_path]) when using [method@Gio.AppInfo.launch]
|
||||
* even if the application requested an URI and not a POSIX path. For example
|
||||
* for a desktop-file based application with Exec key `totem
|
||||
* %U` and a single URI, `sftp://foo/file.avi`, then
|
||||
* `/home/user/.gvfs/sftp on foo/file.avi` will be passed. This will
|
||||
* only work if a set of suitable GIO extensions (such as GVfs 2.26
|
||||
* compiled with FUSE support), is available and operational; if this
|
||||
* is not the case, the URI will be passed unmodified to the application.
|
||||
* Some URIs, such as `mailto:`, of course cannot be mapped to a POSIX
|
||||
* path (in GVfs there's no FUSE mount for it); such URIs will be
|
||||
* passed unmodified to the application.
|
||||
* for a desktop-file based application with the following Exec key:
|
||||
*
|
||||
* ```
|
||||
* Exec=totem %U
|
||||
* ```
|
||||
*
|
||||
* and a single URI, `sftp://foo/file.avi`, then
|
||||
* `/home/user/.gvfs/sftp on foo/file.avi` will be passed. This will only work
|
||||
* if a set of suitable GIO extensions (such as GVfs 2.26 compiled with FUSE
|
||||
* support), is available and operational; if this is not the case, the URI
|
||||
* will be passed unmodified to the application. Some URIs, such as `mailto:`,
|
||||
* of course cannot be mapped to a POSIX path (in GVfs there’s no FUSE mount
|
||||
* for it); such URIs will be passed unmodified to the application.
|
||||
*
|
||||
* Specifically for GVfs 2.26 and later, the POSIX URI will be mapped
|
||||
* back to the GIO URI in the [iface@Gio.File] constructors (since GVfs
|
||||
@ -94,7 +98,7 @@
|
||||
*
|
||||
* This code will work when both `cdda://sr0/Track 1.wav` and
|
||||
* `/home/user/.gvfs/cdda on sr0/Track 1.wav` is passed to the
|
||||
* application. It should be noted that it's generally not safe
|
||||
* application. It should be noted that it’s generally not safe
|
||||
* for applications to rely on the format of a particular URIs.
|
||||
* Different launcher applications (e.g. file managers) may have
|
||||
* different ideas of what a given URI means.
|
||||
@ -115,9 +119,9 @@ g_app_info_default_init (GAppInfoInterface *iface)
|
||||
|
||||
/**
|
||||
* g_app_info_dup:
|
||||
* @appinfo: a #GAppInfo.
|
||||
* @appinfo: the app info
|
||||
*
|
||||
* Creates a duplicate of a #GAppInfo.
|
||||
* Creates a duplicate of a [iface@Gio.AppInfo].
|
||||
*
|
||||
* Returns: (transfer full): a duplicate of @appinfo.
|
||||
**/
|
||||
@ -135,16 +139,16 @@ g_app_info_dup (GAppInfo *appinfo)
|
||||
|
||||
/**
|
||||
* g_app_info_equal:
|
||||
* @appinfo1: the first #GAppInfo.
|
||||
* @appinfo2: the second #GAppInfo.
|
||||
* @appinfo1: the first [iface@Gio.AppInfo].
|
||||
* @appinfo2: the second [iface@Gio.AppInfo].
|
||||
*
|
||||
* Checks if two #GAppInfos are equal.
|
||||
* Checks if two [iface@Gio.AppInfo]s are equal.
|
||||
*
|
||||
* Note that the check *may not* compare each individual
|
||||
* field, and only does an identity check. In case detecting changes in the
|
||||
* contents is needed, program code must additionally compare relevant fields.
|
||||
* Note that the check *may not* compare each individual field, and only does
|
||||
* an identity check. In case detecting changes in the contents is needed,
|
||||
* program code must additionally compare relevant fields.
|
||||
*
|
||||
* Returns: %TRUE if @appinfo1 is equal to @appinfo2. %FALSE otherwise.
|
||||
* Returns: `TRUE` if @appinfo1 is equal to @appinfo2. `FALSE` otherwise.
|
||||
**/
|
||||
gboolean
|
||||
g_app_info_equal (GAppInfo *appinfo1,
|
||||
@ -165,17 +169,16 @@ g_app_info_equal (GAppInfo *appinfo1,
|
||||
|
||||
/**
|
||||
* g_app_info_get_id:
|
||||
* @appinfo: a #GAppInfo.
|
||||
* @appinfo: the app info
|
||||
*
|
||||
* Gets the ID of an application. An id is a string that
|
||||
* identifies the application. The exact format of the id is
|
||||
* platform dependent. For instance, on Unix this is the
|
||||
* desktop file id from the xdg menu specification.
|
||||
* Gets the ID of an application. An id is a string that identifies the
|
||||
* application. The exact format of the id is platform dependent. For instance,
|
||||
* on Unix this is the desktop file id from the xdg menu specification.
|
||||
*
|
||||
* Note that the returned ID may be %NULL, depending on how
|
||||
* the @appinfo has been constructed.
|
||||
* Note that the returned ID may be `NULL`, depending on how the @appinfo has
|
||||
* been constructed.
|
||||
*
|
||||
* Returns: (nullable): a string containing the application's ID.
|
||||
* Returns: (nullable): a string containing the application’s ID.
|
||||
**/
|
||||
const char *
|
||||
g_app_info_get_id (GAppInfo *appinfo)
|
||||
@ -191,7 +194,7 @@ g_app_info_get_id (GAppInfo *appinfo)
|
||||
|
||||
/**
|
||||
* g_app_info_get_name:
|
||||
* @appinfo: a #GAppInfo.
|
||||
* @appinfo: the app info
|
||||
*
|
||||
* Gets the installed name of the application.
|
||||
*
|
||||
@ -211,7 +214,7 @@ g_app_info_get_name (GAppInfo *appinfo)
|
||||
|
||||
/**
|
||||
* g_app_info_get_display_name:
|
||||
* @appinfo: a #GAppInfo.
|
||||
* @appinfo: the app info
|
||||
*
|
||||
* Gets the display name of the application. The display name is often more
|
||||
* descriptive to the user than the name itself.
|
||||
@ -238,12 +241,12 @@ g_app_info_get_display_name (GAppInfo *appinfo)
|
||||
|
||||
/**
|
||||
* g_app_info_get_description:
|
||||
* @appinfo: a #GAppInfo.
|
||||
* @appinfo: the app info
|
||||
*
|
||||
* Gets a human-readable description of an installed application.
|
||||
*
|
||||
* Returns: (nullable): a string containing a description of the
|
||||
* application @appinfo, or %NULL if none.
|
||||
* application @appinfo, or `NULL` if none.
|
||||
**/
|
||||
const char *
|
||||
g_app_info_get_description (GAppInfo *appinfo)
|
||||
@ -259,15 +262,15 @@ g_app_info_get_description (GAppInfo *appinfo)
|
||||
|
||||
/**
|
||||
* g_app_info_get_executable: (virtual get_executable)
|
||||
* @appinfo: a #GAppInfo
|
||||
* @appinfo: the app info
|
||||
*
|
||||
* Gets the executable's name for the installed application.
|
||||
* Gets the executable’s name for the installed application.
|
||||
*
|
||||
* This is intended to be used for debugging or labelling what program is going
|
||||
* to be run. To launch the executable, use g_app_info_launch() and related
|
||||
* to be run. To launch the executable, use [method@Gio.AppInfo.launch] and related
|
||||
* functions, rather than spawning the return value from this function.
|
||||
*
|
||||
* Returns: (type filename): a string containing the @appinfo's application
|
||||
* Returns: (type filename): a string containing the @appinfo’s application
|
||||
* binaries name
|
||||
**/
|
||||
const char *
|
||||
@ -285,13 +288,13 @@ g_app_info_get_executable (GAppInfo *appinfo)
|
||||
|
||||
/**
|
||||
* g_app_info_get_commandline: (virtual get_commandline)
|
||||
* @appinfo: a #GAppInfo
|
||||
* @appinfo: the app info
|
||||
*
|
||||
* Gets the commandline with which the application will be
|
||||
* started.
|
||||
*
|
||||
* Returns: (nullable) (type filename): a string containing the @appinfo's commandline,
|
||||
* or %NULL if this information is not available
|
||||
* Returns: (nullable) (type filename): a string containing the @appinfo’s
|
||||
* commandline, or `NULL` if this information is not available
|
||||
*
|
||||
* Since: 2.20
|
||||
**/
|
||||
@ -312,13 +315,12 @@ g_app_info_get_commandline (GAppInfo *appinfo)
|
||||
|
||||
/**
|
||||
* g_app_info_set_as_default_for_type:
|
||||
* @appinfo: a #GAppInfo.
|
||||
* @appinfo: the app info
|
||||
* @content_type: the content type.
|
||||
* @error: a #GError.
|
||||
*
|
||||
* Sets the application as the default handler for a given type.
|
||||
*
|
||||
* Returns: %TRUE on success, %FALSE on error.
|
||||
* Returns: `TRUE` on success, `FALSE` on error.
|
||||
**/
|
||||
gboolean
|
||||
g_app_info_set_as_default_for_type (GAppInfo *appinfo,
|
||||
@ -342,16 +344,15 @@ g_app_info_set_as_default_for_type (GAppInfo *appinfo,
|
||||
|
||||
/**
|
||||
* g_app_info_set_as_last_used_for_type:
|
||||
* @appinfo: a #GAppInfo.
|
||||
* @appinfo: the app info
|
||||
* @content_type: the content type.
|
||||
* @error: a #GError.
|
||||
*
|
||||
* Sets the application as the last used application for a given type.
|
||||
* This will make the application appear as first in the list returned
|
||||
* by g_app_info_get_recommended_for_type(), regardless of the default
|
||||
* Sets the application as the last used application for a given type. This
|
||||
* will make the application appear as first in the list returned by
|
||||
* [func@Gio.AppInfo.get_recommended_for_type], regardless of the default
|
||||
* application for that content type.
|
||||
*
|
||||
* Returns: %TRUE on success, %FALSE on error.
|
||||
* Returns: `TRUE` on success, `FALSE` on error.
|
||||
**/
|
||||
gboolean
|
||||
g_app_info_set_as_last_used_for_type (GAppInfo *appinfo,
|
||||
@ -375,14 +376,13 @@ g_app_info_set_as_last_used_for_type (GAppInfo *appinfo,
|
||||
|
||||
/**
|
||||
* g_app_info_set_as_default_for_extension:
|
||||
* @appinfo: a #GAppInfo.
|
||||
* @extension: (type filename): a string containing the file extension
|
||||
* (without the dot).
|
||||
* @error: a #GError.
|
||||
* @appinfo: the app info
|
||||
* @extension: (type filename): a string containing the file extension (without
|
||||
* the dot).
|
||||
*
|
||||
* Sets the application as the default handler for the given file extension.
|
||||
*
|
||||
* Returns: %TRUE on success, %FALSE on error.
|
||||
* Returns: `TRUE` on success, `FALSE` on error.
|
||||
**/
|
||||
gboolean
|
||||
g_app_info_set_as_default_for_extension (GAppInfo *appinfo,
|
||||
@ -407,14 +407,13 @@ g_app_info_set_as_default_for_extension (GAppInfo *appinfo,
|
||||
|
||||
/**
|
||||
* g_app_info_add_supports_type:
|
||||
* @appinfo: a #GAppInfo.
|
||||
* @appinfo: the app info
|
||||
* @content_type: a string.
|
||||
* @error: a #GError.
|
||||
*
|
||||
* Adds a content type to the application information to indicate the
|
||||
* application is capable of opening files with the given content type.
|
||||
*
|
||||
* Returns: %TRUE on success, %FALSE on error.
|
||||
* Returns: `TRUE` on success, `FALSE` on error.
|
||||
**/
|
||||
gboolean
|
||||
g_app_info_add_supports_type (GAppInfo *appinfo,
|
||||
@ -441,12 +440,12 @@ g_app_info_add_supports_type (GAppInfo *appinfo,
|
||||
|
||||
/**
|
||||
* g_app_info_can_remove_supports_type:
|
||||
* @appinfo: a #GAppInfo.
|
||||
* @appinfo: the app info
|
||||
*
|
||||
* Checks if a supported content type can be removed from an application.
|
||||
*
|
||||
* Returns: %TRUE if it is possible to remove supported
|
||||
* content types from a given @appinfo, %FALSE if not.
|
||||
* Returns: `TRUE` if it is possible to remove supported content types from a
|
||||
* given @appinfo, `FALSE` if not.
|
||||
**/
|
||||
gboolean
|
||||
g_app_info_can_remove_supports_type (GAppInfo *appinfo)
|
||||
@ -466,13 +465,12 @@ g_app_info_can_remove_supports_type (GAppInfo *appinfo)
|
||||
|
||||
/**
|
||||
* g_app_info_remove_supports_type:
|
||||
* @appinfo: a #GAppInfo.
|
||||
* @appinfo: the app info
|
||||
* @content_type: a string.
|
||||
* @error: a #GError.
|
||||
*
|
||||
* Removes a supported type from an application, if possible.
|
||||
*
|
||||
* Returns: %TRUE on success, %FALSE on error.
|
||||
* Returns: `TRUE` on success, `FALSE` on error.
|
||||
**/
|
||||
gboolean
|
||||
g_app_info_remove_supports_type (GAppInfo *appinfo,
|
||||
@ -498,17 +496,18 @@ g_app_info_remove_supports_type (GAppInfo *appinfo,
|
||||
|
||||
/**
|
||||
* g_app_info_get_supported_types:
|
||||
* @appinfo: a #GAppInfo that can handle files
|
||||
* @appinfo: an app info that can handle files
|
||||
*
|
||||
* Retrieves the list of content types that @app_info claims to support.
|
||||
* If this information is not provided by the environment, this function
|
||||
* will return %NULL.
|
||||
* will return `NULL`.
|
||||
*
|
||||
* This function does not take in consideration associations added with
|
||||
* g_app_info_add_supports_type(), but only those exported directly by
|
||||
* [method@Gio.AppInfo.add_supports_type], but only those exported directly by
|
||||
* the application.
|
||||
*
|
||||
* Returns: (transfer none) (array zero-terminated=1) (element-type utf8):
|
||||
* a list of content types.
|
||||
* a list of content types.
|
||||
*
|
||||
* Since: 2.34
|
||||
*/
|
||||
@ -530,12 +529,12 @@ g_app_info_get_supported_types (GAppInfo *appinfo)
|
||||
|
||||
/**
|
||||
* g_app_info_get_icon:
|
||||
* @appinfo: a #GAppInfo.
|
||||
* @appinfo: the app info
|
||||
*
|
||||
* Gets the icon for the application.
|
||||
*
|
||||
* Returns: (nullable) (transfer none): the default #GIcon for @appinfo or %NULL
|
||||
* if there is no default icon.
|
||||
* Returns: (nullable) (transfer none): the default [iface@Gio.Icon] for
|
||||
* @appinfo or `NULL` if there is no default icon.
|
||||
**/
|
||||
GIcon *
|
||||
g_app_info_get_icon (GAppInfo *appinfo)
|
||||
@ -552,17 +551,16 @@ g_app_info_get_icon (GAppInfo *appinfo)
|
||||
|
||||
/**
|
||||
* g_app_info_launch:
|
||||
* @appinfo: a #GAppInfo
|
||||
* @files: (nullable) (element-type GFile): a #GList of #GFile objects
|
||||
* @context: (nullable): a #GAppLaunchContext or %NULL
|
||||
* @error: a #GError
|
||||
* @appinfo: the app info
|
||||
* @files: (nullable) (element-type GFile): a list of [iface@Gio.File] objects
|
||||
* @context: (nullable): the launch context
|
||||
*
|
||||
* Launches the application. Passes @files to the launched application
|
||||
* as arguments, using the optional @context to get information
|
||||
* about the details of the launcher (like what screen it is on).
|
||||
* On error, @error will be set accordingly.
|
||||
*
|
||||
* To launch the application without arguments pass a %NULL @files list.
|
||||
* To launch the application without arguments pass a `NULL` @files list.
|
||||
*
|
||||
* Note that even if the launch is successful the application launched
|
||||
* can fail to start if it runs into problems during startup. There is
|
||||
@ -571,11 +569,11 @@ g_app_info_get_icon (GAppInfo *appinfo)
|
||||
* Some URIs can be changed when passed through a GFile (for instance
|
||||
* unsupported URIs with strange formats like mailto:), so if you have
|
||||
* a textual URI you want to pass in as argument, consider using
|
||||
* g_app_info_launch_uris() instead.
|
||||
* [method@Gio.AppInfo.launch_uris] instead.
|
||||
*
|
||||
* The launched application inherits the environment of the launching
|
||||
* process, but it can be modified with g_app_launch_context_setenv()
|
||||
* and g_app_launch_context_unsetenv().
|
||||
* process, but it can be modified with [method@Gio.AppLaunchContext.setenv]
|
||||
* and [method@Gio.AppLaunchContext.unsetenv].
|
||||
*
|
||||
* On UNIX, this function sets the `GIO_LAUNCHED_DESKTOP_FILE`
|
||||
* environment variable with the path of the launched desktop file and
|
||||
@ -585,7 +583,7 @@ g_app_info_get_icon (GAppInfo *appinfo)
|
||||
* `XDG_ACTIVATION_TOKEN` and `DESKTOP_STARTUP_ID` environment
|
||||
* variables are also set, based on information provided in @context.
|
||||
*
|
||||
* Returns: %TRUE on successful launch, %FALSE otherwise.
|
||||
* Returns: `TRUE` on successful launch, `FALSE` otherwise.
|
||||
**/
|
||||
gboolean
|
||||
g_app_info_launch (GAppInfo *appinfo,
|
||||
@ -605,11 +603,11 @@ g_app_info_launch (GAppInfo *appinfo,
|
||||
|
||||
/**
|
||||
* g_app_info_supports_uris:
|
||||
* @appinfo: a #GAppInfo.
|
||||
* @appinfo: the app info
|
||||
*
|
||||
* Checks if the application supports reading files and directories from URIs.
|
||||
*
|
||||
* Returns: %TRUE if the @appinfo supports URIs.
|
||||
* Returns: `TRUE` if the @appinfo supports URIs.
|
||||
**/
|
||||
gboolean
|
||||
g_app_info_supports_uris (GAppInfo *appinfo)
|
||||
@ -626,11 +624,11 @@ g_app_info_supports_uris (GAppInfo *appinfo)
|
||||
|
||||
/**
|
||||
* g_app_info_supports_files:
|
||||
* @appinfo: a #GAppInfo.
|
||||
* @appinfo: the app info
|
||||
*
|
||||
* Checks if the application accepts files as arguments.
|
||||
*
|
||||
* Returns: %TRUE if the @appinfo supports files.
|
||||
* Returns: `TRUE` if the @appinfo supports files.
|
||||
**/
|
||||
gboolean
|
||||
g_app_info_supports_files (GAppInfo *appinfo)
|
||||
@ -647,10 +645,9 @@ g_app_info_supports_files (GAppInfo *appinfo)
|
||||
|
||||
/**
|
||||
* g_app_info_launch_uris:
|
||||
* @appinfo: a #GAppInfo
|
||||
* @uris: (nullable) (element-type utf8): a #GList containing URIs to launch.
|
||||
* @context: (nullable): a #GAppLaunchContext or %NULL
|
||||
* @error: a #GError
|
||||
* @appinfo: the app info
|
||||
* @uris: (nullable) (element-type utf8): a list of URIs to launch.
|
||||
* @context: (nullable): the launch context
|
||||
*
|
||||
* Launches the application. This passes the @uris to the launched application
|
||||
* as arguments, using the optional @context to get information
|
||||
@ -659,13 +656,13 @@ g_app_info_supports_files (GAppInfo *appinfo)
|
||||
* one URI per invocation as part of their command-line, multiple instances
|
||||
* of the application will be spawned.
|
||||
*
|
||||
* To launch the application without arguments pass a %NULL @uris list.
|
||||
* To launch the application without arguments pass a `NULL` @uris list.
|
||||
*
|
||||
* Note that even if the launch is successful the application launched
|
||||
* can fail to start if it runs into problems during startup. There is
|
||||
* no way to detect this.
|
||||
*
|
||||
* Returns: %TRUE on successful launch, %FALSE otherwise.
|
||||
* Returns: `TRUE` on successful launch, `FALSE` otherwise.
|
||||
**/
|
||||
gboolean
|
||||
g_app_info_launch_uris (GAppInfo *appinfo,
|
||||
@ -684,19 +681,20 @@ g_app_info_launch_uris (GAppInfo *appinfo,
|
||||
|
||||
/**
|
||||
* g_app_info_launch_uris_async:
|
||||
* @appinfo: a #GAppInfo
|
||||
* @uris: (nullable) (element-type utf8): a #GList containing URIs to launch.
|
||||
* @context: (nullable): a #GAppLaunchContext or %NULL
|
||||
* @cancellable: (nullable): a #GCancellable
|
||||
* @callback: (nullable): a #GAsyncReadyCallback to call when the request is done
|
||||
* @appinfo: the app info
|
||||
* @uris: (nullable) (element-type utf8): a list of URIs to launch.
|
||||
* @context: (nullable): the launch context
|
||||
* @cancellable: (nullable): a [class@Gio.Cancellable]
|
||||
* @callback: (scope async) (nullable): a [type@Gio.AsyncReadyCallback] to call
|
||||
* when the request is done
|
||||
* @user_data: (nullable): data to pass to @callback
|
||||
*
|
||||
* Async version of g_app_info_launch_uris().
|
||||
* Async version of [method@Gio.AppInfo.launch_uris].
|
||||
*
|
||||
* The @callback is invoked immediately after the application launch, but it
|
||||
* waits for activation in case of D-Bus–activated applications and also provides
|
||||
* extended error information for sandboxed applications, see notes for
|
||||
* g_app_info_launch_default_for_uri_async().
|
||||
* [func@Gio.AppInfo.launch_default_for_uri_async].
|
||||
*
|
||||
* Since: 2.60
|
||||
**/
|
||||
@ -733,13 +731,12 @@ g_app_info_launch_uris_async (GAppInfo *appinfo,
|
||||
|
||||
/**
|
||||
* g_app_info_launch_uris_finish:
|
||||
* @appinfo: a #GAppInfo
|
||||
* @result: a #GAsyncResult
|
||||
* @error: (nullable): a #GError
|
||||
* @appinfo: the app info
|
||||
* @result: the async result
|
||||
*
|
||||
* Finishes a g_app_info_launch_uris_async() operation.
|
||||
* Finishes a [method@Gio.AppInfo.launch_uris_async] operation.
|
||||
*
|
||||
* Returns: %TRUE on successful launch, %FALSE otherwise.
|
||||
* Returns: `TRUE` on successful launch, `FALSE` otherwise.
|
||||
*
|
||||
* Since: 2.60
|
||||
*/
|
||||
@ -765,12 +762,12 @@ g_app_info_launch_uris_finish (GAppInfo *appinfo,
|
||||
|
||||
/**
|
||||
* g_app_info_should_show:
|
||||
* @appinfo: a #GAppInfo.
|
||||
* @appinfo: the app info
|
||||
*
|
||||
* Checks if the application info should be shown in menus that
|
||||
* list available applications.
|
||||
*
|
||||
* Returns: %TRUE if the @appinfo should be shown, %FALSE otherwise.
|
||||
* Returns: `TRUE` if the @appinfo should be shown, `FALSE` otherwise.
|
||||
**/
|
||||
gboolean
|
||||
g_app_info_should_show (GAppInfo *appinfo)
|
||||
@ -821,14 +818,16 @@ get_default_for_type_thread (GTask *task,
|
||||
|
||||
/**
|
||||
* g_app_info_get_default_for_type_async:
|
||||
* @content_type: the content type to find a #GAppInfo for
|
||||
* @must_support_uris: if %TRUE, the #GAppInfo is expected to
|
||||
* support URIs
|
||||
* @cancellable: optional #GCancellable object, %NULL to ignore
|
||||
* @callback: (nullable): a #GAsyncReadyCallback to call when the request is done
|
||||
* @content_type: the content type to find a [iface@Gio.AppInfo] for
|
||||
* @must_support_uris: if `TRUE`, the [iface@Gio.AppInfo] is expected to
|
||||
* support URIs
|
||||
* @cancellable: (nullable): a [class@Gio.Cancellable]
|
||||
* @callback: (scope async) (nullable): a [type@Gio.AsyncReadyCallback] to call
|
||||
* when the request is done
|
||||
* @user_data: (nullable): data to pass to @callback
|
||||
*
|
||||
* Asynchronously gets the default #GAppInfo for a given content type.
|
||||
* Asynchronously gets the default [iface@Gio.AppInfo] for a given content
|
||||
* type.
|
||||
*
|
||||
* Since: 2.74
|
||||
*/
|
||||
@ -882,14 +881,15 @@ get_default_for_scheme_thread (GTask *task,
|
||||
/**
|
||||
* g_app_info_get_default_for_uri_scheme_async:
|
||||
* @uri_scheme: a string containing a URI scheme.
|
||||
* @cancellable: optional #GCancellable object, %NULL to ignore
|
||||
* @callback: (nullable): a #GAsyncReadyCallback to call when the request is done
|
||||
* @cancellable: (nullable): a [class@Gio.Cancellable]
|
||||
* @callback: (scope async) (nullable): a [type@Gio.AsyncReadyCallback] to call
|
||||
* when the request is done
|
||||
* @user_data: (nullable): data to pass to @callback
|
||||
*
|
||||
* Asynchronously gets the default application for handling URIs with
|
||||
* the given URI scheme. A URI scheme is the initial part
|
||||
* of the URI, up to but not including the ':', e.g. "http",
|
||||
* "ftp" or "sip".
|
||||
* of the URI, up to but not including the `:`, e.g. `http`,
|
||||
* `ftp` or `sip`.
|
||||
*
|
||||
* Since: 2.74
|
||||
*/
|
||||
@ -914,16 +914,16 @@ g_app_info_get_default_for_uri_scheme_async (const char *uri_scheme,
|
||||
|
||||
/**
|
||||
* g_app_info_get_default_for_uri_scheme_finish:
|
||||
* @result: a #GAsyncResult
|
||||
* @error: (nullable): a #GError
|
||||
* @result: the async result
|
||||
*
|
||||
* Finishes a default #GAppInfo lookup started by
|
||||
* g_app_info_get_default_for_uri_scheme_async().
|
||||
* Finishes a default [iface@Gio.AppInfo] lookup started by
|
||||
* [func@Gio.AppInfo.get_default_for_uri_scheme_async].
|
||||
*
|
||||
* If no #GAppInfo is found, then @error will be set to %G_IO_ERROR_NOT_FOUND.
|
||||
* If no [iface@Gio.AppInfo] is found, then @error will be set to
|
||||
* [error@Gio.IOErrorEnum.NOT_FOUND].
|
||||
*
|
||||
* Returns: (transfer full): #GAppInfo for given @uri_scheme or
|
||||
* %NULL on error.
|
||||
* Returns: (transfer full): [iface@Gio.AppInfo] for given @uri_scheme or
|
||||
* `NULL` on error.
|
||||
*
|
||||
* Since: 2.74
|
||||
*/
|
||||
@ -941,16 +941,16 @@ g_app_info_get_default_for_uri_scheme_finish (GAsyncResult *result,
|
||||
|
||||
/**
|
||||
* g_app_info_get_default_for_type_finish:
|
||||
* @result: a #GAsyncResult
|
||||
* @error: (nullable): a #GError
|
||||
* @result: the async result
|
||||
*
|
||||
* Finishes a default #GAppInfo lookup started by
|
||||
* g_app_info_get_default_for_type_async().
|
||||
* Finishes a default [iface@Gio.AppInfo] lookup started by
|
||||
* [func@Gio.AppInfo.get_default_for_type_async].
|
||||
*
|
||||
* If no #GAppInfo is found, then @error will be set to %G_IO_ERROR_NOT_FOUND.
|
||||
* If no #[iface@Gio.AppInfo] is found, then @error will be set to
|
||||
* [error@Gio.IOErrorEnum.NOT_FOUND].
|
||||
*
|
||||
* Returns: (transfer full): #GAppInfo for given @content_type or
|
||||
* %NULL on error.
|
||||
* Returns: (transfer full): [iface@Gio.AppInfo] for given @content_type or
|
||||
* `NULL` on error.
|
||||
*
|
||||
* Since: 2.74
|
||||
*/
|
||||
@ -969,19 +969,17 @@ g_app_info_get_default_for_type_finish (GAsyncResult *result,
|
||||
/**
|
||||
* g_app_info_launch_default_for_uri:
|
||||
* @uri: the uri to show
|
||||
* @context: (nullable): an optional #GAppLaunchContext
|
||||
* @error: (nullable): return location for an error, or %NULL
|
||||
* @context: (nullable): optional launch context
|
||||
*
|
||||
* Utility function that launches the default application
|
||||
* registered to handle the specified uri. Synchronous I/O
|
||||
* is done on the uri to detect the type of the file if
|
||||
* required.
|
||||
* Utility function that launches the default application registered to handle
|
||||
* the specified uri. Synchronous I/O is done on the uri to detect the type of
|
||||
* the file if required.
|
||||
*
|
||||
* The D-Bus–activated applications don't have to be started if your application
|
||||
* The D-Bus–activated applications don’t have to be started if your application
|
||||
* terminates too soon after this function. To prevent this, use
|
||||
* g_app_info_launch_default_for_uri_async() instead.
|
||||
* [func@Gio.AppInfo.launch_default_for_uri_async] instead.
|
||||
*
|
||||
* Returns: %TRUE on success, %FALSE on error.
|
||||
* Returns: `TRUE` on success, `FALSE` on error.
|
||||
**/
|
||||
gboolean
|
||||
g_app_info_launch_default_for_uri (const char *uri,
|
||||
@ -1197,17 +1195,17 @@ launch_default_app_for_uri_cb (GObject *object,
|
||||
/**
|
||||
* g_app_info_launch_default_for_uri_async:
|
||||
* @uri: the uri to show
|
||||
* @context: (nullable): an optional #GAppLaunchContext
|
||||
* @cancellable: (nullable): a #GCancellable
|
||||
* @callback: (nullable): a #GAsyncReadyCallback to call when the request is done
|
||||
* @context: (nullable): optional launch context
|
||||
* @cancellable: (nullable): a [class@Gio.Cancellable]
|
||||
* @callback: (scope async) (nullable): a [type@Gio.AsyncReadyCallback] to call
|
||||
* when the request is done
|
||||
* @user_data: (nullable): data to pass to @callback
|
||||
*
|
||||
* Async version of g_app_info_launch_default_for_uri().
|
||||
* Async version of [func@Gio.AppInfo.launch_default_for_uri].
|
||||
*
|
||||
* This version is useful if you are interested in receiving
|
||||
* error information in the case where the application is
|
||||
* sandboxed and the portal may present an application chooser
|
||||
* dialog to the user.
|
||||
* This version is useful if you are interested in receiving error information
|
||||
* in the case where the application is sandboxed and the portal may present an
|
||||
* application chooser dialog to the user.
|
||||
*
|
||||
* This is also useful if you want to be sure that the D-Bus–activated
|
||||
* applications are really started before termination and if you are interested
|
||||
@ -1258,12 +1256,11 @@ g_app_info_launch_default_for_uri_async (const char *uri,
|
||||
|
||||
/**
|
||||
* g_app_info_launch_default_for_uri_finish:
|
||||
* @result: a #GAsyncResult
|
||||
* @error: (nullable): return location for an error, or %NULL
|
||||
* @result: the async result
|
||||
*
|
||||
* Finishes an asynchronous launch-default-for-uri operation.
|
||||
*
|
||||
* Returns: %TRUE if the launch was successful, %FALSE if @error is set
|
||||
* Returns: `TRUE` if the launch was successful, `FALSE` if @error is set
|
||||
*
|
||||
* Since: 2.50
|
||||
*/
|
||||
@ -1278,12 +1275,12 @@ g_app_info_launch_default_for_uri_finish (GAsyncResult *result,
|
||||
|
||||
/**
|
||||
* g_app_info_can_delete:
|
||||
* @appinfo: a #GAppInfo
|
||||
* @appinfo: the app info
|
||||
*
|
||||
* Obtains the information whether the #GAppInfo can be deleted.
|
||||
* See g_app_info_delete().
|
||||
* Obtains the information whether the [iface@Gio.AppInfo] can be deleted.
|
||||
* See [method@Gio.AppInfo.delete].
|
||||
*
|
||||
* Returns: %TRUE if @appinfo can be deleted
|
||||
* Returns: `TRUE` if @appinfo can be deleted
|
||||
*
|
||||
* Since: 2.20
|
||||
*/
|
||||
@ -1305,15 +1302,15 @@ g_app_info_can_delete (GAppInfo *appinfo)
|
||||
|
||||
/**
|
||||
* g_app_info_delete: (virtual do_delete)
|
||||
* @appinfo: a #GAppInfo
|
||||
* @appinfo: the app info
|
||||
*
|
||||
* Tries to delete a #GAppInfo.
|
||||
* Tries to delete a [iface@Gio.AppInfo].
|
||||
*
|
||||
* On some platforms, there may be a difference between user-defined
|
||||
* #GAppInfos which can be deleted, and system-wide ones which cannot.
|
||||
* See g_app_info_can_delete().
|
||||
* [iface@Gio.AppInfo]s which can be deleted, and system-wide ones which cannot.
|
||||
* See [method@Gio.AppInfo.can_delete].
|
||||
*
|
||||
* Returns: %TRUE if @appinfo has been deleted
|
||||
* Returns: `TRUE` if @appinfo has been deleted
|
||||
*
|
||||
* Since: 2.20
|
||||
*/
|
||||
@ -1348,9 +1345,10 @@ G_DEFINE_TYPE_WITH_PRIVATE (GAppLaunchContext, g_app_launch_context, G_TYPE_OBJE
|
||||
* g_app_launch_context_new:
|
||||
*
|
||||
* Creates a new application launch context. This is not normally used,
|
||||
* instead you instantiate a subclass of this, such as #GdkAppLaunchContext.
|
||||
* instead you instantiate a subclass of this, such as
|
||||
* [`GdkAppLaunchContext`](https://docs.gtk.org/gdk4/class.AppLaunchContext.html).
|
||||
*
|
||||
* Returns: a #GAppLaunchContext.
|
||||
* Returns: a launch context.
|
||||
**/
|
||||
GAppLaunchContext *
|
||||
g_app_launch_context_new (void)
|
||||
@ -1380,9 +1378,9 @@ g_app_launch_context_class_init (GAppLaunchContextClass *klass)
|
||||
* @context: the object emitting the signal
|
||||
* @startup_notify_id: the startup notification id for the failed launch
|
||||
*
|
||||
* The #GAppLaunchContext::launch-failed signal is emitted when a #GAppInfo launch
|
||||
* fails. The startup notification id is provided, so that the launcher
|
||||
* can cancel the startup notification.
|
||||
* The [signal@Gio.AppLaunchContext::launch-failed] signal is emitted when a
|
||||
* [iface@Gio.AppInfo] launch fails. The startup notification id is provided,
|
||||
* so that the launcher can cancel the startup notification.
|
||||
*
|
||||
* Because a launch operation may involve spawning multiple instances of the
|
||||
* target application, you should expect this signal to be emitted multiple
|
||||
@ -1400,14 +1398,14 @@ g_app_launch_context_class_init (GAppLaunchContextClass *klass)
|
||||
/**
|
||||
* GAppLaunchContext::launch-started:
|
||||
* @context: the object emitting the signal
|
||||
* @info: the #GAppInfo that is about to be launched
|
||||
* @info: the [iface@Gio.AppInfo] that is about to be launched
|
||||
* @platform_data: (nullable): additional platform-specific data for this launch
|
||||
*
|
||||
* The #GAppLaunchContext::launch-started signal is emitted when a #GAppInfo is
|
||||
* about to be launched. If non-null the @platform_data is an
|
||||
* GVariant dictionary mapping strings to variants (ie `a{sv}`), which
|
||||
* contains additional, platform-specific data about this launch. On
|
||||
* UNIX, at least the `startup-notification-id` keys will be
|
||||
* The [signal@Gio.AppLaunchContext::launch-started] signal is emitted when a
|
||||
* [iface@Gio.AppInfo] is about to be launched. If non-null the
|
||||
* @platform_data is an GVariant dictionary mapping strings to variants
|
||||
* (ie `a{sv}`), which contains additional, platform-specific data about this
|
||||
* launch. On UNIX, at least the `startup-notification-id` keys will be
|
||||
* present.
|
||||
*
|
||||
* The value of the `startup-notification-id` key (type `s`) is a startup
|
||||
@ -1415,8 +1413,9 @@ g_app_launch_context_class_init (GAppLaunchContextClass *klass)
|
||||
* specification](https://specifications.freedesktop.org/startup-notification-spec/startup-notification-0.1.txt).
|
||||
* It allows tracking the progress of the launchee through startup.
|
||||
*
|
||||
* It is guaranteed that this signal is followed by either a #GAppLaunchContext::launched or
|
||||
* #GAppLaunchContext::launch-failed signal.
|
||||
* It is guaranteed that this signal is followed by either a
|
||||
* [signal@Gio.AppLaunchContext::launched] or
|
||||
* [signal@Gio.AppLaunchContext::launch-failed] signal.
|
||||
*
|
||||
* Because a launch operation may involve spawning multiple instances of the
|
||||
* target application, you should expect this signal to be emitted multiple
|
||||
@ -1439,11 +1438,11 @@ g_app_launch_context_class_init (GAppLaunchContextClass *klass)
|
||||
/**
|
||||
* GAppLaunchContext::launched:
|
||||
* @context: the object emitting the signal
|
||||
* @info: the #GAppInfo that was just launched
|
||||
* @info: the [iface@Gio.AppInfo] that was just launched
|
||||
* @platform_data: additional platform-specific data for this launch
|
||||
*
|
||||
* The #GAppLaunchContext::launched signal is emitted when a #GAppInfo is successfully
|
||||
* launched.
|
||||
* The [signal@Gio.AppLaunchContext::launched] signal is emitted when a
|
||||
* [iface@Gio.AppInfo] is successfully launched.
|
||||
*
|
||||
* Because a launch operation may involve spawning multiple instances of the
|
||||
* target application, you should expect this signal to be emitted multiple
|
||||
@ -1454,14 +1453,15 @@ g_app_launch_context_class_init (GAppLaunchContextClass *klass)
|
||||
* platform-specific data about this launch. On UNIX, at least the
|
||||
* `pid` and `startup-notification-id` keys will be present.
|
||||
*
|
||||
* Since 2.72 the `pid` may be 0 if the process id wasn't known (for
|
||||
* Since 2.72 the `pid` may be 0 if the process id wasn’t known (for
|
||||
* example if the process was launched via D-Bus). The `pid` may not be
|
||||
* set at all in subsequent releases.
|
||||
*
|
||||
* On Windows, `pid` is guaranteed to be valid only for the duration of the
|
||||
* #GAppLaunchContext::launched signal emission; after the signal is emitted,
|
||||
* GLib will call g_spawn_close_pid(). If you need to keep the #GPid after the
|
||||
* signal has been emitted, then you can duplicate `pid` using `DuplicateHandle()`.
|
||||
* [signal@Gio.AppLaunchContext::launched] signal emission; after the signal
|
||||
* is emitted, GLib will call [func@GLib.spawn_close_pid]. If you need to
|
||||
* keep the [alias@GLib.Pid] after the signal has been emitted, then you can
|
||||
* duplicate `pid` using `DuplicateHandle()`.
|
||||
*
|
||||
* Since: 2.36
|
||||
*/
|
||||
@ -1486,12 +1486,12 @@ g_app_launch_context_init (GAppLaunchContext *context)
|
||||
|
||||
/**
|
||||
* g_app_launch_context_setenv:
|
||||
* @context: a #GAppLaunchContext
|
||||
* @context: the launch context
|
||||
* @variable: (type filename): the environment variable to set
|
||||
* @value: (type filename): the value for to set the variable to.
|
||||
*
|
||||
* Arranges for @variable to be set to @value in the child's
|
||||
* environment when @context is used to launch an application.
|
||||
* Arranges for @variable to be set to @value in the child’s environment when
|
||||
* @context is used to launch an application.
|
||||
*
|
||||
* Since: 2.32
|
||||
*/
|
||||
@ -1513,11 +1513,11 @@ g_app_launch_context_setenv (GAppLaunchContext *context,
|
||||
|
||||
/**
|
||||
* g_app_launch_context_unsetenv:
|
||||
* @context: a #GAppLaunchContext
|
||||
* @context: the launch context
|
||||
* @variable: (type filename): the environment variable to remove
|
||||
*
|
||||
* Arranges for @variable to be unset in the child's environment
|
||||
* when @context is used to launch an application.
|
||||
* Arranges for @variable to be unset in the child’s environment when @context
|
||||
* is used to launch an application.
|
||||
*
|
||||
* Since: 2.32
|
||||
*/
|
||||
@ -1537,15 +1537,15 @@ g_app_launch_context_unsetenv (GAppLaunchContext *context,
|
||||
|
||||
/**
|
||||
* g_app_launch_context_get_environment:
|
||||
* @context: a #GAppLaunchContext
|
||||
* @context: the launch context
|
||||
*
|
||||
* Gets the complete environment variable list to be passed to
|
||||
* the child process when @context is used to launch an application.
|
||||
* This is a %NULL-terminated array of strings, where each string has
|
||||
* This is a `NULL`-terminated array of strings, where each string has
|
||||
* the form `KEY=VALUE`.
|
||||
*
|
||||
* Returns: (array zero-terminated=1) (element-type filename) (transfer full):
|
||||
* the child's environment
|
||||
* the child’s environment
|
||||
*
|
||||
* Since: 2.32
|
||||
*/
|
||||
@ -1562,9 +1562,9 @@ g_app_launch_context_get_environment (GAppLaunchContext *context)
|
||||
|
||||
/**
|
||||
* g_app_launch_context_get_display:
|
||||
* @context: a #GAppLaunchContext
|
||||
* @info: a #GAppInfo
|
||||
* @files: (element-type GFile): a #GList of #GFile objects
|
||||
* @context: the launch context
|
||||
* @info: the app info
|
||||
* @files: (element-type GFile): a list of [iface@Gio.File] objects
|
||||
*
|
||||
* Gets the display string for the @context. This is used to ensure new
|
||||
* applications are started on the same display as the launching
|
||||
@ -1592,9 +1592,9 @@ g_app_launch_context_get_display (GAppLaunchContext *context,
|
||||
|
||||
/**
|
||||
* g_app_launch_context_get_startup_notify_id:
|
||||
* @context: a #GAppLaunchContext
|
||||
* @info: a #GAppInfo
|
||||
* @files: (element-type GFile): a #GList of #GFile objects
|
||||
* @context: the launch context
|
||||
* @info: the app info
|
||||
* @files: (element-type GFile): list of [iface@Gio.File] objects
|
||||
*
|
||||
* Initiates startup notification for the application and returns the
|
||||
* `XDG_ACTIVATION_TOKEN` or `DESKTOP_STARTUP_ID` for the launched operation,
|
||||
@ -1610,8 +1610,8 @@ g_app_launch_context_get_display (GAppLaunchContext *context,
|
||||
*
|
||||
* Support for the XDG Activation Protocol was added in GLib 2.76.
|
||||
*
|
||||
* Returns: (nullable): a startup notification ID for the application, or %NULL if
|
||||
* not supported.
|
||||
* Returns: (nullable): a startup notification ID for the application, or `NULL` if
|
||||
* not supported.
|
||||
**/
|
||||
char *
|
||||
g_app_launch_context_get_startup_notify_id (GAppLaunchContext *context,
|
||||
@ -1634,11 +1634,13 @@ g_app_launch_context_get_startup_notify_id (GAppLaunchContext *context,
|
||||
|
||||
/**
|
||||
* g_app_launch_context_launch_failed:
|
||||
* @context: a #GAppLaunchContext.
|
||||
* @startup_notify_id: the startup notification id that was returned by g_app_launch_context_get_startup_notify_id().
|
||||
* @context: the launch context
|
||||
* @startup_notify_id: the startup notification id that was returned by
|
||||
* [method@Gio.AppLaunchContext.get_startup_notify_id].
|
||||
*
|
||||
* Called when an application has failed to launch, so that it can cancel
|
||||
* the application startup notification started in g_app_launch_context_get_startup_notify_id().
|
||||
* the application startup notification started in
|
||||
* [method@Gio.AppLaunchContext.get_startup_notify_id].
|
||||
*
|
||||
**/
|
||||
void
|
||||
@ -1756,7 +1758,7 @@ g_app_info_monitor_class_init (GAppInfoMonitorClass *class)
|
||||
* Gets the #GAppInfoMonitor for the current thread-default main
|
||||
* context.
|
||||
*
|
||||
* The #GAppInfoMonitor will emit a "changed" signal in the
|
||||
* The #GAppInfoMonitor will emit a “changed” signal in the
|
||||
* thread-default main context whenever the list of installed
|
||||
* applications (as reported by g_app_info_get_all()) may have changed.
|
||||
*
|
||||
|
@ -49,32 +49,47 @@ typedef struct _GAppLaunchContextPrivate GAppLaunchContextPrivate;
|
||||
/**
|
||||
* GAppInfoIface:
|
||||
* @g_iface: The parent interface.
|
||||
* @dup: Copies a #GAppInfo.
|
||||
* @equal: Checks two #GAppInfos for equality.
|
||||
* @get_id: Gets a string identifier for a #GAppInfo.
|
||||
* @get_name: Gets the name of the application for a #GAppInfo.
|
||||
* @get_description: Gets a short description for the application described by the #GAppInfo.
|
||||
* @get_executable: Gets the executable name for the #GAppInfo.
|
||||
* @get_icon: Gets the #GIcon for the #GAppInfo.
|
||||
* @launch: Launches an application specified by the #GAppInfo.
|
||||
* @supports_uris: Indicates whether the application specified supports launching URIs.
|
||||
* @supports_files: Indicates whether the application specified accepts filename arguments.
|
||||
* @dup: Copies a [iface@Gio.AppInfo].
|
||||
* @equal: Checks two [iface@Gio.AppInfo]s for equality.
|
||||
* @get_id: Gets a string identifier for a [iface@Gio.AppInfo].
|
||||
* @get_name: Gets the name of the application for a [iface@Gio.AppInfo].
|
||||
* @get_description: Gets a short description for the application described by
|
||||
* the [iface@Gio.AppInfo].
|
||||
* @get_executable: Gets the executable name for the [iface@Gio.AppInfo].
|
||||
* @get_icon: Gets the [iface@Gio.Icon] for the [iface@Gio.AppInfo].
|
||||
* @launch: Launches an application specified by the [iface@Gio.AppInfo].
|
||||
* @supports_uris: Indicates whether the application specified supports
|
||||
* launching URIs.
|
||||
* @supports_files: Indicates whether the application specified accepts
|
||||
* filename arguments.
|
||||
* @launch_uris: Launches an application with a list of URIs.
|
||||
* @should_show: Returns whether an application should be shown (e.g. when getting a list of installed applications).
|
||||
* [FreeDesktop.Org Startup Notification Specification](http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt).
|
||||
* @set_as_default_for_type: Sets an application as default for a given content type.
|
||||
* @set_as_default_for_extension: Sets an application as default for a given file extension.
|
||||
* @add_supports_type: Adds to the #GAppInfo information about supported file types.
|
||||
* @can_remove_supports_type: Checks for support for removing supported file types from a #GAppInfo.
|
||||
* @remove_supports_type: Removes a supported application type from a #GAppInfo.
|
||||
* @can_delete: Checks if a #GAppInfo can be deleted. Since 2.20
|
||||
* @do_delete: Deletes a #GAppInfo. Since 2.20
|
||||
* @get_commandline: Gets the commandline for the #GAppInfo. Since 2.20
|
||||
* @get_display_name: Gets the display name for the #GAppInfo. Since 2.24
|
||||
* @set_as_last_used_for_type: Sets the application as the last used. See g_app_info_set_as_last_used_for_type().
|
||||
* @get_supported_types: Retrieves the list of content types that @app_info claims to support.
|
||||
* @launch_uris_async: Asynchronously launches an application with a list of URIs. (Since: 2.60)
|
||||
* @launch_uris_finish: Finishes an operation started with @launch_uris_async. (Since: 2.60)
|
||||
* @should_show: Returns whether an application should be shown (e.g. when
|
||||
* getting a list of installed applications).
|
||||
* [FreeDesktop.Org Startup Notification Specification](http://standards.freedesktop.org/startup-notification-spec/startup-notification-latest.txt).
|
||||
* @set_as_default_for_type: Sets an application as default for a given content
|
||||
* type.
|
||||
* @set_as_default_for_extension: Sets an application as default for a given
|
||||
* file extension.
|
||||
* @add_supports_type: Adds to the [iface@Gio.AppInfo] information about
|
||||
* supported file types.
|
||||
* @can_remove_supports_type: Checks for support for removing supported file
|
||||
* types from a [iface@Gio.AppInfo].
|
||||
* @remove_supports_type: Removes a supported application type from a
|
||||
* [iface@Gio.AppInfo].
|
||||
* @can_delete: Checks if a [iface@Gio.AppInfo] can be deleted. (Since 2.20)
|
||||
* @do_delete: Deletes a [iface@Gio.AppInfo]. (Since 2.20)
|
||||
* @get_commandline: Gets the commandline for the [iface@Gio.AppInfo].
|
||||
* (Since 2.20)
|
||||
* @get_display_name: Gets the display name for the [iface@Gio.AppInfo].
|
||||
* (Since 2.24)
|
||||
* @set_as_last_used_for_type: Sets the application as the last used. See
|
||||
* [method@Gio.AppInfo.set_as_last_used_for_type].
|
||||
* @get_supported_types: Retrieves the list of content types that @app_info
|
||||
* claims to support.
|
||||
* @launch_uris_async: Asynchronously launches an application with a list of
|
||||
* URIs. (Since: 2.60)
|
||||
* @launch_uris_finish: Finishes an operation started with @launch_uris_async.
|
||||
* (Since: 2.60)
|
||||
|
||||
* Application Information interface, for operating system portability.
|
||||
*/
|
||||
|
@ -126,9 +126,9 @@ g_async_result_default_init (GAsyncResultInterface *iface)
|
||||
|
||||
/**
|
||||
* g_async_result_get_user_data:
|
||||
* @res: a #GAsyncResult.
|
||||
* @res: a [iface@Gio.AsyncResult].
|
||||
*
|
||||
* Gets the user data from a #GAsyncResult.
|
||||
* Gets the user data from a [iface@Gio.AsyncResult].
|
||||
*
|
||||
* Returns: (transfer full): the user data for @res.
|
||||
**/
|
||||
@ -146,12 +146,12 @@ g_async_result_get_user_data (GAsyncResult *res)
|
||||
|
||||
/**
|
||||
* g_async_result_get_source_object:
|
||||
* @res: a #GAsyncResult
|
||||
* @res: a [iface@Gio.AsyncResult]
|
||||
*
|
||||
* Gets the source object from a #GAsyncResult.
|
||||
* Gets the source object from a [iface@Gio.AsyncResult].
|
||||
*
|
||||
* Returns: (transfer full) (nullable): a new reference to the source
|
||||
* object for the @res, or %NULL if there is none.
|
||||
* object for the @res, or `NULL` if there is none.
|
||||
*/
|
||||
GObject *
|
||||
g_async_result_get_source_object (GAsyncResult *res)
|
||||
@ -167,22 +167,22 @@ g_async_result_get_source_object (GAsyncResult *res)
|
||||
|
||||
/**
|
||||
* g_async_result_legacy_propagate_error:
|
||||
* @res: a #GAsyncResult
|
||||
* @res: a [iface@Gio.AsyncResult]
|
||||
* @error: (out): a location to propagate the error to.
|
||||
*
|
||||
* If @res is a #GSimpleAsyncResult, this is equivalent to
|
||||
* g_simple_async_result_propagate_error(). Otherwise it returns
|
||||
* %FALSE.
|
||||
* If @res is a [class@Gio.SimpleAsyncResult], this is equivalent to
|
||||
* [method@Gio.SimpleAsyncResult.propagate_error]. Otherwise it returns
|
||||
* `FALSE`.
|
||||
*
|
||||
* This can be used for legacy error handling in async *_finish()
|
||||
* wrapper functions that traditionally handled #GSimpleAsyncResult
|
||||
* This can be used for legacy error handling in async `*_finish()`
|
||||
* wrapper functions that traditionally handled [class@Gio.SimpleAsyncResult]
|
||||
* error returns themselves rather than calling into the virtual method.
|
||||
* This should not be used in new code; #GAsyncResult errors that are
|
||||
* This should not be used in new code; [iface@Gio.AsyncResult] errors that are
|
||||
* set by virtual methods should also be extracted by virtual methods,
|
||||
* to enable subclasses to chain up correctly.
|
||||
*
|
||||
* Returns: %TRUE if @error is has been filled in with an error from
|
||||
* @res, %FALSE if not.
|
||||
* Returns: `TRUE` if @error is has been filled in with an error from
|
||||
* @res, `FALSE` if not.
|
||||
*
|
||||
* Since: 2.34
|
||||
**/
|
||||
@ -191,8 +191,8 @@ g_async_result_legacy_propagate_error (GAsyncResult *res,
|
||||
GError **error)
|
||||
{
|
||||
/* This doesn't use a vmethod, because it's only for code that used
|
||||
* to use GSimpleAsyncResult. (But it's a GAsyncResult method so
|
||||
* that callers don't need to worry about GSimpleAsyncResult
|
||||
* to use `GSimpleAsyncResult`. (But it's a `GAsyncResult` method so
|
||||
* that callers don't need to worry about `GSimpleAsyncResult`
|
||||
* deprecation warnings in the future.)
|
||||
*/
|
||||
|
||||
@ -209,13 +209,13 @@ g_async_result_legacy_propagate_error (GAsyncResult *res,
|
||||
|
||||
/**
|
||||
* g_async_result_is_tagged:
|
||||
* @res: a #GAsyncResult
|
||||
* @res: a [iface@Gio.AsyncResult]
|
||||
* @source_tag: an application-defined tag
|
||||
*
|
||||
* Checks if @res has the given @source_tag (generally a function
|
||||
* pointer indicating the function @res was created by).
|
||||
*
|
||||
* Returns: %TRUE if @res has the indicated @source_tag, %FALSE if
|
||||
* Returns: `TRUE` if @res has the indicated @source_tag, `FALSE` if
|
||||
* not.
|
||||
*
|
||||
* Since: 2.34
|
||||
|
@ -46,7 +46,7 @@ typedef struct _GAsyncResultIface GAsyncResultIface;
|
||||
* @get_source_object: Gets the source object that issued the asynchronous operation.
|
||||
* @is_tagged: Checks if a result is tagged with a particular source.
|
||||
*
|
||||
* Interface definition for #GAsyncResult.
|
||||
* Interface definition for [iface@Gio.AsyncResult].
|
||||
**/
|
||||
struct _GAsyncResultIface
|
||||
{
|
||||
|
@ -36,7 +36,7 @@
|
||||
/**
|
||||
* GBufferedInputStream:
|
||||
*
|
||||
* Buffered input stream implements #GFilterInputStream and provides
|
||||
* Buffered input stream implements [class@Gio.FilterInputStream] and provides
|
||||
* for buffered reads.
|
||||
*
|
||||
* By default, `GBufferedInputStream`'s buffer size is set at 4 kilobytes.
|
||||
@ -176,7 +176,7 @@ g_buffered_input_stream_class_init (GBufferedInputStreamClass *klass)
|
||||
|
||||
/**
|
||||
* g_buffered_input_stream_get_buffer_size:
|
||||
* @stream: a #GBufferedInputStream
|
||||
* @stream: a [class@Gio.BufferedInputStream]
|
||||
*
|
||||
* Gets the size of the input buffer.
|
||||
*
|
||||
@ -192,7 +192,7 @@ g_buffered_input_stream_get_buffer_size (GBufferedInputStream *stream)
|
||||
|
||||
/**
|
||||
* g_buffered_input_stream_set_buffer_size:
|
||||
* @stream: a #GBufferedInputStream
|
||||
* @stream: a [class@Gio.BufferedInputStream]
|
||||
* @size: a #gsize
|
||||
*
|
||||
* Sets the size of the internal buffer of @stream to @size, or to the
|
||||
@ -319,12 +319,12 @@ g_buffered_input_stream_init (GBufferedInputStream *stream)
|
||||
|
||||
/**
|
||||
* g_buffered_input_stream_new:
|
||||
* @base_stream: a #GInputStream
|
||||
* @base_stream: a [class@Gio.InputStream]
|
||||
*
|
||||
* Creates a new #GInputStream from the given @base_stream, with
|
||||
* Creates a new [class@Gio.InputStream] from the given @base_stream, with
|
||||
* a buffer set to the default size (4 kilobytes).
|
||||
*
|
||||
* Returns: a #GInputStream for the given @base_stream.
|
||||
* Returns: a [class@Gio.InputStream] for the given @base_stream.
|
||||
*/
|
||||
GInputStream *
|
||||
g_buffered_input_stream_new (GInputStream *base_stream)
|
||||
@ -342,13 +342,13 @@ g_buffered_input_stream_new (GInputStream *base_stream)
|
||||
|
||||
/**
|
||||
* g_buffered_input_stream_new_sized:
|
||||
* @base_stream: a #GInputStream
|
||||
* @base_stream: a [class@Gio.InputStream]
|
||||
* @size: a #gsize
|
||||
*
|
||||
* Creates a new #GBufferedInputStream from the given @base_stream,
|
||||
* Creates a new [class@Gio.BufferedInputStream] from the given @base_stream,
|
||||
* with a buffer set to @size.
|
||||
*
|
||||
* Returns: a #GInputStream.
|
||||
* Returns: a [class@Gio.InputStream].
|
||||
*/
|
||||
GInputStream *
|
||||
g_buffered_input_stream_new_sized (GInputStream *base_stream,
|
||||
@ -368,16 +368,17 @@ g_buffered_input_stream_new_sized (GInputStream *base_stream,
|
||||
|
||||
/**
|
||||
* g_buffered_input_stream_fill:
|
||||
* @stream: a #GBufferedInputStream
|
||||
* @stream: a [class@Gio.BufferedInputStream]
|
||||
* @count: the number of bytes that will be read from the stream
|
||||
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore
|
||||
* @error: location to store the error occurring, or %NULL to ignore
|
||||
* @cancellable: (nullable): optional [class@Gio.Cancellable] object, `NULL` to ignore
|
||||
* @error: location to store the error occurring, or `NULL` to ignore
|
||||
*
|
||||
* Tries to read @count bytes from the stream into the buffer.
|
||||
* Will block during this read.
|
||||
*
|
||||
* If @count is zero, returns zero and does nothing. A value of @count
|
||||
* larger than %G_MAXSSIZE will cause a %G_IO_ERROR_INVALID_ARGUMENT error.
|
||||
* larger than `G_MAXSSIZE` will cause a
|
||||
* [error@Gio.IOErrorEnum.INVALID_ARGUMENT] error.
|
||||
*
|
||||
* On success, the number of bytes read into the buffer is returned.
|
||||
* It is not an error if this is not the same as the requested size, as it
|
||||
@ -387,19 +388,19 @@ g_buffered_input_stream_new_sized (GInputStream *base_stream,
|
||||
* If @count is -1 then the attempted read size is equal to the number of
|
||||
* bytes that are required to fill the buffer.
|
||||
*
|
||||
* If @cancellable is not %NULL, then the operation can be cancelled by
|
||||
* If @cancellable is not `NULL`, then the operation can be cancelled by
|
||||
* triggering the cancellable object from another thread. If the operation
|
||||
* was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
|
||||
* operation was partially finished when the operation was cancelled the
|
||||
* was cancelled, the error [error@Gio.IOErrorEnum.CANCELLED] will be returned.
|
||||
* If an operation was partially finished when the operation was cancelled the
|
||||
* partial result will be returned, without an error.
|
||||
*
|
||||
* On error -1 is returned and @error is set accordingly.
|
||||
* On error `-1` is returned and @error is set accordingly.
|
||||
*
|
||||
* For the asynchronous, non-blocking, version of this function, see
|
||||
* g_buffered_input_stream_fill_async().
|
||||
* [method@Gio.BufferedInputStream.fill_async].
|
||||
*
|
||||
* Returns: the number of bytes read into @stream's buffer, up to @count,
|
||||
* or -1 on error.
|
||||
* or `-1` on error.
|
||||
*/
|
||||
gssize
|
||||
g_buffered_input_stream_fill (GBufferedInputStream *stream,
|
||||
@ -453,18 +454,18 @@ async_fill_callback_wrapper (GObject *source_object,
|
||||
|
||||
/**
|
||||
* g_buffered_input_stream_fill_async:
|
||||
* @stream: a #GBufferedInputStream
|
||||
* @stream: a [class@Gio.BufferedInputStream]
|
||||
* @count: the number of bytes that will be read from the stream
|
||||
* @io_priority: the [I/O priority](iface.AsyncResult.html#io-priority) of the request
|
||||
* @cancellable: (nullable): optional #GCancellable object
|
||||
* @callback: (scope async) (closure user_data): a #GAsyncReadyCallback
|
||||
* @cancellable: (nullable): optional [class@Gio.Cancellable] object
|
||||
* @callback: (scope async) (closure user_data): a [callback@Gio.AsyncReadyCallback]
|
||||
* @user_data: a #gpointer
|
||||
*
|
||||
* Reads data into @stream's buffer asynchronously, up to @count size.
|
||||
* @io_priority can be used to prioritize reads. For the synchronous
|
||||
* version of this function, see g_buffered_input_stream_fill().
|
||||
* version of this function, see [method@Gio.BufferedInputStream.fill].
|
||||
*
|
||||
* If @count is -1 then the attempted read size is equal to the number
|
||||
* If @count is `-1` then the attempted read size is equal to the number
|
||||
* of bytes that are required to fill the buffer.
|
||||
*/
|
||||
void
|
||||
@ -519,9 +520,9 @@ g_buffered_input_stream_fill_async (GBufferedInputStream *stream,
|
||||
|
||||
/**
|
||||
* g_buffered_input_stream_fill_finish:
|
||||
* @stream: a #GBufferedInputStream
|
||||
* @result: a #GAsyncResult
|
||||
* @error: a #GError
|
||||
* @stream: a [class@Gio.BufferedInputStream]
|
||||
* @result: a [iface@Gio.AsyncResult]
|
||||
* @error: a [type@GLib.Error]
|
||||
*
|
||||
* Finishes an asynchronous read.
|
||||
*
|
||||
@ -548,7 +549,7 @@ g_buffered_input_stream_fill_finish (GBufferedInputStream *stream,
|
||||
|
||||
/**
|
||||
* g_buffered_input_stream_get_available:
|
||||
* @stream: #GBufferedInputStream
|
||||
* @stream: [class@Gio.BufferedInputStream]
|
||||
*
|
||||
* Gets the size of the available data within the stream.
|
||||
*
|
||||
@ -564,7 +565,7 @@ g_buffered_input_stream_get_available (GBufferedInputStream *stream)
|
||||
|
||||
/**
|
||||
* g_buffered_input_stream_peek:
|
||||
* @stream: a #GBufferedInputStream
|
||||
* @stream: a [class@Gio.BufferedInputStream]
|
||||
* @buffer: (array length=count) (element-type guint8): a pointer to
|
||||
* an allocated chunk of memory
|
||||
* @offset: a #gsize
|
||||
@ -573,7 +574,7 @@ g_buffered_input_stream_get_available (GBufferedInputStream *stream)
|
||||
* Peeks in the buffer, copying data of size @count into @buffer,
|
||||
* offset @offset bytes.
|
||||
*
|
||||
* Returns: a #gsize of the number of bytes peeked, or -1 on error.
|
||||
* Returns: a #gsize of the number of bytes peeked, or `-1` on error.
|
||||
*/
|
||||
gsize
|
||||
g_buffered_input_stream_peek (GBufferedInputStream *stream,
|
||||
@ -601,7 +602,7 @@ g_buffered_input_stream_peek (GBufferedInputStream *stream,
|
||||
|
||||
/**
|
||||
* g_buffered_input_stream_peek_buffer:
|
||||
* @stream: a #GBufferedInputStream
|
||||
* @stream: a [class@Gio.BufferedInputStream]
|
||||
* @count: (out): a #gsize to get the number of bytes available in the buffer
|
||||
*
|
||||
* Returns the buffer with the currently available bytes. The returned
|
||||
@ -942,25 +943,25 @@ g_buffered_input_stream_truncate (GSeekable *seekable,
|
||||
|
||||
/**
|
||||
* g_buffered_input_stream_read_byte:
|
||||
* @stream: a #GBufferedInputStream
|
||||
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore
|
||||
* @error: location to store the error occurring, or %NULL to ignore
|
||||
* @stream: a [class@Gio.BufferedInputStream]
|
||||
* @cancellable: (nullable): optional [class@Gio.Cancellable] object, `NULL` to ignore
|
||||
* @error: location to store the error occurring, or `NULL` to ignore
|
||||
*
|
||||
* Tries to read a single byte from the stream or the buffer. Will block
|
||||
* during this read.
|
||||
*
|
||||
* On success, the byte read from the stream is returned. On end of stream
|
||||
* -1 is returned but it's not an exceptional error and @error is not set.
|
||||
* `-1` is returned but it's not an exceptional error and @error is not set.
|
||||
*
|
||||
* If @cancellable is not %NULL, then the operation can be cancelled by
|
||||
* If @cancellable is not `NULL`, then the operation can be cancelled by
|
||||
* triggering the cancellable object from another thread. If the operation
|
||||
* was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
|
||||
* operation was partially finished when the operation was cancelled the
|
||||
* was cancelled, the error [error@Gio.IOErrorEnum.CANCELLED] will be returned.
|
||||
* If an operation was partially finished when the operation was cancelled the
|
||||
* partial result will be returned, without an error.
|
||||
*
|
||||
* On error -1 is returned and @error is set accordingly.
|
||||
* On error `-1` is returned and @error is set accordingly.
|
||||
*
|
||||
* Returns: the byte read from the @stream, or -1 on end of stream or error.
|
||||
* Returns: the byte read from the @stream, or `-1` on end of stream or error.
|
||||
*/
|
||||
int
|
||||
g_buffered_input_stream_read_byte (GBufferedInputStream *stream,
|
||||
|
@ -175,7 +175,7 @@ g_buffered_output_stream_class_init (GBufferedOutputStreamClass *klass)
|
||||
|
||||
/**
|
||||
* g_buffered_output_stream_get_buffer_size:
|
||||
* @stream: a #GBufferedOutputStream.
|
||||
* @stream: a [class@Gio.BufferedOutputStream].
|
||||
*
|
||||
* Gets the size of the buffer in the @stream.
|
||||
*
|
||||
@ -191,7 +191,7 @@ g_buffered_output_stream_get_buffer_size (GBufferedOutputStream *stream)
|
||||
|
||||
/**
|
||||
* g_buffered_output_stream_set_buffer_size:
|
||||
* @stream: a #GBufferedOutputStream.
|
||||
* @stream: a [class@Gio.BufferedOutputStream].
|
||||
* @size: a #gsize.
|
||||
*
|
||||
* Sets the size of the internal buffer to @size.
|
||||
@ -233,12 +233,12 @@ g_buffered_output_stream_set_buffer_size (GBufferedOutputStream *stream,
|
||||
|
||||
/**
|
||||
* g_buffered_output_stream_get_auto_grow:
|
||||
* @stream: a #GBufferedOutputStream.
|
||||
* @stream: a [class@Gio.BufferedOutputStream].
|
||||
*
|
||||
* Checks if the buffer automatically grows as data is added.
|
||||
*
|
||||
* Returns: %TRUE if the @stream's buffer automatically grows,
|
||||
* %FALSE otherwise.
|
||||
* Returns: `TRUE` if the @stream's buffer automatically grows,
|
||||
* `FALSE` otherwise.
|
||||
**/
|
||||
gboolean
|
||||
g_buffered_output_stream_get_auto_grow (GBufferedOutputStream *stream)
|
||||
@ -250,7 +250,7 @@ g_buffered_output_stream_get_auto_grow (GBufferedOutputStream *stream)
|
||||
|
||||
/**
|
||||
* g_buffered_output_stream_set_auto_grow:
|
||||
* @stream: a #GBufferedOutputStream.
|
||||
* @stream: a [class@Gio.BufferedOutputStream].
|
||||
* @auto_grow: a #gboolean.
|
||||
*
|
||||
* Sets whether or not the @stream's buffer should automatically grow.
|
||||
@ -361,11 +361,11 @@ g_buffered_output_stream_seekable_iface_init (GSeekableIface *iface)
|
||||
|
||||
/**
|
||||
* g_buffered_output_stream_new:
|
||||
* @base_stream: a #GOutputStream.
|
||||
* @base_stream: a [class@Gio.OutputStream].
|
||||
*
|
||||
* Creates a new buffered output stream for a base stream.
|
||||
*
|
||||
* Returns: a #GOutputStream for the given @base_stream.
|
||||
* Returns: a [class@Gio.OutputStream] for the given @base_stream.
|
||||
**/
|
||||
GOutputStream *
|
||||
g_buffered_output_stream_new (GOutputStream *base_stream)
|
||||
@ -383,12 +383,12 @@ g_buffered_output_stream_new (GOutputStream *base_stream)
|
||||
|
||||
/**
|
||||
* g_buffered_output_stream_new_sized:
|
||||
* @base_stream: a #GOutputStream.
|
||||
* @base_stream: a [class@Gio.OutputStream].
|
||||
* @size: a #gsize.
|
||||
*
|
||||
* Creates a new buffered output stream with a given buffer size.
|
||||
*
|
||||
* Returns: a #GOutputStream with an internal buffer set to @size.
|
||||
* Returns: a [class@Gio.OutputStream] with an internal buffer set to @size.
|
||||
**/
|
||||
GOutputStream *
|
||||
g_buffered_output_stream_new_sized (GOutputStream *base_stream,
|
||||
|
@ -6,7 +6,6 @@
|
||||
import os
|
||||
import re
|
||||
|
||||
from . import utils
|
||||
import textwrap
|
||||
|
||||
# Disable line length warnings as wrapping the templates would be hard
|
||||
|
@ -5,7 +5,6 @@
|
||||
import os
|
||||
import re
|
||||
|
||||
from . import utils
|
||||
import textwrap
|
||||
|
||||
# Disable line length warnings as wrapping the templates would be hard
|
||||
|
@ -21,9 +21,9 @@
|
||||
#
|
||||
# Author: David Zeuthen <davidz@redhat.com>
|
||||
|
||||
import packaging.version
|
||||
import os
|
||||
import sys
|
||||
import re
|
||||
|
||||
|
||||
# pylint: disable=too-few-public-methods
|
||||
@ -161,11 +161,35 @@ def lookup_brief_docs(annotations):
|
||||
def version_cmp_key(key):
|
||||
# If the 'since' version is 'UNRELEASED', compare higher than anything else
|
||||
# If it is empty put a 0 in its place as this will
|
||||
# allow LooseVersion to work and will always compare lower.
|
||||
# allow _parse_version() to work and will always compare lower.
|
||||
if key[0] == "UNRELEASED":
|
||||
v = "9999"
|
||||
elif key[0]:
|
||||
v = str(key[0])
|
||||
else:
|
||||
v = "0"
|
||||
return (packaging.version.Version(v), key[1])
|
||||
return (_parse_version(v), key[1])
|
||||
|
||||
|
||||
def _parse_version(version):
|
||||
"""
|
||||
Parse a version string into a list of integers and strings.
|
||||
|
||||
This function takes a version string and breaks it down into its component parts.
|
||||
It separates numeric and non-numeric segments, converting numeric segments to integers.
|
||||
|
||||
Args:
|
||||
version (str): The version string to parse.
|
||||
|
||||
Returns:
|
||||
list: A list where each element is either an integer (for numeric parts)
|
||||
or a string (for non-numeric parts).
|
||||
|
||||
Example:
|
||||
>>> parseversion("1.2.3a")
|
||||
[1, 2, 3, 'a']
|
||||
>>> parseversion("2.0.0-rc1")
|
||||
[2, 0, 0, 'rc1']
|
||||
"""
|
||||
blocks = re.findall(r"(\d+|\w+)", version)
|
||||
return [int(b) if b.isdigit() else b for b in blocks]
|
||||
|
@ -4486,17 +4486,18 @@ g_desktop_app_info_get_desktop_ids_for_content_type (const gchar *content_type,
|
||||
|
||||
/**
|
||||
* g_app_info_get_recommended_for_type:
|
||||
* @content_type: the content type to find a #GAppInfo for
|
||||
* @content_type: the content type to find a [iface@Gio.AppInfo] for
|
||||
*
|
||||
* Gets a list of recommended [iface@Gio.AppInfo]s for a given content type,
|
||||
* i.e. those applications which claim to support the given content type
|
||||
* exactly, and not by MIME type subclassing.
|
||||
*
|
||||
* Gets a list of recommended #GAppInfos for a given content type, i.e.
|
||||
* those applications which claim to support the given content type exactly,
|
||||
* and not by MIME type subclassing.
|
||||
* Note that the first application of the list is the last used one, i.e.
|
||||
* the last one for which g_app_info_set_as_last_used_for_type() has been
|
||||
* called.
|
||||
* the last one for which [method@Gio.AppInfo.set_as_last_used_for_type] has
|
||||
* been called.
|
||||
*
|
||||
* Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos
|
||||
* for given @content_type or %NULL on error.
|
||||
* Returns: (element-type GAppInfo) (transfer full): list of
|
||||
* [iface@Gio.AppInfo]s for given @content_type or `NULL` on error.
|
||||
*
|
||||
* Since: 2.28
|
||||
**/
|
||||
@ -4528,14 +4529,14 @@ g_app_info_get_recommended_for_type (const gchar *content_type)
|
||||
|
||||
/**
|
||||
* g_app_info_get_fallback_for_type:
|
||||
* @content_type: the content type to find a #GAppInfo for
|
||||
* @content_type: the content type to find a [iface@Gio.AppInfo] for
|
||||
*
|
||||
* Gets a list of fallback #GAppInfos for a given content type, i.e.
|
||||
* those applications which claim to support the given content type
|
||||
* by MIME type subclassing and not directly.
|
||||
* Gets a list of fallback [iface@Gio.AppInfo]s for a given content type, i.e.
|
||||
* those applications which claim to support the given content type by MIME
|
||||
* type subclassing and not directly.
|
||||
*
|
||||
* Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos
|
||||
* for given @content_type or %NULL on error.
|
||||
* Returns: (element-type GAppInfo) (transfer full): list of [iface@Gio.AppInfo]s
|
||||
* for given @content_type or `NULL` on error.
|
||||
*
|
||||
* Since: 2.28
|
||||
**/
|
||||
@ -4580,15 +4581,15 @@ g_app_info_get_fallback_for_type (const gchar *content_type)
|
||||
|
||||
/**
|
||||
* g_app_info_get_all_for_type:
|
||||
* @content_type: the content type to find a #GAppInfo for
|
||||
* @content_type: the content type to find a [iface@Gio.AppInfo] for
|
||||
*
|
||||
* Gets a list of all #GAppInfos for a given content type,
|
||||
* including the recommended and fallback #GAppInfos. See
|
||||
* g_app_info_get_recommended_for_type() and
|
||||
* g_app_info_get_fallback_for_type().
|
||||
* Gets a list of all [iface@Gio.AppInfo]s for a given content type,
|
||||
* including the recommended and fallback [iface@Gio.AppInfo]s. See
|
||||
* [func@Gio.AppInfo.get_recommended_for_type] and
|
||||
* [func@Gio.AppInfo.get_fallback_for_type].
|
||||
*
|
||||
* Returns: (element-type GAppInfo) (transfer full): #GList of #GAppInfos
|
||||
* for given @content_type or %NULL on error.
|
||||
* Returns: (element-type GAppInfo) (transfer full): list of
|
||||
* [iface@Gio.AppInfo]s for given @content_type.
|
||||
**/
|
||||
GList *
|
||||
g_app_info_get_all_for_type (const char *content_type)
|
||||
@ -4621,10 +4622,10 @@ g_app_info_get_all_for_type (const char *content_type)
|
||||
* @content_type: a content type
|
||||
*
|
||||
* Removes all changes to the type associations done by
|
||||
* g_app_info_set_as_default_for_type(),
|
||||
* g_app_info_set_as_default_for_extension(),
|
||||
* g_app_info_add_supports_type() or
|
||||
* g_app_info_remove_supports_type().
|
||||
* [method@Gio.AppInfo.set_as_default_for_type],
|
||||
* [method@Gio.AppInfo.set_as_default_for_extension],
|
||||
* [method@Gio.AppInfo.add_supports_type] or
|
||||
* [method@Gio.AppInfo.remove_supports_type].
|
||||
*
|
||||
* Since: 2.20
|
||||
*/
|
||||
@ -4638,14 +4639,14 @@ g_app_info_reset_type_associations (const char *content_type)
|
||||
|
||||
/**
|
||||
* g_app_info_get_default_for_type:
|
||||
* @content_type: the content type to find a #GAppInfo for
|
||||
* @must_support_uris: if %TRUE, the #GAppInfo is expected to
|
||||
* support URIs
|
||||
* @content_type: the content type to find a [iface@Gio.AppInfo] for
|
||||
* @must_support_uris: if `TRUE`, the [iface@Gio.AppInfo] is expected to
|
||||
* support URIs
|
||||
*
|
||||
* Gets the default #GAppInfo for a given content type.
|
||||
* Gets the default [iface@Gio.AppInfo] for a given content type.
|
||||
*
|
||||
* Returns: (transfer full) (nullable): #GAppInfo for given @content_type or
|
||||
* %NULL on error.
|
||||
* Returns: (transfer full) (nullable): [iface@Gio.AppInfo] for given
|
||||
* @content_type or `NULL` on error.
|
||||
*/
|
||||
GAppInfo *
|
||||
g_app_info_get_default_for_type (const char *content_type,
|
||||
@ -4899,11 +4900,12 @@ g_desktop_app_info_search (const gchar *search_string)
|
||||
*
|
||||
* For desktop files, this includes applications that have
|
||||
* `NoDisplay=true` set or are excluded from display by means
|
||||
* of `OnlyShowIn` or `NotShowIn`. See g_app_info_should_show().
|
||||
* of `OnlyShowIn` or `NotShowIn`. See [method@Gio.AppInfo.should_show].
|
||||
* The returned list does not include applications which have
|
||||
* the `Hidden` key set.
|
||||
*
|
||||
* Returns: (element-type GAppInfo) (transfer full): a newly allocated #GList of references to #GAppInfos.
|
||||
* Returns: (element-type GAppInfo) (transfer full): a newly allocated
|
||||
* list of references to [iface@Gio.AppInfo]s.
|
||||
**/
|
||||
GList *
|
||||
g_app_info_get_all (void)
|
||||
|
@ -195,11 +195,11 @@ g_filter_output_stream_init (GFilterOutputStream *stream)
|
||||
|
||||
/**
|
||||
* g_filter_output_stream_get_base_stream:
|
||||
* @stream: a #GFilterOutputStream.
|
||||
* @stream: a [class@Gio.FilterOutputStream].
|
||||
*
|
||||
* Gets the base stream for the filter stream.
|
||||
*
|
||||
* Returns: (transfer none): a #GOutputStream.
|
||||
* Returns: (transfer none): a [class@Gio.OutputStream].
|
||||
**/
|
||||
GOutputStream *
|
||||
g_filter_output_stream_get_base_stream (GFilterOutputStream *stream)
|
||||
@ -211,12 +211,12 @@ g_filter_output_stream_get_base_stream (GFilterOutputStream *stream)
|
||||
|
||||
/**
|
||||
* g_filter_output_stream_get_close_base_stream:
|
||||
* @stream: a #GFilterOutputStream.
|
||||
* @stream: a [class@Gio.FilterOutputStream].
|
||||
*
|
||||
* Returns whether the base stream will be closed when @stream is
|
||||
* closed.
|
||||
*
|
||||
* Returns: %TRUE if the base stream will be closed.
|
||||
* Returns: `TRUE` if the base stream will be closed.
|
||||
**/
|
||||
gboolean
|
||||
g_filter_output_stream_get_close_base_stream (GFilterOutputStream *stream)
|
||||
@ -232,8 +232,8 @@ g_filter_output_stream_get_close_base_stream (GFilterOutputStream *stream)
|
||||
|
||||
/**
|
||||
* g_filter_output_stream_set_close_base_stream:
|
||||
* @stream: a #GFilterOutputStream.
|
||||
* @close_base: %TRUE to close the base stream.
|
||||
* @stream: a [class@Gio.FilterOutputStream].
|
||||
* @close_base: `TRUE` to close the base stream.
|
||||
*
|
||||
* Sets whether the base stream will be closed when @stream is closed.
|
||||
**/
|
||||
|
@ -1097,6 +1097,10 @@ extern GType g_network_monitor_portal_get_type (void);
|
||||
extern GType g_cocoa_notification_backend_get_type (void);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_COCOA
|
||||
extern GType g_osx_network_monitor_get_type (void);
|
||||
#endif
|
||||
|
||||
#ifdef G_PLATFORM_WIN32
|
||||
extern GType g_win32_notification_backend_get_type (void);
|
||||
|
||||
@ -1350,6 +1354,7 @@ _g_io_modules_ensure_loaded (void)
|
||||
#ifdef HAVE_COCOA
|
||||
g_type_ensure (g_nextstep_settings_backend_get_type ());
|
||||
g_type_ensure (g_osx_app_info_get_type ());
|
||||
g_type_ensure (g_osx_network_monitor_get_type ());
|
||||
#endif
|
||||
#ifdef G_OS_UNIX
|
||||
g_type_ensure (_g_unix_volume_monitor_get_type ());
|
||||
|
@ -69,7 +69,10 @@
|
||||
*
|
||||
* ## A menu example
|
||||
*
|
||||
* ![](menu-model.png)
|
||||
* <picture>
|
||||
* <source srcset="menu-model-dark.svg" media="(prefers-color-scheme: dark)">
|
||||
* <img src="menu-model-light.svg" alt="menu model">
|
||||
* </picture>
|
||||
*
|
||||
* Notice that the separators visible in the [example](#an-example-menu)
|
||||
* appear nowhere in the [menu model](#a-menu-example). This is because
|
||||
|
@ -65,6 +65,8 @@ void g_network_monitor_base_set_networks (GNetworkMonitorBase *monitor,
|
||||
GInetAddressMask **networks,
|
||||
gint length);
|
||||
|
||||
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GNetworkMonitorBase, g_object_unref)
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_NETWORK_MONITOR_BASE_H__ */
|
||||
|
454
gio/gosxnetworkmonitor.c
Normal file
@ -0,0 +1,454 @@
|
||||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright 2023 Leo Zi-You Assini <leoziyou@amazon.it>
|
||||
*
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <arpa/inet.h>
|
||||
#include <fcntl.h>
|
||||
#include <net/route.h>
|
||||
#include <sys/sysctl.h>
|
||||
|
||||
#include "ginetaddress.h"
|
||||
#include "ginetaddressmask.h"
|
||||
#include "ginitable.h"
|
||||
#include "gio.h"
|
||||
#include "gioerror.h"
|
||||
#include "giomodule-priv.h"
|
||||
#include "gnetworkmonitor.h"
|
||||
#include "gosxnetworkmonitor.h"
|
||||
#include "gstdio.h"
|
||||
|
||||
static GInitableIface *initable_parent_iface;
|
||||
static void g_osx_network_monitor_iface_init (GNetworkMonitorInterface *iface);
|
||||
static void g_osx_network_monitor_initable_iface_init (GInitableIface *iface);
|
||||
|
||||
typedef struct
|
||||
{
|
||||
GSource source;
|
||||
gint fd;
|
||||
gpointer tag;
|
||||
} GOsxNetworkMonitorSource;
|
||||
|
||||
static gboolean
|
||||
osx_network_monitor_source_dispatch (GSource *source,
|
||||
GSourceFunc callback,
|
||||
gpointer user_data)
|
||||
{
|
||||
gboolean ret;
|
||||
|
||||
g_return_val_if_fail (callback != NULL, FALSE);
|
||||
|
||||
ret = callback (user_data);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static GSource *
|
||||
osx_network_monitor_source_new (gint sockfd)
|
||||
{
|
||||
static GSourceFuncs source_funcs = {
|
||||
NULL, /* prepare */
|
||||
NULL, /* check */
|
||||
osx_network_monitor_source_dispatch,
|
||||
NULL, /* finalize */
|
||||
NULL, /* closure */
|
||||
NULL /* marshal */
|
||||
};
|
||||
|
||||
GSource *source;
|
||||
GOsxNetworkMonitorSource *network_monitor_source;
|
||||
|
||||
source = g_source_new (&source_funcs, sizeof (GOsxNetworkMonitorSource));
|
||||
network_monitor_source = (GOsxNetworkMonitorSource *) source;
|
||||
|
||||
network_monitor_source->fd = sockfd;
|
||||
network_monitor_source->tag = g_source_add_unix_fd (source, sockfd, G_IO_IN);
|
||||
|
||||
g_debug ("Created source for fd=%d", sockfd);
|
||||
|
||||
return source;
|
||||
}
|
||||
|
||||
struct _GOsxNetworkMonitor
|
||||
{
|
||||
GNetworkMonitorBase parent_instance;
|
||||
|
||||
gint sockfd;
|
||||
char msg_buffer[sizeof (struct rt_msghdr) + sizeof (struct sockaddr) * 8];
|
||||
GSource *route_change_source; /* (owned) (nullable) */
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (GOsxNetworkMonitor, g_osx_network_monitor, G_TYPE_NETWORK_MONITOR_BASE, G_IMPLEMENT_INTERFACE (G_TYPE_NETWORK_MONITOR, g_osx_network_monitor_iface_init) G_IMPLEMENT_INTERFACE (G_TYPE_INITABLE, g_osx_network_monitor_initable_iface_init) _g_io_modules_ensure_extension_points_registered ();
|
||||
g_io_extension_point_implement (G_NETWORK_MONITOR_EXTENSION_POINT_NAME,
|
||||
g_define_type_id,
|
||||
"osx",
|
||||
20))
|
||||
|
||||
#define ROUNDUP(a, size) (((a) & ((size) -1)) ? (1 + ((a) | ((size) -1))) : (a))
|
||||
|
||||
#define NEXT_SA(ap) ap = (struct sockaddr *) ((caddr_t) ap + (ap->sa_len ? ROUNDUP (ap->sa_len, sizeof (u_long)) : sizeof (u_long)))
|
||||
|
||||
/* Extract the sockaddrs from @sa into @rti_info according to the mask in @addrs.
|
||||
* @rti_info must be allocated by the caller and have at least as many elements
|
||||
* as there are high bits in @addrs, up to `RTAX_MAX` elements.
|
||||
*/
|
||||
static void
|
||||
get_rtaddrs (unsigned int addrs_mask,
|
||||
const struct sockaddr *sa,
|
||||
const struct sockaddr **rti_info)
|
||||
{
|
||||
for (unsigned int i = 0; i < RTAX_MAX; i++)
|
||||
{
|
||||
if (addrs_mask & (1 << i))
|
||||
{
|
||||
rti_info[i] = sa;
|
||||
NEXT_SA (sa);
|
||||
}
|
||||
else
|
||||
rti_info[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* Returns the position of the last positive bit
|
||||
*
|
||||
* 0.0.0.0 (00000000.00000000.0000000.0000000) => 0
|
||||
* 255.255.255.255 (11111111.11111111.11111111.11111111) => 32
|
||||
* 0.0.0.1 (00000000.00000000.0000000.0000001) => 32
|
||||
* 32.0.0.0 (00100001.00000000.0000000.0000000) => 8
|
||||
* 0.16.0.16 (00000000.00010000.0000000.00010000) => 28
|
||||
*/
|
||||
static gsize
|
||||
get_last_bit_position (const guint8 *ip,
|
||||
gsize len_in_bits)
|
||||
{
|
||||
gssize i;
|
||||
gssize bytes = (gssize) len_in_bits / 8;
|
||||
gulong ip_in_binary = 0;
|
||||
|
||||
for (i = 0; i < bytes; i++)
|
||||
ip_in_binary = (ip_in_binary << 8) | ip[i];
|
||||
|
||||
if (ip_in_binary == 0)
|
||||
return 0;
|
||||
|
||||
gsize last_bit_position = len_in_bits - g_bit_nth_lsf (ip_in_binary, -1);
|
||||
|
||||
return (gsize) last_bit_position;
|
||||
}
|
||||
|
||||
static GInetAddressMask *
|
||||
get_network_mask (const struct rt_msghdr *rtm)
|
||||
{
|
||||
GInetAddressMask *network = NULL;
|
||||
GInetAddress *dest_addr;
|
||||
const struct sockaddr *sa = (struct sockaddr *) (rtm + 1);
|
||||
const struct sockaddr *nm;
|
||||
const struct sockaddr *rti_info[RTAX_MAX];
|
||||
GSocketFamily family;
|
||||
const guint8 *dest;
|
||||
gsize len;
|
||||
GError *error = NULL;
|
||||
|
||||
get_rtaddrs (rtm->rtm_addrs, sa, rti_info);
|
||||
|
||||
sa = rti_info[RTAX_DST];
|
||||
if (sa == NULL)
|
||||
return NULL;
|
||||
|
||||
nm = rti_info[RTAX_NETMASK];
|
||||
if (nm == NULL)
|
||||
return NULL;
|
||||
|
||||
/* Get IP information */
|
||||
switch (sa->sa_family)
|
||||
{
|
||||
case AF_UNSPEC:
|
||||
/* Fall-through: AF_UNSPEC delivers both IPv4 and IPv6 infos, let's stick with IPv4 here */
|
||||
case AF_INET:
|
||||
family = G_SOCKET_FAMILY_IPV4;
|
||||
/* For IPv4 sin_addr is a guint8 array[4], e.g [255, 255, 255, 255] */
|
||||
dest = (guint8 *) &((struct sockaddr_in *) sa)->sin_addr;
|
||||
len = get_last_bit_position (dest, 32);
|
||||
break;
|
||||
case AF_INET6:
|
||||
/* Skip IPv6 here as OSX keeps a default route to a tunneling device even if disconnected */
|
||||
return NULL;
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Create dest address */
|
||||
if (dest != NULL)
|
||||
dest_addr = g_inet_address_new_from_bytes (dest, family);
|
||||
else
|
||||
dest_addr = g_inet_address_new_any (family);
|
||||
|
||||
/* Create and return network mask */
|
||||
network = g_inet_address_mask_new (dest_addr, len, &error);
|
||||
|
||||
if (network == NULL)
|
||||
{
|
||||
g_warning ("Unable to create network mask: %s", error->message);
|
||||
g_error_free (error);
|
||||
}
|
||||
|
||||
g_object_unref (dest_addr);
|
||||
|
||||
return g_steal_pointer (&network);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
osx_network_manager_process_table (GOsxNetworkMonitor *self,
|
||||
GError **error)
|
||||
{
|
||||
GPtrArray *networks;
|
||||
gsize n_networks;
|
||||
struct rt_msghdr *rtm;
|
||||
gint mib[6];
|
||||
gsize needed;
|
||||
gchar *buf;
|
||||
gchar *limit;
|
||||
gchar *next;
|
||||
|
||||
/* Create Management Information Base
|
||||
* System information is stored in a hierarchial tree structure. By specifying each array element the search can be refined.
|
||||
* First array element is the top level name which is always prefixed by CTL_ (examples include CTL_VFS for file system information, CTL_HW for user-level information etc...)
|
||||
* https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/sysctl.3.html
|
||||
*/
|
||||
mib[0] = CTL_NET; /* CTL_NET = Network related information */
|
||||
mib[1] = PF_ROUTE; /* PF_ROUTE = Retrieve entire routing table */
|
||||
|
||||
mib[2] = 0; /* 0 = protocol number, which is currently always 0 */
|
||||
mib[3] = 0; /* 0 = Retrieve all address families */
|
||||
mib[4] = NET_RT_DUMP;
|
||||
mib[5] = 0;
|
||||
|
||||
/* Request size of buffer */
|
||||
if (sysctl (mib, G_N_ELEMENTS (mib), NULL, &needed, NULL, 0) < 0 || needed == 0)
|
||||
{
|
||||
int saved_errno = errno;
|
||||
|
||||
g_set_error_literal (error, G_IO_ERROR, g_io_error_from_errno (saved_errno),
|
||||
"Could not request buffer size");
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Allocate memory */
|
||||
buf = g_malloc0 (needed);
|
||||
|
||||
/* Request needed bytes in buffer for routing table */
|
||||
if (sysctl (mib, G_N_ELEMENTS (mib), buf, &needed, NULL, 0) < 0)
|
||||
{
|
||||
int saved_errno = errno;
|
||||
|
||||
g_set_error_literal (error, G_IO_ERROR, g_io_error_from_errno (saved_errno),
|
||||
"Could not request buffer");
|
||||
|
||||
g_free (buf);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
limit = buf + needed;
|
||||
|
||||
networks = g_ptr_array_new_with_free_func (g_object_unref);
|
||||
for (next = buf; next < limit; next += rtm->rtm_msglen)
|
||||
{
|
||||
GInetAddressMask *network;
|
||||
|
||||
rtm = (struct rt_msghdr *) next;
|
||||
|
||||
network = get_network_mask (rtm);
|
||||
if (network == NULL)
|
||||
continue;
|
||||
|
||||
g_ptr_array_add (networks, g_steal_pointer (&network));
|
||||
}
|
||||
|
||||
n_networks = networks->len;
|
||||
g_network_monitor_base_set_networks (G_NETWORK_MONITOR_BASE (self),
|
||||
(GInetAddressMask **) g_ptr_array_steal (networks, &n_networks),
|
||||
n_networks);
|
||||
|
||||
g_free (buf);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
clear_network_monitor (GOsxNetworkMonitor *self)
|
||||
{
|
||||
g_debug ("Clearing source for fd=%d", self->sockfd);
|
||||
|
||||
if (self->route_change_source != NULL)
|
||||
{
|
||||
g_source_destroy (self->route_change_source);
|
||||
g_clear_pointer (&self->route_change_source, g_source_unref);
|
||||
}
|
||||
|
||||
g_clear_fd (&self->sockfd, NULL);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
osx_network_monitor_callback (gpointer user_data)
|
||||
{
|
||||
GOsxNetworkMonitor *self = user_data;
|
||||
gint32 read_msg;
|
||||
GInetAddressMask *network;
|
||||
|
||||
memset (&self->msg_buffer, 0, sizeof (self->msg_buffer));
|
||||
read_msg = read (self->sockfd, self->msg_buffer, sizeof (self->msg_buffer));
|
||||
|
||||
/* Skip read if we have no data */
|
||||
if (read_msg == -1 && errno == EAGAIN)
|
||||
{
|
||||
return G_SOURCE_CONTINUE;
|
||||
}
|
||||
|
||||
if (read_msg <= 0)
|
||||
{
|
||||
g_warning ("Unable to monitor network change: failed to read from socket");
|
||||
clear_network_monitor (self);
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
/* Check if it is a type of interest */
|
||||
switch (((struct rt_msghdr *) self->msg_buffer)->rtm_type)
|
||||
{
|
||||
case RTM_ADD:
|
||||
network = get_network_mask ((struct rt_msghdr *) self->msg_buffer);
|
||||
if (network != NULL)
|
||||
{
|
||||
g_network_monitor_base_add_network (G_NETWORK_MONITOR_BASE (self), network);
|
||||
g_object_unref (network);
|
||||
}
|
||||
break;
|
||||
case RTM_DELETE:
|
||||
network = get_network_mask ((struct rt_msghdr *) self->msg_buffer);
|
||||
if (network != NULL)
|
||||
{
|
||||
g_network_monitor_base_remove_network (G_NETWORK_MONITOR_BASE (self), network);
|
||||
g_object_unref (network);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return G_SOURCE_CONTINUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
g_osx_network_monitor_start_monitoring (GOsxNetworkMonitor *self,
|
||||
GError **error)
|
||||
{
|
||||
GSource *source;
|
||||
|
||||
self->sockfd = socket (PF_ROUTE, SOCK_RAW, 0);
|
||||
if (self->sockfd == -1)
|
||||
{
|
||||
int saved_errno = errno;
|
||||
|
||||
g_set_error_literal (error, G_IO_ERROR, g_io_error_from_errno (saved_errno),
|
||||
"Failed to create PF_ROUTE socket");
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* FIXME: Currently it is not possible to set SOCK_NONBLOCK and SOCK_CLOEXEC
|
||||
* in the socket constructor so workaround is this racy call to fcntl. Should be
|
||||
* replaced once the flags are supported. */
|
||||
fcntl (self->sockfd, F_SETFL, fcntl (self->sockfd, F_GETFL, 0) | O_NONBLOCK | O_CLOEXEC);
|
||||
|
||||
source = osx_network_monitor_source_new (self->sockfd);
|
||||
|
||||
g_source_set_priority (source, G_PRIORITY_DEFAULT);
|
||||
g_source_set_callback (source,
|
||||
osx_network_monitor_callback,
|
||||
self,
|
||||
NULL);
|
||||
g_source_attach (source, NULL);
|
||||
|
||||
self->route_change_source = g_steal_pointer (&source);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
g_osx_network_monitor_init (GOsxNetworkMonitor *self)
|
||||
{
|
||||
self->sockfd = -1;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
g_osx_network_monitor_initable_init (GInitable *initable,
|
||||
GCancellable *cancellable,
|
||||
GError **error)
|
||||
{
|
||||
GOsxNetworkMonitor *self = G_OSX_NETWORK_MONITOR (initable);
|
||||
|
||||
/* Read current IP routing table. */
|
||||
if (!osx_network_manager_process_table (self, error))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Start monitoring */
|
||||
if (!g_osx_network_monitor_start_monitoring (self, error))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return initable_parent_iface->init (initable, cancellable, error);
|
||||
}
|
||||
|
||||
static void
|
||||
g_osx_network_monitor_finalize (GObject *object)
|
||||
{
|
||||
GOsxNetworkMonitor *self = G_OSX_NETWORK_MONITOR (object);
|
||||
|
||||
clear_network_monitor (self);
|
||||
|
||||
G_OBJECT_CLASS (g_osx_network_monitor_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
g_osx_network_monitor_class_init (GOsxNetworkMonitorClass *osx_class)
|
||||
{
|
||||
GObjectClass *gobject_class = G_OBJECT_CLASS (osx_class);
|
||||
|
||||
gobject_class->finalize = g_osx_network_monitor_finalize;
|
||||
}
|
||||
|
||||
static void
|
||||
g_osx_network_monitor_iface_init (GNetworkMonitorInterface *monitor_iface)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
g_osx_network_monitor_initable_iface_init (GInitableIface *iface)
|
||||
{
|
||||
initable_parent_iface = g_type_interface_peek_parent (iface);
|
||||
|
||||
iface->init = g_osx_network_monitor_initable_init;
|
||||
}
|
35
gio/gosxnetworkmonitor.h
Normal file
@ -0,0 +1,35 @@
|
||||
/* GIO - GLib Input, Output and Streaming Library
|
||||
*
|
||||
* Copyright 2023 Leo Zi-You Assini <leoziyou@amazon.it>
|
||||
*
|
||||
* SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General
|
||||
* Public License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#ifndef __G_OSX_NETWORK_MONITOR_H__
|
||||
#define __G_OSX_NETWORK_MONITOR_H__
|
||||
|
||||
#include "gnetworkmonitorbase.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define G_TYPE_OSX_NETWORK_MONITOR (g_osx_network_monitor_get_type ())
|
||||
G_DECLARE_FINAL_TYPE (GOsxNetworkMonitor, g_osx_network_monitor, G, OSX_NETWORK_MONITOR, GNetworkMonitorBase);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_OSX_NETWORK_MONITOR_H__ */
|
@ -216,7 +216,7 @@ g_output_stream_write (GOutputStream *stream,
|
||||
gssize res;
|
||||
|
||||
g_return_val_if_fail (G_IS_OUTPUT_STREAM (stream), -1);
|
||||
g_return_val_if_fail (buffer != NULL, 0);
|
||||
g_return_val_if_fail (buffer != NULL || count == 0, 0);
|
||||
|
||||
if (count == 0)
|
||||
return 0;
|
||||
|
@ -1079,7 +1079,7 @@ g_resolver_records_from_res_query (const gchar *rrname,
|
||||
}
|
||||
|
||||
if (record != NULL)
|
||||
records = g_list_prepend (records, record);
|
||||
records = g_list_prepend (records, g_variant_ref_sink (record));
|
||||
|
||||
if (parsing_error != NULL)
|
||||
break;
|
||||
|
@ -399,6 +399,10 @@ if host_system != 'windows'
|
||||
if glib_have_os_x_9_or_later
|
||||
unix_sources += files('gcocoanotificationbackend.m')
|
||||
endif
|
||||
unix_sources += files(
|
||||
'gosxnetworkmonitor.c',
|
||||
'gosxnetworkmonitor.h'
|
||||
)
|
||||
application_headers += files('gosxappinfo.h')
|
||||
else
|
||||
contenttype_sources += files('gcontenttype.c')
|
||||
|
@ -212,6 +212,9 @@ test_connection_failed (void)
|
||||
g_assert_no_error (local_error);
|
||||
|
||||
/* reserve a port without listening so we know that connecting to it will fail */
|
||||
g_object_unref (address);
|
||||
address = g_socket_get_local_address (socket, &local_error);
|
||||
g_assert_no_error (local_error);
|
||||
port = g_inet_socket_address_get_port (G_INET_SOCKET_ADDRESS (address));
|
||||
|
||||
client = g_socket_client_new ();
|
||||
@ -228,7 +231,8 @@ test_connection_failed (void)
|
||||
g_main_context_iteration (NULL, TRUE);
|
||||
|
||||
conn = g_socket_client_connect_to_uri_finish (client, async_result, &local_error);
|
||||
g_assert_error (local_error, G_IO_ERROR, G_IO_ERROR_CONNECTION_REFUSED);
|
||||
g_assert_nonnull (local_error);
|
||||
g_assert_cmpint (local_error->domain, ==, G_IO_ERROR);
|
||||
g_assert_null (conn);
|
||||
g_clear_error (&local_error);
|
||||
g_clear_object (&async_result);
|
||||
|
@ -307,6 +307,7 @@ test_write_null (void)
|
||||
{
|
||||
GOutputStream *mo;
|
||||
GError *error = NULL;
|
||||
gssize bytes_written;
|
||||
|
||||
g_test_bug ("https://gitlab.gnome.org/GNOME/glib/-/issues/2471");
|
||||
|
||||
@ -316,6 +317,10 @@ test_write_null (void)
|
||||
|
||||
g_assert_cmpint (0, ==, g_memory_output_stream_get_data_size (G_MEMORY_OUTPUT_STREAM (mo)));
|
||||
|
||||
bytes_written = g_output_stream_write (mo, NULL, 0, NULL, &error);
|
||||
g_assert_no_error (error);
|
||||
g_assert_cmpint (0, ==, bytes_written);
|
||||
|
||||
g_output_stream_close (mo, NULL, &error);
|
||||
g_assert_no_error (error);
|
||||
g_object_unref (mo);
|
||||
|
@ -840,7 +840,7 @@ if not meson.is_cross_build()
|
||||
|
||||
test_gresource = custom_target('test.gresource',
|
||||
input : 'test.gresource.xml',
|
||||
depends : test_generated_txt,
|
||||
depends : [test_generated_txt, gspawn_helpers],
|
||||
output : 'test.gresource',
|
||||
command : [glib_compile_resources,
|
||||
compiler_type,
|
||||
@ -855,6 +855,7 @@ if not meson.is_cross_build()
|
||||
|
||||
test_resources2_c = custom_target('test_resources2.c',
|
||||
input : 'test3.gresource.xml',
|
||||
depends : [gspawn_helpers],
|
||||
output : 'test_resources2.c',
|
||||
command : [glib_compile_resources,
|
||||
compiler_type,
|
||||
@ -868,6 +869,7 @@ if not meson.is_cross_build()
|
||||
|
||||
test_resources2_h = custom_target('test_resources2.h',
|
||||
input : 'test3.gresource.xml',
|
||||
depends : [gspawn_helpers],
|
||||
output : 'test_resources2.h',
|
||||
command : [glib_compile_resources,
|
||||
compiler_type,
|
||||
@ -881,7 +883,7 @@ if not meson.is_cross_build()
|
||||
|
||||
test_resources_c = custom_target('test_resources.c',
|
||||
input : 'test2.gresource.xml',
|
||||
depends : big_test_resource,
|
||||
depends : [big_test_resource, gspawn_helpers],
|
||||
output : 'test_resources.c',
|
||||
command : [glib_compile_resources,
|
||||
compiler_type,
|
||||
@ -895,6 +897,7 @@ if not meson.is_cross_build()
|
||||
|
||||
digit_test_resources_c = custom_target('digit_test_resources.c',
|
||||
input : '111_digit_test.gresource.xml',
|
||||
depends : [gspawn_helpers],
|
||||
output : 'digit_test_resources.c',
|
||||
command : [glib_compile_resources,
|
||||
compiler_type,
|
||||
@ -908,6 +911,7 @@ if not meson.is_cross_build()
|
||||
|
||||
digit_test_resources_h = custom_target('digit_test_resources.h',
|
||||
input : '111_digit_test.gresource.xml',
|
||||
depends : [gspawn_helpers],
|
||||
output : 'digit_test_resources.h',
|
||||
command : [glib_compile_resources,
|
||||
compiler_type,
|
||||
@ -960,6 +964,7 @@ if not meson.is_cross_build()
|
||||
|
||||
test_gresource_binary = custom_target('test5.gresource',
|
||||
input : 'test5.gresource.xml',
|
||||
depends : [gspawn_helpers],
|
||||
output : 'test5.gresource',
|
||||
command : [glib_compile_resources,
|
||||
compiler_type,
|
||||
@ -975,6 +980,7 @@ if not meson.is_cross_build()
|
||||
# Create resource data file
|
||||
test_resources_binary_c = custom_target('test_resources_binary.c',
|
||||
input : 'test5.gresource.xml',
|
||||
depends : [gspawn_helpers],
|
||||
output : 'test_resources_binary.c',
|
||||
command : [glib_compile_resources,
|
||||
compiler_type,
|
||||
@ -1090,7 +1096,7 @@ foreach test_name, extra_args : gio_tests
|
||||
suite = ['gio'] + extra_args.get('suite', [])
|
||||
timeout = suite.contains('slow') ? test_timeout_slow : test_timeout
|
||||
local_test_env = test_env
|
||||
depends = [extra_args.get('depends', [])]
|
||||
depends = [extra_args.get('depends', []), gspawn_helpers]
|
||||
|
||||
foreach program : extra_args.get('extra_programs', [])
|
||||
depends += test_extra_programs_targets[program]
|
||||
|
@ -177,6 +177,7 @@ assert_query_succeeds (const gchar *rrname,
|
||||
answer_variant = records->data;
|
||||
expected_answer_variant = g_variant_new_parsed (expected_answer_variant_str);
|
||||
g_assert_cmpvariant (answer_variant, expected_answer_variant);
|
||||
g_assert_true (!g_variant_is_floating (answer_variant));
|
||||
|
||||
g_variant_unref (expected_answer_variant);
|
||||
g_list_free_full (records, (GDestroyNotify) g_variant_unref);
|
||||
@ -223,6 +224,50 @@ test_invalid_header (void)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
test_record_ownership (void)
|
||||
{
|
||||
#ifndef HAVE_DN_COMP
|
||||
g_test_skip ("The dn_comp() function was not available.");
|
||||
return;
|
||||
#else
|
||||
GByteArray *answer = NULL, *txt_rdata = NULL;
|
||||
GList *records = NULL;
|
||||
GError *local_error = NULL;
|
||||
uint16_t rrtype;
|
||||
|
||||
rrtype = g_resolver_record_type_to_rrtype (G_RESOLVER_RECORD_TXT);
|
||||
answer = dns_header ();
|
||||
|
||||
/* Resource record */
|
||||
dns_builder_add_domain (answer, "example.org");
|
||||
dns_builder_add_uint16 (answer, rrtype);
|
||||
dns_builder_add_uint16 (answer, 1); /* qclass=C_IN */
|
||||
dns_builder_add_uint32 (answer, 0); /* ttl (ignored) */
|
||||
|
||||
/* TXT rdata, https://datatracker.ietf.org/doc/html/rfc1035#section-3.3.14 */
|
||||
txt_rdata = g_byte_array_new ();
|
||||
dns_builder_add_length_prefixed_string (txt_rdata, "some test content");
|
||||
dns_builder_add_answer_data (answer, txt_rdata);
|
||||
g_byte_array_unref (txt_rdata);
|
||||
|
||||
records = g_resolver_records_from_res_query ("example.org",
|
||||
rrtype,
|
||||
answer->data,
|
||||
answer->len,
|
||||
0,
|
||||
&local_error);
|
||||
g_assert_no_error (local_error);
|
||||
g_assert_nonnull (records);
|
||||
|
||||
for (const GList *iter = records; iter != NULL; iter = iter->next)
|
||||
g_assert_true (!g_variant_is_floating (records->data));
|
||||
|
||||
g_list_free_full (records, (GDestroyNotify) g_variant_unref);
|
||||
g_byte_array_free (answer, TRUE);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
test_unknown_record_type (void)
|
||||
{
|
||||
@ -858,6 +903,7 @@ main (int argc,
|
||||
g_test_init (&argc, &argv, G_TEST_OPTION_ISOLATE_DIRS, NULL);
|
||||
|
||||
g_test_add_func ("/gresolver/invalid-header", test_invalid_header);
|
||||
g_test_add_func ("/gresolver/record-ownership", test_record_ownership);
|
||||
g_test_add_func ("/gresolver/unknown-record-type", test_unknown_record_type);
|
||||
g_test_add_func ("/gresolver/mx/valid", test_mx_valid);
|
||||
g_test_add_func ("/gresolver/mx/invalid", test_mx_invalid);
|
||||
|
@ -7,6 +7,16 @@ gi_gen_shared_sources = [
|
||||
gmodule_visibility_h,
|
||||
]
|
||||
|
||||
gi_gen_shared_dependencies = [
|
||||
# libgirepository is not needed by most of the modules below, but it is needed
|
||||
# by the g-ir-scanner generated dumper program. If we don’t explicitly include
|
||||
# the local version of it here, Meson will implicitly link against it anyway,
|
||||
# and that might pull in a different version, or try to link against a
|
||||
# half-built local version as the build ordering dependency tree won’t
|
||||
# reflect this relationship.
|
||||
libgirepository_dep,
|
||||
]
|
||||
|
||||
gi_gen_env_variables = environment()
|
||||
|
||||
if 'address' in glib_sanitizers
|
||||
@ -75,7 +85,7 @@ glib_gir = gnome.generate_gir(libglib,
|
||||
header: 'glib.h',
|
||||
install: true,
|
||||
install_dir_gir: glib_girdir,
|
||||
dependencies: [
|
||||
dependencies: gi_gen_shared_dependencies + [
|
||||
libgobject_dep,
|
||||
],
|
||||
env: gi_gen_env_variables,
|
||||
@ -103,7 +113,7 @@ if host_system == 'windows'
|
||||
includes: [ glib_gir[0] ],
|
||||
install: true,
|
||||
install_dir_gir: glib_girdir,
|
||||
dependencies: [
|
||||
dependencies: gi_gen_shared_dependencies + [
|
||||
libgobject_dep,
|
||||
],
|
||||
env: gi_gen_env_variables,
|
||||
@ -132,7 +142,7 @@ else
|
||||
includes: [ glib_gir[0] ],
|
||||
install: true,
|
||||
install_dir_gir: glib_girdir,
|
||||
dependencies: [
|
||||
dependencies: gi_gen_shared_dependencies + [
|
||||
libgobject_dep,
|
||||
],
|
||||
env: gi_gen_env_variables,
|
||||
@ -166,6 +176,7 @@ gobject_gir = gnome.generate_gir(libgobject,
|
||||
includes: [ glib_gir[0] ],
|
||||
install: true,
|
||||
install_dir_gir: glib_girdir,
|
||||
dependencies: gi_gen_shared_dependencies,
|
||||
env: gi_gen_env_variables,
|
||||
extra_args: gir_args + [
|
||||
'-DGOBJECT_COMPILATION',
|
||||
@ -192,7 +203,7 @@ gmodule_gir = gnome.generate_gir(libgmodule,
|
||||
includes: [ glib_gir[0] ],
|
||||
install: true,
|
||||
install_dir_gir: glib_girdir,
|
||||
dependencies: [
|
||||
dependencies: gi_gen_shared_dependencies + [
|
||||
libglib_dep,
|
||||
],
|
||||
env: gi_gen_env_variables,
|
||||
@ -255,7 +266,7 @@ gio_gir = gnome.generate_gir(libgio,
|
||||
includes: [ glib_gir[0], gmodule_gir[0], gobject_gir[0] ],
|
||||
install: true,
|
||||
install_dir_gir: glib_girdir,
|
||||
dependencies: [
|
||||
dependencies: gi_gen_shared_dependencies + [
|
||||
libglib_dep,
|
||||
libgobject_dep,
|
||||
libgmodule_dep,
|
||||
@ -281,7 +292,7 @@ if host_system == 'windows'
|
||||
includes: [ glib_gir[0], gmodule_gir[0], gobject_gir[0], gio_gir[0] ],
|
||||
install: true,
|
||||
install_dir_gir: glib_girdir,
|
||||
dependencies: [
|
||||
dependencies: gi_gen_shared_dependencies + [
|
||||
libglib_dep,
|
||||
libgobject_dep,
|
||||
libgmodule_dep,
|
||||
@ -311,7 +322,7 @@ else
|
||||
includes: [ glib_gir[0], gmodule_gir[0], gobject_gir[0], gio_gir[0] ],
|
||||
install: true,
|
||||
install_dir_gir: glib_girdir,
|
||||
dependencies: [
|
||||
dependencies: gi_gen_shared_dependencies + [
|
||||
libglib_dep,
|
||||
libgobject_dep,
|
||||
libgmodule_dep,
|
||||
@ -356,7 +367,12 @@ girepository_gir = gnome.generate_gir(libgirepository,
|
||||
includes: [ glib_gir[0], gmodule_gir[0], gobject_gir[0], gio_gir[0] ],
|
||||
install: true,
|
||||
install_dir_gir: glib_girdir,
|
||||
dependencies: [ libglib_dep, libgobject_dep, libgmodule_dep, libgio_dep ],
|
||||
dependencies: gi_gen_shared_dependencies + [
|
||||
libglib_dep,
|
||||
libgobject_dep,
|
||||
libgmodule_dep,
|
||||
libgio_dep,
|
||||
],
|
||||
extra_args: gir_args + libgirepository_gir_args,
|
||||
env: gi_libgirepository_gen_env_variables,
|
||||
)
|
||||
|
@ -925,11 +925,11 @@ g_array_sort (GArray *farray,
|
||||
|
||||
/* Don't use qsort as we want a guaranteed stable sort */
|
||||
if (array->len > 0)
|
||||
g_qsort_with_data (array->data,
|
||||
array->len,
|
||||
array->elt_size,
|
||||
(GCompareDataFunc)compare_func,
|
||||
NULL);
|
||||
g_sort_array (array->data,
|
||||
array->len,
|
||||
array->elt_size,
|
||||
(GCompareDataFunc) compare_func,
|
||||
NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -957,11 +957,11 @@ g_array_sort_with_data (GArray *farray,
|
||||
g_return_if_fail (array != NULL);
|
||||
|
||||
if (array->len > 0)
|
||||
g_qsort_with_data (array->data,
|
||||
array->len,
|
||||
array->elt_size,
|
||||
compare_func,
|
||||
user_data);
|
||||
g_sort_array (array->data,
|
||||
array->len,
|
||||
array->elt_size,
|
||||
compare_func,
|
||||
user_data);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2338,23 +2338,23 @@ g_ptr_array_insert (GPtrArray *array,
|
||||
gpointer data)
|
||||
{
|
||||
GRealPtrArray *rarray = (GRealPtrArray *)array;
|
||||
guint real_index;
|
||||
|
||||
g_return_if_fail (rarray);
|
||||
g_return_if_fail (index_ >= -1);
|
||||
g_return_if_fail (index_ <= (gint)rarray->len);
|
||||
g_return_if_fail (index_ < 0 || (guint) index_ <= rarray->len);
|
||||
|
||||
g_ptr_array_maybe_expand (rarray, 1u + rarray->null_terminated);
|
||||
|
||||
if (index_ < 0)
|
||||
index_ = rarray->len;
|
||||
real_index = (index_ >= 0) ? (guint) index_ : rarray->len;
|
||||
|
||||
if ((guint) index_ < rarray->len)
|
||||
memmove (&(rarray->pdata[index_ + 1]),
|
||||
&(rarray->pdata[index_]),
|
||||
(rarray->len - index_) * sizeof (gpointer));
|
||||
if (real_index < rarray->len)
|
||||
memmove (&(rarray->pdata[real_index + 1]),
|
||||
&(rarray->pdata[real_index]),
|
||||
(rarray->len - real_index) * sizeof (gpointer));
|
||||
|
||||
rarray->len++;
|
||||
rarray->pdata[index_] = data;
|
||||
rarray->pdata[real_index] = data;
|
||||
|
||||
ptr_array_maybe_null_terminate (rarray);
|
||||
}
|
||||
@ -2413,11 +2413,11 @@ g_ptr_array_sort (GPtrArray *array,
|
||||
|
||||
/* Don't use qsort as we want a guaranteed stable sort */
|
||||
if (array->len > 0)
|
||||
g_qsort_with_data (array->pdata,
|
||||
array->len,
|
||||
sizeof (gpointer),
|
||||
(GCompareDataFunc)compare_func,
|
||||
NULL);
|
||||
g_sort_array (array->pdata,
|
||||
array->len,
|
||||
sizeof (gpointer),
|
||||
(GCompareDataFunc) compare_func,
|
||||
NULL);
|
||||
}
|
||||
|
||||
/* Please keep this doc-comment in sync with
|
||||
@ -2493,11 +2493,11 @@ g_ptr_array_sort_with_data (GPtrArray *array,
|
||||
g_return_if_fail (array != NULL);
|
||||
|
||||
if (array->len > 0)
|
||||
g_qsort_with_data (array->pdata,
|
||||
array->len,
|
||||
sizeof (gpointer),
|
||||
compare_func,
|
||||
user_data);
|
||||
g_sort_array (array->pdata,
|
||||
array->len,
|
||||
sizeof (gpointer),
|
||||
compare_func,
|
||||
user_data);
|
||||
}
|
||||
|
||||
static inline gint
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include "deprecated/gthread.h"
|
||||
|
||||
/**
|
||||
* GAsyncQueue:
|
||||
* GAsyncQueue: (copy-func g_async_queue_ref) (free-func g_async_queue_unref)
|
||||
*
|
||||
* An opaque data structure which represents an asynchronous queue.
|
||||
*
|
||||
|
@ -57,14 +57,14 @@
|
||||
/* If GLib itself is not compiled with ASAN sanitizer we may still want to
|
||||
* control it in case it's linked by the loading application, so we need to
|
||||
* do this check dynamically.
|
||||
* However MinGW doesn't support weak attribute properly (even if it advertises
|
||||
* However MinGW/Cygwin doesn't support weak attribute properly (even if it advertises
|
||||
* it), so we ignore it in such case since it's not convenient to go through
|
||||
* dlsym().
|
||||
* Under MSVC we could use alternatename, but it doesn't seem to be as reliable
|
||||
* as we'd like: https://stackoverflow.com/a/11529277/210151 and
|
||||
* https://devblogs.microsoft.com/oldnewthing/20200731-00/?p=104024
|
||||
*/
|
||||
#elif defined (G_OS_UNIX) && !defined (__APPLE__) && g_macro__has_attribute (weak)
|
||||
#elif defined (G_OS_UNIX) && !defined (__APPLE__) && !defined(__CYGWIN__) && g_macro__has_attribute (weak)
|
||||
|
||||
#define HAS_DYNAMIC_ASAN_LOADING
|
||||
|
||||
|
100
glib/gmain.h
@ -301,15 +301,101 @@ struct _GSourceCallbackFuncs
|
||||
*/
|
||||
typedef void (*GSourceDummyMarshal) (void);
|
||||
|
||||
/**
|
||||
* GSourceFuncsPrepareFunc:
|
||||
* @source: The #GSource
|
||||
* @timeout_: (out) (optional): the maximum timeout (in milliseconds) which should be passed to the poll call
|
||||
*
|
||||
* Checks the source for readiness.
|
||||
*
|
||||
* Called before all the file descriptors are polled. If the
|
||||
* source can determine that it is ready here (without waiting for the
|
||||
* results of the poll call) it should return %TRUE. It can also return
|
||||
* a @timeout_ value which should be the maximum timeout (in milliseconds)
|
||||
* which should be passed to the poll call. The actual timeout used will
|
||||
* be `-1` if all sources returned `-1`, or it will be the minimum of all
|
||||
* the @timeout_ values returned which were greater than or equal to `0`.
|
||||
* If the prepare function returns a timeout and the source also has a
|
||||
* ready time set, then the lower of the two will be used.
|
||||
*
|
||||
* Since 2.36 this may be `NULL`, in which case the effect is as if the
|
||||
* function always returns `FALSE` with a timeout of `-1`.
|
||||
*
|
||||
* Returns: %TRUE if the source is ready, %FALSE otherwise
|
||||
*
|
||||
* Since: 2.82
|
||||
*/
|
||||
typedef gboolean (*GSourceFuncsPrepareFunc) (GSource *source,
|
||||
gint *timeout_);
|
||||
|
||||
/**
|
||||
* GSourceFuncsCheckFunc:
|
||||
* @source: The #GSource
|
||||
*
|
||||
* Checks if the source is ready to be dispatched.
|
||||
*
|
||||
* Called after all the file descriptors are polled. The source
|
||||
* should return %TRUE if it is ready to be dispatched. Note that some
|
||||
* time may have passed since the previous prepare function was called,
|
||||
* so the source should be checked again here.
|
||||
*
|
||||
* Since 2.36 this may be `NULL`, in which case the effect is
|
||||
* as if the function always returns `FALSE`.
|
||||
*
|
||||
* Returns: %TRUE if ready to be dispatched, %FALSE otherwise
|
||||
*
|
||||
* Since: 2.82
|
||||
*/
|
||||
typedef gboolean (*GSourceFuncsCheckFunc) (GSource *source);
|
||||
|
||||
/**
|
||||
* GSourceFuncsDispatchFunc:
|
||||
* @source: The #GSource
|
||||
* @callback: (nullable): The #GSourceFunc to call
|
||||
* @user_data: (nullable): data to pass to @callback
|
||||
*
|
||||
* Dispatches the source callback.
|
||||
*
|
||||
* Called to dispatch the event source, after it has returned
|
||||
* `TRUE` in either its prepare or its check function, or if a ready time
|
||||
* has been reached. The dispatch function receives a callback function and
|
||||
* user data. The callback function may be `NULL` if the source was never
|
||||
* connected to a callback using [method@GLib.Source.set_callback]. The dispatch
|
||||
* function should call the callback function with @user_data and whatever
|
||||
* additional parameters are needed for this type of event source. The
|
||||
* return value of the dispatch function should be [const@GLib.SOURCE_REMOVE]
|
||||
* if the source should be removed or [const@GLib.SOURCE_CONTINUE] to keep it.
|
||||
*
|
||||
* Returns: [const@GLib.SOURCE_REMOVE] if the source should be removed,
|
||||
* [const@GLib.SOURCE_CONTINUE] otherwise.
|
||||
*
|
||||
* Since: 2.82
|
||||
*/
|
||||
typedef gboolean (*GSourceFuncsDispatchFunc) (GSource *source,
|
||||
GSourceFunc callback,
|
||||
gpointer user_data);
|
||||
|
||||
/**
|
||||
* GSourceFuncsFinalizeFunc:
|
||||
* @source: The #GSource
|
||||
*
|
||||
* Finalizes the source.
|
||||
*
|
||||
* Called when the source is finalized. At this point, the source
|
||||
* will have been destroyed, had its callback cleared, and have been removed
|
||||
* from its [type@GLib.MainContext], but it will still have its final reference
|
||||
* count, so methods can be called on it from within this function.
|
||||
*
|
||||
* Since: 2.82
|
||||
*/
|
||||
typedef void (*GSourceFuncsFinalizeFunc) (GSource *source);
|
||||
|
||||
struct _GSourceFuncs
|
||||
{
|
||||
gboolean (*prepare) (GSource *source,
|
||||
gint *timeout_);/* Can be NULL */
|
||||
gboolean (*check) (GSource *source);/* Can be NULL */
|
||||
gboolean (*dispatch) (GSource *source,
|
||||
GSourceFunc callback,
|
||||
gpointer user_data);
|
||||
void (*finalize) (GSource *source); /* Can be NULL */
|
||||
GSourceFuncsPrepareFunc prepare; /* Can be NULL */
|
||||
GSourceFuncsCheckFunc check; /* Can be NULL */
|
||||
GSourceFuncsDispatchFunc dispatch;
|
||||
GSourceFuncsFinalizeFunc finalize; /* Can be NULL */
|
||||
|
||||
/*< private >*/
|
||||
/* For use by g_source_set_closure */
|
||||
|
34
glib/gnode.c
@ -800,16 +800,38 @@ g_node_depth_traverse_level (GNode *node,
|
||||
* efficient than the other orders.
|
||||
*
|
||||
* Specifies the type of traversal performed by g_tree_traverse(),
|
||||
* g_node_traverse() and g_node_find(). The different orders are
|
||||
* illustrated here:
|
||||
* g_node_traverse() and g_node_find().
|
||||
*
|
||||
* The different orders are illustrated here:
|
||||
*
|
||||
* - In order: A, B, C, D, E, F, G, H, I
|
||||
* ![](Sorted_binary_tree_inorder.svg)
|
||||
* <picture>
|
||||
* <source srcset="Sorted_binary_tree_inorder-dark.svg"
|
||||
* media="(prefers-color-scheme: dark)">
|
||||
* <img src="Sorted_binary_tree_inorder.svg"
|
||||
* alt="Sorted binary tree, in-order traversal">
|
||||
* </picture>
|
||||
* - Pre order: F, B, A, D, C, E, G, I, H
|
||||
* ![](Sorted_binary_tree_preorder.svg)
|
||||
* <picture>
|
||||
* <source srcset="Sorted_binary_tree_preorder-dark.svg"
|
||||
* media="(prefers-color-scheme: dark)">
|
||||
* <img src="Sorted_binary_tree_preorder.svg"
|
||||
* alt="Sorted binary tree, pre-order traversal">
|
||||
* </picture>
|
||||
* - Post order: A, C, E, D, B, H, I, G, F
|
||||
* ![](Sorted_binary_tree_postorder.svg)
|
||||
* <picture>
|
||||
* <source srcset="Sorted_binary_tree_postorder-dark.svg"
|
||||
* media="(prefers-color-scheme: dark)">
|
||||
* <img src="Sorted_binary_tree_postorder.svg"
|
||||
* alt="Sorted binary tree, post-order traversal">
|
||||
* </picture>
|
||||
* - Level order: F, B, G, A, D, I, C, E, H
|
||||
* ![](Sorted_binary_tree_breadth-first_traversal.svg)
|
||||
* <picture>
|
||||
* <source srcset="Sorted_binary_tree_breadth-first_traversal-dark.svg"
|
||||
* media="(prefers-color-scheme: dark)">
|
||||
* <img src="Sorted_binary_tree_breadth-first_traversal.svg"
|
||||
* alt="Sorted binary tree, breadth-first level order traversal">
|
||||
* </picture>
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -289,10 +289,14 @@ msort_r (void *b, size_t n, size_t s, GCompareDataFunc cmp, void *arg)
|
||||
* @compare_func: (scope call): function to compare elements
|
||||
* @user_data: data to pass to @compare_func
|
||||
*
|
||||
* This is just like the standard C qsort() function, but
|
||||
* the comparison routine accepts a user data argument.
|
||||
* This is just like the standard C [`qsort()`](man:qsort(3)) function, but
|
||||
* the comparison routine accepts a user data argument
|
||||
* (like [`qsort_r()`](man:qsort_r(3))).
|
||||
*
|
||||
* This is guaranteed to be a stable sort since version 2.32.
|
||||
* Unlike `qsort()`, this is guaranteed to be a stable sort (since GLib 2.32).
|
||||
*
|
||||
* Deprecated: 2.82: `total_elems` is too small to represent larger arrays; use
|
||||
* [func@GLib.sort_array] instead
|
||||
*/
|
||||
void
|
||||
g_qsort_with_data (gconstpointer pbase,
|
||||
@ -301,5 +305,31 @@ g_qsort_with_data (gconstpointer pbase,
|
||||
GCompareDataFunc compare_func,
|
||||
gpointer user_data)
|
||||
{
|
||||
msort_r ((gpointer)pbase, total_elems, size, compare_func, user_data);
|
||||
g_sort_array (pbase, total_elems, size, compare_func, user_data);
|
||||
}
|
||||
|
||||
/**
|
||||
* g_sort_array:
|
||||
* @array: (not nullable) (array length=n_elements): start of array to sort
|
||||
* @n_elements: number of elements in the array
|
||||
* @element_size: size of each element
|
||||
* @compare_func: (scope call): function to compare elements
|
||||
* @user_data: data to pass to @compare_func
|
||||
*
|
||||
* This is just like the standard C [`qsort()`](man:qsort(3)) function, but
|
||||
* the comparison routine accepts a user data argument
|
||||
* (like [`qsort_r()`](man:qsort_r(3))).
|
||||
*
|
||||
* Unlike `qsort()`, this is guaranteed to be a stable sort.
|
||||
*
|
||||
* Since: 2.82
|
||||
*/
|
||||
void
|
||||
g_sort_array (const void *array,
|
||||
size_t n_elements,
|
||||
size_t element_size,
|
||||
GCompareDataFunc compare_func,
|
||||
void *user_data)
|
||||
{
|
||||
msort_r ((void *) array, n_elements, element_size, compare_func, user_data);
|
||||
}
|
||||
|
@ -35,13 +35,20 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GLIB_DEPRECATED_IN_2_82_FOR(g_sort_array)
|
||||
void g_qsort_with_data (gconstpointer pbase,
|
||||
gint total_elems,
|
||||
gsize size,
|
||||
GCompareDataFunc compare_func,
|
||||
gpointer user_data);
|
||||
|
||||
GLIB_AVAILABLE_IN_2_82
|
||||
void g_sort_array (const void *array,
|
||||
size_t n_elements,
|
||||
size_t element_size,
|
||||
GCompareDataFunc compare_func,
|
||||
void *user_data);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __G_QSORT_H__ */
|
||||
|
@ -2996,7 +2996,6 @@ test_case_run (GTestCase *tc,
|
||||
gchar *old_base = NULL;
|
||||
GSList **old_free_list, *filename_free_list = NULL;
|
||||
gboolean success = G_TEST_RUN_SUCCESS;
|
||||
gboolean free_test_data = TRUE;
|
||||
|
||||
old_base = g_strdup (test_uri_base);
|
||||
old_free_list = test_filename_free_list;
|
||||
@ -3055,7 +3054,7 @@ test_case_run (GTestCase *tc,
|
||||
}
|
||||
if (tc->fixture_teardown)
|
||||
tc->fixture_teardown (fixture, tc->test_data);
|
||||
free_test_data = FALSE;
|
||||
tc->fixture_teardown = NULL;
|
||||
if (tc->fixture_size)
|
||||
g_free (fixture);
|
||||
g_timer_stop (test_run_timer);
|
||||
@ -3073,13 +3072,6 @@ test_case_run (GTestCase *tc,
|
||||
g_timer_destroy (test_run_timer);
|
||||
}
|
||||
|
||||
/* In case the test didn’t run (due to being skipped or an error), the test
|
||||
* data may still need to be freed, as the client’s main() function may have
|
||||
* passed ownership of it into g_test_add_data_func_full() with a
|
||||
* #GDestroyNotify. */
|
||||
if (free_test_data && tc->fixture_size == 0 && tc->fixture_teardown != NULL)
|
||||
tc->fixture_teardown (tc->test_data, tc->test_data);
|
||||
|
||||
g_slist_free_full (filename_free_list, g_free);
|
||||
test_filename_free_list = old_free_list;
|
||||
g_free (test_uri_base);
|
||||
@ -3264,6 +3256,13 @@ g_test_run_suite (GTestSuite *suite)
|
||||
void
|
||||
g_test_case_free (GTestCase *test_case)
|
||||
{
|
||||
/* In case the test didn’t run (due to being skipped or an error), the test
|
||||
* data may still need to be freed, as the client’s main() function may have
|
||||
* passed ownership of it into g_test_add_data_func_full() with a
|
||||
* #GDestroyNotify. */
|
||||
if (test_case->fixture_size == 0 && test_case->fixture_teardown != NULL)
|
||||
test_case->fixture_teardown (test_case->test_data, test_case->test_data);
|
||||
|
||||
g_free (test_case->name);
|
||||
g_slice_free (GTestCase, test_case);
|
||||
}
|
||||
|
@ -463,26 +463,30 @@ pkg.generate(libglib,
|
||||
)
|
||||
meson.override_dependency('glib-2.0', libglib_dep)
|
||||
|
||||
# FIXME: This needs to be added to the `depends` of every invocation of
|
||||
# glib_compile_resources in the build process. We can drop this when
|
||||
# https://github.com/mesonbuild/meson/issues/13385 is fixed.
|
||||
gspawn_helpers = []
|
||||
# On Windows, glib needs a spawn helper for g_spawn* API
|
||||
if host_system == 'windows'
|
||||
if host_machine.cpu_family() == 'x86'
|
||||
executable('gspawn-win32-helper', 'gspawn-win32-helper.c',
|
||||
gspawn_helpers += executable('gspawn-win32-helper', 'gspawn-win32-helper.c',
|
||||
install : true,
|
||||
win_subsystem : 'windows',
|
||||
include_directories : configinc,
|
||||
dependencies : [libglib_dep])
|
||||
executable('gspawn-win32-helper-console', 'gspawn-win32-helper.c',
|
||||
gspawn_helpers += executable('gspawn-win32-helper-console', 'gspawn-win32-helper.c',
|
||||
install : true,
|
||||
c_args : ['-DHELPER_CONSOLE'],
|
||||
include_directories : configinc,
|
||||
dependencies : [libglib_dep])
|
||||
else
|
||||
executable('gspawn-win64-helper', 'gspawn-win32-helper.c',
|
||||
gspawn_helpers += executable('gspawn-win64-helper', 'gspawn-win32-helper.c',
|
||||
install : true,
|
||||
win_subsystem : 'windows',
|
||||
include_directories : configinc,
|
||||
dependencies : [libglib_dep])
|
||||
executable('gspawn-win64-helper-console', 'gspawn-win32-helper.c',
|
||||
gspawn_helpers += executable('gspawn-win64-helper-console', 'gspawn-win32-helper.c',
|
||||
install : true,
|
||||
c_args : ['-DHELPER_CONSOLE'],
|
||||
include_directories : configinc,
|
||||
|
@ -453,7 +453,7 @@ foreach test_name, extra_args : glib_tests
|
||||
install: install,
|
||||
)
|
||||
|
||||
depends = [extra_args.get('depends', [])]
|
||||
depends = [extra_args.get('depends', []), gspawn_helpers]
|
||||
suite = ['glib', 'core'] + extra_args.get('suite', [])
|
||||
timeout = suite.contains('slow') ? test_timeout_slow : test_timeout
|
||||
|
||||
|
@ -40,7 +40,7 @@ test_sort_basic (void)
|
||||
data[i] = g_random_int_range (0, 10000);
|
||||
}
|
||||
|
||||
g_qsort_with_data (data, 10000, sizeof (int), int_compare_data, NULL);
|
||||
g_sort_array (data, 10000, sizeof (int), int_compare_data, NULL);
|
||||
|
||||
for (i = 1; i < 10000; i++)
|
||||
g_assert_cmpint (data[i -1], <=, data[i]);
|
||||
@ -63,7 +63,7 @@ test_sort_zero_elements (void)
|
||||
}
|
||||
|
||||
/* 0 elements is a valid case */
|
||||
g_qsort_with_data (data, 0, sizeof (int), int_compare_data, NULL);
|
||||
g_sort_array (data, 0, sizeof (int), int_compare_data, NULL);
|
||||
|
||||
for (i = 0; i < 100; i++)
|
||||
g_assert_cmpint (data[i], ==, data_copy[i]);
|
||||
@ -105,7 +105,7 @@ test_sort_stable (void)
|
||||
data[i].i = i;
|
||||
}
|
||||
|
||||
g_qsort_with_data (data, 10000, sizeof (SortItem), item_compare_data, NULL);
|
||||
g_sort_array (data, 10000, sizeof (SortItem), item_compare_data, NULL);
|
||||
|
||||
for (i = 1; i < 10000; i++)
|
||||
{
|
||||
@ -129,7 +129,7 @@ test_sort_big (void)
|
||||
data[i].i = i;
|
||||
}
|
||||
|
||||
g_qsort_with_data (data, 10000, sizeof (BigItem), item_compare_data, NULL);
|
||||
g_sort_array (data, 10000, sizeof (BigItem), item_compare_data, NULL);
|
||||
|
||||
for (i = 1; i < 10000; i++)
|
||||
{
|
||||
@ -140,6 +140,28 @@ test_sort_big (void)
|
||||
g_free (data);
|
||||
}
|
||||
|
||||
static void
|
||||
test_sort_deprecated (void)
|
||||
{
|
||||
gint *data;
|
||||
gint i;
|
||||
|
||||
data = g_malloc (10000 * sizeof (int));
|
||||
for (i = 0; i < 10000; i++)
|
||||
{
|
||||
data[i] = g_random_int_range (0, 10000);
|
||||
}
|
||||
|
||||
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
|
||||
g_qsort_with_data (data, 10000, sizeof (int), int_compare_data, NULL);
|
||||
G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
|
||||
for (i = 1; i < 10000; i++)
|
||||
g_assert_cmpint (data[i -1], <=, data[i]);
|
||||
|
||||
g_free (data);
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
@ -149,6 +171,7 @@ main (int argc, char *argv[])
|
||||
g_test_add_func ("/sort/zero-elements", test_sort_zero_elements);
|
||||
g_test_add_func ("/sort/stable", test_sort_stable);
|
||||
g_test_add_func ("/sort/big", test_sort_big);
|
||||
g_test_add_func ("/sort/deprecated", test_sort_deprecated);
|
||||
|
||||
return g_test_run ();
|
||||
}
|
||||
|
@ -136,7 +136,7 @@ _g_module_open (const gchar *file_name,
|
||||
|
||||
lock_dlerror ();
|
||||
handle = dlopen (file_name,
|
||||
(bind_local ? 0 : RTLD_GLOBAL) | (bind_lazy ? RTLD_LAZY : RTLD_NOW));
|
||||
(bind_local ? RTLD_LOCAL : RTLD_GLOBAL) | (bind_lazy ? RTLD_LAZY : RTLD_NOW));
|
||||
if (!handle)
|
||||
{
|
||||
const gchar *message = fetch_dlerror (TRUE);
|
||||
|
@ -233,6 +233,42 @@ test_module_invalid_libtool_archive (void)
|
||||
g_free (la_filename);
|
||||
}
|
||||
|
||||
static void
|
||||
test_local_binding (void)
|
||||
{
|
||||
gchar *plugin = NULL;
|
||||
GModule *module_plugin = NULL, *module_self = NULL;
|
||||
GError *error = NULL;
|
||||
|
||||
gboolean found_symbol = FALSE;
|
||||
gpointer symbol = NULL;
|
||||
|
||||
g_test_summary ("Test that binding a library's symbols locally does not add them globally");
|
||||
|
||||
#if defined(G_PLATFORM_WIN32)
|
||||
g_test_skip ("G_MODULE_BIND_LOCAL is not supported on Windows.");
|
||||
return;
|
||||
#endif
|
||||
|
||||
plugin = g_test_build_filename (G_TEST_BUILT, MODULE_FILENAME_PREFIX "moduletestplugin_a_" MODULE_TYPE, NULL);
|
||||
|
||||
module_plugin = g_module_open_full (plugin, G_MODULE_BIND_LOCAL, &error);
|
||||
g_assert_no_error (error);
|
||||
g_assert_nonnull (module_plugin);
|
||||
|
||||
module_self = g_module_open_full (NULL, 0, &error);
|
||||
g_assert_no_error (error);
|
||||
g_assert_nonnull (module_self);
|
||||
|
||||
found_symbol = g_module_symbol (module_self, "gplugin_say_boo_func", &symbol);
|
||||
g_assert_false (found_symbol);
|
||||
g_assert_null (symbol);
|
||||
|
||||
g_module_close (module_self);
|
||||
g_module_close (module_plugin);
|
||||
g_free (plugin);
|
||||
}
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
@ -240,6 +276,7 @@ main (int argc, char *argv[])
|
||||
|
||||
g_test_add_func ("/module/basics", test_module_basics);
|
||||
g_test_add_func ("/module/invalid-libtool-archive", test_module_invalid_libtool_archive);
|
||||
g_test_add_func ("/module/local-binding", test_local_binding);
|
||||
|
||||
return g_test_run ();
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ void _g_object_set_has_signal_handler (GObject *object,
|
||||
*
|
||||
* Currently private.
|
||||
*/
|
||||
#define _G_DEFINE_TYPE_EXTENDED_WITH_PRELUDE(TN, t_n, T_P, _f_, _P_, _C_) _G_DEFINE_TYPE_EXTENDED_BEGIN_PRE (TN, t_n, T_P) {_P_;} _G_DEFINE_TYPE_EXTENDED_BEGIN_REGISTER (TN, t_n, T_P, _f_){_C_;} _G_DEFINE_TYPE_EXTENDED_END()
|
||||
#define _G_DEFINE_TYPE_EXTENDED_WITH_PRELUDE(TN, t_n, T_P, _f_, _P_, _C_) _G_DEFINE_TYPE_EXTENDED_BEGIN_PRE (TN, t_n) {_P_;} _G_DEFINE_TYPE_EXTENDED_BEGIN_REGISTER (TN, t_n, T_P, _f_){_C_;} _G_DEFINE_TYPE_EXTENDED_END()
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@ -2278,7 +2278,7 @@ static void type_name##_class_intern_init (gpointer klass) \
|
||||
#endif /* GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_80 */
|
||||
|
||||
/* Added for _G_DEFINE_TYPE_EXTENDED_WITH_PRELUDE */
|
||||
#define _G_DEFINE_TYPE_EXTENDED_BEGIN_PRE(TypeName, type_name, TYPE_PARENT) \
|
||||
#define _G_DEFINE_TYPE_EXTENDED_BEGIN_PRE(TypeName, type_name) \
|
||||
\
|
||||
static void type_name##_init (TypeName *self); \
|
||||
static void type_name##_class_init (TypeName##Class *klass); \
|
||||
@ -2330,12 +2330,12 @@ type_name##_get_type_once (void) \
|
||||
return g_define_type_id; \
|
||||
} /* closes type_name##_get_type_once() */
|
||||
|
||||
/* This was defined before we had G_DEFINE_TYPE_WITH_CODE_AND_PRELUDE, it's simplest
|
||||
* to keep it.
|
||||
/* This was defined before we had _G_DEFINE_TYPE_EXTENDED_WITH_PRELUDE in
|
||||
* gtype-private.h, it's simplest to keep it.
|
||||
*/
|
||||
#define _G_DEFINE_TYPE_EXTENDED_BEGIN(TypeName, type_name, TYPE_PARENT, flags) \
|
||||
_G_DEFINE_TYPE_EXTENDED_BEGIN_PRE(TypeName, type_name, TYPE_PARENT) \
|
||||
_G_DEFINE_TYPE_EXTENDED_BEGIN_REGISTER(TypeName, type_name, TYPE_PARENT, flags) \
|
||||
_G_DEFINE_TYPE_EXTENDED_BEGIN_PRE (TypeName, type_name) \
|
||||
_G_DEFINE_TYPE_EXTENDED_BEGIN_REGISTER (TypeName, type_name, TYPE_PARENT, flags)
|
||||
|
||||
/* Intentionally using (GTypeFlags) 0 instead of G_TYPE_FLAG_NONE here,
|
||||
* to avoid deprecation warnings with older GLIB_VERSION_MAX_ALLOWED */
|
||||
|
@ -364,9 +364,9 @@ g_value_array_sort_with_data (GValueArray *value_array,
|
||||
g_return_val_if_fail (compare_func != NULL, NULL);
|
||||
|
||||
if (value_array->n_values)
|
||||
g_qsort_with_data (value_array->values,
|
||||
value_array->n_values,
|
||||
sizeof (value_array->values[0]),
|
||||
compare_func, user_data);
|
||||
g_sort_array (value_array->values,
|
||||
value_array->n_values,
|
||||
sizeof (value_array->values[0]),
|
||||
compare_func, user_data);
|
||||
return value_array;
|
||||
}
|
||||
|
@ -664,6 +664,52 @@ test_valuearray_basic (void)
|
||||
g_value_array_free (a2);
|
||||
}
|
||||
|
||||
static gint
|
||||
cmpint_with_data (gconstpointer a,
|
||||
gconstpointer b,
|
||||
gpointer user_data)
|
||||
{
|
||||
const GValue *aa = a;
|
||||
const GValue *bb = b;
|
||||
|
||||
g_assert_cmpuint (GPOINTER_TO_UINT (user_data), ==, 123);
|
||||
|
||||
return g_value_get_int (aa) - g_value_get_int (bb);
|
||||
}
|
||||
|
||||
static void
|
||||
test_value_array_sort_with_data (void)
|
||||
{
|
||||
GValueArray *a, *a2;
|
||||
GValue v = G_VALUE_INIT;
|
||||
|
||||
a = g_value_array_new (20);
|
||||
|
||||
/* Try sorting an empty array. */
|
||||
a2 = g_value_array_sort_with_data (a, cmpint_with_data, GUINT_TO_POINTER (456));
|
||||
g_assert_cmpuint (a->n_values, ==, 0);
|
||||
g_assert_true (a2 == a);
|
||||
|
||||
/* Add some values and try sorting them. */
|
||||
g_value_init (&v, G_TYPE_INT);
|
||||
for (unsigned int i = 0; i < 100; i++)
|
||||
{
|
||||
g_value_set_int (&v, 100 - i);
|
||||
g_value_array_append (a, &v);
|
||||
}
|
||||
|
||||
g_assert_cmpint (a->n_values, ==, 100);
|
||||
|
||||
a2 = g_value_array_sort_with_data (a, cmpint_with_data, GUINT_TO_POINTER (123));
|
||||
|
||||
for (unsigned int i = 0; i < a->n_values - 1; i++)
|
||||
g_assert_cmpint (g_value_get_int (&a->values[i]), <=, g_value_get_int (&a->values[i+1]));
|
||||
|
||||
g_assert_true (a2 == a);
|
||||
|
||||
g_value_array_free (a);
|
||||
}
|
||||
|
||||
/* We create some dummy objects with this relationship:
|
||||
*
|
||||
* GObject TestInterface
|
||||
@ -765,6 +811,7 @@ main (int argc, char *argv[])
|
||||
|
||||
g_test_add_func ("/value/basic", test_value_basic);
|
||||
g_test_add_func ("/value/array/basic", test_valuearray_basic);
|
||||
g_test_add_func ("/value/array/sort-with-data", test_value_array_sort_with_data);
|
||||
g_test_add_func ("/value/collection", test_collection);
|
||||
g_test_add_func ("/value/copying", test_copying);
|
||||
g_test_add_func ("/value/enum-transformation", test_enum_transformation);
|
||||
|
@ -2457,7 +2457,7 @@ endif
|
||||
|
||||
glib_conf.set('HAVE_PROC_SELF_CMDLINE', have_proc_self_cmdline)
|
||||
|
||||
python = import('python').find_installation(modules: ['packaging'])
|
||||
python = import('python').find_installation()
|
||||
|
||||
python_version = python.language_version()
|
||||
python_version_req = '>=3.7'
|
||||
|