├── .gitignore ├── AUTHORS ├── COPYING ├── ChangeLog ├── INSTALL ├── README.md ├── THANKS ├── data ├── Mouse-4.tar.gz ├── Mouse-6.tar.gz ├── Mouse.tar.gz ├── MouseNeo-4.tar.gz ├── MouseNeo-6.tar.gz ├── MouseNeo.tar.gz └── dockbarx.desktop.in ├── src ├── dockbarx.vala ├── preferences.vala └── xfce4-dockbarx-plug.py ├── vapi ├── COPYING ├── libxfce4panel-1.0.deps ├── libxfce4panel-1.0.vapi ├── libxfce4util-1.0.vapi └── libxfconf-0.vapi ├── waf └── wscript /.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | .waf* 3 | .lock-waf_linux_build 4 | *.geany 5 | xfce4-dockbarx-plugin*.tar.bz2 6 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Authors 2 | ------- 3 | 4 | Aleksey Shaferov developed the original Dockbar for gnome-panel. 5 | Matias Särs developed its fork, DockBarX. See THANKS for more details on DockbarX. 6 | Included Vala bindings for Xfce4 developed by Mike Masonnet . 7 | Trent McPheron originally developed the Xfce4 plugin for DockbarX. 8 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | MIT/X11 License 2 | --------------- 3 | 4 | Copyright (C) 2013- Trent McPheron 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy of 7 | this software and associated documentation files (the "Software"), to deal in 8 | the Software without restriction, including without limitation the rights to 9 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 10 | of the Software, and to permit persons to whom the Software is furnished to do 11 | so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in all 14 | copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22 | SOFTWARE. 23 | -------------------------------------------------------------------------------- /ChangeLog: -------------------------------------------------------------------------------- 1 | Change Log 2 | ---------- 3 | 4 | 0.3.1: 5 | - Fixed bug where DBX disappears after changing theme. 6 | - Fixed bug where DBX restricts itself to an arbitrary size by exposing the max_size property and setting it absurdly high by default. 7 | - Add MouseNeo themes, with -4 and -6 variants. This version has the highlight background visible on every open group button, to allow you to see open windows easier on noisy wallpapers. The highlight color and opacity can be configured. However there is no launch highlight or hover highlight anymore. 8 | 9 | 0.3: 10 | - Modify plug to work with DBX refactoring. 11 | 12 | 0.2.1: 13 | - Wait one second before starting DockbarX to prevent wonkiness. 14 | - Move the plug program out of $PREFIX/bin because there's no point letting users start it outside of the plugin. On the downside... the path to that program is hardcoded, and will only go into /usr/share/xfce4/panel/plugins. I could never figure out how to get Vala defines to work in waf. 15 | - This version is uploaded to github so others can file issues and make changes. This is no longer my baby. It is yours now, community. Raise it well. :') 16 | 17 | 0.2: 18 | - True version that doesn't do everything in the most terrible way possible. 19 | "If you can't determine it gracefully, ask the user." That is a good 20 | programming rule. 21 | - The DBX plug reads all configuration info from the RC file as opposed to 22 | having it communicated over the command line. 23 | - Presents the configuration dialog at first run to allow the user to configure 24 | background styling. 25 | - Automatically detects orientation and screen position, and communicates them 26 | to the DBX plug. 27 | - Still just rudely kills off the plug whenever a configuration change occurs, 28 | but it works so I'm not gonna fix it. 29 | 30 | 0.1: 31 | - Initial version with all significant functionality implemented. 32 | -------------------------------------------------------------------------------- /INSTALL: -------------------------------------------------------------------------------- 1 | Installation instructions 2 | ------------------------- 3 | 4 | xfce4-dockbarx-plugin uses the waf build system, and has the following 5 | dependencies: 6 | 7 | - Vala >= 0.12 8 | - GLib >= 2.10 9 | - GTK+ >= 2.16 10 | - Xfce4-Panel >= 4.8 11 | - DockBarX >= 0.49 12 | 13 | As Xfce's Vala bindings are typically not in repositories, they are included. 14 | 15 | To configure, build, and install xfce4-dockbarx-plugin, run these commands: 16 | 17 | ./waf configure 18 | ./waf build 19 | sudo ./waf install 20 | 21 | If you are using a distribution that supports checkinstall, you can do the 22 | following instead of sudo ./waf install to install this in your package manager: 23 | 24 | sudo ./waf checkinstall 25 | 26 | Use ./waf --help to get a list of configuration and installation options. 27 | 28 | xfce4-panel may not detect the plugin unless you install in the /usr prefix. 29 | 30 | ./waf configure --prefix=/usr 31 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ***IMPORTANT:*** I have discontinued work on this project and no longer maintain it; I migrated to [xfce4-docklike-plugin](https://gitlab.xfce.org/panel-plugins/xfce4-docklike-plugin) when I was still on XFCE, but I have migrated to Plasma as of January 2022. I recommend the docklike plugin for those who want dock-style tasklist functionality on XFCE; or honestly, any other DE, because they all integrate that functionality much better. 2 | 3 | This repo will soon be archived. The date of this writing is May 24, 2022. 4 | 5 | # xfce4-dockbarx-plugin 6 | ### ver. 0.5 7 | 8 | ## About xfce4-dockbarx-plugin 9 | xfce4-dockbarx-plugin is free software. Please see the file COPYING for details. For building and installation instructions please see the INSTALL file. For information on the authors of this program, see AUTHORS and THANKS. 10 | 11 | xfce4-dockbarx-plugin is a pair of programs--a gtk socket in Vala and a gtk plug in Python--that work together to embed DockbarX into xfce4-panel. See THANKS for details on DockbarX. Because this is not a port and just grabs the pre-existing DockbarX, you immediately benefit from any updates made to DBX, and already have all the pre-existing functionality. 12 | 13 | ## Using xfce4-dockbarx-plugin 14 | Add DockbarX to the panel and it will automatically start. If you don't want to customize it, no further configuration is necessary. 15 | 16 | If you wish to configure it, you must invoke the configuration dialog through the panel preferences window. You can then configure a distinct background for the plugin, change the maximum size, or set it to expand. The plugin will automatically detect panel orientation and will reconfigure itself on the fly. 17 | 18 | There is only one gotcha for automatic panel blending; namely, if you use the image style, you still need to make sure the offset is properly configured if you have an image that necessitates it. 19 | 20 | ## Any extras? 21 | This plugin includes a DockbarX theme called Mouse, created by me for use with xfce4-panel (but should work fine on Gnome/Mate panels, AWN, or DockX). There are two variant versions for varying levels of x/ythickness on the panel widgets to make them match up nicely. If a theme gives different panel widgets differing x/ythickness, its author is a sick bastard. 22 | 23 | ## Okay, I'm sold! Gimme the goods! 24 | Some distros already have it packaged in some form: 25 | * Arch Linux / Manjaro users can install from the [AUR](https://aur.archlinux.org/packages/xfce4-dockbarx-plugin/). 26 | * Ubuntu users can install from the [Dockbar PPA](https://launchpad.net/~dockbar-main/+archive/ppa). 27 | * The stable source release can be found on [Xfce-Look](http://xfce-look.org/content/show.php?content=157865). 28 | 29 | If you want to (or have to) install from source, you need the following dependencies: 30 | 31 | * Vala >= 0.12 32 | * GLib >= 2.10 33 | * GTK+2 >= 2.16 34 | * Xfce4-Panel >= 4.8 35 | * Xfconf >= 4.8 36 | * DockbarX >= 0.49 37 | 38 | To configure, build, and install, run these commands: 39 | 40 | ./waf configure 41 | ./waf build 42 | sudo ./waf install 43 | 44 | The panel will probably not detect the plugin unless you install it in the /usr prefix, so instead do the configure step with `./waf configure --prefix=/usr` If you are using a distribution that supports checkinstall, you can replace the install step with `sudo ./waf checkinstall` to install it in your package manager. 45 | 46 | ## Awesome! Who do I need to thank for all this? 47 | * Aleksey Shaferov is the original Dockbar developer. 48 | * Matias Särs is the developer of the DockbarX fork. 49 | * The included Vala bindings were developed by Mike Masonnet. 50 | * The developers of the Vala and Python languages are to be thanked, of course. 51 | * The build system is waf, so all the guys working on that are to thank for keeping this out of autohell. 52 | * Trent McPheron is the original developer of this beautifully hacky xfce4 panel plugin that really should not work as well as it does. 53 | * And the github community to whom I entrust the future of this plugin. 54 | 55 | ## I want to make the plugin better! 56 | Awesome! Fork the repo and tell people about it. The future of this plugin is in your hands now. 57 | -------------------------------------------------------------------------------- /THANKS: -------------------------------------------------------------------------------- 1 | Special Thanks 2 | -------------- 3 | 4 | xfce4-dockbarx-plugin embeds the DockBarX applet by Matias Särs. It can be found 5 | at the following URL: 6 | 7 | http://gnome-look.org/content/show.php?content=101604 8 | 9 | Thanks to Matias for his blessings on the project. 10 | 11 | And also thanks to: 12 | - The authors of Vala, for a great programming language that brings the power 13 | and universality of C to a modern, easy to learn C#-like language. 14 | - The authors of waf for an easy to use, intuitive build system. 15 | - The members of the various IRC channels that helped me on my way with Vala 16 | and waf. 17 | - The authors of XFCE for a great desktop environment. 18 | - The authors of the Vala bindings for XFCE, without which this port would not 19 | be possible. 20 | -------------------------------------------------------------------------------- /data/Mouse-4.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TiZ-HugLife/xfce4-dockbarx-plugin/9e0b3a48cc847e142c3ad7b7433b53af741a9cb9/data/Mouse-4.tar.gz -------------------------------------------------------------------------------- /data/Mouse-6.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TiZ-HugLife/xfce4-dockbarx-plugin/9e0b3a48cc847e142c3ad7b7433b53af741a9cb9/data/Mouse-6.tar.gz -------------------------------------------------------------------------------- /data/Mouse.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TiZ-HugLife/xfce4-dockbarx-plugin/9e0b3a48cc847e142c3ad7b7433b53af741a9cb9/data/Mouse.tar.gz -------------------------------------------------------------------------------- /data/MouseNeo-4.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TiZ-HugLife/xfce4-dockbarx-plugin/9e0b3a48cc847e142c3ad7b7433b53af741a9cb9/data/MouseNeo-4.tar.gz -------------------------------------------------------------------------------- /data/MouseNeo-6.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TiZ-HugLife/xfce4-dockbarx-plugin/9e0b3a48cc847e142c3ad7b7433b53af741a9cb9/data/MouseNeo-6.tar.gz -------------------------------------------------------------------------------- /data/MouseNeo.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TiZ-HugLife/xfce4-dockbarx-plugin/9e0b3a48cc847e142c3ad7b7433b53af741a9cb9/data/MouseNeo.tar.gz -------------------------------------------------------------------------------- /data/dockbarx.desktop.in: -------------------------------------------------------------------------------- 1 | [Xfce Panel] 2 | Type=X-XFCE-PanelPlugin 3 | Encoding=UTF-8 4 | Name=DockbarX 5 | Comment=Dock-style taskbar with grouping and group manipulation. 6 | Icon=dockbarx 7 | X-XFCE-Unique=true 8 | X-XFCE-Module=dockbarx 9 | X-XFCE-Internal=false 10 | -------------------------------------------------------------------------------- /src/dockbarx.vala: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013- Trent McPheron 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | using Xfce; 22 | using Xfconf; 23 | using Gtk; 24 | 25 | 26 | // xfce4-panel uses this to register the plugin. 27 | [ModuleInit] 28 | public Type xfce_panel_module_init (TypeModule module) { 29 | return typeof (DockbarXPlugin); 30 | } 31 | 32 | public class DockbarXPlugin : PanelPlugin { 33 | private Gtk.Socket socket; 34 | private ulong socket_id; 35 | private bool starting_dbx = false; 36 | public int bgmode { get; set; } 37 | public string color { get; set; } 38 | public int alpha { get; set; } 39 | public string image { get; set; } 40 | public int offset { get; set; } 41 | public int max_size { get; set; } 42 | public string orient { get; set; } 43 | public bool free_orient { get; set; } 44 | private bool _block_ah = false; 45 | public Channel xfc; 46 | public string prop; 47 | 48 | // This inhibits autohide whenever xfconf says to. 49 | public bool block_ah { 50 | get { return _block_ah; } 51 | set { block_autohide(_block_ah = value); } 52 | } 53 | 54 | public override void @construct () { 55 | // This program does one thing, and one thing only: 56 | // Embeds the already-made DockBarX using the helper 57 | // application, xfce4-dockbarx-plug. 58 | 59 | Xfconf.init(); 60 | xfc = new Channel.with_property_base("xfce4-panel",get_property_base()); 61 | 62 | bgmode = xfc.get_int("/bgmode", 2); 63 | color = xfc.get_string("/color", "#000"); 64 | alpha = xfc.get_int("/alpha", 100); 65 | image = xfc.get_string("/image", ""); 66 | offset = xfc.get_int("/offset", 0); 67 | max_size = xfc.get_int("/max-size", 0); 68 | orient = xfc.get_string("/orient", "bottom"); 69 | expand = xfc.get_bool("/expand", false); 70 | block_ah = xfc.get_bool("/block-autohide", false); 71 | 72 | Property.bind(xfc, "/mode", typeof(int), this, "bgmode"); 73 | Property.bind(xfc, "/color", typeof(string), this, "color"); 74 | Property.bind(xfc, "/alpha", typeof(int), this, "alpha"); 75 | Property.bind(xfc, "/image", typeof(string), this, "image"); 76 | Property.bind(xfc, "/offset", typeof(int), this, "offset"); 77 | Property.bind(xfc, "/max-size", typeof(int), this, "max-size"); 78 | Property.bind(xfc, "/orient", typeof(string), this, "orient"); 79 | Property.bind(xfc, "/expand", typeof(bool), this, "expand"); 80 | Property.bind(xfc, "/block-autohide", typeof(bool), this, "block_ah"); 81 | 82 | socket = new Gtk.Socket(); 83 | add(socket); 84 | socket_id = (ulong)socket.get_id(); 85 | determine_orientation(screen_position); 86 | size_changed.connect(() => { return true; }); 87 | menu_show_configure(); 88 | configure_plugin.connect(() => { 89 | PrefDialog pd = new PrefDialog(this); 90 | pd.run(); 91 | }); 92 | orientation_changed.connect(() => { 93 | determine_orientation(screen_position); 94 | }); 95 | screen_position_changed.connect(determine_orientation); 96 | socket.plug_removed.connect(start_dockbarx); 97 | 98 | show_all(); 99 | start_dockbarx(); 100 | } 101 | 102 | // Starts DBX when the plugin starts, or when something kills it. 103 | public bool start_dockbarx () { 104 | if (!starting_dbx) { 105 | starting_dbx = true; 106 | try { 107 | Process.spawn_command_line_sync( 108 | "pkill -f 'python.*xfce4-dockbarx-plug'"); 109 | } catch { 110 | var d = new MessageDialog(null, 0, MessageType.ERROR, 111 | ButtonsType.OK, "Failed to stop DockbarX plug."); 112 | d.run(); 113 | d.destroy(); 114 | } 115 | // There should be basically no reason for this to fail. 116 | try { 117 | Process.spawn_command_line_async("/usr/bin/env python2 " + 118 | "/usr/share/xfce4/panel/plugins/xfce4-dockbarx-plug " + 119 | @"-s $socket_id -i $unique_id"); 120 | } catch { 121 | var d = new MessageDialog(null, 0, MessageType.ERROR, 122 | ButtonsType.OK, "Failed to start DockbarX plug."); 123 | d.run(); 124 | d.destroy(); 125 | } 126 | starting_dbx = false; 127 | } 128 | return true; 129 | } 130 | 131 | public void determine_orientation (ScreenPosition pos) { 132 | switch (pos) { 133 | case ScreenPosition.S: 134 | case ScreenPosition.SE_H: 135 | case ScreenPosition.SW_H: 136 | orient = "bottom"; 137 | break; 138 | case ScreenPosition.N: 139 | case ScreenPosition.NE_H: 140 | case ScreenPosition.NW_H: 141 | orient = "top"; 142 | break; 143 | case ScreenPosition.W: 144 | case ScreenPosition.NW_V: 145 | case ScreenPosition.SW_V: 146 | orient = "left"; 147 | break; 148 | case ScreenPosition.E: 149 | case ScreenPosition.NE_V: 150 | case ScreenPosition.SE_V: 151 | orient = "right"; 152 | break; 153 | case ScreenPosition.FLOATING_H: 154 | case ScreenPosition.FLOATING_V: 155 | case ScreenPosition.NONE: 156 | default: 157 | // The user can orient the dock freely. 158 | free_orient = true; 159 | 160 | // Swap orientations if necessary. 161 | if (orientation == Orientation.HORIZONTAL) { 162 | if (orient == "left") orient = "bottom"; 163 | else if (orient == "right") orient = "top"; 164 | } else if (orientation == Orientation.VERTICAL) { 165 | if (orient == "bottom") orient = "left"; 166 | else if (orient == "top") orient = "right"; 167 | } 168 | break; 169 | } 170 | 171 | // We have to restart DBX on orientation change because the 172 | // plug doesn't handle it properly yet. 173 | if (socket.get_plug_window() != null) { 174 | start_dockbarx(); 175 | } 176 | } 177 | } 178 | -------------------------------------------------------------------------------- /src/preferences.vala: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013- Trent McPheron 2 | // 3 | // Permission is hereby granted, free of charge, to any person obtaining a copy 4 | // of this software and associated documentation files (the "Software"), to deal 5 | // in the Software without restriction, including without limitation the rights 6 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | // copies of the Software, and to permit persons to whom the Software is 8 | // furnished to do so, subject to the following conditions: 9 | // 10 | // The above copyright notice and this permission notice shall be included in 11 | // all copies or substantial portions of the Software. 12 | // 13 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | // THE SOFTWARE. 20 | 21 | using Gtk; 22 | 23 | 24 | class PrefDialog : Dialog { 25 | private DockbarXPlugin plugin; 26 | private RadioButton bottom_radio; 27 | private RadioButton top_radio; 28 | private RadioButton color_radio; 29 | private RadioButton image_radio; 30 | private RadioButton blend_radio; 31 | private ColorButton color_button; 32 | private HScale alpha_scale; 33 | private FileChooserButton image_button; 34 | private SpinButton offset_spin; 35 | private SpinButton max_size_spin; 36 | private CheckButton expand_check; 37 | 38 | public PrefDialog (DockbarXPlugin plugin) { 39 | this.plugin = plugin; 40 | title = "DockbarX Preferences"; 41 | response.connect((i) => { destroy(); }); 42 | unowned VBox content = get_content_area() as VBox; 43 | content.spacing = 12; 44 | 45 | color_radio = new RadioButton.with_label(null, "Solid color"); 46 | image_radio = new RadioButton.with_label_from_widget( 47 | color_radio, "Background image"); 48 | blend_radio = new RadioButton.with_label_from_widget( 49 | image_radio, "Blend with panel"); 50 | color_button = new ColorButton(); 51 | alpha_scale = new HScale.with_range(0, 100, 1); 52 | alpha_scale.value_pos = PositionType.RIGHT; 53 | image_button = new FileChooserButton("Select background image", 54 | FileChooserAction.OPEN); 55 | offset_spin = new SpinButton.with_range(-32767, 32767, 1); 56 | max_size_spin = new SpinButton.with_range(0, 32767, 1); 57 | expand_check = new CheckButton.with_label("Expand"); 58 | 59 | // Bottom/Top change to Left/Right if the panel's vertical. 60 | var lab1 = "Bottom"; 61 | var lab2 = "Top"; 62 | if (plugin.orientation == Orientation.VERTICAL) { 63 | lab1 = "Left"; 64 | lab2 = "Right"; 65 | } 66 | bottom_radio = new RadioButton.with_label(null, lab1); 67 | top_radio = new RadioButton.with_label_from_widget(bottom_radio, lab2); 68 | 69 | var orient_frame = new Frame("Orientation"); 70 | var color_frame = new Frame(null); 71 | color_frame.label_widget = color_radio; 72 | var image_frame = new Frame(null); 73 | image_frame.label_widget = image_radio; 74 | 75 | var orient_box = new HBox(false, 8); 76 | orient_box.pack_start(bottom_radio, true, true); 77 | orient_box.pack_start(top_radio, true, true); 78 | orient_frame.add(orient_box); 79 | 80 | var color_table = new Table(2, 2, false); 81 | color_table.column_spacing = 8; 82 | var color_label = new Label("Color:"); 83 | var alpha_label = new Label("Alpha:"); 84 | color_table.attach(color_label, 0, 1, 0, 1, 0, 0, 0, 0); 85 | color_table.attach(alpha_label, 0, 1, 1, 2, 0, 0, 0, 0); 86 | color_table.attach(color_button, 1, 2, 0, 1, AttachOptions.EXPAND | 87 | AttachOptions.FILL, 0, 0, 0); 88 | color_table.attach(alpha_scale, 1, 2, 1, 2, AttachOptions.EXPAND | 89 | AttachOptions.FILL, 0, 0, 0); 90 | color_frame.add(color_table); 91 | 92 | var image_table = new Table(2, 2, false); 93 | image_table.column_spacing = 8; 94 | var image_label = new Label("Image:"); 95 | var offset_label = new Label("Offset:"); 96 | image_table.attach(image_label, 0, 1, 0, 1, 0, 0, 0, 0); 97 | image_table.attach(offset_label, 0, 1, 1, 2, 0, 0, 0, 0); 98 | image_table.attach(image_button, 1, 2, 0, 1, AttachOptions.EXPAND | 99 | AttachOptions.FILL, 0, 0, 0); 100 | image_table.attach(offset_spin, 1, 2, 1, 2, AttachOptions.EXPAND | 101 | AttachOptions.FILL, 0, 0, 0); 102 | image_frame.add(image_table); 103 | 104 | var size_box = new HBox(false, 2); 105 | size_box.pack_start(new Label("Max size:")); 106 | size_box.pack_start(max_size_spin); 107 | size_box.pack_start(expand_check); 108 | 109 | if (!plugin.free_orient) { content.pack_start(orient_frame); } 110 | content.pack_start(blend_radio); 111 | content.pack_start(color_frame); 112 | content.pack_start(image_frame); 113 | content.pack_start(size_box); 114 | add_button(Stock.CLOSE, ResponseType.CLOSE); 115 | 116 | bottom_radio.active = plugin.orient == "bottom" || 117 | plugin.orient == "left"; 118 | top_radio.active = plugin.orient == "top" || plugin.orient == "right"; 119 | color_radio.active = plugin.bgmode == 0; 120 | image_radio.active = plugin.bgmode == 1; 121 | blend_radio.active = plugin.bgmode == 2; 122 | Gdk.Color color; 123 | Gdk.Color.parse(plugin.color, out color); 124 | color_button.color = color; 125 | alpha_scale.set_value(plugin.alpha); 126 | image_button.set_filename(plugin.image); 127 | offset_spin.value = plugin.offset; 128 | max_size_spin.value = plugin.max_size; 129 | expand_check.active = plugin.expand; 130 | 131 | bottom_radio.toggled.connect(() => { 132 | if (plugin.orientation == Orientation.HORIZONTAL) { 133 | plugin.orient = bottom_radio.active ? "bottom" : "top"; 134 | } else { 135 | plugin.orient = bottom_radio.active ? "left" : "right"; 136 | } 137 | }); 138 | top_radio.toggled.connect(() => { 139 | if (plugin.orientation == Orientation.HORIZONTAL) { 140 | plugin.orient = top_radio.active ? "top" : "bottom"; 141 | } else { 142 | plugin.orient = top_radio.active ? "right" : "left"; 143 | } 144 | }); 145 | color_radio.toggled.connect(() => { 146 | plugin.bgmode = color_radio.active ? 0 : blend_radio.active ? 2 : 1; 147 | }); 148 | image_radio.toggled.connect(() => { 149 | plugin.bgmode = image_radio.active ? 1 : blend_radio.active ? 2 : 0; 150 | }); 151 | blend_radio.toggled.connect(() => { 152 | plugin.bgmode = blend_radio.active ? 2 : color_radio.active ? 0 : 1; 153 | }); 154 | color_button.color_set.connect(() => { 155 | plugin.color = color_button.color.to_string(); 156 | }); 157 | alpha_scale.value_changed.connect(() => { 158 | plugin.alpha = (int)alpha_scale.get_value(); 159 | }); 160 | image_button.file_set.connect(() => { 161 | plugin.image = image_button.get_filename(); 162 | }); 163 | offset_spin.value_changed.connect(() => { 164 | plugin.offset = (int)offset_spin.value; 165 | }); 166 | max_size_spin.value_changed.connect(() => { 167 | plugin.max_size = (int)max_size_spin.value; 168 | }); 169 | expand_check.toggled.connect(() => { 170 | plugin.expand = expand_check.active; 171 | }); 172 | 173 | show_all(); 174 | } 175 | } 176 | -------------------------------------------------------------------------------- /src/xfce4-dockbarx-plug.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python2 2 | # 3 | # xfce4-dockbarx-plug 4 | # 5 | # Copyright 2008-2013 6 | # Aleksey Shaferov, Matias Sars, and Trent McPheron 7 | # 8 | # DockbarX is free software: you can redistribute it and/or modify 9 | # it under the terms of the GNU General Public License as published by 10 | # the Free Software Foundation, either version 3 of the License, or 11 | # (at your option) any later version. 12 | # 13 | # DockbarX is distributed in the hope that it will be useful, 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 | # GNU General Public License for more details. 17 | # 18 | # You should have received a copy of the GNU General Public License 19 | # along with dockbar. If not, see . 20 | 21 | from dockbarx.log import *; log_to_file() 22 | import sys 23 | sys.stderr = StdErrWrapper() 24 | sys.stdout = StdOutWrapper() 25 | import io 26 | import traceback 27 | 28 | import pygtk 29 | pygtk.require("2.0") 30 | import gtk 31 | import cairo 32 | import dbus 33 | 34 | from optparse import OptionParser 35 | 36 | 37 | # A very minimal plug application that loads DockbarX 38 | # so that the embed plugin can, well, embed it. 39 | class DockBarXFCEPlug(gtk.Plug): 40 | # We want to do our own expose instead of the default. 41 | __gsignals__ = {"expose-event": "override"} 42 | 43 | def __init__ (self): 44 | import dockbarx.dockbar as db 45 | self.bus = None 46 | self.xfconf = None 47 | self.dbx_prop = None 48 | self.panel_prop = None 49 | self.mode = None 50 | 51 | parser = OptionParser() 52 | parser.add_option("-s", "--socket", default = 0, help = "Socket ID") 53 | parser.add_option("-i", "--plugin_id", default = -1, help = "Plugin ID") 54 | (options, args) = parser.parse_args() 55 | 56 | # Sanity checks. 57 | if options.socket == 0: 58 | sys.exit("This program needs to be run by the XFCE DBX plugin.") 59 | if options.plugin_id == -1: 60 | sys.exit("We need to know the plugin id of the DBX socket.") 61 | 62 | gtk.Plug.__init__(self, int(options.socket)) 63 | self.connect("destroy", self.destroy) 64 | self.get_settings().connect("notify::gtk-theme-name",self.theme_changed) 65 | self.set_app_paintable(True) 66 | gtk_screen = gtk.gdk.screen_get_default() 67 | colormap = gtk_screen.get_rgba_colormap() 68 | if colormap is None: colormap = gtk_screen.get_rgb_colormap() 69 | self.set_colormap(colormap) 70 | 71 | # This should cause the widget to get themed like a panel. 72 | self.set_name("Xfce4PanelDockBarX") 73 | self.show() 74 | 75 | self.bus = dbus.SessionBus() 76 | self.xfconf = dbus.Interface(self.bus.get_object( 77 | "org.xfce.Xfconf", "/org/xfce/Xfconf"), "org.xfce.Xfconf") 78 | self.dbx_prop = "/plugins/plugin-" + options.plugin_id + "/" 79 | self.panel_prop = [k for (k, v) in 80 | self.xfconf.GetAllProperties("xfce4-panel", "/panels").iteritems() 81 | if "plugin-ids" in k and int(options.plugin_id) in v][0][:-10] 82 | self.bus.add_signal_receiver(self.xfconf_changed, "PropertyChanged", 83 | "org.xfce.Xfconf", "org.xfce.Xfconf", "/org/xfce/Xfconf") 84 | 85 | self.dockbar = db.DockBar(self) 86 | self.dockbar.set_orient(self.get_orient()) 87 | self.config_bg() 88 | self.dockbar.set_expose_on_clear(True) 89 | self.dockbar.load() 90 | self.add(self.dockbar.get_container()) 91 | self.dockbar.set_max_size(self.get_size()) 92 | self.show_all() 93 | self.block_autohide_patch() 94 | 95 | # Convenience methods. 96 | def xfconf_get (self, prop_base, prop, default=None): 97 | if self.xfconf.PropertyExists("xfce4-panel", prop_base + prop): 98 | retval = self.xfconf.GetProperty("xfce4-panel", prop_base + prop) 99 | return retval 100 | else: 101 | return default 102 | def xfconf_get_dbx (self, prop, default=None): 103 | return self.xfconf_get(self.dbx_prop, prop, default) 104 | def xfconf_get_panel (self, prop, default=None): 105 | return self.xfconf_get(self.panel_prop, prop, default) 106 | 107 | def xfconf_changed (self, channel, prop, val): 108 | if channel != "xfce4-panel": return 109 | if self.panel_prop in prop and self.mode == 2: 110 | self.pattern_from_dbus() 111 | elif self.dbx_prop in prop: 112 | if "orient" in prop: self.dockbar.set_orient(self.get_orient()) 113 | elif "mode" in prop: self.config_bg() 114 | elif "max-size" in prop or "expand" in prop: 115 | self.dockbar.set_max_size(self.get_size()) 116 | elif "block-autohide" in prop: 117 | pass # This is one way comm from the plug to the socket. 118 | elif self.mode == 0 and ("color" in prop or "alpha" in prop): 119 | self.color_pattern(gtk.gdk.color_parse(self.xfconf_get_dbx( 120 | "color", "#000")), self.xfconf_get_dbx("alpha", 100)) 121 | elif self.mode == 1 and ("image" in prop or "offset" in prop): 122 | self.image_pattern(self.xfconf_get_dbx("image", "")) 123 | else: 124 | self.pattern_from_dbus() 125 | self.queue_draw() 126 | 127 | # The only function that sets anything in xfconf. It's a lazy way to 128 | # communicate with the vala socket, but it does work! 129 | def set_block_autohide (self): 130 | self.xfconf.SetProperty("xfce4-panel", self.dbx_prop + 131 | "block-autohide", self.dockbar.globals.get_shown_popup() != None or 132 | self.dockbar.globals.gtkmenu_showing) 133 | 134 | # Terrible monkey patching... but this allows inhibiting autohide! 135 | def block_autohide_patch (self): 136 | import dockbarx.common as com 137 | def new_setattr (obj, name, value): 138 | super(com.Globals, obj).__setattr__(name, value) 139 | if name in ("gtkmenu_showing", "shown_popup"): 140 | self.set_block_autohide() 141 | com.Globals.__setattr__ = new_setattr 142 | 143 | def theme_changed (self, obj=None, prop=None): 144 | if self.mode == 2: 145 | self.pattern_from_dbus() 146 | self.queue_draw() 147 | 148 | def config_bg (self): 149 | self.mode = self.xfconf_get_dbx("mode", 2) 150 | if self.mode == 1: 151 | self.image_pattern(self.xfconf_get_dbx("image", "")) 152 | elif self.mode == 0: 153 | self.color_pattern(gtk.gdk.color_parse(self.xfconf_get_dbx( 154 | "color", "#000")), self.xfconf_get_dbx("alpha", 100)) 155 | else: 156 | self.pattern_from_dbus() 157 | 158 | def color_pattern (self, color, alpha): 159 | if gtk.gdk.screen_get_default().get_rgba_colormap() is None: alpha = 100 160 | self.pattern = cairo.SolidPattern(color.red_float, color.green_float, 161 | color.blue_float, alpha / 100.0) 162 | 163 | def image_pattern (self, image): 164 | self.offset = self.xfconf_get_dbx("offset", 0) 165 | try: 166 | surface = cairo.ImageSurface.create_from_png(image) 167 | self.pattern = cairo.SurfacePattern(surface) 168 | self.pattern.set_extend(cairo.EXTEND_REPEAT) 169 | tx = self.offset if self.orient in ("up", "down") else 0 170 | ty = self.offset if self.orient in ("left", "right") else 0 171 | matrix = cairo.Matrix(x0=tx, xy=ty) 172 | self.pattern.set_matrix(matrix) 173 | except: 174 | traceback.print_exc() 175 | print "Failed to load image." 176 | self.pattern_from_dbus() 177 | return 178 | 179 | def pattern_from_dbus (self): 180 | bgstyle = self.xfconf_get_panel("background-style", 0) 181 | image = self.xfconf_get_panel("background-image", "") 182 | alpha = self.xfconf_get_panel("background-alpha", 100) 183 | if bgstyle == 2 and os.path.isfile(image): 184 | self.image_pattern(image) 185 | elif bgstyle == 1: 186 | col = self.xfconf_get_panel("background-color", [0, 0, 0, 0]) 187 | self.color_pattern(gtk.gdk.Color(col[0], col[1], col[2]), alpha) 188 | else: 189 | style = self.get_style() 190 | self.color_pattern(style.bg[gtk.STATE_NORMAL], alpha) 191 | 192 | def get_orient (self): 193 | self.orient = self.xfconf_get_dbx("orient", "down") 194 | 195 | # Let's make sure our parameters are actually valid. 196 | if not (self.orient == "bottom" or self.orient == "top" or 197 | self.orient == "down" or self.orient == "up" or 198 | self.orient == "left" or self.orient == "right"): 199 | self.orient = "down" 200 | 201 | # Change it to DBX-specific terminology. 202 | if self.orient == "bottom": self.orient = "down" 203 | if self.orient == "top": self.orient = "up" 204 | 205 | return self.orient 206 | 207 | def get_size (self): 208 | max_size = self.xfconf_get_dbx("max-size", 0) 209 | if max_size < 1: max_size = 32767 210 | self.expand = self.xfconf_get_dbx("expand", False) 211 | return max_size 212 | 213 | # Dockbar calls back with this function when it is reloaded 214 | # since the old container has been destroyed in the reload 215 | # and needs to be added again. 216 | def readd_container (self, container): 217 | self.add(container) 218 | self.dockbar.set_max_size(self.get_size()) 219 | container.show_all() 220 | 221 | # Imitates xfce4-panel's expose event. 222 | def do_expose_event (self, event): 223 | self.window.set_back_pixmap(None, False) 224 | ctx = self.window.cairo_create() 225 | ctx.set_antialias(cairo.ANTIALIAS_NONE) 226 | ctx.set_operator(cairo.OPERATOR_SOURCE) 227 | ctx.rectangle(event.area.x, event.area.y, 228 | event.area.width, event.area.height) 229 | ctx.clip() 230 | ctx.set_source(self.pattern) 231 | ctx.paint() 232 | if self.get_child(): 233 | self.propagate_expose(self.get_child(), event) 234 | 235 | def destroy (self, widget, data=None): 236 | gtk.main_quit() 237 | 238 | 239 | if __name__ == '__main__': 240 | dbx = DockBarXFCEPlug() 241 | gtk.main() 242 | -------------------------------------------------------------------------------- /vapi/COPYING: -------------------------------------------------------------------------------- 1 | GNU LESSER GENERAL PUBLIC LICENSE 2 | Version 2.1, February 1999 3 | 4 | Copyright (C) 1991, 1999 Free Software Foundation, Inc. 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | [This is the first released version of the Lesser GPL. It also counts 10 | as the successor of the GNU Library Public License, version 2, hence 11 | the version number 2.1.] 12 | 13 | Preamble 14 | 15 | The licenses for most software are designed to take away your 16 | freedom to share and change it. By contrast, the GNU General Public 17 | Licenses are intended to guarantee your freedom to share and change 18 | free software--to make sure the software is free for all its users. 19 | 20 | This license, the Lesser General Public License, applies to some 21 | specially designated software packages--typically libraries--of the 22 | Free Software Foundation and other authors who decide to use it. You 23 | can use it too, but we suggest you first think carefully about whether 24 | this license or the ordinary General Public License is the better 25 | strategy to use in any particular case, based on the explanations below. 26 | 27 | When we speak of free software, we are referring to freedom of use, 28 | not price. Our General Public Licenses are designed to make sure that 29 | you have the freedom to distribute copies of free software (and charge 30 | for this service if you wish); that you receive source code or can get 31 | it if you want it; that you can change the software and use pieces of 32 | it in new free programs; and that you are informed that you can do 33 | these things. 34 | 35 | To protect your rights, we need to make restrictions that forbid 36 | distributors to deny you these rights or to ask you to surrender these 37 | rights. These restrictions translate to certain responsibilities for 38 | you if you distribute copies of the library or if you modify it. 39 | 40 | For example, if you distribute copies of the library, whether gratis 41 | or for a fee, you must give the recipients all the rights that we gave 42 | you. You must make sure that they, too, receive or can get the source 43 | code. If you link other code with the library, you must provide 44 | complete object files to the recipients, so that they can relink them 45 | with the library after making changes to the library and recompiling 46 | it. And you must show them these terms so they know their rights. 47 | 48 | We protect your rights with a two-step method: (1) we copyright the 49 | library, and (2) we offer you this license, which gives you legal 50 | permission to copy, distribute and/or modify the library. 51 | 52 | To protect each distributor, we want to make it very clear that 53 | there is no warranty for the free library. Also, if the library is 54 | modified by someone else and passed on, the recipients should know 55 | that what they have is not the original version, so that the original 56 | author's reputation will not be affected by problems that might be 57 | introduced by others. 58 | 59 | Finally, software patents pose a constant threat to the existence of 60 | any free program. We wish to make sure that a company cannot 61 | effectively restrict the users of a free program by obtaining a 62 | restrictive license from a patent holder. Therefore, we insist that 63 | any patent license obtained for a version of the library must be 64 | consistent with the full freedom of use specified in this license. 65 | 66 | Most GNU software, including some libraries, is covered by the 67 | ordinary GNU General Public License. This license, the GNU Lesser 68 | General Public License, applies to certain designated libraries, and 69 | is quite different from the ordinary General Public License. We use 70 | this license for certain libraries in order to permit linking those 71 | libraries into non-free programs. 72 | 73 | When a program is linked with a library, whether statically or using 74 | a shared library, the combination of the two is legally speaking a 75 | combined work, a derivative of the original library. The ordinary 76 | General Public License therefore permits such linking only if the 77 | entire combination fits its criteria of freedom. The Lesser General 78 | Public License permits more lax criteria for linking other code with 79 | the library. 80 | 81 | We call this license the "Lesser" General Public License because it 82 | does Less to protect the user's freedom than the ordinary General 83 | Public License. It also provides other free software developers Less 84 | of an advantage over competing non-free programs. These disadvantages 85 | are the reason we use the ordinary General Public License for many 86 | libraries. However, the Lesser license provides advantages in certain 87 | special circumstances. 88 | 89 | For example, on rare occasions, there may be a special need to 90 | encourage the widest possible use of a certain library, so that it becomes 91 | a de-facto standard. To achieve this, non-free programs must be 92 | allowed to use the library. A more frequent case is that a free 93 | library does the same job as widely used non-free libraries. In this 94 | case, there is little to gain by limiting the free library to free 95 | software only, so we use the Lesser General Public License. 96 | 97 | In other cases, permission to use a particular library in non-free 98 | programs enables a greater number of people to use a large body of 99 | free software. For example, permission to use the GNU C Library in 100 | non-free programs enables many more people to use the whole GNU 101 | operating system, as well as its variant, the GNU/Linux operating 102 | system. 103 | 104 | Although the Lesser General Public License is Less protective of the 105 | users' freedom, it does ensure that the user of a program that is 106 | linked with the Library has the freedom and the wherewithal to run 107 | that program using a modified version of the Library. 108 | 109 | The precise terms and conditions for copying, distribution and 110 | modification follow. Pay close attention to the difference between a 111 | "work based on the library" and a "work that uses the library". The 112 | former contains code derived from the library, whereas the latter must 113 | be combined with the library in order to run. 114 | 115 | GNU LESSER GENERAL PUBLIC LICENSE 116 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 117 | 118 | 0. This License Agreement applies to any software library or other 119 | program which contains a notice placed by the copyright holder or 120 | other authorized party saying it may be distributed under the terms of 121 | this Lesser General Public License (also called "this License"). 122 | Each licensee is addressed as "you". 123 | 124 | A "library" means a collection of software functions and/or data 125 | prepared so as to be conveniently linked with application programs 126 | (which use some of those functions and data) to form executables. 127 | 128 | The "Library", below, refers to any such software library or work 129 | which has been distributed under these terms. A "work based on the 130 | Library" means either the Library or any derivative work under 131 | copyright law: that is to say, a work containing the Library or a 132 | portion of it, either verbatim or with modifications and/or translated 133 | straightforwardly into another language. (Hereinafter, translation is 134 | included without limitation in the term "modification".) 135 | 136 | "Source code" for a work means the preferred form of the work for 137 | making modifications to it. For a library, complete source code means 138 | all the source code for all modules it contains, plus any associated 139 | interface definition files, plus the scripts used to control compilation 140 | and installation of the library. 141 | 142 | Activities other than copying, distribution and modification are not 143 | covered by this License; they are outside its scope. The act of 144 | running a program using the Library is not restricted, and output from 145 | such a program is covered only if its contents constitute a work based 146 | on the Library (independent of the use of the Library in a tool for 147 | writing it). Whether that is true depends on what the Library does 148 | and what the program that uses the Library does. 149 | 150 | 1. You may copy and distribute verbatim copies of the Library's 151 | complete source code as you receive it, in any medium, provided that 152 | you conspicuously and appropriately publish on each copy an 153 | appropriate copyright notice and disclaimer of warranty; keep intact 154 | all the notices that refer to this License and to the absence of any 155 | warranty; and distribute a copy of this License along with the 156 | Library. 157 | 158 | You may charge a fee for the physical act of transferring a copy, 159 | and you may at your option offer warranty protection in exchange for a 160 | fee. 161 | 162 | 2. You may modify your copy or copies of the Library or any portion 163 | of it, thus forming a work based on the Library, and copy and 164 | distribute such modifications or work under the terms of Section 1 165 | above, provided that you also meet all of these conditions: 166 | 167 | a) The modified work must itself be a software library. 168 | 169 | b) You must cause the files modified to carry prominent notices 170 | stating that you changed the files and the date of any change. 171 | 172 | c) You must cause the whole of the work to be licensed at no 173 | charge to all third parties under the terms of this License. 174 | 175 | d) If a facility in the modified Library refers to a function or a 176 | table of data to be supplied by an application program that uses 177 | the facility, other than as an argument passed when the facility 178 | is invoked, then you must make a good faith effort to ensure that, 179 | in the event an application does not supply such function or 180 | table, the facility still operates, and performs whatever part of 181 | its purpose remains meaningful. 182 | 183 | (For example, a function in a library to compute square roots has 184 | a purpose that is entirely well-defined independent of the 185 | application. Therefore, Subsection 2d requires that any 186 | application-supplied function or table used by this function must 187 | be optional: if the application does not supply it, the square 188 | root function must still compute square roots.) 189 | 190 | These requirements apply to the modified work as a whole. If 191 | identifiable sections of that work are not derived from the Library, 192 | and can be reasonably considered independent and separate works in 193 | themselves, then this License, and its terms, do not apply to those 194 | sections when you distribute them as separate works. But when you 195 | distribute the same sections as part of a whole which is a work based 196 | on the Library, the distribution of the whole must be on the terms of 197 | this License, whose permissions for other licensees extend to the 198 | entire whole, and thus to each and every part regardless of who wrote 199 | it. 200 | 201 | Thus, it is not the intent of this section to claim rights or contest 202 | your rights to work written entirely by you; rather, the intent is to 203 | exercise the right to control the distribution of derivative or 204 | collective works based on the Library. 205 | 206 | In addition, mere aggregation of another work not based on the Library 207 | with the Library (or with a work based on the Library) on a volume of 208 | a storage or distribution medium does not bring the other work under 209 | the scope of this License. 210 | 211 | 3. You may opt to apply the terms of the ordinary GNU General Public 212 | License instead of this License to a given copy of the Library. To do 213 | this, you must alter all the notices that refer to this License, so 214 | that they refer to the ordinary GNU General Public License, version 2, 215 | instead of to this License. (If a newer version than version 2 of the 216 | ordinary GNU General Public License has appeared, then you can specify 217 | that version instead if you wish.) Do not make any other change in 218 | these notices. 219 | 220 | Once this change is made in a given copy, it is irreversible for 221 | that copy, so the ordinary GNU General Public License applies to all 222 | subsequent copies and derivative works made from that copy. 223 | 224 | This option is useful when you wish to copy part of the code of 225 | the Library into a program that is not a library. 226 | 227 | 4. You may copy and distribute the Library (or a portion or 228 | derivative of it, under Section 2) in object code or executable form 229 | under the terms of Sections 1 and 2 above provided that you accompany 230 | it with the complete corresponding machine-readable source code, which 231 | must be distributed under the terms of Sections 1 and 2 above on a 232 | medium customarily used for software interchange. 233 | 234 | If distribution of object code is made by offering access to copy 235 | from a designated place, then offering equivalent access to copy the 236 | source code from the same place satisfies the requirement to 237 | distribute the source code, even though third parties are not 238 | compelled to copy the source along with the object code. 239 | 240 | 5. A program that contains no derivative of any portion of the 241 | Library, but is designed to work with the Library by being compiled or 242 | linked with it, is called a "work that uses the Library". Such a 243 | work, in isolation, is not a derivative work of the Library, and 244 | therefore falls outside the scope of this License. 245 | 246 | However, linking a "work that uses the Library" with the Library 247 | creates an executable that is a derivative of the Library (because it 248 | contains portions of the Library), rather than a "work that uses the 249 | library". The executable is therefore covered by this License. 250 | Section 6 states terms for distribution of such executables. 251 | 252 | When a "work that uses the Library" uses material from a header file 253 | that is part of the Library, the object code for the work may be a 254 | derivative work of the Library even though the source code is not. 255 | Whether this is true is especially significant if the work can be 256 | linked without the Library, or if the work is itself a library. The 257 | threshold for this to be true is not precisely defined by law. 258 | 259 | If such an object file uses only numerical parameters, data 260 | structure layouts and accessors, and small macros and small inline 261 | functions (ten lines or less in length), then the use of the object 262 | file is unrestricted, regardless of whether it is legally a derivative 263 | work. (Executables containing this object code plus portions of the 264 | Library will still fall under Section 6.) 265 | 266 | Otherwise, if the work is a derivative of the Library, you may 267 | distribute the object code for the work under the terms of Section 6. 268 | Any executables containing that work also fall under Section 6, 269 | whether or not they are linked directly with the Library itself. 270 | 271 | 6. As an exception to the Sections above, you may also combine or 272 | link a "work that uses the Library" with the Library to produce a 273 | work containing portions of the Library, and distribute that work 274 | under terms of your choice, provided that the terms permit 275 | modification of the work for the customer's own use and reverse 276 | engineering for debugging such modifications. 277 | 278 | You must give prominent notice with each copy of the work that the 279 | Library is used in it and that the Library and its use are covered by 280 | this License. You must supply a copy of this License. If the work 281 | during execution displays copyright notices, you must include the 282 | copyright notice for the Library among them, as well as a reference 283 | directing the user to the copy of this License. Also, you must do one 284 | of these things: 285 | 286 | a) Accompany the work with the complete corresponding 287 | machine-readable source code for the Library including whatever 288 | changes were used in the work (which must be distributed under 289 | Sections 1 and 2 above); and, if the work is an executable linked 290 | with the Library, with the complete machine-readable "work that 291 | uses the Library", as object code and/or source code, so that the 292 | user can modify the Library and then relink to produce a modified 293 | executable containing the modified Library. (It is understood 294 | that the user who changes the contents of definitions files in the 295 | Library will not necessarily be able to recompile the application 296 | to use the modified definitions.) 297 | 298 | b) Use a suitable shared library mechanism for linking with the 299 | Library. A suitable mechanism is one that (1) uses at run time a 300 | copy of the library already present on the user's computer system, 301 | rather than copying library functions into the executable, and (2) 302 | will operate properly with a modified version of the library, if 303 | the user installs one, as long as the modified version is 304 | interface-compatible with the version that the work was made with. 305 | 306 | c) Accompany the work with a written offer, valid for at 307 | least three years, to give the same user the materials 308 | specified in Subsection 6a, above, for a charge no more 309 | than the cost of performing this distribution. 310 | 311 | d) If distribution of the work is made by offering access to copy 312 | from a designated place, offer equivalent access to copy the above 313 | specified materials from the same place. 314 | 315 | e) Verify that the user has already received a copy of these 316 | materials or that you have already sent this user a copy. 317 | 318 | For an executable, the required form of the "work that uses the 319 | Library" must include any data and utility programs needed for 320 | reproducing the executable from it. However, as a special exception, 321 | the materials to be distributed need not include anything that is 322 | normally distributed (in either source or binary form) with the major 323 | components (compiler, kernel, and so on) of the operating system on 324 | which the executable runs, unless that component itself accompanies 325 | the executable. 326 | 327 | It may happen that this requirement contradicts the license 328 | restrictions of other proprietary libraries that do not normally 329 | accompany the operating system. Such a contradiction means you cannot 330 | use both them and the Library together in an executable that you 331 | distribute. 332 | 333 | 7. You may place library facilities that are a work based on the 334 | Library side-by-side in a single library together with other library 335 | facilities not covered by this License, and distribute such a combined 336 | library, provided that the separate distribution of the work based on 337 | the Library and of the other library facilities is otherwise 338 | permitted, and provided that you do these two things: 339 | 340 | a) Accompany the combined library with a copy of the same work 341 | based on the Library, uncombined with any other library 342 | facilities. This must be distributed under the terms of the 343 | Sections above. 344 | 345 | b) Give prominent notice with the combined library of the fact 346 | that part of it is a work based on the Library, and explaining 347 | where to find the accompanying uncombined form of the same work. 348 | 349 | 8. You may not copy, modify, sublicense, link with, or distribute 350 | the Library except as expressly provided under this License. Any 351 | attempt otherwise to copy, modify, sublicense, link with, or 352 | distribute the Library is void, and will automatically terminate your 353 | rights under this License. However, parties who have received copies, 354 | or rights, from you under this License will not have their licenses 355 | terminated so long as such parties remain in full compliance. 356 | 357 | 9. You are not required to accept this License, since you have not 358 | signed it. However, nothing else grants you permission to modify or 359 | distribute the Library or its derivative works. These actions are 360 | prohibited by law if you do not accept this License. Therefore, by 361 | modifying or distributing the Library (or any work based on the 362 | Library), you indicate your acceptance of this License to do so, and 363 | all its terms and conditions for copying, distributing or modifying 364 | the Library or works based on it. 365 | 366 | 10. Each time you redistribute the Library (or any work based on the 367 | Library), the recipient automatically receives a license from the 368 | original licensor to copy, distribute, link with or modify the Library 369 | subject to these terms and conditions. You may not impose any further 370 | restrictions on the recipients' exercise of the rights granted herein. 371 | You are not responsible for enforcing compliance by third parties with 372 | this License. 373 | 374 | 11. If, as a consequence of a court judgment or allegation of patent 375 | infringement or for any other reason (not limited to patent issues), 376 | conditions are imposed on you (whether by court order, agreement or 377 | otherwise) that contradict the conditions of this License, they do not 378 | excuse you from the conditions of this License. If you cannot 379 | distribute so as to satisfy simultaneously your obligations under this 380 | License and any other pertinent obligations, then as a consequence you 381 | may not distribute the Library at all. For example, if a patent 382 | license would not permit royalty-free redistribution of the Library by 383 | all those who receive copies directly or indirectly through you, then 384 | the only way you could satisfy both it and this License would be to 385 | refrain entirely from distribution of the Library. 386 | 387 | If any portion of this section is held invalid or unenforceable under any 388 | particular circumstance, the balance of the section is intended to apply, 389 | and the section as a whole is intended to apply in other circumstances. 390 | 391 | It is not the purpose of this section to induce you to infringe any 392 | patents or other property right claims or to contest validity of any 393 | such claims; this section has the sole purpose of protecting the 394 | integrity of the free software distribution system which is 395 | implemented by public license practices. Many people have made 396 | generous contributions to the wide range of software distributed 397 | through that system in reliance on consistent application of that 398 | system; it is up to the author/donor to decide if he or she is willing 399 | to distribute software through any other system and a licensee cannot 400 | impose that choice. 401 | 402 | This section is intended to make thoroughly clear what is believed to 403 | be a consequence of the rest of this License. 404 | 405 | 12. If the distribution and/or use of the Library is restricted in 406 | certain countries either by patents or by copyrighted interfaces, the 407 | original copyright holder who places the Library under this License may add 408 | an explicit geographical distribution limitation excluding those countries, 409 | so that distribution is permitted only in or among countries not thus 410 | excluded. In such case, this License incorporates the limitation as if 411 | written in the body of this License. 412 | 413 | 13. The Free Software Foundation may publish revised and/or new 414 | versions of the Lesser General Public License from time to time. 415 | Such new versions will be similar in spirit to the present version, 416 | but may differ in detail to address new problems or concerns. 417 | 418 | Each version is given a distinguishing version number. If the Library 419 | specifies a version number of this License which applies to it and 420 | "any later version", you have the option of following the terms and 421 | conditions either of that version or of any later version published by 422 | the Free Software Foundation. If the Library does not specify a 423 | license version number, you may choose any version ever published by 424 | the Free Software Foundation. 425 | 426 | 14. If you wish to incorporate parts of the Library into other free 427 | programs whose distribution conditions are incompatible with these, 428 | write to the author to ask for permission. For software which is 429 | copyrighted by the Free Software Foundation, write to the Free 430 | Software Foundation; we sometimes make exceptions for this. Our 431 | decision will be guided by the two goals of preserving the free status 432 | of all derivatives of our free software and of promoting the sharing 433 | and reuse of software generally. 434 | 435 | NO WARRANTY 436 | 437 | 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO 438 | WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. 439 | EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR 440 | OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY 441 | KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE 442 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 443 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE 444 | LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME 445 | THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 446 | 447 | 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN 448 | WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY 449 | AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU 450 | FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR 451 | CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE 452 | LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING 453 | RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A 454 | FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF 455 | SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 456 | DAMAGES. 457 | 458 | END OF TERMS AND CONDITIONS 459 | 460 | How to Apply These Terms to Your New Libraries 461 | 462 | If you develop a new library, and you want it to be of the greatest 463 | possible use to the public, we recommend making it free software that 464 | everyone can redistribute and change. You can do so by permitting 465 | redistribution under these terms (or, alternatively, under the terms of the 466 | ordinary General Public License). 467 | 468 | To apply these terms, attach the following notices to the library. It is 469 | safest to attach them to the start of each source file to most effectively 470 | convey the exclusion of warranty; and each file should have at least the 471 | "copyright" line and a pointer to where the full notice is found. 472 | 473 | 474 | Copyright (C) 475 | 476 | This library is free software; you can redistribute it and/or 477 | modify it under the terms of the GNU Lesser General Public 478 | License as published by the Free Software Foundation; either 479 | version 2.1 of the License, or (at your option) any later version. 480 | 481 | This library is distributed in the hope that it will be useful, 482 | but WITHOUT ANY WARRANTY; without even the implied warranty of 483 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 484 | Lesser General Public License for more details. 485 | 486 | You should have received a copy of the GNU Lesser General Public 487 | License along with this library; if not, write to the Free Software 488 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 489 | 490 | Also add information on how to contact you by electronic and paper mail. 491 | 492 | You should also get your employer (if you work as a programmer) or your 493 | school, if any, to sign a "copyright disclaimer" for the library, if 494 | necessary. Here is a sample; alter the names: 495 | 496 | Yoyodyne, Inc., hereby disclaims all copyright interest in the 497 | library `Frob' (a library for tweaking knobs) written by James Random Hacker. 498 | 499 | , 1 April 1990 500 | Ty Coon, President of Vice 501 | 502 | That's all there is to it! 503 | 504 | 505 | -------------------------------------------------------------------------------- /vapi/libxfce4panel-1.0.deps: -------------------------------------------------------------------------------- 1 | atk 2 | gio-2.0 3 | cairo 4 | pango 5 | gdk-pixbuf-2.0 6 | gdk-2.0 7 | gtk+-2.0 8 | libxfce4util-1.0 9 | -------------------------------------------------------------------------------- /vapi/libxfce4panel-1.0.vapi: -------------------------------------------------------------------------------- 1 | /* libxfce4panel-1.0.vapi generated by vapigen-0.16, do not modify. */ 2 | 3 | namespace Xfce { 4 | [CCode (cheader_filename = "libxfce4panel/libxfce4panel.h")] 5 | public class ArrowButton : Gtk.ToggleButton, Atk.Implementor, Gtk.Buildable, Gtk.Activatable { 6 | [CCode (has_construct_function = false, type = "GtkWidget*")] 7 | public ArrowButton (Gtk.ArrowType arrow_type); 8 | public Gtk.ArrowType get_arrow_type (); 9 | public bool get_blinking (); 10 | public void set_arrow_type (Gtk.ArrowType arrow_type); 11 | public void set_blinking (bool blinking); 12 | public Gtk.ArrowType arrow_type { get; set; } 13 | public virtual signal void arrow_type_changed (Gtk.ArrowType type); 14 | } 15 | [CCode (cheader_filename = "libxfce4panel/libxfce4panel.h")] 16 | public class HVBox : Gtk.Box, Atk.Implementor, Gtk.Buildable, Gtk.Orientable { 17 | public Gtk.Orientation orientation; 18 | [CCode (cname = "xfce_hvbox_new", has_construct_function = false, type = "GtkWidget*")] 19 | public HVBox (Gtk.Orientation orientation, bool homogeneous, int spacing); 20 | [CCode (cname = "xfce_hvbox_get_orientation")] 21 | public Gtk.Orientation get_orientation (); 22 | [CCode (cname = "xfce_hvbox_set_orientation")] 23 | public void set_orientation (Gtk.Orientation orientation); 24 | } 25 | [CCode (cheader_filename = "libxfce4panel/libxfce4panel.h")] 26 | public class PanelImage : Gtk.Widget, Atk.Implementor, Gtk.Buildable { 27 | [CCode (has_construct_function = false, type = "GtkWidget*")] 28 | public PanelImage (); 29 | public void clear (); 30 | [CCode (has_construct_function = false, type = "GtkWidget*")] 31 | public PanelImage.from_pixbuf (Gdk.Pixbuf pixbuf); 32 | [CCode (has_construct_function = false, type = "GtkWidget*")] 33 | public PanelImage.from_source (string source); 34 | public int get_size (); 35 | public void set_from_pixbuf (Gdk.Pixbuf pixbuf); 36 | public void set_from_source (string source); 37 | public void set_size (int size); 38 | [NoAccessorMethod] 39 | public Gdk.Pixbuf pixbuf { owned get; set; } 40 | public int size { get; set; } 41 | [NoAccessorMethod] 42 | public string source { owned get; set; } 43 | } 44 | [CCode (cheader_filename = "libxfce4panel/libxfce4panel.h")] 45 | public class PanelPlugin : Gtk.EventBox, Atk.Implementor, Gtk.Buildable, Xfce.PanelPluginProvider { 46 | [CCode (has_construct_function = false)] 47 | protected PanelPlugin (); 48 | public void add_action_widget (Gtk.Widget widget); 49 | public Gtk.ArrowType arrow_type (); 50 | public void block_autohide (bool blocked); 51 | public void block_menu (); 52 | [NoWrapper] 53 | public virtual void @construct (); 54 | public void focus_widget (Gtk.Widget widget); 55 | public unowned string get_arguments (); 56 | public unowned string get_comment (); 57 | public unowned string get_display_name (); 58 | public bool get_expand (); 59 | public bool get_locked (); 60 | public Xfce.PanelPluginMode get_mode (); 61 | public uint get_nrows (); 62 | public Gtk.Orientation get_orientation (); 63 | public unowned string get_property_base (); 64 | public Xfce.ScreenPosition get_screen_position (); 65 | public bool get_shrink (); 66 | public int get_size (); 67 | public bool get_small (); 68 | public unowned string lookup_rc_file (); 69 | public void menu_insert_item (Gtk.MenuItem item); 70 | public void menu_show_about (); 71 | public void menu_show_configure (); 72 | public static void position_menu (Gtk.Menu menu, int x, int y, bool push_in, void* panel_plugin); 73 | public void position_widget (Gtk.Widget menu_widget, Gtk.Widget attach_widget, int x, int y); 74 | public void register_menu (Gtk.Menu menu); 75 | public void remove (); 76 | public unowned string save_location (bool create); 77 | public void set_expand (bool expand); 78 | public void set_shrink (bool shrink); 79 | public void set_small (bool small); 80 | public void take_window (Gtk.Window window); 81 | public void unblock_menu (); 82 | [CCode (array_length = false, array_null_terminated = true)] 83 | public string[] arguments { get; construct; } 84 | public string comment { get; construct; } 85 | public string display_name { get; construct; } 86 | public bool expand { get; set; } 87 | public Xfce.PanelPluginMode mode { get; } 88 | public string name { get; construct; } 89 | public uint nrows { get; } 90 | public Gtk.Orientation orientation { get; } 91 | public Xfce.ScreenPosition screen_position { get; } 92 | public bool shrink { get; set; } 93 | public int size { get; } 94 | public bool small { get; set; } 95 | public int unique_id { get; construct; } 96 | public virtual signal void about (); 97 | public virtual signal void configure_plugin (); 98 | public virtual signal void free_data (); 99 | public virtual signal void mode_changed (Xfce.PanelPluginMode mode); 100 | public virtual signal void nrows_changed (uint rows); 101 | public virtual signal void orientation_changed (Gtk.Orientation orientation); 102 | public virtual signal bool remote_event (string name, GLib.Value value); 103 | public virtual signal void removed (); 104 | public virtual signal void save (); 105 | public virtual signal void screen_position_changed (Xfce.ScreenPosition position); 106 | public virtual signal bool size_changed (int size); 107 | } 108 | [CCode (cheader_filename = "libxfce4panel/libxfce4panel.h")] 109 | [Compact] 110 | public class PanelTypeModule { 111 | } 112 | [CCode (cheader_filename = "libxfce4panel/libxfce4panel.h")] 113 | public interface PanelPluginProvider { 114 | public abstract void ask_remove (); 115 | public void emit_signal (Xfce.PanelPluginProviderSignal provider_signal); 116 | public abstract unowned string get_name (); 117 | public abstract bool get_show_about (); 118 | public abstract bool get_show_configure (); 119 | public abstract int get_unique_id (); 120 | public abstract bool remote_event (string name, GLib.Value value, uint handle); 121 | public abstract void removed (); 122 | public abstract void save (); 123 | public abstract void set_locked (bool locked); 124 | public abstract void set_mode (Xfce.PanelPluginMode mode); 125 | public abstract void set_nrows (uint rows); 126 | public abstract void set_screen_position (Xfce.ScreenPosition screen_position); 127 | public abstract void set_size (int size); 128 | public abstract void show_about (); 129 | public abstract void show_configure (); 130 | public signal void provider_signal (uint p0); 131 | } 132 | [CCode (cheader_filename = "libxfce4panel/libxfce4panel.h", cprefix = "XFCE_PANEL_PLUGIN_MODE_")] 133 | public enum PanelPluginMode { 134 | HORIZONTAL, 135 | VERTICAL, 136 | DESKBAR 137 | } 138 | [CCode (cheader_filename = "libxfce4panel/libxfce4panel.h", cprefix = "PROVIDER_PROP_TYPE_", has_type_id = false)] 139 | public enum PanelPluginProviderPropType { 140 | SET_SIZE, 141 | SET_MODE, 142 | SET_SCREEN_POSITION, 143 | SET_BACKGROUND_ALPHA, 144 | SET_NROWS, 145 | SET_LOCKED, 146 | SET_SENSITIVE, 147 | SET_BACKGROUND_COLOR, 148 | SET_BACKGROUND_IMAGE, 149 | ACTION_REMOVED, 150 | ACTION_SAVE, 151 | ACTION_QUIT, 152 | ACTION_QUIT_FOR_RESTART, 153 | ACTION_BACKGROUND_UNSET, 154 | ACTION_SHOW_CONFIGURE, 155 | ACTION_SHOW_ABOUT, 156 | ACTION_ASK_REMOVE 157 | } 158 | [CCode (cheader_filename = "libxfce4panel/libxfce4panel.h", cprefix = "PROVIDER_SIGNAL_", has_type_id = false)] 159 | public enum PanelPluginProviderSignal { 160 | MOVE_PLUGIN, 161 | EXPAND_PLUGIN, 162 | COLLAPSE_PLUGIN, 163 | SMALL_PLUGIN, 164 | UNSMALL_PLUGIN, 165 | LOCK_PANEL, 166 | UNLOCK_PANEL, 167 | REMOVE_PLUGIN, 168 | ADD_NEW_ITEMS, 169 | PANEL_PREFERENCES, 170 | PANEL_LOGOUT, 171 | PANEL_ABOUT, 172 | PANEL_HELP, 173 | SHOW_CONFIGURE, 174 | SHOW_ABOUT, 175 | FOCUS_PLUGIN, 176 | SHRINK_PLUGIN, 177 | UNSHRINK_PLUGIN 178 | } 179 | [CCode (cheader_filename = "libxfce4panel/libxfce4panel.h", cprefix = "XFCE_SCREEN_POSITION_")] 180 | public enum ScreenPosition { 181 | NONE, 182 | NW_H, 183 | N, 184 | NE_H, 185 | NW_V, 186 | W, 187 | SW_V, 188 | NE_V, 189 | E, 190 | SE_V, 191 | SW_H, 192 | S, 193 | SE_H, 194 | FLOATING_H, 195 | FLOATING_V 196 | } 197 | [CCode (cheader_filename = "libxfce4panel/libxfce4panel.h", has_target = false)] 198 | public delegate bool PanelPluginCheck (Gdk.Screen screen); 199 | [CCode (cheader_filename = "libxfce4panel/libxfce4panel.h", has_target = false)] 200 | public delegate void PanelPluginFunc (Xfce.PanelPlugin plugin); 201 | [CCode (cheader_filename = "libxfce4panel/libxfce4panel.h", has_target = false)] 202 | public delegate bool PanelPluginPreInit (int argc, string argv); 203 | [CCode (cheader_filename = "libxfce4panel/libxfce4panel.h", has_target = false)] 204 | public delegate unowned Gtk.Widget PluginConstructFunc (string name, int unique_id, string display_name, string comment, string arguments, Gdk.Screen screen); 205 | [CCode (cheader_filename = "libxfce4panel/libxfce4panel.h", has_target = false)] 206 | public delegate GLib.Type PluginInitFunc (GLib.TypeModule module, bool make_resident); 207 | [CCode (cheader_filename = "libxfce4panel/libxfce4panel.h")] 208 | public const int LIBXFCE4PANEL_MAJOR_VERSION; 209 | [CCode (cheader_filename = "libxfce4panel/libxfce4panel.h")] 210 | public const int LIBXFCE4PANEL_MICRO_VERSION; 211 | [CCode (cheader_filename = "libxfce4panel/libxfce4panel.h")] 212 | public const int LIBXFCE4PANEL_MINOR_VERSION; 213 | [CCode (cheader_filename = "libxfce4panel/libxfce4panel.h")] 214 | public const string LIBXFCE4PANEL_VERSION; 215 | [CCode (cheader_filename = "libxfce4panel/libxfce4panel.h", cname = "libxfce4panel_check_version")] 216 | public static unowned string libxfce4panel_check_version (uint required_major, uint required_minor, uint required_micro); 217 | [CCode (cheader_filename = "libxfce4panel/libxfce4panel.h")] 218 | public static unowned Gtk.Widget panel_create_button (); 219 | [CCode (cheader_filename = "libxfce4panel/libxfce4panel.h")] 220 | public static unowned Gtk.Widget panel_create_toggle_button (); 221 | [CCode (cheader_filename = "libxfce4panel/libxfce4panel.h")] 222 | public static unowned string panel_get_channel_name (); 223 | [CCode (cheader_filename = "libxfce4panel/libxfce4panel.h")] 224 | public static unowned Gdk.Pixbuf panel_pixbuf_from_source (string source, Gtk.IconTheme icon_theme, int size); 225 | [CCode (cheader_filename = "libxfce4panel/libxfce4panel.h")] 226 | public static unowned Gdk.Pixbuf panel_pixbuf_from_source_at_size (string source, Gtk.IconTheme icon_theme, int dest_width, int dest_height); 227 | } 228 | -------------------------------------------------------------------------------- /vapi/libxfce4util-1.0.vapi: -------------------------------------------------------------------------------- 1 | /* libxfce4util-1.0.vapi generated by vapigen-0.16, do not modify. */ 2 | 3 | namespace Xfce { 4 | [CCode (cheader_filename = "libxfce4util/libxfce4util.h")] 5 | [Compact] 6 | public class PosixSignalHandler { 7 | public delegate void Callback (int @signal); 8 | public static bool init () throws GLib.Error; 9 | public static void restore_handler (int @signal); 10 | public static bool set_handler (int @signal, Xfce.PosixSignalHandler.Callback handler) throws GLib.Error; 11 | public static void shutdown (); 12 | } 13 | [CCode (cheader_filename = "libxfce4util/libxfce4util.h", free_function = "xfce_rc_close")] 14 | [Compact] 15 | public class Rc { 16 | [CCode (cname = "xfce_rc_simple_open", has_construct_function = false)] 17 | public Rc (string filename, bool readonly); 18 | public void delete_entry (string key, bool global); 19 | public void delete_group (string group, bool global); 20 | public void flush (); 21 | [CCode (cname = "xfce_rc_config_open", has_construct_function = false)] 22 | public Rc.from_resource (Xfce.ResourceType type, string resource, bool readonly); 23 | public unowned string get_entries (string group); 24 | public unowned string get_group (); 25 | public unowned string get_groups (); 26 | public unowned string get_locale (); 27 | public bool has_entry (string key); 28 | public bool has_group (string group); 29 | public bool is_dirty (); 30 | public bool is_readonly (); 31 | public bool read_bool_entry (string key, bool fallback); 32 | public unowned string read_entry (string key, string fallback); 33 | public unowned string read_entry_untranslated (string key, string fallback); 34 | public int read_int_entry (string key, int fallback); 35 | public unowned string read_list_entry (string key, string delimiter); 36 | public void rollback (); 37 | public void set_group (string group); 38 | public void write_bool_entry (string key, bool value); 39 | public void write_entry (string key, string value); 40 | public void write_int_entry (string key, int value); 41 | public void write_list_entry (string key, string value, string separator); 42 | } 43 | [CCode (cheader_filename = "libxfce4util/libxfce4util.h")] 44 | [Compact] 45 | public class Resource { 46 | [CCode (array_length = false)] 47 | public static string[] dirs (Xfce.ResourceType type); 48 | public static unowned string lookup (Xfce.ResourceType type, string filename); 49 | [CCode (array_length = false)] 50 | public static string[] lookup_all (Xfce.ResourceType type, string filename); 51 | [CCode (array_length = false)] 52 | public static string[] match (Xfce.ResourceType type, string pattern, bool unique); 53 | public static unowned string save_location (Xfce.ResourceType type, string relpath, bool create); 54 | } 55 | [CCode (cheader_filename = "libxfce4util/libxfce4util.h", cprefix = "XFCE_LICENSE_TEXT_", has_type_id = false)] 56 | public enum LicenseTextType { 57 | BSD, 58 | GPL, 59 | LGPL 60 | } 61 | [CCode (cheader_filename = "libxfce4util/libxfce4util.h", cprefix = "XFCE_RESOURCE_")] 62 | [Compact] 63 | public enum ResourceType { 64 | DATA, 65 | CONFIG, 66 | CACHE, 67 | ICONS, 68 | THEMES 69 | } 70 | [CCode (cheader_filename = "libxfce4util/libxfce4util.h")] 71 | public const int LIBXFCE4UTIL_MAJOR_VERSION; 72 | [CCode (cheader_filename = "libxfce4util/libxfce4util.h")] 73 | public const int LIBXFCE4UTIL_MICRO_VERSION; 74 | [CCode (cheader_filename = "libxfce4util/libxfce4util.h")] 75 | public const int LIBXFCE4UTIL_MINOR_VERSION; 76 | [CCode (cheader_filename = "libxfce4util/libxfce4util.h")] 77 | public static unowned string expand_variables (string command, string envp); 78 | [CCode (cheader_filename = "libxfce4util/libxfce4util.h")] 79 | public static unowned string get_homedir (); 80 | [CCode (cheader_filename = "libxfce4util/libxfce4util.h")] 81 | public static unowned string get_homefile_r (string buffer, size_t length, string format); 82 | [CCode (cheader_filename = "libxfce4util/libxfce4util.h")] 83 | public static unowned string get_license_text (Xfce.LicenseTextType license_type); 84 | [CCode (cheader_filename = "libxfce4util/libxfce4util.h")] 85 | public static unowned string get_userdir (); 86 | [CCode (cheader_filename = "libxfce4util/libxfce4util.h")] 87 | public static unowned string get_userfile_r (string buffer, size_t length, string format); 88 | [CCode (cheader_filename = "libxfce4util/libxfce4util.h", cname = "xfce_version_string")] 89 | public static unowned string get_version_string (); 90 | [CCode (cheader_filename = "libxfce4util/libxfce4util.h")] 91 | public static unowned string gethostname (); 92 | [CCode (cheader_filename = "libxfce4util/libxfce4util.h")] 93 | public static int putenv (string str); 94 | [CCode (cheader_filename = "libxfce4util/libxfce4util.h")] 95 | public static int setenv (string name, string value, bool overwrite); 96 | [CCode (cheader_filename = "libxfce4util/libxfce4util.h")] 97 | public static unowned string strjoin (string separator, string strings, int count); 98 | [CCode (cheader_filename = "libxfce4util/libxfce4util.h")] 99 | public static void textdomain (string package, string localedir, string? encoding = null); 100 | [CCode (cheader_filename = "libxfce4util/libxfce4util.h")] 101 | public static void unsetenv (string name); 102 | [CCode (cheader_filename = "libxfce4util/libxfce4util.h")] 103 | public static unowned string utf8_remove_controls (string str, ssize_t max_len, string end); 104 | [CCode (cheader_filename = "libxfce4util/libxfce4util.h")] 105 | public static unowned string utf8_strndup (string src, ssize_t max_len); 106 | [CCode (cheader_filename = "libxfce4util/libxfce4util.h")] 107 | public static unowned string version_string (); 108 | } 109 | -------------------------------------------------------------------------------- /vapi/libxfconf-0.vapi: -------------------------------------------------------------------------------- 1 | /* libxfconf-0.vapi generated by vapigen-0.16, do not modify. */ 2 | 3 | namespace Xfconf { 4 | [CCode (cheader_filename = "xfconf/xfconf.h")] 5 | public class Channel : GLib.Object { 6 | [CCode (has_construct_function = false)] 7 | public Channel (string channel_name); 8 | public static unowned Xfconf.Channel @get (string channel_name); 9 | public bool get_bool (string property, bool default_value); 10 | public double get_double (string property, double default_value); 11 | public int32 get_int (string property, int32 default_value); 12 | public bool get_named_struct (string property, string struct_name, void* value_struct); 13 | public unowned GLib.HashTable get_properties (string property_base); 14 | public bool get_property (string property, GLib.Value value); 15 | public string get_string (string property, string default_value); 16 | [CCode (array_length = false)] 17 | public string[] get_string_list (string property); 18 | [CCode (sentinel = "G_TYPE_INVALID")] 19 | public bool get_struct (string property, void* value_struct, ...); 20 | public bool get_structv (string property, void* value_struct, [CCode (array_length_pos = 2)] GLib.Type[] member_types); 21 | public uint32 get_uint (string property, uint32 default_value); 22 | public uint64 get_uint64 (string property, uint64 default_value); 23 | public bool has_property (string property); 24 | public bool is_property_locked (string property); 25 | public void reset_property (string property_base, bool recursive); 26 | public bool set_bool (string property, bool value); 27 | public bool set_double (string property, double value); 28 | public bool set_int (string property, int32 value); 29 | public bool set_named_struct (string property, string struct_name, void* value_struct); 30 | public bool set_property (string property, GLib.Value value); 31 | public bool set_string (string property, string value); 32 | public bool set_string_list (string property, [CCode (array_length = false, type = "const gchar* const*")] string[] values); 33 | [CCode (sentinel = "G_TYPE_INVALID")] 34 | public bool set_struct (string property, void* value_struct, ...); 35 | public bool set_structv (string property, void* value_struct, [CCode (array_length_pos = 2)] GLib.Type[] member_types); 36 | public bool set_uint (string property, uint32 value); 37 | public bool set_uint64 (string property, uint64 value); 38 | [CCode (has_construct_function = false)] 39 | public Channel.with_property_base (string channel_name, string property_base); 40 | [NoAccessorMethod] 41 | public bool is_singleton { get; construct; } 42 | public virtual signal void property_changed (string p0, GLib.Value p1); 43 | } 44 | [CCode (cheader_filename = "xfconf/xfconf.h")] 45 | [Compact] 46 | public class Property { 47 | [CCode (cname = "xfconf_g_property_bind")] 48 | public static ulong bind (Xfconf.Channel channel, string xfconf_property, GLib.Type xfconf_property_type, void* object, string object_property); 49 | [CCode (cname = "xfconf_g_property_bind_gdkcolor")] 50 | public static ulong bind_gdkcolor (Xfconf.Channel channel, string xfconf_property, void* object, string object_property); 51 | [CCode (cname = "xfconf_g_property_unbind")] 52 | public static void unbind (ulong id); 53 | [CCode (cname = "xfconf_g_property_unbind_all")] 54 | public static void unbind_all (void* channel_or_object); 55 | [CCode (cname = "xfconf_g_property_unbind_by_property")] 56 | public static void unbind_by_property (Xfconf.Channel channel, string xfconf_property, void* object, string object_property); 57 | } 58 | [CCode (cheader_filename = "xfconf/xfconf.h", cprefix = "XFCONF_ERROR_")] 59 | public errordomain Error { 60 | UNKNOWN, 61 | CHANNEL_NOT_FOUND, 62 | PROPERTY_NOT_FOUND, 63 | READ_FAILURE, 64 | WRITE_FAILURE, 65 | PERMISSION_DENIED, 66 | INTERNAL_ERROR, 67 | NO_BACKEND, 68 | INVALID_PROPERTY, 69 | INVALID_CHANNEL 70 | } 71 | [CCode (cheader_filename = "xfconf/xfconf.h")] 72 | public static void array_free (GLib.PtrArray arr); 73 | [CCode (cheader_filename = "xfconf/xfconf.h")] 74 | public static bool init () throws Xfconf.Error; 75 | [CCode (array_length = false, cheader_filename = "xfconf/xfconf.h")] 76 | public static string[] list_channels (); 77 | [CCode (cheader_filename = "xfconf/xfconf.h")] 78 | public static void named_struct_register (string struct_name, [CCode (array_length_pos = 1)] GLib.Type[] member_types); 79 | [CCode (cheader_filename = "xfconf/xfconf.h")] 80 | public static void shutdown (); 81 | } 82 | -------------------------------------------------------------------------------- /waf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TiZ-HugLife/xfce4-dockbarx-plugin/9e0b3a48cc847e142c3ad7b7433b53af741a9cb9/waf -------------------------------------------------------------------------------- /wscript: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python2 2 | # 3 | # Copyright (c) 2011- Trent McPheron 4 | # 5 | # Permission is hereby granted, free of charge, to any person obtaining a copy 6 | # of this software and associated documentation files (the "Software"), to deal 7 | # in the Software without restriction, including without limitation the rights 8 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | # copies of the Software, and to permit persons to whom the Software is 10 | # furnished to do so, subject to the following conditions: 11 | # 12 | # The above copyright notice and this permission notice shall be included in 13 | # all copies or substantial portions of the Software. 14 | # 15 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | # THE SOFTWARE. 22 | 23 | # For creating a source archive. 24 | APPNAME = 'xfce4-dockbarx-plugin' 25 | VERSION = '0.5' 26 | 27 | # Required waf stuff. 28 | top = '.' 29 | out = 'build' 30 | 31 | def options (ctx): 32 | ctx.load('compiler_c') 33 | ctx.load('vala') 34 | 35 | def configure (ctx): 36 | # Strip extraneous slash from prefix. 37 | if ctx.options.prefix[-1] == '/' : 38 | ctx.options.prefix += ctx.options.prefix[-1] 39 | 40 | # Check for required stuff. 41 | ctx.load('compiler_c misc') 42 | ctx.load('vala', funs='') 43 | ctx.check_vala() 44 | args = '--cflags --libs' 45 | ctx.find_program('dockx') 46 | ctx.check_cfg(package = 'glib-2.0', atleast_version = '2.10', 47 | uselib_store = 'GLIB', mandatory = True, args = args) 48 | ctx.check_cfg(package = 'gtk+-2.0', atleast_version = '2.16', 49 | uselib_store = 'GTK', mandatory = True, args = args) 50 | ctx.check_cfg(package = 'libxfce4panel-1.0', atleast_version = '4.8', 51 | uselib_store = 'XFCE4PANEL', mandatory = True, args = args) 52 | ctx.check_cfg(package = 'libxfconf-0', atleast_version = '4.8', 53 | uselib_store = 'XFCONF', mandatory = True, args = args) 54 | 55 | def build (ctx): 56 | # Compile the program. 57 | ctx.program( 58 | features = 'c cshlib', 59 | is_lib = True, 60 | vapi_dirs = 'vapi', 61 | source = ctx.path.ant_glob('src/*.vala'), 62 | packages = 'glib-2.0 gtk+-2.0 libxfce4panel-1.0 libxfconf-0', 63 | target = 'dockbarx', 64 | install_path = '${PREFIX}/lib/xfce4/panel/plugins/', 65 | uselib = 'GLIB GTK XFCE4PANEL XFCONF') 66 | 67 | # Install other files. 68 | ctx( 69 | features = 'subst', 70 | source = 'data/dockbarx.desktop.in', 71 | target = 'data/dockbarx.desktop') 72 | ctx.install_files( 73 | '${PREFIX}/share/xfce4/panel/plugins/', 74 | 'data/dockbarx.desktop') 75 | ctx.install_files( 76 | '${PREFIX}/share/dockbarx/themes/', 77 | 'data/Mouse.tar.gz') 78 | ctx.install_files( 79 | '${PREFIX}/share/dockbarx/themes/', 80 | 'data/Mouse-4.tar.gz') 81 | ctx.install_files( 82 | '${PREFIX}/share/dockbarx/themes/', 83 | 'data/Mouse-6.tar.gz') 84 | ctx.install_files( 85 | '${PREFIX}/share/dockbarx/themes/', 86 | 'data/MouseNeo.tar.gz') 87 | ctx.install_files( 88 | '${PREFIX}/share/dockbarx/themes/', 89 | 'data/MouseNeo-4.tar.gz') 90 | ctx.install_files( 91 | '${PREFIX}/share/dockbarx/themes/', 92 | 'data/MouseNeo-6.tar.gz') 93 | ctx.install_as( 94 | '/usr/share/xfce4/panel/plugins/xfce4-dockbarx-plug', 95 | 'src/xfce4-dockbarx-plug.py', 96 | chmod=0o755) 97 | 98 | def checkinstall (ctx): 99 | ctx.exec_command('checkinstall' + 100 | ' --pkgname=' + APPNAME + ' --pkgversion=' + VERSION + 101 | ' --provides=' + APPNAME + ' --requires=dockbarx' + 102 | ' --deldoc=yes --deldesc=yes --delspec=yes --backup=no' + 103 | ' --exclude=/home -y ./waf install') 104 | --------------------------------------------------------------------------------