├── .editorconfig ├── .gitignore ├── .gitlab-ci.yml ├── AUTHORS ├── CONTRIBUTING.md ├── COPYING ├── NEWS ├── README.md ├── data └── themes │ ├── Adwaita-dark.css │ ├── Adwaita.css │ ├── Adwaita │ ├── Adwaita-dark-graphs.css │ ├── Adwaita-dark-searchbar.css │ ├── Adwaita-graphs.css │ ├── Adwaita-panels.css │ └── Adwaita-searchbar.css │ ├── Arc.css │ ├── Arc │ └── Arc-panels.css │ ├── shared.css │ └── shared │ ├── shared-graphs.css │ ├── shared-menus.css │ ├── shared-panels.css │ ├── shared-pathbar.css │ ├── shared-pillbox.css │ ├── shared-preferences.css │ ├── shared-progressbutton.css │ ├── shared-stacklist.css │ └── shared-suggestions.css ├── doc ├── dazzle-docs.sgml ├── meson.build └── xml │ ├── gtkdocentities.ent.in │ └── meson.build ├── examples ├── app │ ├── README.md │ ├── example-application.c │ ├── example-application.h │ ├── example-document-view.c │ ├── example-document-view.h │ ├── example-document-view.ui │ ├── example-document.c │ ├── example-document.h │ ├── example-window.c │ ├── example-window.h │ ├── example-window.ui │ ├── example.gresources.xml │ ├── gtk │ │ └── menus.ui │ ├── main.c │ ├── meson.build │ ├── shortcuts │ │ └── default.keytheme │ └── themes │ │ └── shared.css └── graph │ └── js │ └── cpu_graph.js ├── libdazzle.doap ├── meson.build ├── meson_options.txt ├── po ├── LINGUAS ├── POTFILES.in ├── POTFILES.skip ├── cs.po ├── de.po ├── es.po ├── eu.po ├── meson.build ├── pl.po ├── sr.po ├── sv.po ├── uk.po └── zh_CN.po ├── src ├── Dazzle-1.0.metadata ├── actions │ ├── dzl-action-group.h │ ├── dzl-child-property-action.c │ ├── dzl-child-property-action.h │ ├── dzl-properties-group.c │ ├── dzl-properties-group.h │ ├── dzl-settings-flag-action.c │ ├── dzl-settings-flag-action.h │ ├── dzl-widget-action-group.c │ ├── dzl-widget-action-group.h │ └── meson.build ├── animation │ ├── dzl-animation.c │ ├── dzl-animation.h │ ├── dzl-box-theatric.c │ ├── dzl-box-theatric.h │ ├── dzl-frame-source.c │ ├── dzl-frame-source.h │ └── meson.build ├── app │ ├── dzl-application-window.c │ ├── dzl-application-window.h │ ├── dzl-application.c │ ├── dzl-application.h │ └── meson.build ├── backports │ ├── gtkeventcontrollermotion.c │ └── gtkeventcontrollermotion.h ├── bindings │ ├── dzl-binding-group.c │ ├── dzl-binding-group.h │ ├── dzl-signal-group.c │ ├── dzl-signal-group.h │ └── meson.build ├── cache │ ├── dzl-task-cache.c │ ├── dzl-task-cache.h │ └── meson.build ├── dazzle.gresources.xml ├── dazzle.h ├── dzl-debug.h.in ├── dzl-enums.c.in ├── dzl-enums.h.in ├── dzl-init.c ├── dzl-version-macros.h ├── dzl-version.h.in ├── files │ ├── dzl-directory-model.c │ ├── dzl-directory-model.h │ ├── dzl-directory-reaper.c │ ├── dzl-directory-reaper.h │ ├── dzl-file-transfer.c │ ├── dzl-file-transfer.h │ ├── dzl-recursive-file-monitor.c │ ├── dzl-recursive-file-monitor.h │ └── meson.build ├── gconstructor.h ├── graphing │ ├── dzl-cpu-graph.c │ ├── dzl-cpu-graph.h │ ├── dzl-cpu-model.c │ ├── dzl-cpu-model.h │ ├── dzl-graph-column-private.h │ ├── dzl-graph-column.c │ ├── dzl-graph-column.h │ ├── dzl-graph-line-renderer.c │ ├── dzl-graph-line-renderer.h │ ├── dzl-graph-model.c │ ├── dzl-graph-model.h │ ├── dzl-graph-renderer.c │ ├── dzl-graph-renderer.h │ ├── dzl-graph-view.c │ ├── dzl-graph-view.h │ └── meson.build ├── menus │ ├── dzl-joined-menu.c │ ├── dzl-joined-menu.h │ ├── dzl-menu-button-item.c │ ├── dzl-menu-button-item.h │ ├── dzl-menu-button-section.c │ ├── dzl-menu-button-section.h │ ├── dzl-menu-button-section.ui │ ├── dzl-menu-button.c │ ├── dzl-menu-button.h │ ├── dzl-menu-button.ui │ ├── dzl-menu-manager.c │ ├── dzl-menu-manager.h │ └── meson.build ├── meson.build ├── panel │ ├── dzl-dock-bin-edge-private.h │ ├── dzl-dock-bin-edge.c │ ├── dzl-dock-bin-edge.h │ ├── dzl-dock-bin.c │ ├── dzl-dock-bin.h │ ├── dzl-dock-item.c │ ├── dzl-dock-item.h │ ├── dzl-dock-manager.c │ ├── dzl-dock-manager.h │ ├── dzl-dock-overlay-edge.c │ ├── dzl-dock-overlay-edge.h │ ├── dzl-dock-overlay.c │ ├── dzl-dock-overlay.h │ ├── dzl-dock-paned-private.h │ ├── dzl-dock-paned.c │ ├── dzl-dock-paned.h │ ├── dzl-dock-revealer.c │ ├── dzl-dock-revealer.h │ ├── dzl-dock-stack.c │ ├── dzl-dock-stack.h │ ├── dzl-dock-transient-grab.c │ ├── dzl-dock-transient-grab.h │ ├── dzl-dock-types.h │ ├── dzl-dock-widget.c │ ├── dzl-dock-widget.h │ ├── dzl-dock-window.c │ ├── dzl-dock-window.h │ ├── dzl-dock.c │ ├── dzl-dock.h │ ├── dzl-tab-private.h │ ├── dzl-tab-strip.c │ ├── dzl-tab-strip.h │ ├── dzl-tab.c │ ├── dzl-tab.h │ ├── meson.build │ ├── panel-bottom-pane-symbolic.svg │ ├── panel-left-pane-symbolic.svg │ └── panel-right-pane-symbolic.svg ├── pathbar │ ├── dzl-path-bar.c │ ├── dzl-path-bar.h │ ├── dzl-path-element.c │ ├── dzl-path-element.h │ ├── dzl-path.c │ ├── dzl-path.h │ └── meson.build ├── prefs │ ├── dzl-preferences-bin-private.h │ ├── dzl-preferences-bin.c │ ├── dzl-preferences-bin.h │ ├── dzl-preferences-entry.c │ ├── dzl-preferences-entry.h │ ├── dzl-preferences-entry.ui │ ├── dzl-preferences-file-chooser-button.c │ ├── dzl-preferences-file-chooser-button.h │ ├── dzl-preferences-file-chooser-button.ui │ ├── dzl-preferences-flow-box.c │ ├── dzl-preferences-flow-box.h │ ├── dzl-preferences-font-button.c │ ├── dzl-preferences-font-button.h │ ├── dzl-preferences-font-button.ui │ ├── dzl-preferences-group-private.h │ ├── dzl-preferences-group.c │ ├── dzl-preferences-group.h │ ├── dzl-preferences-group.ui │ ├── dzl-preferences-page-private.h │ ├── dzl-preferences-page.c │ ├── dzl-preferences-page.h │ ├── dzl-preferences-page.ui │ ├── dzl-preferences-spin-button.c │ ├── dzl-preferences-spin-button.h │ ├── dzl-preferences-spin-button.ui │ ├── dzl-preferences-switch.c │ ├── dzl-preferences-switch.h │ ├── dzl-preferences-switch.ui │ ├── dzl-preferences-view.c │ ├── dzl-preferences-view.h │ ├── dzl-preferences-view.ui │ ├── dzl-preferences.c │ ├── dzl-preferences.h │ └── meson.build ├── search │ ├── dzl-fuzzy-index-builder.c │ ├── dzl-fuzzy-index-builder.h │ ├── dzl-fuzzy-index-cursor.c │ ├── dzl-fuzzy-index-cursor.h │ ├── dzl-fuzzy-index-match.c │ ├── dzl-fuzzy-index-match.h │ ├── dzl-fuzzy-index-private.h │ ├── dzl-fuzzy-index.c │ ├── dzl-fuzzy-index.h │ ├── dzl-fuzzy-mutable-index.c │ ├── dzl-fuzzy-mutable-index.h │ ├── dzl-levenshtein.c │ ├── dzl-levenshtein.h │ ├── dzl-pattern-spec.c │ ├── dzl-pattern-spec.h │ ├── dzl-trie.c │ ├── dzl-trie.h │ └── meson.build ├── settings │ ├── dzl-settings-sandwich.c │ ├── dzl-settings-sandwich.h │ └── meson.build ├── shortcuts │ ├── dzl-shortcut-accel-dialog.c │ ├── dzl-shortcut-accel-dialog.h │ ├── dzl-shortcut-accel-dialog.ui │ ├── dzl-shortcut-chord.c │ ├── dzl-shortcut-chord.h │ ├── dzl-shortcut-closure-chain.c │ ├── dzl-shortcut-closure-chain.h │ ├── dzl-shortcut-context.c │ ├── dzl-shortcut-context.h │ ├── dzl-shortcut-controller.c │ ├── dzl-shortcut-controller.h │ ├── dzl-shortcut-label.c │ ├── dzl-shortcut-label.h │ ├── dzl-shortcut-manager.c │ ├── dzl-shortcut-manager.h │ ├── dzl-shortcut-model.c │ ├── dzl-shortcut-model.h │ ├── dzl-shortcut-phase.c │ ├── dzl-shortcut-phase.h │ ├── dzl-shortcut-private.h │ ├── dzl-shortcut-simple-label.c │ ├── dzl-shortcut-simple-label.h │ ├── dzl-shortcut-theme-editor.c │ ├── dzl-shortcut-theme-editor.h │ ├── dzl-shortcut-theme-editor.ui │ ├── dzl-shortcut-theme-load.c │ ├── dzl-shortcut-theme-save.c │ ├── dzl-shortcut-theme.c │ ├── dzl-shortcut-theme.h │ ├── dzl-shortcut-tooltip.c │ ├── dzl-shortcut-tooltip.h │ ├── dzl-shortcuts-group.c │ ├── dzl-shortcuts-group.h │ ├── dzl-shortcuts-section.c │ ├── dzl-shortcuts-section.h │ ├── dzl-shortcuts-shortcut-private.h │ ├── dzl-shortcuts-shortcut.c │ ├── dzl-shortcuts-shortcut.h │ ├── dzl-shortcuts-window-private.h │ ├── dzl-shortcuts-window.c │ ├── dzl-shortcuts-window.h │ ├── enter-keyboard-shortcut.svg │ └── meson.build ├── statemachine │ ├── dzl-state-machine-buildable.c │ ├── dzl-state-machine-buildable.h │ ├── dzl-state-machine.c │ ├── dzl-state-machine.h │ └── meson.build ├── suggestions │ ├── dzl-suggestion-button.c │ ├── dzl-suggestion-button.h │ ├── dzl-suggestion-entry-buffer.c │ ├── dzl-suggestion-entry-buffer.h │ ├── dzl-suggestion-entry.c │ ├── dzl-suggestion-entry.h │ ├── dzl-suggestion-popover.c │ ├── dzl-suggestion-popover.h │ ├── dzl-suggestion-popover.ui │ ├── dzl-suggestion-private.h │ ├── dzl-suggestion-row.c │ ├── dzl-suggestion-row.h │ ├── dzl-suggestion-row.ui │ ├── dzl-suggestion.c │ ├── dzl-suggestion.h │ └── meson.build ├── theming │ ├── dzl-css-provider.c │ ├── dzl-css-provider.h │ ├── dzl-theme-manager.c │ ├── dzl-theme-manager.h │ └── meson.build ├── tree │ ├── dzl-list-store-adapter.c │ ├── dzl-list-store-adapter.h │ ├── dzl-tree-builder.c │ ├── dzl-tree-builder.h │ ├── dzl-tree-node.c │ ├── dzl-tree-node.h │ ├── dzl-tree-private.h │ ├── dzl-tree-store.c │ ├── dzl-tree-store.h │ ├── dzl-tree-types.h │ ├── dzl-tree.c │ ├── dzl-tree.h │ └── meson.build ├── util │ ├── dzl-cairo.c │ ├── dzl-cairo.h │ ├── dzl-cancellable.c │ ├── dzl-cancellable.h │ ├── dzl-counter.c │ ├── dzl-counter.h │ ├── dzl-date-time.c │ ├── dzl-date-time.h │ ├── dzl-dnd.c │ ├── dzl-dnd.h │ ├── dzl-file-manager.c │ ├── dzl-file-manager.h │ ├── dzl-gdk.c │ ├── dzl-gdk.h │ ├── dzl-gtk.c │ ├── dzl-gtk.h │ ├── dzl-heap.c │ ├── dzl-heap.h │ ├── dzl-int-pair.h │ ├── dzl-list-model-filter.c │ ├── dzl-list-model-filter.h │ ├── dzl-macros.h │ ├── dzl-pango.c │ ├── dzl-pango.h │ ├── dzl-read-only-list-model.c │ ├── dzl-read-only-list-model.h │ ├── dzl-rgba.c │ ├── dzl-rgba.h │ ├── dzl-ring.c │ ├── dzl-ring.h │ ├── dzl-util-private.h │ ├── dzl-util.c │ ├── dzl-variant.c │ ├── dzl-variant.h │ └── meson.build └── widgets │ ├── dzl-bin.c │ ├── dzl-bin.h │ ├── dzl-bolding-label.c │ ├── dzl-bolding-label.h │ ├── dzl-box.c │ ├── dzl-box.h │ ├── dzl-centering-bin.c │ ├── dzl-centering-bin.h │ ├── dzl-column-layout.c │ ├── dzl-column-layout.h │ ├── dzl-counters-window.c │ ├── dzl-counters-window.h │ ├── dzl-counters-window.ui │ ├── dzl-elastic-bin.c │ ├── dzl-elastic-bin.h │ ├── dzl-empty-state.c │ ├── dzl-empty-state.h │ ├── dzl-empty-state.ui │ ├── dzl-entry-box.c │ ├── dzl-entry-box.h │ ├── dzl-file-chooser-entry.c │ ├── dzl-file-chooser-entry.h │ ├── dzl-list-box-private.h │ ├── dzl-list-box-row.c │ ├── dzl-list-box-row.h │ ├── dzl-list-box.c │ ├── dzl-list-box.h │ ├── dzl-multi-paned.c │ ├── dzl-multi-paned.h │ ├── dzl-pill-box.c │ ├── dzl-pill-box.h │ ├── dzl-pill-box.ui │ ├── dzl-priority-box.c │ ├── dzl-priority-box.h │ ├── dzl-progress-button.c │ ├── dzl-progress-button.h │ ├── dzl-progress-icon.c │ ├── dzl-progress-icon.h │ ├── dzl-progress-menu-button.c │ ├── dzl-progress-menu-button.h │ ├── dzl-radio-box.c │ ├── dzl-radio-box.h │ ├── dzl-rect-helper.c │ ├── dzl-rect-helper.h │ ├── dzl-scrolled-window.c │ ├── dzl-scrolled-window.h │ ├── dzl-search-bar.c │ ├── dzl-search-bar.h │ ├── dzl-simple-label.c │ ├── dzl-simple-label.h │ ├── dzl-simple-popover.c │ ├── dzl-simple-popover.h │ ├── dzl-simple-popover.ui │ ├── dzl-slider.c │ ├── dzl-slider.h │ ├── dzl-stack-list.c │ ├── dzl-stack-list.h │ ├── dzl-three-grid.c │ ├── dzl-three-grid.h │ └── meson.build ├── tests ├── data │ ├── keythemes │ │ ├── default.keytheme │ │ ├── emacs.keytheme │ │ ├── test.keytheme │ │ └── vim.keytheme │ ├── menus │ │ ├── joined1.ui │ │ ├── joined2.ui │ │ ├── menus-exten-1.ui │ │ ├── menus-exten-2.ui │ │ ├── menus-exten-3.ui │ │ ├── menus-exten-4.ui │ │ ├── menus-exten-5.ui │ │ └── menus.ui │ ├── shortcuts │ │ ├── 0 │ │ │ ├── gtk │ │ │ │ └── menus.ui │ │ │ └── shortcuts │ │ │ │ ├── default.keytheme │ │ │ │ └── secondary.keytheme │ │ ├── 1 │ │ │ └── gtk │ │ │ │ └── menus.ui │ │ └── 2 │ │ │ └── gtk │ │ │ └── menus.ui │ ├── test-fuzzy-mutable-index.txt │ ├── test-multi-paned.ui │ ├── test-panel.ui │ ├── test-slider.ui │ ├── test-tab-strip.ui │ └── words.txt ├── meson.build ├── test-application.c ├── test-bin.c ├── test-binding-group.c ├── test-bolding-label.c ├── test-box.c ├── test-cancellable.c ├── test-counters-window.c ├── test-cpu-graph.c ├── test-desktop-index.c ├── test-directory-reaper.c ├── test-elastic-bin.c ├── test-empty-state.c ├── test-entry-box.c ├── test-file-chooser-entry.c ├── test-file-manager.c ├── test-file-transfer.c ├── test-fuzzy-highlight.c ├── test-fuzzy-index.c ├── test-fuzzy-mutable-index.c ├── test-graph-model.c ├── test-heap.c ├── test-int-pair.c ├── test-joined-menu.c ├── test-levenshtein.c ├── test-list-store-adapter.c ├── test-list-store.c ├── test-menu-manager.c ├── test-menu-manager2.c ├── test-model-filter.c ├── test-multi-paned.c ├── test-mutable-scoring.c ├── test-panel.c ├── test-path-bar.c ├── test-pattern-spec.c ├── test-pill-box.c ├── test-preferences.c ├── test-progress-button.c ├── test-progress-icon.c ├── test-progress-menu-button.c ├── test-radio-box.c ├── test-read-only-list-model.c ├── test-recursive-monitor.c ├── test-ring.c ├── test-shortcut-chord.c ├── test-shortcut-overlays.c ├── test-shortcut-theme.c ├── test-shortcut-tooltip.c ├── test-shortcuts.c ├── test-signal-group.c ├── test-simple-popover.c ├── test-slider.c ├── test-stack-list.c ├── test-state-machine.c ├── test-suggestion-buffer.c ├── test-suggestion.c ├── test-tab-strip.c ├── test-task-cache.c ├── test-tree.c ├── test-trie.c └── test-util.c └── tools ├── dazzle-list-counters.c └── meson.build /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | 7 | [*.[ch]] 8 | indent_size = 2 9 | indent_style = space 10 | insert_final_newline = true 11 | max_line_length = 100 12 | tab_width = 2 13 | 14 | [*.css] 15 | indent_size = 2 16 | tab_size = 2 17 | indent_style = space 18 | 19 | [*.ui] 20 | indent_size = 2 21 | tab_size = 2 22 | indent_style = space 23 | 24 | [*.rst] 25 | indent_size = 3 26 | tab_size = 3 27 | indent_style = space 28 | 29 | [*.{xml.in,xml}] 30 | indent_size = 2 31 | tab_size = 2 32 | indent_style = space 33 | 34 | [*.json] 35 | indent_size = 4 36 | tab_size = 4 37 | 38 | [meson.build] 39 | indent_size = 2 40 | indent_style = space 41 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | *.swp 3 | *~ 4 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | include: 2 | - project: "GNOME/citemplates" 3 | file: "templates/default-rules.yml" 4 | - component: gitlab.gnome.org/GNOME/citemplates/gnomeos-basic-ci@master 5 | - component: gitlab.gnome.org/GNOME/citemplates/release-service@master 6 | inputs: 7 | dist-job-name: "build-gnomeos" 8 | tarball-artifact-path: "_builddir/meson-dist/$CI_PROJECT_NAME-$CI_COMMIT_TAG.tar.xz" 9 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Christian Hergert 2 | Dimitris Zenios 3 | Emmanuele Bassi 4 | Garrett Regier 5 | Georges Basile Stavracas Neto 6 | Sébastien Lafargue 7 | -------------------------------------------------------------------------------- /data/themes/Adwaita-dark.css: -------------------------------------------------------------------------------- 1 | /* Theme agnostic or base-layer CSS styling */ 2 | @import url("resource:///org/gnome/dazzle/themes/shared.css"); 3 | 4 | /* Theme specific styling */ 5 | @import url("resource:///org/gnome/dazzle/themes/Adwaita/Adwaita-panels.css"); 6 | 7 | @import url("resource:///org/gnome/dazzle/themes/Adwaita/Adwaita-dark-graphs.css"); 8 | @import url("resource:///org/gnome/dazzle/themes/Adwaita/Adwaita-dark-searchbar.css"); 9 | -------------------------------------------------------------------------------- /data/themes/Adwaita.css: -------------------------------------------------------------------------------- 1 | /* Theme agnostic or base-layer CSS styling */ 2 | @import url("resource:///org/gnome/dazzle/themes/shared.css"); 3 | 4 | /* Theme specific styling */ 5 | @import url("resource:///org/gnome/dazzle/themes/Adwaita/Adwaita-graphs.css"); 6 | @import url("resource:///org/gnome/dazzle/themes/Adwaita/Adwaita-panels.css"); 7 | @import url("resource:///org/gnome/dazzle/themes/Adwaita/Adwaita-searchbar.css"); 8 | -------------------------------------------------------------------------------- /data/themes/Adwaita/Adwaita-dark-graphs.css: -------------------------------------------------------------------------------- 1 | dzlgraphview { 2 | background-color: #232729; 3 | background-size: 8px 8px; 4 | background-image: repeating-linear-gradient(0deg, #2e2e2e, #2e2e2e 1px, transparent 1px, transparent 8px), 5 | repeating-linear-gradient(-90deg, #2e2e2e, #2e2e2e 1px, transparent 1px, transparent 8px); 6 | } 7 | -------------------------------------------------------------------------------- /data/themes/Adwaita/Adwaita-dark-searchbar.css: -------------------------------------------------------------------------------- 1 | dzlsearchbar box.search-bar { 2 | background-color: #2c3133; 3 | box-shadow: 0 4px 3px -5px #2c3030 inset, 4 | 0 -1px 0 #1c1f1f inset; 5 | } 6 | dzlsearchbar:backdrop box.search-bar { 7 | box-shadow: 0 -1px 0 #2c3030 inset; 8 | } 9 | -------------------------------------------------------------------------------- /data/themes/Adwaita/Adwaita-graphs.css: -------------------------------------------------------------------------------- 1 | dzlgraphview.view { 2 | background-color: #f6f7f8; 3 | background-size: 8px 8px; 4 | background-image: repeating-linear-gradient(0deg, #f0f1f2, #f0f1f2 1px, transparent 1px, transparent 8px), 5 | repeating-linear-gradient(-90deg, #f0f1f2, #f0f1f2 1px, transparent 1px, transparent 8px); 6 | } 7 | -------------------------------------------------------------------------------- /data/themes/Adwaita/Adwaita-panels.css: -------------------------------------------------------------------------------- 1 | dzldockstack dzltabstrip { 2 | padding-top: 2px; 3 | background-color: @content_view_bg; 4 | color: @theme_fg_color; 5 | border-bottom: 1px solid mix(@theme_bg_color, @borders, 0.25); 6 | } 7 | 8 | dzldockstack dzltabstrip button.control, 9 | dzldockstack dzltabstrip dzltab { 10 | border-bottom: 3px; 11 | border-bottom-style: solid; 12 | border-bottom-color: transparent; 13 | 14 | margin-left: 6px; 15 | margin-right: 6px; 16 | 17 | color: @theme_fg_color; 18 | } 19 | 20 | dzldockstack dzltabstrip dzltab:active { 21 | border-bottom-color: @theme_selected_bg_color; 22 | } 23 | 24 | dzldockstack dzltabstrip button.control:last-child { 25 | margin-right: 16px; 26 | } 27 | 28 | dzldockstack dzltabstrip button.control:hover, 29 | dzldockstack dzltabstrip dzltab:hover { 30 | border-bottom-color: mix(@borders, @theme_bg_color, 0.25); 31 | } 32 | 33 | dzldockstack dzltabstrip button.control:hover:checked, 34 | dzldockstack dzltabstrip button.control:checked, 35 | dzldockstack dzltabstrip dzltab:hover:checked, 36 | dzldockstack dzltabstrip dzltab:checked { 37 | border-bottom-color: @theme_selected_bg_color; 38 | } 39 | -------------------------------------------------------------------------------- /data/themes/Adwaita/Adwaita-searchbar.css: -------------------------------------------------------------------------------- 1 | dzlsearchbar box.search-bar { 2 | background-color: #d6d6d6; 3 | box-shadow: 0 4px 3px -5px #aaa inset, 4 | 0 -1px 0 #a1a1a1 inset; 5 | } 6 | dzlsearchbar:backdrop box.search-bar { 7 | background-color: #d5d5d5; 8 | box-shadow: none; 9 | } 10 | -------------------------------------------------------------------------------- /data/themes/Arc.css: -------------------------------------------------------------------------------- 1 | /* Theme agnostic or base-layer CSS styling */ 2 | @import url("resource:///org/gnome/dazzle/themes/shared.css"); 3 | 4 | /* Theme specific styling */ 5 | @import url("resource:///org/gnome/dazzle/themes/Arc/Arc-panels.css"); 6 | -------------------------------------------------------------------------------- /data/themes/Arc/Arc-panels.css: -------------------------------------------------------------------------------- 1 | dzldockstack dzltabstrip { 2 | background-color: @theme_bg_color; 3 | } 4 | 5 | dzldockstack dzltabstrip button.control:hover:checked, 6 | dzldockstack dzltabstrip button.control:checked, 7 | dzldockstack dzltabstrip dzltab:hover:checked, 8 | dzldockstack dzltabstrip dzltab:checked { 9 | color: @theme_fg_color; 10 | background-color: @theme_base_color; 11 | border-color: @borders; 12 | } 13 | 14 | dzldockstack dzltabstrip dzltab { 15 | font-size: 0.9em; 16 | margin-top: 3px; 17 | padding-bottom: 3px; 18 | border-style: solid; 19 | border-color: transparent; 20 | border-right-width: 1px; 21 | border-left-width: 1px; 22 | border-top-width: 1px; 23 | border-bottom-width: 0px; 24 | } 25 | 26 | dzldockstack dzltabstrip dzltab:backdrop:checked, 27 | dzldockstack dzltabstrip dzltab:backdrop { 28 | background-color: alpha(@theme_base_color, 0.25); 29 | } 30 | 31 | dzldockstack dzltabstrip dzltab:checked { 32 | border-left-color: @borders; 33 | border-right-color: @borders; 34 | border-top-color: @borders; 35 | } 36 | 37 | dzldockstack dzltabstrip dzltab:checked:first-child { 38 | border-left-color: alpha(@theme_base_color, 0.25); 39 | } 40 | 41 | dzldockstack dzltabstrip dzltab:checked:last-child { 42 | border-right-color: alpha(@theme_base_color, 0.25); 43 | } 44 | -------------------------------------------------------------------------------- /data/themes/shared.css: -------------------------------------------------------------------------------- 1 | /* Theme agnostic or base-layer CSS styling */ 2 | @import url("resource:///org/gnome/dazzle/themes/shared/shared-graphs.css"); 3 | @import url("resource:///org/gnome/dazzle/themes/shared/shared-menus.css"); 4 | @import url("resource:///org/gnome/dazzle/themes/shared/shared-panels.css"); 5 | @import url("resource:///org/gnome/dazzle/themes/shared/shared-pathbar.css"); 6 | @import url("resource:///org/gnome/dazzle/themes/shared/shared-pillbox.css"); 7 | @import url("resource:///org/gnome/dazzle/themes/shared/shared-preferences.css"); 8 | @import url("resource:///org/gnome/dazzle/themes/shared/shared-progressbutton.css"); 9 | @import url("resource:///org/gnome/dazzle/themes/shared/shared-stacklist.css"); 10 | @import url("resource:///org/gnome/dazzle/themes/shared/shared-suggestions.css"); 11 | -------------------------------------------------------------------------------- /data/themes/shared/shared-graphs.css: -------------------------------------------------------------------------------- 1 | dzlgraphview.view { 2 | background-color: transparent; 3 | background-size: 8px 8px; 4 | background-image: repeating-linear-gradient(0deg, alpha(@borders,0.25), alpha(@borders,0.25) 1px, transparent 1px, transparent 8px), 5 | repeating-linear-gradient(-90deg, alpha(@borders,0.25), alpha(@borders,0.25) 1px, transparent 1px, transparent 8px); 6 | } 7 | -------------------------------------------------------------------------------- /data/themes/shared/shared-menus.css: -------------------------------------------------------------------------------- 1 | button.dzlmenubutton > box { 2 | margin-left: 3px; 3 | margin-right: 3px; 4 | } 5 | button.dzlmenubutton > box > image.arrow { 6 | margin-left: 3px; 7 | } 8 | popover.dzlmenubutton > box { 9 | margin: 8px; 10 | } 11 | dzlmenubuttonsection:first-child separator { 12 | background: none; 13 | margin-top: 0px; 14 | margin-bottom: 0px; 15 | } 16 | dzlmenubuttonsection:not(:first-child) separator { 17 | border-color: @borders; 18 | margin-top: 8px; 19 | margin-bottom: 8px; 20 | margin-left: 10px; 21 | margin-right: 10px; 22 | } 23 | dzlmenubuttonsection > label.title { 24 | font-weight: bold; 25 | font-size: 0.8333em; 26 | opacity: 0.5; 27 | margin-bottom: 6px; 28 | } 29 | dzlmenubuttonsection box.vertical checkbutton.dzlmenubuttonitem, 30 | dzlmenubuttonsection box.vertical button.dzlmenubuttonitem { 31 | border: none; 32 | background: none; 33 | box-shadow: none; 34 | padding: 1px 10px; 35 | outline-offset: -2px; 36 | } 37 | dzlmenubuttonsection box.vertical checkbutton.dzlmenubuttonitem:hover, 38 | dzlmenubuttonsection box.vertical button.dzlmenubuttonitem:hover { 39 | background-color: alpha(@theme_fg_color, 0.05); 40 | } 41 | dzlmenubuttonsection box.vertical checkbutton.dzlmenubuttonitem > box > image:first-child, 42 | dzlmenubuttonsection box.vertical button.dzlmenubuttonitem > box > image:first-child { 43 | margin: 3px 8px 3px 0px; 44 | color: @theme_fg_color; 45 | } 46 | -------------------------------------------------------------------------------- /data/themes/shared/shared-panels.css: -------------------------------------------------------------------------------- 1 | 2 | dzldockstack dzltabstrip button.control, 3 | dzldockstack dzltabstrip dzltab button, 4 | dzldockstack dzltabstrip dzltab { 5 | transition-duration: 200ms; 6 | } 7 | 8 | dzldockstack dzltabstrip dzltab button { 9 | padding: 0; 10 | margin: 0; 11 | border: none; 12 | background: none; 13 | box-shadow: none; 14 | } 15 | 16 | dzldockstack dzltabstrip button.control, 17 | dzldockstack dzltabstrip dzltab { 18 | background: transparent; 19 | box-shadow: none; 20 | border: none; 21 | padding: 0; 22 | margin: 0; 23 | } 24 | 25 | dzldockpaned .handle { 26 | border: 1px solid @borders; 27 | } 28 | 29 | .dzldockbinedge { 30 | background-color: @content_view_bg; 31 | border-color: @borders; 32 | border-style: solid; 33 | } 34 | 35 | .dzldockbinedge.right { 36 | border-left-width: 1px; 37 | } 38 | 39 | .dzldockbinedge.left { 40 | border-right-width: 1px; 41 | } 42 | 43 | .dzldockbinedge.bottom { 44 | border-top-width: 1px; 45 | } 46 | -------------------------------------------------------------------------------- /data/themes/shared/shared-pathbar.css: -------------------------------------------------------------------------------- 1 | dzlpathbar button { 2 | background: none; 3 | border: none; 4 | box-shadow: none; 5 | border-radius: 0px; 6 | border-top: 2px solid transparent; 7 | border-bottom: 2px solid transparent; 8 | opacity: 0.75; 9 | padding: 3px 3px 0px 3px; 10 | } 11 | 12 | dzlpathbar button image { 13 | color: alpha(currentColor, 0.8); 14 | } 15 | 16 | dzlpathbar label.separator { 17 | font-size: 0.83333em; 18 | opacity: 0.55; 19 | } 20 | 21 | dzlpathbar button:checked { 22 | border-bottom: 2px solid @theme_selected_bg_color; 23 | font-weight: bold; 24 | opacity: 1; 25 | } 26 | 27 | dzlpathbar button:checked:backdrop { 28 | border-bottom-color: alpha(@borders,.75); 29 | } 30 | 31 | dzlpathbar button:hover { 32 | opacity: 0.9; 33 | border-bottom-color: @borders; 34 | } 35 | -------------------------------------------------------------------------------- /data/themes/shared/shared-pillbox.css: -------------------------------------------------------------------------------- 1 | dzlpillbox { 2 | border-radius: 3px; 3 | background-color: mix(@borders, @theme_bg_color, .5); 4 | } 5 | 6 | dzlpillbox:backdrop { 7 | border-radius: 3px; 8 | background-color: mix(@borders, @theme_unfocused_bg_color, .75); 9 | } 10 | -------------------------------------------------------------------------------- /data/themes/shared/shared-preferences.css: -------------------------------------------------------------------------------- 1 | entry.preferences-search { 2 | border: none; 3 | border-right: 1px solid @borders; 4 | border-bottom: 1px solid @borders; 5 | border-radius: 0; 6 | } 7 | 8 | dzlpreferencesview stacksidebar list { 9 | background-color: @content_view_bg; 10 | border-right: 1px solid @borders; 11 | } 12 | 13 | dzlpreferencesview stacksidebar list separator { 14 | background-color: transparent; 15 | } 16 | 17 | dzlpreferencesview list row entry { 18 | background: transparent; 19 | border: none; 20 | padding: 0; 21 | padding-left: 5px; 22 | border-radius: 3px; 23 | margin: -5px; 24 | } 25 | 26 | dzlpreferencesview list row spinbutton entry { 27 | margin-left: 2px; 28 | } 29 | 30 | dzlpreferencesview dzlpreferencesgroup list row { 31 | padding: 10px; 32 | border-bottom: 1px solid alpha(@borders, 0.2); 33 | } 34 | 35 | dzlpreferencesview dzlpreferencesgroup list row:last-child { 36 | border-bottom: none; 37 | } 38 | 39 | dzlpreferencesview dzlpreferencesgroup list entry { 40 | background: none; 41 | min-height: 0px; 42 | } 43 | 44 | dzlpreferencesview stackswitcher { 45 | margin: 12px 12px 0px 12px; 46 | } 47 | 48 | /* Tweak preferences+shortcut label */ 49 | row:selected preferencesbin label.keycap { 50 | color: @theme_fg_color; 51 | } 52 | -------------------------------------------------------------------------------- /data/themes/shared/shared-progressbutton.css: -------------------------------------------------------------------------------- 1 | .install-progress { 2 | background-image: linear-gradient(to top, @theme_selected_bg_color 2px, alpha(@theme_selected_bg_color, 0) 2px); 3 | background-repeat: no-repeat; 4 | background-position: 0 bottom; 5 | transition: none; 6 | } 7 | 8 | .install-progress:dir(rtl) { 9 | background-position: 100% bottom; 10 | } 11 | -------------------------------------------------------------------------------- /data/themes/shared/shared-stacklist.css: -------------------------------------------------------------------------------- 1 | dzlstacklist row { 2 | padding: 3px 0; 3 | color: @theme_fg_color; 4 | } 5 | dzlstacklist row label.dim-label { 6 | font-size: smaller; 7 | } 8 | dzlstacklist row:backdrop { 9 | color: @theme_unfocused_fg_color; 10 | } 11 | dzlstacklist row > box > image:first-child { 12 | margin: 6px 12px; 13 | min-height: 16px; 14 | min-width: 16px; 15 | opacity: 0.7; 16 | } 17 | dzlstacklist list.stack-header { 18 | background-color: @theme_base_color; 19 | border-bottom: 1px solid @borders; 20 | } 21 | dzlstacklist list.stack-header:backdrop { 22 | background-color: @theme_unfocused_base_color; 23 | border-color: @unfocused_borders; 24 | } 25 | dzlstacklist list.stack-header row:not(:last-child) { 26 | border-bottom: 1px solid rgba(0,0,0,0.1); 27 | } 28 | dzlstacklist list.stack-header row:last-child { 29 | border-bottom: 1px solid transparent; 30 | } 31 | dzlstacklist list:not(.stack-header) row:active, 32 | dzlstacklist list:not(.stack-header) row:selected, 33 | dzlstacklist list.stack-header row:not(:last-child):active, 34 | dzlstacklist list.stack-header row:not(:last-child):selected { 35 | color: @theme_selected_fg_color; 36 | background-color: @theme_selected_bg_color; 37 | } 38 | dzlstacklist row.animating label:not(.dim-label), 39 | dzlstacklist list.stack-header row:last-child label:not(.dim-label) { 40 | font-weight: bold; 41 | } 42 | -------------------------------------------------------------------------------- /doc/xml/gtkdocentities.ent.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /doc/xml/meson.build: -------------------------------------------------------------------------------- 1 | ent_conf = configuration_data() 2 | ent_conf.set('PACKAGE', 'Dazzle') 3 | ent_conf.set('PACKAGE_BUGREPORT', 'https://gitlab.gnome.org/GNOME/libdazzle/-/issues/') 4 | ent_conf.set('PACKAGE_NAME', 'Dazzle') 5 | ent_conf.set('PACKAGE_STRING', 'libdazzle') 6 | ent_conf.set('PACKAGE_TARNAME', 'libdazzle-' + meson.project_version()) 7 | ent_conf.set('PACKAGE_URL', 'https://apps.gnome.org/Builder/') 8 | ent_conf.set('PACKAGE_VERSION', meson.project_version()) 9 | ent_conf.set('PACKAGE_API_VERSION', apiversion) 10 | configure_file(input: 'gtkdocentities.ent.in', output: 'gtkdocentities.ent', configuration: ent_conf) 11 | 12 | -------------------------------------------------------------------------------- /examples/app/README.md: -------------------------------------------------------------------------------- 1 | # Example Application 2 | 3 | This directory contains a sample application built using various components of libdazzle. 4 | It can service as a tutorial of how to build your application to get the most out of libdazzle. 5 | 6 | 7 | -------------------------------------------------------------------------------- /examples/app/example-application.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | G_BEGIN_DECLS 6 | 7 | #define EXAMPLE_TYPE_APPLICATION (example_application_get_type()) 8 | 9 | G_DECLARE_FINAL_TYPE (ExampleApplication, example_application, EXAMPLE, APPLICATION, DzlApplication) 10 | 11 | G_END_DECLS 12 | -------------------------------------------------------------------------------- /examples/app/example-document-view.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "example-document.h" 6 | 7 | G_BEGIN_DECLS 8 | 9 | #define EXAMPLE_TYPE_DOCUMENT_VIEW (example_document_view_get_type()) 10 | 11 | G_DECLARE_FINAL_TYPE (ExampleDocumentView, example_document_view, EXAMPLE, DOCUMENT_VIEW, GtkBin) 12 | 13 | GtkWidget *example_document_view_new (void); 14 | 15 | G_END_DECLS 16 | -------------------------------------------------------------------------------- /examples/app/example-document-view.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | -------------------------------------------------------------------------------- /examples/app/example-document.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | G_BEGIN_DECLS 6 | 7 | #define EXAMPLE_TYPE_DOCUMENT (example_document_get_type()) 8 | 9 | G_DECLARE_FINAL_TYPE (ExampleDocument, example_document, EXAMPLE, DOCUMENT, GtkTextBuffer) 10 | 11 | ExampleDocument *example_document_new (void); 12 | 13 | G_END_DECLS 14 | -------------------------------------------------------------------------------- /examples/app/example-window.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | #include "example-document-view.h" 6 | 7 | G_BEGIN_DECLS 8 | 9 | #define EXAMPLE_TYPE_WINDOW (example_window_get_type()) 10 | 11 | G_DECLARE_FINAL_TYPE (ExampleWindow, example_window, EXAMPLE, WINDOW, DzlApplicationWindow) 12 | 13 | GtkWidget *example_window_new (void); 14 | ExampleDocumentView *example_window_get_current_document_view (ExampleWindow *self); 15 | 16 | G_END_DECLS 17 | -------------------------------------------------------------------------------- /examples/app/example.gresources.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | example-document-view.ui 5 | example-window.ui 6 | 7 | 8 | 9 | gtk/menus.ui 10 | shortcuts/default.keytheme 11 | themes/shared.css 12 | 13 | 14 | -------------------------------------------------------------------------------- /examples/app/gtk/menus.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | help-section 6 | Help 7 | 8 | 9 | preferences-desktop-keyboard-shortcuts-symbolic 10 | Keyboard _Shortcuts 11 | app.shortcuts 12 | <control><shift>question 13 | 14 | 15 | _About 16 | app.about 17 | 18 | 19 | _Quit 20 | app.quit 21 | 22 |
23 |
24 | 25 |
26 | 27 | _Fullscreen 28 | view-fullscreen-symbolic 29 | win.fullscreen 30 | 31 |
32 |
33 |
34 | -------------------------------------------------------------------------------- /examples/app/main.c: -------------------------------------------------------------------------------- 1 | #include "example-application.h" 2 | 3 | int 4 | main (int argc, 5 | char *argv[]) 6 | { 7 | g_autoptr(ExampleApplication) app = NULL; 8 | gint ret; 9 | 10 | app = g_object_new (EXAMPLE_TYPE_APPLICATION, 11 | "application-id", "org.gnome.Example", 12 | "resource-base-path", "/org/gnome/example", 13 | NULL); 14 | ret = g_application_run (G_APPLICATION (app), argc, argv); 15 | 16 | return ret; 17 | } 18 | -------------------------------------------------------------------------------- /examples/app/meson.build: -------------------------------------------------------------------------------- 1 | example_resources = gnome.compile_resources( 2 | 'example-resources', 3 | 'example.gresources.xml', 4 | c_name: 'example', 5 | ) 6 | 7 | example_application_sources = [ 8 | 'example-application.c', 9 | 'example-application.h', 10 | 'example-document.c', 11 | 'example-document.h', 12 | 'example-document-view.c', 13 | 'example-document-view.h', 14 | 'example-window.c', 15 | 'example-window.h', 16 | 'main.c', 17 | example_resources, 18 | ] 19 | 20 | example_application = executable('example-application', example_application_sources, 21 | dependencies: libdazzle_dep, 22 | ) 23 | -------------------------------------------------------------------------------- /examples/app/shortcuts/default.keytheme: -------------------------------------------------------------------------------- 1 | 2 | 3 | Example Shortcuts 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /examples/app/themes/shared.css: -------------------------------------------------------------------------------- 1 | textview { 2 | padding: 12px; 3 | } 4 | -------------------------------------------------------------------------------- /examples/graph/js/cpu_graph.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env gjs 2 | 3 | imports.gi.versions["Gdk"] = "3.0" 4 | imports.gi.versions["Gtk"] = "3.0" 5 | 6 | const GLib = imports.gi.GLib; 7 | const Gdk = imports.gi.Gdk; 8 | const Gtk = imports.gi.Gtk; 9 | const Dazzle = imports.gi.Dazzle; 10 | 11 | Gtk.init(null); 12 | 13 | /* 14 | * NOTE: If you are using Dazzle.Application as your base GApplication, 15 | * then the following theme loading is handled for you. You need 16 | * not manually register CSS. 17 | */ 18 | Gtk.StyleContext.add_provider_for_screen(Gdk.Screen.get_default(), 19 | Dazzle.CssProvider.new ("resource:///org/gnome/dazzle/themes"), 20 | Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION); 21 | 22 | let win = new Gtk.Window({title: "Cpu Graph"}); 23 | let graph = new Dazzle.CpuGraph({timespan: GLib.TIME_SPAN_MINUTE, max_samples: 120}); 24 | 25 | win.add(graph); 26 | win.connect('delete-event', function(){ 27 | Gtk.main_quit(); 28 | }); 29 | win.show_all(); 30 | 31 | Gtk.main(); 32 | -------------------------------------------------------------------------------- /libdazzle.doap: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | libdazzle 9 | libdazzle 10 | A GPLv3-based library to delight your users with fancy features 11 | libdazzle is a collection of fancy features for GLib and Gtk+ that aren't quite ready or generic enough for use inside those libraries. This is often a proving ground for new widget prototypes. Applications such as Builder tend to drive development of this project. 12 | 13 | 14 | 15 | C 16 | 17 | 18 | 19 | Christian Hergert 20 | 21 | chergert 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /meson_options.txt: -------------------------------------------------------------------------------- 1 | 2 | # Performance and debugging related options 3 | option('enable_tracing', type: 'boolean', value: false) 4 | option('enable_profiling', type: 'boolean', value: false) 5 | option('enable_rdtscp', type: 'boolean', value: false, 6 | description: 'Use intel rdtscp haswell instruction for performance counters' 7 | ) 8 | 9 | option('enable_tools', type: 'boolean', value: true, 10 | description: 'Whether helper tools should be installed') 11 | 12 | # Support for multiple languages 13 | option('with_introspection', type: 'boolean', value: true) 14 | option('with_vapi', type: 'boolean', value: true) 15 | 16 | # Subproject 17 | option('package_subdir', type: 'string', 18 | description: 'Subdirectory to append to all installed files, for use as subproject' 19 | ) 20 | 21 | option('enable_gtk_doc', 22 | type: 'boolean', value: false, 23 | description: 'Whether to generate the API reference for Dazzle') 24 | 25 | option('enable_tests', 26 | type: 'boolean', value: true, 27 | description: 'Whether to compile unit tests') 28 | -------------------------------------------------------------------------------- /po/LINGUAS: -------------------------------------------------------------------------------- 1 | # Please keep this list sorted alphabetically 2 | cs 3 | de 4 | es 5 | eu 6 | pl 7 | sr 8 | sv 9 | uk 10 | zh_CN 11 | -------------------------------------------------------------------------------- /po/POTFILES.in: -------------------------------------------------------------------------------- 1 | # List of source files containing translatable strings. 2 | # Please keep this file sorted alphabetically. 3 | src/animation/dzl-animation.c 4 | src/animation/dzl-box-theatric.c 5 | src/backports/gtkeventcontrollermotion.c 6 | src/bindings/dzl-binding-group.c 7 | src/bindings/dzl-signal-group.c 8 | src/cache/dzl-task-cache.c 9 | src/files/dzl-directory-model.c 10 | src/graphing/dzl-cpu-graph.c 11 | src/graphing/dzl-graph-column.c 12 | src/graphing/dzl-graph-line-renderer.c 13 | src/graphing/dzl-graph-model.c 14 | src/graphing/dzl-graph-view.c 15 | src/prefs/dzl-preferences-entry.c 16 | src/prefs/dzl-preferences-font-button.ui 17 | src/prefs/dzl-preferences-page.c 18 | src/prefs/dzl-preferences-view.c 19 | src/prefs/dzl-preferences-view.ui 20 | src/search/dzl-trie.c 21 | src/settings/dzl-settings-sandwich.c 22 | src/shortcuts/dzl-shortcut-accel-dialog.c 23 | src/shortcuts/dzl-shortcut-accel-dialog.ui 24 | src/shortcuts/dzl-shortcut-manager.c 25 | src/shortcuts/dzl-shortcuts-group.c 26 | src/shortcuts/dzl-shortcuts-section.c 27 | src/shortcuts/dzl-shortcuts-shortcut.c 28 | src/shortcuts/dzl-shortcuts-window.c 29 | src/shortcuts/dzl-shortcut-theme-editor.c 30 | src/shortcuts/dzl-shortcut-theme-editor.ui 31 | src/statemachine/dzl-state-machine-buildable.c 32 | src/statemachine/dzl-state-machine.c 33 | src/suggestions/dzl-suggestion-entry.c 34 | src/suggestions/dzl-suggestion-popover.c 35 | src/theming/dzl-css-provider.c 36 | src/tree/dzl-tree-builder.c 37 | src/tree/dzl-tree.c 38 | src/tree/dzl-tree-node.c 39 | src/util/dzl-date-time.c 40 | src/util/dzl-file-manager.c 41 | src/widgets/dzl-bolding-label.c 42 | src/widgets/dzl-box.c 43 | src/widgets/dzl-counters-window.ui 44 | src/widgets/dzl-file-chooser-entry.c 45 | src/widgets/dzl-pill-box.c 46 | src/widgets/dzl-rect-helper.c 47 | src/widgets/dzl-search-bar.c 48 | src/widgets/dzl-slider.c 49 | src/widgets/dzl-stack-list.c 50 | -------------------------------------------------------------------------------- /po/POTFILES.skip: -------------------------------------------------------------------------------- 1 | # List of source files to skip. 2 | # Please keep this file sorted alphabetically. 3 | examples/app/example-window.c 4 | examples/app/example-window.ui 5 | examples/app/gtk/menus.ui 6 | tests/data/menus/joined1.ui 7 | tests/data/menus/joined2.ui 8 | tests/data/menus/menus.ui 9 | -------------------------------------------------------------------------------- /po/meson.build: -------------------------------------------------------------------------------- 1 | i18n.gettext( 2 | package_string, 3 | preset: 'glib', 4 | ) 5 | -------------------------------------------------------------------------------- /src/Dazzle-1.0.metadata: -------------------------------------------------------------------------------- 1 | Dazzle name="Dazzle" 2 | * cheader_filename="dazzle.h" 3 | *.*.cancellable#parameter nullable default=null 4 | *.*.io_priority default=GLib.Priority.LOW 5 | 6 | StackList 7 | .push skip=false 8 | .push.create_widget_func nullable 9 | StackListCreateWidgetFunc skip=false 10 | .item type="GLib.Object" 11 | 12 | GraphModel 13 | .get_iter_first.iter out 14 | .get_iter_last.iter out 15 | .iter_get_value.value out 16 | .iter_next.iter ref 17 | -------------------------------------------------------------------------------- /src/actions/dzl-child-property-action.h: -------------------------------------------------------------------------------- 1 | /* dzl-child-property-action.h 2 | * 3 | * Copyright (C) 2017 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #if !defined(DAZZLE_INSIDE) && !defined(DAZZLE_COMPILATION) 20 | # error "Only can be included directly." 21 | #endif 22 | 23 | #ifndef DZL_CHILD_PROPERTY_ACTION_H 24 | #define DZL_CHILD_PROPERTY_ACTION_H 25 | 26 | #include 27 | 28 | #include "dzl-version-macros.h" 29 | 30 | G_BEGIN_DECLS 31 | 32 | #define DZL_TYPE_CHILD_PROPERTY_ACTION (dzl_child_property_action_get_type()) 33 | 34 | DZL_AVAILABLE_IN_ALL 35 | G_DECLARE_FINAL_TYPE (DzlChildPropertyAction, dzl_child_property_action, DZL, CHILD_PROPERTY_ACTION, GObject) 36 | 37 | DZL_AVAILABLE_IN_ALL 38 | GAction *dzl_child_property_action_new (const gchar *name, 39 | GtkContainer *container, 40 | GtkWidget *child, 41 | const gchar *child_property_name); 42 | 43 | G_END_DECLS 44 | 45 | #endif /* DZL_CHILD_PROPERTY_ACTION_H */ 46 | -------------------------------------------------------------------------------- /src/actions/dzl-settings-flag-action.h: -------------------------------------------------------------------------------- 1 | /* dzl-settings-flag-action.h 2 | * 3 | * Copyright (C) 2015 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_SETTINGS_FLAG_ACTION_H 20 | #define DZL_SETTINGS_FLAG_ACTION_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define DZL_TYPE_SETTINGS_FLAG_ACTION (dzl_settings_flag_action_get_type()) 29 | 30 | DZL_AVAILABLE_IN_ALL 31 | G_DECLARE_FINAL_TYPE (DzlSettingsFlagAction, dzl_settings_flag_action, DZL, SETTINGS_FLAG_ACTION, GObject) 32 | 33 | DZL_AVAILABLE_IN_ALL 34 | GAction *dzl_settings_flag_action_new (const gchar *schema_id, 35 | const gchar *schema_key, 36 | const gchar *flag_nick); 37 | 38 | G_END_DECLS 39 | 40 | #endif /* DZL_SETTINGS_FLAG_ACTION_H */ 41 | -------------------------------------------------------------------------------- /src/actions/dzl-widget-action-group.h: -------------------------------------------------------------------------------- 1 | /* dzl-widget-action-group.h 2 | * 3 | * Copyright (C) 2015 Christian Hergert 4 | * 5 | * This file is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This file is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_WIDGET_ACTION_GROUP_H 20 | #define DZL_WIDGET_ACTION_GROUP_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define DZL_TYPE_WIDGET_ACTION_GROUP (dzl_widget_action_group_get_type()) 29 | 30 | DZL_AVAILABLE_IN_ALL 31 | G_DECLARE_FINAL_TYPE (DzlWidgetActionGroup, dzl_widget_action_group, DZL, WIDGET_ACTION_GROUP, GObject) 32 | 33 | DZL_AVAILABLE_IN_ALL 34 | GActionGroup *dzl_widget_action_group_new (GtkWidget *widget); 35 | DZL_AVAILABLE_IN_ALL 36 | void dzl_widget_action_group_attach (gpointer widget, 37 | const gchar *group_name); 38 | DZL_AVAILABLE_IN_ALL 39 | void dzl_widget_action_group_set_action_enabled (DzlWidgetActionGroup *self, 40 | const gchar *action_name, 41 | gboolean enabled); 42 | 43 | G_END_DECLS 44 | 45 | #endif /* DZL_WIDGET_ACTION_GROUP_H */ 46 | -------------------------------------------------------------------------------- /src/actions/meson.build: -------------------------------------------------------------------------------- 1 | action_headers = [ 2 | 'dzl-action-group.h', 3 | 'dzl-child-property-action.h', 4 | 'dzl-properties-group.h', 5 | 'dzl-settings-flag-action.h', 6 | 'dzl-widget-action-group.h', 7 | ] 8 | 9 | action_sources = [ 10 | 'dzl-child-property-action.c', 11 | 'dzl-properties-group.c', 12 | 'dzl-settings-flag-action.c', 13 | 'dzl-widget-action-group.c', 14 | ] 15 | 16 | libdazzle_public_headers += files(action_headers) 17 | libdazzle_public_sources += files(action_sources) 18 | 19 | install_headers(action_headers, subdir: join_paths(libdazzle_header_subdir, 'actions')) 20 | -------------------------------------------------------------------------------- /src/animation/dzl-box-theatric.h: -------------------------------------------------------------------------------- 1 | /* dzl-box-theatric.h 2 | * 3 | * Copyright (C) 2014 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_BOX_THEATRIC_H 20 | #define DZL_BOX_THEATRIC_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define DZL_TYPE_BOX_THEATRIC (dzl_box_theatric_get_type()) 29 | 30 | DZL_AVAILABLE_IN_ALL 31 | G_DECLARE_FINAL_TYPE (DzlBoxTheatric, dzl_box_theatric, DZL, BOX_THEATRIC, GObject) 32 | 33 | G_END_DECLS 34 | 35 | #endif /* DZL_BOX_THEATRIC_H */ 36 | -------------------------------------------------------------------------------- /src/animation/dzl-frame-source.h: -------------------------------------------------------------------------------- 1 | /* dzl-frame-source.h 2 | * 3 | * Copyright (C) 2010-2016 Christian Hergert 4 | * 5 | * This file is free software; you can redistribute it and/or modify it under 6 | * the terms of the GNU Lesser General Public License as published by the Free 7 | * Software Foundation; either version 2.1 of the License, or (at your option) 8 | * any later version. 9 | * 10 | * This file is distributed in the hope that it will be useful, but WITHOUT 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 13 | * License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_FRAME_SOURCE_H 20 | #define DZL_FRAME_SOURCE_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | DZL_AVAILABLE_IN_3_32 29 | guint dzl_frame_source_add (guint frames_per_sec, 30 | GSourceFunc callback, 31 | gpointer user_data); 32 | DZL_AVAILABLE_IN_3_32 33 | guint dzl_frame_source_add_full (gint priority, 34 | guint frames_per_sec, 35 | GSourceFunc callback, 36 | gpointer user_data, 37 | GDestroyNotify notify); 38 | 39 | G_END_DECLS 40 | 41 | #endif /* DZL_FRAME_SOURCE_H */ 42 | -------------------------------------------------------------------------------- /src/animation/meson.build: -------------------------------------------------------------------------------- 1 | animation_headers = [ 2 | 'dzl-animation.h', 3 | 'dzl-box-theatric.h', 4 | 'dzl-frame-source.h', 5 | ] 6 | 7 | animation_sources = [ 8 | 'dzl-animation.c', 9 | 'dzl-box-theatric.c', 10 | 'dzl-frame-source.c', 11 | ] 12 | 13 | libdazzle_public_headers += files(animation_headers) 14 | libdazzle_public_sources += files(animation_sources) 15 | 16 | install_headers(animation_headers, subdir: join_paths(libdazzle_header_subdir, 'animation')) 17 | -------------------------------------------------------------------------------- /src/app/meson.build: -------------------------------------------------------------------------------- 1 | app_headers = [ 2 | 'dzl-application.h', 3 | 'dzl-application-window.h', 4 | ] 5 | 6 | app_sources = [ 7 | 'dzl-application.c', 8 | 'dzl-application-window.c', 9 | ] 10 | 11 | dzl_enum_headers += files([ 12 | 'dzl-application-window.h', 13 | ]) 14 | 15 | libdazzle_public_headers += files(app_headers) 16 | libdazzle_public_sources += files(app_sources) 17 | 18 | install_headers(app_headers, subdir: join_paths(libdazzle_header_subdir, 'app')) 19 | -------------------------------------------------------------------------------- /src/bindings/meson.build: -------------------------------------------------------------------------------- 1 | bindings_headers = [ 2 | 'dzl-binding-group.h', 3 | 'dzl-signal-group.h', 4 | ] 5 | 6 | bindings_sources = [ 7 | 'dzl-binding-group.c', 8 | 'dzl-signal-group.c', 9 | ] 10 | 11 | libdazzle_public_headers += files(bindings_headers) 12 | libdazzle_public_sources += files(bindings_sources) 13 | 14 | install_headers(bindings_headers, subdir: join_paths(libdazzle_header_subdir, 'bindings')) 15 | -------------------------------------------------------------------------------- /src/cache/meson.build: -------------------------------------------------------------------------------- 1 | cache_headers = [ 2 | 'dzl-task-cache.h', 3 | ] 4 | 5 | cache_sources = [ 6 | 'dzl-task-cache.c', 7 | ] 8 | 9 | libdazzle_public_headers += files(cache_headers) 10 | libdazzle_public_sources += files(cache_sources) 11 | 12 | install_headers(cache_headers, subdir: join_paths(libdazzle_header_subdir, 'cache')) 13 | -------------------------------------------------------------------------------- /src/dzl-enums.c.in: -------------------------------------------------------------------------------- 1 | /*** BEGIN file-header ***/ 2 | 3 | #include "config.h" 4 | 5 | #include "dzl-enums.h" 6 | 7 | #include "app/dzl-application-window.h" 8 | #include "files/dzl-file-transfer.h" 9 | #include "tree/dzl-tree-types.h" 10 | 11 | /*** END file-header ***/ 12 | 13 | /*** BEGIN file-production ***/ 14 | /* enumerations from "@basename@" */ 15 | /*** END file-production ***/ 16 | 17 | /*** BEGIN value-header ***/ 18 | GType 19 | @enum_name@_get_type (void) 20 | { 21 | static GType etype = 0; 22 | if (G_UNLIKELY(etype == 0)) { 23 | static const G@Type@Value values[] = { 24 | /*** END value-header ***/ 25 | 26 | /*** BEGIN value-production ***/ 27 | { @VALUENAME@, "@VALUENAME@", "@valuenick@" }, 28 | /*** END value-production ***/ 29 | 30 | /*** BEGIN value-tail ***/ 31 | { 0, NULL, NULL } 32 | }; 33 | etype = g_@type@_register_static (g_intern_static_string ("@EnumName@"), values); 34 | } 35 | return etype; 36 | } 37 | 38 | /*** END value-tail ***/ 39 | 40 | /*** BEGIN file-tail ***/ 41 | 42 | /*** END file-tail ***/ 43 | -------------------------------------------------------------------------------- /src/dzl-enums.h.in: -------------------------------------------------------------------------------- 1 | /*** BEGIN file-header ***/ 2 | #ifndef __DZL_ENUMS_H__ 3 | #define __DZL_ENUMS_H__ 4 | 5 | #include 6 | 7 | #include "dzl-version-macros.h" 8 | 9 | G_BEGIN_DECLS 10 | /*** END file-header ***/ 11 | 12 | /*** BEGIN file-production ***/ 13 | 14 | /* enumerations from "@basename@" */ 15 | /*** END file-production ***/ 16 | 17 | /*** BEGIN value-header ***/ 18 | DZL_AVAILABLE_IN_ALL GType @enum_name@_get_type (void); 19 | #define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type ()) 20 | /*** END value-header ***/ 21 | 22 | /*** BEGIN file-tail ***/ 23 | G_END_DECLS 24 | 25 | #endif /* __DZL_ENUMS_H__ */ 26 | /*** END file-tail ***/ 27 | -------------------------------------------------------------------------------- /src/dzl-init.c: -------------------------------------------------------------------------------- 1 | /* dzl-init.c 2 | * 3 | * Copyright 2020 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | * SPDX-License-Identifier: GPL-3.0-or-later 19 | */ 20 | 21 | #include "config.h" 22 | 23 | #include 24 | 25 | #include "gconstructor.h" 26 | 27 | #if defined (G_HAS_CONSTRUCTORS) 28 | # ifdef G_DEFINE_CONSTRUCTOR_NEEDS_PRAGMA 29 | # pragma G_DEFINE_CONSTRUCTOR_PRAGMA_ARGS(dzl_init_ctor) 30 | # endif 31 | G_DEFINE_CONSTRUCTOR(dzl_init_ctor) 32 | #else 33 | # error Your platform/compiler is missing constructor support 34 | #endif 35 | 36 | static void 37 | dzl_init_ctor (void) 38 | { 39 | bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); 40 | bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); 41 | } 42 | -------------------------------------------------------------------------------- /src/files/meson.build: -------------------------------------------------------------------------------- 1 | files_headers = [ 2 | 'dzl-directory-model.h', 3 | 'dzl-directory-reaper.h', 4 | 'dzl-file-transfer.h', 5 | 'dzl-recursive-file-monitor.h', 6 | ] 7 | 8 | files_sources = [ 9 | 'dzl-directory-model.c', 10 | 'dzl-directory-reaper.c', 11 | 'dzl-file-transfer.c', 12 | 'dzl-recursive-file-monitor.c', 13 | ] 14 | 15 | files_enums_headers = [ 16 | 'dzl-file-transfer.h', 17 | ] 18 | 19 | libdazzle_public_headers += files(files_headers) 20 | libdazzle_public_sources += files(files_sources) 21 | dzl_enum_headers += files(files_enums_headers) 22 | 23 | install_headers(files_headers, subdir: join_paths(libdazzle_header_subdir, 'files')) 24 | -------------------------------------------------------------------------------- /src/graphing/dzl-cpu-graph.h: -------------------------------------------------------------------------------- 1 | /* dzl-cpu-graph.h 2 | * 3 | * Copyright (C) 2015 Christian Hergert 4 | * 5 | * This file is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This file is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_CPU_GRAPH_H 20 | #define DZL_CPU_GRAPH_H 21 | 22 | #include "dzl-version-macros.h" 23 | 24 | #include "graphing/dzl-graph-view.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define DZL_TYPE_CPU_GRAPH (dzl_cpu_graph_get_type()) 29 | 30 | DZL_AVAILABLE_IN_ALL 31 | G_DECLARE_FINAL_TYPE (DzlCpuGraph, dzl_cpu_graph, DZL, CPU_GRAPH, DzlGraphView) 32 | 33 | DZL_AVAILABLE_IN_3_30 34 | GtkWidget *dzl_cpu_graph_new_full (gint64 timespan, 35 | guint max_samples); 36 | 37 | G_END_DECLS 38 | 39 | #endif /* DZL_CPU_GRAPH_H */ 40 | -------------------------------------------------------------------------------- /src/graphing/dzl-cpu-model.h: -------------------------------------------------------------------------------- 1 | /* dzl-cpu-model.h 2 | * 3 | * Copyright (C) 2015 Christian Hergert 4 | * 5 | * This file is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This file is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_CPU_MODEL_H 20 | #define DZL_CPU_MODEL_H 21 | 22 | #include "dzl-version-macros.h" 23 | 24 | #include "dzl-graph-model.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define DZL_TYPE_CPU_MODEL (dzl_cpu_model_get_type()) 29 | 30 | DZL_AVAILABLE_IN_ALL 31 | G_DECLARE_FINAL_TYPE (DzlCpuModel, dzl_cpu_model, DZL, CPU_MODEL, DzlGraphModel) 32 | 33 | DZL_AVAILABLE_IN_ALL 34 | DzlGraphModel *dzl_cpu_model_new (void); 35 | 36 | G_END_DECLS 37 | 38 | #endif /* DZL_CPU_MODEL_H */ 39 | -------------------------------------------------------------------------------- /src/graphing/dzl-graph-column.h: -------------------------------------------------------------------------------- 1 | /* dzl-graph-column.h 2 | * 3 | * Copyright (C) 2015 Christian Hergert 4 | * 5 | * This file is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This file is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_GRAPH_COLUMN_H 20 | #define DZL_GRAPH_COLUMN_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define DZL_TYPE_GRAPH_COLUMN (dzl_graph_view_column_get_type()) 29 | 30 | DZL_AVAILABLE_IN_ALL 31 | G_DECLARE_FINAL_TYPE (DzlGraphColumn, dzl_graph_view_column, DZL, GRAPH_COLUMN, GObject) 32 | 33 | struct _DzlGraphColumnClass 34 | { 35 | GObjectClass parent; 36 | }; 37 | 38 | DZL_AVAILABLE_IN_ALL 39 | DzlGraphColumn *dzl_graph_view_column_new (const gchar *name, 40 | GType value_type); 41 | DZL_AVAILABLE_IN_ALL 42 | const gchar *dzl_graph_view_column_get_name (DzlGraphColumn *self); 43 | DZL_AVAILABLE_IN_ALL 44 | void dzl_graph_view_column_set_name (DzlGraphColumn *self, 45 | const gchar *name); 46 | 47 | G_END_DECLS 48 | 49 | #endif /* DZL_GRAPH_COLUMN_H */ 50 | -------------------------------------------------------------------------------- /src/graphing/dzl-graph-line-renderer.h: -------------------------------------------------------------------------------- 1 | /* dzl-graph-line-renderer.h 2 | * 3 | * Copyright (C) 2015 Christian Hergert 4 | * 5 | * This file is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This file is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_GRAPH_LINE_RENDERER_H 20 | #define DZL_GRAPH_LINE_RENDERER_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | #include "dzl-graph-renderer.h" 27 | 28 | G_BEGIN_DECLS 29 | 30 | #define DZL_TYPE_GRAPH_LINE_RENDERER (dzl_graph_view_line_renderer_get_type()) 31 | 32 | DZL_AVAILABLE_IN_ALL 33 | G_DECLARE_FINAL_TYPE (DzlGraphLineRenderer, dzl_graph_view_line_renderer, DZL, GRAPH_LINE_RENDERER, GObject) 34 | 35 | DZL_AVAILABLE_IN_ALL 36 | DzlGraphLineRenderer *dzl_graph_view_line_renderer_new (void); 37 | DZL_AVAILABLE_IN_ALL 38 | void dzl_graph_view_line_renderer_set_stroke_color (DzlGraphLineRenderer *self, 39 | const gchar *stroke_color); 40 | DZL_AVAILABLE_IN_ALL 41 | void dzl_graph_view_line_renderer_set_stroke_color_rgba (DzlGraphLineRenderer *self, 42 | const GdkRGBA *stroke_color_rgba); 43 | DZL_AVAILABLE_IN_ALL 44 | const GdkRGBA *dzl_graph_view_line_renderer_get_stroke_color_rgba (DzlGraphLineRenderer *self); 45 | 46 | G_END_DECLS 47 | 48 | #endif /* DZL_GRAPH_LINE_RENDERER_H */ 49 | -------------------------------------------------------------------------------- /src/graphing/meson.build: -------------------------------------------------------------------------------- 1 | graphing_headers = [ 2 | 'dzl-cpu-graph.h', 3 | 'dzl-cpu-model.h', 4 | 'dzl-graph-column.h', 5 | 'dzl-graph-line-renderer.h', 6 | 'dzl-graph-model.h', 7 | 'dzl-graph-renderer.h', 8 | 'dzl-graph-view.h', 9 | ] 10 | 11 | graphing_sources = [ 12 | 'dzl-cpu-graph.c', 13 | 'dzl-cpu-model.c', 14 | 'dzl-graph-column.c', 15 | 'dzl-graph-line-renderer.c', 16 | 'dzl-graph-model.c', 17 | 'dzl-graph-renderer.c', 18 | 'dzl-graph-view.c', 19 | ] 20 | 21 | libdazzle_public_headers += files(graphing_headers) 22 | libdazzle_public_sources += files(graphing_sources) 23 | 24 | install_headers(graphing_headers, subdir: join_paths(libdazzle_header_subdir, 'graphing')) 25 | -------------------------------------------------------------------------------- /src/menus/dzl-menu-button-item.h: -------------------------------------------------------------------------------- 1 | /* dzl-menu-button-item.h 2 | * 3 | * Copyright (C) 2017 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_MENU_BUTTON_ITEM_H 20 | #define DZL_MENU_BUTTON_ITEM_H 21 | 22 | #include 23 | 24 | G_BEGIN_DECLS 25 | 26 | #define DZL_TYPE_MENU_BUTTON_ITEM (dzl_menu_button_item_get_type()) 27 | 28 | DZL_AVAILABLE_IN_ALL 29 | G_DECLARE_FINAL_TYPE (DzlMenuButtonItem, dzl_menu_button_item, DZL, MENU_BUTTON_ITEM, GtkCheckButton) 30 | 31 | G_END_DECLS 32 | 33 | #endif /* DZL_MENU_BUTTON_ITEM_H */ 34 | -------------------------------------------------------------------------------- /src/menus/dzl-menu-button-section.h: -------------------------------------------------------------------------------- 1 | /* dzl-menu-button-section.h 2 | * 3 | * Copyright (C) 2017 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_MENU_BUTTON_SECTION_H 20 | #define DZL_MENU_BUTTON_SECTION_H 21 | 22 | #include 23 | 24 | G_BEGIN_DECLS 25 | 26 | #define DZL_TYPE_MENU_BUTTON_SECTION (dzl_menu_button_section_get_type()) 27 | 28 | G_DECLARE_FINAL_TYPE (DzlMenuButtonSection, dzl_menu_button_section, DZL, MENU_BUTTON_SECTION, GtkBox) 29 | 30 | GtkWidget *dzl_menu_button_section_new (GMenuModel *model, 31 | const gchar *label); 32 | 33 | G_END_DECLS 34 | 35 | #endif /* DZL_MENU_BUTTON_SECTION_H */ 36 | -------------------------------------------------------------------------------- /src/menus/dzl-menu-button-section.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 26 | 27 | -------------------------------------------------------------------------------- /src/menus/dzl-menu-button.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | vertical 10 | true 11 | 12 | 13 | 14 | 44 | 45 | horizontal 46 | 47 | 48 | -------------------------------------------------------------------------------- /src/menus/meson.build: -------------------------------------------------------------------------------- 1 | menus_headers = [ 2 | 'dzl-joined-menu.h', 3 | 'dzl-menu-button.h', 4 | 'dzl-menu-manager.h', 5 | ] 6 | 7 | menus_sources = [ 8 | 'dzl-joined-menu.c', 9 | 'dzl-menu-button.c', 10 | 'dzl-menu-manager.c', 11 | ] 12 | 13 | menus_private_sources = [ 14 | 'dzl-menu-button-item.c', 15 | 'dzl-menu-button-section.c', 16 | ] 17 | 18 | libdazzle_public_headers += files(menus_headers) 19 | libdazzle_public_sources += files(menus_sources) 20 | libdazzle_private_sources += files(menus_private_sources) 21 | 22 | install_headers(menus_headers, subdir: join_paths(libdazzle_header_subdir, 'menus')) 23 | -------------------------------------------------------------------------------- /src/panel/dzl-dock-bin-edge-private.h: -------------------------------------------------------------------------------- 1 | /* dzl-dock-bin-edge-private.h 2 | * 3 | * Copyright (C) 2016 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #if !defined(DAZZLE_INSIDE) && !defined(DAZZLE_COMPILATION) 20 | # error "Only can be included directly." 21 | #endif 22 | 23 | #ifndef DZL_DOCK_BIN_EDGE_PRIVATE_H 24 | #define DZL_DOCK_BIN_EDGE_PRIVATE_H 25 | 26 | #include "dzl-dock-bin-edge.h" 27 | 28 | G_BEGIN_DECLS 29 | 30 | void dzl_dock_bin_edge_set_edge (DzlDockBinEdge *self, 31 | GtkPositionType bin_edge); 32 | 33 | G_END_DECLS 34 | 35 | #endif /* DZL_DOCK_BIN_EDGE_PRIVATE_H */ 36 | -------------------------------------------------------------------------------- /src/panel/dzl-dock-bin-edge.h: -------------------------------------------------------------------------------- 1 | /* dzl-dock-bin-edge.h 2 | * 3 | * Copyright (C) 2016 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #if !defined(DAZZLE_INSIDE) && !defined(DAZZLE_COMPILATION) 20 | # error "Only can be included directly." 21 | #endif 22 | 23 | #ifndef DZL_DOCK_BIN_EDGE_H 24 | #define DZL_DOCK_BIN_EDGE_H 25 | 26 | #include "dzl-version-macros.h" 27 | 28 | #include "dzl-dock-types.h" 29 | 30 | G_BEGIN_DECLS 31 | 32 | struct _DzlDockBinEdgeClass 33 | { 34 | DzlDockRevealerClass parent; 35 | 36 | void (*move_to_bin_child) (DzlDockBinEdge *self); 37 | 38 | gpointer _reserved1; 39 | gpointer _reserved2; 40 | gpointer _reserved3; 41 | gpointer _reserved4; 42 | gpointer _reserved5; 43 | gpointer _reserved6; 44 | gpointer _reserved7; 45 | gpointer _reserved8; 46 | }; 47 | 48 | DZL_AVAILABLE_IN_ALL 49 | GtkPositionType dzl_dock_bin_edge_get_edge (DzlDockBinEdge *self); 50 | 51 | G_END_DECLS 52 | 53 | #endif /* DZL_DOCK_BIN_EDGE_H */ 54 | -------------------------------------------------------------------------------- /src/panel/dzl-dock-overlay-edge.h: -------------------------------------------------------------------------------- 1 | /* dzl-dock-overlay-edge.h 2 | * 3 | * Copyright (C) 2016 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #if !defined(DAZZLE_INSIDE) && !defined(DAZZLE_COMPILATION) 20 | # error "Only can be included directly." 21 | #endif 22 | 23 | #ifndef DZL_DOCK_OVERLAY_EDGE_H 24 | #define DZL_DOCK_OVERLAY_EDGE_H 25 | 26 | #include "dzl-version-macros.h" 27 | 28 | #include "dzl-dock-types.h" 29 | 30 | G_BEGIN_DECLS 31 | 32 | DZL_AVAILABLE_IN_ALL 33 | GtkPositionType dzl_dock_overlay_edge_get_edge (DzlDockOverlayEdge *self); 34 | DZL_AVAILABLE_IN_ALL 35 | void dzl_dock_overlay_edge_set_edge (DzlDockOverlayEdge *self, 36 | GtkPositionType edge); 37 | DZL_AVAILABLE_IN_ALL 38 | gint dzl_dock_overlay_edge_get_position (DzlDockOverlayEdge *self); 39 | DZL_AVAILABLE_IN_ALL 40 | void dzl_dock_overlay_edge_set_position (DzlDockOverlayEdge *self, 41 | gint position); 42 | 43 | G_END_DECLS 44 | 45 | #endif /* DZL_DOCK_OVERLAY_EDGE_H */ 46 | -------------------------------------------------------------------------------- /src/panel/dzl-dock-paned-private.h: -------------------------------------------------------------------------------- 1 | /* dzl-dock-paned-private.h 2 | * 3 | * Copyright (C) 2016 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #if !defined(DAZZLE_INSIDE) && !defined(DAZZLE_COMPILATION) 20 | # error "Only can be included directly." 21 | #endif 22 | 23 | #ifndef DZL_DOCK_PANED_PRIVATE_H 24 | #define DZL_DOCK_PANED_PRIVATE_H 25 | 26 | #include "dzl-dock-paned.h" 27 | 28 | G_BEGIN_DECLS 29 | 30 | void dzl_dock_paned_set_child_edge (DzlDockPaned *self, 31 | GtkPositionType child_edge); 32 | 33 | G_END_DECLS 34 | 35 | #endif /* DZL_DOCK_PANED_PRIVATE_H */ 36 | -------------------------------------------------------------------------------- /src/panel/dzl-dock-paned.h: -------------------------------------------------------------------------------- 1 | /* dzl-dock-paned.h 2 | * 3 | * Copyright (C) 2016 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #if !defined(DAZZLE_INSIDE) && !defined(DAZZLE_COMPILATION) 20 | # error "Only can be included directly." 21 | #endif 22 | 23 | #ifndef DZL_DOCK_PANED_H 24 | #define DZL_DOCK_PANED_H 25 | 26 | #include "dzl-version-macros.h" 27 | 28 | #include "dzl-dock-types.h" 29 | 30 | G_BEGIN_DECLS 31 | 32 | struct _DzlDockPanedClass 33 | { 34 | DzlMultiPanedClass parent; 35 | 36 | gpointer _reserved1; 37 | gpointer _reserved2; 38 | gpointer _reserved3; 39 | gpointer _reserved4; 40 | gpointer _reserved5; 41 | gpointer _reserved6; 42 | gpointer _reserved7; 43 | gpointer _reserved8; 44 | }; 45 | 46 | DZL_AVAILABLE_IN_ALL 47 | GtkWidget *dzl_dock_paned_new (void); 48 | 49 | G_END_DECLS 50 | 51 | #endif /* DZL_DOCK_PANED_H */ 52 | -------------------------------------------------------------------------------- /src/panel/dzl-dock-window.h: -------------------------------------------------------------------------------- 1 | /* dzl-dock-window.h 2 | * 3 | * Copyright (C) 2016 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #if !defined(DAZZLE_INSIDE) && !defined(DAZZLE_COMPILATION) 20 | # error "Only can be included directly." 21 | #endif 22 | 23 | #ifndef DZL_DOCK_WINDOW_H 24 | #define DZL_DOCK_WINDOW_H 25 | 26 | #include "dzl-version-macros.h" 27 | 28 | #include "dzl-dock.h" 29 | 30 | G_BEGIN_DECLS 31 | 32 | struct _DzlDockWindowClass 33 | { 34 | GtkWindowClass parent; 35 | 36 | gpointer _reserved1; 37 | gpointer _reserved2; 38 | gpointer _reserved3; 39 | gpointer _reserved4; 40 | gpointer _reserved5; 41 | gpointer _reserved6; 42 | gpointer _reserved7; 43 | gpointer _reserved8; 44 | }; 45 | 46 | DZL_AVAILABLE_IN_ALL 47 | GtkWidget *dzl_dock_window_new (void); 48 | 49 | G_END_DECLS 50 | 51 | #endif /* DZL_DOCK_WINDOW_H */ 52 | -------------------------------------------------------------------------------- /src/panel/dzl-dock.c: -------------------------------------------------------------------------------- 1 | /* dzl-dock.c 2 | * 3 | * Copyright (C) 2016 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #define G_LOG_DOMAIN "dzl-dock" 20 | 21 | #include "config.h" 22 | 23 | #include "dzl-dock.h" 24 | #include "dzl-resources.h" 25 | 26 | G_DEFINE_INTERFACE (DzlDock, dzl_dock, GTK_TYPE_CONTAINER) 27 | 28 | static void 29 | dzl_dock_default_init (DzlDockInterface *iface) 30 | { 31 | GdkScreen *screen; 32 | 33 | g_resources_register (dzl_get_resource ()); 34 | 35 | screen = gdk_screen_get_default (); 36 | 37 | if (screen != NULL) 38 | gtk_icon_theme_add_resource_path (gtk_icon_theme_get_default (), 39 | "/org/gnome/dazzle/icons"); 40 | 41 | g_object_interface_install_property (iface, 42 | g_param_spec_object ("manager", 43 | "Manager", 44 | "Manager", 45 | DZL_TYPE_DOCK_MANAGER, 46 | (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS))); 47 | } 48 | -------------------------------------------------------------------------------- /src/panel/dzl-dock.h: -------------------------------------------------------------------------------- 1 | /* dzl-dock.h 2 | * 3 | * Copyright (C) 2016 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #if !defined(DAZZLE_INSIDE) && !defined(DAZZLE_COMPILATION) 20 | # error "Only can be included directly." 21 | #endif 22 | 23 | #ifndef DZL_DOCK_H 24 | #define DZL_DOCK_H 25 | 26 | #include "dzl-dock-types.h" 27 | 28 | G_BEGIN_DECLS 29 | 30 | struct _DzlDockInterface 31 | { 32 | GTypeInterface parent; 33 | }; 34 | 35 | G_END_DECLS 36 | 37 | #endif /* DZL_DOCK_H */ 38 | -------------------------------------------------------------------------------- /src/panel/dzl-tab-private.h: -------------------------------------------------------------------------------- 1 | /* dzl-tab-private.h 2 | * 3 | * Copyright (C) 2017 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_TAB_PRIVATE_H 20 | #define DZL_TAB_PRIVATE_H 21 | 22 | #include "dzl-tab.h" 23 | 24 | G_BEGIN_DECLS 25 | 26 | void _dzl_tab_update_controls (DzlTab *self); 27 | 28 | G_END_DECLS 29 | 30 | #endif /* DZL_TAB_PRIVATE_H */ 31 | -------------------------------------------------------------------------------- /src/panel/meson.build: -------------------------------------------------------------------------------- 1 | panel_headers = [ 2 | 'dzl-dock-bin-edge.h', 3 | 'dzl-dock-bin.h', 4 | 'dzl-dock-item.h', 5 | 'dzl-dock-manager.h', 6 | 'dzl-dock-overlay-edge.h', 7 | 'dzl-dock-overlay.h', 8 | 'dzl-dock-paned.h', 9 | 'dzl-dock-revealer.h', 10 | 'dzl-dock-stack.h', 11 | 'dzl-dock-transient-grab.h', 12 | 'dzl-dock-types.h', 13 | 'dzl-dock-widget.h', 14 | 'dzl-dock-window.h', 15 | 'dzl-dock.h', 16 | 'dzl-tab-strip.h', 17 | 'dzl-tab.h', 18 | ] 19 | 20 | panel_sources = [ 21 | 'dzl-dock-bin-edge.c', 22 | 'dzl-dock-bin.c', 23 | 'dzl-dock-item.c', 24 | 'dzl-dock-manager.c', 25 | 'dzl-dock-overlay-edge.c', 26 | 'dzl-dock-overlay.c', 27 | 'dzl-dock-paned.c', 28 | 'dzl-dock-revealer.c', 29 | 'dzl-dock-stack.c', 30 | 'dzl-dock-transient-grab.c', 31 | 'dzl-dock-widget.c', 32 | 'dzl-dock-window.c', 33 | 'dzl-dock.c', 34 | 'dzl-tab-strip.c', 35 | 'dzl-tab.c', 36 | ] 37 | 38 | libdazzle_public_headers += files(panel_headers) 39 | libdazzle_public_sources += files(panel_sources) 40 | 41 | install_headers(panel_headers, subdir: join_paths(libdazzle_header_subdir, 'panel')) 42 | -------------------------------------------------------------------------------- /src/pathbar/dzl-path-bar.h: -------------------------------------------------------------------------------- 1 | /* dzl-path-bar.h 2 | * 3 | * Copyright (C) 2016-2017 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_PATH_BAR_H 20 | #define DZL_PATH_BAR_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | #include "pathbar/dzl-path.h" 27 | 28 | G_BEGIN_DECLS 29 | 30 | #define DZL_TYPE_PATH_BAR (dzl_path_bar_get_type()) 31 | 32 | DZL_AVAILABLE_IN_ALL 33 | G_DECLARE_FINAL_TYPE (DzlPathBar, dzl_path_bar, DZL, PATH_BAR, GtkBox) 34 | 35 | DZL_AVAILABLE_IN_ALL 36 | GtkWidget *dzl_path_bar_new (void); 37 | DZL_AVAILABLE_IN_ALL 38 | DzlPath *dzl_path_bar_get_path (DzlPathBar *self); 39 | DZL_AVAILABLE_IN_ALL 40 | void dzl_path_bar_set_path (DzlPathBar *self, 41 | DzlPath *path); 42 | DZL_AVAILABLE_IN_ALL 43 | void dzl_path_bar_set_selected_index (DzlPathBar *self, 44 | guint index); 45 | 46 | G_END_DECLS 47 | 48 | #endif /* DZL_PATH_BAR_H */ 49 | 50 | -------------------------------------------------------------------------------- /src/pathbar/dzl-path-element.h: -------------------------------------------------------------------------------- 1 | /* dzl-path-element.h 2 | * 3 | * Copyright (C) 2016-2017 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_PATH_ELEMENT_H 20 | #define DZL_PATH_ELEMENT_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define DZL_TYPE_PATH_ELEMENT (dzl_path_element_get_type()) 29 | 30 | DZL_AVAILABLE_IN_ALL 31 | G_DECLARE_FINAL_TYPE (DzlPathElement, dzl_path_element, DZL, PATH_ELEMENT, GObject) 32 | 33 | DZL_AVAILABLE_IN_ALL 34 | DzlPathElement *dzl_path_element_new (const gchar *id, 35 | const gchar *icon_name, 36 | const gchar *title); 37 | DZL_AVAILABLE_IN_ALL 38 | const gchar *dzl_path_element_get_title (DzlPathElement *self); 39 | DZL_AVAILABLE_IN_ALL 40 | const gchar *dzl_path_element_get_id (DzlPathElement *self); 41 | DZL_AVAILABLE_IN_ALL 42 | const gchar *dzl_path_element_get_icon_name (DzlPathElement *self); 43 | 44 | G_END_DECLS 45 | 46 | #endif /* DZL_PATH_ELEMENT_H */ 47 | 48 | -------------------------------------------------------------------------------- /src/pathbar/meson.build: -------------------------------------------------------------------------------- 1 | pathbar_headers = [ 2 | 'dzl-path-bar.h', 3 | 'dzl-path-element.h', 4 | 'dzl-path.h', 5 | ] 6 | 7 | pathbar_sources = [ 8 | 'dzl-path-bar.c', 9 | 'dzl-path.c', 10 | 'dzl-path-element.c', 11 | ] 12 | 13 | libdazzle_public_headers += files(pathbar_headers) 14 | libdazzle_public_sources += files(pathbar_sources) 15 | 16 | install_headers(pathbar_headers, subdir: join_paths(libdazzle_header_subdir, 'pathbar')) 17 | -------------------------------------------------------------------------------- /src/prefs/dzl-preferences-bin-private.h: -------------------------------------------------------------------------------- 1 | /* dzl-preferences-bin-private.h 2 | * 3 | * Copyright (C) 2015-2017 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_PREFERENCES_BIN_PRIVATE_H 20 | #define DZL_PREFERENCES_BIN_PRIVATE_H 21 | 22 | #include "prefs/dzl-preferences-bin.h" 23 | 24 | G_BEGIN_DECLS 25 | 26 | void _dzl_preferences_bin_set_map (DzlPreferencesBin *self, 27 | GHashTable *map); 28 | gboolean _dzl_preferences_bin_matches (DzlPreferencesBin *self, 29 | DzlPatternSpec *spec); 30 | 31 | G_END_DECLS 32 | 33 | #endif /* DZL_PREFERENCES_BIN_PRIVATE_H */ 34 | -------------------------------------------------------------------------------- /src/prefs/dzl-preferences-bin.h: -------------------------------------------------------------------------------- 1 | /* dzl-preferences-bin.h 2 | * 3 | * Copyright (C) 2015-2017 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_PREFERENCES_BIN_H 20 | #define DZL_PREFERENCES_BIN_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | #include "search/dzl-pattern-spec.h" 27 | 28 | G_BEGIN_DECLS 29 | 30 | #define DZL_TYPE_PREFERENCES_BIN (dzl_preferences_bin_get_type()) 31 | 32 | DZL_AVAILABLE_IN_ALL 33 | G_DECLARE_DERIVABLE_TYPE (DzlPreferencesBin, dzl_preferences_bin, DZL, PREFERENCES_BIN, GtkBin) 34 | 35 | struct _DzlPreferencesBinClass 36 | { 37 | GtkBinClass parent_class; 38 | 39 | void (*connect) (DzlPreferencesBin *self, 40 | GSettings *settings); 41 | void (*disconnect) (DzlPreferencesBin *self, 42 | GSettings *settings); 43 | gboolean (*matches) (DzlPreferencesBin *self, 44 | DzlPatternSpec *spec); 45 | 46 | gpointer _reserved1; 47 | gpointer _reserved2; 48 | gpointer _reserved3; 49 | gpointer _reserved4; 50 | gpointer _reserved5; 51 | gpointer _reserved6; 52 | gpointer _reserved7; 53 | gpointer _reserved8; 54 | }; 55 | 56 | G_END_DECLS 57 | 58 | #endif /* DZL_PREFERENCES_BIN_H */ 59 | -------------------------------------------------------------------------------- /src/prefs/dzl-preferences-entry.h: -------------------------------------------------------------------------------- 1 | /* dzl-preferences-entry.h 2 | * 3 | * Copyright (C) 2015-2017 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_PREFERENCES_ENTRY_H 20 | #define DZL_PREFERENCES_ENTRY_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | #include "prefs/dzl-preferences-bin.h" 27 | 28 | G_BEGIN_DECLS 29 | 30 | #define DZL_TYPE_PREFERENCES_ENTRY (dzl_preferences_entry_get_type()) 31 | 32 | DZL_AVAILABLE_IN_ALL 33 | G_DECLARE_DERIVABLE_TYPE (DzlPreferencesEntry, dzl_preferences_entry, DZL, PREFERENCES_ENTRY, DzlPreferencesBin) 34 | 35 | struct _DzlPreferencesEntryClass 36 | { 37 | DzlPreferencesBinClass parent_class; 38 | }; 39 | 40 | DZL_AVAILABLE_IN_ALL 41 | GtkWidget *dzl_preferences_entry_get_entry_widget (DzlPreferencesEntry *self); 42 | DZL_AVAILABLE_IN_ALL 43 | GtkWidget *dzl_preferences_entry_get_title_widget (DzlPreferencesEntry *self); 44 | 45 | G_END_DECLS 46 | 47 | #endif /* DZL_PREFERENCES_ENTRY_H */ 48 | -------------------------------------------------------------------------------- /src/prefs/dzl-preferences-entry.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 26 | 27 | -------------------------------------------------------------------------------- /src/prefs/dzl-preferences-file-chooser-button.h: -------------------------------------------------------------------------------- 1 | /* dzl-preferences-file-chooser-button.h 2 | * 3 | * Copyright (C) 2016 Akshaya Kakkilaya 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_PREFERENCES_FILE_CHOOSER_BUTTON_H 20 | #define DZL_PREFERENCES_FILE_CHOOSER_BUTTON_H 21 | 22 | #include "dzl-version-macros.h" 23 | 24 | #include "prefs/dzl-preferences-bin.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define DZL_TYPE_PREFERENCES_FILE_CHOOSER_BUTTON (dzl_preferences_file_chooser_button_get_type()) 29 | 30 | DZL_AVAILABLE_IN_ALL 31 | G_DECLARE_FINAL_TYPE (DzlPreferencesFileChooserButton, dzl_preferences_file_chooser_button, DZL, PREFERENCES_FILE_CHOOSER_BUTTON, DzlPreferencesBin) 32 | 33 | G_END_DECLS 34 | 35 | #endif /* DZL_PREFERENCES_FILE_CHOOSER_BUTTON_H */ 36 | -------------------------------------------------------------------------------- /src/prefs/dzl-preferences-flow-box.c: -------------------------------------------------------------------------------- 1 | /* dzl-preferences-flow-box.c 2 | * 3 | * Copyright (C) 2016 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #define G_LOG_DOMAIN "dzl-preferences-flow-box" 20 | 21 | #include "config.h" 22 | 23 | #include "prefs/dzl-preferences-flow-box.h" 24 | 25 | struct _DzlPreferencesFlowBox 26 | { 27 | DzlColumnLayout parent; 28 | }; 29 | 30 | G_DEFINE_TYPE (DzlPreferencesFlowBox, dzl_preferences_flow_box, DZL_TYPE_COLUMN_LAYOUT) 31 | 32 | static void 33 | dzl_preferences_flow_box_class_init (DzlPreferencesFlowBoxClass *klass) 34 | { 35 | } 36 | 37 | static void 38 | dzl_preferences_flow_box_init (DzlPreferencesFlowBox *self) 39 | { 40 | } 41 | 42 | GtkWidget * 43 | dzl_preferences_flow_box_new (void) 44 | { 45 | return g_object_new (DZL_TYPE_PREFERENCES_FLOW_BOX, NULL); 46 | } 47 | -------------------------------------------------------------------------------- /src/prefs/dzl-preferences-flow-box.h: -------------------------------------------------------------------------------- 1 | /* dzl-preferences-flow-box.h 2 | * 3 | * Copyright (C) 2016 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_PREFERENCES_FLOW_BOX_H 20 | #define DZL_PREFERENCES_FLOW_BOX_H 21 | 22 | #include "dzl-version-macros.h" 23 | 24 | #include "widgets/dzl-column-layout.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define DZL_TYPE_PREFERENCES_FLOW_BOX (dzl_preferences_flow_box_get_type()) 29 | 30 | DZL_AVAILABLE_IN_ALL 31 | G_DECLARE_FINAL_TYPE (DzlPreferencesFlowBox, dzl_preferences_flow_box, DZL, PREFERENCES_FLOW_BOX, DzlColumnLayout) 32 | 33 | DZL_AVAILABLE_IN_3_30 34 | GtkWidget *dzl_preferences_flow_box_new (void); 35 | 36 | G_END_DECLS 37 | 38 | #endif /* DZL_PREFERENCES_FLOW_BOX_H */ 39 | -------------------------------------------------------------------------------- /src/prefs/dzl-preferences-font-button.h: -------------------------------------------------------------------------------- 1 | /* dzl-preferences-font-button.h 2 | * 3 | * Copyright (C) 2015-2017 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_PREFERENCES_FONT_BUTTON_H 20 | #define DZL_PREFERENCES_FONT_BUTTON_H 21 | 22 | #include "dzl-version-macros.h" 23 | 24 | #include "prefs/dzl-preferences-bin.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define DZL_TYPE_PREFERENCES_FONT_BUTTON (dzl_preferences_font_button_get_type()) 29 | 30 | DZL_AVAILABLE_IN_ALL 31 | G_DECLARE_FINAL_TYPE (DzlPreferencesFontButton, dzl_preferences_font_button, DZL, PREFERENCES_FONT_BUTTON, DzlPreferencesBin) 32 | 33 | G_END_DECLS 34 | 35 | #endif /* DZL_PREFERENCES_FONT_BUTTON_H */ 36 | -------------------------------------------------------------------------------- /src/prefs/dzl-preferences-group-private.h: -------------------------------------------------------------------------------- 1 | /* dzl-preferences-group-private.h 2 | * 3 | * Copyright (C) 2015-2017 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_PREFERENCES_GROUP_PRIVATE_H 20 | #define DZL_PREFERENCES_GROUP_PRIVATE_H 21 | 22 | #include "prefs/dzl-preferences-group.h" 23 | #include "search/dzl-pattern-spec.h" 24 | 25 | G_BEGIN_DECLS 26 | 27 | struct _DzlPreferencesGroup 28 | { 29 | GtkBin parent_instance; 30 | 31 | gint priority; 32 | guint is_list : 1; 33 | 34 | GtkLabel *title; 35 | GtkBox *box; 36 | GtkListBox *list_box; 37 | GtkFrame *list_box_frame; 38 | 39 | GPtrArray *widgets; 40 | 41 | GtkListBoxRow *last_focused; 42 | guint last_focused_tab_backward : 1; 43 | 44 | GHashTable *size_groups; 45 | }; 46 | 47 | G_END_DECLS 48 | 49 | #endif /* DZL_PREFERENCES_GROUP_PRIVATE_H */ 50 | -------------------------------------------------------------------------------- /src/prefs/dzl-preferences-page-private.h: -------------------------------------------------------------------------------- 1 | /* dzl-preferences-page-private.h 2 | * 3 | * Copyright (C) 2015-2017 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_PREFERENCES_PAGE_PRIVATE_H 20 | #define DZL_PREFERENCES_PAGE_PRIVATE_H 21 | 22 | #include "prefs/dzl-preferences-page.h" 23 | #include "prefs/dzl-preferences-flow-box.h" 24 | 25 | G_BEGIN_DECLS 26 | 27 | struct _DzlPreferencesPage 28 | { 29 | GtkBin parent_instance; 30 | gint priority; 31 | DzlPreferencesFlowBox *box; 32 | GHashTable *groups_by_name; 33 | }; 34 | 35 | G_END_DECLS 36 | 37 | #endif /* DZL_PREFERENCES_PAGE_PRIVATE_H */ 38 | -------------------------------------------------------------------------------- /src/prefs/dzl-preferences-page.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /src/prefs/dzl-preferences-spin-button.h: -------------------------------------------------------------------------------- 1 | /* dzl-preferences-spin-button.h 2 | * 3 | * Copyright (C) 2015-2017 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_PREFERENCES_SPIN_BUTTON_H 20 | #define DZL_PREFERENCES_SPIN_BUTTON_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | #include "prefs/dzl-preferences-bin.h" 27 | 28 | G_BEGIN_DECLS 29 | 30 | #define DZL_TYPE_PREFERENCES_SPIN_BUTTON (dzl_preferences_spin_button_get_type()) 31 | 32 | DZL_AVAILABLE_IN_ALL 33 | G_DECLARE_FINAL_TYPE (DzlPreferencesSpinButton, dzl_preferences_spin_button, DZL, PREFERENCES_SPIN_BUTTON, DzlPreferencesBin) 34 | 35 | DZL_AVAILABLE_IN_ALL 36 | GtkWidget *dzl_preferences_spin_button_get_spin_button (DzlPreferencesSpinButton *self); 37 | 38 | G_END_DECLS 39 | 40 | #endif /* DZL_PREFERENCES_SPIN_BUTTON_H */ 41 | -------------------------------------------------------------------------------- /src/prefs/dzl-preferences-switch.h: -------------------------------------------------------------------------------- 1 | /* dzl-preferences-switch.h 2 | * 3 | * Copyright (C) 2015-2017 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_PREFERENCES_SWITCH_H 20 | #define DZL_PREFERENCES_SWITCH_H 21 | 22 | #include "dzl-version-macros.h" 23 | 24 | #include "prefs/dzl-preferences-bin.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define DZL_TYPE_PREFERENCES_SWITCH (dzl_preferences_switch_get_type()) 29 | 30 | DZL_AVAILABLE_IN_ALL 31 | G_DECLARE_FINAL_TYPE (DzlPreferencesSwitch, dzl_preferences_switch, DZL, PREFERENCES_SWITCH, DzlPreferencesBin) 32 | 33 | G_END_DECLS 34 | 35 | #endif /* DZL_PREFERENCES_SWITCH_H */ 36 | -------------------------------------------------------------------------------- /src/prefs/meson.build: -------------------------------------------------------------------------------- 1 | prefs_headers = [ 2 | 'dzl-preferences-bin.h', 3 | 'dzl-preferences-entry.h', 4 | 'dzl-preferences-file-chooser-button.h', 5 | 'dzl-preferences-flow-box.h', 6 | 'dzl-preferences-font-button.h', 7 | 'dzl-preferences-group.h', 8 | 'dzl-preferences-page.h', 9 | 'dzl-preferences-spin-button.h', 10 | 'dzl-preferences-switch.h', 11 | 'dzl-preferences-view.h', 12 | 'dzl-preferences.h', 13 | ] 14 | 15 | prefs_sources = [ 16 | 'dzl-preferences-bin.c', 17 | 'dzl-preferences-entry.c', 18 | 'dzl-preferences-file-chooser-button.c', 19 | 'dzl-preferences-flow-box.c', 20 | 'dzl-preferences-font-button.c', 21 | 'dzl-preferences-group.c', 22 | 'dzl-preferences-page.c', 23 | 'dzl-preferences-spin-button.c', 24 | 'dzl-preferences-switch.c', 25 | 'dzl-preferences-view.c', 26 | 'dzl-preferences.c', 27 | ] 28 | 29 | libdazzle_public_headers += files(prefs_headers) 30 | libdazzle_public_sources += files(prefs_sources) 31 | 32 | install_headers(prefs_headers, subdir: join_paths(libdazzle_header_subdir, 'prefs')) 33 | -------------------------------------------------------------------------------- /src/search/dzl-fuzzy-index-cursor.h: -------------------------------------------------------------------------------- 1 | /* dzl-fuzzy-index-cursor.h 2 | * 3 | * Copyright (C) 2016 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_FUZZY_INDEX_CURSOR_H 20 | #define DZL_FUZZY_INDEX_CURSOR_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | #include "dzl-fuzzy-index.h" 27 | 28 | G_BEGIN_DECLS 29 | 30 | #define DZL_TYPE_FUZZY_INDEX_CURSOR (dzl_fuzzy_index_cursor_get_type()) 31 | 32 | DZL_AVAILABLE_IN_ALL 33 | G_DECLARE_FINAL_TYPE (DzlFuzzyIndexCursor, dzl_fuzzy_index_cursor, DZL, FUZZY_INDEX_CURSOR, GObject) 34 | 35 | DZL_AVAILABLE_IN_ALL 36 | DzlFuzzyIndex *dzl_fuzzy_index_cursor_get_index (DzlFuzzyIndexCursor *self); 37 | 38 | G_END_DECLS 39 | 40 | #endif /* DZL_FUZZY_INDEX_CURSOR_H */ 41 | -------------------------------------------------------------------------------- /src/search/dzl-fuzzy-index-match.h: -------------------------------------------------------------------------------- 1 | /* dzl-fuzzy-index-match.h 2 | * 3 | * Copyright (C) 2016 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_FUZZY_INDEX_MATCH_H 20 | #define DZL_FUZZY_INDEX_MATCH_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define DZL_TYPE_FUZZY_INDEX_MATCH (dzl_fuzzy_index_match_get_type()) 29 | 30 | DZL_AVAILABLE_IN_ALL 31 | G_DECLARE_FINAL_TYPE (DzlFuzzyIndexMatch, dzl_fuzzy_index_match, DZL, FUZZY_INDEX_MATCH, GObject) 32 | 33 | DZL_AVAILABLE_IN_ALL 34 | const gchar *dzl_fuzzy_index_match_get_key (DzlFuzzyIndexMatch *self); 35 | DZL_AVAILABLE_IN_ALL 36 | GVariant *dzl_fuzzy_index_match_get_document (DzlFuzzyIndexMatch *self); 37 | DZL_AVAILABLE_IN_ALL 38 | gfloat dzl_fuzzy_index_match_get_score (DzlFuzzyIndexMatch *self); 39 | DZL_AVAILABLE_IN_ALL 40 | guint dzl_fuzzy_index_match_get_priority (DzlFuzzyIndexMatch *self); 41 | 42 | G_END_DECLS 43 | 44 | #endif /* DZL_FUZZY_INDEX_MATCH_H */ 45 | -------------------------------------------------------------------------------- /src/search/dzl-fuzzy-index-private.h: -------------------------------------------------------------------------------- 1 | /* dzl-fuzzy-index-private.h 2 | * 3 | * Copyright (C) 2016 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_FUZZY_INDEX_PRIVATE_H 20 | #define DZL_FUZZY_INDEX_PRIVATE_H 21 | 22 | #include "dzl-fuzzy-index.h" 23 | 24 | G_BEGIN_DECLS 25 | 26 | GVariant *_dzl_fuzzy_index_lookup_document (DzlFuzzyIndex *self, 27 | guint document_id); 28 | gboolean _dzl_fuzzy_index_resolve (DzlFuzzyIndex *self, 29 | guint lookaside_id, 30 | guint *document_id, 31 | const gchar **key, 32 | guint *priority, 33 | guint in_score, 34 | guint last_offset, 35 | gfloat *out_score); 36 | 37 | G_END_DECLS 38 | 39 | #endif /* DZL_FUZZY_INDEX_PRIVATE_H */ 40 | -------------------------------------------------------------------------------- /src/search/dzl-levenshtein.h: -------------------------------------------------------------------------------- 1 | /* dzl-levenshtein.h 2 | * 3 | * Copyright (C) 2017 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_LEVENSHTEIN_H 20 | #define DZL_LEVENSHTEIN_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | DZL_AVAILABLE_IN_ALL 29 | gint dzl_levenshtein (const gchar *needle, 30 | const gchar *haystack); 31 | 32 | G_END_DECLS 33 | 34 | #endif /* DZL_LEVENSHTEIN_H */ 35 | -------------------------------------------------------------------------------- /src/search/dzl-pattern-spec.h: -------------------------------------------------------------------------------- 1 | /* dzl-pattern-spec.h 2 | * 3 | * Copyright (C) 2015-2017 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_MATCH_PATTERN_H 20 | #define DZL_MATCH_PATTERN_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | typedef struct _DzlPatternSpec DzlPatternSpec; 29 | 30 | #define DZL_TYPE_PATTERN_SPEC (dzl_pattern_spec_get_type()) 31 | 32 | DZL_AVAILABLE_IN_ALL 33 | GType dzl_pattern_spec_get_type (void); 34 | DZL_AVAILABLE_IN_ALL 35 | DzlPatternSpec *dzl_pattern_spec_new (const gchar *keywords); 36 | DZL_AVAILABLE_IN_ALL 37 | DzlPatternSpec *dzl_pattern_spec_ref (DzlPatternSpec *self); 38 | DZL_AVAILABLE_IN_ALL 39 | void dzl_pattern_spec_unref (DzlPatternSpec *self); 40 | DZL_AVAILABLE_IN_ALL 41 | gboolean dzl_pattern_spec_match (DzlPatternSpec *self, 42 | const gchar *haystack); 43 | DZL_AVAILABLE_IN_ALL 44 | const gchar *dzl_pattern_spec_get_text (DzlPatternSpec *self); 45 | 46 | G_DEFINE_AUTOPTR_CLEANUP_FUNC (DzlPatternSpec, dzl_pattern_spec_unref) 47 | 48 | G_END_DECLS 49 | 50 | #endif /* DZL_MATCH_PATTERN_H */ 51 | -------------------------------------------------------------------------------- /src/search/meson.build: -------------------------------------------------------------------------------- 1 | search_headers = [ 2 | 'dzl-fuzzy-index-builder.h', 3 | 'dzl-fuzzy-index-cursor.h', 4 | 'dzl-fuzzy-index.h', 5 | 'dzl-fuzzy-index-match.h', 6 | 'dzl-fuzzy-mutable-index.h', 7 | 'dzl-levenshtein.h', 8 | 'dzl-pattern-spec.h', 9 | 'dzl-trie.h', 10 | ] 11 | 12 | search_sources = [ 13 | 'dzl-fuzzy-index-builder.c', 14 | 'dzl-fuzzy-index-cursor.c', 15 | 'dzl-fuzzy-index.c', 16 | 'dzl-fuzzy-index-match.c', 17 | 'dzl-fuzzy-mutable-index.c', 18 | 'dzl-levenshtein.c', 19 | 'dzl-pattern-spec.c', 20 | 'dzl-trie.c', 21 | ] 22 | 23 | libdazzle_public_headers += files(search_headers) 24 | libdazzle_public_sources += files(search_sources) 25 | 26 | install_headers(search_headers, subdir: join_paths(libdazzle_header_subdir, 'search')) 27 | -------------------------------------------------------------------------------- /src/settings/meson.build: -------------------------------------------------------------------------------- 1 | settings_headers = [ 2 | 'dzl-settings-sandwich.h', 3 | ] 4 | 5 | settings_sources = [ 6 | 'dzl-settings-sandwich.c', 7 | ] 8 | 9 | libdazzle_public_headers += files(settings_headers) 10 | libdazzle_public_sources += files(settings_sources) 11 | 12 | install_headers(settings_headers, subdir: join_paths(libdazzle_header_subdir, 'settings')) 13 | -------------------------------------------------------------------------------- /src/shortcuts/dzl-shortcut-phase.c: -------------------------------------------------------------------------------- 1 | /* dzl-shortcut-phase.c 2 | * 3 | * Copyright (C) 2017 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #define G_LOG_DOMAIN "dzl-shortcut-phase" 20 | 21 | #include "config.h" 22 | 23 | #include "shortcuts/dzl-shortcut-phase.h" 24 | 25 | GType 26 | dzl_shortcut_phase_get_type (void) 27 | { 28 | static GType type_id; 29 | 30 | if (g_once_init_enter (&type_id)) 31 | { 32 | static const GFlagsValue values[] = { 33 | { DZL_SHORTCUT_PHASE_DISPATCH, "DZL_SHORTCUT_PHASE_DISPATCH", "dispatch" }, 34 | { DZL_SHORTCUT_PHASE_CAPTURE, "DZL_SHORTCUT_PHASE_CAPTURE", "capture" }, 35 | { DZL_SHORTCUT_PHASE_BUBBLE, "DZL_SHORTCUT_PHASE_BUBBLE", "bubble" }, 36 | { DZL_SHORTCUT_PHASE_GLOBAL, "DZL_SHORTCUT_PHASE_GLOBAL", "global" }, 37 | { 0 } 38 | }; 39 | GType _type_id = g_flags_register_static ("DzlShortcutPhase", values); 40 | g_once_init_leave (&type_id, _type_id); 41 | } 42 | 43 | return type_id; 44 | } 45 | -------------------------------------------------------------------------------- /src/shortcuts/dzl-shortcuts-group.h: -------------------------------------------------------------------------------- 1 | /* dzl-shortcuts-groupprivate.h 2 | * 3 | * Copyright (C) 2015 Christian Hergert 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Library General Public License as 7 | * published by the Free Software Foundation; either version 2 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Library General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Library General Public 16 | * License along with this library. If not, see . 17 | */ 18 | 19 | #ifndef __DZL_SHORTCUTS_GROUP_H__ 20 | #define __DZL_SHORTCUTS_GROUP_H__ 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define DZL_TYPE_SHORTCUTS_GROUP (dzl_shortcuts_group_get_type ()) 29 | #define DZL_SHORTCUTS_GROUP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DZL_TYPE_SHORTCUTS_GROUP, DzlShortcutsGroup)) 30 | #define DZL_SHORTCUTS_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DZL_TYPE_SHORTCUTS_GROUP, DzlShortcutsGroupClass)) 31 | #define DZL_IS_SHORTCUTS_GROUP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DZL_TYPE_SHORTCUTS_GROUP)) 32 | #define DZL_IS_SHORTCUTS_GROUP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DZL_TYPE_SHORTCUTS_GROUP)) 33 | #define DZL_SHORTCUTS_GROUP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DZL_TYPE_SHORTCUTS_GROUP, DzlShortcutsGroupClass)) 34 | 35 | 36 | typedef struct _DzlShortcutsGroup DzlShortcutsGroup; 37 | typedef struct _DzlShortcutsGroupClass DzlShortcutsGroupClass; 38 | 39 | DZL_AVAILABLE_IN_ALL 40 | GType dzl_shortcuts_group_get_type (void) G_GNUC_CONST; 41 | 42 | G_END_DECLS 43 | 44 | #endif /* __DZL_SHORTCUTS_GROUP_H__ */ 45 | -------------------------------------------------------------------------------- /src/shortcuts/dzl-shortcuts-shortcut-private.h: -------------------------------------------------------------------------------- 1 | /* GTK - The GIMP Toolkit 2 | * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2.1 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with this library. If not, see . 16 | */ 17 | 18 | /* 19 | * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS 20 | * file for a list of people on the GTK+ Team. See the ChangeLog 21 | * files for a list of changes. These files are distributed with 22 | * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 23 | */ 24 | 25 | #ifndef __DZL_SHORTCUTS_SHORTCUT_PRIVATE_H__ 26 | #define __DZL_SHORTCUTS_SHORTCUT_PRIVATE_H__ 27 | 28 | #include "dzl-shortcuts-shortcut.h" 29 | 30 | G_BEGIN_DECLS 31 | 32 | void dzl_shortcuts_shortcut_update_accel (DzlShortcutsShortcut *self, 33 | GtkWindow *window); 34 | 35 | G_END_DECLS 36 | 37 | #endif /* __GTK_sHORTCUTS_SHORTCUT_PRIVATE_H__ */ 38 | -------------------------------------------------------------------------------- /src/shortcuts/dzl-shortcuts-window-private.h: -------------------------------------------------------------------------------- 1 | 2 | /* GTK - The GIMP Toolkit 3 | * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library. If not, see . 17 | */ 18 | 19 | /* 20 | * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS 21 | * file for a list of people on the GTK+ Team. See the ChangeLog 22 | * files for a list of changes. These files are distributed with 23 | * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 24 | */ 25 | 26 | #ifndef __DZL_SHORTCUTS_WINDOW_PRIVATE_H__ 27 | #define __DZL_SHORTCUTS_WINDOW_PRIVATE_H__ 28 | 29 | #include "dzl-shortcuts-window.h" 30 | 31 | G_BEGIN_DECLS 32 | 33 | void dzl_shortcuts_window_set_window (DzlShortcutsWindow *self, 34 | GtkWindow *window); 35 | 36 | G_END_DECLS 37 | 38 | #endif /* __GTK_sHORTCUTS_WINDOW_PRIVATE_H__ */ 39 | -------------------------------------------------------------------------------- /src/shortcuts/meson.build: -------------------------------------------------------------------------------- 1 | shortcuts_headers = [ 2 | 'dzl-shortcut-accel-dialog.h', 3 | 'dzl-shortcut-chord.h', 4 | 'dzl-shortcut-context.h', 5 | 'dzl-shortcut-controller.h', 6 | 'dzl-shortcut-label.h', 7 | 'dzl-shortcut-manager.h', 8 | 'dzl-shortcut-model.h', 9 | 'dzl-shortcut-phase.h', 10 | 'dzl-shortcut-simple-label.h', 11 | 'dzl-shortcut-theme-editor.h', 12 | 'dzl-shortcut-theme.h', 13 | 'dzl-shortcut-tooltip.h', 14 | 'dzl-shortcuts-group.h', 15 | 'dzl-shortcuts-section.h', 16 | 'dzl-shortcuts-shortcut.h', 17 | 'dzl-shortcuts-window.h', 18 | ] 19 | 20 | shortcuts_sources = [ 21 | 'dzl-shortcut-accel-dialog.c', 22 | 'dzl-shortcut-chord.c', 23 | 'dzl-shortcut-context.c', 24 | 'dzl-shortcut-controller.c', 25 | 'dzl-shortcut-label.c', 26 | 'dzl-shortcut-manager.c', 27 | 'dzl-shortcut-model.c', 28 | 'dzl-shortcut-phase.c', 29 | 'dzl-shortcut-simple-label.c', 30 | 'dzl-shortcut-theme-editor.c', 31 | 'dzl-shortcut-theme-load.c', 32 | 'dzl-shortcut-theme-save.c', 33 | 'dzl-shortcut-theme.c', 34 | 'dzl-shortcut-tooltip.c', 35 | 'dzl-shortcuts-group.c', 36 | 'dzl-shortcuts-section.c', 37 | 'dzl-shortcuts-shortcut.c', 38 | 'dzl-shortcuts-window.c', 39 | ] 40 | 41 | libdazzle_public_headers += files(shortcuts_headers) 42 | libdazzle_public_sources += files(shortcuts_sources) 43 | libdazzle_private_sources += files('dzl-shortcut-closure-chain.c') 44 | 45 | install_headers(shortcuts_headers, subdir: join_paths(libdazzle_header_subdir, 'shortcuts')) 46 | -------------------------------------------------------------------------------- /src/statemachine/dzl-state-machine-buildable.h: -------------------------------------------------------------------------------- 1 | /* dzl-state-machine-buildable.h 2 | * 3 | * Copyright (C) 2015 Christian Hergert 4 | * 5 | * This file is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as 7 | * published by the Free Software Foundation; either version 3 of the 8 | * License, or (at your option) any later version. 9 | * 10 | * This file is distributed in the hope that it will be useful, but 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_STATE_MACHINE_BUILDABLE_H 20 | #define DZL_STATE_MACHINE_BUILDABLE_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | DZL_AVAILABLE_IN_ALL 29 | void dzl_state_machine_buildable_iface_init (GtkBuildableIface *iface); 30 | 31 | G_END_DECLS 32 | 33 | #endif /* DZL_STATE_MACHINE_BUILDABLE_H */ 34 | -------------------------------------------------------------------------------- /src/statemachine/meson.build: -------------------------------------------------------------------------------- 1 | statemachine_headers = [ 2 | 'dzl-state-machine-buildable.h', 3 | 'dzl-state-machine.h', 4 | ] 5 | 6 | statemachine_sources = [ 7 | 'dzl-state-machine-buildable.c', 8 | 'dzl-state-machine.c', 9 | ] 10 | 11 | libdazzle_public_headers += files(statemachine_headers) 12 | libdazzle_public_sources += files(statemachine_sources) 13 | 14 | install_headers(statemachine_headers, subdir: join_paths(libdazzle_header_subdir, 'statemachine')) 15 | -------------------------------------------------------------------------------- /src/suggestions/dzl-suggestion-button.h: -------------------------------------------------------------------------------- 1 | /* dzl-suggestion-button.h 2 | * 3 | * Copyright 2019 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | * SPDX-License-Identifier: GPL-3.0-or-later 19 | */ 20 | 21 | #pragma once 22 | 23 | #include 24 | 25 | #include "dzl-suggestion-entry.h" 26 | #include "dzl-version-macros.h" 27 | 28 | G_BEGIN_DECLS 29 | 30 | #define DZL_TYPE_SUGGESTION_BUTTON (dzl_suggestion_button_get_type()) 31 | 32 | DZL_AVAILABLE_IN_3_34 33 | G_DECLARE_DERIVABLE_TYPE (DzlSuggestionButton, dzl_suggestion_button, DZL, SUGGESTION_BUTTON, GtkStack) 34 | 35 | struct _DzlSuggestionButtonClass 36 | { 37 | GtkStackClass parent_class; 38 | 39 | /*< private >*/ 40 | gpointer _reserved[8]; 41 | }; 42 | 43 | DZL_AVAILABLE_IN_3_34 44 | GtkWidget *dzl_suggestion_button_new (void); 45 | DZL_AVAILABLE_IN_3_34 46 | DzlSuggestionEntry *dzl_suggestion_button_get_entry (DzlSuggestionButton *self); 47 | DZL_AVAILABLE_IN_3_34 48 | GtkButton *dzl_suggestion_button_get_button (DzlSuggestionButton *self); 49 | 50 | G_END_DECLS 51 | -------------------------------------------------------------------------------- /src/suggestions/dzl-suggestion-popover.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 39 | 40 | -------------------------------------------------------------------------------- /src/suggestions/dzl-suggestion-row.h: -------------------------------------------------------------------------------- 1 | /* dzl-suggestion-row.h 2 | * 3 | * Copyright (C) 2017 Christian Hergert 4 | * 5 | * This file is free software; you can redistribute it and/or modify it under 6 | * the terms of the GNU Lesser General Public License as published by the Free 7 | * Software Foundation; either version 2.1 of the License, or (at your option) 8 | * any later version. 9 | * 10 | * This file is distributed in the hope that it will be useful, but WITHOUT 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 13 | * License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_SUGGESTION_ROW_H 20 | #define DZL_SUGGESTION_ROW_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | #include "suggestions/dzl-suggestion.h" 27 | #include "widgets/dzl-list-box-row.h" 28 | 29 | G_BEGIN_DECLS 30 | 31 | #define DZL_TYPE_SUGGESTION_ROW (dzl_suggestion_row_get_type()) 32 | 33 | DZL_AVAILABLE_IN_ALL 34 | G_DECLARE_DERIVABLE_TYPE (DzlSuggestionRow, dzl_suggestion_row, DZL, SUGGESTION_ROW, DzlListBoxRow) 35 | 36 | struct _DzlSuggestionRowClass 37 | { 38 | DzlListBoxRowClass parent_class; 39 | 40 | /*< private >*/ 41 | gpointer _reserved[4]; 42 | }; 43 | 44 | DZL_AVAILABLE_IN_ALL 45 | GtkWidget *dzl_suggestion_row_new (void); 46 | DZL_AVAILABLE_IN_ALL 47 | DzlSuggestion *dzl_suggestion_row_get_suggestion (DzlSuggestionRow *self); 48 | DZL_AVAILABLE_IN_ALL 49 | void dzl_suggestion_row_set_suggestion (DzlSuggestionRow *self, 50 | DzlSuggestion *suggestion); 51 | 52 | G_END_DECLS 53 | 54 | #endif /* DZL_SUGGESTION_ROW_H */ 55 | -------------------------------------------------------------------------------- /src/suggestions/meson.build: -------------------------------------------------------------------------------- 1 | suggestions_headers = [ 2 | 'dzl-suggestion-button.h', 3 | 'dzl-suggestion-entry-buffer.h', 4 | 'dzl-suggestion-entry.h', 5 | 'dzl-suggestion-popover.h', 6 | 'dzl-suggestion-row.h', 7 | 'dzl-suggestion.h', 8 | ] 9 | 10 | suggestions_sources = [ 11 | 'dzl-suggestion-button.c', 12 | 'dzl-suggestion-entry-buffer.c', 13 | 'dzl-suggestion-entry.c', 14 | 'dzl-suggestion-popover.c', 15 | 'dzl-suggestion-row.c', 16 | 'dzl-suggestion.c', 17 | ] 18 | 19 | libdazzle_public_headers += files(suggestions_headers) 20 | libdazzle_public_sources += files(suggestions_sources) 21 | 22 | install_headers(suggestions_headers, subdir: join_paths(libdazzle_header_subdir, 'suggestions')) 23 | -------------------------------------------------------------------------------- /src/theming/dzl-css-provider.h: -------------------------------------------------------------------------------- 1 | /* dzl-css-provider.h 2 | * 3 | * Copyright (C) 2015 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_CSS_PROVIDER_H 20 | #define DZL_CSS_PROVIDER_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define DZL_TYPE_CSS_PROVIDER (dzl_css_provider_get_type()) 29 | 30 | DZL_AVAILABLE_IN_ALL 31 | G_DECLARE_FINAL_TYPE (DzlCssProvider, dzl_css_provider, DZL, CSS_PROVIDER, GtkCssProvider) 32 | 33 | DZL_AVAILABLE_IN_ALL 34 | GtkCssProvider *dzl_css_provider_new (const gchar *base_path); 35 | 36 | G_END_DECLS 37 | 38 | #endif /* DZL_CSS_PROVIDER_H */ 39 | -------------------------------------------------------------------------------- /src/theming/dzl-theme-manager.h: -------------------------------------------------------------------------------- 1 | /* dzl-theme-manager.h 2 | * 3 | * Copyright (C) 2015 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_THEME_MANAGER_H 20 | #define DZL_THEME_MANAGER_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define DZL_TYPE_THEME_MANAGER (dzl_theme_manager_get_type()) 29 | 30 | DZL_AVAILABLE_IN_ALL 31 | G_DECLARE_FINAL_TYPE (DzlThemeManager, dzl_theme_manager, DZL, THEME_MANAGER, GObject) 32 | 33 | DZL_AVAILABLE_IN_ALL 34 | DzlThemeManager *dzl_theme_manager_new (void); 35 | DZL_AVAILABLE_IN_ALL 36 | void dzl_theme_manager_add_resources (DzlThemeManager *self, 37 | const gchar *resource_path); 38 | DZL_AVAILABLE_IN_ALL 39 | void dzl_theme_manager_remove_resources (DzlThemeManager *self, 40 | const gchar *resource_path); 41 | 42 | G_END_DECLS 43 | 44 | #endif /* DZL_THEME_MANAGER_H */ 45 | -------------------------------------------------------------------------------- /src/theming/meson.build: -------------------------------------------------------------------------------- 1 | theming_headers = [ 2 | 'dzl-css-provider.h', 3 | 'dzl-theme-manager.h', 4 | ] 5 | 6 | theming_sources = [ 7 | 'dzl-css-provider.c', 8 | 'dzl-theme-manager.c', 9 | ] 10 | 11 | libdazzle_public_headers += files(theming_headers) 12 | libdazzle_public_sources += files(theming_sources) 13 | 14 | install_headers(theming_headers, subdir: join_paths(libdazzle_header_subdir, 'theming')) 15 | -------------------------------------------------------------------------------- /src/tree/dzl-list-store-adapter.h: -------------------------------------------------------------------------------- 1 | /* dzl-list-store-adapter.h 2 | * 3 | * Copyright (C) 2017 Christian Hergert 4 | * 5 | * This file is free software; you can redistribute it and/or modify it under 6 | * the terms of the GNU Lesser General Public License as published by the Free 7 | * Software Foundation; either version 2.1 of the License, or (at your option) 8 | * any later version. 9 | * 10 | * This file is distributed in the hope that it will be useful, but WITHOUT 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 13 | * License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_LIST_STORE_ADAPTER_H 20 | #define DZL_LIST_STORE_ADAPTER_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define DZL_TYPE_LIST_STORE_ADAPTER (dzl_list_store_adapter_get_type()) 29 | 30 | DZL_AVAILABLE_IN_ALL 31 | G_DECLARE_DERIVABLE_TYPE (DzlListStoreAdapter, dzl_list_store_adapter, DZL, LIST_STORE_ADAPTER, GObject) 32 | 33 | struct _DzlListStoreAdapterClass 34 | { 35 | GObjectClass parent_class; 36 | }; 37 | 38 | DZL_AVAILABLE_IN_ALL 39 | DzlListStoreAdapter *dzl_list_store_adapter_new (GListModel *model); 40 | DZL_AVAILABLE_IN_ALL 41 | GListModel *dzl_list_store_adapter_get_model (DzlListStoreAdapter *self); 42 | DZL_AVAILABLE_IN_ALL 43 | void dzl_list_store_adapter_set_model (DzlListStoreAdapter *self, 44 | GListModel *model); 45 | 46 | G_END_DECLS 47 | 48 | #endif /* DZL_LIST_STORE_ADAPTER_H */ 49 | -------------------------------------------------------------------------------- /src/tree/dzl-tree-store.h: -------------------------------------------------------------------------------- 1 | /* dzl-tree-store.h 2 | * 3 | * Copyright (C) 2017 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | G_BEGIN_DECLS 24 | 25 | #define DZL_TYPE_TREE_STORE (dzl_tree_store_get_type()) 26 | 27 | DZL_AVAILABLE_IN_ALL 28 | G_DECLARE_FINAL_TYPE (DzlTreeStore, dzl_tree_store, DZL, TREE_STORE, GtkTreeStore) 29 | 30 | G_END_DECLS 31 | -------------------------------------------------------------------------------- /src/tree/dzl-tree-types.h: -------------------------------------------------------------------------------- 1 | /* dzl-tree-types.h 2 | * 3 | * Copyright (C) 2015 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_TREE_TYPES_H 20 | #define DZL_TREE_TYPES_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define DZL_TYPE_TREE (dzl_tree_get_type()) 29 | #define DZL_TYPE_TREE_NODE (dzl_tree_node_get_type()) 30 | #define DZL_TYPE_TREE_BUILDER (dzl_tree_builder_get_type()) 31 | 32 | typedef enum 33 | { 34 | DZL_TREE_DROP_INTO = 0, 35 | DZL_TREE_DROP_BEFORE = 1, 36 | DZL_TREE_DROP_AFTER = 2, 37 | } DzlTreeDropPosition; 38 | 39 | DZL_AVAILABLE_IN_ALL 40 | G_DECLARE_DERIVABLE_TYPE (DzlTree, dzl_tree, DZL, TREE, GtkTreeView) 41 | DZL_AVAILABLE_IN_ALL 42 | G_DECLARE_DERIVABLE_TYPE (DzlTreeBuilder, dzl_tree_builder, DZL, TREE_BUILDER, GInitiallyUnowned) 43 | DZL_AVAILABLE_IN_ALL 44 | G_DECLARE_FINAL_TYPE (DzlTreeNode, dzl_tree_node, DZL, TREE_NODE, GInitiallyUnowned) 45 | 46 | typedef gint (*DzlTreeNodeCompareFunc) (DzlTreeNode *a, 47 | DzlTreeNode *b, 48 | gpointer user_data); 49 | 50 | G_END_DECLS 51 | 52 | #endif /* DZL_TREE_TYPES_H */ 53 | -------------------------------------------------------------------------------- /src/tree/meson.build: -------------------------------------------------------------------------------- 1 | tree_headers = [ 2 | 'dzl-tree-builder.h', 3 | 'dzl-tree-node.h', 4 | 'dzl-tree-types.h', 5 | 'dzl-tree.h', 6 | 'dzl-list-store-adapter.h', 7 | ] 8 | 9 | tree_sources = [ 10 | 'dzl-tree-builder.c', 11 | 'dzl-tree.c', 12 | 'dzl-tree-node.c', 13 | 'dzl-tree-store.c', 14 | 'dzl-list-store-adapter.c', 15 | ] 16 | 17 | tree_enums_headers = [ 18 | 'dzl-tree-types.h', 19 | ] 20 | 21 | libdazzle_public_headers += files(tree_headers) 22 | libdazzle_public_sources += files(tree_sources) 23 | dzl_enum_headers += files(tree_enums_headers) 24 | 25 | install_headers(tree_headers, subdir: join_paths(libdazzle_header_subdir, 'tree')) 26 | -------------------------------------------------------------------------------- /src/util/dzl-cancellable.h: -------------------------------------------------------------------------------- 1 | /* dzl-cancellable.h 2 | * 3 | * Copyright © 2017 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | #include "dzl-version-macros.h" 24 | 25 | G_BEGIN_DECLS 26 | 27 | DZL_AVAILABLE_IN_3_28 28 | GCancellable *dzl_cancellable_chain (GCancellable *self, 29 | GCancellable *other); 30 | 31 | G_END_DECLS 32 | -------------------------------------------------------------------------------- /src/util/dzl-date-time.h: -------------------------------------------------------------------------------- 1 | /* dzl-date-time.h 2 | * 3 | * Copyright (C) 2015 Christian Hergert 4 | * 5 | * This file is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This file is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_DATE_TIME_H 20 | #define DZL_DATE_TIME_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | DZL_AVAILABLE_IN_ALL 29 | gchar *dzl_g_date_time_format_for_display (GDateTime *self); 30 | DZL_AVAILABLE_IN_ALL 31 | gchar *dzl_g_time_span_to_label (GTimeSpan span); 32 | DZL_AVAILABLE_IN_ALL 33 | gboolean dzl_g_time_span_to_label_mapping (GBinding *binding, 34 | const GValue *from_value, 35 | GValue *to_value, 36 | gpointer user_data); 37 | 38 | G_END_DECLS 39 | 40 | #endif /* DZL_DATE_TIME_H */ 41 | -------------------------------------------------------------------------------- /src/util/dzl-dnd.c: -------------------------------------------------------------------------------- 1 | /* dzl-dnd.c 2 | * 3 | * Copyright (C) 2015 Dimitris Zenios 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #define G_LOG_DOMAIN "dzl-dnd" 20 | 21 | #include "config.h" 22 | 23 | #include "dzl-dnd.h" 24 | 25 | /** 26 | * SECTION:dzl-dnd 27 | * @title: Drag-and-Drop Utilities 28 | * @short_description: Helper functions to use with GTK's drag-and-drop system 29 | */ 30 | 31 | /** 32 | * dzl_dnd_get_uri_list: 33 | * @selection_data: the #GtkSelectionData from drag_data_received 34 | * 35 | * Create a list of valid uri's from a uri-list drop. 36 | * 37 | * Returns: (transfer full): a string array which will hold the uris or 38 | * %NULL if there were no valid uris. g_strfreev should be used when 39 | * the string array is no longer used 40 | * 41 | * Deprecated: Use gtk_selection_data_get_uris() instead; it is exactly the same. 42 | */ 43 | gchar ** 44 | dzl_dnd_get_uri_list (GtkSelectionData *selection_data) 45 | { 46 | return gtk_selection_data_get_uris (selection_data); 47 | } 48 | -------------------------------------------------------------------------------- /src/util/dzl-dnd.h: -------------------------------------------------------------------------------- 1 | /* dzl-dnd.h 2 | * 3 | * Copyright (C) 2015 Dimitris Zenios 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_DND_H 20 | #define DZL_DND_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | DZL_DEPRECATED_FOR (gtk_selection_data_get_uris) 29 | gchar **dzl_dnd_get_uri_list (GtkSelectionData *selection_data); 30 | 31 | G_END_DECLS 32 | 33 | #endif /* GB_RGBA_H */ 34 | -------------------------------------------------------------------------------- /src/util/dzl-file-manager.h: -------------------------------------------------------------------------------- 1 | /* dzl-file-manager.h 2 | * 3 | * Copyright (C) 2015 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_FILE_MANAGER_H 20 | #define DZL_FILE_MANAGER_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | DZL_AVAILABLE_IN_ALL 29 | gboolean dzl_file_manager_show (GFile *file, 30 | GError **error); 31 | 32 | G_END_DECLS 33 | 34 | #endif /* DZL_FILE_MANAGER_H */ 35 | -------------------------------------------------------------------------------- /src/util/dzl-gdk.h: -------------------------------------------------------------------------------- 1 | /* dzl-gdk.h 2 | * 3 | * Copyright (C) 2015 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_GDK_H 20 | #define DZL_GDK_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | DZL_AVAILABLE_IN_ALL 29 | GdkEventKey *dzl_gdk_synthesize_event_key (GdkWindow *window, 30 | gunichar ch); 31 | DZL_AVAILABLE_IN_ALL 32 | GdkEventKey *dzl_gdk_synthesize_event_keyval (GdkWindow *window, 33 | guint keyval); 34 | 35 | G_END_DECLS 36 | 37 | #endif /* DZL_GDK_H */ 38 | -------------------------------------------------------------------------------- /src/util/dzl-pango.h: -------------------------------------------------------------------------------- 1 | /* dzl-pango.h 2 | * 3 | * Copyright (C) 2014 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_PANGO_H 20 | #define DZL_PANGO_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | DZL_AVAILABLE_IN_ALL 29 | gchar *dzl_pango_font_description_to_css (const PangoFontDescription *font_desc); 30 | 31 | G_END_DECLS 32 | 33 | #endif /* DZL_PANGO_H */ 34 | -------------------------------------------------------------------------------- /src/util/dzl-read-only-list-model.h: -------------------------------------------------------------------------------- 1 | /* dzl-read-only-list-model.h 2 | * 3 | * Copyright © 2018 Christian Hergert 4 | * 5 | * This file is free software; you can redistribute it and/or modify it 6 | * under the terms of the GNU Lesser General Public License as published by 7 | * the Free Software Foundation; either version 2.1 of the License, or (at 8 | * your option) any later version. 9 | * 10 | * This file is distributed in the hope that it will be useful, but WITHOUT 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 13 | * License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | */ 18 | 19 | #pragma once 20 | 21 | #include 22 | 23 | #include "dzl-version-macros.h" 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define DZL_TYPE_READ_ONLY_LIST_MODEL (dzl_read_only_list_model_get_type()) 28 | 29 | DZL_AVAILABLE_IN_3_30 30 | G_DECLARE_FINAL_TYPE (DzlReadOnlyListModel, dzl_read_only_list_model, DZL, READ_ONLY_LIST_MODEL, GObject) 31 | 32 | DZL_AVAILABLE_IN_3_30 33 | GListModel *dzl_read_only_list_model_new (GListModel *base_model); 34 | 35 | G_END_DECLS 36 | -------------------------------------------------------------------------------- /src/util/dzl-rgba.h: -------------------------------------------------------------------------------- 1 | /* dzl-rgba.h 2 | * 3 | * Copyright (C) 2014 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_RGBA_H 20 | #define DZL_RGBA_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | DZL_AVAILABLE_IN_ALL 29 | void dzl_rgba_shade (const GdkRGBA *rgba, 30 | GdkRGBA *dst, 31 | gdouble k); 32 | 33 | G_END_DECLS 34 | 35 | #endif /* DZL_RGBA_H */ 36 | -------------------------------------------------------------------------------- /src/util/dzl-variant.c: -------------------------------------------------------------------------------- 1 | /* dzl-variant.c 2 | * 3 | * Copyright (C) 2016-2017 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #define G_LOG_DOMAIN "dzl-variant" 20 | 21 | #include "config.h" 22 | 23 | #include "util/dzl-variant.h" 24 | 25 | guint 26 | dzl_g_variant_hash (gconstpointer data) 27 | { 28 | GVariant *variant = (GVariant *)data; 29 | GBytes *bytes; 30 | guint ret; 31 | 32 | if (!g_variant_is_container (variant)) 33 | return g_variant_hash (variant); 34 | 35 | /* Generally we wouldn't want to create a bytes to hash 36 | * during a hash call, since that'd be fairly expensive. 37 | * But since GHashTable caches hash values, its not that 38 | * big of a deal. 39 | */ 40 | bytes = g_variant_get_data_as_bytes (variant); 41 | ret = g_bytes_hash (bytes); 42 | g_bytes_unref (bytes); 43 | 44 | return ret; 45 | } 46 | -------------------------------------------------------------------------------- /src/util/dzl-variant.h: -------------------------------------------------------------------------------- 1 | /* dzl-variant.h 2 | * 3 | * Copyright (C) 2016-2017 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_VARIANT_H 20 | #define DZL_VARIANT_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | DZL_AVAILABLE_IN_ALL 29 | guint dzl_g_variant_hash (gconstpointer data); 30 | 31 | G_END_DECLS 32 | 33 | #endif /* DZL_VARIANT_H */ 34 | -------------------------------------------------------------------------------- /src/util/meson.build: -------------------------------------------------------------------------------- 1 | util_headers = [ 2 | 'dzl-cairo.h', 3 | 'dzl-cancellable.h', 4 | 'dzl-date-time.h', 5 | 'dzl-dnd.h', 6 | 'dzl-file-manager.h', 7 | 'dzl-gdk.h', 8 | 'dzl-gtk.h', 9 | 'dzl-heap.h', 10 | 'dzl-int-pair.h', 11 | 'dzl-list-model-filter.h', 12 | 'dzl-macros.h', 13 | 'dzl-pango.h', 14 | 'dzl-read-only-list-model.h', 15 | 'dzl-rgba.h', 16 | 'dzl-ring.h', 17 | 'dzl-variant.h', 18 | ] 19 | 20 | util_sources = [ 21 | 'dzl-cairo.c', 22 | 'dzl-cancellable.c', 23 | 'dzl-date-time.c', 24 | 'dzl-dnd.c', 25 | 'dzl-file-manager.c', 26 | 'dzl-gdk.c', 27 | 'dzl-gtk.c', 28 | 'dzl-heap.c', 29 | 'dzl-list-model-filter.c', 30 | 'dzl-pango.c', 31 | 'dzl-read-only-list-model.c', 32 | 'dzl-rgba.c', 33 | 'dzl-ring.c', 34 | 'dzl-util.c', 35 | 'dzl-variant.c', 36 | ] 37 | 38 | # No counters if building on win32 for now. 39 | # When avaiable remove G_OS_WIN32 checks in src/dazzel.h. 40 | # They need explicit porting to that platform and should 41 | # probably just wrap the eventtrace API or something. 42 | if host_machine.system() != 'windows' 43 | util_headers += ['dzl-counter.h'] 44 | util_sources += ['dzl-counter.c'] 45 | endif 46 | 47 | libdazzle_public_headers += files(util_headers) 48 | libdazzle_public_sources += files(util_sources) 49 | 50 | install_headers(util_headers, subdir: join_paths(libdazzle_header_subdir, 'util')) 51 | -------------------------------------------------------------------------------- /src/widgets/dzl-bin.h: -------------------------------------------------------------------------------- 1 | /* dzl-bin.h 2 | * 3 | * Copyright (C) 2017 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #if !defined(DAZZLE_INSIDE) && !defined(DAZZLE_COMPILATION) 20 | # error "Only can be included directly." 21 | #endif 22 | 23 | #ifndef DZL_BIN_H 24 | #define DZL_BIN_H 25 | 26 | #include 27 | 28 | #include "dzl-version-macros.h" 29 | 30 | G_BEGIN_DECLS 31 | 32 | #define DZL_TYPE_BIN (dzl_bin_get_type()) 33 | 34 | DZL_AVAILABLE_IN_ALL 35 | G_DECLARE_DERIVABLE_TYPE (DzlBin, dzl_bin, DZL, BIN, GtkBin) 36 | 37 | struct _DzlBinClass 38 | { 39 | GtkBinClass parent_class; 40 | }; 41 | 42 | DZL_AVAILABLE_IN_ALL 43 | GtkWidget *dzl_bin_new (void); 44 | 45 | G_END_DECLS 46 | 47 | #endif /* DZL_BIN_H */ 48 | -------------------------------------------------------------------------------- /src/widgets/dzl-bolding-label.h: -------------------------------------------------------------------------------- 1 | /* dzl-bolding-label.h 2 | * 3 | * Copyright (C) 2016 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_BOLDING_LABEL_H 20 | #define DZL_BOLDING_LABEL_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define DZL_TYPE_BOLDING_LABEL (dzl_bolding_label_get_type()) 29 | 30 | DZL_AVAILABLE_IN_ALL 31 | G_DECLARE_FINAL_TYPE (DzlBoldingLabel, dzl_bolding_label, DZL, BOLDING_LABEL, GtkLabel) 32 | 33 | DZL_AVAILABLE_IN_3_34 34 | DzlBoldingLabel *dzl_bolding_label_new (const gchar *str, 35 | gboolean bold); 36 | DZL_AVAILABLE_IN_3_34 37 | DzlBoldingLabel *dzl_bolding_label_new_with_mnemonic (const gchar *str, 38 | gboolean bold); 39 | DZL_AVAILABLE_IN_ALL 40 | void dzl_bolding_label_set_weight (DzlBoldingLabel *self, 41 | PangoWeight weight); 42 | DZL_AVAILABLE_IN_ALL 43 | void dzl_bolding_label_set_bold (DzlBoldingLabel *self, 44 | gboolean bold); 45 | 46 | G_END_DECLS 47 | 48 | #endif /* DZL_BOLDING_LABEL_H */ 49 | -------------------------------------------------------------------------------- /src/widgets/dzl-box.h: -------------------------------------------------------------------------------- 1 | /* dzl-box.h 2 | * 3 | * Copyright (C) 2015 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_BOX_H 20 | #define DZL_BOX_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define DZL_TYPE_BOX (dzl_box_get_type()) 29 | 30 | DZL_AVAILABLE_IN_ALL 31 | G_DECLARE_DERIVABLE_TYPE (DzlBox, dzl_box, DZL, BOX, GtkBox) 32 | 33 | struct _DzlBoxClass 34 | { 35 | GtkBoxClass parent_class; 36 | }; 37 | 38 | DZL_AVAILABLE_IN_3_30 39 | GtkWidget *dzl_box_new (void); 40 | DZL_AVAILABLE_IN_ALL 41 | GtkWidget *dzl_box_get_nth_child (DzlBox *self, 42 | guint nth); 43 | DZL_AVAILABLE_IN_ALL 44 | gint dzl_box_get_max_width_request (DzlBox *self); 45 | DZL_AVAILABLE_IN_ALL 46 | void dzl_box_set_max_width_request (DzlBox *self, 47 | gint max_width_request); 48 | 49 | G_END_DECLS 50 | 51 | #endif /* DZL_BOX_H */ 52 | -------------------------------------------------------------------------------- /src/widgets/dzl-centering-bin.h: -------------------------------------------------------------------------------- 1 | /* dzl-centering-bin.h 2 | * 3 | * Copyright (C) 2015 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_CENTERING_BIN_H 20 | #define DZL_CENTERING_BIN_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define DZL_TYPE_CENTERING_BIN (dzl_centering_bin_get_type()) 29 | 30 | DZL_AVAILABLE_IN_ALL 31 | G_DECLARE_DERIVABLE_TYPE (DzlCenteringBin, dzl_centering_bin, DZL, CENTERING_BIN, GtkBin) 32 | 33 | struct _DzlCenteringBinClass 34 | { 35 | GtkBinClass parent; 36 | }; 37 | 38 | DZL_AVAILABLE_IN_ALL 39 | GtkWidget *dzl_centering_bin_new (void); 40 | 41 | G_END_DECLS 42 | 43 | #endif /* DZL_CENTERING_BIN_H */ 44 | -------------------------------------------------------------------------------- /src/widgets/dzl-counters-window.h: -------------------------------------------------------------------------------- 1 | /* dzl-counters-window.h 2 | * 3 | * Copyright (C) 2017 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_COUNTERS_WINDOW_H 20 | #define DZL_COUNTERS_WINDOW_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | #include "util/dzl-counter.h" 27 | 28 | G_BEGIN_DECLS 29 | 30 | #define DZL_TYPE_COUNTERS_WINDOW (dzl_counters_window_get_type()) 31 | 32 | DZL_AVAILABLE_IN_ALL 33 | G_DECLARE_DERIVABLE_TYPE (DzlCountersWindow, dzl_counters_window, DZL, COUNTERS_WINDOW, GtkWindow) 34 | 35 | struct _DzlCountersWindowClass 36 | { 37 | GtkWindowClass parent_class; 38 | 39 | gpointer _reserved1; 40 | gpointer _reserved2; 41 | gpointer _reserved3; 42 | gpointer _reserved4; 43 | }; 44 | 45 | DZL_AVAILABLE_IN_ALL 46 | GtkWidget *dzl_counters_window_new (void); 47 | DZL_AVAILABLE_IN_ALL 48 | DzlCounterArena *dzl_counters_window_get_arena (DzlCountersWindow *self); 49 | DZL_AVAILABLE_IN_ALL 50 | void dzl_counters_window_set_arena (DzlCountersWindow *self, 51 | DzlCounterArena *arena); 52 | 53 | G_END_DECLS 54 | 55 | #endif /* DZL_COUNTERS_WINDOW_H */ 56 | -------------------------------------------------------------------------------- /src/widgets/dzl-elastic-bin.h: -------------------------------------------------------------------------------- 1 | /* dzl-elastic-bin.h 2 | * 3 | * Copyright (C) 2017 Christian Hergert 4 | * 5 | * This file is free software; you can redistribute it and/or modify it under 6 | * the terms of the GNU Lesser General Public License as published by the Free 7 | * Software Foundation; either version 2.1 of the License, or (at your option) 8 | * any later version. 9 | * 10 | * This file is distributed in the hope that it will be useful, but WITHOUT 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 13 | * License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License along 16 | * with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_ELASTIC_BIN_H 20 | #define DZL_ELASTIC_BIN_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define DZL_TYPE_ELASTIC_BIN (dzl_elastic_bin_get_type()) 29 | 30 | DZL_AVAILABLE_IN_ALL 31 | G_DECLARE_DERIVABLE_TYPE (DzlElasticBin, dzl_elastic_bin, DZL, ELASTIC_BIN, GtkBin) 32 | 33 | struct _DzlElasticBinClass 34 | { 35 | GtkBinClass parent_class; 36 | 37 | gpointer _reserved1; 38 | gpointer _reserved2; 39 | gpointer _reserved3; 40 | gpointer _reserved4; 41 | }; 42 | 43 | DZL_AVAILABLE_IN_3_30 44 | GtkWidget *dzl_elastic_bin_new (void); 45 | 46 | G_END_DECLS 47 | 48 | #endif /* DZL_ELASTIC_BIN_H */ 49 | -------------------------------------------------------------------------------- /src/widgets/dzl-empty-state.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 43 | 44 | -------------------------------------------------------------------------------- /src/widgets/dzl-entry-box.h: -------------------------------------------------------------------------------- 1 | /* dzl-entry-box.h 2 | * 3 | * Copyright (C) 2016 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_ENTRY_BOX_H 20 | #define DZL_ENTRY_BOX_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define DZL_TYPE_ENTRY_BOX (dzl_entry_box_get_type()) 29 | 30 | DZL_AVAILABLE_IN_ALL 31 | G_DECLARE_FINAL_TYPE (DzlEntryBox, dzl_entry_box, DZL, ENTRY_BOX, GtkBox) 32 | 33 | DZL_AVAILABLE_IN_3_30 34 | GtkWidget *dzl_entry_box_new (void); 35 | 36 | G_END_DECLS 37 | 38 | #endif /* DZL_ENTRY_BOX_H */ 39 | -------------------------------------------------------------------------------- /src/widgets/dzl-list-box-private.h: -------------------------------------------------------------------------------- 1 | /* dzl-list-box-private.h 2 | * 3 | * Copyright (C) 2017 Christian Hergert 4 | * 5 | * This program is free software: you *privatean redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_LIST_BOX_PRIVATE_H 20 | #define DZL_LIST_BOX_PRIVATE_H 21 | 22 | #include "dzl-list-box.h" 23 | #include "dzl-list-box-row.h" 24 | 25 | G_BEGIN_DECLS 26 | 27 | typedef void (*DzlListBoxAttachFunc) (DzlListBox *list_box, 28 | DzlListBoxRow *row, 29 | gpointer user_data); 30 | 31 | gboolean _dzl_list_box_cache (DzlListBox *self, 32 | DzlListBoxRow *row); 33 | void _dzl_list_box_forall (DzlListBox *self, 34 | GtkCallback callback, 35 | gpointer user_data); 36 | void _dzl_list_box_set_attach_func (DzlListBox *self, 37 | DzlListBoxAttachFunc func, 38 | gpointer user_data); 39 | 40 | G_END_DECLS 41 | 42 | #endif /* DZL_LIST_BOX_PRIVATE_H */ 43 | -------------------------------------------------------------------------------- /src/widgets/dzl-list-box-row.h: -------------------------------------------------------------------------------- 1 | /* dzl-list-box-row.h 2 | * 3 | * Copyright (C) 2017 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_LIST_BOX_ROW_H 20 | #define DZL_LIST_BOX_ROW_H 21 | 22 | #include 23 | 24 | G_BEGIN_DECLS 25 | 26 | #define DZL_TYPE_LIST_BOX_ROW (dzl_list_box_row_get_type()) 27 | 28 | DZL_AVAILABLE_IN_ALL 29 | G_DECLARE_DERIVABLE_TYPE (DzlListBoxRow, dzl_list_box_row, DZL, LIST_BOX_ROW, GtkListBoxRow) 30 | 31 | struct _DzlListBoxRowClass 32 | { 33 | GtkListBoxRowClass parent_class; 34 | }; 35 | 36 | G_END_DECLS 37 | 38 | #endif /* DZL_LIST_BOX_ROW_H */ 39 | -------------------------------------------------------------------------------- /src/widgets/dzl-pill-box.h: -------------------------------------------------------------------------------- 1 | /* dzl-pill-box.h 2 | * 3 | * Copyright (C) 2015 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_PILL_BOX_H 20 | #define DZL_PILL_BOX_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define DZL_TYPE_PILL_BOX (dzl_pill_box_get_type()) 29 | 30 | DZL_AVAILABLE_IN_ALL 31 | G_DECLARE_FINAL_TYPE (DzlPillBox, dzl_pill_box, DZL, PILL_BOX, GtkEventBox) 32 | 33 | DZL_AVAILABLE_IN_ALL 34 | GtkWidget *dzl_pill_box_new (const gchar *label); 35 | DZL_AVAILABLE_IN_ALL 36 | const gchar *dzl_pill_box_get_label (DzlPillBox *self); 37 | DZL_AVAILABLE_IN_ALL 38 | void dzl_pill_box_set_label (DzlPillBox *self, 39 | const gchar *label); 40 | 41 | G_END_DECLS 42 | 43 | #endif /* DZL_PILL_BOX_H */ 44 | -------------------------------------------------------------------------------- /src/widgets/dzl-pill-box.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 33 | 34 | -------------------------------------------------------------------------------- /src/widgets/dzl-priority-box.h: -------------------------------------------------------------------------------- 1 | /* dzl-priority-box.h 2 | * 3 | * Copyright (C) 2016 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_PRIORITY_BOX_H 20 | #define DZL_PRIORITY_BOX_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define DZL_TYPE_PRIORITY_BOX (dzl_priority_box_get_type()) 29 | 30 | DZL_AVAILABLE_IN_ALL 31 | G_DECLARE_DERIVABLE_TYPE (DzlPriorityBox, dzl_priority_box, DZL, PRIORITY_BOX, GtkBox) 32 | 33 | struct _DzlPriorityBoxClass 34 | { 35 | GtkBoxClass parent_class; 36 | 37 | gpointer _reserved1; 38 | gpointer _reserved2; 39 | gpointer _reserved3; 40 | gpointer _reserved4; 41 | }; 42 | 43 | DZL_AVAILABLE_IN_3_30 44 | GtkWidget *dzl_priority_box_new (void); 45 | 46 | G_END_DECLS 47 | 48 | #endif /* DZL_PRIORITY_BOX_H */ 49 | -------------------------------------------------------------------------------- /src/widgets/dzl-progress-icon.h: -------------------------------------------------------------------------------- 1 | /* dzl-progress-icon.h 2 | * 3 | * Copyright (C) 2016 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_PROGRESS_ICON_H 20 | #define DZL_PROGRESS_ICON_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define DZL_TYPE_PROGRESS_ICON (dzl_progress_icon_get_type()) 29 | 30 | DZL_AVAILABLE_IN_ALL 31 | G_DECLARE_FINAL_TYPE (DzlProgressIcon, dzl_progress_icon, DZL, PROGRESS_ICON, GtkDrawingArea) 32 | 33 | DZL_AVAILABLE_IN_ALL 34 | GtkWidget *dzl_progress_icon_new (void); 35 | DZL_AVAILABLE_IN_ALL 36 | gdouble dzl_progress_icon_get_progress (DzlProgressIcon *self); 37 | DZL_AVAILABLE_IN_ALL 38 | void dzl_progress_icon_set_progress (DzlProgressIcon *self, 39 | gdouble progress); 40 | 41 | G_END_DECLS 42 | 43 | #endif /* DZL_PROGRESS_ICON_H */ 44 | -------------------------------------------------------------------------------- /src/widgets/dzl-rect-helper.h: -------------------------------------------------------------------------------- 1 | /* dzl-rect-helper.h 2 | * 3 | * Copyright (C) 2015 Christian Hergert 4 | * 5 | * This file is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2.1 of the License, or (at your option) any later version. 9 | * 10 | * This file is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_RECT_HELPER_H 20 | #define DZL_RECT_HELPER_H 21 | 22 | #include 23 | 24 | /* 25 | * This is just a helper object for animating rectangles. 26 | * It allows us to use dzl_object_animate() to animate 27 | * coordinates. 28 | */ 29 | 30 | G_BEGIN_DECLS 31 | 32 | #define DZL_TYPE_RECT_HELPER (dzl_rect_helper_get_type()) 33 | 34 | G_DECLARE_FINAL_TYPE (DzlRectHelper, dzl_rect_helper, DZL, RECT_HELPER, GObject) 35 | 36 | void dzl_rect_helper_get_rect (DzlRectHelper *self, 37 | GdkRectangle *rect); 38 | 39 | G_END_DECLS 40 | 41 | #endif /* DZL_RECT_HELPER_H */ 42 | -------------------------------------------------------------------------------- /src/widgets/dzl-scrolled-window.h: -------------------------------------------------------------------------------- 1 | /* dzl-scrolled-window.h 2 | * 3 | * Copyright (C) 2016 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_SCROLLED_WINDOW_H 20 | #define DZL_SCROLLED_WINDOW_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define DZL_TYPE_SCROLLED_WINDOW (dzl_scrolled_window_get_type()) 29 | 30 | DZL_AVAILABLE_IN_ALL 31 | G_DECLARE_FINAL_TYPE (DzlScrolledWindow, dzl_scrolled_window, DZL, SCROLLED_WINDOW, GtkScrolledWindow) 32 | 33 | G_END_DECLS 34 | 35 | #endif /* DZL_SCROLLED_WINDOW_H */ 36 | -------------------------------------------------------------------------------- /src/widgets/dzl-three-grid.h: -------------------------------------------------------------------------------- 1 | /* dzl-three-grid.h 2 | * 3 | * Copyright (C) 2016 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | #ifndef DZL_THREE_GRID_H 20 | #define DZL_THREE_GRID_H 21 | 22 | #include 23 | 24 | #include "dzl-version-macros.h" 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define DZL_TYPE_THREE_GRID (dzl_three_grid_get_type()) 29 | #define DZL_TYPE_THREE_GRID_COLUMN (dzl_three_grid_column_get_type()) 30 | 31 | DZL_AVAILABLE_IN_ALL 32 | G_DECLARE_DERIVABLE_TYPE (DzlThreeGrid, dzl_three_grid, DZL, THREE_GRID, GtkContainer) 33 | 34 | struct _DzlThreeGridClass 35 | { 36 | GtkContainerClass parent_class; 37 | 38 | gpointer _reserved1; 39 | gpointer _reserved2; 40 | gpointer _reserved3; 41 | gpointer _reserved4; 42 | gpointer _reserved5; 43 | gpointer _reserved6; 44 | gpointer _reserved7; 45 | gpointer _reserved8; 46 | }; 47 | 48 | typedef enum 49 | { 50 | DZL_THREE_GRID_COLUMN_LEFT, 51 | DZL_THREE_GRID_COLUMN_CENTER, 52 | DZL_THREE_GRID_COLUMN_RIGHT 53 | } DzlThreeGridColumn; 54 | 55 | DZL_AVAILABLE_IN_ALL 56 | GType dzl_three_grid_column_get_type (void); 57 | DZL_AVAILABLE_IN_ALL 58 | GtkWidget *dzl_three_grid_new (void); 59 | 60 | G_END_DECLS 61 | 62 | #endif /* DZL_THREE_GRID_H */ 63 | -------------------------------------------------------------------------------- /src/widgets/meson.build: -------------------------------------------------------------------------------- 1 | widgets_headers = [ 2 | 'dzl-bin.h', 3 | 'dzl-bolding-label.h', 4 | 'dzl-box.h', 5 | 'dzl-centering-bin.h', 6 | 'dzl-column-layout.h', 7 | 'dzl-elastic-bin.h', 8 | 'dzl-empty-state.h', 9 | 'dzl-entry-box.h', 10 | 'dzl-file-chooser-entry.h', 11 | 'dzl-list-box.h', 12 | 'dzl-list-box-row.h', 13 | 'dzl-multi-paned.h', 14 | 'dzl-pill-box.h', 15 | 'dzl-priority-box.h', 16 | 'dzl-progress-button.h', 17 | 'dzl-progress-menu-button.h', 18 | 'dzl-progress-icon.h', 19 | 'dzl-radio-box.h', 20 | 'dzl-scrolled-window.h', 21 | 'dzl-search-bar.h', 22 | 'dzl-simple-label.h', 23 | 'dzl-simple-popover.h', 24 | 'dzl-slider.h', 25 | 'dzl-stack-list.h', 26 | 'dzl-three-grid.h', 27 | ] 28 | 29 | widgets_sources = [ 30 | 'dzl-bin.c', 31 | 'dzl-bolding-label.c', 32 | 'dzl-box.c', 33 | 'dzl-centering-bin.c', 34 | 'dzl-column-layout.c', 35 | 'dzl-elastic-bin.c', 36 | 'dzl-empty-state.c', 37 | 'dzl-entry-box.c', 38 | 'dzl-file-chooser-entry.c', 39 | 'dzl-list-box.c', 40 | 'dzl-list-box-row.c', 41 | 'dzl-multi-paned.c', 42 | 'dzl-pill-box.c', 43 | 'dzl-priority-box.c', 44 | 'dzl-progress-button.c', 45 | 'dzl-progress-menu-button.c', 46 | 'dzl-progress-icon.c', 47 | 'dzl-radio-box.c', 48 | 'dzl-scrolled-window.c', 49 | 'dzl-search-bar.c', 50 | 'dzl-simple-label.c', 51 | 'dzl-simple-popover.c', 52 | 'dzl-slider.c', 53 | 'dzl-stack-list.c', 54 | 'dzl-three-grid.c', 55 | ] 56 | 57 | if host_machine.system() != 'windows' 58 | widgets_headers += ['dzl-counters-window.h'] 59 | widgets_sources += ['dzl-counters-window.c'] 60 | endif 61 | 62 | libdazzle_public_headers += files(widgets_headers) 63 | libdazzle_public_sources += files(widgets_sources) 64 | libdazzle_private_sources += files('dzl-rect-helper.c') 65 | 66 | install_headers(widgets_headers, subdir: join_paths(libdazzle_header_subdir, 'widgets')) 67 | -------------------------------------------------------------------------------- /tests/data/keythemes/default.keytheme: -------------------------------------------------------------------------------- 1 | 2 | 3 | Default 4 | The default theme 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/data/keythemes/emacs.keytheme: -------------------------------------------------------------------------------- 1 | 2 | 3 | Emacs 4 | Emacs theme 5 | 6 | -------------------------------------------------------------------------------- /tests/data/keythemes/test.keytheme: -------------------------------------------------------------------------------- 1 | 2 | 3 | Test 4 | Test theme 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 0 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /tests/data/keythemes/vim.keytheme: -------------------------------------------------------------------------------- 1 | 2 | 3 | Vim 4 | Vim theme 5 | 6 | -------------------------------------------------------------------------------- /tests/data/menus/joined2.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | Frame 6 | 7 | Move Left 8 | layoutstack.move-left 9 | 10 | 11 | Move Right 12 | layoutstack.move-right 13 | 14 | 15 | layoutgrid.close-stack 16 | Close 17 | 18 |
19 |
20 |
21 | -------------------------------------------------------------------------------- /tests/data/menus/menus-exten-1.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /tests/data/menus/menus-exten-2.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/data/menus/menus-exten-3.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /tests/data/menus/menus-exten-4.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /tests/data/menus/menus-exten-5.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /tests/data/menus/menus.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14 | 20 | 30 | 31 | 32 | 38 | 40 | 41 | 42 | 44 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /tests/data/shortcuts/0/gtk/menus.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 |
6 |
7 |
8 |
9 |
10 | -------------------------------------------------------------------------------- /tests/data/shortcuts/0/shortcuts/default.keytheme: -------------------------------------------------------------------------------- 1 | 2 | 3 | Default 4 | The default theme 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/data/shortcuts/0/shortcuts/secondary.keytheme: -------------------------------------------------------------------------------- 1 | 2 | 3 | Secondary 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /tests/data/shortcuts/1/gtk/menus.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | section-2-item-1 7 | Item 2.1 8 | dummy 9 | 10 |
11 |
12 | 13 | section-4-item-1 14 | Item 4.1 15 | dummy 16 | 17 |
18 |
19 |
20 | -------------------------------------------------------------------------------- /tests/data/shortcuts/2/gtk/menus.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |
5 | 6 | section-2-item-2 7 | section-2-item-1 8 | Item 2.2 9 | dummy 10 | 11 |
12 |
13 |
14 | -------------------------------------------------------------------------------- /tests/data/test-multi-paned.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Test Panel 5 | 6 | 7 | true 8 | 9 | 10 | Button 11 | true 12 | 13 | 14 | 15 | 16 | Button 17 | true 18 | 19 | 20 | 21 | 22 | Swap Orientation 23 | true 24 | true 25 | 26 | 27 | 28 | 29 | Button 30 | true 31 | 32 | 33 | 34 | 35 | Button 36 | true 37 | true 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /tests/test-application.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | static gint g_argc; 5 | static gchar **g_argv; 6 | 7 | static gboolean 8 | on_timeout (gpointer data) 9 | { 10 | DzlApplication *app = data; 11 | g_application_release (G_APPLICATION (app)); 12 | return G_SOURCE_REMOVE; 13 | } 14 | 15 | static void 16 | on_activate (DzlApplication *app) 17 | { 18 | g_timeout_add_full (G_PRIORITY_LOW, 10, on_timeout, g_object_ref (app), g_object_unref); 19 | g_application_hold (G_APPLICATION (app)); 20 | } 21 | 22 | static void 23 | test_app_basic (void) 24 | { 25 | g_autoptr(DzlApplication) app = NULL; 26 | int ret; 27 | 28 | app = dzl_application_new ("org.gnome.FooTest", G_APPLICATION_FLAGS_NONE); 29 | g_signal_connect (app, "activate", G_CALLBACK (on_activate), NULL); 30 | ret = g_application_run (G_APPLICATION (app), g_argc, g_argv); 31 | g_assert_cmpint (ret, ==, EXIT_SUCCESS); 32 | } 33 | 34 | gint 35 | main (gint argc, 36 | gchar **argv) 37 | { 38 | g_test_init (&argc, &argv, NULL); 39 | 40 | g_argc = argc; 41 | g_argv = argv; 42 | 43 | g_test_add_func ("/Dazzle/Application/basic", test_app_basic); 44 | 45 | return g_test_run (); 46 | } 47 | -------------------------------------------------------------------------------- /tests/test-bin.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | gint 4 | main (gint argc, 5 | gchar *argv[]) 6 | { 7 | GtkWindow *win; 8 | 9 | gtk_init (&argc, &argv); 10 | 11 | win = g_object_new (GTK_TYPE_WINDOW, 12 | "title", "Test Bin", 13 | NULL); 14 | gtk_container_add (GTK_CONTAINER (win), 15 | g_object_new (DZL_TYPE_BIN, 16 | "visible", TRUE, 17 | "child", g_object_new (GTK_TYPE_LABEL, 18 | "label", "Some label for the bin", 19 | "visible", TRUE, 20 | NULL), 21 | NULL) 22 | ); 23 | 24 | g_signal_connect (win, "delete-event", gtk_main_quit, NULL); 25 | gtk_window_present (win); 26 | gtk_main (); 27 | 28 | return 0; 29 | } 30 | -------------------------------------------------------------------------------- /tests/test-box.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | gint 4 | main (gint argc, 5 | gchar *argv[]) 6 | { 7 | GtkWidget *window; 8 | GtkWidget *box; 9 | GtkWidget *label; 10 | 11 | gtk_init (&argc, &argv); 12 | 13 | window = g_object_new (GTK_TYPE_WINDOW, 14 | "title", "Box Test", 15 | NULL); 16 | box = g_object_new (DZL_TYPE_BOX, 17 | "spacing", 12, 18 | "visible", TRUE, 19 | NULL); 20 | gtk_container_add (GTK_CONTAINER (window), box); 21 | 22 | for (guint i = 0; i < 10; i += 2) 23 | { 24 | g_autofree gchar *str = g_strdup_printf ("%u", i); 25 | 26 | label = g_object_new (GTK_TYPE_LABEL, 27 | "label", str, 28 | "visible", TRUE, 29 | NULL); 30 | gtk_container_add_with_properties (GTK_CONTAINER (box), label, 31 | "position", i, 32 | NULL); 33 | } 34 | 35 | for (guint i = 1; i < 10; i += 2) 36 | { 37 | g_autofree gchar *str = g_strdup_printf ("%u", i); 38 | 39 | label = g_object_new (GTK_TYPE_LABEL, 40 | "label", str, 41 | "visible", TRUE, 42 | NULL); 43 | gtk_container_add_with_properties (GTK_CONTAINER (box), label, 44 | "position", i, 45 | NULL); 46 | } 47 | 48 | g_signal_connect (window, "delete-event", gtk_main_quit, NULL); 49 | gtk_window_present (GTK_WINDOW (window)); 50 | gtk_main (); 51 | 52 | return 0; 53 | } 54 | -------------------------------------------------------------------------------- /tests/test-counters-window.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | static gboolean 6 | int_parse_with_range (gint *value, 7 | gint lower, 8 | gint upper, 9 | const gchar *str) 10 | { 11 | gint64 v64; 12 | 13 | g_assert (value); 14 | g_assert (lower <= upper); 15 | 16 | v64 = g_ascii_strtoll (str, NULL, 10); 17 | 18 | if (((v64 == G_MININT64) || (v64 == G_MAXINT64)) && (errno == ERANGE)) 19 | return FALSE; 20 | 21 | if ((v64 < lower) || (v64 > upper)) 22 | return FALSE; 23 | 24 | *value = (gint)v64; 25 | 26 | return TRUE; 27 | } 28 | 29 | gint 30 | main (gint argc, 31 | gchar *argv[]) 32 | { 33 | GtkWidget *window; 34 | DzlCounterArena *arena; 35 | gint pid; 36 | 37 | gtk_init (&argc, &argv); 38 | 39 | if (argc < 2) 40 | { 41 | g_printerr ("usage: %s [PID]\n", argv[0]); 42 | return EXIT_FAILURE; 43 | } 44 | 45 | if (!int_parse_with_range (&pid, 1, G_MAXUSHORT, argv[1])) 46 | { 47 | g_printerr ("usage: %s [PID]\n", argv[0]); 48 | return EXIT_FAILURE; 49 | } 50 | 51 | arena = dzl_counter_arena_new_for_pid (pid); 52 | 53 | if (arena == NULL) 54 | { 55 | g_printerr ("Failed to access counters for process %u.\n", pid); 56 | return EXIT_FAILURE; 57 | } 58 | 59 | window = dzl_counters_window_new (); 60 | dzl_counters_window_set_arena (DZL_COUNTERS_WINDOW (window), arena); 61 | g_signal_connect (window, "delete-event", gtk_main_quit, NULL); 62 | gtk_window_present (GTK_WINDOW (window)); 63 | 64 | gtk_main (); 65 | 66 | return EXIT_SUCCESS; 67 | } 68 | -------------------------------------------------------------------------------- /tests/test-empty-state.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | gint 4 | main (gint argc, 5 | gchar *argv[]) 6 | { 7 | GtkWidget *window; 8 | GtkWidget *state; 9 | 10 | gtk_init (&argc, &argv); 11 | 12 | window = g_object_new (GTK_TYPE_WINDOW, 13 | "default-width", 800, 14 | "default-height", 600, 15 | "title", "Test Empty State", 16 | NULL); 17 | 18 | state = g_object_new (DZL_TYPE_EMPTY_STATE, 19 | "icon-name", "face-sick-symbolic", 20 | "pixel-size", 192, 21 | "visible", TRUE, 22 | "title", "No Recordings", 23 | "subtitle", "Click record to begin a new recording", 24 | NULL); 25 | gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (state)); 26 | 27 | g_signal_connect (window, "delete-event", gtk_main_quit, NULL); 28 | gtk_window_present (GTK_WINDOW (window)); 29 | 30 | gtk_main (); 31 | 32 | return 0; 33 | } 34 | -------------------------------------------------------------------------------- /tests/test-entry-box.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | int main (int argc, char *argv[]) 4 | { 5 | GtkWidget *window; 6 | GtkWidget *entry_box; 7 | GtkWidget *label; 8 | GtkWidget *icon; 9 | 10 | gtk_init (&argc, &argv); 11 | 12 | window = g_object_new (GTK_TYPE_WINDOW, 13 | "border-width", 24, 14 | "title", "Test Entry Box", 15 | NULL); 16 | 17 | entry_box = g_object_new (DZL_TYPE_ENTRY_BOX, 18 | "max-width-chars", 55, 19 | "spacing", 12, 20 | "valign", GTK_ALIGN_START, 21 | "visible", TRUE, 22 | NULL); 23 | gtk_container_add (GTK_CONTAINER (window), entry_box); 24 | 25 | label = g_object_new (GTK_TYPE_LABEL, 26 | "label", "Frobnicate", 27 | "visible", TRUE, 28 | NULL); 29 | gtk_container_add (GTK_CONTAINER (entry_box), label); 30 | 31 | icon = g_object_new (DZL_TYPE_PROGRESS_ICON, 32 | "progress", .33, 33 | "visible", TRUE, 34 | NULL); 35 | gtk_container_add_with_properties (GTK_CONTAINER (entry_box), icon, 36 | "pack-type", GTK_PACK_END, 37 | NULL); 38 | 39 | g_signal_connect (window, "delete-event", gtk_main_quit, NULL); 40 | gtk_window_present (GTK_WINDOW (window)); 41 | gtk_main (); 42 | 43 | return 0; 44 | } 45 | -------------------------------------------------------------------------------- /tests/test-file-manager.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main (int argc, char *argv[]) 5 | { 6 | g_autoptr(GFile) file = NULL; 7 | g_autoptr(GError) error = NULL; 8 | 9 | if (argc == 1) 10 | { 11 | g_printerr ("usage: %s FILENAME\n", argv[0]); 12 | return EXIT_FAILURE; 13 | } 14 | 15 | file = g_file_new_for_commandline_arg (argv [1]); 16 | 17 | if (!dzl_file_manager_show (file, &error)) 18 | { 19 | g_printerr ("%s\n", error->message); 20 | return EXIT_FAILURE; 21 | } 22 | 23 | return EXIT_SUCCESS; 24 | } 25 | -------------------------------------------------------------------------------- /tests/test-fuzzy-highlight.c: -------------------------------------------------------------------------------- 1 | /* test-fuzzy-highlight.c 2 | * 3 | * Copyright 2019 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | * SPDX-License-Identifier: GPL-3.0-or-later 19 | */ 20 | 21 | #include 22 | 23 | static void 24 | test_highlight (void) 25 | { 26 | static const struct { 27 | const gchar *needle; 28 | const gchar *haystack; 29 | const gchar *expected; 30 | } tests[] = { 31 | { "with tab", "with ", "with <Tab>" }, 32 | { "with t", "with ", "with <Tab>" }, 33 | { "with tuff", "with ' stuff", "with ' stuff" }, 34 | { "gtkwdg", "gtk_widget_show", "gtk_widget_show" }, 35 | }; 36 | 37 | for (guint i = 0; i < G_N_ELEMENTS (tests); i++) 38 | { 39 | g_autofree gchar *highlight = dzl_fuzzy_highlight (tests[i].haystack, 40 | tests[i].needle, 41 | FALSE); 42 | g_assert_cmpstr (highlight, ==, tests[i].expected); 43 | } 44 | } 45 | 46 | gint 47 | main (gint argc, 48 | gchar *argv[]) 49 | { 50 | g_test_init (&argc, &argv, NULL); 51 | g_test_add_func ("/Dazzle/Fuzzy/highlight", test_highlight); 52 | return g_test_run (); 53 | } 54 | -------------------------------------------------------------------------------- /tests/test-graph-model.c: -------------------------------------------------------------------------------- 1 | /* test-graph-model.c 2 | * 3 | * Copyright 2018 Christian Hergert 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | * 18 | * SPDX-License-Identifier: GPL-3.0-or-later 19 | */ 20 | 21 | #include 22 | 23 | static void 24 | test_basic (void) 25 | { 26 | g_autoptr(DzlGraphModel) model = dzl_graph_view_model_new (); 27 | g_autoptr(DzlGraphColumn) column = dzl_graph_view_column_new ("foo", G_TYPE_INT64); 28 | DzlGraphModelIter iter; 29 | GValue value = { 0 }; 30 | gint idx; 31 | 32 | g_value_init (&value, G_TYPE_INT64); 33 | g_value_set_int64 (&value, 1234); 34 | 35 | idx = dzl_graph_view_model_add_column (model, column); 36 | 37 | for (guint i = 0; i < 100; i++) 38 | { 39 | gint64 v = 0; 40 | 41 | g_value_set_int64 (&value, i * 99); 42 | 43 | dzl_graph_view_model_push (model, &iter, i + 1); 44 | dzl_graph_view_model_iter_set_value (&iter, idx, &value); 45 | 46 | dzl_graph_view_model_iter_get (&iter, 0, &v, -1); 47 | g_assert_cmpint (v, ==, (i * 99)); 48 | } 49 | 50 | g_value_unset (&value); 51 | } 52 | 53 | gint 54 | main (gint argc, 55 | gchar *argv[]) 56 | { 57 | g_test_init (&argc, &argv, NULL); 58 | g_test_add_func ("/Dazzle/GraphModel/basic", test_basic); 59 | return g_test_run (); 60 | } 61 | -------------------------------------------------------------------------------- /tests/test-levenshtein.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | typedef struct 4 | { 5 | const gchar *needle; 6 | const gchar *haystack; 7 | gint expected_score; 8 | } WordCheck; 9 | 10 | static void 11 | test_levenshtein_basic (void) 12 | { 13 | static const WordCheck check[] = { 14 | { "gtk", "gkt", 2 }, 15 | { "LibreFreeOpen", "Cromulent", 10 }, 16 | { "Xorg", "Wayland", 7 }, 17 | { "glib", "gobject", 6 }, 18 | { "gbobject", "gobject", 1 }, 19 | { "flip", "fliiiip", 3 }, 20 | { "flip", "fliiiipper", 6 }, 21 | { NULL } 22 | }; 23 | 24 | for (guint i = 0; check[i].needle != NULL; i++) 25 | { 26 | gint score = dzl_levenshtein (check[i].needle, check[i].haystack); 27 | 28 | g_assert_cmpint (score, ==, check[i].expected_score); 29 | } 30 | } 31 | 32 | gint 33 | main (gint argc, 34 | gchar *argv[]) 35 | { 36 | g_test_init (&argc, &argv, NULL); 37 | g_test_add_func ("/Dazzle/Levenshtein/basic", test_levenshtein_basic); 38 | return g_test_run (); 39 | } 40 | -------------------------------------------------------------------------------- /tests/test-list-store.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | static GRand *grand; 5 | 6 | static gint 7 | compare_direct (gconstpointer a, 8 | gconstpointer b, 9 | gpointer data) 10 | { 11 | if (a < b) 12 | return -1; 13 | else if (a > b) 14 | return 1; 15 | return 0; 16 | } 17 | 18 | #define assert_cmpptr(a,eq,b) \ 19 | G_STMT_START { \ 20 | if (!((a) eq (b))) { \ 21 | g_error (#a "(%p) " #eq " " #b "(%p)\n", (a), (b)); \ 22 | } \ 23 | } G_STMT_END 24 | 25 | static void 26 | test_insert_sorted (void) 27 | { 28 | GtkListStore *store = gtk_list_store_new (1, G_TYPE_POINTER); 29 | GtkTreeIter iter; 30 | gboolean r; 31 | gpointer last = NULL; 32 | guint count = 0; 33 | 34 | for (guint i = 0; i < 1000; i++) 35 | { 36 | gpointer value = GINT_TO_POINTER (g_rand_int (grand)); 37 | 38 | dzl_gtk_list_store_insert_sorted (store, &iter, value, 0, compare_direct, NULL); 39 | gtk_list_store_set (store, &iter, 0, value, -1); 40 | } 41 | 42 | r = gtk_tree_model_get_iter_first (GTK_TREE_MODEL (store), &iter); 43 | g_assert_cmpint (r, ==, TRUE); 44 | 45 | do 46 | { 47 | gpointer value = NULL; 48 | 49 | gtk_tree_model_get (GTK_TREE_MODEL (store), &iter, 0, &value, -1); 50 | assert_cmpptr (value, >=, last); 51 | last = value; 52 | 53 | count++; 54 | } 55 | while (gtk_tree_model_iter_next (GTK_TREE_MODEL (store), &iter)); 56 | 57 | g_assert_cmpint (count, ==, 1000); 58 | 59 | g_object_unref (store); 60 | } 61 | 62 | gint 63 | main (gint argc, 64 | gchar *argv[]) 65 | { 66 | grand = g_rand_new (); 67 | gtk_init (&argc, &argv); 68 | g_test_init (&argc, &argv, NULL); 69 | g_test_add_func ("/Dazzle/GtkListStore/insert_sorted", test_insert_sorted); 70 | return g_test_run (); 71 | } 72 | -------------------------------------------------------------------------------- /tests/test-multi-paned.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | static void 4 | swap_orientation (GtkWidget *button, 5 | GtkWidget *paned) 6 | { 7 | GtkOrientation orientation; 8 | 9 | orientation = gtk_orientable_get_orientation (GTK_ORIENTABLE (paned)); 10 | gtk_orientable_set_orientation (GTK_ORIENTABLE (paned), !orientation); 11 | } 12 | 13 | gint 14 | main (gint argc, 15 | gchar *argv[]) 16 | { 17 | GtkBuilder *builder = NULL; 18 | GtkWindow *window = NULL; 19 | GError *error = NULL; 20 | GObject *button; 21 | GObject *paned; 22 | g_autofree gchar *path = g_build_filename (TEST_DATA_DIR, "test-multi-paned.ui", NULL); 23 | 24 | gtk_init (&argc, &argv); 25 | 26 | g_type_ensure (DZL_TYPE_MULTI_PANED); 27 | 28 | builder = gtk_builder_new (); 29 | gtk_builder_add_from_file (builder, path, &error); 30 | g_assert_no_error (error); 31 | 32 | paned = gtk_builder_get_object (builder, "paned"); 33 | button = gtk_builder_get_object (builder, "swap"); 34 | g_signal_connect (button, "clicked", G_CALLBACK (swap_orientation), paned); 35 | 36 | window = GTK_WINDOW (gtk_builder_get_object (builder, "window")); 37 | g_signal_connect (window, "delete-event", gtk_main_quit, NULL); 38 | 39 | gtk_window_present (window); 40 | gtk_main (); 41 | 42 | g_clear_object (&builder); 43 | 44 | return 0; 45 | } 46 | -------------------------------------------------------------------------------- /tests/test-pill-box.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | static const gchar *words[] = { 4 | "Autotools", 5 | "Meson", 6 | "CMake", 7 | "waf", 8 | "scons", 9 | "shell", 10 | NULL 11 | }; 12 | 13 | static void 14 | load_css (void) 15 | { 16 | g_autoptr(GtkCssProvider) provider = NULL; 17 | 18 | provider = dzl_css_provider_new ("resource:///org/gnome/dazzle/themes"); 19 | gtk_style_context_add_provider_for_screen (gdk_screen_get_default (), 20 | GTK_STYLE_PROVIDER (provider), 21 | GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); 22 | } 23 | 24 | int 25 | main (int argc, 26 | char *argv[]) 27 | { 28 | GtkWidget *window; 29 | GtkWidget *box; 30 | GtkWidget *pill; 31 | 32 | gtk_init (&argc, &argv); 33 | 34 | load_css (); 35 | 36 | window = g_object_new (GTK_TYPE_WINDOW, 37 | "title", "Test PillBox", 38 | "border-width", 24, 39 | NULL); 40 | box = g_object_new (GTK_TYPE_BOX, 41 | "spacing", 3, 42 | "visible", TRUE, 43 | NULL); 44 | gtk_container_add (GTK_CONTAINER (window), box); 45 | 46 | for (guint i = 0; words[i]; i++) 47 | { 48 | pill = g_object_new (DZL_TYPE_PILL_BOX, 49 | "label", words[i], 50 | "visible", TRUE, 51 | NULL); 52 | gtk_container_add (GTK_CONTAINER (box), pill); 53 | } 54 | 55 | g_signal_connect (window, "delete-event", gtk_main_quit, NULL); 56 | gtk_window_present (GTK_WINDOW (window)); 57 | 58 | gtk_main (); 59 | 60 | return 0; 61 | } 62 | -------------------------------------------------------------------------------- /tests/test-progress-button.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | static void 4 | load_css (void) 5 | { 6 | g_autoptr(GtkCssProvider) provider = NULL; 7 | 8 | provider = dzl_css_provider_new ("resource:///org/gnome/dazzle/themes"); 9 | gtk_style_context_add_provider_for_screen (gdk_screen_get_default (), 10 | GTK_STYLE_PROVIDER (provider), 11 | GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); 12 | } 13 | 14 | gint 15 | main (gint argc, 16 | gchar *argv[]) 17 | { 18 | GtkWidget *window; 19 | GtkWidget *button; 20 | 21 | gtk_init (&argc, &argv); 22 | 23 | load_css (); 24 | 25 | window = g_object_new (GTK_TYPE_WINDOW, 26 | "border-width", 24, 27 | "title", "Progress Button Test", 28 | "visible", TRUE, 29 | NULL); 30 | 31 | button = g_object_new (DZL_TYPE_PROGRESS_BUTTON, 32 | "label", "Downloading…", 33 | "progress", 0, 34 | "show-progress", TRUE, 35 | "visible", TRUE, 36 | NULL); 37 | gtk_container_add (GTK_CONTAINER (window), button); 38 | 39 | dzl_object_animate (button, DZL_ANIMATION_LINEAR, 5000, NULL, 40 | "progress", 100, 41 | NULL); 42 | 43 | g_signal_connect (window, "delete-event", gtk_main_quit, NULL); 44 | gtk_window_present (GTK_WINDOW (window)); 45 | gtk_main (); 46 | 47 | return 0; 48 | } 49 | -------------------------------------------------------------------------------- /tests/test-progress-icon.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | gint 4 | main (gint argc, 5 | gchar *argv[]) 6 | { 7 | GtkWidget *window; 8 | GtkWidget *button; 9 | 10 | gtk_init (&argc, &argv); 11 | 12 | window = g_object_new (GTK_TYPE_WINDOW, 13 | "border-width", 24, 14 | "title", "Progress Icon Test", 15 | "visible", TRUE, 16 | NULL); 17 | 18 | button = g_object_new (DZL_TYPE_PROGRESS_ICON, 19 | "progress", 0.0, 20 | "visible", TRUE, 21 | "width-request", 96, 22 | "height-request", 96, 23 | NULL); 24 | gtk_container_add (GTK_CONTAINER (window), button); 25 | 26 | dzl_object_animate (button, DZL_ANIMATION_LINEAR, 5000, NULL, 27 | "progress", 1.0, 28 | NULL); 29 | 30 | g_signal_connect (window, "delete-event", gtk_main_quit, NULL); 31 | gtk_window_present (GTK_WINDOW (window)); 32 | gtk_main (); 33 | 34 | return 0; 35 | } 36 | -------------------------------------------------------------------------------- /tests/test-progress-menu-button.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | gint 4 | main (gint argc, 5 | gchar *argv[]) 6 | { 7 | GtkWidget *window; 8 | GtkWidget *button; 9 | 10 | gtk_init (&argc, &argv); 11 | 12 | window = g_object_new (GTK_TYPE_WINDOW, 13 | "border-width", 24, 14 | "title", "Progress Button Test", 15 | "visible", TRUE, 16 | NULL); 17 | 18 | button = g_object_new (DZL_TYPE_PROGRESS_MENU_BUTTON, 19 | "halign", GTK_ALIGN_CENTER, 20 | "valign", GTK_ALIGN_CENTER, 21 | "visible", TRUE, 22 | NULL); 23 | gtk_container_add (GTK_CONTAINER (window), button); 24 | 25 | dzl_object_animate (button, DZL_ANIMATION_LINEAR, 5000, NULL, 26 | "progress", 1.0, 27 | NULL); 28 | 29 | g_signal_connect (window, "delete-event", gtk_main_quit, NULL); 30 | gtk_window_present (GTK_WINDOW (window)); 31 | gtk_main (); 32 | 33 | return 0; 34 | } 35 | -------------------------------------------------------------------------------- /tests/test-radio-box.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | gint 5 | main (gint argc, 6 | gchar *argv[]) 7 | { 8 | GtkWindow *window; 9 | DzlRadioBox *box; 10 | 11 | gtk_init (&argc, &argv); 12 | 13 | window = g_object_new (GTK_TYPE_WINDOW, 14 | "title", "Test DzlRadioBox", 15 | NULL); 16 | box = g_object_new (DZL_TYPE_RADIO_BOX, 17 | "visible", TRUE, 18 | NULL); 19 | gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (box)); 20 | 21 | dzl_radio_box_add_item (box, "1", "One"); 22 | dzl_radio_box_add_item (box, "2", "Two"); 23 | dzl_radio_box_add_item (box, "3", "Three"); 24 | dzl_radio_box_add_item (box, "4", "Four"); 25 | dzl_radio_box_add_item (box, "5", "Five"); 26 | dzl_radio_box_add_item (box, "6", "Six"); 27 | 28 | g_signal_connect (window, "delete-event", gtk_main_quit, NULL); 29 | gtk_window_present (window); 30 | 31 | gtk_main (); 32 | 33 | return EXIT_SUCCESS; 34 | } 35 | -------------------------------------------------------------------------------- /tests/test-simple-popover.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | static void 4 | text_changed (DzlSimplePopover *popover, 5 | gpointer unused) 6 | { 7 | const gchar *text; 8 | 9 | text = dzl_simple_popover_get_text (popover); 10 | dzl_simple_popover_set_ready (popover, text && *text); 11 | } 12 | 13 | static void 14 | activate_cb (DzlSimplePopover *popover, 15 | const gchar *text, 16 | GtkButton *button) 17 | { 18 | g_assert (DZL_IS_SIMPLE_POPOVER (popover)); 19 | g_assert (GTK_IS_BUTTON (button)); 20 | 21 | gtk_button_set_label (button, text); 22 | } 23 | 24 | gint 25 | main (gint argc, 26 | gchar *argv[]) 27 | { 28 | DzlSimplePopover *popover; 29 | GtkMenuButton *button; 30 | GtkWindow *window; 31 | 32 | gtk_init (&argc, &argv); 33 | 34 | window = g_object_new (GTK_TYPE_WINDOW, 35 | "title", "Test Simple Popover", 36 | "border-width", 24, 37 | "visible", TRUE, 38 | NULL); 39 | 40 | popover = g_object_new (DZL_TYPE_SIMPLE_POPOVER, 41 | "title", "Change Label", 42 | "message", "Type the new text for the label", 43 | "button-text", "Change", 44 | NULL); 45 | 46 | button = g_object_new (GTK_TYPE_MENU_BUTTON, 47 | "label", "Click Me…", 48 | "popover", popover, 49 | "visible", TRUE, 50 | NULL); 51 | gtk_container_add (GTK_CONTAINER (window), GTK_WIDGET (button)); 52 | 53 | g_signal_connect (popover, "changed", G_CALLBACK (text_changed), NULL); 54 | g_signal_connect (popover, "activate", G_CALLBACK (activate_cb), button); 55 | g_signal_connect (window, "delete-event", gtk_main_quit, NULL); 56 | 57 | gtk_main (); 58 | 59 | return 0; 60 | } 61 | -------------------------------------------------------------------------------- /tests/test-tab-strip.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | gint 4 | main (gint argc, 5 | gchar *argv[]) 6 | { 7 | GtkBuilder *builder = NULL; 8 | GtkWindow *window = NULL; 9 | GError *error = NULL; 10 | g_autofree gchar *path = g_build_filename (TEST_DATA_DIR, "test-tab-strip.ui", NULL); 11 | 12 | gtk_init (&argc, &argv); 13 | 14 | g_type_ensure (DZL_TYPE_TAB_STRIP); 15 | 16 | builder = gtk_builder_new (); 17 | gtk_builder_add_from_file (builder, path, &error); 18 | g_assert_no_error (error); 19 | 20 | window = GTK_WINDOW (gtk_builder_get_object (builder, "window")); 21 | g_signal_connect (window, "delete-event", gtk_main_quit, NULL); 22 | 23 | gtk_window_present (window); 24 | gtk_main (); 25 | 26 | g_clear_object (&builder); 27 | 28 | return 0; 29 | } 30 | -------------------------------------------------------------------------------- /tools/meson.build: -------------------------------------------------------------------------------- 1 | if get_option('enable_tools') 2 | 3 | # Counters are UNIX-systems only currently 4 | if host_machine.system() != 'windows' 5 | dazzle_list_counters = executable('dazzle-list-counters', 'dazzle-list-counters.c', 6 | dependencies: libdazzle_deps + [libdazzle_dep], 7 | install: true, 8 | install_dir: bindir 9 | ) 10 | endif 11 | 12 | endif 13 | --------------------------------------------------------------------------------