Commit 9d45453a authored by Jeremy Bicha's avatar Jeremy Bicha

New upstream version 3.25.3

parents
root = true
[*]
charset = utf-8
end_of_line = lf
[*.[ch]]
indent_size = 2
indent_style = space
insert_final_newline = true
max_line_length = 100
tab_width = 2
[*.css]
indent_size = 2
tab_size = 2
indent_style = space
[*.ui]
indent_size = 2
tab_size = 2
indent_style = space
[*.rst]
indent_size = 3
tab_size = 3
indent_style = space
[*.{xml.in,xml}]
indent_size = 2
tab_size = 2
indent_style = space
[*.json]
indent_size = 4
tab_size = 4
[meson.build]
indent_size = 2
indent_style = space
Christian Hergert
Dimitris Zenios
Emmanuele Bassi
Garrett Regier
Georges Basile Stavracas Neto
Sébastien Lafargue
# Contributing
## Licensing
Your work is considered a derivative work of the libdazzle codebase and therefore must be licensed as GPLv3+.
You may optionally grant other licensing in addition to GPLv3+ such as LGPLv2.1+ or MIT X11.
However, as part of libdazzle, which is GPLv3+, the combined work will be GPLv3+.
You do not need to assign us copyright attribution.
It is our belief that you should always retain copyright on your own work.
## Testing
When working on a new widget or tool, try to write unit tests to prove the implementation.
Not everything we have in the code base has tests, and ideally that will improve, not get worse.
## Troubleshooting
If you configure the meson project with `-Denable_tracing=true` then libdazzle with be built with tracing.
This allows various parts of the code to use `DZL_ENTRY`, `DZL_EXIT` and other tracing macros to log function calls.
You might find this useful in tracking down difficult re-entrancy or simply learn "how does this work".
If you need to add additional tracing macros to debug a problem, it is probably a good idea to submit a patch to add them.
Chances are someone else will need to debug stuff in the future.
## Code Style
We follow the GObject and Gtk coding style.
That is often unfamiliar to those who have not been hacking on GNU projects for the past couple of decades.
However, it is largely entrenched in our community, so we try to be consistent.
```c
static gboolean
this_is_a_function (GtkWidget *param,
const gchar *another_param,
guint third_param,
GError **error)
{
g_return_val_if_fail (GTK_IS_WIDGET (param), FALSE);
g_return_val_if_fail (third_param > 10, FALSE);
if (another_param != NULL)
{
if (!do_some_more_work ())
{
g_set_error (error,
G_IO_ERROR,
G_IO_ERROR_FAILED,
"Something failed");
return FALSE;
}
}
goto_labels_here:
return TRUE;
}
```
```c
void do_something_one (GtkWidget *widget);
void do_something_two (GtkWidget *widget,
GError **error);
gchar *do_something_three (GtkWidget *widget);
gboolean do_something_four (GtkWidget *widget);
```
* Notice that we use 2-space indention.
* We indent new blocks {} with 2 spaces, and braces on their own line. We understand that this is confusing at first, but it is rather nice once it becomes familiar.
* No tabs, spaces only.
* Always compare against `NULL` rather than implicit comparisons. This eases ports to other languages and readability.
* Use #define for constants. Try to avoid "magic constants".
* goto labels are fully unindented.
* Align function parameters.
* Align blocks of function declarations in the header. This vastly improves readability and scanning to find what you want.
If in doubt, look for examples elsewhere in the codebase.
This diff is collapsed.
==============
Version 3.25.3
==============
This is our first release of libdazzle. While we would love for a perfect first
release, we expect you'll find issues. So please help us get things stable as
we move towards GNOME 3.26.
Our focus is building a utility kit GNOME applications. If you want to see
practical examples of using Dazzle, we suggestion looking at the GNOME Builder
project which uses Dazzle extensively.
# Dazzle
The libdazzle library is a companion library to GObject and Gtk+.
It provides various features that we wish were in the underlying library but cannot for various reasons.
In most cases, they are wildly out of scope for those libraries.
In other cases, our design isn't quite generic enough to work for everyone.
While we don't want to blind our users, we do think of dazzle as something you haven't seen before.
As we improve our implementations in libdazzle, we do think that bits of libdazzle can be migrated into upstream projects.
Currently, the primary consumer of libdazzle is the Builder IDE.
Most of this code was extracted from Builder so that it could be used by others.
The libdazzle project is heavily opinionated, and tends to gravitate towards design that matches the GNOME 3 human interface guidelines.
## Language Support
libdazzle, as you might imagine, is written in C.
We find C the most convenient language when it comes down to interopability with other language runtimes.
libdazzle supports GObject Introspection and vapi meaning you can use libdazzle from a wide variety of languages including:
- Python 2.7 or 3.x
- JavaScript (using Gjs/Spidermonkey)
- Lua/Luajit
- Perl
- Rust
- Vala
and many others that implement binding support for GObject Introspection.
## License
libdazzle is licensed under the GPLv3+.
We *DO NOT* require copyright attribution to contribute to libdazzle.
## Building
We use the meson (and thereby Ninja) build system for libdazzle.
The quickest way to get going is to do the following:
```sh
meson . build
cd build
ninja
ninja install
```
If you need control over installation paths, see `meson --help`.
Here is a fairly common way to configure libdazzle.
```sh
meson --prefix=/opt/gnome --libdir=/opt/gnome/lib . build
```
## Components
libdazzle has a wide range of components from utilities for `GIO`, widgets for `Gtk`, an animation framework, state machines, paneling and high-performance counters.
### TODO: overview of components
Until we have an overrview here, check out the src/ directory.
/* Theme agnostic or base-layer CSS styling */
@import url("resource:///org/gnome/dazzle/themes/shared.css");
/* Theme specific styling */
@import url("resource:///org/gnome/dazzle/themes/Adwaita/Adwaita-panels.css");
@import url("resource:///org/gnome/dazzle/themes/Adwaita/Adwaita-dark-graphs.css");
@import url("resource:///org/gnome/dazzle/themes/Adwaita/Adwaita-dark-searchbar.css");
/* Theme agnostic or base-layer CSS styling */
@import url("resource:///org/gnome/dazzle/themes/shared.css");
/* Theme specific styling */
@import url("resource:///org/gnome/dazzle/themes/Adwaita/Adwaita-graphs.css");
@import url("resource:///org/gnome/dazzle/themes/Adwaita/Adwaita-panels.css");
@import url("resource:///org/gnome/dazzle/themes/Adwaita/Adwaita-searchbar.css");
dzlgraphview {
background-color: #232729;
background-size: 8px 8px;
background-image: repeating-linear-gradient(0deg, #2e2e2e, #2e2e2e 1px, transparent 1px, transparent 8px),
repeating-linear-gradient(-90deg, #2e2e2e, #2e2e2e 1px, transparent 1px, transparent 8px);
}
dzlsearchbar box.search-bar {
background-color: #2c3133;
box-shadow: 0 4px 3px -5px #2c3030 inset,
0 -1px 0 #1c1f1f inset;
}
dzlsearchbar:backdrop box.search-bar {
box-shadow: 0 -1px 0 #2c3030 inset;
}
dzlgraphview.view {
background-color: #f6f7f8;
background-size: 8px 8px;
background-image: repeating-linear-gradient(0deg, #f0f1f2, #f0f1f2 1px, transparent 1px, transparent 8px),
repeating-linear-gradient(-90deg, #f0f1f2, #f0f1f2 1px, transparent 1px, transparent 8px);
}
dzldockstack dzltabstrip {
padding-top: 2px;
background-color: @content_view_bg;
color: @theme_fg_color;
border-bottom: 1px solid mix(@theme_bg_color, @borders, 0.25);
}
dzldockstack dzltabstrip button.control,
dzldockstack dzltabstrip dzltab {
border-bottom: 3px;
border-bottom-style: solid;
border-bottom-color: transparent;
margin-left: 6px;
margin-right: 6px;
color: @theme_fg_color;
}
dzldockstack dzltabstrip dzltab:active {
border-bottom-color: @theme_selected_bg_color;
}
dzldockstack dzltabstrip button.control:last-child {
margin-right: 16px;
}
dzldockstack dzltabstrip button.control:hover,
dzldockstack dzltabstrip dzltab:hover {
border-bottom-color: mix(@borders, @theme_bg_color, 0.25);
}
dzldockstack dzltabstrip button.control:hover:checked,
dzldockstack dzltabstrip button.control:checked,
dzldockstack dzltabstrip dzltab:hover:checked,
dzldockstack dzltabstrip dzltab:checked {
border-bottom-color: @theme_selected_bg_color;
}
dzlsearchbar box.search-bar {
background-color: #d6d6d6;
box-shadow: 0 4px 3px -5px #aaa inset,
0 -1px 0 #a1a1a1 inset;
}
dzlsearchbar:backdrop box.search-bar {
background-color: #d5d5d5;
box-shadow: none;
}
/* Theme agnostic or base-layer CSS styling */
@import url("resource:///org/gnome/dazzle/themes/shared.css");
/* Theme specific styling */
@import url("resource:///org/gnome/dazzle/themes/Arc/Arc-panels.css");
dzldockstack dzltabstrip {
background-color: @theme_bg_color;
}
dzldockstack dzltabstrip button.control:hover:checked,
dzldockstack dzltabstrip button.control:checked,
dzldockstack dzltabstrip dzltab:hover:checked,
dzldockstack dzltabstrip dzltab:checked {
color: @theme_fg_color;
background-color: @theme_base_color;
border-color: @borders;
}
dzldockstack dzltabstrip dzltab {
font-size: 0.9em;
margin-top: 3px;
padding-bottom: 3px;
border-style: solid;
border-color: transparent;
border-right-width: 1px;
border-left-width: 1px;
border-top-width: 1px;
border-bottom-width: 0px;
}
dzldockstack dzltabstrip dzltab:backdrop:checked,
dzldockstack dzltabstrip dzltab:backdrop {
background-color: alpha(@theme_base_color, 0.25);
}
dzldockstack dzltabstrip dzltab:checked {
border-left-color: @borders;
border-right-color: @borders;
border-top-color: @borders;
}
dzldockstack dzltabstrip dzltab:checked:first-child {
border-left-color: alpha(@theme_base_color, 0.25);
}
dzldockstack dzltabstrip dzltab:checked:last-child {
border-right-color: alpha(@theme_base_color, 0.25);
}
/* Theme agnostic or base-layer CSS styling */
@import url("resource:///org/gnome/dazzle/themes/shared/shared-graphs.css");
@import url("resource:///org/gnome/dazzle/themes/shared/shared-panels.css");
@import url("resource:///org/gnome/dazzle/themes/shared/shared-pathbar.css");
@import url("resource:///org/gnome/dazzle/themes/shared/shared-pillbox.css");
@import url("resource:///org/gnome/dazzle/themes/shared/shared-preferences.css");
@import url("resource:///org/gnome/dazzle/themes/shared/shared-progressbutton.css");
@import url("resource:///org/gnome/dazzle/themes/shared/shared-stacklist.css");
@import url("resource:///org/gnome/dazzle/themes/shared/shared-suggestions.css");
dzlgraphview.view {
background-color: transparent;
background-size: 8px 8px;
background-image: repeating-linear-gradient(0deg, alpha(@borders,0.25), alpha(@borders,0.25) 1px, transparent 1px, transparent 8px),
repeating-linear-gradient(-90deg, alpha(@borders,0.25), alpha(@borders,0.25) 1px, transparent 1px, transparent 8px);
}
dzldockstack dzltabstrip button.control,
dzldockstack dzltabstrip dzltab button,
dzldockstack dzltabstrip dzltab {
transition-duration: 200ms;
}
dzldockstack dzltabstrip dzltab button {
padding: 0;
margin: 0;
border: none;
background: none;
box-shadow: none;
}
dzldockstack dzltabstrip button.control,
dzldockstack dzltabstrip dzltab {
background: transparent;
box-shadow: none;
border: none;
padding: 0;
margin: 0;
}
dzldockpaned .handle {
border: 1px solid @borders;
}
dzldockbinedge {
background-color: @content_view_bg;
border-color: @borders;
border-style: solid;
}
dzldockbinedge.right {
border-left-width: 1px;
}
dzldockbinedge.left {
border-right-width: 1px;
}
dzldockbinedge.bottom {
border-top-width: 1px;
}
dzlpathbar button {
background: none;
border: none;
box-shadow: none;
border-radius: 0px;
border-top: 2px solid transparent;
border-bottom: 2px solid transparent;
opacity: 0.75;
padding: 3px 3px 0px 3px;
}
dzlpathbar button image {
color: alpha(currentColor, 0.8);
}
dzlpathbar label.separator {
font-size: 0.83333em;
opacity: 0.55;
}
dzlpathbar button:checked {
border-bottom: 2px solid @theme_selected_bg_color;
font-weight: bold;
opacity: 1;
}
dzlpathbar button:checked:backdrop {
border-bottom-color: alpha(@borders,.75);
}
dzlpathbar button:hover {
opacity: 0.9;
border-bottom-color: @borders;
}
dzlpillbox {
border-radius: 3px;
background-color: mix(@borders, @theme_bg_color, .5);
}
dzlpillbox:backdrop {
border-radius: 3px;
background-color: mix(@borders, @theme_unfocused_bg_color, .75);
}
entry.preferences-search {
border: none;
border-right: 1px solid alpha(@borders, 0.55);
border-bottom: 1px solid alpha(@borders, 0.55);
border-radius: 0;
}
dzlpreferencesview stacksidebar list {
background-color: @content_view_bg;
border-right: 1px solid alpha(@borders, 0.55);
}
dzlpreferencesview stacksidebar list separator {
background-color: transparent;
}
dzlpreferencesview list row entry {
background: transparent;
border: none;
padding: 0;
padding-left: 5px;
border-radius: 3px;
margin: -5px;
}
dzlpreferencesview list row spinbutton entry {
margin-left: 2px;
}
dzlpreferencesview dzlpreferencesgroup list row {
padding: 10px;
border-bottom: 1px solid alpha(@borders, 0.2);
}
dzlpreferencesview dzlpreferencesgroup list row:last-child {
border-bottom: none;
}
dzlpreferencesview dzlpreferencesgroup list entry {
background: none;
min-height: 0px;
}
.install-progress {
background-image: linear-gradient(to top, @theme_selected_bg_color 2px, alpha(@theme_selected_bg_color, 0) 2px);
background-repeat: no-repeat;
background-position: 0 bottom;
transition: none;
}
.install-progress:dir(rtl) {
background-position: 100% bottom;
}
dzlstacklist row {
padding: 3px 0;
color: @theme_fg_color;
}
dzlstacklist row label.dim-label {
font-size: smaller;
}
dzlstacklist row:backdrop {
color: @theme_unfocused_fg_color;
}
dzlstacklist row image {
margin: 6px 12px;
min-height: 16px;
min-width: 16px;
opacity: 0.7;
}
dzlstacklist list.stack-header {
background-color: @theme_base_color;
border-bottom: 1px solid @borders;
}
dzlstacklist list.stack-header:backdrop {
background-color: @theme_unfocused_base_color;
border-color: @unfocused_borders;
}
dzlstacklist list.stack-header row:not(:last-child) {
border-bottom: 1px solid rgba(0,0,0,0.1);
}
dzlstacklist list:not(.stack-header) row:active,
dzlstacklist list:not(.stack-header) row:selected,
dzlstacklist list.stack-header row:not(:last-child):active,
dzlstacklist list.stack-header row:not(:last-child):selected {
color: @theme_selected_fg_color;
background-color: @theme_selected_bg_color;
}
dzlstacklist list.stack-header row:last-child label:not(.dim-label) {
font-weight: bold;
}
dzlsuggestionpopover {
background: transparent;
}
dzlsuggestionpopover > revealer > box {
margin: 0px 0px 60px 0px;
border-radius: 0px;
border-width: 0px;
border-bottom: 1px solid @borders;
box-shadow: 0px -6px 12px #000;
}