Browse Source

API docs and dist errors.

Finish the API docs and fix some warnings
that prevented to build a dist tarball. Also add some
macros to make sure we contain all the 4.6 API.
upstream/xfce4-panel-4.10.1
Nick Schermer 12 years ago
parent
commit
f26a7aee37
  1. 4
      docs/Makefile.am
  2. 4
      docs/references/Makefile.am
  3. 123
      docs/references/libxfce4panel-docs.xml
  4. 84
      docs/references/libxfce4panel-sections.txt
  5. 5
      libxfce4panel/Makefile.am
  6. 2
      libxfce4panel/abicheck.sh
  7. 10
      libxfce4panel/libxfce4panel-config.c
  8. 8
      libxfce4panel/libxfce4panel-config.h.in
  9. 11
      libxfce4panel/libxfce4panel-enums.h
  10. 1
      libxfce4panel/libxfce4panel.h
  11. 12
      libxfce4panel/libxfce4panel.symbols
  12. 6
      libxfce4panel/xfce-arrow-button.c
  13. 6
      libxfce4panel/xfce-arrow-button.h
  14. 2
      libxfce4panel/xfce-hvbox.c
  15. 6
      libxfce4panel/xfce-hvbox.h
  16. 2
      libxfce4panel/xfce-panel-convenience.c
  17. 2
      libxfce4panel/xfce-panel-convenience.h
  18. 103
      libxfce4panel/xfce-panel-image.c
  19. 8
      libxfce4panel/xfce-panel-image.h
  20. 248
      libxfce4panel/xfce-panel-macros-46.h
  21. 60
      libxfce4panel/xfce-panel-macros.h
  22. 71
      libxfce4panel/xfce-panel-plugin.c
  23. 67
      libxfce4panel/xfce-panel-plugin.h
  24. 2
      panel/panel-plugin-external-46.c
  25. 4
      plugins/applicationsmenu/Makefile.am
  26. 4
      plugins/directorymenu/Makefile.am
  27. 4
      plugins/windowmenu/Makefile.am
  28. 2
      po/POTFILES.in

4
docs/Makefile.am

@ -1,9 +1,11 @@
SUBDIRS = \
references
docdir = $(datadir)/doc/xfce4/Panel
doc_DATA = \
README.gtkrc-2.0 \
README.libxfce4panel
EXTRA_DIST = \
$(doc_DATA)
# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:

4
docs/references/Makefile.am

@ -10,7 +10,7 @@ DOC_MODULE_VERSION=$(LIBXFCE4PANEL_VERSION_API)
DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.xml
# Extra options to supply to gtkdoc-scan
SCAN_OPTIONS=--deprecated-guards="XFCE_DISABLE_DEPRECATED"
SCAN_OPTIONS=
# The directory containing the source code. Relative to $(srcdir)
DOC_SOURCE_DIR=../../libxfce4panel
@ -18,7 +18,7 @@ DOC_SOURCE_DIR=../../libxfce4panel
# Extra options to supply to gtkdoc-mkdb
MKDB_OPTIONS=--output-format=xml --sgml-mode --name-space=xfce
# Extra options to supply to gtkdoc-fixref
# Extra options to supply to gtkdoc-fixxref
FIXXREF_OPTIONS=
# Used for dependencies

123
docs/references/libxfce4panel-docs.xml

@ -9,7 +9,7 @@
<bookinfo>
<title>Libxfce4panel Reference Manual</title>
<releaseinfo>Version <xi:include href="version.xml" parse="text"/></releaseinfo>
<pubdate>November 2009</pubdate>
<pubdate>Februari 2010</pubdate>
<copyright>
<year>2006</year>
@ -19,7 +19,7 @@
<copyright>
<year>2008</year>
<year>2009</year>
<year>2010</year>
<holder>Nick Schermer</holder>
</copyright>
@ -46,16 +46,105 @@
</authorgroup>
</bookinfo>
<part id="libxfce4panel-panel">
<part id="libxfce4panel-fundamentals">
<title>Fundamentals</title>
<xi:include href="xml/config.xml"/>
<xi:include href="xml/enums.xml"/>
<xi:include href="xml/macros.xml"/>
</part>
<part id="libxfce4panel-plugins">
<title>Panel Plugins</title>
<sect1 id="libxfce4panel-register">
<title>Register plugins with the panel</title>
<para>Since 4.8 there are various ways to register a plugin with the panel. Which option you
choose depends on a couple of things: is the plugin compiled as a module or as an
executable and do you want to write a plugin as a GObject.</para>
<sect2>
<title>Internal or external</title>
<para>In 4.6 you had to choose to compile a plugin as an executable to run it external (with
the appropriate macro to register external plugins) and the same for internal plugins that
were compiled a modules. This worked quite good, but had a couple of disadvantages:</para>
<itemizedlist>
<listitem>
<para>To switch between internal and external you needed to change the build system and
registration macros, so this was not very flexible.</para>
</listitem>
<listitem>
<para>When changes were made in the registration macros (esp the ones for external plugins)
a plugin had to recompile. Also each plugin copied the same piece of code.</para>
</listitem>
<listitem>
<para>Improvements in the panel communication (D-Bus) and transparant backgrounds where
either avoided or hard to implement.</para>
</listitem>
</itemizedlist>
<para>To work around those disadvantages Xfce Panel 4.8 introduced a new way to run plugins
that are compiled as modules in a separate process: a plugin wrapper. The plugin wrapper is started
by the panel for each external plugin and embeds the plugin module. It provides the communication
between the panel and the module using D-Bus and still has the big advantage of the 'old' exectuable
external plugin: if it crashes it won't crash the panel.</para>
<para>Whether a plugin is started internal or external is defined by the boolean in the
<varname>X-XFCE-Internal</varname> key in the plugins desktop file. No need to change the macros
and the registration macro code can be kept to an absolute minimum.</para>
<para>This does not mean the 4.6 executable plugins are no supported anymore. However if you write
a new plugin or you plugin depends on libxfce4panel 4.8, it is recommended to switch to the new
registration functions and compile your plugin as a module. To make this move obvious the old
macros are all marked as deprecated in this API reference.</para>
</sect2>
<sect2>
<title>GObject plugins</title>
<para>To handle the difference in 4.6 between internal and external plugins, the plugin API contained
3 different types. There were two objects <structname>XfceInternalPanelPlugin</structname> and
<structname>XfceExternalPanelPlugin</structname> based on a different parents (resp.
<structname>GtkEventBox</structname> and <structname>GtkPlug</structname>) that both implemented the
<structname>XfcePanelPlugin</structname> interface.</para>
<para>Because internal and external is handled by the wrapper in 4.8, <structname>XfcePanelPlugin</structname>
is now a single object with <structname>GtkEventBox</structname> as parent. Apart from the fact that
this reduced a lot of code in libxfce4panel, it also has the advantage that it is easier to write
plugins as GObject with <varname>XFCE_TYPE_PANEL_PLUGIN</varname> as parent type. This brings a couple
of new advantages compared to plugins with register functions:</para>
<itemizedlist>
<listitem>
<para>You can easily cast you plugin to an <structname>XfcePanelPlugin</structname>, so
no need for custom structures. You also get all the GOBject features like type checking.</para>
</listitem>
</itemizedlist>
<para>Downside is that you have to register all other types you create inside you plugin and that it
could be a bit difficult (when running internal) with special libraries. To work around the latter
you can make you plugin resident.</para>
<para>All the plugins shipped with the panel are written as GObjects, so you can find enough examples
in the <filename>plugins/</filename> folder.</para>
</sect2>
</sect1>
<xi:include href="xml/xfce-panel-plugin.xml"/>
<xi:include href="xml/xfce-panel-macros.xml"/>
<xi:include href="xml/register-plugins.xml"/>
<xi:include href="xml/register-46-plugins.xml"/>
<xi:include href="xml/register-gobject-plugins.xml"/>
</part>
<part id="libxfce4panel-widgets">
<title>Additional Widgets</title>
<para>This section describes the additional widgets provided by the <application>xfce4-panel</application> library.</para>
<xi:include href="xml/xfce-arrow-button.xml"/>
<xi:include href="xml/xfce-hvbox.xml"/>
<xi:include href="xml/xfce-panel-image.xml"/>
@ -64,18 +153,24 @@
<part id="libxfce4panel-miscelleanous">
<title>Miscelleanous</title>
<xi:include href="xml/libxfce4panel-config.xml"/>
<xi:include href="xml/xfce-panel-convenience.xml"/>
<xi:include href="xml/convenience.xml"/>
</part>
<!--
<part id="libxfce4panel-deprecated-widgets">
<title>Deprecated widgets</title>
</part>
-->
<index>
<title>Index</title>
<index id="api-index-full">
<title>Index of all symbols</title>
<xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
</index>
<index id="api-index-deprecated" role="deprecated">
<title>Index of deprecated symbols</title>
<xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include>
</index>
<index id="api-index-4-8" role="4.8">
<title>Index of new symbols in 4.8</title>
<xi:include href="xml/api-index-4.8.xml"><xi:fallback /></xi:include>
</index>
<index id="api-index-4-6" role="4.6">
<title>Index of new symbols in 4.6</title>
<xi:include href="xml/api-index-4.6.xml"><xi:fallback /></xi:include>
</index>
</book>

