Browse Source

Generate the XfceScreenPosition enum type.

tags/xfce4-panel-4.10.0
Nick Schermer 11 years ago
parent
commit
a623e6cc3f
7 changed files with 56 additions and 22 deletions
  1. +1
    -1
      Makefile.am
  2. +25
    -1
      libxfce4panel/Makefile.am
  3. +5
    -3
      libxfce4panel/libxfce4panel-enums.h
  4. +2
    -1
      libxfce4panel/libxfce4panel.h
  5. +7
    -0
      libxfce4panel/libxfce4panel.symbols
  6. +3
    -3
      libxfce4panel/xfce-panel-plugin.c
  7. +13
    -13
      libxfce4panel/xfce-panel-plugin.h

+ 1
- 1
Makefile.am View File

@@ -1,8 +1,8 @@
# $Id$

SUBDIRS = \
common \
libxfce4panel \
common \
panel \
plugins \
po \


+ 25
- 1
libxfce4panel/Makefile.am View File

@@ -10,18 +10,23 @@ INCLUDES = \
lib_LTLIBRARIES = \
libxfce4panel.la

libxfce4panel_public_built_sources = \
libxfce4panel-enum-types.h

libxfce4panel_built_sources = \
$(libxfce4panel_public_built_sources) \
libxfce4panel-alias.h \
libxfce4panel-aliasdef.c \
libxfce4panel-enum-types.c \
libxfce4panel-marshal.c \
libxfce4panel-marshal.h

libxfce4panel_headers = \
libxfce4panel.h \
libxfce4panel-enums.h \
xfce-arrow-button.h \
xfce-hvbox.h \
xfce-panel-convenience.h \
xfce-panel-enums.h \
xfce-panel-macros.h \
xfce-panel-plugin.h \
xfce-panel-image.h
@@ -30,6 +35,7 @@ libxfce4panel_includedir = \
$(includedir)/xfce4/libxfce4panel

libxfce4panel_include_HEADERS = \
$(libxfce4panel_public_built_sources) \
$(libxfce4panel_headers)

libxfce4panel_la_SOURCES = \
@@ -82,6 +88,24 @@ libxfce4panel-alias.h: make-libxfce4panel-alias.pl libxfce4panel.symbols
libxfce4panel-aliasdef.c: make-libxfce4panel-alias.pl libxfce4panel.symbols
$(AM_V_GEN) $(PERL) $(srcdir)/make-libxfce4panel-alias.pl -def < $(srcdir)/libxfce4panel.symbols > $@

libxfce4panel-enum-types.h: $(libxfce4panel_headers) Makefile
$(AM_V_GEN) ( cd $(srcdir) && glib-mkenums \
--fhead "#ifndef __LIBXFCE4PANEL_ENUM_TYPES_H__\n#define __LIBXFCE4PANEL_ENUM_TYPES_H__\n#include <glib-object.h>\nG_BEGIN_DECLS\n" \
--fprod "/* enumerations from \"@filename@\" */\n" \
--vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define XFCE_TYPE_@ENUMSHORT@ (@enum_name@_get_type())\n" \
--ftail "G_END_DECLS\n\n#endif /* !__LIBXFCE4PANEL_ENUM_TYPES_H__ */" \
$(libxfce4panel_headers) ) > $@

libxfce4panel-enum-types.c: $(libxfce4panel_headers) Makefile
$(AM_V_GEN) ( cd $(srcdir) && glib-mkenums \
--fhead "#include <libxfce4panel/libxfce4panel-enums.h>\n#include <libxfce4panel/libxfce4panel-enum-types.h>\n#include <libxfce4panel/libxfce4panel-alias.h>" \
--fprod "\n/* enumerations from \"@filename@\" */" \
--vhead "GType\n@enum_name@_get_type (void)\n{\n\tstatic GType type = 0;\n\tif (type == 0) {\n\tstatic const G@Type@Value values[] = {"\
--vprod "\t{ @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
--vtail "\t{ 0, NULL, NULL }\n\t};\n\ttype = g_@type@_register_static (\"@EnumName@\", values);\n }\n\treturn type;\n}\n" \
--ftail "\n#define __LIBXFCE4PANEL_ENUM_TYPES_C__\n#include <libxfce4panel/libxfce4panel-aliasdef.c>\n" \
$(libxfce4panel_headers) ) > $@

