[Xfce4-commits] <xfce4-vala:master> Update libxfce4util-1.0 package
Mike Massonnet
noreply at xfce.org
Sat Oct 20 02:32:03 CEST 2012
Updating branch refs/heads/master
to dd91cec75a30c8057e1dca8223b14a356e5908f3 (commit)
from bb2bb424323c0399c9a7f3057c91b86abc7ff81e (commit)
commit dd91cec75a30c8057e1dca8223b14a356e5908f3
Author: Mike Massonnet <mmassonnet at gmail.com>
Date: Sat Oct 20 02:26:43 2012 +0200
Update libxfce4util-1.0 package
Customization
Xfce.Rc: constructable class
new: xfce_rc_simple_open()
new_from_resource: xfce_rc_config_open()
destroy: xfce_rc_close()
Xfce.Resource: class with static functions
deprecate XfceMatchFunc, match_custom, pop_path, push_path
Xfce.ResourceType.*: XFCE_RESOURCE_TYPE_* enum
Xfce.PosixSignalHandler: class with static functions
Xfce.PosixSignalHandler.Callback: callback for set_handler
function
Xfce.textdomain: xfce_textdomain
convenience function on top of the bindtextdomain and textdomain
functions, all other related functions to
libxfce4util/xfce-i18n.h are deprecated
Deprecated
Debug (xfce-debug.h)
Use GLib.debug instead, it prints the line number of the Vala
source file
File Utilities (xfce-fileutils.h)
Xfce.mkdirhier: use GLib.mkdir_with_parents instead
Kiosk Mode (xfce-kiosk.h)
Xfconf provides possibility to lock capabilities (see
perchannel-xml.txt)
Use Xfconf.Channel.is_property_locked instead
Makefile.am | 2 +-
.../libxfce4util-1.0/libxfce4util-1.0-custom.vala | 10 ++
packages/libxfce4util-1.0/libxfce4util-1.0.defines | 2 +-
.../libxfce4util-1.0/libxfce4util-1.0.excludes | 13 ++-
packages/libxfce4util-1.0/libxfce4util-1.0.gi | 114 +++++++++++++++-----
tests/libxfce4util-1.0.vala | 15 +---
6 files changed, 108 insertions(+), 48 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 9e3086e..fd15d50 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -31,7 +31,7 @@ endif
tests: tests.stamp
tests.stamp:
(cd tests;\
- $(VALAC) --pkg=$(LIBXFCE4UTIL) --vapidir=../vapi $(LIBXFCE4UTIL).vala;\
+ $(VALAC) --pkg=posix --pkg=$(LIBXFCE4UTIL) --vapidir=../vapi $(LIBXFCE4UTIL).vala;\
$(VALAC) --pkg=$(XFCONF) --vapidir=../vapi $(XFCONF).vala;\
$(VALAC) --pkg=$(EXO) --vapidir=../vapi $(EXO).vala;\
)
diff --git a/packages/libxfce4util-1.0/libxfce4util-1.0-custom.vala b/packages/libxfce4util-1.0/libxfce4util-1.0-custom.vala
index 61c2712..92158b7 100644
--- a/packages/libxfce4util-1.0/libxfce4util-1.0-custom.vala
+++ b/packages/libxfce4util-1.0/libxfce4util-1.0-custom.vala
@@ -28,6 +28,16 @@ namespace Xfce {
}
[Compact]
+ [CCode (cheader_filename = "libxfce4util/libxfce4util.h", cprefix = "XFCE_RESOURCE_")]
+ public enum ResourceType {
+ DATA,
+ CONFIG,
+ CACHE,
+ ICONS,
+ THEMES
+ }
+
+ [Compact]
[CCode (cheader_filename = "libxfce4util/libxfce4util.h")]
public class PosixSignalHandler {
public delegate void Callback (int @signal);
diff --git a/packages/libxfce4util-1.0/libxfce4util-1.0.defines b/packages/libxfce4util-1.0/libxfce4util-1.0.defines
index 14a5bfc..16c46cf 100644
--- a/packages/libxfce4util-1.0/libxfce4util-1.0.defines
+++ b/packages/libxfce4util-1.0/libxfce4util-1.0.defines
@@ -1 +1 @@
--DLIBXFCE4UTIL_INSIDE_LIBXFCE4UTIL_H -DXFCE_DISABLE_DEPRECATED
+-DLIBXFCE4UTIL_COMPILATION -DXFCE_DISABLE_DEPRECATED
diff --git a/packages/libxfce4util-1.0/libxfce4util-1.0.excludes b/packages/libxfce4util-1.0/libxfce4util-1.0.excludes
index 18e70d1..fad554d 100644
--- a/packages/libxfce4util-1.0/libxfce4util-1.0.excludes
+++ b/packages/libxfce4util-1.0/libxfce4util-1.0.excludes
@@ -1,9 +1,12 @@
-include/xfce4/libxfce4util/libxfce4util-config.h
-include/xfce4/libxfce4util/xfce-desktopentry.h
+#include/xfce4/libxfce4util/libxfce4util-config.h
+include/xfce4/libxfce4util/xfce-debug.h
include/xfce4/libxfce4util/xfce-fileutils.h
-include/xfce4/libxfce4util/xfce-generics.h
+#include/xfce4/libxfce4util/xfce-generics.h
include/xfce4/libxfce4util/xfce-i18n.h
-include/xfce4/libxfce4util/xfce-miscutils.h
+include/xfce4/libxfce4util/xfce-kiosk.h
+#include/xfce4/libxfce4util/xfce-license.h
+#include/xfce4/libxfce4util/xfce-miscutils.h
include/xfce4/libxfce4util/xfce-posix-signal-handler.h
+#include/xfce4/libxfce4util/xfce-rc.h
include/xfce4/libxfce4util/xfce-resource.h
-include/xfce4/libxfce4util/xfce-utf8.h
+#include/xfce4/libxfce4util/xfce-utf8.h
diff --git a/packages/libxfce4util-1.0/libxfce4util-1.0.gi b/packages/libxfce4util-1.0/libxfce4util-1.0.gi
index 9c30525..e8dc738 100644
--- a/packages/libxfce4util-1.0/libxfce4util-1.0.gi
+++ b/packages/libxfce4util-1.0/libxfce4util-1.0.gi
@@ -1,32 +1,94 @@
<?xml version="1.0"?>
<api version="1.0">
<namespace name="Xfce">
+ <function name="expand_variables" symbol="xfce_expand_variables">
+ <return-type type="gchar*"/>
+ <parameters>
+ <parameter name="command" type="gchar*"/>
+ <parameter name="envp" type="gchar**"/>
+ </parameters>
+ </function>
+ <function name="get_homedir" symbol="xfce_get_homedir">
+ <return-type type="gchar*"/>
+ </function>
+ <function name="get_homefile_r" symbol="xfce_get_homefile_r">
+ <return-type type="gchar*"/>
+ <parameters>
+ <parameter name="buffer" type="gchar*"/>
+ <parameter name="length" type="size_t"/>
+ <parameter name="format" type="gchar*"/>
+ </parameters>
+ </function>
<function name="get_license_text" symbol="xfce_get_license_text">
<return-type type="gchar*"/>
<parameters>
<parameter name="license_type" type="XfceLicenseTextType"/>
</parameters>
</function>
- <struct name="XfceKiosk">
- <method name="free" symbol="xfce_kiosk_free">
- <return-type type="void"/>
- <parameters>
- <parameter name="kiosk" type="XfceKiosk*"/>
- </parameters>
- </method>
- <method name="new" symbol="xfce_kiosk_new">
- <return-type type="XfceKiosk*"/>
- <parameters>
- <parameter name="module" type="gchar*"/>
- </parameters>
- </method>
- <method name="query" symbol="xfce_kiosk_query">
- <return-type type="gboolean"/>
- <parameters>
- <parameter name="kiosk" type="XfceKiosk*"/>
- <parameter name="capability" type="gchar*"/>
- </parameters>
- </method>
+ <function name="get_userdir" symbol="xfce_get_userdir">
+ <return-type type="gchar*"/>
+ </function>
+ <function name="get_userfile_r" symbol="xfce_get_userfile_r">
+ <return-type type="gchar*"/>
+ <parameters>
+ <parameter name="buffer" type="gchar*"/>
+ <parameter name="length" type="size_t"/>
+ <parameter name="format" type="gchar*"/>
+ </parameters>
+ </function>
+ <function name="gethostname" symbol="xfce_gethostname">
+ <return-type type="gchar*"/>
+ </function>
+ <function name="putenv" symbol="xfce_putenv">
+ <return-type type="gint"/>
+ <parameters>
+ <parameter name="string" type="gchar*"/>
+ </parameters>
+ </function>
+ <function name="setenv" symbol="xfce_setenv">
+ <return-type type="gint"/>
+ <parameters>
+ <parameter name="name" type="gchar*"/>
+ <parameter name="value" type="gchar*"/>
+ <parameter name="overwrite" type="gboolean"/>
+ </parameters>
+ </function>
+ <function name="strjoin" symbol="xfce_strjoin">
+ <return-type type="gchar*"/>
+ <parameters>
+ <parameter name="separator" type="gchar*"/>
+ <parameter name="strings" type="gchar**"/>
+ <parameter name="count" type="gint"/>
+ </parameters>
+ </function>
+ <function name="unsetenv" symbol="xfce_unsetenv">
+ <return-type type="void"/>
+ <parameters>
+ <parameter name="name" type="gchar*"/>
+ </parameters>
+ </function>
+ <function name="utf8_remove_controls" symbol="xfce_utf8_remove_controls">
+ <return-type type="gchar*"/>
+ <parameters>
+ <parameter name="str" type="gchar*"/>
+ <parameter name="max_len" type="gssize"/>
+ <parameter name="end" type="gchar*"/>
+ </parameters>
+ </function>
+ <function name="utf8_strndup" symbol="xfce_utf8_strndup">
+ <return-type type="gchar*"/>
+ <parameters>
+ <parameter name="src" type="gchar*"/>
+ <parameter name="max_len" type="gssize"/>
+ </parameters>
+ </function>
+ <function name="version_string" symbol="xfce_version_string">
+ <return-type type="gchar*"/>
+ </function>
+ <struct name="Stack">
+ <field name="elements" type="gpointer"/>
+ <field name="nelements" type="gint"/>
+ <field name="top" type="gint"/>
</struct>
<struct name="XfceRc">
<method name="close" symbol="xfce_rc_close">
@@ -210,17 +272,13 @@
</parameters>
</method>
</struct>
- <enum name="XfceLicenseTextType" type-name="XfceLicenseTextType" get-type="xfce_license_text_type_get_type">
+ <enum name="XfceLicenseTextType">
<member name="XFCE_LICENSE_TEXT_BSD" value="0"/>
<member name="XFCE_LICENSE_TEXT_GPL" value="1"/>
<member name="XFCE_LICENSE_TEXT_LGPL" value="2"/>
</enum>
- <enum name="XfceResourceType" type-name="XfceResourceType" get-type="xfce_resource_type_get_type">
- <member name="XFCE_RESOURCE_DATA" value="0"/>
- <member name="XFCE_RESOURCE_CONFIG" value="1"/>
- <member name="XFCE_RESOURCE_CACHE" value="2"/>
- <member name="XFCE_RESOURCE_ICONS" value="3"/>
- <member name="XFCE_RESOURCE_THEMES" value="4"/>
- </enum>
+ <constant name="LIBXFCE4UTIL_MAJOR_VERSION" type="int" value="4"/>
+ <constant name="LIBXFCE4UTIL_MICRO_VERSION" type="int" value="0"/>
+ <constant name="LIBXFCE4UTIL_MINOR_VERSION" type="int" value="10"/>
</namespace>
</api>
diff --git a/tests/libxfce4util-1.0.vala b/tests/libxfce4util-1.0.vala
index e28618f..f3f5049 100644
--- a/tests/libxfce4util-1.0.vala
+++ b/tests/libxfce4util-1.0.vala
@@ -1,4 +1,5 @@
using Xfce;
+using Posix;
public class Libxfce4utilTests {
@@ -20,16 +21,6 @@ public class Libxfce4utilTests {
print ("bool = %d\n", (int)rc.read_bool_entry ("bool", false));
}
- public void test_kiosk (string module) {
- Xfce.Kiosk kiosk;
- bool has_cap;
-
- kiosk = new Xfce.Kiosk (module);
- has_cap = kiosk.query ("mouse-right-click");
-
- print ("my-module has capability mouse-right-click: %d\n", (int)has_cap);
- }
-
public void test_resource () {
string path;
string[] paths1;
@@ -55,7 +46,7 @@ public class Libxfce4utilTests {
public void test_signal () {
try {
- debug ("trigger a signal with: kill -TERM <pid>");
+ print ("trigger a signal with: kill -TERM %d\n", Posix.getpid());
Xfce.PosixSignalHandler.set_handler (ProcessSignal.TERM,
(@signal) => { print ("Catched SIGTERM (%d)\n", @signal); });
} catch (Error ex) {}
@@ -65,13 +56,11 @@ public class Libxfce4utilTests {
var mainloop = new MainLoop (null, false);
var tests = new Libxfce4utilTests ();
string rcfilename = "rcfile.rc";
- string kiosk_module = "my-module";
try { Xfce.PosixSignalHandler.init (); } catch (Error ex) {}
Xfce.textdomain ("test-package", "/usr/share/locale", null);
tests.test_rc (rcfilename);
- tests.test_kiosk (kiosk_module);
tests.test_resource ();
tests.test_signal ();
More information about the Xfce4-commits
mailing list