84
docs/references/libxfce4panel-sections.txt

@ -1,6 +1,5 @@
<SECTION>
<FILE>libxfce4panel-config</FILE>
<TITLE>Version Information</TITLE>
<FILE>config</FILE>
libxfce4panel_major_version
libxfce4panel_minor_version
libxfce4panel_micro_version
@ -14,16 +13,16 @@ LIBXFCE4PANEL_CHECK_VERSION
<SECTION>
<FILE>xfce-arrow-button</FILE>
<TITLE>XfceArrowButton</TITLE>
XfceArrowButton
XfceArrowButtonClass
xfce_arrow_button_new
xfce_arrow_button_get_arrow_type
xfce_arrow_button_set_arrow_type
xfce_arrow_button_get_blinking
xfce_arrow_button_set_blinking
<SUBSECTION Standard>
XfceArrowButtonClass
XfceArrowButtonPrivate
XFCE_TYPE_ARROW_BUTTON
XFCE_ARROW_BUTTON
XFCE_IS_ARROW_BUTTON
XFCE_ARROW_BUTTON_CLASS
@ -35,7 +34,6 @@ xfce_arrow_button_get_type
<SECTION>
<FILE>xfce-hvbox</FILE>
<TITLE>XfceHVBox</TITLE>
XfceHVBox
xfce_hvbox_new
xfce_hvbox_set_orientation
@ -53,15 +51,16 @@ xfce_hvbox_get_type
</SECTION>
<SECTION>
<FILE>xfce-panel-convenience</FILE>
<TITLE>Convenience Functions</TITLE>
<FILE>convenience</FILE>
xfce_panel_create_button
xfce_panel_create_toggle_button
xfce_allow_panel_customization
xfce_create_panel_button
xfce_create_panel_toggle_button
</SECTION>
<SECTION>
<FILE>xfce-panel-image</FILE>
<TITLE>XfcePanelImage</TITLE>
XfcePanelImage
xfce_panel_image_new
xfce_panel_image_new_from_pixbuf
@ -85,22 +84,38 @@ xfce_panel_image_get_type
</SECTION>
<SECTION>
<FILE>xfce-panel-macros</FILE>
<TITLE>Panel Plugin Macros</TITLE>
<FILE>enums</FILE>
XfceScreenPosition
xfce_screen_position_get_orientation
xfce_screen_position_is_bottom
xfce_screen_position_is_floating
xfce_screen_position_is_horizontal
xfce_screen_position_is_left
xfce_screen_position_is_right
xfce_screen_position_is_top
<SUBSECTION Standard>
XFCE_TYPE_SCREEN_POSITION
xfce_screen_position_get_type
</SECTION>
<SECTION>
<FILE>macros</FILE>
XFCE_PANEL_CHANNEL_NAME
xfce_panel_plugin_xfconf_channel_new
XFCE_PANEL_DEFINE_PLUGIN
XFCE_PANEL_DEFINE_PLUGIN_RESIDENT
XFCE_PANEL_DEFINE_TYPE
XFCE_PANEL_DEFINE_PREINIT_FUNC
XFCE_PANEL_PLUGIN_REGISTER
XFCE_PANEL_PLUGIN_REGISTER_WITH_CHECK
XFCE_PANEL_PLUGIN_REGISTER_FULL
<SUBSECTION>
panel_slice_alloc
panel_slice_alloc0
panel_slice_free
panel_slice_free1
panel_slice_new
panel_slice_new0
<SUBSECTION>
PANEL_PARAM_READABLE
PANEL_PARAM_READWRITE
PANEL_PARAM_WRITABLE
</SECTION>
<SECTION>
<FILE>xfce-panel-plugin</FILE>
<TITLE>XfcePanelPlugin</TITLE>
XfcePanelPlugin
XfcePanelPluginClass
xfce_panel_plugin_get_name
@ -131,6 +146,8 @@ xfce_panel_plugin_focus_widget
xfce_panel_plugin_block_autohide
xfce_panel_plugin_lookup_rc_file
xfce_panel_plugin_save_location
xfce_panel_plugin_xfconf_channel_new
xfce_panel_plugin_set_panel_hidden
<SUBSECTION Standard>
XfcePanelPluginPrivate
XFCE_TYPE_PANEL_PLUGIN
@ -142,3 +159,32 @@ XFCE_PANEL_PLUGIN_GET_CLASS
<SUBSECTION Private>
xfce_panel_plugin_get_type
</SECTION>
<SECTION>
<FILE>register-plugins</FILE>
XfcePanelPluginCheck
XfcePanelPluginFunc
XfcePanelPluginPreInit
XFCE_PANEL_PLUGIN_REGISTER
XFCE_PANEL_PLUGIN_REGISTER_WITH_CHECK
XFCE_PANEL_PLUGIN_REGISTER_FULL
</SECTION>
<SECTION>
<FILE>register-46-plugins</FILE>
XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL
XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL_FULL
XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL_WITH_CHECK
<SUBSECTION>
XFCE_PANEL_PLUGIN_REGISTER_INTERNAL
XFCE_PANEL_PLUGIN_REGISTER_INTERNAL_WITH_CHECK
</SECTION>
<SECTION>
<FILE>register-gobject-plugins</FILE>
XfcePanelTypeModule
XFCE_PANEL_DEFINE_PLUGIN
XFCE_PANEL_DEFINE_PLUGIN_RESIDENT
XFCE_PANEL_DEFINE_TYPE
XFCE_PANEL_DEFINE_PREINIT_FUNC
</SECTION>