DISTCLEANFILES = \
$(libxfce4panel_built_sources)



libxfce4panel/xfce-panel-enums.h → libxfce4panel/libxfce4panel-enums.h View File

@@ -22,8 +22,10 @@
#error "Only <libxfce4panel/libxfce4panel.h> can be included directly, this file may disappear or change contents"
#endif

#ifndef __XFCE_PANEL_ENUMS_H__
#define __XFCE_PANEL_ENUMS_H__
#ifndef __LIBXFCE4PANEL_ENUMS_H__
#define __LIBXFCE4PANEL_ENUMS_H__

#include <glib-object.h>

G_BEGIN_DECLS
/**
@@ -171,4 +173,4 @@ XfceScreenPosition;

G_END_DECLS

#endif /* !__XFCE_PANEL_ENUMS_H__ */
#endif /* !__LIBXFCE4PANEL_ENUMS_H__ */

+ 2
- 1
libxfce4panel/libxfce4panel.h View File

@@ -24,11 +24,12 @@ G_BEGIN_DECLS

#define LIBXFCE4PANEL_INSIDE_LIBXFCE4PANEL_H

#include <libxfce4panel/libxfce4panel-enums.h>
#include <libxfce4panel/libxfce4panel-enum-types.h>
#include <libxfce4panel/xfce-panel-macros.h>
#include <libxfce4panel/xfce-arrow-button.h>
#include <libxfce4panel/xfce-hvbox.h>
#include <libxfce4panel/xfce-panel-convenience.h>
#include <libxfce4panel/xfce-panel-enums.h>
#include <libxfce4panel/xfce-panel-plugin.h>
#include <libxfce4panel/xfce-panel-image.h>



+ 7
- 0
libxfce4panel/libxfce4panel.symbols View File

@@ -31,6 +31,13 @@
#define IN_SOURCE(x) 1
#endif

/* libxfce4panel-enum-types.h */
#if IN_HEADER(__LIBXFCE4PANEL_ENUM_TYPES_H__)
#if IN_SOURCE(__LIBXFCE4PANEL_ENUM_TYPES_C__)
xfce_screen_position_get_type G_GNUC_CONST
#endif
#endif

/* xfce-arrow-button.h */
#if IN_HEADER(__XFCE_ARROW_BUTTON_H__)
#if IN_SOURCE(__XFCE_ARROW_BUTTON_C__)


+ 3
- 3
libxfce4panel/xfce-panel-plugin.c View File

@@ -334,7 +334,7 @@ xfce_panel_plugin_class_init (XfcePanelPluginClass *klass)
/**
* XfcePanelPlugin::screen-position-changed
* @plugin : an #XfcePanelPlugin.
* @position : the new screen position of the panel.
* @position : the new #XfceScreenPosition of the panel.
*
* This signal is emmitted whenever the screen position of the panel
* the @plugin is on changes. Plugins writers can for example use
@@ -346,8 +346,8 @@ xfce_panel_plugin_class_init (XfcePanelPluginClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (XfcePanelPluginClass, screen_position_changed),
NULL, NULL,
g_cclosure_marshal_VOID__INT,
G_TYPE_NONE, 1, G_TYPE_INT);
g_cclosure_marshal_VOID__ENUM,
G_TYPE_NONE, 1, XFCE_TYPE_SCREEN_POSITION);

/**
* XfcePanelPlugin:name:


+ 13
- 13
libxfce4panel/xfce-panel-plugin.h View File

@@ -25,7 +25,7 @@
#define __XFCE_PANEL_PLUGIN_H__

#include <gtk/gtk.h>
#include <libxfce4panel/xfce-panel-enums.h>
#include <libxfce4panel/libxfce4panel-enums.h>

G_BEGIN_DECLS

@@ -46,20 +46,20 @@ struct _XfcePanelPluginClass
GtkEventBoxClass __parent__;

/*< object oriented plugins >*/
void (*construct) (XfcePanelPlugin *plugin);
void (*construct) (XfcePanelPlugin *plugin);

/*< signals >*/
void (*screen_position_changed) (XfcePanelPlugin *plugin,
gint 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);
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);

/*< private >*/
void (*reserved1) (void);


Loading…
Cancel
Save