You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

162 lines
7.5 KiB

13 years ago
/*
* Copyright (C) 2008-2009 Nick Schermer <nick@xfce.org>
13 years ago
*
13 years ago
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
13 years ago
*
13 years ago
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
13 years ago
*/
/* #if !defined(LIBXFCE4PANEL_INSIDE_LIBXFCE4PANEL_H) && !defined(LIBXFCE4PANEL_COMPILATION)
13 years ago
#error "Only <libxfce4panel/libxfce4panel.h> can be included directly, this file may disappear or change contents"
#endif */
13 years ago
#ifndef __XFCE_PANEL_PLUGIN_H__
#define __XFCE_PANEL_PLUGIN_H__
#include <gtk/gtk.h>
#include <libxfce4panel/libxfce4panel-enums.h>
#include <libxfce4panel/libxfce4panel-deprecated.h>
13 years ago
G_BEGIN_DECLS
typedef struct _XfcePanelPluginPrivate XfcePanelPluginPrivate;
typedef struct _XfcePanelPluginClass XfcePanelPluginClass;
typedef struct _XfcePanelPlugin XfcePanelPlugin;
typedef void (*XfcePanelPluginFunc) (XfcePanelPlugin *plugin);
typedef gboolean (*XfcePanelPluginPreInit) (gint argc, gchar **argv);
typedef gboolean (*XfcePanelPluginCheck) (GdkScreen *screen);
13 years ago
#define XFCE_TYPE_PANEL_PLUGIN (xfce_panel_plugin_get_type ())
#define XFCE_PANEL_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFCE_TYPE_PANEL_PLUGIN, XfcePanelPlugin))
#define XFCE_PANEL_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFCE_TYPE_PANEL_PLUGIN, XfcePanelPluginClass))
#define XFCE_IS_PANEL_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFCE_TYPE_PANEL_PLUGIN))
#define XFCE_IS_PANEL_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFCE_TYPE_PANEL_PLUGIN))
#define XFCE_PANEL_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XFCE_TYPE_PANEL_PLUGIN, XfcePanelPluginClass))
struct _XfcePanelPluginClass
{
/*< private >*/
GtkEventBoxClass __parent__;
/*< object oriented plugins >*/
void (*construct) (XfcePanelPlugin *plugin);
13 years ago
/*< signals >*/
void (*screen_position_changed) (XfcePanelPlugin *plugin,
XfceScreenPosition position);
gboolean (*size_changed) (XfcePanelPlugin *plugin,
gint size);
void (*orientation_changed) (XfcePanelPlugin *plugin,
GtkOrientation orientation);
void (*free_data) (XfcePanelPlugin *plugin);
void (*save) (XfcePanelPlugin *plugin);
void (*about) (XfcePanelPlugin *plugin);
void (*configure_plugin) (XfcePanelPlugin *plugin);
void (*removed) (XfcePanelPlugin *plugin);
gboolean (*remote_event) (XfcePanelPlugin *plugin,
const gchar *name,
const GValue *value);
13 years ago
/*< private >*/
void (*reserved1) (void);
void (*reserved2) (void);
void (*reserved3) (void);
void (*reserved4) (void);
};
struct _XfcePanelPlugin
{
/*< private >*/
GtkEventBox __parent__;
13 years ago
/*< private >*/
XfcePanelPluginPrivate *priv;
};
GType xfce_panel_plugin_get_type (void) G_GNUC_CONST;
13 years ago
const gchar *xfce_panel_plugin_get_name (XfcePanelPlugin *plugin) G_GNUC_PURE;
13 years ago
const gchar *xfce_panel_plugin_get_display_name (XfcePanelPlugin *plugin) G_GNUC_PURE;
13 years ago
const gchar *xfce_panel_plugin_get_comment (XfcePanelPlugin *plugin) G_GNUC_PURE;
gint xfce_panel_plugin_get_unique_id (XfcePanelPlugin *plugin) G_GNUC_PURE;
13 years ago
const gchar *xfce_panel_plugin_get_property_base (XfcePanelPlugin *plugin) G_GNUC_PURE;
const gchar * const *xfce_panel_plugin_get_arguments (XfcePanelPlugin *plugin) G_GNUC_PURE;
gint xfce_panel_plugin_get_size (XfcePanelPlugin *plugin) G_GNUC_PURE;
13 years ago
gboolean xfce_panel_plugin_get_expand (XfcePanelPlugin *plugin) G_GNUC_PURE;
13 years ago
void xfce_panel_plugin_set_expand (XfcePanelPlugin *plugin,
gboolean expand);
13 years ago
GtkOrientation xfce_panel_plugin_get_orientation (XfcePanelPlugin *plugin) G_GNUC_PURE;
13 years ago
XfceScreenPosition xfce_panel_plugin_get_screen_position (XfcePanelPlugin *plugin) G_GNUC_PURE;
13 years ago
void xfce_panel_plugin_take_window (XfcePanelPlugin *plugin,
GtkWindow *window);
13 years ago
void xfce_panel_plugin_add_action_widget (XfcePanelPlugin *plugin,
GtkWidget *widget);
13 years ago
void xfce_panel_plugin_menu_insert_item (XfcePanelPlugin *plugin,
GtkMenuItem *item);
13 years ago
void xfce_panel_plugin_menu_show_configure (XfcePanelPlugin *plugin);
13 years ago
void xfce_panel_plugin_menu_show_about (XfcePanelPlugin *plugin);
13 years ago
void xfce_panel_plugin_block_menu (XfcePanelPlugin *plugin);
13 years ago
void xfce_panel_plugin_unblock_menu (XfcePanelPlugin *plugin);
13 years ago
void xfce_panel_plugin_register_menu (XfcePanelPlugin *plugin,
GtkMenu *menu);
GtkArrowType xfce_panel_plugin_arrow_type (XfcePanelPlugin *plugin);
13 years ago
void xfce_panel_plugin_position_widget (XfcePanelPlugin *plugin,
GtkWidget *menu_widget,
GtkWidget *attach_widget,
gint *x,
gint *y);
void xfce_panel_plugin_position_menu (GtkMenu *menu,
gint *x,
gint *y,
gboolean *push_in,
gpointer panel_plugin);
13 years ago
void xfce_panel_plugin_focus_widget (XfcePanelPlugin *plugin,
GtkWidget *widget);
void xfce_panel_plugin_block_autohide (XfcePanelPlugin *plugin,
gboolean blocked);
gchar *xfce_panel_plugin_lookup_rc_file (XfcePanelPlugin *plugin) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
13 years ago
gchar *xfce_panel_plugin_save_location (XfcePanelPlugin *plugin,
gboolean create) G_GNUC_MALLOC G_GNUC_WARN_UNUSED_RESULT;
13 years ago
G_END_DECLS
#endif /* !__XFCE_PANEL_PLUGIN_H__ */