5
libxfce4panel/Makefile.am

@ -22,12 +22,12 @@ libxfce4panel_built_sources = \
libxfce4panel_headers = \
libxfce4panel.h \
libxfce4panel-config.h \
libxfce4panel-deprecated.h \
libxfce4panel-enums.h \
xfce-arrow-button.h \
xfce-hvbox.h \
xfce-panel-convenience.h \
xfce-panel-macros.h \
xfce-panel-macros-46.h \
xfce-panel-plugin.h \
xfce-panel-plugin-provider.h \
xfce-panel-image.h
@ -130,4 +130,7 @@ if HAVE_GNUC_VISIBILITY
TESTS = abicheck.sh
endif
# required for gtk-doc
dist-hook: all
# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:

2
libxfce4panel/abicheck.sh

@ -19,5 +19,5 @@
#
cpp -P -DINCLUDE_INTERNAL_SYMBOLS -DINCLUDE_VARIABLES -DALL_FILES ${srcdir:-.}/libxfce4panel.symbols | sed -e '/^$/d' -e 's/ G_GNUC.*$//' -e 's/ PRIVATE//' | sort > expected-abi
nm -D .libs/libxfce4panel.so | grep " T\|R " | cut -d ' ' -f 3 | grep -v '^_.*' | sort > actual-abi
nm -D .libs/libxfce4panel-1.0.so | grep " T\|R " | cut -d ' ' -f 3 | grep -v '^_.*' | sort > actual-abi
diff -u expected-abi actual-abi && rm expected-abi actual-abi

10
libxfce4panel/libxfce4panel-config.c

