├── .clang-format ├── .gcc-analyzer-false-positives ├── .gitignore ├── .gitlab-ci.yml ├── .scan-build-false-positives ├── AUTHORS ├── COPYING ├── Makefile.am ├── NEWS ├── README.md ├── THANKS ├── TODO ├── autogen.sh ├── configure.ac ├── docs ├── Makefile.am └── reference │ ├── Makefile.am │ ├── gtkdocentities.ent.in │ ├── libxfce4ui-docs.xml.in │ ├── libxfce4ui-sections.txt │ └── meson.build ├── glade ├── Makefile.am ├── icons │ ├── 16x16 │ │ ├── Makefile.am │ │ └── widget-libxfce4ui-xfce-titled-dialog.png │ ├── 22x22 │ │ ├── Makefile.am │ │ └── widget-libxfce4ui-xfce-titled-dialog.png │ └── Makefile.am ├── libxfce4ui-2.xml ├── libxfce4ui-glade.c └── meson.build ├── icons ├── 128x128 │ ├── Makefile.am │ ├── org.xfce.about.png │ └── xfce4-logo.png ├── 16x16 │ ├── Makefile.am │ ├── org.xfce.about.png │ ├── org.xfce.about.svg │ ├── xfce4-logo.png │ └── xfce4-logo.svg ├── 48x48 │ ├── Makefile.am │ ├── org.xfce.about.png │ ├── org.xfce.about.svg │ └── xfce4-logo.png ├── Makefile.am ├── meson.build ├── pixmaps │ ├── Makefile.am │ └── xfce-thumbnail-frame.png └── scalable │ ├── Makefile.am │ ├── org.xfce.about.svg │ └── xfce4-logo.svg ├── libxfce4kbd-private ├── .clang-format ├── Makefile.am ├── libxfce4kbd-private-3.pc.in ├── libxfce4kbd-private.symbols.in ├── meson.build ├── xfce-shortcut-dialog.c ├── xfce-shortcut-dialog.h ├── xfce-shortcuts-editor-dialog.c ├── xfce-shortcuts-editor-dialog.h ├── xfce-shortcuts-editor.c ├── xfce-shortcuts-editor.h ├── xfce-shortcuts-grabber.c ├── xfce-shortcuts-grabber.h ├── xfce-shortcuts-marshal.list ├── xfce-shortcuts-provider.c ├── xfce-shortcuts-provider.h ├── xfce-shortcuts-xfwm4.c ├── xfce-shortcuts-xfwm4.h ├── xfce-shortcuts.c ├── xfce-shortcuts.h └── xfce4-keyboard-shortcuts.xml ├── libxfce4ui ├── .clang-format ├── Libxfce4ui-2.0.metadata ├── Makefile.am ├── libxfce4ui-2.deps ├── libxfce4ui-2.pc.in ├── libxfce4ui-config.c ├── libxfce4ui-config.h.in ├── libxfce4ui-enums.h ├── libxfce4ui-marshal.list ├── libxfce4ui-private.h ├── libxfce4ui.h.in ├── libxfce4ui.symbols.in ├── meson.build ├── resources │ ├── libxfce4ui-dialog-ui.ui │ ├── libxfce4ui.gresource.xml │ └── xfce4-about-dialog.glade ├── xfce-cell-renderer-icon.c ├── xfce-cell-renderer-icon.h ├── xfce-clipboard-manager.c ├── xfce-clipboard-manager.h ├── xfce-dialogs.c ├── xfce-dialogs.h ├── xfce-execute.c ├── xfce-execute.h ├── xfce-filename-input.c ├── xfce-filename-input.h ├── xfce-gdk-extensions.c ├── xfce-gdk-extensions.h ├── xfce-gdk-pixbuf-extensions.c ├── xfce-gdk-pixbuf-extensions.h ├── xfce-gtk-extensions.c ├── xfce-gtk-extensions.h ├── xfce-icon-chooser-dialog.c ├── xfce-icon-chooser-dialog.h ├── xfce-icon-chooser-model.c ├── xfce-icon-chooser-model.h ├── xfce-icon-view-accessible.c ├── xfce-icon-view.c ├── xfce-icon-view.h ├── xfce-notebook.c ├── xfce-notebook.h ├── xfce-screensaver.c ├── xfce-screensaver.h ├── xfce-sm-client.c ├── xfce-sm-client.h ├── xfce-spawn.c ├── xfce-spawn.h ├── xfce-thumbnail-preview.c ├── xfce-thumbnail-preview.h ├── xfce-thumbnail.c ├── xfce-thumbnail.h ├── xfce-titled-dialog.c ├── xfce-titled-dialog.h ├── xfce-tree-view.c └── xfce-tree-view.h ├── m4 ├── introspection.m4 └── vapigen.m4 ├── meson.build ├── meson_options.txt ├── po ├── LINGUAS ├── Makevars ├── POTFILES.in ├── POTFILES.skip ├── am.po ├── ar.po ├── ast.po ├── az.po ├── be.po ├── bg.po ├── bn.po ├── ca.po ├── cs.po ├── cy.po ├── da.po ├── de.po ├── el.po ├── en_AU.po ├── en_GB.po ├── es.po ├── et.po ├── eu.po ├── fa_IR.po ├── fi.po ├── fr.po ├── gl.po ├── he.po ├── hr.po ├── hu.po ├── hy.po ├── hy_AM.po ├── hye.po ├── id.po ├── ie.po ├── is.po ├── it.po ├── ja.po ├── ka.po ├── kk.po ├── ko.po ├── lt.po ├── lv.po ├── meson.build ├── ms.po ├── nb.po ├── nl.po ├── nn.po ├── oc.po ├── pa.po ├── pl.po ├── pt.po ├── pt_BR.po ├── ro.po ├── ru.po ├── si.po ├── sk.po ├── sl.po ├── sq.po ├── sr.po ├── sv.po ├── te.po ├── th.po ├── tr.po ├── ug.po ├── uk.po ├── ur.po ├── ur_PK.po ├── vec.po ├── vi.po ├── zh_CN.po ├── zh_HK.po └── zh_TW.po ├── python-example └── test-introspection.py ├── tests ├── Makefile.am ├── meson.build └── test-ui.c ├── xfce-desktop-item-edit ├── Makefile.am ├── main.c ├── meson.build ├── xfce-die-command-entry.c ├── xfce-die-command-entry.h ├── xfce-die-command-model.c ├── xfce-die-command-model.h ├── xfce-die-desktop-model.c ├── xfce-die-desktop-model.h ├── xfce-die-editor.c ├── xfce-die-editor.h ├── xfce-die-enum-types.c ├── xfce-die-enum-types.h ├── xfce-die-utils.c └── xfce-die-utils.h ├── xfce-open ├── Makefile.am ├── main.c └── meson.build ├── xfce-revision.h.in └── xfce4-about ├── Makefile.am ├── contributors.h ├── main.c ├── meson.build ├── system-info.c ├── system-info.h └── xfce4-about.desktop.in /.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | Language: Cpp 3 | BasedOnStyle: GNU 4 | 5 | AlignEscapedNewlines: DontAlign 6 | AlignTrailingComments: false 7 | AllowAllParametersOfDeclarationOnNextLine: false 8 | AlwaysBreakAfterReturnType: All 9 | BinPackParameters: false 10 | BreakBeforeBinaryOperators: NonAssignment 11 | ColumnLimit: 0 12 | ContinuationIndentWidth: 2 13 | IncludeBlocks: Regroup 14 | IncludeCategories: 15 | - Regex: '"config\.h"' 16 | Priority: -3 17 | CaseSensitive: true 18 | - Regex: '<.*>' 19 | Priority: -2 20 | CaseSensitive: true 21 | - Regex: '".*/.*"' 22 | Priority: -1 23 | CaseSensitive: true 24 | - Regex: '"[^/]*"' 25 | Priority: 0 26 | SortPriority: 1 27 | CaseSensitive: true 28 | IndentGotoLabels: false 29 | InsertNewlineAtEOF: true 30 | KeepEmptyLinesAtTheStartOfBlocks: false 31 | MaxEmptyLinesToKeep: 3 32 | SpaceAfterCStyleCast: true 33 | WhitespaceSensitiveMacros: 34 | # Avoid breaking formatting in the code parameter 35 | - G_DEFINE_TYPE_WITH_CODE 36 | # Buggy workaround to add exceptions to 'SpaceBeforeParens: Always' (see below) 37 | - _ 38 | # Workaround to avoid some alignment bugs when adding a macro to WhitespaceSensitiveMacros, 39 | # see https://github.com/llvm/llvm-project/issues/55443#issuecomment-1953268337 40 | # This doesn't fix all alignment bugs though, so I'd rather make an exception only for '_', 41 | # and not also for 'N_' or 'I_' for example. 42 | # See also https://github.com/llvm/llvm-project/issues/82288 43 | Macros: 44 | - _(x)=x 45 | ... 46 | -------------------------------------------------------------------------------- /.gcc-analyzer-false-positives: -------------------------------------------------------------------------------- 1 | # it doesn't seem to identify the first variadic argument correctly, so it follows 2 | # the wrong branch when testing e.g. 'strcmp (text, XFCE_BUTTON_TYPE_MIXED) == 0' 3 | xfce-dialogs.c:[0-9]+:[0-9]+: warning: .+va_arg.+ expected .+const gchar \*.+ \{aka .+const char \*.+\} but received .+int.+ for variadic argument 1 of .+args.+ \[CWE-686\] \[-Wanalyzer-va-arg-type-mismatch\] 4 | xfce-dialogs.c:[0-9]+:[0-9]+: warning: .+va_arg.+ expected .+gint.+ \{aka .+int.+\} but received .+void \*.+ for variadic argument 1 of .+args.+ \[CWE-686\] \[-Wanalyzer-va-arg-type-mismatch\] 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Files generated by autogen.sh 2 | *~ 3 | INSTALL 4 | aclocal.m4 5 | autom4te.cache/ 6 | compile 7 | config.* 8 | configure 9 | depcomp 10 | gtk-doc.m4 11 | gtk-doc.make 12 | install-sh 13 | intltool-*.in 14 | libtool 15 | libxfce4kbd-private/libxfce4kbd-private-3.pc 16 | libxfce4kbd-private/libxfce4kbd-private.symbols 17 | libxfce4ui/libxfce4ui.symbols 18 | libxfce4ui/libxfce4ui.h 19 | libxfce4ui/libxfce4ui-2.pc 20 | libxfce4ui/libxfce4ui-config.h 21 | libxfce4ui/libxfce4ui-resources.c 22 | libxfce4ui/.dirstamp 23 | ltmain.sh 24 | m4/* 25 | !m4/introspection.m4 26 | !m4/vapigen.m4 27 | missing 28 | po/Makefile.in.in 29 | po/POTFILES 30 | po/stamp-it 31 | stamp-h1 32 | test-driver 33 | .deps/ 34 | Makefile 35 | Makefile.in 36 | ABOUT-NLS 37 | po/Makevars.template 38 | po/Rules-quot 39 | po/boldquot.sed 40 | po/en@boldquot.header 41 | po/en@quot.header 42 | po/insert-header.sin 43 | po/libxfce4ui.pot 44 | po/quot.sed 45 | po/remove-potcdate.sed 46 | po/remove-potcdate.sin 47 | po/stamp-po 48 | 49 | 50 | # files generated by make 51 | ChangeLog 52 | mkinstalldirs 53 | .libs/ 54 | po/*.gmo 55 | docs/reference/html/ 56 | docs/reference/libxfce4ui.actions 57 | docs/reference/libxfce4ui-decl-list.txt 58 | docs/reference/libxfce4ui-decl.txt 59 | docs/reference/libxfce4ui-docs.xml 60 | docs/reference/libxfce4ui-overrides.txt 61 | docs/reference/libxfce4ui-undeclared.txt 62 | docs/reference/libxfce4ui-undocumented.txt 63 | docs/reference/libxfce4ui-unused.txt 64 | docs/reference/libxfce4ui.args 65 | docs/reference/libxfce4ui.hierarchy 66 | docs/reference/libxfce4ui.interfaces 67 | docs/reference/libxfce4ui.prerequisites 68 | docs/reference/libxfce4ui.signals 69 | docs/reference/libxfce4ui.types 70 | docs/reference/*.bak 71 | docs/reference/xml/ 72 | docs/reference/version.xml 73 | *.la 74 | *.lo 75 | *.o 76 | *.stamp 77 | libxfce4kbd-private/xfce-shortcuts-marshal.c 78 | libxfce4kbd-private/xfce-shortcuts-marshal.h 79 | libxfce4kbd-private/libxfce4kbd-private-visibility.h 80 | libxfce4kbd-private/libxfce4kbd-private-visibility.c 81 | libxfce4ui/libxfce4ui-visibility.h 82 | libxfce4ui/libxfce4ui-visibility.c 83 | libxfce4ui/libxfce4ui-enum-types.c 84 | libxfce4ui/libxfce4ui-enum-types.h 85 | libxfce4ui/libxfce4ui-marshal.c 86 | libxfce4ui/libxfce4ui-marshal.h 87 | libxfce4ui/stamp-libxfce4ui-enum-types.h 88 | libxfce4ui/stamp-libxfce4ui-marshal.h 89 | libxfce4ui/Libxfce4ui-2.0.gir 90 | libxfce4ui/Libxfce4ui-2.0.typelib 91 | libxfce4ui/libxfce4ui-2.vapi 92 | xfce4-about/xfce4-about 93 | xfce4-about/xfce4-about.desktop 94 | libxfce4ui-*.tar.bz2 95 | tests/test-ui 96 | 97 | # files generated by make check 98 | docs/test-suite.log 99 | libxfce4ui/abicheck.sh.log 100 | libxfce4ui/abicheck.sh.trs 101 | libxfce4ui/test-suite.log 102 | 103 | # example folder location 104 | python-example/html/ 105 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | include: 2 | - project: 'xfce/xfce4-dev-tools' 3 | file: '/ci/build_project.yml' 4 | 5 | -------------------------------------------------------------------------------- /.scan-build-false-positives: -------------------------------------------------------------------------------- 1 | # gobject-introspection generated code 2 | Libxfce4ui-2.0.c:[0-9]+:[0-9]+: warning: Access to field 'message' results in a dereference of a null pointer \(loaded from variable 'error'\) \[core.NullDereference\] 3 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Benedikt Meurer 2 | Brian Tarricone 3 | Jannis Pohlmann 4 | Jasper Huijsmans 5 | Nick Schermer 6 | Olivier Fourdan 7 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} 2 | 3 | 4 | SUBDIRS = \ 5 | libxfce4ui \ 6 | libxfce4kbd-private \ 7 | xfce4-about \ 8 | glade \ 9 | icons \ 10 | docs \ 11 | po \ 12 | tests \ 13 | xfce-desktop-item-edit \ 14 | xfce-open \ 15 | $(NULL) 16 | 17 | distuninstallcheck_listfiles = \ 18 | find . -type f -print | grep -v ./share/icons/hicolor/icon-theme.cache 19 | 20 | distclean-local: 21 | rm -rf *.cache *~ 22 | 23 | .PHONY: ChangeLog 24 | 25 | ChangeLog: Makefile 26 | (GIT_DIR=$(top_srcdir)/.git git log > .changelog.tmp \ 27 | && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) \ 28 | || (touch ChangeLog; echo 'Git directory not found: installing possibly empty changelog.' >&2) 29 | 30 | dist-hook: ChangeLog 31 | 32 | EXTRA_DIST = \ 33 | README.md \ 34 | m4/introspection.m4 \ 35 | m4/vapigen.m4 \ 36 | meson.build \ 37 | meson_options.txt \ 38 | po/meson.build \ 39 | xfce-revision.h.in \ 40 | $(NULL) 41 | 42 | AM_DISTCHECK_CONFIGURE_FLAGS = \ 43 | --enable-gtk-doc \ 44 | --disable-gladeui2 \ 45 | --enable-introspection \ 46 | --disable-vala 47 | 48 | # vi:set ts=8 sw=8 noet ai nocindent syntax=automake: 49 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![License](https://img.shields.io/badge/License-GPL%20v2-blue.svg)](https://gitlab.xfce.org/xfce/libxfce4ui/-/blob/master/COPYING) 2 | 3 | # libxfce4ui 4 | 5 | 6 | The libxfce4ui library is used to share commonly used Xfce widgets among the Xfce applications. 7 | 8 | ---- 9 | 10 | ### Homepage 11 | 12 | [Libxfce4ui documentation](https://docs.xfce.org/xfce/libxfce4ui/start) 13 | 14 | ### Changelog 15 | 16 | See [NEWS](https://gitlab.xfce.org/xfce/libxfce4ui/-/blob/master/NEWS) for details on changes and fixes made in the current release. 17 | 18 | ### Source Code Repository 19 | 20 | [Libxfce4ui source code](https://gitlab.xfce.org/xfce/libxfce4ui) 21 | 22 | ### Download a Release Tarball 23 | 24 | [Libxfce4ui archive](https://archive.xfce.org/src/xfce/libxfce4ui) 25 | or 26 | [Libxfce4ui tags](https://gitlab.xfce.org/xfce/libxfce4ui/-/tags) 27 | 28 | ### Installation 29 | 30 | From source: 31 | 32 | % cd libxfce4ui 33 | % ./autogen.sh 34 | % make 35 | % make install 36 | 37 | From release tarball: 38 | 39 | % tar xf libxfce4ui-.tar.bz2 40 | % cd libxfce4ui- 41 | % ./configure 42 | % make 43 | % make install 44 | 45 | ### Reporting Bugs 46 | 47 | Visit the [reporting bugs](https://docs.xfce.org/xfce/libxfce4ui/bugs) page to view currently open bug reports and instructions on reporting new bugs or submitting bugfixes. 48 | 49 | -------------------------------------------------------------------------------- /THANKS: -------------------------------------------------------------------------------- 1 | What's this file about? 2 | ======================= 3 | This file lists all external people that have contributed to this project. 4 | 5 | 6 | 7 | Testers (sorted by name): 8 | ------------------------- 9 | These people have contributed to libxfce4ui by testing the software, 10 | reporting problems and making useful suggestions. 11 | 12 | 13 | 14 | Translators (sorted by language): 15 | --------------------------------- 16 | These people have translated libxfce4ui to foreign languages. 17 | 18 | 19 | 20 | Other contributers (sorted by name): 21 | ------------------------------------ 22 | 23 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | * Implement the GtkBuildable interface into XfceTitleDialog 2 | and add the needed code for GtkBuilder and Glade 3.5 to 3 | recognize it. 4 | -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | type xdt-autogen >/dev/null 2>&1 || { 4 | cat >&2 <$@ 57 | 58 | EXTRA_DIST += \ 59 | gtkdocentities.ent.in \ 60 | $(DOC_MODULE)-docs.xml.in \ 61 | meson.build \ 62 | $(NULL) 63 | 64 | DISTCLEANFILES = \ 65 | $(DOC_MODULE)-docs.xml \ 66 | $(NULL) 67 | 68 | # vi:set ts=8 sw=8 noet ai nocindent syntax=automake: 69 | -------------------------------------------------------------------------------- /docs/reference/gtkdocentities.ent.in: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /docs/reference/libxfce4ui-docs.xml.in: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | %gtkdocentities; 8 | ]> 9 | 10 | 11 | 12 | &package_name; Reference Manual 13 | 14 | For &package_string;. 15 | The latest version of this documentation can be found on-line at 16 | https://developer.xfce.org/&package_name;/. 17 | 18 | 19 | @COPYRIGHT_YEAR@ 20 | The Xfce development team 21 | 22 | 23 | 24 | 25 | Introduction 26 | 27 | Libxfce4ui is used to share commonly used Xfce widgets amoung the Xfce applications. 28 | 29 | 30 | 31 | 32 | Xfce Fundamentals 33 | 34 | 35 | 36 | 37 | 38 | 39 | Xfce UI Extensions 40 | 41 | 42 | 43 | 44 | 45 | 46 | Xfce UI Widget 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | Xfce Session Management Support 59 | 60 | 61 | 62 | 63 | 64 | Index of all symbols 65 | 66 | 67 | 68 | Index of deprecated symbols 69 | 70 | 71 | 72 | Index of new symbols in 4.22 73 | 74 | 75 | 76 | 77 | Index of new symbols in 4.20 78 | 79 | 80 | 81 | Index of new symbols in 4.18 82 | 83 | 84 | 85 | 86 | 87 | Index of new symbols in 4.16 88 | 89 | 90 | 91 | Index of new symbols in 4.14 92 | 93 | 94 | 95 | Index of new symbols in 4.12 96 | 97 | 98 | 99 | Index of new symbols in 4.10 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 110 | -------------------------------------------------------------------------------- /docs/reference/meson.build: -------------------------------------------------------------------------------- 1 | if get_option('gtk-doc') 2 | libxfce4ui_doc_name = 'libxfce4ui' 3 | 4 | conf_data = configuration_data() 5 | conf_data.set_quoted('PACKAGE_NAME', libxfce4ui_doc_name) 6 | conf_data.set_quoted('PACKAGE_VERSION', meson.project_version()) 7 | conf_data.set_quoted('PACKAGE_STRING', '@0@-@1@'.format(libxfce4ui_doc_name, meson.project_version())) 8 | 9 | configure_file( 10 | input: 'gtkdocentities.ent.in', 11 | output: 'gtkdocentities.ent', 12 | configuration: conf_data, 13 | ) 14 | 15 | ignored_headers = [ 16 | 'libxfce4ui-visibility.h', 17 | 'xfce-icon-chooser-model.h', 18 | 'xfce-thumbnail-preview.h', 19 | 'xfce-thumbnail.h', 20 | ] 21 | if not enable_x11 22 | ignored_headers += [ 23 | 'xfce-clipboard-manager.h', 24 | 'xfce-sm-client.h', 25 | ] 26 | endif 27 | 28 | configure_file( 29 | configuration: configuration_data({ 30 | 'COPYRIGHT_YEAR': copyright_year, 31 | }), 32 | input: 'libxfce4ui-docs.xml.in', 33 | output: 'libxfce4ui-docs.xml', 34 | install: false, 35 | ) 36 | 37 | gnome.gtkdoc( 38 | libxfce4ui_doc_name, 39 | src_dir: [ 40 | 'libxfce4ui', 41 | ], 42 | ignore_headers: ignored_headers, 43 | main_xml: meson.project_build_root() / 'docs' / 'reference' / 'libxfce4ui-docs.xml', 44 | dependencies: [ 45 | libxfce4ui_dep, 46 | ], 47 | gobject_typesfile: 'libxfce4ui.types', 48 | install: true, 49 | check: false, 50 | scan_args: '--rebuild-types', 51 | ) 52 | endif 53 | -------------------------------------------------------------------------------- /glade/Makefile.am: -------------------------------------------------------------------------------- 1 | AM_CPPFLAGS = \ 2 | -I$(top_srcdir) \ 3 | -DG_LOG_DOMAIN=\"libxfce4ui-glade\" \ 4 | $(PLATFORM_CPPFLAGS) 5 | 6 | SUBDIRS = \ 7 | icons 8 | 9 | if HAVE_GLADEUI2 10 | ## 11 | ## Glade module 12 | ## 13 | glademoduledir = \ 14 | $(GLADEUI2_MODULEDIR) 15 | 16 | glademodule_LTLIBRARIES = \ 17 | libxfce4uiglade2.la 18 | 19 | libxfce4uiglade2_la_SOURCES = \ 20 | libxfce4ui-glade.c 21 | 22 | libxfce4uiglade2_la_CFLAGS = \ 23 | $(GLADEUI2_CFLAGS) \ 24 | $(LIBXFCE4UTIL_CFLAGS) \ 25 | $(PLATFORM_CFLAGS) 26 | 27 | libxfce4uiglade2_la_LDFLAGS = \ 28 | -no-undefined \ 29 | -avoid-version \ 30 | -module \ 31 | $(PLATFORM_LDFLAGS) 32 | 33 | libxfce4uiglade2_la_LIBADD = \ 34 | $(top_builddir)/libxfce4ui/libxfce4ui-2.la \ 35 | $(LIBXFCE4UTIL_LIBS) \ 36 | $(GLADEUI2_LIBS) 37 | 38 | ## 39 | ## Glade catalog xml file 40 | ## 41 | gladecatalogdir = \ 42 | $(GLADEUI2_CATALOGDIR) 43 | gladecatalog_DATA = \ 44 | libxfce4ui-2.xml 45 | endif 46 | 47 | EXTRA_DIST = \ 48 | libxfce4ui-2.xml \ 49 | meson.build \ 50 | $(NULL) 51 | 52 | # vi:set ts=8 sw=8 noet ai nocindent syntax=automake: 53 | -------------------------------------------------------------------------------- /glade/icons/16x16/Makefile.am: -------------------------------------------------------------------------------- 1 | if HAVE_GLADEUI2 2 | iconsdir = $(GLADEUI2_PIXMAPDIR)/hicolor/16x16/actions 3 | icons_DATA = widget-libxfce4ui-xfce-titled-dialog.png 4 | endif 5 | 6 | EXTRA_DIST = widget-libxfce4ui-xfce-titled-dialog.png 7 | 8 | # vi:set ts=8 sw=8 noet ai nocindent syntax=automake: 9 | -------------------------------------------------------------------------------- /glade/icons/16x16/widget-libxfce4ui-xfce-titled-dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/libxfce4ui/804cff2976bf21f3f9ca6383cba4c02dec915b75/glade/icons/16x16/widget-libxfce4ui-xfce-titled-dialog.png -------------------------------------------------------------------------------- /glade/icons/22x22/Makefile.am: -------------------------------------------------------------------------------- 1 | if HAVE_GLADEUI2 2 | iconsdir = $(GLADEUI2_PIXMAPDIR)/hicolor/22x22/actions 3 | icons_DATA = widget-libxfce4ui-xfce-titled-dialog.png 4 | endif 5 | 6 | EXTRA_DIST = widget-libxfce4ui-xfce-titled-dialog.png 7 | 8 | # vi:set ts=8 sw=8 noet ai nocindent syntax=automake: 9 | -------------------------------------------------------------------------------- /glade/icons/22x22/widget-libxfce4ui-xfce-titled-dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/libxfce4ui/804cff2976bf21f3f9ca6383cba4c02dec915b75/glade/icons/22x22/widget-libxfce4ui-xfce-titled-dialog.png -------------------------------------------------------------------------------- /glade/icons/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = \ 2 | 16x16 \ 3 | 22x22 4 | 5 | # vi:set ts=8 sw=8 noet ai nocindent syntax=automake: 6 | -------------------------------------------------------------------------------- /glade/libxfce4ui-2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | glade_xfce_titled_dialog_post_create 6 | glade_xfce_titled_dialog_get_internal_child 7 | glade_xfce_titled_dialog_get_children 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /glade/libxfce4ui-glade.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008 The Xfce Development Team 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | * MA 02110-1301 USA 18 | */ 19 | 20 | #ifdef HAVE_CONFIG_H 21 | #include "config.h" 22 | #endif 23 | 24 | #ifdef HAVE_STRING_H 25 | #include 26 | #endif 27 | 28 | /* else glade is not working */ 29 | #ifdef SEAL_ENABLE 30 | typedef struct gpointer GtkCombo; 31 | #endif 32 | 33 | #include 34 | #include 35 | 36 | #include "libxfce4ui/libxfce4ui.h" 37 | 38 | 39 | 40 | void 41 | glade_xfce_titled_dialog_post_create (GladeWidgetAdaptor *adaptor, 42 | GObject *object, 43 | GladeCreateReason reason); 44 | GtkWidget * 45 | glade_xfce_titled_dialog_get_internal_child (GladeWidgetAdaptor *adaptor, 46 | GtkDialog *dialog, 47 | const gchar *name); 48 | GList * 49 | glade_xfce_titled_dialog_get_children (GladeWidgetAdaptor *adaptor, 50 | GtkDialog *dialog); 51 | 52 | 53 | 54 | void 55 | glade_xfce_titled_dialog_post_create (GladeWidgetAdaptor *adaptor, 56 | GObject *object, 57 | GladeCreateReason reason) 58 | { 59 | GtkDialog *dialog = GTK_DIALOG (object); 60 | GladeWidget *widget, *vbox, *action_area; 61 | 62 | g_return_if_fail (XFCE_IS_TITLED_DIALOG (dialog)); 63 | 64 | widget = glade_widget_get_from_gobject (GTK_WIDGET (dialog)); 65 | if (G_UNLIKELY (widget == NULL)) 66 | return; 67 | 68 | if (XFCE_IS_TITLED_DIALOG (dialog)) 69 | { 70 | /* create the dialog vbox */ 71 | vbox = glade_widget_adaptor_create_internal (widget, 72 | G_OBJECT (gtk_dialog_get_content_area (dialog)), 73 | "vbox", "dialog", FALSE, reason); 74 | glade_widget_remove_property (vbox, "border-width"); 75 | 76 | /* create the action area */ 77 | action_area = glade_widget_adaptor_create_internal (vbox, 78 | G_OBJECT (xfce_gtk_dialog_get_action_area (dialog)), 79 | "action_area", "dialog", FALSE, reason); 80 | glade_widget_remove_property (action_area, "border-width"); 81 | glade_widget_remove_property (action_area, "spacing"); 82 | 83 | /* set properties on initial creation */ 84 | if (reason == GLADE_CREATE_USER) 85 | { 86 | glade_widget_property_set (vbox, "spacing", 2); 87 | glade_widget_property_set (vbox, "size", 2); 88 | 89 | glade_widget_property_set (action_area, "size", 2); 90 | glade_widget_property_set (action_area, "layout-style", GTK_BUTTONBOX_END); 91 | } 92 | } 93 | } 94 | 95 | 96 | 97 | GtkWidget * 98 | glade_xfce_titled_dialog_get_internal_child (GladeWidgetAdaptor *adaptor, 99 | GtkDialog *dialog, 100 | const gchar *name) 101 | { 102 | GtkWidget *child = NULL; 103 | 104 | g_return_val_if_fail (XFCE_IS_TITLED_DIALOG (dialog), NULL); 105 | 106 | if (strcmp ("vbox", name) == 0) 107 | child = gtk_dialog_get_content_area (dialog); 108 | else if (strcmp ("action_area", name) == 0) 109 | { 110 | child = xfce_gtk_dialog_get_action_area (dialog); 111 | } 112 | 113 | return child; 114 | } 115 | 116 | 117 | 118 | GList * 119 | glade_xfce_titled_dialog_get_children (GladeWidgetAdaptor *adaptor, 120 | GtkDialog *dialog) 121 | { 122 | g_return_val_if_fail (XFCE_IS_TITLED_DIALOG (dialog), NULL); 123 | 124 | return g_list_prepend (NULL, gtk_dialog_get_content_area (dialog)); 125 | } 126 | -------------------------------------------------------------------------------- /glade/meson.build: -------------------------------------------------------------------------------- 1 | if glade.found() 2 | shared_module( 3 | 'xfce4uiglade2', 4 | 'libxfce4ui-glade.c', 5 | sources: libxfce4ui_h, 6 | gnu_symbol_visibility: 'hidden', 7 | c_args: [ 8 | '-DG_LOG_DOMAIN="@0@"'.format('libxfce4ui-glade'), 9 | ], 10 | include_directories: [ 11 | include_directories('..'), 12 | ], 13 | dependencies: [ 14 | glade, 15 | libxfce4util, 16 | ], 17 | link_with: [ 18 | libxfce4ui, 19 | ], 20 | install: true, 21 | install_dir: glade_moduledir, 22 | ) 23 | 24 | install_data('libxfce4ui-2.xml', install_dir: glade_catalogdir) 25 | 26 | sizes = [16, 22] 27 | foreach size : sizes 28 | install_data( 29 | 'icons' / '@0@x@0@'.format(size) / 'widget-libxfce4ui-xfce-titled-dialog.png', 30 | install_dir: glade_pixmapdir / 'hicolor' / '@0@x@0@'.format(size) / 'actions' 31 | ) 32 | endforeach 33 | endif 34 | -------------------------------------------------------------------------------- /icons/128x128/Makefile.am: -------------------------------------------------------------------------------- 1 | iconsdir = $(datadir)/icons/hicolor/128x128/apps 2 | icons_DATA = \ 3 | org.xfce.about.png \ 4 | xfce4-logo.png 5 | 6 | EXTRA_DIST = $(icons_DATA) 7 | -------------------------------------------------------------------------------- /icons/128x128/org.xfce.about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/libxfce4ui/804cff2976bf21f3f9ca6383cba4c02dec915b75/icons/128x128/org.xfce.about.png -------------------------------------------------------------------------------- /icons/128x128/xfce4-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/libxfce4ui/804cff2976bf21f3f9ca6383cba4c02dec915b75/icons/128x128/xfce4-logo.png -------------------------------------------------------------------------------- /icons/16x16/Makefile.am: -------------------------------------------------------------------------------- 1 | iconsdir = $(datadir)/icons/hicolor/16x16/apps 2 | icons_DATA = \ 3 | org.xfce.about.png \ 4 | xfce4-logo.png 5 | 6 | EXTRA_DIST = $(icons_DATA) 7 | -------------------------------------------------------------------------------- /icons/16x16/org.xfce.about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/libxfce4ui/804cff2976bf21f3f9ca6383cba4c02dec915b75/icons/16x16/org.xfce.about.png -------------------------------------------------------------------------------- /icons/16x16/org.xfce.about.svg: -------------------------------------------------------------------------------- 1 | 2 | 18 | 39 | 43 | 44 | Adwaita Icon Template 46 | 48 | 50 | 54 | 58 | 62 | 66 | 70 | 74 | 75 | 77 | 81 | 85 | 89 | 93 | 97 | 101 | 102 | 103 | 105 | 106 | 108 | image/svg+xml 109 | 111 | 112 | 113 | GNOME Design Team 114 | 115 | 116 | 117 | 119 | Adwaita Icon Template 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 147 | 149 | 151 | 153 | 155 | 157 | 159 | 160 | 161 | 162 | 167 | 168 | -------------------------------------------------------------------------------- /icons/16x16/xfce4-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/libxfce4ui/804cff2976bf21f3f9ca6383cba4c02dec915b75/icons/16x16/xfce4-logo.png -------------------------------------------------------------------------------- /icons/48x48/Makefile.am: -------------------------------------------------------------------------------- 1 | iconsdir = $(datadir)/icons/hicolor/48x48/apps 2 | icons_DATA = \ 3 | org.xfce.about.png \ 4 | xfce4-logo.png 5 | 6 | EXTRA_DIST = $(icons_DATA) 7 | -------------------------------------------------------------------------------- /icons/48x48/org.xfce.about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/libxfce4ui/804cff2976bf21f3f9ca6383cba4c02dec915b75/icons/48x48/org.xfce.about.png -------------------------------------------------------------------------------- /icons/48x48/xfce4-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/libxfce4ui/804cff2976bf21f3f9ca6383cba4c02dec915b75/icons/48x48/xfce4-logo.png -------------------------------------------------------------------------------- /icons/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS = \ 2 | 16x16 \ 3 | 48x48 \ 4 | 128x128 \ 5 | pixmaps \ 6 | scalable \ 7 | $(NULL) 8 | 9 | gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor 10 | 11 | install-data-hook: 12 | @-if test -z "$(DESTDIR)"; then \ 13 | echo "Updating Gtk icon cache."; \ 14 | $(gtk_update_icon_cache); \ 15 | else \ 16 | echo "*** Icon cache not updated. Remember to run:"; \ 17 | echo "***"; \ 18 | echo "*** $(gtk_update_icon_cache)"; \ 19 | echo "***"; \ 20 | fi 21 | 22 | EXTRA_DIST = \ 23 | meson.build \ 24 | $(NULL) 25 | 26 | # vi:set ts=8 sw=8 noet ai nocindent: 27 | -------------------------------------------------------------------------------- /icons/meson.build: -------------------------------------------------------------------------------- 1 | sizes = [16, 48, 128] 2 | names = [ 3 | 'org.xfce.about', 4 | 'xfce4-logo', 5 | ] 6 | 7 | foreach name : names 8 | foreach size : sizes 9 | install_data( 10 | '@0@x@0@'.format(size) / '@0@.png'.format(name), 11 | install_dir: get_option('prefix') / get_option('datadir') / 'icons' / 'hicolor' / '@0@x@0@'.format(size) / 'apps', 12 | ) 13 | endforeach 14 | 15 | install_data( 16 | 'scalable' / '@0@.svg'.format(name), 17 | install_dir: get_option('prefix') / get_option('datadir') / 'icons' / 'hicolor' / 'scalable' / 'apps', 18 | ) 19 | endforeach 20 | 21 | install_data( 22 | 'pixmaps' / 'xfce-thumbnail-frame.png', 23 | install_dir: get_option('prefix') / get_option('datadir') / 'pixmaps' / 'libxfce4ui', 24 | ) 25 | -------------------------------------------------------------------------------- /icons/pixmaps/Makefile.am: -------------------------------------------------------------------------------- 1 | pixmapsdir = $(datadir)/pixmaps/libxfce4ui 2 | pixmaps_DATA = \ 3 | xfce-thumbnail-frame.png 4 | 5 | EXTRA_DIST = \ 6 | $(pixmaps_DATA) 7 | -------------------------------------------------------------------------------- /icons/pixmaps/xfce-thumbnail-frame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/libxfce4ui/804cff2976bf21f3f9ca6383cba4c02dec915b75/icons/pixmaps/xfce-thumbnail-frame.png -------------------------------------------------------------------------------- /icons/scalable/Makefile.am: -------------------------------------------------------------------------------- 1 | iconsdir = $(datadir)/icons/hicolor/scalable/apps 2 | icons_DATA = \ 3 | org.xfce.about.svg \ 4 | xfce4-logo.svg 5 | 6 | EXTRA_DIST = $(icons_DATA) 7 | -------------------------------------------------------------------------------- /libxfce4kbd-private/.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | BasedOnStyle: InheritParentConfig 3 | 4 | IncludeCategories: 5 | - Regex: '"config\.h"' 6 | Priority: -3 7 | CaseSensitive: true 8 | - Regex: '<.*>' 9 | Priority: -2 10 | CaseSensitive: true 11 | - Regex: '".*/.*"' 12 | Priority: -1 13 | CaseSensitive: true 14 | - Regex: '"libxfce4kbd-private-visibility\.h"' 15 | Priority: 0 16 | SortPriority: 2 17 | CaseSensitive: true 18 | - Regex: '"[^/]*"' 19 | Priority: 0 20 | SortPriority: 1 21 | CaseSensitive: true 22 | ... 23 | -------------------------------------------------------------------------------- /libxfce4kbd-private/Makefile.am: -------------------------------------------------------------------------------- 1 | # vi:set ts=8 sw=8 noet ai nocindent syntax=automake: 2 | 3 | if ENABLE_KEYBOARD_LIBRARY 4 | 5 | AM_CPPFLAGS = \ 6 | -I$(top_builddir) \ 7 | -I$(top_srcdir) \ 8 | -DDATADIR=\"$(datadir)\" \ 9 | -DG_LOG_DOMAIN=\"libxfce4kbd-private\" \ 10 | -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \ 11 | -DPREFIX=\"$(prefix)\" \ 12 | $(PLATFORM_CPPFLAGS) 13 | 14 | libxfce4kbd_headers = \ 15 | xfce-shortcuts-provider.h \ 16 | xfce-shortcut-dialog.h \ 17 | xfce-shortcuts-editor.h \ 18 | xfce-shortcuts-editor-dialog.h \ 19 | xfce-shortcuts.h \ 20 | xfce-shortcuts-xfwm4.h 21 | 22 | libxfce4kbd_built_sources = \ 23 | xfce-shortcuts-marshal.c \ 24 | xfce-shortcuts-marshal.h 25 | 26 | libxfce4kbd_sources = \ 27 | $(libxfce4kbd_headers) \ 28 | $(libxfce4kbd_built_sources) \ 29 | xfce-shortcuts-provider.c \ 30 | xfce-shortcut-dialog.c \ 31 | xfce-shortcuts-editor.c \ 32 | xfce-shortcuts-editor-dialog.c \ 33 | xfce-shortcuts.c \ 34 | xfce-shortcuts-xfwm4.c 35 | 36 | libxfce4kbd_private_3_la_CFLAGS = \ 37 | $(PLATFORM_CFLAGS) \ 38 | $(GLIB_CFLAGS) \ 39 | $(GTK3_CFLAGS) \ 40 | $(LIBXFCE4UTIL_CFLAGS) \ 41 | $(XFCONF_CFLAGS) \ 42 | $(PLATFORM_CFLAGS) 43 | 44 | libxfce4kbd_private_3_la_LDFLAGS = \ 45 | -export-dynamic \ 46 | -version-info $(LIBXFCE4KBD_PRIVATE_VERINFO) \ 47 | -export-symbols-regex "^[^_].*" \ 48 | -no-undefined \ 49 | $(PLATFORM_LDFLAGS) 50 | 51 | libxfce4kbd_private_3_la_LIBADD = \ 52 | $(top_builddir)/libxfce4ui/libxfce4ui-2.la \ 53 | $(GLIB_LIBS) \ 54 | $(GTK3_LIBS) \ 55 | $(LIBXFCE4UTIL_LIBS) \ 56 | $(XFCONF_LIBS) 57 | 58 | if ENABLE_X11 59 | libxfce4kbd_headers += \ 60 | xfce-shortcuts-grabber.h 61 | 62 | libxfce4kbd_sources += \ 63 | xfce-shortcuts-grabber.h \ 64 | xfce-shortcuts-grabber.c 65 | 66 | libxfce4kbd_private_3_la_CFLAGS += \ 67 | $(LIBX11_CFLAGS) 68 | 69 | libxfce4kbd_private_3_la_LIBADD += \ 70 | $(LIBX11_LIBS) 71 | endif 72 | 73 | lib_LTLIBRARIES = libxfce4kbd-private-3.la 74 | 75 | libxfce4kbd3_private_includedir = \ 76 | $(includedir)/xfce4/libxfce4kbd-private-3/libxfce4kbd-private 77 | 78 | libxfce4kbd3_private_include_HEADERS = \ 79 | $(libxfce4kbd_headers) 80 | 81 | libxfce4kbd_private_3_la_SOURCES = \ 82 | $(libxfce4kbd_sources) 83 | 84 | settingsdir = $(sysconfdir)/xdg/xfce4/xfconf/xfce-perchannel-xml 85 | settings_DATA = xfce4-keyboard-shortcuts.xml 86 | 87 | pkgconfigdir = $(libdir)/pkgconfig 88 | pkgconfig_DATA = libxfce4kbd-private-3.pc 89 | 90 | if ENABLE_X11 91 | symbols_sed_script = /@BEGIN_X11_SYMBOLS@/d; /@END_X11_SYMBOLS@/d; 92 | else 93 | symbols_sed_script = /@BEGIN_X11_SYMBOLS@/,/@END_X11_SYMBOLS@/d; 94 | endif 95 | if ENABLE_WAYLAND 96 | symbols_sed_script += /@BEGIN_WAYLAND_SYMBOLS@/d; /@END_WAYLAND_SYMBOLS@/d 97 | else 98 | symbols_sed_script += /@BEGIN_WAYLAND_SYMBOLS@/,/@END_WAYLAND_SYMBOLS@/d 99 | endif 100 | 101 | libxfce4kbd-private.symbols: libxfce4kbd-private.symbols.in 102 | $(AM_V_GEN) $(SED) "$(symbols_sed_script)" < $< > $@ 103 | 104 | libxfce4kbd-private-visibility.h: libxfce4kbd-private.symbols Makefile 105 | $(AM_V_GEN) $(XDT_GEN_VISIBILITY) --kind=header $< $@ 106 | 107 | libxfce4kbd-private-visibility.c: libxfce4kbd-private.symbols Makefile 108 | $(AM_V_GEN) $(XDT_GEN_VISIBILITY) --kind=source $< $@ 109 | 110 | DISTCLEANFILES = \ 111 | libxfce4kbd-private-visibility.c \ 112 | libxfce4kbd-private-visibility.h \ 113 | libxfce4kbd-private.symbols \ 114 | $(NULL) 115 | 116 | BUILT_SOURCES = \ 117 | libxfce4kbd-private-visibility.c \ 118 | libxfce4kbd-private-visibility.h \ 119 | libxfce4kbd-private.symbols \ 120 | $(NULL) 121 | 122 | 123 | if MAINTAINER_MODE 124 | xfce-shortcuts-marshal.h: xfce-shortcuts-marshal.list Makefile 125 | $(AM_V_GEN) glib-genmarshal --prefix=_xfce_shortcuts_marshal --internal --header $< > $@ 126 | 127 | xfce-shortcuts-marshal.c: xfce-shortcuts-marshal.list Makefile xfce-shortcuts-marshal.h 128 | $(AM_V_GEN) echo "#include \"xfce-shortcuts-marshal.h\"" > $@ \ 129 | && glib-genmarshal --prefix=_xfce_shortcuts_marshal --body $< >> $@ 130 | 131 | DISTCLEANFILES += \ 132 | $(libxfce4kbd_built_sources) 133 | 134 | BUILT_SOURCES += \ 135 | $(libxfce4kbd_built_sources) 136 | endif 137 | 138 | EXTRA_DIST = \ 139 | $(settings_DATA) \ 140 | libxfce4kbd-private.symbols.in \ 141 | xfce-shortcuts-marshal.list \ 142 | meson.build \ 143 | $(NULL) 144 | 145 | # required for gtk-doc 146 | dist-hook: all 147 | 148 | endif # ENABLE_KEYBOARD_LIBRARY 149 | -------------------------------------------------------------------------------- /libxfce4kbd-private/libxfce4kbd-private-3.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: libxfce4kbd-private 7 | Description: Private Xfce library for shared code between xfwm4 and xfce4-settings 8 | Requires: gdk-3.0 gtk+-3.0 libxfce4util-1.0 libxfconf-0 libxfce4ui-2 9 | Version: @PACKAGE_VERSION@ 10 | Libs: -L${libdir} -lxfce4kbd-private-3 11 | Cflags: -I${includedir}/xfce4/libxfce4kbd-private-3 12 | -------------------------------------------------------------------------------- /libxfce4kbd-private/libxfce4kbd-private.symbols.in: -------------------------------------------------------------------------------- 1 | # file:xfce-shortcut-dialog 2 | xfce_shortcut_dialog_get_type attr:G_GNUC_CONST 3 | xfce_shortcut_dialog_new attr:G_GNUC_MALLOC 4 | xfce_shortcut_dialog_run 5 | xfce_shortcut_dialog_get_shortcut 6 | xfce_shortcut_dialog_get_action 7 | xfce_shortcut_dialog_get_action_name 8 | 9 | # file:xfce-shortcuts-editor-dialog 10 | xfce_shortcuts_editor_dialog_get_type attr:G_GNUC_CONST 11 | xfce_shortcuts_editor_dialog_new attr:G_GNUC_MALLOC 12 | xfce_shortcuts_editor_dialog_new_with_parent attr:G_GNUC_MALLOC 13 | 14 | # file:xfce-shortcuts-editor 15 | xfce_shortcuts_editor_get_type attr:G_GNUC_CONST 16 | xfce_shortcuts_editor_new attr:G_GNUC_MALLOC 17 | xfce_shortcuts_editor_new_array attr:G_GNUC_MALLOC 18 | xfce_shortcuts_editor_new_variadic attr:G_GNUC_MALLOC 19 | xfce_shortcuts_editor_add_overlap_group 20 | xfce_shortcuts_editor_add_overlap_group_array 21 | 22 | @BEGIN_X11_SYMBOLS@ 23 | # file:xfce-shortcuts-grabber 24 | xfce_shortcuts_grabber_get_type attr:G_GNUC_CONST 25 | xfce_shortcuts_grabber_new attr:G_GNUC_MALLOC 26 | xfce_shortcuts_grabber_add 27 | xfce_shortcuts_grabber_remove 28 | @END_X11_SYMBOLS@ 29 | 30 | # file:xfce-shortcuts-provider 31 | xfce_shortcuts_provider_get_type attr:G_GNUC_CONST 32 | xfce_shortcuts_provider_new attr:G_GNUC_MALLOC 33 | xfce_shortcuts_provider_get_providers attr:G_GNUC_MALLOC 34 | xfce_shortcuts_provider_free_providers 35 | xfce_shortcuts_provider_get_name 36 | xfce_shortcuts_provider_is_custom 37 | xfce_shortcuts_provider_reset_to_defaults 38 | xfce_shortcuts_provider_clone_defaults 39 | xfce_shortcuts_provider_get_shortcuts 40 | xfce_shortcuts_provider_get_shortcut 41 | xfce_shortcuts_provider_has_shortcut 42 | xfce_shortcuts_provider_set_shortcut 43 | xfce_shortcuts_provider_reset_shortcut 44 | xfce_shortcuts_free 45 | xfce_shortcut_free 46 | 47 | # file:xfce-shortcuts-xfwm4 48 | xfce_shortcuts_xfwm4_get_feature_name 49 | xfce_shortcuts_xfwm4_get_feature_list 50 | 51 | # file:xfce-shortcuts 52 | xfce_shortcut_conflict_dialog 53 | -------------------------------------------------------------------------------- /libxfce4kbd-private/meson.build: -------------------------------------------------------------------------------- 1 | if get_option('keyboard-library') 2 | libxfce4kbd_libname = 'libxfce4kbd-private' 3 | libxfce4kbd_pkgname = '@0@-@1@'.format(libxfce4kbd_libname, libxfce4kbd_version_api) 4 | 5 | libxfce4kbd_install_subdir = 'xfce4' / libxfce4kbd_pkgname / libxfce4kbd_libname 6 | libxfce4kbd_install_dir = get_option('prefix') / get_option('includedir') / libxfce4kbd_install_subdir 7 | 8 | libxfce4kbd_headers = [ 9 | 'xfce-shortcut-dialog.h', 10 | 'xfce-shortcuts-editor-dialog.h', 11 | 'xfce-shortcuts-editor.h', 12 | 'xfce-shortcuts-provider.h', 13 | 'xfce-shortcuts-xfwm4.h', 14 | 'xfce-shortcuts.h', 15 | ] 16 | 17 | libxfce4kbd_sources = [ 18 | 'xfce-shortcut-dialog.c', 19 | 'xfce-shortcuts-editor-dialog.c', 20 | 'xfce-shortcuts-editor.c', 21 | 'xfce-shortcuts-provider.c', 22 | 'xfce-shortcuts-xfwm4.c', 23 | 'xfce-shortcuts.c', 24 | ] 25 | 26 | if enable_x11 27 | libxfce4kbd_headers += [ 28 | 'xfce-shortcuts-grabber.h', 29 | ] 30 | 31 | libxfce4kbd_sources += [ 32 | 'xfce-shortcuts-grabber.c', 33 | ] 34 | endif 35 | 36 | libxfce4kbd_sources += gnome.genmarshal( 37 | 'xfce-shortcuts-marshal', 38 | sources: 'xfce-shortcuts-marshal.list', 39 | prefix: '_xfce_shortcuts_marshal', 40 | internal: true, 41 | install_header: false, 42 | ) 43 | 44 | if enable_x11 45 | symbols_sed_script = '/@BEGIN_X11_SYMBOLS@/d; /@END_X11_SYMBOLS@/d;' 46 | else 47 | symbols_sed_script = '/@BEGIN_X11_SYMBOLS@/,/@END_X11_SYMBOLS@/d;' 48 | endif 49 | if enable_wayland 50 | symbols_sed_script += '/@BEGIN_WAYLAND_SYMBOLS@/d; /@END_WAYLAND_SYMBOLS@/d' 51 | else 52 | symbols_sed_script += '/@BEGIN_WAYLAND_SYMBOLS@/,/@END_WAYLAND_SYMBOLS@/d' 53 | endif 54 | symbols = configure_file( 55 | input: 'libxfce4kbd-private.symbols.in', 56 | output: 'libxfce4kbd-private.symbols', 57 | command: [sed, symbols_sed_script, '@INPUT@'], 58 | capture: true, 59 | ) 60 | 61 | libxfce4kbd_sources += configure_file( 62 | input: symbols, 63 | output: 'libxfce4kbd-private-visibility.h', 64 | command: [xdt_gen_visibility, '--kind=header', '@INPUT@', '@OUTPUT@'], 65 | ) 66 | libxfce4kbd_sources += configure_file( 67 | input: symbols, 68 | output: 'libxfce4kbd-private-visibility.c', 69 | command: [xdt_gen_visibility, '--kind=source', '@INPUT@', '@OUTPUT@'], 70 | ) 71 | 72 | libxfce4kbd_deps = [ 73 | glib, 74 | gtk, 75 | libxfce4util, 76 | xfconf, 77 | x11_deps, 78 | ] 79 | if need_libintl 80 | libxfce4kbd_deps += libintl 81 | endif 82 | 83 | libxfce4kbd_so_version = '0' 84 | libxfce4kbd_version = '@0@.0.0'.format(libxfce4kbd_so_version) 85 | 86 | libxfce4kbd = library( 87 | libxfce4kbd_pkgname.substring(3), 88 | libxfce4kbd_sources, 89 | sources: libxfce4ui_h, 90 | version: libxfce4kbd_version, 91 | soversion: libxfce4kbd_so_version, 92 | c_args: [ 93 | '-DG_LOG_DOMAIN="@0@"'.format(libxfce4kbd_libname), 94 | ], 95 | include_directories: [ 96 | include_directories('..'), 97 | ], 98 | gnu_symbol_visibility: gnu_symbol_visibility, 99 | dependencies: libxfce4kbd_deps, 100 | link_with: [ 101 | libxfce4ui, 102 | ], 103 | install: true, 104 | ) 105 | 106 | install_headers( 107 | libxfce4kbd_headers, 108 | subdir: libxfce4kbd_install_subdir, 109 | ) 110 | 111 | pkgconfig.generate( 112 | libraries: [ 113 | libxfce4kbd, 114 | ], 115 | version: meson.project_version(), 116 | name: libxfce4kbd_libname, 117 | filebase: libxfce4kbd_pkgname, 118 | description: 'Private Xfce library for shared code between xfwm4 and xfce4-settings', 119 | subdirs: [ 120 | 'xfce4' / libxfce4kbd_pkgname, 121 | ], 122 | install_dir: get_option('prefix') / get_option('libdir') / 'pkgconfig', 123 | ) 124 | 125 | install_data( 126 | 'xfce4-keyboard-shortcuts.xml', 127 | install_dir: get_option('prefix') / get_option('sysconfdir') / 'xdg' / 'xfce4' / 'xfconf' / 'xfce-perchannel-xml' 128 | ) 129 | endif 130 | -------------------------------------------------------------------------------- /libxfce4kbd-private/xfce-shortcut-dialog.h: -------------------------------------------------------------------------------- 1 | /* vi:set expandtab sw=2 sts=2: */ 2 | /* 3 | * Copyright (c) 2008 Jannis Pohlmann 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 7 | * License as published by the Free Software Foundation; either 8 | * version 2 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 | * 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, write to the 17 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #ifndef __XFCE_SHORTCUT_DIALOG_H__ 22 | #define __XFCE_SHORTCUT_DIALOG_H__ 23 | 24 | #include 25 | 26 | G_BEGIN_DECLS 27 | 28 | typedef struct _XfceShortcutDialogClass XfceShortcutDialogClass; 29 | typedef struct _XfceShortcutDialog XfceShortcutDialog; 30 | 31 | #define XFCE_TYPE_SHORTCUT_DIALOG (xfce_shortcut_dialog_get_type ()) 32 | #define XFCE_SHORTCUT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_SHORTCUT_DIALOG, XfceShortcutDialog)) 33 | #define XFCE_SHORTCUT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_SHORTCUT_DIALOG, XfceShortcutDialogClass)) 34 | #define XFCE_IS_SHORTCUT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_SHORTCUT_DIALOG)) 35 | #define XFCE_IS_SHORTCUT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_SHORTCUT_DIALOG)) 36 | #define XFCE_SHORTCUT_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_SHORTCUT_DIALOG, XfceShortcutDialogClass)) 37 | 38 | GType 39 | xfce_shortcut_dialog_get_type (void) G_GNUC_CONST; 40 | 41 | GtkWidget * 42 | xfce_shortcut_dialog_new (const gchar *provider, 43 | const gchar *action_name, 44 | const gchar *action) G_GNUC_MALLOC; 45 | gint 46 | xfce_shortcut_dialog_run (XfceShortcutDialog *dialog, 47 | GtkWidget *parent); 48 | const gchar * 49 | xfce_shortcut_dialog_get_shortcut (XfceShortcutDialog *dialog); 50 | const gchar * 51 | xfce_shortcut_dialog_get_action (XfceShortcutDialog *action); 52 | const gchar * 53 | xfce_shortcut_dialog_get_action_name (XfceShortcutDialog *action); 54 | 55 | G_END_DECLS 56 | 57 | #endif /* !__XFCE_SHORTCUT_DIALOG_H__ */ 58 | -------------------------------------------------------------------------------- /libxfce4kbd-private/xfce-shortcuts-editor-dialog.c: -------------------------------------------------------------------------------- 1 | /* vi:set expandtab sw=2 sts=2: */ 2 | /* 3 | * Copyright (c) 2021 Sergios - Anestis Kefalidis 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 7 | * License as published by the Free Software Foundation; either 8 | * version 2 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 | * 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, write to the 17 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #ifdef HAVE_CONFIG_H 22 | #include "config.h" 23 | #endif 24 | 25 | #include 26 | #include 27 | 28 | #include "libxfce4ui/libxfce4ui.h" 29 | 30 | #include "xfce-shortcut-dialog.h" 31 | #include "xfce-shortcuts-editor-dialog.h" 32 | #include "xfce-shortcuts-editor.h" 33 | #include "xfce-shortcuts.h" 34 | #include "libxfce4kbd-private-visibility.h" 35 | 36 | 37 | 38 | struct _XfceShortcutsEditorDialogClass 39 | { 40 | XfceTitledDialogClass __parent__; 41 | }; 42 | 43 | struct _XfceShortcutsEditorDialog 44 | { 45 | XfceTitledDialog __parent__; 46 | }; 47 | 48 | 49 | 50 | G_DEFINE_TYPE (XfceShortcutsEditorDialog, xfce_shortcuts_editor_dialog, XFCE_TYPE_TITLED_DIALOG) 51 | 52 | 53 | 54 | static void 55 | xfce_shortcuts_editor_dialog_class_init (XfceShortcutsEditorDialogClass *klass) 56 | { 57 | /* Make sure to use the translations from libxfce4ui */ 58 | bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR); 59 | #ifdef HAVE_BIND_TEXTDOMAIN_CODESET 60 | bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); 61 | #endif 62 | } 63 | 64 | 65 | 66 | static void 67 | xfce_shortcuts_editor_dialog_init (XfceShortcutsEditorDialog *dialog) 68 | { 69 | ; 70 | } 71 | 72 | 73 | 74 | /** 75 | * xfce_shortcuts_editor_dialog_new: 76 | * @argument_count : #int, the number of arguments, including this one. 77 | * 78 | * Returns a dialog that includes a XfceShortcutsEditor. 79 | * See xfce_shortcuts_editor_new_variadic for the expected types of the variable argument list. 80 | * 81 | * Since: 4.17.2 82 | **/ 83 | GtkWidget * 84 | xfce_shortcuts_editor_dialog_new (int argument_count, ...) 85 | { 86 | XfceShortcutsEditorDialog *dialog; 87 | va_list argument_list; 88 | 89 | va_start (argument_list, argument_count); 90 | 91 | dialog = g_object_new (XFCE_TYPE_SHORTCUTS_EDITOR_DIALOG, NULL); 92 | gtk_window_set_title (GTK_WINDOW (dialog), _("Shortcuts Editor")); 93 | gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), xfce_shortcuts_editor_new_variadic (argument_count, argument_list), TRUE, TRUE, 0); 94 | 95 | /* set a reasonable default size */ 96 | gtk_window_set_default_size (GTK_WINDOW (dialog), 500, 600); 97 | 98 | gtk_widget_show (GTK_WIDGET (dialog)); 99 | 100 | va_end (argument_list); 101 | 102 | return GTK_WIDGET (dialog); 103 | } 104 | 105 | 106 | 107 | /** 108 | * xfce_shortcuts_editor_dialog_new_with_parent: 109 | * @parent : #GtkWindow, the parent window of the dialog, used in gtk_window_set_transient_for (can be NULL). 110 | * @argument_count : #int, the number of arguments, including this one. 111 | * 112 | * Returns a dialog that includes a XfceShortcutsEditor. 113 | * See xfce_shortcuts_editor_new_variadic for the expected types of the variable argument list. 114 | * 115 | * Since: 4.17.5 116 | **/ 117 | GtkWidget * 118 | xfce_shortcuts_editor_dialog_new_with_parent (GtkWindow *parent, 119 | int argument_count, 120 | ...) 121 | { 122 | XfceShortcutsEditorDialog *dialog; 123 | va_list argument_list; 124 | 125 | va_start (argument_list, argument_count); 126 | 127 | /* create the dialog and its content */ 128 | dialog = g_object_new (XFCE_TYPE_SHORTCUTS_EDITOR_DIALOG, NULL); 129 | gtk_window_set_title (GTK_WINDOW (dialog), _("Shortcuts Editor")); 130 | gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))), xfce_shortcuts_editor_new_variadic (argument_count, argument_list), TRUE, TRUE, 0); 131 | 132 | /* set a reasonable default size */ 133 | gtk_window_set_default_size (GTK_WINDOW (dialog), 500, 600); 134 | 135 | /* center the dialog on top of the parent widget */ 136 | gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (parent)); 137 | 138 | gtk_widget_show (GTK_WIDGET (dialog)); 139 | 140 | va_end (argument_list); 141 | 142 | return GTK_WIDGET (dialog); 143 | } 144 | 145 | #define __XFCE_SHORTCUTS_EDITOR_DIALOG_C__ 146 | #include "libxfce4kbd-private-visibility.c" 147 | -------------------------------------------------------------------------------- /libxfce4kbd-private/xfce-shortcuts-editor-dialog.h: -------------------------------------------------------------------------------- 1 | /* vi:set expandtab sw=2 sts=2: */ 2 | /* 3 | * Copyright (c) 2021 Sergios - Anestis Kefalidis 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 7 | * License as published by the Free Software Foundation; either 8 | * version 2 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 | * 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, write to the 17 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #ifndef __XFCE_SHORTCUTS_EDITOR_DIALOG_H__ 22 | #define __XFCE_SHORTCUTS_EDITOR_DIALOG_H__ 23 | 24 | #include 25 | 26 | G_BEGIN_DECLS 27 | 28 | typedef struct _XfceShortcutsEditorDialogClass XfceShortcutsEditorDialogClass; 29 | typedef struct _XfceShortcutsEditorDialog XfceShortcutsEditorDialog; 30 | 31 | #define XFCE_TYPE_SHORTCUTS_EDITOR_DIALOG (xfce_shortcuts_editor_dialog_get_type ()) 32 | #define XFCE_SHORTCUTS_EDITOR_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_SHORTCUTS_EDITOR_DIALOG, XfceShortcutsEditorDialog)) 33 | #define XFCE_SHORTCUTS_EDITOR_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_SHORTCUTS_EDITOR_DIALOG, XfceShortcutsEditorDialogClass)) 34 | #define XFCE_IS_SHORTCUTS_EDITOR_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_SHORTCUTS_EDITOR_DIALOG)) 35 | #define XFCE_IS_SHORTCUTS_EDITOR_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_SHORTCUTS_EDITOR_DIALOG)) 36 | #define XFCE_SHORTCUTS_EDITOR_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_SHORTCUTS_EDITOR_DIALOG, XfceShortcutsEditorDialogClass)) 37 | 38 | GType 39 | xfce_shortcuts_editor_dialog_get_type (void) G_GNUC_CONST; 40 | 41 | GtkWidget * 42 | xfce_shortcuts_editor_dialog_new (int argument_count, 43 | ...) G_GNUC_MALLOC; 44 | 45 | GtkWidget * 46 | xfce_shortcuts_editor_dialog_new_with_parent (GtkWindow *parent, 47 | int argument_count, 48 | ...) G_GNUC_MALLOC; 49 | 50 | G_END_DECLS 51 | 52 | #endif /* !__XFCE_SHORTCUTS_EDITOR_DIALOG_H__ */ 53 | -------------------------------------------------------------------------------- /libxfce4kbd-private/xfce-shortcuts-editor.h: -------------------------------------------------------------------------------- 1 | /* vi:set expandtab sw=2 sts=2: */ 2 | /* 3 | * Copyright (c) 2021 Sergios - Anestis Kefalidis 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 7 | * License as published by the Free Software Foundation; either 8 | * version 2 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 | * 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, write to the 17 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #ifndef __XFCE_SHORTCUTS_EDITOR_H__ 22 | #define __XFCE_SHORTCUTS_EDITOR_H__ 23 | 24 | #include 25 | #include 26 | 27 | G_BEGIN_DECLS 28 | 29 | typedef struct _XfceShortcutsEditorClass XfceShortcutsEditorClass; 30 | typedef struct _XfceShortcutsEditor XfceShortcutsEditor; 31 | 32 | #define XFCE_TYPE_SHORTCUTS_EDITOR (xfce_shortcuts_editor_get_type ()) 33 | #define XFCE_SHORTCUTS_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_SHORTCUTS_EDITOR, XfceShortcutsEditor)) 34 | #define XFCE_SHORTCUTS_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_SHORTCUTS_EDITOR, XfceShortcutsEditorClass)) 35 | #define XFCE_IS_SHORTCUTS_EDITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_SHORTCUTS_EDITOR)) 36 | #define XFCE_IS_SHORTCUTS_EDITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_SHORTCUTS_EDITOR)) 37 | #define XFCE_SHORTCUTS_EDITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_SHORTCUTS_EDITOR, XfceShortcutsEditorClass)) 38 | 39 | typedef struct 40 | { 41 | gchar *section_name; 42 | XfceGtkActionEntry *entries; 43 | size_t size; 44 | } XfceShortcutsEditorSection; 45 | 46 | GType 47 | xfce_shortcuts_editor_get_type (void) G_GNUC_CONST; 48 | 49 | GtkWidget * 50 | xfce_shortcuts_editor_new (int argument_count, 51 | ...) G_GNUC_MALLOC; 52 | GtkWidget * 53 | xfce_shortcuts_editor_new_array (XfceShortcutsEditorSection *sections, 54 | int n_sections) G_GNUC_MALLOC; 55 | GtkWidget * 56 | xfce_shortcuts_editor_new_variadic (int argument_count, 57 | va_list argument_list) G_GNUC_MALLOC; 58 | 59 | void 60 | xfce_shortcuts_editor_add_overlap_group (XfceShortcutsEditor *editor, 61 | int first_section_index, 62 | ...); 63 | void 64 | xfce_shortcuts_editor_add_overlap_group_array (XfceShortcutsEditor *editor, 65 | size_t *section_indexes, 66 | size_t n_section_indexes); 67 | 68 | G_END_DECLS 69 | 70 | #endif /* !__XFCE_SHORTCUTS_EDITOR_DIALOG_H__ */ 71 | -------------------------------------------------------------------------------- /libxfce4kbd-private/xfce-shortcuts-grabber.h: -------------------------------------------------------------------------------- 1 | /* vi:set expandtab sw=2 sts=2: */ 2 | /* 3 | * Copyright (c) 2008 Jannis Pohlmann 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 7 | * License as published by the Free Software Foundation; either 8 | * version 2 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 | * 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, write to the 17 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #ifndef __XFCE_SHORTCUTS_GRABBER_H__ 22 | #define __XFCE_SHORTCUTS_GRABBER_H__ 23 | 24 | #include 25 | 26 | G_BEGIN_DECLS 27 | 28 | typedef struct _XfceShortcutsGrabberPrivate XfceShortcutsGrabberPrivate; 29 | typedef struct _XfceShortcutsGrabberClass XfceShortcutsGrabberClass; 30 | typedef struct _XfceShortcutsGrabber XfceShortcutsGrabber; 31 | 32 | #define XFCE_TYPE_SHORTCUTS_GRABBER (xfce_shortcuts_grabber_get_type ()) 33 | #define XFCE_SHORTCUTS_GRABBER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_SHORTCUTS_GRABBER, XfceShortcutsGrabber)) 34 | #define XFCE_SHORTCUTS_GRABBER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_SHORTCUTS_GRABBER, XfceShortcutsGrabberClass)) 35 | #define XFCE_IS_SHORTCUTS_GRABBER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_SHORTCUTS_GRABBER)) 36 | #define XFCE_IS_SHORTCUTS_GRABBER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_SHORTCUTS_GRABBER) 37 | #define XFCE_SHORTCUTS_GRABBER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_SHORTCUTS_GRABBER, XfceShortcutsGrabberClass)) 38 | 39 | GType 40 | xfce_shortcuts_grabber_get_type (void) G_GNUC_CONST; 41 | 42 | XfceShortcutsGrabber * 43 | xfce_shortcuts_grabber_new (void) G_GNUC_MALLOC; 44 | void 45 | xfce_shortcuts_grabber_add (XfceShortcutsGrabber *grabber, 46 | const gchar *shortcut); 47 | void 48 | xfce_shortcuts_grabber_remove (XfceShortcutsGrabber *grabber, 49 | const gchar *shortcut); 50 | 51 | 52 | 53 | struct _XfceShortcutsGrabberClass 54 | { 55 | GObjectClass __parent__; 56 | }; 57 | 58 | struct _XfceShortcutsGrabber 59 | { 60 | GObject __parent__; 61 | 62 | XfceShortcutsGrabberPrivate *priv; 63 | }; 64 | 65 | G_END_DECLS 66 | 67 | #endif /* !__XFCE_SHORTCUTS_GRABBER_H__ */ 68 | -------------------------------------------------------------------------------- /libxfce4kbd-private/xfce-shortcuts-marshal.list: -------------------------------------------------------------------------------- 1 | VOID:STRING,INT 2 | -------------------------------------------------------------------------------- /libxfce4kbd-private/xfce-shortcuts-provider.h: -------------------------------------------------------------------------------- 1 | /* vi:set expandtab sw=2 sts=2: */ 2 | /* 3 | * Copyright (c) 2008 Jannis Pohlmann 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 7 | * License as published by the Free Software Foundation; either 8 | * version 2 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 | * 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, write to the 17 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #ifndef __XFCE_SHORTCUTS_PROVIDER_H__ 22 | #define __XFCE_SHORTCUTS_PROVIDER_H__ 23 | 24 | #include 25 | 26 | G_BEGIN_DECLS 27 | 28 | typedef struct _XfceShortcut XfceShortcut; 29 | 30 | typedef struct _XfceShortcutsProviderPrivate XfceShortcutsProviderPrivate; 31 | typedef struct _XfceShortcutsProviderClass XfceShortcutsProviderClass; 32 | typedef struct _XfceShortcutsProvider XfceShortcutsProvider; 33 | 34 | #define XFCE_TYPE_SHORTCUTS_PROVIDER (xfce_shortcuts_provider_get_type ()) 35 | #define XFCE_SHORTCUTS_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_SHORTCUTS_PROVIDER, XfceShortcutsProvider)) 36 | #define XFCE_SHORTCUTS_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_SHORTCUTS_PROVIDER, XfceShortcutsProviderClass)) 37 | #define XFCE_IS_SHORTCUTS_PROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_SHORTCUTS_PROVIDER)) 38 | #define XFCE_IS_SHORTCUTS_PROVIDER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_SHORTCUTS_PROVIDER) 39 | #define XFCE_SHORTCUTS_PROVIDER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_SHORTCUTS_PROVIDER, XfceShortcutsProviderClass)) 40 | 41 | GType 42 | xfce_shortcuts_provider_get_type (void) G_GNUC_CONST; 43 | 44 | XfceShortcutsProvider * 45 | xfce_shortcuts_provider_new (const gchar *name) G_GNUC_MALLOC; 46 | GList * 47 | xfce_shortcuts_provider_get_providers (void) G_GNUC_MALLOC; 48 | void 49 | xfce_shortcuts_provider_free_providers (GList *providers); 50 | const gchar * 51 | xfce_shortcuts_provider_get_name (XfceShortcutsProvider *provider); 52 | gboolean 53 | xfce_shortcuts_provider_is_custom (XfceShortcutsProvider *provider); 54 | void 55 | xfce_shortcuts_provider_reset_to_defaults (XfceShortcutsProvider *provider); 56 | void 57 | xfce_shortcuts_provider_clone_defaults (XfceShortcutsProvider *provider); 58 | GList * 59 | xfce_shortcuts_provider_get_shortcuts (XfceShortcutsProvider *provider); 60 | XfceShortcut * 61 | xfce_shortcuts_provider_get_shortcut (XfceShortcutsProvider *provider, 62 | const gchar *shortcut); 63 | gboolean 64 | xfce_shortcuts_provider_has_shortcut (XfceShortcutsProvider *provider, 65 | const gchar *shortcut); 66 | void 67 | xfce_shortcuts_provider_set_shortcut (XfceShortcutsProvider *provider, 68 | const gchar *shortcut, 69 | const gchar *command, 70 | gboolean snotify); 71 | void 72 | xfce_shortcuts_provider_reset_shortcut (XfceShortcutsProvider *provider, 73 | const gchar *shortcut); 74 | 75 | void 76 | xfce_shortcuts_free (GList *shortcuts); 77 | void 78 | xfce_shortcut_free (XfceShortcut *shortcut); 79 | 80 | 81 | 82 | struct _XfceShortcutsProviderClass 83 | { 84 | GObjectClass __parent__; 85 | }; 86 | 87 | struct _XfceShortcutsProvider 88 | { 89 | GObject __parent__; 90 | 91 | XfceShortcutsProviderPrivate *priv; 92 | }; 93 | 94 | struct _XfceShortcut 95 | { 96 | gchar *property_name; 97 | gchar *shortcut; 98 | gchar *command; 99 | guint snotify : 1; 100 | }; 101 | 102 | G_END_DECLS 103 | 104 | #endif /* !__XFCE_SHORTCUTS_PROVIDER_H__ */ 105 | -------------------------------------------------------------------------------- /libxfce4kbd-private/xfce-shortcuts-xfwm4.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 Jérôme Guelfucci 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or (at 7 | * your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | * MA 02110-1301, USA. 18 | */ 19 | 20 | #ifdef HAVE_CONFIG_H 21 | #include "config.h" 22 | #endif 23 | 24 | #include 25 | 26 | #include "xfce-shortcuts-xfwm4.h" 27 | #include "libxfce4kbd-private-visibility.h" 28 | 29 | typedef struct _ShortcutTemplate ShortcutTemplate; 30 | 31 | struct _ShortcutTemplate 32 | { 33 | const gchar *name; 34 | const gchar *feature; 35 | }; 36 | 37 | const ShortcutTemplate xfwm4_shortcut_values[] = { 38 | { N_ ("Window operations menu"), "popup_menu_key" }, 39 | { N_ ("Up"), "up_key" }, 40 | { N_ ("Down"), "down_key" }, 41 | { N_ ("Left"), "left_key" }, 42 | { N_ ("Right"), "right_key" }, 43 | { N_ ("Cancel"), "cancel_key" }, 44 | { N_ ("Cycle windows"), "cycle_windows_key" }, 45 | { N_ ("Cycle windows (Reverse)"), "cycle_reverse_windows_key" }, 46 | { N_ ("Switch window for same application"), "switch_window_key" }, 47 | { N_ ("Switch application"), "switch_application_key" }, 48 | { N_ ("Close window"), "close_window_key" }, 49 | { N_ ("Maximize window horizontally"), "maximize_horiz_key" }, 50 | { N_ ("Maximize window vertically"), "maximize_vert_key" }, 51 | { N_ ("Maximize window"), "maximize_window_key" }, 52 | { N_ ("Hide window"), "hide_window_key" }, 53 | { N_ ("Move window"), "move_window_key" }, 54 | { N_ ("Resize window"), "resize_window_key" }, 55 | { N_ ("Shade window"), "shade_window_key" }, 56 | { N_ ("Stick window"), "stick_window_key" }, 57 | { N_ ("Raise window"), "raise_window_key" }, 58 | { N_ ("Lower window"), "lower_window_key" }, 59 | { N_ ("Raise or lower window"), "raiselower_window_key" }, 60 | { N_ ("Fill window"), "fill_window_key" }, 61 | { N_ ("Fill window horizontally"), "fill_horiz_key" }, 62 | { N_ ("Fill window vertically"), "fill_vert_key" }, 63 | { N_ ("Toggle above"), "above_key" }, 64 | { N_ ("Toggle fullscreen"), "fullscreen_key" }, 65 | { N_ ("Move window to lower monitor"), "move_window_to_monitor_down_key" }, 66 | { N_ ("Move window to left monitor"), "move_window_to_monitor_left_key" }, 67 | { N_ ("Move window to right monitor"), "move_window_to_monitor_right_key" }, 68 | { N_ ("Move window to upper monitor"), "move_window_to_monitor_up_key" }, 69 | { N_ ("Move window to upper workspace"), "move_window_up_workspace_key" }, 70 | { N_ ("Move window to bottom workspace"), "move_window_down_workspace_key" }, 71 | { N_ ("Move window to left workspace"), "move_window_left_workspace_key" }, 72 | { N_ ("Move window to right workspace"), "move_window_right_workspace_key" }, 73 | { N_ ("Move window to previous workspace"), "move_window_prev_workspace_key" }, 74 | { N_ ("Move window to next workspace"), "move_window_next_workspace_key" }, 75 | { N_ ("Move window to workspace 1"), "move_window_workspace_1_key" }, 76 | { N_ ("Move window to workspace 2"), "move_window_workspace_2_key" }, 77 | { N_ ("Move window to workspace 3"), "move_window_workspace_3_key" }, 78 | { N_ ("Move window to workspace 4"), "move_window_workspace_4_key" }, 79 | { N_ ("Move window to workspace 5"), "move_window_workspace_5_key" }, 80 | { N_ ("Move window to workspace 6"), "move_window_workspace_6_key" }, 81 | { N_ ("Move window to workspace 7"), "move_window_workspace_7_key" }, 82 | { N_ ("Move window to workspace 8"), "move_window_workspace_8_key" }, 83 | { N_ ("Move window to workspace 9"), "move_window_workspace_9_key" }, 84 | { N_ ("Move window to workspace 10"), "move_window_workspace_10_key" }, 85 | { N_ ("Move window to workspace 11"), "move_window_workspace_11_key" }, 86 | { N_ ("Move window to workspace 12"), "move_window_workspace_12_key" }, 87 | { N_ ("Tile window to the top"), "tile_up_key" }, 88 | { N_ ("Tile window to the bottom"), "tile_down_key" }, 89 | { N_ ("Tile window to the left"), "tile_left_key" }, 90 | { N_ ("Tile window to the right"), "tile_right_key" }, 91 | { N_ ("Tile window to the top-left"), "tile_up_left_key" }, 92 | { N_ ("Tile window to the top-right"), "tile_up_right_key" }, 93 | { N_ ("Tile window to the bottom-left"), "tile_down_left_key" }, 94 | { N_ ("Tile window to the bottom-right"), "tile_down_right_key" }, 95 | { N_ ("Show desktop"), "show_desktop_key" }, 96 | { N_ ("Upper workspace"), "up_workspace_key" }, 97 | { N_ ("Bottom workspace"), "down_workspace_key" }, 98 | { N_ ("Left workspace"), "left_workspace_key" }, 99 | { N_ ("Right workspace"), "right_workspace_key" }, 100 | { N_ ("Previous workspace"), "prev_workspace_key" }, 101 | { N_ ("Next workspace"), "next_workspace_key" }, 102 | { N_ ("Workspace 1"), "workspace_1_key" }, 103 | { N_ ("Workspace 2"), "workspace_2_key" }, 104 | { N_ ("Workspace 3"), "workspace_3_key" }, 105 | { N_ ("Workspace 4"), "workspace_4_key" }, 106 | { N_ ("Workspace 5"), "workspace_5_key" }, 107 | { N_ ("Workspace 6"), "workspace_6_key" }, 108 | { N_ ("Workspace 7"), "workspace_7_key" }, 109 | { N_ ("Workspace 8"), "workspace_8_key" }, 110 | { N_ ("Workspace 9"), "workspace_9_key" }, 111 | { N_ ("Workspace 10"), "workspace_10_key" }, 112 | { N_ ("Workspace 11"), "workspace_11_key" }, 113 | { N_ ("Workspace 12"), "workspace_12_key" }, 114 | { N_ ("Add workspace"), "add_workspace_key" }, 115 | { N_ ("Add adjacent workspace"), "add_adjacent_workspace_key" }, 116 | { N_ ("Delete last workspace"), "del_workspace_key" }, 117 | { N_ ("Delete active workspace"), "del_active_workspace_key" }, 118 | { NULL, NULL } 119 | }; 120 | 121 | 122 | 123 | const gchar * 124 | xfce_shortcuts_xfwm4_get_feature_name (const gchar *feature) 125 | { 126 | guint i; 127 | 128 | /* Make sure to use the translations from libxfce4ui */ 129 | bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR); 130 | #ifdef HAVE_BIND_TEXTDOMAIN_CODESET 131 | bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); 132 | #endif 133 | 134 | /* We need to get the human readable string of the action name */ 135 | for (i = 0; xfwm4_shortcut_values[i].name != NULL; ++i) 136 | { 137 | if (G_UNLIKELY (g_str_equal (xfwm4_shortcut_values[i].feature, feature))) 138 | { 139 | return _(xfwm4_shortcut_values[i].name); 140 | } 141 | } 142 | 143 | /* Not a valid feature */ 144 | return NULL; 145 | } 146 | 147 | GList * 148 | xfce_shortcuts_xfwm4_get_feature_list (void) 149 | { 150 | GList *list; 151 | guint i; 152 | 153 | list = NULL; 154 | 155 | for (i = 0; xfwm4_shortcut_values[i].name != NULL; ++i) 156 | list = g_list_prepend (list, (gpointer) xfwm4_shortcut_values[i].feature); 157 | 158 | return g_list_reverse (list); 159 | } 160 | 161 | #define __XFCE_SHORTCUTS_XFWM4_C__ 162 | #include "libxfce4kbd-private-visibility.c" 163 | -------------------------------------------------------------------------------- /libxfce4kbd-private/xfce-shortcuts-xfwm4.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 Jérôme Guelfucci 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or (at 7 | * your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but 10 | * WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | * MA 02110-1301, USA. 18 | */ 19 | 20 | #ifndef __XFCE_SHORTCUTS_XFWM4_H__ 21 | #define __XFCE_SHORTCUTS_XFWM4_H__ 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | const gchar * 28 | xfce_shortcuts_xfwm4_get_feature_name (const gchar *feature); 29 | GList * 30 | xfce_shortcuts_xfwm4_get_feature_list (void); 31 | 32 | G_END_DECLS 33 | 34 | #endif /* !__XFCE_SHORTCUTS_XFWM4_H__ */ 35 | -------------------------------------------------------------------------------- /libxfce4kbd-private/xfce-shortcuts.c: -------------------------------------------------------------------------------- 1 | /* vi:set expandtab sw=2 sts=2: */ 2 | /* 3 | * Copyright (c) 2008 Jannis Pohlmann 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 7 | * License as published by the Free Software Foundation; either 8 | * version 2 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 | * 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, write to the 17 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #ifdef HAVE_CONFIG_H 22 | #include "config.h" 23 | #endif 24 | 25 | #include 26 | 27 | #include "libxfce4ui/libxfce4ui.h" 28 | 29 | #include "xfce-shortcuts-xfwm4.h" 30 | #include "xfce-shortcuts.h" 31 | #include "libxfce4kbd-private-visibility.h" 32 | 33 | 34 | 35 | typedef struct 36 | { 37 | const gchar *owner_name; 38 | const gchar *other_name; 39 | const gchar *message; 40 | const gchar *owner_button_text; 41 | const gchar *other_button_text; 42 | } XfceShortcutConflictMessage; 43 | 44 | 45 | 46 | static XfceShortcutConflictMessage conflict_messages[] = { 47 | { "xfwm4", "xfwm4", 48 | N_ ("This shortcut is already being used for the action '%s'. Which action do you want to use?"), 49 | N_ ("Use '%s'"), N_ ("Keep '%s'") }, 50 | { "xfwm4", "commands", 51 | N_ ("This shortcut is already being used for the command '%s'. Which action do you want to use?"), 52 | N_ ("Use '%s'"), N_ ("Keep '%s'") }, 53 | { "commands", "commands", 54 | N_ ("This shortcut is already being used for the command '%s'. Which action do you want to use?"), 55 | N_ ("Use '%s'"), N_ ("Keep '%s'") }, 56 | { "commands", "xfwm4", 57 | N_ ("This shortcut is already being used by the action '%s'. Which action do you want to use?"), 58 | N_ ("Use '%s'"), N_ ("Keep '%s'") }, 59 | { 0, 0, NULL, NULL, NULL }, 60 | }; 61 | 62 | 63 | 64 | gint 65 | xfce_shortcut_conflict_dialog (GtkWindow *parent, 66 | const gchar *owner, 67 | const gchar *other, 68 | const gchar *shortcut, 69 | const gchar *owner_action, 70 | const gchar *other_action, 71 | gboolean ignore_same_provider) 72 | { 73 | GdkModifierType modifiers; 74 | gboolean handled; 75 | gchar *other_action_name; 76 | gchar *other_button_text; 77 | gchar *owner_action_name; 78 | gchar *owner_button_text; 79 | gchar *secondary_text; 80 | gchar *shortcut_label; 81 | gchar *title; 82 | guint keyval; 83 | gint response; 84 | gint i; 85 | 86 | /* Default values */ 87 | response = GTK_RESPONSE_ACCEPT; 88 | handled = FALSE; 89 | 90 | /* Make sure to use the translations from libxfce4ui */ 91 | bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR); 92 | #ifdef HAVE_BIND_TEXTDOMAIN_CODESET 93 | bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); 94 | #endif 95 | 96 | if (g_utf8_collate (owner, other) == 0 && ignore_same_provider) 97 | return GTK_RESPONSE_ACCEPT; 98 | 99 | /* Get the shortcut label */ 100 | gtk_accelerator_parse (shortcut, &keyval, &modifiers); 101 | shortcut_label = gtk_accelerator_get_label (keyval, modifiers); 102 | 103 | if (g_utf8_collate (owner, other) == 0 && g_utf8_collate (owner_action, other_action) == 0) 104 | { 105 | /* This shortcut already exists in the provider, we don't want it twice */ 106 | 107 | /* Warn the user */ 108 | xfce_dialog_show_warning ( 109 | parent, _("Please use another key combination."), _("%s already triggers this action."), shortcut_label); 110 | 111 | return GTK_RESPONSE_REJECT; 112 | } 113 | 114 | title = g_strdup_printf (_("Conflicting actions for %s"), shortcut_label); 115 | 116 | for (i = 0; conflict_messages[i].message != NULL; ++i) 117 | if (g_utf8_collate (conflict_messages[i].owner_name, owner) == 0 118 | && g_utf8_collate (conflict_messages[i].other_name, other) == 0) 119 | { 120 | if (owner_action == NULL) 121 | owner_action_name = NULL; 122 | else if (g_utf8_collate (owner, "xfwm4") == 0) 123 | { 124 | DBG ("Owner action %s is an xfwm4 action, get the string", owner_action); 125 | 126 | /* We need to get the human readable string of the action name */ 127 | owner_action_name = 128 | g_strdup (xfce_shortcuts_xfwm4_get_feature_name (owner_action)); 129 | } 130 | else 131 | owner_action_name = g_strdup (owner_action); 132 | 133 | DBG ("Owner action name: %s", owner_action_name); 134 | 135 | if (other_action == NULL) 136 | other_action_name = NULL; 137 | else if (g_utf8_collate (other, "xfwm4") == 0) 138 | { 139 | /* We need to get the human readable string of the action name */ 140 | 141 | other_action_name = 142 | g_strdup (xfce_shortcuts_xfwm4_get_feature_name (other_action)); 143 | } 144 | else 145 | other_action_name = g_strdup (other_action); 146 | 147 | secondary_text = g_strdup_printf (_(conflict_messages[i].message), other_action_name); 148 | 149 | owner_button_text = g_strdup_printf (_(conflict_messages[i].owner_button_text), owner_action_name); 150 | other_button_text = g_strdup_printf (_(conflict_messages[i].other_button_text), other_action_name); 151 | 152 | response = xfce_message_dialog (parent, title, 153 | "dialog-question", 154 | title, secondary_text, 155 | XFCE_BUTTON_TYPE_MIXED, NULL, owner_button_text, GTK_RESPONSE_ACCEPT, 156 | XFCE_BUTTON_TYPE_MIXED, NULL, other_button_text, GTK_RESPONSE_REJECT, 157 | NULL); 158 | 159 | g_free (other_button_text); 160 | g_free (owner_button_text); 161 | g_free (secondary_text); 162 | g_free (other_action_name); 163 | g_free (owner_action_name); 164 | g_free (shortcut_label); 165 | 166 | handled = TRUE; 167 | break; 168 | } 169 | 170 | if (G_UNLIKELY (!handled)) 171 | { 172 | xfce_message_dialog (parent, title, 173 | "dialog-error", 174 | title, _("This shortcut is already being used for something else."), 175 | "window-close-symbolic", 176 | GTK_RESPONSE_CLOSE, NULL); 177 | response = GTK_RESPONSE_REJECT; 178 | } 179 | 180 | g_free (title); 181 | 182 | return response; 183 | } 184 | 185 | #define __XFCE_SHORTCUTS_C__ 186 | #include "libxfce4kbd-private-visibility.c" 187 | -------------------------------------------------------------------------------- /libxfce4kbd-private/xfce-shortcuts.h: -------------------------------------------------------------------------------- 1 | /* vi:set expandtab sw=2 sts=2: */ 2 | /* 3 | * Copyright (c) 2008 Jannis Pohlmann 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 7 | * License as published by the Free Software Foundation; either 8 | * version 2 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 | * 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, write to the 17 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 | * Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #ifndef __XFCE_SHORTCUTS_H__ 22 | #define __XFCE_SHORTCUTS_H__ 23 | 24 | #include 25 | 26 | G_BEGIN_DECLS 27 | 28 | gboolean 29 | xfce_shortcut_conflict_dialog (GtkWindow *parent, 30 | const gchar *owner, 31 | const gchar *other, 32 | const gchar *shortcut, 33 | const gchar *owner_action, 34 | const gchar *other_action, 35 | gboolean ignore_same_provider); 36 | 37 | G_END_DECLS 38 | 39 | #endif /* !__XFCE_SHORTCUTS_H__ */ 40 | -------------------------------------------------------------------------------- /libxfce4ui/.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | BasedOnStyle: InheritParentConfig 3 | 4 | IncludeCategories: 5 | - Regex: '"config\.h"' 6 | Priority: -3 7 | CaseSensitive: true 8 | - Regex: '<.*>' 9 | Priority: -2 10 | CaseSensitive: true 11 | - Regex: '".*/.*"' 12 | Priority: -1 13 | CaseSensitive: true 14 | - Regex: '"libxfce4ui-visibility\.h"' 15 | Priority: 0 16 | SortPriority: 2 17 | CaseSensitive: true 18 | - Regex: '"[^/]*"' 19 | Priority: 0 20 | SortPriority: 1 21 | CaseSensitive: true 22 | ... 23 | -------------------------------------------------------------------------------- /libxfce4ui/Libxfce4ui-2.0.metadata: -------------------------------------------------------------------------------- 1 | // xfce-dialogs.h 2 | message_dialog* skip = false 3 | dialog_* skip = false 4 | 5 | // xfce-titled-dialog.h 6 | TitledDialog 7 | .new_with_* skip = false 8 | -------------------------------------------------------------------------------- /libxfce4ui/libxfce4ui-2.deps: -------------------------------------------------------------------------------- 1 | libxfce4util-1.0 2 | atk 3 | gio-2.0 4 | cairo 5 | pango 6 | gdk-pixbuf-2.0 7 | gdk-3.0 8 | gtk+-3.0 9 | -------------------------------------------------------------------------------- /libxfce4ui/libxfce4ui-2.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=@exec_prefix@ 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: libxfce4ui 7 | Description: Widgets library for Xfce 8 | Requires: gtk+-3.0 libxfce4util-1.0 9 | Version: @PACKAGE_VERSION@ 10 | Libs: -L${libdir} -lxfce4ui-2 11 | Cflags: -I${includedir}/xfce4/libxfce4ui-2 12 | -------------------------------------------------------------------------------- /libxfce4ui/libxfce4ui-config.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007 The Xfce Development Team 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | * MA 02110-1301 USA 18 | */ 19 | 20 | /** 21 | * SECTION:libxfce4ui-config 22 | * @title: libxfce4ui config 23 | * @short_description: libxfce4ui config macros 24 | * @stability: Stable 25 | * @include: libxfce4ui/libxfce4ui.h 26 | * 27 | * Variables and functions to check the Libxfce4ui version. 28 | **/ 29 | 30 | #ifdef HAVE_CONFIG_H 31 | #include "config.h" 32 | #endif 33 | 34 | #include "libxfce4ui-config.h" 35 | #include "libxfce4ui-visibility.h" 36 | 37 | 38 | /** 39 | * libxfce4ui_major_version: 40 | * 41 | * A constat that evaluates to the major version of libxfce4ui. 42 | * 43 | */ 44 | const guint libxfce4ui_major_version = LIBXFCE4UI_MAJOR_VERSION; 45 | 46 | /** 47 | * libxfce4ui_minor_version: 48 | * 49 | * A constat that evaluates to the minor version of libxfce4ui. 50 | * 51 | */ 52 | const guint libxfce4ui_minor_version = LIBXFCE4UI_MINOR_VERSION; 53 | 54 | /** 55 | * libxfce4ui_micro_version: 56 | * 57 | * A constat that evaluates to the micro version of libxfce4ui. 58 | * 59 | */ 60 | const guint libxfce4ui_micro_version = LIBXFCE4UI_MICRO_VERSION; 61 | 62 | 63 | 64 | /** 65 | * libxfce4ui_check_version: 66 | * @required_major: the required major version. 67 | * @required_minor: the required minor version. 68 | * @required_micro: the required micro version. 69 | * 70 | * Checks that the libxfce4ui library 71 | * in use is compatible with the given version. Generally you would pass in 72 | * the constants #LIBXFCE4UI_MAJOR_VERSION, #LIBXFCE4UI_MINOR_VERSION and 73 | * #LIBXFCE4UI_MICRO_VERSION as the three arguments to this function; that produces 74 | * a check that the library in use is compatible with the version of 75 | * libxfce4ui the extension was 76 | * compiled against. 77 | * 78 | * 79 | * Checking the runtime version of the Libxfce4ui library 80 | * 81 | * const gchar *mismatch; 82 | * mismatch = libxfce4ui_check_version (LIBXFCE4UI_MAJOR_VERSION, 83 | * LIBXFCE4UI_MINOR_VERSION, 84 | * LIBXFCE4UI_MICRO_VERSION); 85 | * if (G_UNLIKELY (mismatch != NULL)) 86 | * g_error ("Version mismatch: %s", mismatch); 87 | * 88 | * 89 | * 90 | * Return value: %NULL if the library is compatible with the given version, 91 | * or a string describing the version mismatch. The returned 92 | * string is owned by the library and must not be freed or 93 | * modified by the caller. 94 | **/ 95 | const gchar * 96 | libxfce4ui_check_version (guint required_major, 97 | guint required_minor, 98 | guint required_micro) 99 | { 100 | if (required_major > LIBXFCE4UI_MAJOR_VERSION) 101 | return "Libxfce4ui version too old (major mismatch)"; 102 | if (required_major < LIBXFCE4UI_MAJOR_VERSION) 103 | return "Libxfce4ui version too new (major mismatch)"; 104 | if (required_minor > LIBXFCE4UI_MINOR_VERSION) 105 | return "Libxfce4ui version too old (minor mismatch)"; 106 | if (required_minor == LIBXFCE4UI_MINOR_VERSION && required_micro > LIBXFCE4UI_MICRO_VERSION) 107 | return "Libxfce4ui version too old (micro mismatch)"; 108 | return NULL; 109 | } 110 | 111 | 112 | 113 | #define __LIBXFCE4UI_CONFIG_C__ 114 | #include "libxfce4ui-visibility.c" 115 | -------------------------------------------------------------------------------- /libxfce4ui/libxfce4ui-config.h.in: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007 The Xfce Development Team 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | * MA 02110-1301 USA 18 | */ 19 | 20 | #if !defined(_LIBXFCE4UI_INSIDE_LIBXFCE4UI_H) && !defined(LIBXFCE4UI_COMPILATION) 21 | #error "Only can be included directly, this file may disappear or change contents." 22 | #endif 23 | 24 | #ifndef __LIBXFCE4UI_CONFIG_H__ 25 | #define __LIBXFCE4UI_CONFIG_H__ 26 | 27 | #include 28 | 29 | G_BEGIN_DECLS 30 | 31 | /** 32 | * LIBXFCE4UI_MAJOR_VERSION: 33 | * 34 | * A macro that evaluates to the major version of libxfce4ui, in a format 35 | * that can be used by the C pre-processor. 36 | * 37 | */ 38 | #define LIBXFCE4UI_MAJOR_VERSION (@LIBXFCE4UI_VERSION_MAJOR@) 39 | 40 | /** 41 | * LIBXFCE4UI_MINOR_VERSION: 42 | * 43 | * A macro that evaluates to the minor version of libxfce4ui, in a format 44 | * that can be used by the C pre-processor. 45 | * 46 | */ 47 | #define LIBXFCE4UI_MINOR_VERSION (@LIBXFCE4UI_VERSION_MINOR@) 48 | 49 | /** 50 | * LIBXFCE4UI_MICRO_VERSION: 51 | * 52 | * A macro that evaluates to the micro version of libxfce4ui, in a format 53 | * that can be used by the C pre-processor. 54 | * 55 | */ 56 | #define LIBXFCE4UI_MICRO_VERSION (@LIBXFCE4UI_VERSION_MICRO@) 57 | 58 | /** 59 | * LIBXFCE4UI_CHECK_VERSION: 60 | * @major : The major version of the library, i.e. @LIBXFCE4UI_VERSION_MAJOR@ 61 | * @minor : The minor version of the library, i.e. @LIBXFCE4UI_VERSION_MINOR@ 62 | * @micro : The micro release of the library, i.e. @LIBXFCE4UI_VERSION_MICRO@ 63 | * 64 | * A macro to compare libxfce4ui versions to determine if a particular 65 | * function is available. 66 | * 67 | */ 68 | #define LIBXFCE4UI_CHECK_VERSION(major, minor, micro) \ 69 | (LIBXFCE4UI_MAJOR_VERSION > (major) \ 70 | || (LIBXFCE4UI_MAJOR_VERSION == (major) \ 71 | && LIBXFCE4UI_MINOR_VERSION > (minor)) \ 72 | || (LIBXFCE4UI_MAJOR_VERSION == (major) \ 73 | && LIBXFCE4UI_MINOR_VERSION == (minor) \ 74 | && LIBXFCE4UI_MICRO_VERSION >= (micro))) 75 | 76 | extern const guint libxfce4ui_major_version; 77 | extern const guint libxfce4ui_minor_version; 78 | extern const guint libxfce4ui_micro_version; 79 | 80 | const gchar * 81 | libxfce4ui_check_version (guint required_major, 82 | guint required_minor, 83 | guint required_micro); 84 | 85 | G_END_DECLS 86 | 87 | #endif /* !__LIBXFCE4UI_CONFIG_H__ */ 88 | -------------------------------------------------------------------------------- /libxfce4ui/libxfce4ui-enums.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2023 Gaël Bonithon 3 | * Copyright (c) 2009 Brian Tarricone 4 | * Copyright (C) 1999 Olivier Fourdan 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Library General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301 USA 20 | */ 21 | 22 | #if !defined(_LIBXFCE4UI_INSIDE_LIBXFCE4UI_H) && !defined(LIBXFCE4UI_COMPILATION) 23 | #error "Only can be included directly, this file is not part of the public API." 24 | #endif 25 | 26 | #ifndef __LIBXFCE4UI_ENUMS_H__ 27 | #define __LIBXFCE4UI_ENUMS_H__ 28 | 29 | #include 30 | 31 | G_BEGIN_DECLS 32 | 33 | /** 34 | * XfceSmCLientErrorEnum: 35 | * @XFCE_SM_CLIENT_ERROR_FAILED: Failed to connect to the session manager. 36 | * @XFCE_SM_CLIENT_ERROR_INVALID_CLIENT: Session does not have a valid client id. 37 | * 38 | * Error codes returned by XfceSmCLient functions. 39 | **/ 40 | typedef enum 41 | { 42 | XFCE_SM_CLIENT_ERROR_FAILED, 43 | XFCE_SM_CLIENT_ERROR_INVALID_CLIENT 44 | } XfceSmCLientErrorEnum; 45 | 46 | typedef enum 47 | { 48 | XFCE_SM_CLIENT_RESTART_NORMAL = 0, 49 | XFCE_SM_CLIENT_RESTART_IMMEDIATELY, 50 | } XfceSMClientRestartStyle; 51 | 52 | typedef enum /*< skip >*/ 53 | { 54 | XFCE_SM_CLIENT_PRIORITY_HIGHEST = 0, 55 | XFCE_SM_CLIENT_PRIORITY_WM = 15, 56 | XFCE_SM_CLIENT_PRIORITY_CORE = 25, 57 | XFCE_SM_CLIENT_PRIORITY_DESKTOP = 35, 58 | XFCE_SM_CLIENT_PRIORITY_DEFAULT = 50, 59 | XFCE_SM_CLIENT_PRIORITY_LOWEST = 255, 60 | } XfceSMClientPriority; 61 | 62 | typedef enum 63 | { 64 | XFCE_SM_CLIENT_SHUTDOWN_HINT_ASK = 0, 65 | XFCE_SM_CLIENT_SHUTDOWN_HINT_LOGOUT, 66 | XFCE_SM_CLIENT_SHUTDOWN_HINT_HALT, 67 | XFCE_SM_CLIENT_SHUTDOWN_HINT_REBOOT, 68 | } XfceSMClientShutdownHint; 69 | 70 | /** 71 | * XfceIconViewDropPosition: 72 | * @XFCE_ICON_VIEW_NO_DROP : no drop indicator. 73 | * @XFCE_ICON_VIEW_DROP_INTO : drop indicator on an item. 74 | * @XFCE_ICON_VIEW_DROP_LEFT : drop indicator on the left of an item. 75 | * @XFCE_ICON_VIEW_DROP_RIGHT : drop indicator on the right of an item. 76 | * @XFCE_ICON_VIEW_DROP_ABOVE : drop indicator above an item. 77 | * @XFCE_ICON_VIEW_DROP_BELOW : drop indicator below an item. 78 | * 79 | * Specifies whether to display the drop indicator, 80 | * i.e. where to drop into the icon view. 81 | **/ 82 | typedef enum 83 | { 84 | XFCE_ICON_VIEW_NO_DROP, 85 | XFCE_ICON_VIEW_DROP_INTO, 86 | XFCE_ICON_VIEW_DROP_LEFT, 87 | XFCE_ICON_VIEW_DROP_RIGHT, 88 | XFCE_ICON_VIEW_DROP_ABOVE, 89 | XFCE_ICON_VIEW_DROP_BELOW 90 | } XfceIconViewDropPosition; 91 | 92 | /** 93 | * XfceIconViewLayoutMode: 94 | * @XFCE_ICON_VIEW_LAYOUT_ROWS : layout items in rows. 95 | * @XFCE_ICON_VIEW_LAYOUT_COLS : layout items in columns. 96 | * 97 | * Specifies the layouting mode of an #XfceIconView. @XFCE_ICON_VIEW_LAYOUT_ROWS 98 | * is the default, which lays out items vertically in rows from top to bottom. 99 | * @XFCE_ICON_VIEW_LAYOUT_COLS lays out items horizontally in columns from left 100 | * to right. 101 | **/ 102 | typedef enum 103 | { 104 | XFCE_ICON_VIEW_LAYOUT_ROWS, 105 | XFCE_ICON_VIEW_LAYOUT_COLS 106 | } XfceIconViewLayoutMode; 107 | 108 | G_END_DECLS 109 | 110 | #endif /* __LIBXFCE4UI_ENUMS_H__ */ 111 | -------------------------------------------------------------------------------- /libxfce4ui/libxfce4ui-marshal.list: -------------------------------------------------------------------------------- 1 | BOOLEAN:VOID 2 | BOOLEAN:ENUM,INT 3 | -------------------------------------------------------------------------------- /libxfce4ui/libxfce4ui-private.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007 The Xfce Development Team 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | * MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef __LIBXFCE4UI_PRIVATE_H__ 21 | #define __LIBXFCE4UI_PRIVATE_H__ 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #ifndef NDEBUG 28 | #define _libxfce4ui_assert(expr) g_assert (expr) 29 | #define _libxfce4ui_assert_not_reached() g_assert_not_reached () 30 | #define _libxfce4ui_return_if_fail(expr) g_return_if_fail (expr) 31 | #define _libxfce4ui_return_val_if_fail(expr, val) g_return_val_if_fail (expr, val) 32 | #else 33 | #define _libxfce4ui_assert(expr) \ 34 | G_STMT_START { (void) 0; } \ 35 | G_STMT_END 36 | #define _libxfce4ui_assert_not_reached() \ 37 | G_STMT_START { (void) 0; } \ 38 | G_STMT_END 39 | #define _libxfce4ui_return_if_fail(expr) \ 40 | G_STMT_START { (void) 0; } \ 41 | G_STMT_END 42 | #define _libxfce4ui_return_val_if_fail(expr, val) \ 43 | G_STMT_START { (void) 0; } \ 44 | G_STMT_END 45 | #endif 46 | 47 | G_GNUC_INTERNAL GdkPixbuf * 48 | xfce_gdk_pixbuf_colorize (const GdkPixbuf *source, 49 | const GdkColor *color) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT; 50 | 51 | G_GNUC_INTERNAL GdkPixbuf * 52 | xfce_gdk_pixbuf_spotlight (const GdkPixbuf *source) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT; 53 | 54 | G_GNUC_INTERNAL void 55 | xfce_gtk_position_search_box (GtkWidget *view, 56 | GtkWidget *search_dialog, 57 | gpointer user_data); 58 | 59 | G_END_DECLS 60 | 61 | #endif /* !__LIBXFCE4UI_PRIVATE_H__ */ 62 | -------------------------------------------------------------------------------- /libxfce4ui/libxfce4ui.h.in: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007 The Xfce Development Team 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | * MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef __LIBXFCE4UI_H__ 21 | #define __LIBXFCE4UI_H__ 22 | 23 | #include 24 | 25 | #define _LIBXFCE4UI_INSIDE_LIBXFCE4UI_H 26 | 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | #include 41 | #include 42 | #include 43 | #include 44 | @BEGIN_X11_HEADERS@ 45 | #include 46 | #include 47 | @END_X11_HEADERS@ 48 | @BEGIN_WAYLAND_HEADERS@ 49 | @END_WAYLAND_HEADERS@ 50 | 51 | #undef _LIBXFCE4UI_INSIDE_LIBXFCE4UI_H 52 | 53 | #endif /* !__LIBXFCE4UI_H__ */ 54 | -------------------------------------------------------------------------------- /libxfce4ui/resources/libxfce4ui-dialog-ui.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | False 7 | GTK_MESSAGE_OTHER 8 | 9 | 10 | False 11 | vertical 12 | 13 | 14 | False 15 | True 16 | True 17 | expand 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | True 27 | True 28 | 0 29 | 30 | 31 | 32 | 33 | True 34 | False 35 | 0 36 | 6 37 | GTK_ALIGN_START 38 | 39 | 40 | True 41 | False 42 | 24 43 | gtk-missing-image 44 | 45 | 46 | False 47 | True 48 | 0 49 | 50 | 51 | 52 | 53 | True 54 | False 55 | 0 56 | 0 57 | 0 58 | 0 59 | vertical 60 | 6 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | True 70 | True 71 | 0 72 | 1 73 | 74 | 75 | 76 | 77 | True 78 | True 79 | 4 80 | 1 81 | 82 | 83 | 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /libxfce4ui/resources/libxfce4ui.gresource.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | libxfce4ui-dialog-ui.ui 5 | xfce4-about-dialog.glade 6 | 7 | 8 | -------------------------------------------------------------------------------- /libxfce4ui/xfce-cell-renderer-icon.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2005-2006 Benedikt Meurer . 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 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 | * Library 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, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | * MA 02110-1301 USA 18 | */ 19 | 20 | #if !defined(_LIBXFCE4UI_INSIDE_LIBXFCE4UI_H) && !defined(LIBXFCE4UI_COMPILATION) 21 | #error "Only can be included directly, this file is not part of the public API." 22 | #endif 23 | 24 | #ifndef __XFCE_CELL_RENDERER_ICON_H__ 25 | #define __XFCE_CELL_RENDERER_ICON_H__ 26 | 27 | #include 28 | 29 | G_BEGIN_DECLS 30 | 31 | #define XFCE_TYPE_CELL_RENDERER_ICON (xfce_cell_renderer_icon_get_type ()) 32 | G_DECLARE_FINAL_TYPE (XfceCellRendererIcon, xfce_cell_renderer_icon, XFCE, CELL_RENDERER_ICON, GtkCellRenderer) 33 | 34 | GtkCellRenderer * 35 | xfce_cell_renderer_icon_new (void) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT; 36 | 37 | G_END_DECLS 38 | 39 | #endif /* !__XFCE_CELL_RENDERER_ICON_H__ */ 40 | -------------------------------------------------------------------------------- /libxfce4ui/xfce-clipboard-manager.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2024 Gaël Bonithon 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | * MA 02110-1301 USA 18 | */ 19 | 20 | #if !defined(_LIBXFCE4UI_INSIDE_LIBXFCE4UI_H) && !defined(LIBXFCE4UI_COMPILATION) 21 | #error "Only can be included directly, this file is not part of the public API." 22 | #endif 23 | 24 | #ifndef __XFCE_CLIPBOARD_MANAGER_H__ 25 | #define __XFCE_CLIPBOARD_MANAGER_H__ 26 | 27 | #include 28 | 29 | G_BEGIN_DECLS 30 | 31 | #define XFCE_TYPE_CLIPBOARD_MANAGER (xfce_clipboard_manager_get_type ()) 32 | G_DECLARE_FINAL_TYPE (XfceClipboardManager, xfce_clipboard_manager, XFCE, CLIPBOARD_MANAGER, GObject) 33 | 34 | XfceClipboardManager * 35 | xfce_clipboard_manager_new (gboolean replace); 36 | 37 | G_END_DECLS 38 | 39 | #endif /* __XFCE_CLIPBOARD_MANAGER_H__ */ 40 | -------------------------------------------------------------------------------- /libxfce4ui/xfce-dialogs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007 The Xfce Development Team 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | * MA 02110-1301 USA 18 | */ 19 | 20 | #if !defined(_LIBXFCE4UI_INSIDE_LIBXFCE4UI_H) && !defined(LIBXFCE4UI_COMPILATION) 21 | #error "Only can be included directly, this file is not part of the public API." 22 | #endif 23 | 24 | #ifndef __XFCE_DIALOGS_H__ 25 | #define __XFCE_DIALOGS_H__ 26 | 27 | #include 28 | 29 | G_BEGIN_DECLS 30 | 31 | /** 32 | * XFCE_BUTTON_TYPE_MIXED: 33 | * 34 | * This allows you to easily create mixed buttons in a dialog. 35 | * param1 is used for the stock_id, param2 for the label and 36 | * param3 for the response_id. See also xfce_gtk_button_new_mixed(). 37 | * 38 | **/ 39 | #define XFCE_BUTTON_TYPE_MIXED "button-mixed" 40 | 41 | /** 42 | * XFCE_BUTTON_TYPE_PIXBUF: 43 | * 44 | * Creates a button with the #GdkPixbuf as button icon. 45 | * param1 is the #GdkPixbuf, param2 for the label and 46 | * param3 for the response_id. 47 | * 48 | **/ 49 | #define XFCE_BUTTON_TYPE_PIXBUF "button-pixbuf" 50 | 51 | void 52 | xfce_dialog_show_help (GtkWindow *parent, 53 | const gchar *component, 54 | const gchar *page, 55 | const gchar *offset); 56 | 57 | void 58 | xfce_dialog_show_help_with_version (GtkWindow *parent, 59 | const gchar *component, 60 | const gchar *page, 61 | const gchar *offset, 62 | const gchar *version); 63 | 64 | void 65 | xfce_dialog_show_info (GtkWindow *parent, 66 | const gchar *secondary_text, 67 | const gchar *primary_format, 68 | ...) G_GNUC_PRINTF (3, 4); 69 | 70 | void 71 | xfce_dialog_show_warning (GtkWindow *parent, 72 | const gchar *secondary_text, 73 | const gchar *primary_format, 74 | ...) G_GNUC_PRINTF (3, 4); 75 | 76 | void 77 | xfce_dialog_show_error (GtkWindow *parent, 78 | const GError *error, 79 | const gchar *primary_format, 80 | ...) G_GNUC_PRINTF (3, 4); 81 | 82 | gboolean 83 | xfce_dialog_confirm (GtkWindow *parent, 84 | const gchar *stock_id, 85 | const gchar *confirm_label, 86 | const gchar *secondary_text, 87 | const gchar *primary_format, 88 | ...) G_GNUC_PRINTF (5, 6); 89 | 90 | gint 91 | xfce_dialog_confirm_close_tabs (GtkWindow *parent, 92 | gint num_tabs, 93 | gboolean show_confirm_box, 94 | gboolean *confirm_box_checked); 95 | 96 | GtkWidget * 97 | xfce_message_dialog_new_valist (GtkWindow *parent, 98 | const gchar *title, 99 | const gchar *icon_stock_id, 100 | const gchar *primary_text, 101 | const gchar *secondary_text, 102 | const gchar *first_button_text, 103 | va_list args) G_GNUC_MALLOC; 104 | 105 | GtkWidget * 106 | xfce_message_dialog_new (GtkWindow *parent, 107 | const gchar *title, 108 | const gchar *stock_id, 109 | const gchar *primary_text, 110 | const gchar *secondary_text, 111 | const gchar *first_button_text, 112 | ...) G_GNUC_NULL_TERMINATED G_GNUC_MALLOC; 113 | 114 | gint 115 | xfce_message_dialog (GtkWindow *parent, 116 | const gchar *title, 117 | const gchar *stock_id, 118 | const gchar *primary_text, 119 | const gchar *secondary_text, 120 | const gchar *first_button_text, 121 | ...) G_GNUC_NULL_TERMINATED; 122 | 123 | G_END_DECLS 124 | 125 | #endif /* !__XFCE_DIALOGS_H__ */ 126 | -------------------------------------------------------------------------------- /libxfce4ui/xfce-execute.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2005-2006 Benedikt Meurer . 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 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 | * Library 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, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | * MA 02110-1301 USA 18 | */ 19 | 20 | #if !defined(_LIBXFCE4UI_INSIDE_LIBXFCE4UI_H) && !defined(LIBXFCE4UI_COMPILATION) 21 | #error "Only can be included directly, this file is not part of the public API." 22 | #endif 23 | 24 | #ifndef __XFCE_EXECUTE_H__ 25 | #define __XFCE_EXECUTE_H__ 26 | 27 | #include 28 | 29 | G_BEGIN_DECLS 30 | 31 | gboolean 32 | xfce_execute_preferred_application (const gchar *category, 33 | const gchar *parameter, 34 | const gchar *working_directory, 35 | gchar **envp, 36 | GError **error); 37 | 38 | gboolean 39 | xfce_execute_terminal_shell (const gchar *command_line, 40 | const gchar *working_directory, 41 | gchar **envp, 42 | GError **error); 43 | 44 | G_END_DECLS 45 | 46 | #endif /* !__XFCE_EXECUTE_H__ */ 47 | -------------------------------------------------------------------------------- /libxfce4ui/xfce-filename-input.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020 The Xfce Development Team 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | * MA 02110-1301 USA 18 | */ 19 | 20 | #if !defined(_LIBXFCE4UI_INSIDE_LIBXFCE4UI_H) && !defined(LIBXFCE4UI_COMPILATION) 21 | #error "Only can be included directly, this file is not part of the public API." 22 | #endif 23 | 24 | #ifndef __XFCE_FILENAME_INPUT_H__ 25 | #define __XFCE_FILENAME_INPUT_H__ 26 | 27 | #include 28 | 29 | G_BEGIN_DECLS 30 | 31 | typedef struct _XfceFilenameInputClass XfceFilenameInputClass; 32 | typedef struct _XfceFilenameInput XfceFilenameInput; 33 | 34 | #define XFCE_TYPE_FILENAME_INPUT (xfce_filename_input_get_type ()) 35 | #define XFCE_FILENAME_INPUT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_FILENAME_INPUT, XfceFilenameInput)) 36 | #define XFCE_IS_FILENAME_INPUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_FILENAME_INPUT)) 37 | #define XFCE_FILENAME_INPUT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_FILENAME_INPUT, XfceFilenameInputClass)) 38 | #define XFCE_IS_FILENAME_INPUT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_FILENAME_INPUT)) 39 | #define XFCE_FILENAME_INPUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_FILENAME_INPUT, XfceFilenameInputClass)) 40 | 41 | GType 42 | xfce_filename_input_get_type (void) G_GNUC_CONST; 43 | 44 | const gchar * 45 | xfce_filename_input_get_text (XfceFilenameInput *filename_input); 46 | 47 | void 48 | xfce_filename_input_check (XfceFilenameInput *filename_input); 49 | 50 | GtkEntry * 51 | xfce_filename_input_get_entry (XfceFilenameInput *filename_input); 52 | 53 | void 54 | xfce_filename_input_sensitise_widget (GtkWidget *widget); 55 | 56 | void 57 | xfce_filename_input_desensitise_widget (GtkWidget *widget); 58 | 59 | 60 | G_END_DECLS 61 | 62 | #endif /* !__XFCE_FILENAME_INPUT_H__ */ 63 | -------------------------------------------------------------------------------- /libxfce4ui/xfce-gdk-extensions.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2003-2007 Benedikt Meurer 3 | * Copyright (c) 2007 The Xfce Development Team 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 7 | * License as published by the Free Software Foundation; either 8 | * version 2 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 | * 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, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 18 | * MA 02110-1301 USA 19 | */ 20 | 21 | /** 22 | * SECTION:xfce-gdk-extensions 23 | * @title: Gdk Extensions 24 | * @short_description: various extensions to Gdk 25 | * @stability: Stable 26 | * @include: libxfce4ui/libxfce4ui.h 27 | * 28 | * Common used functions that are not provided by the Gdk or Gdk-pixbuf library. 29 | **/ 30 | 31 | #ifdef HAVE_CONFIG_H 32 | #include "config.h" 33 | #endif 34 | 35 | #ifdef HAVE_STRING_H 36 | #include 37 | #endif 38 | 39 | #include "libxfce4ui-private.h" 40 | #include "xfce-gdk-extensions.h" 41 | #include "libxfce4ui-visibility.h" 42 | 43 | 44 | 45 | /** 46 | * xfce_gdk_monitor_get_number: 47 | * @monitor : a #GdkMonitor. 48 | * 49 | * Returns the index of the @monitor in its display. 50 | * 51 | * Return value: index of the @monitor 52 | **/ 53 | static gint 54 | xfce_gdk_monitor_get_number (GdkMonitor *monitor) 55 | { 56 | GdkDisplay *display; 57 | int num_monitors; 58 | 59 | display = gdk_monitor_get_display (monitor); 60 | num_monitors = gdk_display_get_n_monitors (display); 61 | for (int i = 0; i < num_monitors; i++) 62 | if (gdk_display_get_monitor (display, i) == monitor) 63 | return i; 64 | 65 | return -1; 66 | } 67 | 68 | 69 | /** 70 | * xfce_gdk_screen_get_active: 71 | * @monitor_return : (out) (nullable): Address to store the monitor number to or %NULL. 72 | * 73 | * Returns the currently active #GdkScreen, that is, the screen which 74 | * currently contains the pointer. If no active screen was found, the 75 | * default #GdkScreen is returned. 76 | * 77 | * Return value: (transfer none): the currently active #GdkScreen. 78 | **/ 79 | GdkScreen * 80 | xfce_gdk_screen_get_active (gint *monitor_return) 81 | { 82 | GdkDisplay *display; 83 | GdkMonitor *monitor; 84 | gint rootx, rooty; 85 | GdkScreen *screen; 86 | 87 | GdkSeat *seat; 88 | 89 | display = gdk_display_get_default (); 90 | seat = gdk_display_get_default_seat (display); 91 | gdk_device_get_position (gdk_seat_get_pointer (seat), &screen, &rootx, &rooty); 92 | 93 | if (G_UNLIKELY (screen == NULL)) 94 | { 95 | screen = gdk_screen_get_default (); 96 | if (monitor_return != NULL) 97 | *monitor_return = 0; 98 | } 99 | else 100 | { 101 | /* return the monitor number */ 102 | if (monitor_return != NULL) 103 | { 104 | monitor = gdk_display_get_monitor_at_point (display, rootx, rooty); 105 | *monitor_return = xfce_gdk_monitor_get_number (monitor); 106 | } 107 | } 108 | 109 | return screen; 110 | } 111 | 112 | 113 | /** 114 | * xfce_gdk_screen_get_geometry: 115 | * 116 | * Returns the width and height of the default #GdkScreen. 117 | * This is a replacement for gdk_screen_width/gdk_screen_height. 118 | * 119 | * Return value: (transfer full): a newly created #GdkRectangle 120 | * containing the width and height of the screen. 121 | * 122 | * Since: 4.14 123 | **/ 124 | GdkRectangle * 125 | xfce_gdk_screen_get_geometry (void) 126 | { 127 | GdkRectangle *geometry; 128 | gint x, y, w, h; 129 | int num_monitors; 130 | GdkDisplay *display; 131 | GdkRectangle rect; 132 | GdkMonitor *monitor; 133 | 134 | geometry = g_new0 (GdkRectangle, 1); 135 | 136 | display = gdk_display_get_default (); 137 | num_monitors = gdk_display_get_n_monitors (display); 138 | 139 | x = y = G_MAXINT; 140 | w = h = G_MININT; 141 | 142 | for (int i = 0; i < num_monitors; i++) 143 | { 144 | monitor = gdk_display_get_monitor (display, i); 145 | gdk_monitor_get_geometry (monitor, &rect); 146 | 147 | x = MIN (x, rect.x); 148 | y = MIN (y, rect.y); 149 | w = MAX (w, rect.x + rect.width); 150 | h = MAX (h, rect.y + rect.height); 151 | } 152 | 153 | geometry->width = w - x; 154 | geometry->height = h - y; 155 | 156 | return geometry; 157 | } 158 | 159 | 160 | 161 | /** 162 | * xfce_gdk_device_grab: 163 | * @seat : A #GdkSeat. 164 | * @window : The #GdkWindow which will own the grab. 165 | * @capabilities : Capabilities that will be grabbed. 166 | * @cursor : (nullable): The cursor to display while the grab is active. If this 167 | * is %NULL then the normal cursors are used for window and 168 | * its descendants, and the cursor for window is used 169 | * elsewhere. 170 | * 171 | * Similar to gdk_seat_grab but tries to grab the seat five times with 100ms 172 | * between each attempt. 173 | * 174 | * Return value: %TRUE on success, %FALSE otherwise. 175 | * 176 | * Since: 4.18 177 | **/ 178 | gboolean 179 | xfce_gdk_device_grab (GdkSeat *seat, 180 | GdkWindow *window, 181 | GdkSeatCapabilities capabilities, 182 | GdkCursor *cursor) 183 | { 184 | GdkGrabStatus status; 185 | gint attempts = 0; 186 | 187 | while (TRUE) 188 | { 189 | status = gdk_seat_grab (seat, window, capabilities, FALSE, cursor, NULL, 190 | NULL, NULL); 191 | 192 | if (status == GDK_GRAB_SUCCESS) 193 | return TRUE; 194 | if (attempts++ >= 5) 195 | return FALSE; 196 | 197 | /* Wait 100ms before trying again, useful when invoked by global hotkey 198 | * because xfsettings will grab the key for a moment */ 199 | g_usleep (100000); 200 | } 201 | 202 | return FALSE; 203 | } 204 | 205 | #define __XFCE_GDK_EXTENSIONS_C__ 206 | #include "libxfce4ui-visibility.c" 207 | -------------------------------------------------------------------------------- /libxfce4ui/xfce-gdk-extensions.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007 The Xfce Development Team 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | * MA 02110-1301 USA 18 | */ 19 | 20 | #if !defined(_LIBXFCE4UI_INSIDE_LIBXFCE4UI_H) && !defined(LIBXFCE4UI_COMPILATION) 21 | #error "Only can be included directly, this file is not part of the public API." 22 | #endif 23 | 24 | #ifndef __XFCE_GDK_EXTENSIONS_H__ 25 | #define __XFCE_GDK_EXTENSIONS_H__ 26 | 27 | #include 28 | #include 29 | 30 | G_BEGIN_DECLS 31 | 32 | GdkScreen * 33 | xfce_gdk_screen_get_active (gint *monitor_return); 34 | 35 | GdkRectangle * 36 | xfce_gdk_screen_get_geometry (void); 37 | 38 | gboolean 39 | xfce_gdk_device_grab (GdkSeat *seat, 40 | GdkWindow *window, 41 | GdkSeatCapabilities capabilities, 42 | GdkCursor *cursor); 43 | 44 | G_END_DECLS 45 | 46 | #endif /* !__XFCE_GDK_EXTENSIONS_H__ */ 47 | -------------------------------------------------------------------------------- /libxfce4ui/xfce-gdk-pixbuf-extensions.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2004-2006 os-cillation e.K. 3 | * 4 | * Written by Benedikt Meurer . 5 | * 6 | * This library is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU Library General Public 8 | * License as published by the Free Software Foundation; either 9 | * version 2 of the License, or (at your option) any later version. 10 | * 11 | * This library is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * Library General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU Lesser General Public 17 | * License along with this library; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301 USA 20 | */ 21 | 22 | #if !defined(_LIBXFCE4UI_INSIDE_LIBXFCE4UI_H) && !defined(LIBXFCE4UI_COMPILATION) 23 | #error "Only can be included directly, this file is not part of the public API." 24 | #endif 25 | 26 | #ifndef __XFCE_GDK_PIXBUF_EXTENSIONS_H__ 27 | #define __XFCE_GDK_PIXBUF_EXTENSIONS_H__ 28 | 29 | #include 30 | 31 | G_BEGIN_DECLS 32 | 33 | GdkPixbuf * 34 | xfce_gdk_pixbuf_frame (const GdkPixbuf *source, 35 | const GdkPixbuf *frame, 36 | gint left_offset, 37 | gint top_offset, 38 | gint right_offset, 39 | gint bottom_offset) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT; 40 | 41 | GdkPixbuf * 42 | xfce_gdk_pixbuf_lucent (const GdkPixbuf *source, 43 | guint percent) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT; 44 | 45 | GdkPixbuf * 46 | xfce_gdk_pixbuf_scale_down (GdkPixbuf *source, 47 | gboolean preserve_aspect_ratio, 48 | gint dest_width, 49 | gint dest_height) G_GNUC_WARN_UNUSED_RESULT; 50 | 51 | GdkPixbuf * 52 | xfce_gdk_pixbuf_scale_ratio (GdkPixbuf *source, 53 | gint dest_size) G_GNUC_WARN_UNUSED_RESULT; 54 | 55 | GdkPixbuf * 56 | xfce_gdk_pixbuf_new_from_file_at_max_size (const gchar *filename, 57 | gint max_width, 58 | gint max_height, 59 | gboolean preserve_aspect_ratio, 60 | GError **error) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT; 61 | 62 | G_END_DECLS 63 | 64 | #endif /* !__XFCE_GDK_PIXBUF_EXTENSIONS_H__ */ 65 | -------------------------------------------------------------------------------- /libxfce4ui/xfce-icon-chooser-dialog.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2005-2006 Benedikt Meurer 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 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 | * Library 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, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | * MA 02110-1301 USA 18 | */ 19 | 20 | #if !defined(_LIBXFCE4UI_INSIDE_LIBXFCE4UI_H) && !defined(LIBXFCE4UI_COMPILATION) 21 | #error "Only can be included directly, this file is not part of the public API." 22 | #endif 23 | 24 | #ifndef __XFCE_ICON_CHOOSER_DIALOG_H__ 25 | #define __XFCE_ICON_CHOOSER_DIALOG_H__ 26 | 27 | #include 28 | 29 | G_BEGIN_DECLS 30 | 31 | #define XFCE_TYPE_ICON_CHOOSER_DIALOG (xfce_icon_chooser_dialog_get_type ()) 32 | G_DECLARE_FINAL_TYPE (XfceIconChooserDialog, xfce_icon_chooser_dialog, XFCE, ICON_CHOOSER_DIALOG, GtkDialog) 33 | 34 | GtkWidget * 35 | xfce_icon_chooser_dialog_new (const gchar *title, 36 | GtkWindow *parent, 37 | const gchar *first_button_text, 38 | ...) G_GNUC_MALLOC G_GNUC_NULL_TERMINATED G_GNUC_WARN_UNUSED_RESULT; 39 | 40 | gchar * 41 | xfce_icon_chooser_dialog_get_icon (XfceIconChooserDialog *dialog) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT; 42 | gboolean 43 | xfce_icon_chooser_dialog_set_icon (XfceIconChooserDialog *dialog, 44 | const gchar *icon); 45 | 46 | G_END_DECLS 47 | 48 | #endif /* !__XFCE_ICON_CHOOSER_DIALOG_H__ */ 49 | -------------------------------------------------------------------------------- /libxfce4ui/xfce-icon-chooser-model.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2005-2006 Benedikt Meurer 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 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 | * Library 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, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | * MA 02110-1301 USA 18 | */ 19 | 20 | #if !defined(_LIBXFCE4UI_INSIDE_LIBXFCE4UI_H) && !defined(LIBXFCE4UI_COMPILATION) 21 | #error "Only can be included directly, this file is not part of the public API." 22 | #endif 23 | 24 | #ifndef __XFCE_ICON_CHOOSER_MODEL_H__ 25 | #define __XFCE_ICON_CHOOSER_MODEL_H__ 26 | 27 | #include 28 | 29 | G_BEGIN_DECLS 30 | 31 | #define XFCE_TYPE_ICON_CHOOSER_MODEL (xfce_icon_chooser_model_get_type ()) 32 | G_DECLARE_FINAL_TYPE (XfceIconChooserModel, xfce_icon_chooser_model, XFCE, ICON_CHOOSER_MODEL, GObject) 33 | 34 | /** 35 | * XfceIconChooserContexts: 36 | * 37 | * The list of default contexts for the icon themes 38 | * according to the Icon Naming Spec, Version 0.7. 39 | **/ 40 | typedef enum 41 | { 42 | /* the contexts provided by the model */ 43 | XFCE_ICON_CHOOSER_CONTEXT_ACTIONS, 44 | XFCE_ICON_CHOOSER_CONTEXT_ANIMATIONS, 45 | XFCE_ICON_CHOOSER_CONTEXT_APPLICATIONS, 46 | XFCE_ICON_CHOOSER_CONTEXT_CATEGORIES, 47 | XFCE_ICON_CHOOSER_CONTEXT_DEVICES, 48 | XFCE_ICON_CHOOSER_CONTEXT_EMBLEMS, 49 | XFCE_ICON_CHOOSER_CONTEXT_EMOTES, 50 | XFCE_ICON_CHOOSER_CONTEXT_MIME_TYPES, 51 | XFCE_ICON_CHOOSER_CONTEXT_PLACES, 52 | XFCE_ICON_CHOOSER_CONTEXT_STATUS, 53 | XFCE_ICON_CHOOSER_CONTEXT_STOCK, 54 | XFCE_ICON_CHOOSER_CONTEXT_OTHER, 55 | XFCE_ICON_CHOOSER_N_CONTEXTS, 56 | 57 | /* not provided by the model (plus separators before them) */ 58 | XFCE_ICON_CHOOSER_CONTEXT_ALL = XFCE_ICON_CHOOSER_CONTEXT_OTHER + 2, 59 | XFCE_ICON_CHOOSER_CONTEXT_FILE = XFCE_ICON_CHOOSER_CONTEXT_OTHER + 4, 60 | XFCE_ICON_CHOOSER_CONTEXT_NO_ICON = XFCE_ICON_CHOOSER_CONTEXT_OTHER + 6, 61 | } XfceIconChooserContext; 62 | 63 | /** 64 | * XfceIconChooserModelColumns: 65 | * @XFCE_ICON_CHOOSER_MODEL_COLUMN_CONTEXT : the context of the icon. 66 | * @XFCE_ICON_CHOOSER_MODEL_COLUMN_ICON_NAME : the name of the icon. 67 | * @XFCE_ICON_CHOOSER_MODEL_N_COLUMNS : the number of columns. 68 | * 69 | * The columns provided by the #XfceIconChooserModel. 70 | **/ 71 | typedef enum 72 | { 73 | XFCE_ICON_CHOOSER_MODEL_COLUMN_CONTEXT, 74 | XFCE_ICON_CHOOSER_MODEL_COLUMN_ICON_NAME, 75 | XFCE_ICON_CHOOSER_MODEL_N_COLUMNS, 76 | } XfceIconChooserModelColumn; 77 | 78 | G_GNUC_INTERNAL XfceIconChooserModel * 79 | xfce_icon_chooser_model_get_for_widget (GtkWidget *widget) G_GNUC_WARN_UNUSED_RESULT; 80 | G_GNUC_INTERNAL XfceIconChooserModel * 81 | xfce_icon_chooser_model_get_for_icon_theme (GtkIconTheme *icon_theme) G_GNUC_WARN_UNUSED_RESULT; 82 | 83 | G_GNUC_INTERNAL gboolean 84 | xfce_icon_chooser_model_get_iter_for_icon_name (XfceIconChooserModel *model, 85 | GtkTreeIter *iter, 86 | const gchar *icon_name); 87 | 88 | G_END_DECLS 89 | 90 | #endif /* !__XFCE_ICON_CHOOSER_MODEL_H__ */ 91 | -------------------------------------------------------------------------------- /libxfce4ui/xfce-notebook.c: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2025 The XFCE Development Team 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 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 | * Library 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, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | * MA 02110-1301 USA 18 | */ 19 | 20 | #ifdef HAVE_CONFIG_H 21 | #include "config.h" 22 | #endif 23 | 24 | #include 25 | 26 | #include "libxfce4ui-private.h" 27 | #include "xfce-gtk-extensions.h" 28 | #include "xfce-notebook.h" 29 | #include "libxfce4ui-visibility.h" 30 | 31 | /** 32 | * SECTION: xfce-notebook 33 | * @title: XfceNotebook 34 | * @short_description: An improved version of #GtkNotebook 35 | * @include: libxfce4ui/libxfce4ui.h 36 | * 37 | * The #XfceNotebook class derives from #GtkNotebook and extends it with 38 | * the ability to scroll through tabs. 39 | **/ 40 | 41 | 42 | 43 | static void 44 | xfce_notebook_finalize (GObject *object); 45 | 46 | static gboolean 47 | xfce_notebook_scroll_event (GtkWidget *widget, 48 | GdkEventScroll *event); 49 | 50 | 51 | 52 | /** 53 | * XfceNotebook: 54 | * 55 | * The #XfceNotebook struct contains only private fields and should 56 | * not be directly accessed. 57 | **/ 58 | struct _XfceNotebook 59 | { 60 | GtkNotebook __parent__; 61 | }; 62 | 63 | 64 | 65 | G_DEFINE_TYPE (XfceNotebook, xfce_notebook, GTK_TYPE_NOTEBOOK) 66 | 67 | static void 68 | xfce_notebook_class_init (XfceNotebookClass *klass) 69 | { 70 | GtkWidgetClass *gtk_widget_class; 71 | GObjectClass *gobject_class; 72 | 73 | gobject_class = G_OBJECT_CLASS (klass); 74 | gobject_class->finalize = xfce_notebook_finalize; 75 | 76 | gtk_widget_class = GTK_WIDGET_CLASS (klass); 77 | gtk_widget_class->scroll_event = xfce_notebook_scroll_event; 78 | 79 | /* make sure to use the translations from libxfce4ui */ 80 | bindtextdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR); 81 | #ifdef HAVE_BIND_TEXTDOMAIN_CODESET 82 | bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); 83 | #endif 84 | } 85 | 86 | static void 87 | xfce_notebook_init (XfceNotebook *notebook) 88 | { 89 | gtk_widget_add_events (GTK_WIDGET (notebook), GDK_SCROLL_MASK); 90 | } 91 | 92 | static void 93 | xfce_notebook_finalize (GObject *object) 94 | { 95 | G_OBJECT_CLASS (xfce_notebook_parent_class)->finalize (object); 96 | } 97 | 98 | static gboolean 99 | xfce_notebook_scroll_event (GtkWidget *notebook, 100 | GdkEventScroll *event) 101 | { 102 | g_return_val_if_fail (GTK_IS_NOTEBOOK (notebook), FALSE); 103 | 104 | if ((event->state & gtk_accelerator_get_default_mod_mask ()) != 0) 105 | return FALSE; 106 | 107 | switch (event->direction) 108 | { 109 | case GDK_SCROLL_RIGHT: 110 | case GDK_SCROLL_DOWN: 111 | gtk_notebook_next_page (GTK_NOTEBOOK (notebook)); 112 | return TRUE; 113 | 114 | case GDK_SCROLL_LEFT: 115 | case GDK_SCROLL_UP: 116 | gtk_notebook_prev_page (GTK_NOTEBOOK (notebook)); 117 | return TRUE; 118 | 119 | default: /* GDK_SCROLL_SMOOTH */ 120 | switch (gtk_notebook_get_tab_pos (GTK_NOTEBOOK (notebook))) 121 | { 122 | case GTK_POS_LEFT: 123 | case GTK_POS_RIGHT: 124 | if (event->delta_y > 0) 125 | gtk_notebook_next_page (GTK_NOTEBOOK (notebook)); 126 | else if (event->delta_y < 0) 127 | gtk_notebook_prev_page (GTK_NOTEBOOK (notebook)); 128 | break; 129 | 130 | default: /* GTK_POS_TOP or GTK_POS_BOTTOM */ 131 | if (event->delta_x > 0) 132 | gtk_notebook_next_page (GTK_NOTEBOOK (notebook)); 133 | else if (event->delta_x < 0) 134 | gtk_notebook_prev_page (GTK_NOTEBOOK (notebook)); 135 | break; 136 | } 137 | return TRUE; 138 | } 139 | /* don't chain-up to parent here: it is not necessary and the parent class method 140 | * is defined only from GTK 3.24.13 */ 141 | return TRUE; 142 | } 143 | 144 | 145 | 146 | /** 147 | * xfce_notebook_new: 148 | * 149 | * Allocates a new #XfceNotebook instance. 150 | * 151 | * Returns: (transfer full): the newly allocated #XfceNotebook. 152 | * 153 | * Since: 4.21.1 154 | **/ 155 | GtkWidget * 156 | xfce_notebook_new (void) 157 | { 158 | return g_object_new (XFCE_TYPE_NOTEBOOK, NULL); 159 | } 160 | 161 | 162 | 163 | #define __XFCE_NOTEBOOK_C__ 164 | #include "libxfce4ui-visibility.c" 165 | -------------------------------------------------------------------------------- /libxfce4ui/xfce-notebook.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2025 The XFCE Development Team 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 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 | * Library 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, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | * MA 02110-1301 USA 18 | */ 19 | 20 | #if !defined(_LIBXFCE4UI_INSIDE_LIBXFCE4UI_H) && !defined(LIBXFCE4UI_COMPILATION) 21 | #error "Only can be included directly, this file is not part of the public API." 22 | #endif 23 | 24 | #ifndef __XFCE_NOTEBOOK_H__ 25 | #define __XFCE_NOTEBOOK_H__ 26 | 27 | #include 28 | 29 | G_BEGIN_DECLS 30 | 31 | #define XFCE_TYPE_NOTEBOOK (xfce_notebook_get_type ()) 32 | G_DECLARE_FINAL_TYPE (XfceNotebook, xfce_notebook, XFCE, NOTEBOOK, GtkNotebook) 33 | 34 | GtkWidget * 35 | xfce_notebook_new (void) G_GNUC_MALLOC; 36 | 37 | G_END_DECLS 38 | 39 | #endif /* !__XFCE_NOTEBOOK_H__ */ 40 | -------------------------------------------------------------------------------- /libxfce4ui/xfce-screensaver.h: -------------------------------------------------------------------------------- 1 | /* 2 | * * Copyright (C) 2016 Eric Koegel 3 | * 4 | * Licensed under the GNU General Public License Version 2 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | 21 | #if !defined(_LIBXFCE4UI_INSIDE_LIBXFCE4UI_H) && !defined(LIBXFCE4UI_COMPILATION) 22 | #error "Only can be included directly, this file is not part of the public API." 23 | #endif 24 | 25 | /* 26 | * __XFCE_SCREENSAVER_H is to avoid conflicting types when building xfce4-session and 27 | * xfce4-power-manager <= 4.18.0 with libxfce4ui >= 4.18.2. 28 | * __XFCE_SCREENSAVER_H__ is for GNU visibility generation. 29 | */ 30 | #if !defined(__XFCE_SCREENSAVER_H) && !defined(__XFCE_SCREENSAVER_H__) 31 | #define __XFCE_SCREENSAVER_H 32 | #define __XFCE_SCREENSAVER_H__ 33 | 34 | #include 35 | 36 | G_BEGIN_DECLS 37 | 38 | #define XFCE_TYPE_SCREENSAVER (xfce_screensaver_get_type ()) 39 | G_DECLARE_FINAL_TYPE (XfceScreensaver, xfce_screensaver, XFCE, SCREENSAVER, GObject) 40 | 41 | /* for compatibility with xfce4-session and xfce4-power-manager <= 4.18.0 as above */ 42 | typedef XfceScreensaver XfceScreenSaver; 43 | 44 | XfceScreensaver * 45 | xfce_screensaver_new (void); 46 | 47 | void 48 | xfce_screensaver_inhibit (XfceScreensaver *saver, 49 | gboolean inhibit); 50 | 51 | gboolean 52 | xfce_screensaver_lock (XfceScreensaver *saver); 53 | 54 | G_END_DECLS 55 | 56 | #endif /* __XFCE_SCREENSAVER_H && __XFCE_SCREENSAVER_H__ */ 57 | -------------------------------------------------------------------------------- /libxfce4ui/xfce-sm-client.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009 Brian Tarricone 3 | * Copyright (C) 1999 Olivier Fourdan 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 7 | * License as published by the Free Software Foundation; either 8 | * version 2 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 | * 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, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 18 | * MA 02110-1301 USA 19 | */ 20 | 21 | #if !defined(_LIBXFCE4UI_INSIDE_LIBXFCE4UI_H) && !defined(LIBXFCE4UI_COMPILATION) 22 | #error "Only can be included directly, this file is not part of the public API." 23 | #endif 24 | 25 | #ifndef __XFCE_SM_CLIENT_H__ 26 | #define __XFCE_SM_CLIENT_H__ 27 | 28 | #include 29 | #include 30 | 31 | #define XFCE_TYPE_SM_CLIENT (xfce_sm_client_get_type ()) 32 | #define XFCE_SM_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_SM_CLIENT, XfceSMClient)) 33 | #define XFCE_IS_SM_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_SM_CLIENT)) 34 | #define XFCE_SM_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_SM_CLIENT, XfceSMClientClass)) 35 | #define XFCE_IS_SM_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_SM_CLIENT)) 36 | #define XFCE_SM_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_SM_CLIENT, XfceSMClientClass)) 37 | 38 | /** 39 | * XFCE_SM_CLIENT_ERROR: 40 | * 41 | * Error domain for XfceSmCLient. Errors in this domain will be from the #XfceSmCLientErrorEnum enumeration. 42 | * See #GError for more information on error domains. 43 | **/ 44 | #define XFCE_SM_CLIENT_ERROR xfce_sm_client_error_quark () 45 | 46 | G_BEGIN_DECLS 47 | 48 | typedef struct _XfceSMClient XfceSMClient; 49 | 50 | GType 51 | xfce_sm_client_get_type (void) G_GNUC_CONST; 52 | 53 | GQuark 54 | xfce_sm_client_error_quark (void); 55 | 56 | GOptionGroup * 57 | xfce_sm_client_get_option_group (gint argc, 58 | gchar **argv); 59 | 60 | XfceSMClient * 61 | xfce_sm_client_get (void); 62 | 63 | XfceSMClient * 64 | xfce_sm_client_get_with_argv (gint argc, 65 | gchar **argv, 66 | XfceSMClientRestartStyle restart_style, 67 | guchar priority); 68 | 69 | XfceSMClient * 70 | xfce_sm_client_get_full (XfceSMClientRestartStyle restart_style, 71 | guchar priority, 72 | const gchar *resumed_client_id, 73 | const gchar *current_directory, 74 | const gchar **restart_command, 75 | const gchar *desktop_file); 76 | 77 | gboolean 78 | xfce_sm_client_connect (XfceSMClient *sm_client, 79 | GError **error); 80 | void 81 | xfce_sm_client_disconnect (XfceSMClient *sm_client); 82 | 83 | void 84 | xfce_sm_client_request_shutdown (XfceSMClient *sm_client, 85 | XfceSMClientShutdownHint shutdown_hint); 86 | 87 | gboolean 88 | xfce_sm_client_is_connected (XfceSMClient *sm_client); 89 | gboolean 90 | xfce_sm_client_is_resumed (XfceSMClient *sm_client); 91 | 92 | void 93 | xfce_sm_client_set_desktop_file (XfceSMClient *sm_client, 94 | const gchar *desktop_file); 95 | 96 | const gchar * 97 | xfce_sm_client_get_client_id (XfceSMClient *sm_client); 98 | 99 | const gchar * 100 | xfce_sm_client_get_state_file (XfceSMClient *sm_client); 101 | 102 | void 103 | xfce_sm_client_set_restart_style (XfceSMClient *sm_client, 104 | XfceSMClientRestartStyle restart_style); 105 | XfceSMClientRestartStyle 106 | xfce_sm_client_get_restart_style (XfceSMClient *sm_client); 107 | 108 | void 109 | xfce_sm_client_set_priority (XfceSMClient *sm_client, 110 | guint8 priority); 111 | guint8 112 | xfce_sm_client_get_priority (XfceSMClient *sm_client); 113 | 114 | void 115 | xfce_sm_client_set_current_directory (XfceSMClient *sm_client, 116 | const gchar *current_directory); 117 | const gchar * 118 | xfce_sm_client_get_current_directory (XfceSMClient *sm_client); 119 | 120 | void 121 | xfce_sm_client_set_restart_command (XfceSMClient *sm_client, 122 | gchar **restart_command); 123 | const gchar *const * 124 | xfce_sm_client_get_restart_command (XfceSMClient *sm_client); 125 | 126 | G_END_DECLS 127 | 128 | #endif /* __XFCE_SM_CLIENT_H__ */ 129 | -------------------------------------------------------------------------------- /libxfce4ui/xfce-spawn.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2007 The Xfce Development Team 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | * MA 02110-1301 USA 18 | */ 19 | 20 | #if !defined(_LIBXFCE4UI_INSIDE_LIBXFCE4UI_H) && !defined(LIBXFCE4UI_COMPILATION) 21 | #error "Only can be included directly, this file is not part of the public API." 22 | #endif 23 | 24 | #ifndef __XFCE_SPAWN_H__ 25 | #define __XFCE_SPAWN_H__ 26 | 27 | #include 28 | 29 | G_BEGIN_DECLS 30 | 31 | gboolean 32 | xfce_spawn_on_screen_with_child_watch (GdkScreen *screen, 33 | const gchar *working_directory, 34 | gchar **argv, 35 | gchar **envp, 36 | GSpawnFlags flags, 37 | gboolean startup_notify, 38 | guint32 startup_timestamp, 39 | const gchar *startup_icon_name, 40 | GClosure *child_watch_closure, 41 | GError **error); 42 | 43 | gboolean 44 | xfce_spawn_on_screen (GdkScreen *screen, 45 | const gchar *working_directory, 46 | gchar **argv, 47 | gchar **envp, 48 | GSpawnFlags flags, 49 | gboolean startup_notify, 50 | guint32 startup_timestamp, 51 | const gchar *startup_icon_name, 52 | GError **error) 53 | G_GNUC_DEPRECATED_FOR (xfce_spawn ()); 54 | 55 | gboolean 56 | xfce_spawn (GdkScreen *screen, 57 | const gchar *working_directory, 58 | gchar **argv, 59 | gchar **envp, 60 | GSpawnFlags flags, 61 | gboolean startup_notify, 62 | guint32 startup_timestamp, 63 | const gchar *startup_icon_name, 64 | gboolean child_process, 65 | GError **error); 66 | 67 | gboolean 68 | xfce_spawn_command_line_on_screen (GdkScreen *screen, 69 | const gchar *command_line, 70 | gboolean in_terminal, 71 | gboolean startup_notify, 72 | GError **error) 73 | G_GNUC_DEPRECATED_FOR (xfce_spawn_command_line ()); 74 | 75 | gboolean 76 | xfce_spawn_command_line (GdkScreen *screen, 77 | const gchar *command_line, 78 | gboolean in_terminal, 79 | gboolean startup_notify, 80 | gboolean child_process, 81 | GError **error); 82 | 83 | G_END_DECLS 84 | 85 | #endif /* !__XFCE_SPAWN_H__ */ 86 | -------------------------------------------------------------------------------- /libxfce4ui/xfce-thumbnail-preview.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2006 Benedikt Meurer 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 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 | * Library 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, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | * MA 02110-1301 USA 18 | */ 19 | 20 | #if !defined(_LIBXFCE4UI_INSIDE_LIBXFCE4UI_H) && !defined(LIBXFCE4UI_COMPILATION) 21 | #error "Only can be included directly, this file is not part of the public API." 22 | #endif 23 | 24 | #ifndef __XFCE_THUMBNAIL_PREVIEW_H__ 25 | #define __XFCE_THUMBNAIL_PREVIEW_H__ 26 | 27 | #include 28 | 29 | G_BEGIN_DECLS 30 | 31 | #define XFCE_TYPE_THUMBNAIL_PREVIEW (xfce_thumbnail_preview_get_type ()) 32 | G_DECLARE_FINAL_TYPE (XfceThumbnailPreview, xfce_thumbnail_preview, XFCE, THUMBNAIL_PREVIEW, GtkFrame) 33 | 34 | G_GNUC_INTERNAL GtkWidget * 35 | xfce_thumbnail_preview_new (void) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT; 36 | 37 | G_GNUC_INTERNAL void 38 | xfce_thumbnail_preview_set_uri (XfceThumbnailPreview *preview, 39 | const gchar *uri); 40 | 41 | G_END_DECLS 42 | 43 | #endif /* !__XFCE_THUMBNAIL_PREVIEW_H__ */ 44 | -------------------------------------------------------------------------------- /libxfce4ui/xfce-thumbnail.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2005-2006 Benedikt Meurer 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 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 | * Library 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, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | * MA 02110-1301 USA 18 | */ 19 | 20 | #if !defined(_LIBXFCE4UI_INSIDE_LIBXFCE4UI_H) && !defined(LIBXFCE4UI_COMPILATION) 21 | #error "Only can be included directly, this file is not part of the public API." 22 | #endif 23 | 24 | #ifndef __XFCE_THUMBNAIL_H__ 25 | #define __XFCE_THUMBNAIL_H__ 26 | 27 | #include 28 | 29 | G_BEGIN_DECLS 30 | 31 | /** 32 | * XfceThumbnailSize: 33 | * @XFCE_THUMBNAIL_SIZE_NORMAL : normal sized thumbnails (up to 128px). 34 | * @XFCE_THUMBNAIL_SIZE_LARGE : large sized thumbnails. 35 | * 36 | * Thumbnail sizes used by the thumbnail database. 37 | **/ 38 | typedef enum /*< skip >*/ 39 | { 40 | XFCE_THUMBNAIL_SIZE_NORMAL = 128, 41 | XFCE_THUMBNAIL_SIZE_LARGE = 256, 42 | } XfceThumbnailSize; 43 | 44 | G_GNUC_INTERNAL GdkPixbuf * 45 | xfce_thumbnail_get_for_file (const gchar *filename, 46 | XfceThumbnailSize size, 47 | GError **error) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT; 48 | G_GNUC_INTERNAL GdkPixbuf * 49 | xfce_thumbnail_get_for_uri (const gchar *uri, 50 | XfceThumbnailSize size, 51 | GError **error) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT; 52 | 53 | G_END_DECLS 54 | 55 | #endif /* !__XFCE_THUMBNAIL_H__ */ 56 | -------------------------------------------------------------------------------- /libxfce4ui/xfce-titled-dialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006 Benedikt Meurer . 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 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 | * Library General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Library General Public 15 | * License along with this library; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | * MA 02110-1301 USA 18 | */ 19 | 20 | #if !defined(_LIBXFCE4UI_INSIDE_LIBXFCE4UI_H) && !defined(LIBXFCE4UI_COMPILATION) 21 | #error "Only can be included directly, this file is not part of the public API." 22 | #endif 23 | 24 | #ifndef __XFCE_TITLED_DIALOG_H__ 25 | #define __XFCE_TITLED_DIALOG_H__ 26 | 27 | #include 28 | 29 | G_BEGIN_DECLS 30 | 31 | typedef struct _XfceTitledDialogPrivate XfceTitledDialogPrivate; 32 | typedef struct _XfceTitledDialogClass XfceTitledDialogClass; 33 | typedef struct _XfceTitledDialog XfceTitledDialog; 34 | 35 | #define XFCE_TYPE_TITLED_DIALOG (xfce_titled_dialog_get_type ()) 36 | #define XFCE_TITLED_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_TITLED_DIALOG, XfceTitledDialog)) 37 | #define XFCE_TITLED_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_TITLED_DIALOG, XfceTitledDialogClass)) 38 | #define XFCE_IS_TITLED_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_TITLED_DIALOG)) 39 | #define XFCE_IS_TITLED_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_TITLED_DIALOG)) 40 | #define XFCE_TITLED_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_TITLED_DIALOG, XfceTitledDialogClass)) 41 | 42 | struct _XfceTitledDialogClass 43 | { 44 | /*< private >*/ 45 | GtkDialogClass __parent__; 46 | 47 | /* reserved for future expansion */ 48 | void (*reserved0) (void); 49 | void (*reserved1) (void); 50 | void (*reserved2) (void); 51 | void (*reserved3) (void); 52 | void (*reserved4) (void); 53 | void (*reserved5) (void); 54 | }; 55 | 56 | /** 57 | * XfceTitledDialog: 58 | * 59 | * An opaque struct with only private fields. 60 | **/ 61 | struct _XfceTitledDialog 62 | { 63 | /*< private >*/ 64 | GtkDialog __parent__; 65 | XfceTitledDialogPrivate *priv; 66 | }; 67 | 68 | GType 69 | xfce_titled_dialog_get_type (void) G_GNUC_CONST; 70 | 71 | GtkWidget * 72 | xfce_titled_dialog_new (void) G_GNUC_MALLOC; 73 | GtkWidget * 74 | xfce_titled_dialog_new_with_buttons (const gchar *title, 75 | GtkWindow *parent, 76 | GtkDialogFlags flags, 77 | const gchar *first_button_text, 78 | ...) 79 | G_GNUC_MALLOC G_GNUC_DEPRECATED_FOR (xfce_titled_dialog_new_with_mixed_buttons ()); 80 | 81 | GtkWidget * 82 | xfce_titled_dialog_new_with_mixed_buttons (const gchar *title, 83 | GtkWindow *parent, 84 | GtkDialogFlags flags, 85 | const gchar *first_button_icon_name, 86 | const gchar *first_button_text, 87 | ...) G_GNUC_MALLOC; 88 | 89 | void 90 | xfce_titled_dialog_create_action_area (XfceTitledDialog *titled_dialog) G_GNUC_DEPRECATED; 91 | GtkWidget * 92 | xfce_titled_dialog_add_button (XfceTitledDialog *titled_dialog, 93 | const gchar *button_text, 94 | gint response_id); 95 | void 96 | xfce_titled_dialog_add_action_widget (XfceTitledDialog *titled_dialog, 97 | GtkWidget *child, 98 | gint response_id); 99 | void 100 | xfce_titled_dialog_set_default_response (XfceTitledDialog *titled_dialog, 101 | gint response_id); 102 | const gchar * 103 | xfce_titled_dialog_get_subtitle (XfceTitledDialog *titled_dialog); 104 | void 105 | xfce_titled_dialog_set_subtitle (XfceTitledDialog *titled_dialog, 106 | const gchar *subtitle); 107 | 108 | G_END_DECLS 109 | 110 | #endif /* !__XFCE_TITLED_DIALOG_H__ */ 111 | -------------------------------------------------------------------------------- /libxfce4ui/xfce-tree-view.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2004-2006 Benedikt Meurer 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 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 | * Library 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, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | * MA 02110-1301 USA 18 | */ 19 | 20 | #if !defined(_LIBXFCE4UI_INSIDE_LIBXFCE4UI_H) && !defined(LIBXFCE4UI_COMPILATION) 21 | #error "Only can be included directly, this file is not part of the public API." 22 | #endif 23 | 24 | #ifndef __XFCE_TREE_VIEW_H__ 25 | #define __XFCE_TREE_VIEW_H__ 26 | 27 | #include 28 | 29 | G_BEGIN_DECLS 30 | 31 | #define XFCE_TYPE_TREE_VIEW (xfce_tree_view_get_type ()) 32 | G_DECLARE_FINAL_TYPE (XfceTreeView, xfce_tree_view, XFCE, TREE_VIEW, GtkTreeView) 33 | 34 | GtkWidget * 35 | xfce_tree_view_new (void) G_GNUC_MALLOC; 36 | 37 | gboolean 38 | xfce_tree_view_get_single_click (XfceTreeView *tree_view); 39 | void 40 | xfce_tree_view_set_single_click (XfceTreeView *tree_view, 41 | gboolean single_click); 42 | 43 | guint 44 | xfce_tree_view_get_single_click_timeout (XfceTreeView *tree_view); 45 | void 46 | xfce_tree_view_set_single_click_timeout (XfceTreeView *tree_view, 47 | guint single_click_timeout); 48 | 49 | G_END_DECLS 50 | 51 | #endif /* !__XFCE_TREE_VIEW_H__ */ 52 | -------------------------------------------------------------------------------- /m4/introspection.m4: -------------------------------------------------------------------------------- 1 | dnl -*- mode: autoconf -*- 2 | dnl Copyright 2009 Johan Dahlin 3 | dnl 4 | dnl This file is free software; the author(s) gives unlimited 5 | dnl permission to copy and/or distribute it, with or without 6 | dnl modifications, as long as this notice is preserved. 7 | dnl 8 | 9 | # serial 1 10 | 11 | dnl This is a copy of AS_AC_EXPAND 12 | dnl 13 | dnl (C) 2003, 2004, 2005 Thomas Vander Stichele 14 | dnl Copying and distribution of this file, with or without modification, 15 | dnl are permitted in any medium without royalty provided the copyright 16 | dnl notice and this notice are preserved. 17 | m4_define([_GOBJECT_INTROSPECTION_AS_AC_EXPAND], 18 | [ 19 | EXP_VAR=[$1] 20 | FROM_VAR=[$2] 21 | 22 | dnl first expand prefix and exec_prefix if necessary 23 | prefix_save=$prefix 24 | exec_prefix_save=$exec_prefix 25 | 26 | dnl if no prefix given, then use /usr/local, the default prefix 27 | if test "x$prefix" = "xNONE"; then 28 | prefix="$ac_default_prefix" 29 | fi 30 | dnl if no exec_prefix given, then use prefix 31 | if test "x$exec_prefix" = "xNONE"; then 32 | exec_prefix=$prefix 33 | fi 34 | 35 | full_var="$FROM_VAR" 36 | dnl loop until it doesn't change anymore 37 | while true; do 38 | new_full_var="`eval echo $full_var`" 39 | if test "x$new_full_var" = "x$full_var"; then break; fi 40 | full_var=$new_full_var 41 | done 42 | 43 | dnl clean up 44 | full_var=$new_full_var 45 | AC_SUBST([$1], "$full_var") 46 | 47 | dnl restore prefix and exec_prefix 48 | prefix=$prefix_save 49 | exec_prefix=$exec_prefix_save 50 | ]) 51 | 52 | m4_define([_GOBJECT_INTROSPECTION_CHECK_INTERNAL], 53 | [ 54 | AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first 55 | AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first 56 | AC_BEFORE([LT_INIT],[$0])dnl setup libtool first 57 | 58 | dnl enable/disable introspection 59 | m4_if([$2], [require], 60 | [dnl 61 | enable_introspection=yes 62 | ],[dnl 63 | AC_ARG_ENABLE(introspection, 64 | AS_HELP_STRING([--enable-introspection[=@<:@no/auto/yes@:>@]], 65 | [Enable introspection for this build]),, 66 | [enable_introspection=auto]) 67 | ])dnl 68 | 69 | AC_MSG_CHECKING([for gobject-introspection]) 70 | 71 | dnl presence/version checking 72 | AS_CASE([$enable_introspection], 73 | [no], [dnl 74 | found_introspection="no (disabled, use --enable-introspection to enable)" 75 | ],dnl 76 | [yes],[dnl 77 | PKG_CHECK_EXISTS([gobject-introspection-1.0],, 78 | AC_MSG_ERROR([gobject-introspection-1.0 is not installed])) 79 | PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], 80 | found_introspection=yes, 81 | AC_MSG_ERROR([You need to have gobject-introspection >= $1 installed to build AC_PACKAGE_NAME])) 82 | ],dnl 83 | [auto],[dnl 84 | PKG_CHECK_EXISTS([gobject-introspection-1.0 >= $1], found_introspection=yes, found_introspection=no) 85 | dnl Canonicalize enable_introspection 86 | enable_introspection=$found_introspection 87 | ],dnl 88 | [dnl 89 | AC_MSG_ERROR([invalid argument passed to --enable-introspection, should be one of @<:@no/auto/yes@:>@]) 90 | ])dnl 91 | 92 | AC_MSG_RESULT([$found_introspection]) 93 | 94 | dnl expand datadir/libdir so we can pass them to pkg-config 95 | dnl and get paths relative to our target directories 96 | _GOBJECT_INTROSPECTION_AS_AC_EXPAND(_GI_EXP_DATADIR, "$datadir") 97 | _GOBJECT_INTROSPECTION_AS_AC_EXPAND(_GI_EXP_LIBDIR, "$libdir") 98 | 99 | INTROSPECTION_SCANNER= 100 | INTROSPECTION_COMPILER= 101 | INTROSPECTION_GENERATE= 102 | INTROSPECTION_GIRDIR= 103 | INTROSPECTION_TYPELIBDIR= 104 | if test "x$found_introspection" = "xyes"; then 105 | INTROSPECTION_SCANNER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` 106 | INTROSPECTION_COMPILER=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` 107 | INTROSPECTION_GENERATE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` 108 | INTROSPECTION_GIRDIR=`$PKG_CONFIG --define-variable=datadir="${_GI_EXP_DATADIR}" --variable=girdir gobject-introspection-1.0` 109 | INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --define-variable=libdir="${_GI_EXP_LIBDIR}" --variable=typelibdir gobject-introspection-1.0)" 110 | INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0` 111 | INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0` 112 | INTROSPECTION_MAKEFILE=$PKG_CONFIG_SYSROOT_DIR`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection 113 | fi 114 | AC_SUBST(INTROSPECTION_SCANNER) 115 | AC_SUBST(INTROSPECTION_COMPILER) 116 | AC_SUBST(INTROSPECTION_GENERATE) 117 | AC_SUBST(INTROSPECTION_GIRDIR) 118 | AC_SUBST(INTROSPECTION_TYPELIBDIR) 119 | AC_SUBST(INTROSPECTION_CFLAGS) 120 | AC_SUBST(INTROSPECTION_LIBS) 121 | AC_SUBST(INTROSPECTION_MAKEFILE) 122 | 123 | AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes") 124 | ]) 125 | 126 | 127 | dnl Usage: 128 | dnl GOBJECT_INTROSPECTION_CHECK([minimum-g-i-version]) 129 | 130 | AC_DEFUN([GOBJECT_INTROSPECTION_CHECK], 131 | [ 132 | _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1]) 133 | ]) 134 | 135 | dnl Usage: 136 | dnl GOBJECT_INTROSPECTION_REQUIRE([minimum-g-i-version]) 137 | 138 | 139 | AC_DEFUN([GOBJECT_INTROSPECTION_REQUIRE], 140 | [ 141 | _GOBJECT_INTROSPECTION_CHECK_INTERNAL([$1], [require]) 142 | ]) 143 | -------------------------------------------------------------------------------- /m4/vapigen.m4: -------------------------------------------------------------------------------- 1 | dnl vapigen.m4 2 | dnl 3 | dnl Copyright 2012 Evan Nemerson 4 | dnl 5 | dnl This library is free software; you can redistribute it and/or 6 | dnl modify it under the terms of the GNU Lesser General Public 7 | dnl License as published by the Free Software Foundation; either 8 | dnl version 2.1 of the License, or (at your option) any later version. 9 | dnl 10 | dnl This library is distributed in the hope that it will be useful, 11 | dnl but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | dnl Lesser General Public License for more details. 14 | dnl 15 | dnl You should have received a copy of the GNU Lesser General Public 16 | dnl License along with this library; if not, write to the Free Software 17 | dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 | 19 | # VAPIGEN_CHECK([VERSION], [API_VERSION], [FOUND_INTROSPECTION], [DEFAULT]) 20 | # -------------------------------------- 21 | # Check vapigen existence and version 22 | # 23 | # See http://live.gnome.org/Vala/UpstreamGuide for detailed documentation 24 | AC_DEFUN([VAPIGEN_CHECK], 25 | [ 26 | AS_IF([test "x$3" != "xyes"], [ 27 | m4_provide_if([GOBJECT_INTROSPECTION_CHECK], [], [ 28 | m4_provide_if([GOBJECT_INTROSPECTION_REQUIRE], [], [ 29 | AC_MSG_ERROR([[You must call GOBJECT_INTROSPECTION_CHECK or GOBJECT_INTROSPECTION_REQUIRE before using VAPIGEN_CHECK unless using the FOUND_INTROSPECTION argument is "yes"]]) 30 | ]) 31 | ]) 32 | ]) 33 | 34 | AC_ARG_ENABLE([vala], 35 | [AS_HELP_STRING([--enable-vala[=@<:@no/auto/yes@:>@]],[build Vala bindings @<:@default=]ifelse($4,,auto,$4)[@:>@])],,[ 36 | AS_IF([test "x$4" = "x"], [ 37 | enable_vala=auto 38 | ], [ 39 | enable_vala=$4 40 | ]) 41 | ]) 42 | 43 | AS_CASE([$enable_vala], [no], [enable_vala=no], 44 | [yes], [ 45 | AS_IF([test "x$3" != "xyes" -a "x$found_introspection" != "xyes"], [ 46 | AC_MSG_ERROR([Vala bindings require GObject Introspection]) 47 | ]) 48 | ], [auto], [ 49 | AS_IF([test "x$3" != "xyes" -a "x$found_introspection" != "xyes"], [ 50 | enable_vala=no 51 | ]) 52 | ], [ 53 | AC_MSG_ERROR([Invalid argument passed to --enable-vala, should be one of @<:@no/auto/yes@:>@]) 54 | ]) 55 | 56 | AS_IF([test "x$2" = "x"], [ 57 | vapigen_pkg_name=vapigen 58 | ], [ 59 | vapigen_pkg_name=vapigen-$2 60 | ]) 61 | AS_IF([test "x$1" = "x"], [ 62 | vapigen_pkg="$vapigen_pkg_name" 63 | ], [ 64 | vapigen_pkg="$vapigen_pkg_name >= $1" 65 | ]) 66 | 67 | PKG_PROG_PKG_CONFIG 68 | 69 | PKG_CHECK_EXISTS([$vapigen_pkg], [ 70 | AS_IF([test "$enable_vala" = "auto"], [ 71 | enable_vala=yes 72 | ]) 73 | ], [ 74 | AS_CASE([$enable_vala], [yes], [ 75 | AC_MSG_ERROR([$vapigen_pkg not found]) 76 | ], [auto], [ 77 | enable_vala=no 78 | ]) 79 | ]) 80 | 81 | AC_MSG_CHECKING([for vapigen]) 82 | 83 | AS_CASE([$enable_vala], 84 | [yes], [ 85 | VAPIGEN=`$PKG_CONFIG --variable=vapigen $vapigen_pkg_name` 86 | VAPIGEN_MAKEFILE=`$PKG_CONFIG --variable=datadir $vapigen_pkg_name`/vala/Makefile.vapigen 87 | AS_IF([test "x$2" = "x"], [ 88 | VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir $vapigen_pkg_name` 89 | ], [ 90 | VAPIGEN_VAPIDIR=`$PKG_CONFIG --variable=vapidir_versioned $vapigen_pkg_name` 91 | ]) 92 | ]) 93 | 94 | AC_MSG_RESULT([$enable_vala]) 95 | 96 | AC_SUBST([VAPIGEN]) 97 | AC_SUBST([VAPIGEN_VAPIDIR]) 98 | AC_SUBST([VAPIGEN_MAKEFILE]) 99 | 100 | AM_CONDITIONAL(ENABLE_VAPIGEN, test "x$enable_vala" = "xyes") 101 | ]) 102 | -------------------------------------------------------------------------------- /meson_options.txt: -------------------------------------------------------------------------------- 1 | option( 2 | 'gtk-doc', 3 | type: 'boolean', 4 | value: false, 5 | description: 'Build gtk-doc HTML', 6 | ) 7 | 8 | option( 9 | 'introspection', 10 | type: 'boolean', 11 | value: true, 12 | description: 'Build gobject-introspection files', 13 | ) 14 | 15 | option( 16 | 'vala', 17 | type: 'feature', 18 | value: 'auto', 19 | description: 'Build Vala language bindings', 20 | ) 21 | 22 | option( 23 | 'visibility', 24 | type: 'boolean', 25 | value: true, 26 | description: 'Build with GNU symbol visibility', 27 | ) 28 | 29 | option( 30 | 'keyboard-library', 31 | type: 'boolean', 32 | value: true, 33 | description: 'Build the keyboard library needed by xfwm4 and xfce4-settings', 34 | ) 35 | 36 | option( 37 | 'x11', 38 | type: 'feature', 39 | value: 'auto', 40 | description: 'Support for the X11 windowing system', 41 | ) 42 | 43 | option( 44 | 'wayland', 45 | type: 'feature', 46 | value: 'auto', 47 | description: 'Support for the Wayland windowing system', 48 | ) 49 | 50 | option( 51 | 'session-management', 52 | type: 'feature', 53 | value: 'auto', 54 | description: 'Session management support (X11 only)', 55 | ) 56 | 57 | option( 58 | 'startup-notification', 59 | type: 'feature', 60 | value: 'auto', 61 | description: 'Startup notification support (X11 only)', 62 | ) 63 | 64 | option( 65 | 'libgtop', 66 | type: 'feature', 67 | value: 'auto', 68 | description: 'Libgtop support for system information', 69 | ) 70 | 71 | option( 72 | 'epoxy', 73 | type: 'feature', 74 | value: 'auto', 75 | description: 'Library for handling OpenGL function pointer management (requires libgtop)', 76 | ) 77 | 78 | option( 79 | 'gudev', 80 | type: 'feature', 81 | value: 'auto', 82 | description: 'GObject bindings for libudev (requires libgtop)', 83 | ) 84 | 85 | option( 86 | 'glade', 87 | type: 'feature', 88 | value: 'auto', 89 | description: 'Generate files for libxfce4ui integration in Glade interface designer', 90 | ) 91 | 92 | option( 93 | 'glade-catalogdir', 94 | type: 'string', 95 | value: '', 96 | description: 'Specify where to install Glade catalog files (default: autodetect, requires glade)', 97 | ) 98 | 99 | option( 100 | 'glade-moduledir', 101 | type: 'string', 102 | value: '', 103 | description: 'Specify where to install Glade modules (default: autodetect, requires glade)', 104 | ) 105 | 106 | option( 107 | 'glade-pixmapdir', 108 | type: 'string', 109 | value: '', 110 | description: 'Specify where to install Glade pixmaps (default: autodetect, requires glade)', 111 | ) 112 | 113 | option( 114 | 'vendor-info', 115 | type: 'string', 116 | value: '', 117 | description: 'Specify an additional vendor name, optionally with a file in $prefix/share/xfce4/vendorinfo', 118 | ) 119 | 120 | option( 121 | 'manual-website', 122 | type: 'string', 123 | value: '', 124 | description: 'Specify an optional manual website (default: https://docs.xfce.org/help.php)', 125 | ) 126 | -------------------------------------------------------------------------------- /po/LINGUAS: -------------------------------------------------------------------------------- 1 | # Generated by https://gitlab.xfce.org/infra/transifex 2 | am 3 | ar 4 | ast 5 | az 6 | be 7 | bg 8 | bn 9 | ca 10 | cs 11 | cy 12 | da 13 | de 14 | el 15 | en_AU 16 | en_GB 17 | es 18 | et 19 | eu 20 | fa_IR 21 | fi 22 | fr 23 | gl 24 | he 25 | hr 26 | hu 27 | hy_AM 28 | hye 29 | hy 30 | id 31 | ie 32 | is 33 | it 34 | ja 35 | ka 36 | kk 37 | ko 38 | lt 39 | lv 40 | ms 41 | nb 42 | nl 43 | nn 44 | oc 45 | pa 46 | pl 47 | pt_BR 48 | pt 49 | ro 50 | ru 51 | si 52 | sk 53 | sl 54 | sq 55 | sr 56 | sv 57 | te 58 | th 59 | tr 60 | ug 61 | uk 62 | ur_PK 63 | ur 64 | vec 65 | vi 66 | zh_CN 67 | zh_HK 68 | zh_TW 69 | -------------------------------------------------------------------------------- /po/Makevars: -------------------------------------------------------------------------------- 1 | # Makefile variables for PO directory in any package using GNU gettext. 2 | 3 | # Usually the message domain is the same as the package name. 4 | DOMAIN = $(PACKAGE) 5 | 6 | # These two variables depend on the location of this directory. 7 | subdir = po 8 | top_builddir = .. 9 | 10 | # These options get passed to xgettext. 11 | #XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --from-code=UTF-8 --keyword=Q_ --add-comments 12 | XGETTEXT_OPTIONS = --from-code=UTF-8 --keyword=_ --keyword=N_ --keyword=C_:1c,2 --keyword=NC_:1c,2 --keyword=g_dngettext:2,3 --add-comments 13 | 14 | # This is the copyright holder that gets inserted into the header of the 15 | # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding 16 | # package. (Note that the msgstr strings, extracted from the package's 17 | # sources, belong to the copyright holder of the package.) Translators are 18 | # expected to transfer the copyright for their translations to this person 19 | # or entity, or to disclaim their copyright. The empty string stands for 20 | # the public domain; in this case the translators are expected to disclaim 21 | # their copyright. 22 | COPYRIGHT_HOLDER = Free Software Foundation, Inc. 23 | 24 | # This tells whether or not to prepend "GNU " prefix to the package 25 | # name that gets inserted into the header of the $(DOMAIN).pot file. 26 | # Possible values are "yes", "no", or empty. If it is empty, try to 27 | # detect it automatically by scanning the files in $(top_srcdir) for 28 | # "GNU packagename" string. 29 | PACKAGE_GNU = 30 | 31 | # This is the email address or URL to which the translators shall report 32 | # bugs in the untranslated strings: 33 | # - Strings which are not entire sentences, see the maintainer guidelines 34 | # in the GNU gettext documentation, section 'Preparing Strings'. 35 | # - Strings which use unclear terms or require additional context to be 36 | # understood. 37 | # - Strings which make invalid assumptions about notation of date, time or 38 | # money. 39 | # - Pluralisation problems. 40 | # - Incorrect English spelling. 41 | # - Incorrect formatting. 42 | # It can be your email address, or a mailing list address where translators 43 | # can write to without being subscribed, or the URL of a web page through 44 | # which the translators can contact you. 45 | MSGID_BUGS_ADDRESS = 46 | 47 | # This is the list of locale categories, beyond LC_MESSAGES, for which the 48 | # message catalogs shall be used. It is usually empty. 49 | EXTRA_LOCALE_CATEGORIES = 50 | 51 | # This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt' 52 | # context. Possible values are "yes" and "no". Set this to yes if the 53 | # package uses functions taking also a message context, like pgettext(), or 54 | # if in $(XGETTEXT_OPTIONS) you define keywords with a context argument. 55 | USE_MSGCTXT = no 56 | 57 | # These options get passed to msgmerge. 58 | # Useful options are in particular: 59 | # --previous to keep previous msgids of translated messages, 60 | # --quiet to reduce the verbosity. 61 | MSGMERGE_OPTIONS = --quiet 62 | 63 | # These options get passed to msginit. 64 | # If you want to disable line wrapping when writing PO files, add 65 | # --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and 66 | # MSGINIT_OPTIONS. 67 | MSGINIT_OPTIONS = 68 | 69 | # This tells whether or not to regenerate a PO file when $(DOMAIN).pot 70 | # has changed. Possible values are "yes" and "no". Set this to no if 71 | # the POT file is checked in the repository and the version control 72 | # program ignores timestamps. 73 | PO_DEPENDS_ON_POT = no 74 | 75 | # This tells whether or not to forcibly update $(DOMAIN).pot and 76 | # regenerate PO files on "make dist". Possible values are "yes" and 77 | # "no". Set this to no if the POT file and PO files are maintained 78 | # externally. 79 | DIST_DEPENDS_ON_UPDATE_PO = no 80 | -------------------------------------------------------------------------------- /po/POTFILES.in: -------------------------------------------------------------------------------- 1 | # 2 | # Libxfce4ui sources 3 | # 4 | libxfce4ui/resources/xfce4-about-dialog.glade 5 | libxfce4ui/libxfce4ui-config.c 6 | libxfce4ui/xfce-dialogs.c 7 | libxfce4ui/xfce-gdk-extensions.c 8 | libxfce4ui/xfce-gdk-pixbuf-extensions.c 9 | libxfce4ui/xfce-gtk-extensions.c 10 | libxfce4ui/xfce-icon-chooser-dialog.c 11 | libxfce4ui/xfce-sm-client.c 12 | libxfce4ui/xfce-spawn.c 13 | libxfce4ui/xfce-filename-input.c 14 | libxfce4ui/xfce-titled-dialog.c 15 | 16 | # 17 | # Libxfce4kbd-private sources 18 | # 19 | libxfce4kbd-private/xfce-shortcuts.c 20 | libxfce4kbd-private/xfce-shortcuts-editor-dialog.c 21 | libxfce4kbd-private/xfce-shortcuts-editor.c 22 | libxfce4kbd-private/xfce-shortcut-dialog.c 23 | libxfce4kbd-private/xfce-shortcuts-grabber.c 24 | libxfce4kbd-private/xfce-shortcuts-provider.c 25 | libxfce4kbd-private/xfce-shortcuts-xfwm4.c 26 | 27 | # 28 | # Support for GtkBuilder 29 | # 30 | glade/libxfce4ui-glade.c 31 | glade/libxfce4ui-2.xml 32 | 33 | # 34 | # Xfce4-about 35 | # 36 | xfce4-about/main.c 37 | xfce4-about/contributors.h 38 | xfce4-about/xfce4-about.desktop.in 39 | xfce4-about/system-info.c 40 | 41 | # 42 | # UI tests 43 | # 44 | tests/test-ui.c 45 | 46 | # 47 | # Xfce-desktop-item-edit 48 | # 49 | xfce-desktop-item-edit/main.c 50 | xfce-desktop-item-edit/xfce-die-command-entry.c 51 | xfce-desktop-item-edit/xfce-die-command-model.c 52 | xfce-desktop-item-edit/xfce-die-editor.c 53 | xfce-desktop-item-edit/xfce-die-utils.c 54 | 55 | # 56 | # Xfce-open 57 | # 58 | xfce-open/main.c 59 | -------------------------------------------------------------------------------- /po/POTFILES.skip: -------------------------------------------------------------------------------- 1 | glade/libxfce4ui-2.xml.in.h 2 | xfce4-about/xfce4-about-dialog.glade.h 3 | xfce4-about/xfce4-about.desktop.in.h 4 | -------------------------------------------------------------------------------- /po/meson.build: -------------------------------------------------------------------------------- 1 | i18n.gettext(meson.project_name(), preset: 'glib') 2 | -------------------------------------------------------------------------------- /python-example/test-introspection.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # You can generate python documentation with the following commands: 4 | # g-ir-doc-tool --language Python -o ./html ../libxfce4ui/libxfce4ui-2.0.gir 5 | # yelp ./html/ 6 | 7 | import gi.repository 8 | # Set the search path to use the newly generated introspection files 9 | gi.require_version('GIRepository', '2.0') 10 | from gi.repository import GIRepository 11 | GIRepository.Repository.prepend_search_path('../libxfce4ui/') 12 | # randomly search for libxfce4util's gir and typelib 13 | GIRepository.Repository.prepend_search_path('/usr/local/share/gir-1.0/') 14 | GIRepository.Repository.prepend_search_path('/usr/local/lib/girepository-1.0/') 15 | # Now import 4ui 16 | gi.require_version('Libxfce4ui', '2.0') 17 | from gi.repository import Libxfce4ui 18 | # and Gtk3 19 | gi.require_version('Gtk', '3.0') 20 | from gi.repository import Gtk 21 | 22 | # see if it works 23 | titled_dialog = Libxfce4ui.TitledDialog(subtitle=" Hello Xfce Python Developer! ") 24 | titled_dialog.connect("delete-event", Gtk.main_quit) 25 | titled_dialog.show() 26 | Gtk.main() 27 | -------------------------------------------------------------------------------- /tests/Makefile.am: -------------------------------------------------------------------------------- 1 | # vi:set ts=8 sw=8 noet ai nocindent syntax=automake: 2 | # 3 | # Copyright (c) 2016 Eric Koegel 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 7 | # License as published by the Free Software Foundation; either 8 | # version 2 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 13 | # GNU Library General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Library General 16 | # Public License along with this library; if not, write to the 17 | # Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 18 | # Boston, MA 02110-1301, USA. 19 | 20 | AM_CPPFLAGS = \ 21 | -I$(top_srcdir) \ 22 | -DG_LOG_DOMAIN=\"libxfce4ui-tests\" 23 | 24 | noinst_PROGRAMS = 25 | 26 | if BUILD_TESTS 27 | 28 | # test-ui-gtk3 29 | noinst_PROGRAMS += \ 30 | test-ui 31 | 32 | test_ui_SOURCES = \ 33 | test-ui.c 34 | 35 | test_ui_CFLAGS = \ 36 | $(LIBSM_CFLAGS) \ 37 | $(GTK3_CFLAGS) \ 38 | $(LIBSTARTUP_NOTIFICATION_CFLAGS) \ 39 | $(LIBXFCE4UTIL_CFLAGS) \ 40 | $(PLATFORM_CFLAGS) 41 | 42 | test_ui_DEPENDENCIES = \ 43 | $(top_builddir)/libxfce4ui/libxfce4ui-2.la 44 | 45 | test_ui_LDADD = \ 46 | $(LIBSM_LIBS) \ 47 | $(GTK3_LIBS) \ 48 | $(LIBSTARTUP_NOTIFICATION_LIBS) \ 49 | $(LIBXFCE4UTIL_LIBS) \ 50 | $(top_builddir)/libxfce4ui/libxfce4ui-2.la 51 | 52 | endif # BUILD_TESTS 53 | 54 | EXTRA_DIST = \ 55 | meson.build \ 56 | $(NULL) 57 | -------------------------------------------------------------------------------- /tests/meson.build: -------------------------------------------------------------------------------- 1 | add_test_setup( 2 | 'default', 3 | exclude_suites: 'gui', 4 | is_default: true, 5 | ) 6 | add_test_setup( 7 | 'full', 8 | ) 9 | 10 | test_bins = [ 11 | ] 12 | test_gui_bins = [ 13 | 'test-ui', 14 | ] 15 | 16 | foreach bin : test_bins + test_gui_bins 17 | e = executable( 18 | bin, 19 | '@0@.c'.format(bin), 20 | sources: libxfce4ui_h, 21 | include_directories: [ 22 | include_directories('..'), 23 | ], 24 | dependencies: [ 25 | gtk, 26 | libxfce4util, 27 | x11_deps, 28 | ], 29 | link_with: [ 30 | libxfce4ui, 31 | ], 32 | install: false, 33 | ) 34 | 35 | if bin in test_gui_bins 36 | test(bin, e, suite: 'gui') 37 | else 38 | test(bin, e) 39 | endif 40 | endforeach 41 | -------------------------------------------------------------------------------- /xfce-desktop-item-edit/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | AM_CPPFLAGS = \ 3 | -I$(top_builddir) \ 4 | -I$(top_srcdir) \ 5 | -DBINDIR=\"$(bindir)\" \ 6 | -DDATADIR=\"$(datadir)\" \ 7 | -DG_LOG_DOMAIN=\"xfce-desktop-item-edit\" \ 8 | -DPACKAGE_LOCALE_DIR=\"$(localedir)\" 9 | 10 | bin_PROGRAMS = \ 11 | xfce-desktop-item-edit 12 | 13 | xfce_desktop_item_edit_SOURCES = \ 14 | main.c \ 15 | xfce-die-command-entry.c \ 16 | xfce-die-command-entry.h \ 17 | xfce-die-command-model.c \ 18 | xfce-die-command-model.h \ 19 | xfce-die-desktop-model.c \ 20 | xfce-die-desktop-model.h \ 21 | xfce-die-editor.c \ 22 | xfce-die-editor.h \ 23 | xfce-die-enum-types.c \ 24 | xfce-die-enum-types.h \ 25 | xfce-die-utils.c \ 26 | xfce-die-utils.h \ 27 | $(NULL) 28 | 29 | xfce_desktop_item_edit_CFLAGS = \ 30 | $(GTK3_CFLAGS) \ 31 | $(GTHREAD_CFLAGS) \ 32 | $(LIBXFCE4UTIL_CFLAGS) \ 33 | $(GIO_CFLAGS) \ 34 | $(NULL) 35 | 36 | xfce_desktop_item_edit_LDFLAGS = \ 37 | -no-undefined 38 | 39 | xfce_desktop_item_edit_DEPENDENCIES = \ 40 | $(top_builddir)/libxfce4ui/libxfce4ui-2.la 41 | 42 | xfce_desktop_item_edit_LDADD = \ 43 | $(GTK3_LIBS) \ 44 | $(GTHREAD_LIBS) \ 45 | $(LIBXFCE4UTIL_LIBS) \ 46 | $(GIO_LIBS) \ 47 | $(top_builddir)/libxfce4ui/libxfce4ui-2.la 48 | 49 | # vi:set ts=8 sw=8 noet ai nocindent syntax=automake: 50 | -------------------------------------------------------------------------------- /xfce-desktop-item-edit/meson.build: -------------------------------------------------------------------------------- 1 | executable( 2 | 'xfce-desktop-item-edit', 3 | [ 4 | 'main.c', 5 | 'xfce-die-command-entry.c', 6 | 'xfce-die-command-entry.h', 7 | 'xfce-die-command-model.c', 8 | 'xfce-die-command-model.h', 9 | 'xfce-die-desktop-model.c', 10 | 'xfce-die-desktop-model.h', 11 | 'xfce-die-editor.c', 12 | 'xfce-die-editor.h', 13 | 'xfce-die-enum-types.c', 14 | 'xfce-die-enum-types.h', 15 | 'xfce-die-utils.c', 16 | 'xfce-die-utils.h', 17 | ], 18 | sources: [ 19 | libxfce4ui_h, 20 | xfce_revision_h, 21 | ], 22 | c_args: [ 23 | '-DG_LOG_DOMAIN="@0@"'.format('xfce-desktop-item-edit'), 24 | ], 25 | include_directories: [ 26 | include_directories('..'), 27 | ], 28 | dependencies: [ 29 | gio, 30 | gthread, 31 | gtk, 32 | libxfce4util, 33 | ], 34 | link_with: [ 35 | libxfce4ui, 36 | ], 37 | install: true, 38 | install_dir: get_option('prefix') / get_option('bindir'), 39 | ) 40 | -------------------------------------------------------------------------------- /xfce-desktop-item-edit/xfce-die-command-entry.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2006 Benedikt Meurer . 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 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 | * Library 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, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | * MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef __XFCE_DIE_COMMAND_ENTRY_H__ 21 | #define __XFCE_DIE_COMMAND_ENTRY_H__ 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define XFCE_TYPE_DIE_COMMAND_ENTRY (xfce_die_command_entry_get_type ()) 28 | G_DECLARE_FINAL_TYPE (XfceDieCommandEntry, xfce_die_command_entry, XFCE, DIE_COMMAND_ENTRY, GtkBox) 29 | 30 | GtkWidget * 31 | xfce_die_command_entry_new (void) G_GNUC_MALLOC; 32 | const gchar * 33 | xfce_die_command_entry_get_text (XfceDieCommandEntry *command_entry); 34 | void 35 | xfce_die_command_entry_set_text (XfceDieCommandEntry *command_entry, 36 | const gchar *text); 37 | 38 | G_END_DECLS 39 | 40 | #endif /* !__XFCE_DIE_COMMAND_ENTRY_H__ */ 41 | -------------------------------------------------------------------------------- /xfce-desktop-item-edit/xfce-die-command-model.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2006 Benedikt Meurer . 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 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 | * Library 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, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | * MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef __XFCE_DIE_COMMAND_MODEL_H__ 21 | #define __XFCE_DIE_COMMAND_MODEL_H__ 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define XFCE_TYPE_DIE_COMMAND_MODEL (xfce_die_command_model_get_type ()) 28 | G_DECLARE_FINAL_TYPE (XfceDieCommandModel, xfce_die_command_model, XFCE, DIE_COMMAND_MODEL, GObject) 29 | 30 | /** 31 | * XfceDieCommandModelColumn: 32 | * @XFCE_DIE_COMMAND_MODEL_COLUMN_NAME : the column with the file name. 33 | * 34 | * The columns provided by the #XfceDieCommandModel. 35 | **/ 36 | typedef enum /*< enum >*/ 37 | { 38 | XFCE_DIE_COMMAND_MODEL_COLUMN_NAME, 39 | XFCE_DIE_COMMAND_MODEL_N_COLUMNS, 40 | } XfceDieCommandModelColumn; 41 | 42 | XfceDieCommandModel * 43 | xfce_die_command_model_new (void) G_GNUC_MALLOC; 44 | 45 | G_END_DECLS 46 | 47 | #endif /* !__XFCE_DIE_COMMAND_MODEL_H__ */ 48 | -------------------------------------------------------------------------------- /xfce-desktop-item-edit/xfce-die-desktop-model.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2006 Benedikt Meurer . 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 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 | * Library 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, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | * MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef __XFCE_DIE_DESKTOP_MODEL_H__ 21 | #define __XFCE_DIE_DESKTOP_MODEL_H__ 22 | 23 | #include 24 | #include 25 | 26 | G_BEGIN_DECLS 27 | 28 | #define XFCE_TYPE_DIE_DESKTOP_MODEL (xfce_die_desktop_model_get_type ()) 29 | G_DECLARE_FINAL_TYPE (XfceDieDesktopModel, xfce_die_desktop_model, XFCE, DIE_DESKTOP_MODEL, GObject) 30 | 31 | /** 32 | * XfceDieDesktopModelColumn: 33 | * @XFCE_DIE_DESKTOP_MODEL_COLUMN_ABSTRACT : the column with the markup text for the renderer. 34 | * @XFCE_DIE_DESKTOP_MODEL_COLUMN_COMMAND : the column with the application command. 35 | * @XFCE_DIE_DESKTOP_MODEL_COLUMN_COMMENT : the column with the application comment. 36 | * @XFCE_DIE_DESKTOP_MODEL_COLUMN_ICON : the column with the application icon. 37 | * @XFCE_DIE_DESKTOP_MODEL_COLUMN_NAME : the column with the application name. 38 | * @XFCE_DIE_DESKTOP_MODEL_COLUMN_SNOTIFY : the column with the applications StartupNotify setting. 39 | * @XFCE_DIE_DESKTOP_MODEL_COLUMN_TERMINAL : the column with the applications Terminal setting. 40 | * 41 | * The columns provided by the #XfceDieDesktopModel. 42 | **/ 43 | typedef enum /*< enum >*/ 44 | { 45 | XFCE_DIE_DESKTOP_MODEL_COLUMN_ABSTRACT, 46 | XFCE_DIE_DESKTOP_MODEL_COLUMN_COMMAND, 47 | XFCE_DIE_DESKTOP_MODEL_COLUMN_COMMENT, 48 | XFCE_DIE_DESKTOP_MODEL_COLUMN_ICON, 49 | XFCE_DIE_DESKTOP_MODEL_COLUMN_NAME, 50 | XFCE_DIE_DESKTOP_MODEL_COLUMN_SNOTIFY, 51 | XFCE_DIE_DESKTOP_MODEL_COLUMN_TERMINAL, 52 | XFCE_DIE_DESKTOP_MODEL_N_COLUMNS, 53 | } XfceDieDesktopModelColumn; 54 | 55 | XfceDieDesktopModel * 56 | xfce_die_desktop_model_new (void) G_GNUC_MALLOC; 57 | gboolean 58 | xfce_die_desktop_model_match_func (GtkEntryCompletion *completion, 59 | const gchar *key, 60 | GtkTreeIter *iter, 61 | gpointer user_data); 62 | 63 | G_END_DECLS 64 | 65 | #endif /* !__XFCE_DIE_DESKTOP_MODEL_H__ */ 66 | -------------------------------------------------------------------------------- /xfce-desktop-item-edit/xfce-die-editor.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2006 Benedikt Meurer . 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 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 | * Library 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, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | * MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef __XFCE_DIE_EDITOR_H__ 21 | #define __XFCE_DIE_EDITOR_H__ 22 | 23 | #include 24 | 25 | #include "xfce-die-enum-types.h" 26 | 27 | G_BEGIN_DECLS 28 | 29 | #define XFCE_TYPE_DIE_EDITOR (xfce_die_editor_get_type ()) 30 | G_DECLARE_FINAL_TYPE (XfceDieEditor, xfce_die_editor, XFCE, DIE_EDITOR, GtkGrid) 31 | 32 | GtkWidget * 33 | xfce_die_editor_new (void) G_GNUC_MALLOC; 34 | 35 | gboolean 36 | xfce_die_editor_get_complete (XfceDieEditor *editor); 37 | 38 | XfceDieEditorMode 39 | xfce_die_editor_get_mode (XfceDieEditor *editor); 40 | void 41 | xfce_die_editor_set_mode (XfceDieEditor *editor, 42 | XfceDieEditorMode mode); 43 | 44 | const gchar * 45 | xfce_die_editor_get_name (XfceDieEditor *editor); 46 | void 47 | xfce_die_editor_set_name (XfceDieEditor *editor, 48 | const gchar *name); 49 | 50 | const gchar * 51 | xfce_die_editor_get_comment (XfceDieEditor *editor); 52 | void 53 | xfce_die_editor_set_comment (XfceDieEditor *editor, 54 | const gchar *comment); 55 | 56 | const gchar * 57 | xfce_die_editor_get_command (XfceDieEditor *editor); 58 | void 59 | xfce_die_editor_set_command (XfceDieEditor *editor, 60 | const gchar *command); 61 | 62 | const gchar * 63 | xfce_die_editor_get_url (XfceDieEditor *editor); 64 | void 65 | xfce_die_editor_set_url (XfceDieEditor *editor, 66 | const gchar *url); 67 | 68 | const gchar * 69 | xfce_die_editor_get_path (XfceDieEditor *editor); 70 | void 71 | xfce_die_editor_set_path (XfceDieEditor *editor, 72 | const gchar *path); 73 | 74 | const gchar * 75 | xfce_die_editor_get_icon (XfceDieEditor *editor); 76 | void 77 | xfce_die_editor_set_icon (XfceDieEditor *editor, 78 | const gchar *icon); 79 | 80 | gboolean 81 | xfce_die_editor_get_snotify (XfceDieEditor *editor); 82 | void 83 | xfce_die_editor_set_snotify (XfceDieEditor *editor, 84 | gboolean snotify); 85 | 86 | gboolean 87 | xfce_die_editor_get_terminal (XfceDieEditor *editor); 88 | void 89 | xfce_die_editor_set_terminal (XfceDieEditor *editor, 90 | gboolean terminal); 91 | 92 | G_END_DECLS 93 | 94 | #endif /* !__XFCE_DIE_EDITOR_H__ */ 95 | -------------------------------------------------------------------------------- /xfce-desktop-item-edit/xfce-die-enum-types.c: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2006 Benedikt Meurer . 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 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 | * Library 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, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | * MA 02110-1301 USA 18 | */ 19 | 20 | #ifdef HAVE_CONFIG_H 21 | #include "config.h" 22 | #endif 23 | 24 | #include 25 | 26 | #include "xfce-die-enum-types.h" 27 | 28 | 29 | 30 | GType 31 | xfce_die_editor_mode_get_type (void) 32 | { 33 | static GType type = G_TYPE_INVALID; 34 | 35 | if (G_UNLIKELY (type == G_TYPE_INVALID)) 36 | { 37 | static const GEnumValue values[] = { 38 | { XFCE_DIE_EDITOR_MODE_APPLICATION, "XFCE_DIE_EDITOR_MODE_APPLICATION", "Application" }, 39 | { XFCE_DIE_EDITOR_MODE_LINK, "XFCE_DIE_EDITOR_MODE_LINK", "Link" }, 40 | { XFCE_DIE_EDITOR_MODE_DIRECTORY, "XFCE_DIE_EDITOR_MODE_DIRECTORY", "Directory" }, 41 | { 0, NULL, NULL }, 42 | }; 43 | 44 | type = g_enum_register_static (I_ ("XfceDieEditorMode"), values); 45 | } 46 | 47 | return type; 48 | } 49 | -------------------------------------------------------------------------------- /xfce-desktop-item-edit/xfce-die-enum-types.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2006 Benedikt Meurer . 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 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 | * Library 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, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | * MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef __XFCE_DIE_ENUM_TYPES_H__ 21 | #define __XFCE_DIE_ENUM_TYPES_H__ 22 | 23 | #include 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define XFCE_TYPE_DIE_EDITOR_MODE (xfce_die_editor_mode_get_type ()) 28 | 29 | /** 30 | * XfceDieEditorMode: 31 | * @XFCE_DIE_EDITOR_MODE_APPLICATION : application launcher editing. 32 | * @XFCE_DIE_EDITOR_MODE_LINK : link editing. 33 | * @XFCE_DIE_EDITOR_MODE_DIRECTORY : menu directory editing. 34 | * 35 | * Editing mode for xfce-desktop-item-edit 36 | * 37 | **/ 38 | typedef enum 39 | { 40 | XFCE_DIE_EDITOR_MODE_APPLICATION, 41 | XFCE_DIE_EDITOR_MODE_LINK, 42 | XFCE_DIE_EDITOR_MODE_DIRECTORY 43 | } XfceDieEditorMode; 44 | 45 | GType 46 | xfce_die_editor_mode_get_type (void) G_GNUC_CONST; 47 | 48 | G_END_DECLS 49 | 50 | #endif /* !__XFCE_DIE_ENUM_TYPES_H__ */ 51 | -------------------------------------------------------------------------------- /xfce-desktop-item-edit/xfce-die-utils.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2006 Benedikt Meurer . 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Library General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 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 | * Library 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, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | * MA 02110-1301 USA 18 | */ 19 | 20 | #ifndef __XFCE_DIE_UTILS_H__ 21 | #define __XFCE_DIE_UTILS_H__ 22 | 23 | #include 24 | 25 | #include "xfce-die-enum-types.h" 26 | 27 | G_BEGIN_DECLS 28 | 29 | void 30 | xfce_die_g_key_file_set_locale_value (GKeyFile *key_file, 31 | const gchar *group, 32 | const gchar *key, 33 | const gchar *value); 34 | 35 | GFile * 36 | xfce_die_g_key_file_save (GKeyFile *key_file, 37 | gboolean create, 38 | gboolean trust, 39 | GFile *base, 40 | XfceDieEditorMode mode, 41 | GError **error); 42 | 43 | G_END_DECLS 44 | 45 | #endif /* !__XFCE_DIE_UTILS_H__ */ 46 | -------------------------------------------------------------------------------- /xfce-open/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | AM_CPPFLAGS = \ 3 | -I$(top_srcdir) \ 4 | -DG_LOG_DOMAIN=\"xfce-open\" \ 5 | -DPACKAGE_LOCALE_DIR=\"$(localedir)\" 6 | 7 | bin_PROGRAMS = \ 8 | xfce-open 9 | 10 | xfce_open_SOURCES = \ 11 | main.c 12 | 13 | xfce_open_CFLAGS = \ 14 | $(GTK3_CFLAGS) \ 15 | $(LIBXFCE4UTIL_CFLAGS) \ 16 | $(GIO_CFLAGS) \ 17 | $(GIO_UNIX_CFLAGS) 18 | 19 | xfce_open_LDFLAGS = \ 20 | -no-undefined 21 | 22 | xfce_open_LDADD = \ 23 | $(GTK3_LIBS) \ 24 | $(LIBXFCE4UTIL_LIBS) \ 25 | $(GIO_LIBS) \ 26 | $(GIO_UNIX_LIBS) \ 27 | $(top_builddir)/libxfce4ui/libxfce4ui-2.la 28 | 29 | EXTRA_DIST = \ 30 | $(desktop_in_files) 31 | 32 | DISTCLEANFILES = \ 33 | $(desktop_DATA) 34 | 35 | # vi:set ts=8 sw=8 noet ai nocindent syntax=automake: 36 | -------------------------------------------------------------------------------- /xfce-open/meson.build: -------------------------------------------------------------------------------- 1 | executable( 2 | 'xfce-open', 3 | [ 4 | 'main.c', 5 | ], 6 | sources: [ 7 | libxfce4ui_h, 8 | xfce_revision_h, 9 | ], 10 | c_args: [ 11 | '-DG_LOG_DOMAIN="@0@"'.format('xfce-open'), 12 | ], 13 | include_directories: [ 14 | include_directories('..'), 15 | ], 16 | dependencies: [ 17 | gio, 18 | gio_unix, 19 | gtk, 20 | libxfce4util, 21 | ], 22 | link_with: [ 23 | libxfce4ui, 24 | ], 25 | install: true, 26 | install_dir: get_option('prefix') / get_option('bindir'), 27 | ) 28 | -------------------------------------------------------------------------------- /xfce-revision.h.in: -------------------------------------------------------------------------------- 1 | /* 2 | * The file xfce-revision.h is auto-generated and should not be modified 3 | * directly. Modify the xfce-revision.h.in file and re-run the build 4 | * instead. 5 | */ 6 | 7 | #ifndef INC_XFCE_REVISION_H 8 | #define INC_XFCE_REVISION_H 9 | 10 | #define REVISION "@REVISION@" 11 | 12 | #define VERSION_FULL VERSION "-" REVISION 13 | #define PACKAGE_STRING_FULL PACKAGE " " VERSION_FULL 14 | 15 | #endif /* INC_XFCE_REVISION_H */ 16 | -------------------------------------------------------------------------------- /xfce4-about/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | AM_CPPFLAGS = \ 3 | -I$(top_srcdir) \ 4 | -DG_LOG_DOMAIN=\"xfce4-about\" \ 5 | -DDATADIR=\"$(datadir)/xfce4\" \ 6 | -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \ 7 | $(PLATFORM_CPPFLAGS) 8 | 9 | bin_PROGRAMS = \ 10 | xfce4-about 11 | 12 | xfce4_about_SOURCES = \ 13 | $(top_srcdir)/libxfce4ui/libxfce4ui-resources.c \ 14 | contributors.h \ 15 | main.c 16 | 17 | if HAVE_GLIBTOP 18 | 19 | xfce4_about_SOURCES += \ 20 | system-info.c \ 21 | system-info.h 22 | 23 | endif 24 | 25 | xfce4_about_CFLAGS = \ 26 | $(LIBXFCE4UTIL_CFLAGS) \ 27 | $(GTK3_CFLAGS) \ 28 | $(GLIBTOP_CFLAGS) \ 29 | $(EPOXY_CFLAGS) \ 30 | $(GUDEV_CFLAGS) \ 31 | $(PLATFORM_CFLAGS) 32 | 33 | xfce4_about_LDADD = \ 34 | $(top_builddir)/libxfce4ui/libxfce4ui-2.la \ 35 | $(LIBXFCE4UTIL_LIBS) \ 36 | $(GLIBTOP_LIBS) \ 37 | $(EPOXY_LIBS) \ 38 | $(GUDEV_LIBS) \ 39 | $(GTK3_LIBS) 40 | 41 | xfce4_about_DEPENDENCIES = \ 42 | $(top_builddir)/libxfce4ui/libxfce4ui-2.la 43 | 44 | desktopdir = $(datadir)/applications 45 | desktop_in_files = xfce4-about.desktop.in 46 | desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) 47 | 48 | xfce4-about.desktop: xfce4-about.desktop.in 49 | $(AM_V_GEN)$(MSGFMT) --desktop --template $< -d $(top_srcdir)/po -o $@ 50 | 51 | DISTCLEANFILES = \ 52 | $(desktop_DATA) 53 | 54 | EXTRA_DIST = \ 55 | $(desktop_in_files) \ 56 | meson.build \ 57 | $(NULL) 58 | -------------------------------------------------------------------------------- /xfce4-about/contributors.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2022 Xfce Development Team 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program 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 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License along 15 | * with this program; if not, write to the Free Software Foundation, Inc., 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 17 | */ 18 | 19 | #include 20 | #include 21 | 22 | typedef struct 23 | { 24 | const gchar *name; 25 | const gchar *email; 26 | } ContributorInfo; 27 | 28 | typedef struct 29 | { 30 | const gchar *name; 31 | const ContributorInfo *contributors; 32 | } ContributorGroup; 33 | 34 | static const ContributorInfo xfce_contributors_core[] = { 35 | { "Alexander Schwinn", "alexxcons@xfce.org" }, 36 | { "Andre Miranda", "andreldm@xfce.org" }, 37 | { "Brian J. Tarricone", "kelnos@xfce.org" }, 38 | { "Gaël Bonithon", "gael@xfce.org" }, 39 | { "Olivier Fourdan", "fourdan@xfce.org" }, 40 | { "Romain Bouvier", "skunnyk@alteroot.org" }, 41 | { "Theo Linkspfeifer", "lastonestanding@tutanota.com" }, 42 | { NULL, NULL } 43 | }; 44 | 45 | static const ContributorInfo xfce_contributors_active[] = { 46 | { "Akbarkhon Variskhanov", "akbarkhon.variskhanov@gmail.com" }, 47 | { "Alistair Buxton", "a.j.buxton@gmail.com" }, 48 | { "Amrit Kashyap Borah", "" }, 49 | { "Andrzej Radecki", "andrzejr@xfce.org" }, 50 | { "Arkadiy Illarionov", "qarkai@gmail.com" }, 51 | { "Arthur Demchenkov", "spinal.by@gmail.com" }, 52 | { "Błażej Szczygieł", "mumei6102@gmail.com" }, 53 | { "Bobby Rong", "rjl931189261@126.com" }, 54 | { "Đoàn Trần Công Danh", "congdanhqx@gmail.com" }, 55 | { "Erkki Moorits", "erkki.moorits@mail.ee" }, 56 | { "Graeme Gott", "graeme@gottcode.org" }, 57 | { "Hunter Turcin", "huntertur@gmail.com" }, 58 | { "Ivalin Radulov", "" }, 59 | { "Landry Breuil", "landry@xfce.org" }, 60 | { "Sean Davis", "bluesabre@xfce.org" }, 61 | { "Stephan Haller", "nomad@froevel.de" }, 62 | { "Tony Paulic", "tony.paulic@gmail.com" }, 63 | { "Yongha Hwang", "mshrimp@sogang.ac.kr" }, 64 | { NULL, NULL } 65 | }; 66 | 67 | static const ContributorInfo xfce_contributors_server[] = { 68 | { "Romain Bouvier", "skunnyk@alteroot.org" }, 69 | { "Mike Massonnet", "mmassonnet@gmail.com" }, 70 | { NULL, NULL } 71 | }; 72 | 73 | static const ContributorInfo xfce_contributors_translators_supervision[] = { 74 | { "Vinzenz Vietzke", "vinz@vinzv.de" }, 75 | { NULL, NULL } 76 | }; 77 | 78 | static const ContributorInfo xfce_contributors_documentation_supervision[] = { 79 | { "Kevin Bowen", "kevin.bowen@gmail.com" }, 80 | { NULL, NULL } 81 | }; 82 | 83 | static const ContributorInfo xfce_contributors_previous[] = { 84 | { "Ali Abdallah", "ali@xfce.org" }, 85 | { "Auke Kok", "sofar@foo-projects.org" }, 86 | { "Benedikt Meurer", "benny@xfce.org" }, 87 | { "Bernhard Walle", "bernhard.walle@gmx.de" }, 88 | { "Biju Chacko", "botsie@xfce.org" }, 89 | { "Craig Betts", "craig.betts@dfrc.nasa.gov" }, 90 | { "Daichi Kawahata", "daichi@xfce.org" }, 91 | { "Danny Milosavljevic", "dannym@xfce.org" }, 92 | { "Darren Salt", "linux@youmustbejoking.demon.co.uk" }, 93 | { "David Mohr", "squisher@xfce.org" }, 94 | { "Edscott Wilson García", "edscott@xfce.org" }, 95 | { "Eduard Roccatello", "eduard@xfce.org" }, 96 | { "Ejvend Nielsen", "prophet@sphere-x.net" }, 97 | { "Enrico Tröger", "enrico.troeger@uvena.de" }, 98 | { "Erik Harrison", "erikharrison@xfce.org" }, 99 | { "Eric Koegel", "eric@xfce.org" }, 100 | { "Erik Touve", "etouve@earthlink.net" }, 101 | { "François Le Clainche", "fleclainche@wanadoo.fr" }, 102 | { "Guido Berhoerster", "guido+xfce@berhoerster.name" }, 103 | { "Harald Judt", "hjudt@xfce.org" }, 104 | { "Igor", "f2404@yandex.ru" }, 105 | { "Jan Ziak", "0xe2.0x9a.0x9b@xfce.org" }, 106 | { "Jannis Pohlmann", "jannis@xfce.org" }, 107 | { "Jasper Huijsmans", "jasper@xfce.org" }, 108 | { "Jean-François Wauthy", "pollux@xfce.org" }, 109 | { "Jens Guballa", "j.guballa@t-online.de" }, 110 | { "Jens Luedicke", "jens@irs-net.com" }, 111 | { "Joakim Andreasson", "joakim.andreasson@gmx.net" }, 112 | { "Jérôme Guelfucci", "jeromeg@xfce.org" }, 113 | { "Karsten Luetkewitz", "phrep@plskthx.org" }, 114 | { "Lionel Le Folgoc", "mrpouit@gmail.com" }, 115 | { "Martin Loschwitz", "madkiss@debian.org" }, 116 | { "Maurizio Galli", "maurizio.galli@gmail.com" }, 117 | { "Maximilian Schleiss", "maximilian@xfce.org" }, 118 | { "Michael Mosier", "michael@spyonit.com" }, 119 | { "Mickaël Graf", "korbinus@xfce.org" }, 120 | { "Nick Schermer", "nick@xfce.org" }, 121 | { "Olivier Duchateau", "duchateau.olivier@gmail.com" }, 122 | { "Pau Rul·lan Ferragut", "paurullan@bulma.net" }, 123 | { "Peter de Ridder", "peter@xfce.org" }, 124 | { "Samuel Verstraete", "elangelo@xfce.org" }, 125 | { "Sergios Anestis Kefalidis", "skefalidis@xfce.org" }, 126 | { "Silvio Knizek", "killermoehre@gmx.net" }, 127 | { "Simon Steinbeiß", "simon@xfce.org" }, 128 | { "Stephan Arts", "stephan@xfce.org" }, 129 | { "Steve Dodier-Lazaro", "sidi@xfce.org" }, 130 | { "Thomas Leonard", "tal00r@ecs.soton.ac.uk" }, 131 | { "Tobias Henle", "tobias@page23.de" }, 132 | { "Viktor Odintsev", "ninetls@xfce.org" }, 133 | { "Xavier Maillard", "zedek@fxgsproject.org" }, 134 | { "Yves-Alexis Perez", "corsac@debian.org" }, 135 | { NULL, NULL } 136 | }; 137 | 138 | static const ContributorGroup xfce_contributors[] = { 139 | /*{ N_("Project Lead"), 140 | xfce_contributors_lead 141 | },*/ 142 | { N_ ("Core developers"), 143 | xfce_contributors_core }, 144 | { N_ ("Active contributors"), 145 | xfce_contributors_active }, 146 | { N_ ("Servers maintained by"), 147 | xfce_contributors_server }, 148 | { N_ ("Translations supervision"), 149 | xfce_contributors_translators_supervision }, 150 | { N_ ("Documentation supervision"), 151 | xfce_contributors_documentation_supervision }, 152 | { N_ ("Translators"), 153 | NULL }, 154 | { N_ ("Previous contributors"), 155 | xfce_contributors_previous } 156 | }; 157 | -------------------------------------------------------------------------------- /xfce4-about/meson.build: -------------------------------------------------------------------------------- 1 | xfce4_about_sources = [ 2 | 'contributors.h', 3 | 'main.c', 4 | ] 5 | 6 | if libgtop.found() 7 | xfce4_about_sources += [ 8 | 'system-info.c', 9 | 'system-info.h', 10 | ] 11 | endif 12 | 13 | executable( 14 | 'xfce4-about', 15 | xfce4_about_sources, 16 | sources: [ 17 | libxfce4ui_h, 18 | libxfce4ui_resources_c, 19 | xfce_revision_h, 20 | ], 21 | c_args: [ 22 | '-DG_LOG_DOMAIN="@0@"'.format('xfce4-about'), 23 | ], 24 | include_directories: [ 25 | include_directories('..'), 26 | ], 27 | dependencies: [ 28 | gtk, 29 | libxfce4util, 30 | libgtop, 31 | epoxy, 32 | gudev, 33 | ], 34 | link_with: [ 35 | libxfce4ui, 36 | ], 37 | install: true, 38 | install_dir: get_option('prefix') / get_option('bindir'), 39 | ) 40 | 41 | i18n.merge_file( 42 | input: 'xfce4-about.desktop.in', 43 | output: 'xfce4-about.desktop', 44 | po_dir: '..' / 'po', 45 | type: 'desktop', 46 | install: true, 47 | install_dir: get_option('prefix') / get_option('datadir') / 'applications', 48 | ) 49 | -------------------------------------------------------------------------------- /xfce4-about/system-info.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2019 Xfce Development Team 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program 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 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License along 15 | * with this program; if not, write to the Free Software Foundation, Inc., 16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 17 | */ 18 | 19 | #if G_GNUC_CHECK_VERSION(4, 6) 20 | #pragma GCC diagnostic push 21 | #pragma GCC diagnostic ignored "-Wundef" 22 | #endif 23 | #include 24 | #if G_GNUC_CHECK_VERSION(4, 6) 25 | #pragma GCC diagnostic pop 26 | #endif 27 | 28 | #include 29 | 30 | 31 | 32 | enum 33 | { 34 | OS_NAME, 35 | DEVICE_NAME, 36 | KERNEL 37 | }; 38 | 39 | char * 40 | get_os_type (void); 41 | char * 42 | get_system_info (guint infotype); 43 | char * 44 | get_cpu_info (const glibtop_sysinfo *info); 45 | char * 46 | get_gpu_info (guint *num_gpus); 47 | char * 48 | get_os_name (void); 49 | char * 50 | get_os_logo (void); 51 | -------------------------------------------------------------------------------- /xfce4-about/xfce4-about.desktop.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Type=Application 4 | Exec=xfce4-about 5 | Icon=org.xfce.about 6 | StartupNotify=false 7 | Terminal=false 8 | Categories=Utility;X-XFCE;X-Xfce-Toplevel;Settings;X-XFCE-SettingsDialog;X-XFCE-SystemSettings; 9 | OnlyShowIn=XFCE; 10 | Name=About Xfce 11 | Comment=Information about the Xfce Desktop Environment 12 | --------------------------------------------------------------------------------