@ -26,7 +26,7 @@
/**
* SECTION: libxfce4panel-config
* SECTION: config
* @title: Version Information
* @short_description: Information about the panel version in use.
* @include: libxfce4panel/libxfce4panel.h
@ -47,6 +47,8 @@
* libxfce4panel library you have linked against. Contrast with the
* #LIBXFCE4PANEL_MAJOR_VERSION macro, which represents the major
* version of the libxfce4panel headers you have included.
*
* Since: 4.8
**/
const guint libxfce4panel_major_version = LIBXFCE4PANEL_MAJOR_VERSION;
@ -62,6 +64,8 @@ const guint libxfce4panel_major_version = LIBXFCE4PANEL_MAJOR_VERSION;
* libxfce4panel library you have linked against. Contrast with the
* #LIBXFCE4PANEL_MINOR_VERSION macro, which represents the minor
* version of the libxfce4panel headers you have included.
*
* Since: 4.8
**/
const guint libxfce4panel_minor_version = LIBXFCE4PANEL_MINOR_VERSION;
@ -77,6 +81,8 @@ const guint libxfce4panel_minor_version = LIBXFCE4PANEL_MINOR_VERSION;
* libxfce4panel library you have linked against. Contrast with the
* #LIBXFCE4PANEL_MICRO_VERSION macro, which represents the micro
* version of the libxfce4panel headers you have included.
*
* Since: 4.8
**/
const guint libxfce4panel_micro_version = LIBXFCE4PANEL_MICRO_VERSION;
@ -112,6 +118,8 @@ const guint libxfce4panel_micro_version = LIBXFCE4PANEL_MICRO_VERSION;
* or a string describing the version mismatch. The returned
* string is owned by the library and must not be freed or
* modified by the caller.
*
* Since: 4.8
**/
G_CONST_RETURN gchar *
libxfce4panel_check_version (guint required_major,

8
libxfce4panel/libxfce4panel-config.h.in

@ -34,6 +34,8 @@ G_BEGIN_DECLS
* Like libxfce4panel_major_version, but from the headers used at
* application compile time, rather than from the library
* linked against at application run time.
*
* Since: 4.8
**/
#define LIBXFCE4PANEL_MAJOR_VERSION (@LIBXFCE4PANEL_VERSION_MAJOR@)
@ -44,6 +46,8 @@ G_BEGIN_DECLS
* Like libxfce4panel_minor_version, but from the headers used at
* application compile time, rather than from the library
* linked against at application run time.
*
* Since: 4.8
**/
#define LIBXFCE4PANEL_MINOR_VERSION (@LIBXFCE4PANEL_VERSION_MINOR@)
@ -54,6 +58,8 @@ G_BEGIN_DECLS
* Like libxfce4panel_micro_version, but from the headers used at
* application compile time, rather than from the library
* linked against at application run time
*
* Since: 4.8
**/
#define LIBXFCE4PANEL_MICRO_VERSION (@LIBXFCE4PANEL_VERSION_MICRO@)
@ -67,6 +73,8 @@ G_BEGIN_DECLS
*
* Returns: %TRUE if the version of the libxfce4panel header files is
* the same as or newer than the passed-in version.
*
* Since: 4.8
**/
#define LIBXFCE4PANEL_CHECK_VERSION(major,minor,micro) \
(LIBXFCE4PANEL_MAJOR_VERSION > (major) \

11
libxfce4panel/libxfce4panel-enums.h

@ -28,6 +28,17 @@
G_BEGIN_DECLS
/**
* SECTION: enums
* @title: Standard Enumerations
* @short_description: Standard enumerations used by the Xfce Panel.
* @include: libxfce4panel/libxfce4panel.h
*
* Currently only contains the definition of #XfceScreenPosition.
**/
/**
* XfceScreenPosition
* @XFCE_SCREEN_POSITION_NONE : No position has been set.

1
libxfce4panel/libxfce4panel.h

@ -27,6 +27,7 @@ G_BEGIN_DECLS
#include <libxfce4panel/libxfce4panel-enums.h>
#include <libxfce4panel/libxfce4panel-enum-types.h>
#include <libxfce4panel/xfce-panel-macros.h>
#include <libxfce4panel/xfce-panel-macros-46.h>
#include <libxfce4panel/xfce-arrow-button.h>
#include <libxfce4panel/xfce-hvbox.h>
#include <libxfce4panel/xfce-panel-convenience.h>

12
libxfce4panel/libxfce4panel.symbols

@ -31,6 +31,16 @@
#define IN_SOURCE(x) 1
#endif
/* libxfce4panel-condif.h */
#if IN_HEADER(__LIBXFCE4PANEL_CONFIG_H__)
#if IN_SOURCE(__LIBXFCE4PANEL_CONFIG_C__)
libxfce4panel_check_version
libxfce4panel_major_version
libxfce4panel_micro_version
libxfce4panel_minor_version
#endif
#endif
/* libxfce4panel-enum-types.h */
#if IN_HEADER(__LIBXFCE4PANEL_ENUM_TYPES_H__)
#if IN_SOURCE(__LIBXFCE4PANEL_ENUM_TYPES_C__)
@ -108,6 +118,7 @@ xfce_panel_plugin_block_menu
xfce_panel_plugin_unblock_menu
xfce_panel_plugin_register_menu
xfce_panel_plugin_arrow_type
xfce_panel_plugin_remove
xfce_panel_plugin_position_widget
xfce_panel_plugin_position_menu
xfce_panel_plugin_focus_widget
@ -134,5 +145,6 @@ xfce_panel_plugin_provider_get_show_about
xfce_panel_plugin_provider_show_about
xfce_panel_plugin_provider_removed
xfce_panel_plugin_provider_remote_event
xfce_panel_plugin_provider_set_locked
#endif
#endif

6
libxfce4panel/xfce-arrow-button.c

@ -45,7 +45,7 @@
*
* Toggle button with (optional) arrow. The arrow direction will be
* inverted when the button is toggled.
* It is also possible to make the button blink and pack additional
* Since 4.8 it is also possible to make the button blink and pack additional
* widgets in the button, using gtk_container_add().
**/
@ -496,7 +496,7 @@ xfce_arrow_button_set_arrow_type (XfceArrowButton *button,
*
* Returns: %TRUE when @button is blinking.
*
* Since: 4.8.0
* Since: 4.8
**/
gboolean
xfce_arrow_button_get_blinking (XfceArrowButton *button)
@ -515,7 +515,7 @@ xfce_arrow_button_get_blinking (XfceArrowButton *button)
*
* Make the button blink.
*
* Since: 4.8.0
* Since: 4.8
**/
void
xfce_arrow_button_set_blinking (XfceArrowButton *button,

6
libxfce4panel/xfce-arrow-button.h

@ -49,6 +49,12 @@ struct _XfceArrowButtonClass
GtkArrowType type);
};
/**
* XfceArrowButton:
*
* This struct contain private data only and should be accessed by
* the functions below.
**/
struct _XfceArrowButton
{
/*< private >*/

2
libxfce4panel/xfce-hvbox.c

@ -284,7 +284,7 @@ xfce_hvbox_set_orientation (XfceHVBox *hvbox,
* xfce_hvbox_get_orientation:
* @hvbox : #XfceHVBox
*
* TODO
* Get the current orientation of the @hvbox.
*
* Returns: the current orientation of the #XfceHVBox.
**/

6
libxfce4panel/xfce-hvbox.h

@ -48,6 +48,12 @@ struct _XfceHVBoxClass
GtkBoxClass __parent__;
};
/**
* XfceHVBox:
*
* This struct contain private data only and should be accessed by
* the functions below.
**/
struct _XfceHVBox
{
/*< private >*/

2
libxfce4panel/xfce-panel-convenience.c

@ -31,7 +31,7 @@
/**
* SECTION: xfce-panel-convenience
* SECTION: convenience
* @title: Convenience Functions
* @short_description: Special purpose widgets and utilities
* @include: libxfce4panel/libxfce4panel.h

2
libxfce4panel/xfce-panel-convenience.h

@ -25,7 +25,7 @@
#define __XFCE_PANEL_CONVENIENCE_H__
#include <gtk/gtk.h>
#include <libxfce4panel/libxfce4panel-deprecated.h>
#include <libxfce4panel/xfce-panel-macros-46.h>
G_BEGIN_DECLS

103
libxfce4panel/xfce-panel-image.c

@ -47,7 +47,13 @@
* buttons where the developer does not exacly know the size of the
* image (due to theming and user setting).
*
* The #XfcePanelImage is a widget that will not
* The #XfcePanelImage widget automatically scales to the allocated
* size of the widget. Because of that nature it never requests a size,
* so this will only work if you pack the image in another widget
* that will expand it.
* If you want to force an image size you can use xfce_panel_image_set_size()
* to set a pixel size, in that case the widget will request an fixed size
* which makes it usefull for usage in dialogs.
**/
@ -508,6 +514,15 @@ xfce_panel_image_scale_pixbuf (GdkPixbuf *source,
/**
* xfce_panel_image_new:
*
* Creates a new empty #XfcePanelImage widget.
*
* returns: a newly created XfcePanelImage widget.
*
* Since: 4.8
**/
GtkWidget *
xfce_panel_image_new (void)
{
@ -516,10 +531,24 @@ xfce_panel_image_new (void)
/**
* xfce_panel_image_new_from_pixbuf:
* @pixbuf : a #GdkPixbuf, or %NULL.
*
* Creates a new #XfcePanelImage displaying @pixbuf. #XfcePanelImage
* will add its own reference rather than adopting yours. You don't
* need to scale the pixbuf to the correct size, the #XfcePanelImage
* will take care of that based on the allocation of the widget or
* the size set with xfce_panel_image_set_size().
*
* returns: a newly created XfcePanelImage widget.
*
* Since: 4.8
**/
GtkWidget *
xfce_panel_image_new_from_pixbuf (GdkPixbuf *pixbuf)
{
g_return_val_if_fail (GDK_IS_PIXBUF (pixbuf), NULL);
g_return_val_if_fail (pixbuf == NULL || GDK_IS_PIXBUF (pixbuf), NULL);
return g_object_new (XFCE_TYPE_PANEL_IMAGE,
"pixbuf", pixbuf, NULL);
@ -527,10 +556,25 @@ xfce_panel_image_new_from_pixbuf (GdkPixbuf *pixbuf)
/**
* xfce_panel_image_new_from_source:
* @source : source of the image. This can be an absolute path or
* an icon-name or %NULL.
*
* Creates a new #XfcePanelImage displaying @source. #XfcePanelImage
* will detect if @source points to an absolute file or it and icon-name.
* For icon-names it will also look for files in the pixbuf folder or
* strip the extensions, which makes it suitable for usage with icon
* keys in .desktop files.
*
* returns: a newly created XfcePanelImage widget.
*
* Since: 4.8
**/
GtkWidget *
xfce_panel_image_new_from_source (const gchar *source)
{
g_return_val_if_fail (source != NULL && *source != '\0', NULL);
g_return_val_if_fail (source == NULL || *source != '\0', NULL);
return g_object_new (XFCE_TYPE_PANEL_IMAGE,
"source", source, NULL);
@ -538,12 +582,21 @@ xfce_panel_image_new_from_source (const gchar *source)
/**
* xfce_panel_image_set_from_pixbuf:
* @image : an #XfcePanelImage.
* @pixbuf : a #GdkPixbuf, or %NULL.
*
* See xfce_panel_image_new_from_pixbuf() for details.
*
* Since: 4.8
**/
void
xfce_panel_image_set_from_pixbuf (XfcePanelImage *image,
GdkPixbuf *pixbuf)
{
g_return_if_fail (XFCE_IS_PANEL_IMAGE (image));
g_return_if_fail (GDK_IS_PIXBUF (pixbuf));
g_return_if_fail (pixbuf == NULL || GDK_IS_PIXBUF (pixbuf));
xfce_panel_image_clear (image);
@ -556,12 +609,22 @@ xfce_panel_image_set_from_pixbuf (XfcePanelImage *image,
/**
* xfce_panel_image_set_from_source:
* @image : an #XfcePanelImage.
* @source : source of the image. This can be an absolute path or
* an icon-name or %NULL.
*
* See xfce_panel_image_new_from_source() for details.
*
* Since: 4.8
**/
void
xfce_panel_image_set_from_source (XfcePanelImage *image,
const gchar *source)
{
g_return_if_fail (XFCE_IS_PANEL_IMAGE (image));
g_return_if_fail (source != NULL && *source != '\0');
g_return_if_fail (source == NULL || *source != '\0');
xfce_panel_image_clear (image);
@ -572,6 +635,17 @@ xfce_panel_image_set_from_source (XfcePanelImage *image,
/**
* xfce_panel_image_set_size:
* @image : an #XfcePanelImage.
* @size : a new size in pixels.
*
* This will force an image size, instead of looking at the allocation
* size, see introduction for more details. You can set a @size of
* -1 to turn this off.
*
* Since: 4.8
**/
void
xfce_panel_image_set_size (XfcePanelImage *image,
gint size)
@ -588,6 +662,17 @@ xfce_panel_image_set_size (XfcePanelImage *image,
/**
* xfce_panel_image_get_size:
* @image : an #XfcePanelImage.
*
* The size of the image, set by xfce_panel_image_set_size() or -1
* if no size is forced and the image is scaled to the allocation size.
*
* Returns: icon size in pixels of the image or -1.
*
* Since: 4.8
**/
gint
xfce_panel_image_get_size (XfcePanelImage *image)
{
@ -597,6 +682,14 @@ xfce_panel_image_get_size (XfcePanelImage *image)
/**
* xfce_panel_image_clear:
* @image : an #XfcePanelImage.
*
* Resets the image to be empty.
*
* Since: 4.8
**/
void
xfce_panel_image_clear (XfcePanelImage *image)
{

8
libxfce4panel/xfce-panel-image.h

@ -39,8 +39,16 @@ struct _XfcePanelImageClass
/*< private >*/
void (*reserved1) (void);
void (*reserved2) (void);
void (*reserved3) (void);
void (*reserved4) (void);
};
/**
* XfcePanelImage:
*
* This struct contain private data only and should be accessed by
* the functions below.
**/
struct _XfcePanelImage
{
/*< private >*/

248
libxfce4panel/libxfce4panel-deprecated.h → libxfce4panel/xfce-panel-macros-46.h

@ -23,14 +23,21 @@
#ifndef __LIBXFCE4PANEL_DEPRECATED_H__
#define __LIBXFCE4PANEL_DEPRECATED_H__
/* #ifndef XFCE_DISABLE_DEPRECATED */
#include <libxfce4panel/xfce-panel-plugin-provider.h>
#include <gdk/gdkx.h>
#include <stdlib.h>
/* #endif *//* !XFCE_DISABLE_DEPRECATED */
G_BEGIN_DECLS
/**
* SECTION: register-46-plugins
* @title: Panel Plugin Register Macros (4.6 Style)
* @short_description: The 4.6 way of registering plugins that compiled as executables
* @include: libxfce4panel/libxfce4panel.h
*
* Macros to register old external panel plugins that are compiled as executables.
**/
enum /*< skip >*/
{
PANEL_CLIENT_EVENT_REMOVED,
@ -45,19 +52,119 @@ enum /*< skip >*/
PANEL_CLIENT_EVENT_SHOW_CONFIGURE
};
#define PANEL_CLIENT_EVENT_ATOM "XFCE4_PANEL_PLUGIN_46"
/*< private >*/
#define _PANEL_CLIENT_EVENT_ATOM "XFCE4_PANEL_PLUGIN_46"
/* #ifndef XFCE_DISABLE_DEPRECATED */
#define panel_slice_alloc(block_size) (g_slice_alloc ((block_size)))
#define panel_slice_alloc0(block_size) (g_slice_alloc0 ((block_size)))
/**
* panel_slice_alloc:
* @block_size : the number of bytes to allocate
*
* See g_slice_alloc() for more information.
*
* Returns: a pointer to the allocated memory block
*
* Deprecated: 4.8: Deprecated because panel depends on recent enough
* version of glib. Use g_slice_alloc() instead.
**/
#define panel_slice_alloc(block_size) (g_slice_alloc ((block_size)))
/**
* panel_slice_alloc0:
* @block_size : the number of bytes to allocate
*
* See g_slice_alloc0() for more information.
*
* Returns: a pointer to the allocated memory block
*
* Deprecated: 4.8: Deprecated because panel depends on recent enough
* version of glib. Use g_slice_alloc0() instead.
**/
#define panel_slice_alloc0(block_size) (g_slice_alloc0 ((block_size)))
/**
* panel_slice_free1:
* @block_size : the size of the block
* @mem_block : a pointer to the block to free
*
* See g_slice_free1() for more information.
*
* Deprecated: 4.8: Deprecated because panel depends on recent enough
* version of glib. Use g_slice_free1() instead.
**/
#define panel_slice_free1(block_size, mem_block) G_STMT_START{ g_slice_free1 ((block_size), (mem_block)); }G_STMT_END
#define panel_slice_new(type) (g_slice_new (type))
#define panel_slice_new0(type) (g_slice_new0 (type))
#define panel_slice_free(type, ptr) G_STMT_START{ g_slice_free (type, (ptr)); }G_STMT_END
#define PANEL_PARAM_READABLE (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)
#define PANEL_PARAM_WRITABLE (G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS)
/**
* panel_slice_new:
* @type : the type to allocate, typically a structure name
*
* See g_slice_new() for more information.
*
* Returns: a pointer to the allocated memory block
*
* Deprecated: 4.8: Deprecated because panel depends on recent enough
* version of glib. Use g_slice_new() instead.
**/
#define panel_slice_new(type) (g_slice_new (type))
/**
* panel_slice_new0:
* @type : the type to allocate, typically a structure name
*
* See g_slice_new0() for more information.
*
* Returns: a pointer to the allocated memory block
*
* Deprecated: 4.8: Deprecated because panel depends on recent enough
* version of glib. Use g_slice_new0() instead.
**/
#define panel_slice_new0(type) (g_slice_new0 (type))
/**
* panel_slice_free:
* @type : the type to allocate, typically a structure name
* @ptr : a pointer to the block to free
*
* See g_slice_free() for more information.
*
* Deprecated: 4.8: Deprecated because panel depends on recent enough
* version of glib. Use g_slice_free() instead.
**/
#define panel_slice_free(type, ptr) G_STMT_START{ g_slice_free (type, (ptr)); }G_STMT_END
/**
* PANEL_PARAM_READABLE:
*
* Macro for #G_PARAM_READABLE with static strings.
*
* Deprecated: 4.8: Deprecated because panel depends on recent enough
* version of glib. Use #G_PARAM_READABLE
* | #G_PARAM_STATIC_STRINGS instead.
**/
#define PANEL_PARAM_READABLE (G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)
/**
* PANEL_PARAM_WRITABLE:
*
* Macro for #PANEL_PARAM_WRITABLE with static strings.
*
* Deprecated: 4.8: Deprecated because panel depends on recent enough
* version of glib. Use #G_PARAM_WRITABLE
* | #G_PARAM_STATIC_STRINGS instead.
**/
#define PANEL_PARAM_WRITABLE (G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS)
/**
* PANEL_PARAM_READWRITE:
*
* Macro for #G_PARAM_READWRITE with static strings.
*
* Deprecated: 4.8: Deprecated because panel depends on recent enough
* version of glib. Use #G_PARAM_READWRITE
* | #G_PARAM_STATIC_STRINGS instead.
**/
#define PANEL_PARAM_READWRITE (G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)
#define _panel_assert(expr) g_assert (expr)
@ -65,19 +172,106 @@ enum /*< skip >*/
#define _panel_return_if_fail(expr) g_return_if_fail (expr)
#define _panel_return_val_if_fail(expr, val) g_return_val_if_fail (expr, (val))
#define xfce_create_panel_button xfce_panel_create_button
/**
* xfce_create_panel_button:
*
* See xfce_panel_create_button() for more information.
*
* Deprecated: 4.8: Use xfce_panel_create_button() instead.
**/
#define xfce_create_panel_button xfce_panel_create_button
/**
* xfce_create_panel_toggle_button:
*
* See xfce_panel_create_toggle_button() for more information.
*
* Deprecated: 4.8: Use xfce_panel_create_toggle_button() instead.
**/
#define xfce_create_panel_toggle_button xfce_panel_create_toggle_button
/**
* xfce_panel_plugin_set_panel_hidden:
* @plugin : an #XfcePanelPlugin.
* @hidden : new blocking state of this plugin.
*
* See xfce_panel_plugin_block_autohide() for more information.
*
* Deprecated: 4.8: Use xfce_panel_plugin_block_autohide() instead.
**/
#define xfce_panel_plugin_set_panel_hidden(plugin, hidden) \
xfce_panel_plugin_block_autohide(plugin,hidden)
/**
* xfce_allow_panel_customization:
*
* Always returns %FALSE. Plugins can be locked on a plugin basis
* level in the future, so this function is useless.
*
* Deprecated: 4.8: Look at xfce_panel_plugin_get_locked().
**/
#define xfce_allow_panel_customization (FALSE)
/* <private >*/
#define _panel_g_type_register_simple(type_parent,type_name_static,class_size,class_init,instance_size,instance_init) \
g_type_register_static_simple(type_parent,type_name_static,class_size,class_init,instance_size,instance_init, 0)
/**
* XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL:
* @construct_func : name of a function that can be cast to an
* #XfcePanelPluginFunc
*
* Registers and initializes the plugin. This is the only thing that is
* required to create a panel plugin.
*
* Deprecated: 4.8: Deprecation is not entirely true, but it should be made
* clear that it is recommended to use XFCE_PANEL_PLUGIN_REGISTER().
* See the <link linkend="libxfce4panel-register">Registering Plugins</link>
* for more information.
**/
#define XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL(construct_func) \
XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL_FULL (construct_func, NULL, NULL)
/**
* XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL_WITH_CHECK:
* @construct_func : name of a function that can be cast to an
* #XfcePanelPluginFunc
* @check_func : name of a function that can be cast to an
* #XfcePanelPluginCheck or %NULL
*
* Registers and initializes the plugin. This is the only thing that is
* required to create a panel plugin. The @check functions is run before
* creating the plugin, and should return FALSE if plugin creation is not
* possible.
*
* Deprecated: 4.8: Deprecation is not entirely true, but it should be made
* clear that it is recommended to use XFCE_PANEL_PLUGIN_REGISTER_WITH_CHECK().
* See the <link linkend="libxfce4panel-register">Registering Plugins</link>
* for more information.
**/
#define XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL_WITH_CHECK(construct_func ,check_func) \
XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL_FULL (construct_func, NULL, check_func)
/**
* XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL_FULL:
* @construct_func : name of a function that can be cast to an
* #XfcePanelPluginFunc
* @preinit_func : name of a function that can be case to #XfcePanelPluginPreInit
* or %NULL
* @check_func : name of a function that can be cast to an
* #XfcePanelPluginCheck or %NULL
*
* Same as XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL_WITH_CHECK(), but with a
* preinit function that is called before gtk_init(). This allows plugins
* to initialize libraries or threads.
*
* Since: 4.6
* Deprecated: 4.8: Deprecation is not entirely true, but it should be made
* clear that it is recommended to use XFCE_PANEL_PLUGIN_REGISTER_FULL().
* See the <link linkend="libxfce4panel-register">Registering Plugins</link>
* for more information.
**/
#define XFCE_PANEL_PLUGIN_REGISTER_EXTERNAL_FULL(construct_func, preinit_func, check_func) \
static GdkAtom _xpp_atom = GDK_NONE; \
static gdouble _xpp_alpha = 1.00; \
@ -307,7 +501,7 @@ enum /*< skip >*/
return PLUGIN_EXIT_CHECK_FAILED; \
} \
\
_xpp_atom = gdk_atom_intern_static_string (PANEL_CLIENT_EVENT_ATOM); \
_xpp_atom = gdk_atom_intern_static_string (_PANEL_CLIENT_EVENT_ATOM); \
\
socket_id = strtol (argv[PLUGIN_ARGV_SOCKET_ID], NULL, 0); \
plug = gtk_plug_new (socket_id); \
@ -350,7 +544,33 @@ enum /*< skip >*/
return PLUGIN_EXIT_SUCCESS; \
}
/* #endif *//* !XFCE_DISABLE_DEPRECATED */
/**
* XFCE_PANEL_PLUGIN_REGISTER_INTERNAL:
* @construct_func : name of a function that can be cast to an
* #XfcePanelPluginFunc
*
* See XFCE_PANEL_PLUGIN_REGISTER() for more information.
*
* Deprecated: 4.8: Use XFCE_PANEL_PLUGIN_REGISTER() instead.
**/
#define XFCE_PANEL_PLUGIN_REGISTER_INTERNAL(construct_func) \
XFCE_PANEL_PLUGIN_REGISTER (construct_func)
/**
* XFCE_PANEL_PLUGIN_REGISTER_INTERNAL_WITH_CHECK:
* @construct_func : name of a function that can be cast to an
* #XfcePanelPluginFunc
* @check_func : name of a function that can be cast to an
* #XfcePanelPluginCheck or %NULL
*
* See XFCE_PANEL_PLUGIN_REGISTER() for more information.
*
* Deprecated: 4.8: use XFCE_PANEL_PLUGIN_REGISTER_WITH_CHECK() instead.
**/
#define XFCE_PANEL_PLUGIN_REGISTER_INTERNAL_WITH_CHECK(construct_func ,check_func) \
XFCE_PANEL_PLUGIN_REGISTER_WITH_CHECK (construct_func, check_func)
G_END_DECLS

60
libxfce4panel/xfce-panel-macros.h

@ -25,21 +25,39 @@
#include <glib.h>
#include <libxfce4panel/xfce-panel-plugin.h>
#include <libxfce4panel/libxfce4panel-deprecated.h>
#include <libxfce4panel/xfce-panel-macros-46.h>
G_BEGIN_DECLS
/**
* SECTION: xfce-panel-macros
* @title: Panel Plugin Macros
* @short_description: Various macros for registering panel plugin.
* SECTION: macros
* @title: Commonly used plugin macros
* @short_description: Various macros to make life easier for plugin developers.
* @include: libxfce4panel/libxfce4panel.h
*
* Convenient macros to register #XfcePanelPlugin. This can be done
* by using a construct function or registering a new GObject with
* #XFCE_TYPE_PANEL_PLUGIN is parent type.
* Some commonly used macros in panel plugins.
**/
/**
* SECTION: register-plugins
* @title: Panel Plugin Register Macros
* @short_description: Register panel plugins that are compiled as modules.
* @include: libxfce4panel/libxfce4panel.h
*
* Macros to register panel plugins that are compiled as modules. Internal or
* external is defined by the boolean key <varname>X-XFCE-Internal</varname>
* in the plugin's .desktop file.
**/
/**
* SECTION: register-gobject-plugins
* @title: GObject Oriented Panel Plugin Registers Macros
* @short_description: Macros to register panel plugins, written as GObjects.
* @include: libxfce4panel/libxfce4panel.h
*
* Macros to register panel plugin types and custom types inside panel plugins.
**/
@ -47,9 +65,9 @@ G_BEGIN_DECLS
/**
* XfcePanelTypeModule:
*
* TODO
* Typedef for GTypeModule for possible future expansion.
*
* Since: 4.8.0
* Since: 4.8
**/
typedef GTypeModule XfcePanelTypeModule;
@ -65,7 +83,7 @@ typedef GTypeModule XfcePanelTypeModule;
* See also: xfce_panel_plugin_xfconf_channel_new,
* xfce_panel_plugin_get_property_base
*
* Since: 4.8.0
* Since: 4.8
**/
#define XFCE_PANEL_CHANNEL_NAME \
(G_LIKELY (g_getenv ("XFCE_PANEL_CHANNEL_NAME") == NULL) ? \
@ -84,7 +102,7 @@ typedef GTypeModule XfcePanelTypeModule;
* See also: xfce_panel_plugin_get_property_base,
* XFCE_PANEL_PLUGIN_CHANNEL_NAME
*
* Since: 4.8.0
* Since: 4.8
**/
#define xfce_panel_plugin_xfconf_channel_new(plugin) \
xfconf_channel_new_with_property_base (XFCE_PANEL_CHANNEL_NAME, \
@ -102,7 +120,7 @@ typedef GTypeModule XfcePanelTypeModule;
* Define a new (resident) GObject panel plugin, the parent type of the object
* should be XFCE_TYPE_PANEL_PLUGIN.
*
* Since: 4.8.0
* Since: 4.8
**/
#define XFCE_PANEL_DEFINE_PLUGIN(TypeName, type_name, args...) \
_XPP_DEFINE_PLUGIN (TypeName, type_name, FALSE, args)
@ -121,7 +139,7 @@ typedef GTypeModule XfcePanelTypeModule;
* a resident plugin will never be unloaded after the first load, avoiding
* those issues.
*
* Since: 4.8.0
* Since: 4.8
**/
#define XFCE_PANEL_DEFINE_PLUGIN_RESIDENT(TypeName, type_name, args...) \
_XPP_DEFINE_PLUGIN (TypeName, type_name, TRUE, args)
@ -143,7 +161,7 @@ typedef GTypeModule XfcePanelTypeModule;
* The _register_type function should be added to the args in
* #XFCE_PANEL_DEFINE_PLUGIN.
*
* Since: 4.8.0
* Since: 4.8
**/
#define XFCE_PANEL_DEFINE_TYPE(TypeName, type_name, TYPE_PARENT) \
static gpointer type_name##_parent_class = NULL; \
@ -234,7 +252,7 @@ typedef GTypeModule XfcePanelTypeModule;
* combination with the plugins register/define functions added
* in 4.8.
*
* Since: 4.8.0
* Since: 4.8
**/
#define XFCE_PANEL_DEFINE_PREINIT_FUNC(preinit_func) \
G_MODULE_EXPORT gboolean xfce_panel_module_preinit (gint argc, gchar **argv); \
@ -257,10 +275,10 @@ typedef GTypeModule XfcePanelTypeModule;
* simplest way to register a panel plugin.
* The @construct_func is called everytime a plugin is created.
*
* Since: 4.8.0
* Since: 4.8
**/
#define XFCE_PANEL_PLUGIN_REGISTER(construct_func) \
XFCE_PANEL_PLUGIN_REGISTER_EXTENDED (construct_func, /* foo */, /* foo */)
_XFCE_PANEL_PLUGIN_REGISTER_EXTENDED (construct_func, /* foo */, /* foo */)
@ -277,10 +295,10 @@ typedef GTypeModule XfcePanelTypeModule;
* you are responsible for showing a dialog why the plugin is not added
* to the panel.
*
* Since: 4.8.0
* Since: 4.8
**/
#define XFCE_PANEL_PLUGIN_REGISTER_WITH_CHECK(construct_func, check_func) \
XFCE_PANEL_PLUGIN_REGISTER_EXTENDED (construct_func, /* foo */, \
_XFCE_PANEL_PLUGIN_REGISTER_EXTENDED (construct_func, /* foo */, \
if (G_LIKELY ((*check_func) (xpp_screen) == TRUE)))
@ -298,7 +316,7 @@ typedef GTypeModule XfcePanelTypeModule;
* #XFCE_PANEL_PLUGIN_REGISTER_WITH_CHECK. See those macros
* for more information.
*
* Since: 4.8.0
* Since: 4.8
**/
#define XFCE_PANEL_PLUGIN_REGISTER_FULL(construct_func, preinit_func, check_func) \
XFCE_PANEL_DEFINE_PREINIT_FUNC (preinit_func) \
@ -307,7 +325,7 @@ typedef GTypeModule XfcePanelTypeModule;
/* <private> */
#define XFCE_PANEL_PLUGIN_REGISTER_EXTENDED(construct_func, PREINIT_CODE, CHECK_CODE) \
#define _XFCE_PANEL_PLUGIN_REGISTER_EXTENDED(construct_func, PREINIT_CODE, CHECK_CODE) \
static void \
xfce_panel_module_realize (XfcePanelPlugin *xpp) \
{ \

71
libxfce4panel/xfce-panel-plugin.c

@ -319,7 +319,7 @@ xfce_panel_plugin_class_init (XfcePanelPluginClass *klass)
* returned by xfce_panel_plugin_save_location(), the panel will take
* care of removing those settings.
*
* Since: 4.8.0
* Since: 4.8
**/
plugin_signals[REMOVED] =
g_signal_new (g_intern_static_string ("removed"),
@ -413,10 +413,10 @@ xfce_panel_plugin_class_init (XfcePanelPluginClass *klass)
/**
* XfcePanelPlugin:display-name:
*
* The display name of the #XfcePanelPlugin. This property is used during plugin
* construction and can't be set twice. Plugin writer can use it to read the
* plugin display name, but xfce_panel_plugin_get_display_name() is recommended
* since that returns a const string.
* The translated display name of the #XfcePanelPlugin. This property is set
* during plugin construction and can't be set twice. Plugin writer can use
* it to read the plugin display name, but xfce_panel_plugin_get_display_name()
* is recommended.
**/
g_object_class_install_property (gobject_class,
PROP_DISPLAY_NAME,
@ -431,9 +431,12 @@ xfce_panel_plugin_class_init (XfcePanelPluginClass *klass)
/**
* XfcePanelPlugin:comment:
*
* TODO
* The translated description of the #XfcePanelPlugin. This property is set
* during plugin construction and can't be set twice. Plugin writer can use
* it to read the plugin description, but xfce_panel_plugin_get_comment()
* is recommended.
*
* Since 4.8.0
* Since: 4.8
**/
g_object_class_install_property (gobject_class,
PROP_COMMENT,
@ -448,8 +451,11 @@ xfce_panel_plugin_class_init (XfcePanelPluginClass *klass)
/**
* XfcePanelPlugin:id:
*
* The unique id of the #XfcePanelPlugin. Plugin writer can use it to
* read the unique id, but xfce_panel_plugin_get_unique_id() is recommended.
* The unique id of the #XfcePanelPlugin. This property is set during plugin
* construction and can't be set twice. Plugin writer can use it to read the
* plugin display name, but xfce_panel_plugin_get_unique_id() is recommended.
*
* Since: 4.8
**/
g_object_class_install_property (gobject_class,
PROP_UNIQUE_ID,
@ -482,7 +488,8 @@ xfce_panel_plugin_class_init (XfcePanelPluginClass *klass)
/**
* XfcePanelPlugin:orientation:
*
* TODO
* The #GtkOrientation of the #XfcePanelPlugin. Plugin writer can use it to read the
* plugin orientation, but xfce_panel_plugin_get_orientation() is recommended.
**/
g_object_class_install_property (gobject_class,
PROP_ORIENTATION,
@ -497,7 +504,8 @@ xfce_panel_plugin_class_init (XfcePanelPluginClass *klass)
/**
* XfcePanelPlugin:size:
*
* TODO
* The size in pixels of the #XfcePanelPlugin. Plugin writer can use it to read the
* plugin size, but xfce_panel_plugin_get_size() is recommended.
**/
g_object_class_install_property (gobject_class,
PROP_SIZE,
@ -511,7 +519,9 @@ xfce_panel_plugin_class_init (XfcePanelPluginClass *klass)
/**
* XfcePanelPlugin:screen-position:
*
* TODO
* The #XfceScreenPosition of the #XfcePanelPlugin. Plugin writer can use it
* to read the plugin's screen position, but xfce_panel_plugin_get_screen_psotion()
* is recommended.
**/
g_object_class_install_property (gobject_class,
PROP_SCREEN_POSITION,
@ -526,7 +536,9 @@ xfce_panel_plugin_class_init (XfcePanelPluginClass *klass)
/**
* XfcePanelPlugin:expand:
*
* TODO
* Wether the #XfcePanelPlugin expands on the panel. Plugin writes can use it
* to read or set this property, but xfce_panel_plugin_set_expand()
* is recommended.
**/
g_object_class_install_property (gobject_class,
PROP_EXPAND,
@ -1328,7 +1340,7 @@ xfce_panel_plugin_take_window_notify (gpointer data,
* xfce_panel_plugin_get_name:
* @plugin : an #XfcePanelPlugin.
*
* TODO
* The internal name of the panel plugin.
*
* Returns: the name of the panel plugin.
**/
@ -1374,6 +1386,8 @@ xfce_panel_plugin_get_display_name (XfcePanelPlugin *plugin)
* the .desktop file of the plugin.
*
* Returns: the (translated) comment of the plugin.
*
* Since: 4.8
**/
G_CONST_RETURN gchar *
xfce_panel_plugin_get_comment (XfcePanelPlugin *plugin)
@ -1452,7 +1466,7 @@ xfce_panel_plugin_get_property_base (XfcePanelPlugin *plugin)
* Returns: the argument vector. The vector is owned by the plugin and
* should not be freed.
*
* Since: 4.8.0
* Since: 4.8
**/
G_CONST_RETURN gchar * G_CONST_RETURN *
xfce_panel_plugin_get_arguments (XfcePanelPlugin *plugin)
@ -1582,11 +1596,10 @@ xfce_panel_plugin_get_screen_position (XfcePanelPlugin *plugin)
* @plugin : an #XfcePanelPlugin.
* @window : a #GtkWindow.
*
* Connect a dialog to the plugin. When the panel is closed or the
* plugin is removed from the panel, the window will be closed by
* the panel.
* Connect a dialog to a plugin. When the @plugin is closed, it will
* destroy the @window.
*
* Since: 4.8.0
* Since: 4.8
**/
void
xfce_panel_plugin_take_window (XfcePanelPlugin *plugin,
@ -1722,7 +1735,7 @@ xfce_panel_plugin_menu_show_about (XfcePanelPlugin *plugin)
/**
* xfce_panel_plugin_remove:
* xfce_panel_plugin_get_locked:
* @plugin : an #XfcePanelPlugin.
*
* Whether the plugin is locked (not allowing customization). This
@ -1738,7 +1751,7 @@ xfce_panel_plugin_menu_show_about (XfcePanelPlugin *plugin)
* Returns: %TRUE if the user is not allowed to modify the plugin,
* %FALSE is customization is allowed.
*
* Since: 4.8.0
* Since: 4.8
**/
gboolean
xfce_panel_plugin_get_locked (XfcePanelPlugin *plugin)
@ -1761,7 +1774,7 @@ xfce_panel_plugin_get_locked (XfcePanelPlugin *plugin)
* in case the there are problems with the plugin in the panel. Always
* try to inform the user why this occured.
*
* Since: 4.8.0
* Since: 4.8
**/
void
xfce_panel_plugin_remove (XfcePanelPlugin *plugin)