aboutsummaryrefslogtreecommitdiff
path: root/bindings
diff options
context:
space:
mode:
Diffstat (limited to 'bindings')
-rw-r--r--bindings/mono/ApplicationIndicator.custom8
-rw-r--r--bindings/mono/AssemblyInfo.cs2
-rw-r--r--bindings/mono/Makefile.am81
-rw-r--r--bindings/mono/app-indicator.sources.xml4
-rw-r--r--bindings/mono/appindicator-sharp.dll.config.in2
-rw-r--r--bindings/mono/examples/IndicatorExample.cs5
-rw-r--r--bindings/mono/libappindicator-api.metadata21
-rw-r--r--bindings/mono/policy.0.0.appindicator-sharp.config.in10
-rw-r--r--bindings/mono/policy.0.1.appindicator-sharp.config.in10
-rw-r--r--bindings/python/appindicator.defs53
10 files changed, 173 insertions, 23 deletions
diff --git a/bindings/mono/ApplicationIndicator.custom b/bindings/mono/ApplicationIndicator.custom
index 11d16a8..fcc52d7 100644
--- a/bindings/mono/ApplicationIndicator.custom
+++ b/bindings/mono/ApplicationIndicator.custom
@@ -1,10 +1,10 @@
-[DllImport ("libappindicator.so.0")]
+[DllImport ("appindicator.dll")]
static extern int app_indicator_get_status (IntPtr i);
-[DllImport ("libappindicator.so.0")]
+[DllImport ("appindicator.dll")]
static extern int app_indicator_get_category (IntPtr i);
-[DllImport ("libappindicator.so.0")]
+[DllImport ("appindicator.dll")]
static extern void app_indicator_set_status (IntPtr i, int s);
[GLib.Property ("status")]
@@ -23,4 +23,4 @@ static extern void app_indicator_set_status (IntPtr i, int s);
get {
return (Category) app_indicator_get_category (Handle);
}
- } \ No newline at end of file
+ }
diff --git a/bindings/mono/AssemblyInfo.cs b/bindings/mono/AssemblyInfo.cs
index 269981a..0417db6 100644
--- a/bindings/mono/AssemblyInfo.cs
+++ b/bindings/mono/AssemblyInfo.cs
@@ -27,4 +27,4 @@ using System.Reflection;
[assembly: AssemblyCopyright ("© 2010 Canonical, Ltd.")]
[assembly: AssemblyTrademark ("")]
[assembly: AssemblyCulture ("")]
-[assembly: AssemblyVersion ("0.1")]
+[assembly: AssemblyVersion ("0.2")]
diff --git a/bindings/mono/Makefile.am b/bindings/mono/Makefile.am
index 4d2d8b4..dfaa41f 100644
--- a/bindings/mono/Makefile.am
+++ b/bindings/mono/Makefile.am
@@ -10,11 +10,43 @@ MIDDLE_API = libappindicator-api.middle
RAW_API = libappindicator-api.raw
METADATA = libappindicator-api.metadata
ASSEMBLY_NAME = appindicator-sharp
-ASSEMBLY = appindicator-sharp.dll
-TARGET = $(ASSEMBLY) $(ASSEMBLY).config
+ASSEMBLY_VERSION = 0.2.0.0
+ASSEMBLY = $(ASSEMBLY_NAME).dll
+POLICY = policy.$(POLICY_VERSION).$(ASSEMBLY_NAME)
+POLICY_VERSION = 0.0
+DLLPOLICY = $(POLICY).dll
+POLICY1 = policy.$(POLICY1_VERSION).$(ASSEMBLY_NAME)
+POLICY1_VERSION = 0.1
+DLLPOLICY1 = $(POLICY1).dll
+WRAPPER_FREE_BINDING_SRC = $(top_srcdir)/src/app-indicator.c
+WRAPPER_FREE_BINDING = app-indicator.c
+
+TARGET = \
+ $(ASSEMBLY) \
+ $(ASSEMBLY).config \
+ $(DLLPOLICY) \
+ $(POLICY).config \
+ $(DLLPOLICY1) \
+ $(POLICY1).config
+
assemblydir = $(libdir)/cli/appindicator-sharp-0.1
assembly_DATA = $(TARGET)
-CLEANFILES = $(ASSEMBLY) $(ASSEMBLY).mdb generated-stamp generated/*.cs $(API) $(MIDDLE_API) $(RAW_API) $(TEST)
+
+CLEANFILES = \
+ $(ASSEMBLY) \
+ $(ASSEMBLY).mdb \
+ generated-stamp \
+ generated/*.cs \
+ $(API) \
+ $(MIDDLE_API) \
+ $(RAW_API) \
+ $(TEST) \
+ $(DLLPOLICY) \
+ $(DLLPOLICY1) \
+ $(WRAPPER_FREE_BINDING) \
+ $(POLICY).config \
+ $(POLICY1).config
+
DISTCLEANFILES = $(ASSEMBLY).config
TEST_SOURCES = TestIndicator.cs
customs = ApplicationIndicator.custom
@@ -26,16 +58,21 @@ EXTRA_DIST = \
appindicator-sharp.dll.config.in \
app-indicator.sources.xml \
$(ASSEMBLY_NAME).snk \
+ $(POLICY).config.in \
+ $(POLICY1).config.in \
$(customs) \
$(TEST_SOURCES)
-GACUTIL_FLAGS="-package $(ASSEMBLY_NAME) -root $(DESTDIR)$(prefix)/lib"
+GACUTIL_FLAGS=-package $(ASSEMBLY_NAME) -root $(DESTDIR)$(prefix)/lib
references = $(GTK_SHARP_LIBS)
test_references = $(GTK_SHARP_LIBS) $(NUNIT_LIBS) -r:$(ASSEMBLY)
-$(RAW_API): app-indicator.sources.xml
- $(GAPI_PARSER) app-indicator.sources.xml
+$(RAW_API): app-indicator.sources.xml $(WRAPPER_FREE_BINDING)
+ $(GAPI_PARSER) $(srcdir)/app-indicator.sources.xml
+
+$(WRAPPER_FREE_BINDING): $(WRAPPER_FREE_BINDING_SRC)
+ sed '/signals\[X_NEW_LABEL\] /,+6d' $(WRAPPER_FREE_BINDING_SRC) > $(WRAPPER_FREE_BINDING)
$(MIDDLE_API): $(METADATA) $(RAW_API)
cp $(srcdir)/$(RAW_API) $(MIDDLE_API)
@@ -54,6 +91,9 @@ $(API): $(MIDDLE_API) Makefile.am
-e "s|PROP_ICON_THEME_PATH_S|icon-theme-path|" \
-e "s|PROP_MENU_S|menu|" \
-e "s|PROP_CONNECTED_S|connected|" \
+ -e "s|PROP_LABEL_S|label|" \
+ -e "s|PROP_LABEL_GUIDE_S|label-guide|" \
+ -e "s|PROP_ORDERING_INDEX_S|ordering-index|" \
$< > $@
api_includes = $(GTK_SHARP_CFLAGS)
@@ -72,14 +112,35 @@ $(ASSEMBLY): generated-stamp $(srcdir)/AssemblyInfo.cs
$(CSC) $(CSFLAGS) -keyfile:$(srcdir)/$(ASSEMBLY_NAME).snk -nowarn:0169,0612,0618 -unsafe -out:$(ASSEMBLY) -target:library $(references) $(builddir)/$(GENERATED_SOURCES) $(srcdir)/AssemblyInfo.cs
install-data-local:
- echo "$(GACUTIL) -i $(ASSEMBLY_NAME).dll -package $(ASSEMBLY_NAME) -root $(DESTDIR)$(prefix)/lib"; \
- $(GACUTIL) -i $(ASSEMBLY_NAME).dll -package $(ASSEMBLY_NAME) -root $(DESTDIR)$(prefix)/lib || exit 1;
+ echo "$(GACUTIL) -i $(ASSEMBLY_NAME).dll $(GACUTIL_FLAGS)"; \
+ $(GACUTIL) -i $(ASSEMBLY_NAME).dll $(GACUTIL_FLAGS) || exit 1;
+ echo "$(GACUTIL) -i $(DLLPOLICY) $(GACUTIL_FLAGS)"; \
+ $(GACUTIL) -i $(DLLPOLICY) $(GACUTIL_FLAGS) || exit 1;
uninstall-local:
- echo "$(GACUTIL) -u $(ASSEMBLY_NAME) -package $(ASSEMBLY_NAME) -root $(DESTDIR)$(prefix)/lib"; \
- $(GACUTIL) -u $(ASSEMBLY_NAME) -package $(ASSEMBLY_NAME) -root $(DESTDIR)$(prefix)/lib || exit 1;
+ echo "$(GACUTIL) -u $(ASSEMBLY_NAME) $(GACUTIL_FLAGS)"; \
+ $(GACUTIL) -u $(ASSEMBLY_NAME) $(GACUTIL_FLAGS) || exit 1;
+ echo "$(GACUTIL) -u $(DLLPOLICY) $(GACUTIL_FLAGS)"; \
+ $(GACUTIL) -u $(POLICY) $(GACUTIL_FLAGS) || exit 1;
$(TEST): $(ASSEMBLY) $(TEST_SOURCES)
$(CSC) -out:$(TEST) -target:library $(test_references) $(srcdir)/$(TEST_SOURCES)
all: $(TEST)
+
+$(POLICY).config: $(POLICY).config.in Makefile
+ sed -e "s|@ASSEMBLY_NAME@|$(ASSEMBLY_NAME)|" \
+ -e "s|@ASSEMBLY_VERSION@|$(ASSEMBLY_VERSION)|g" \
+ $< > $@
+
+$(DLLPOLICY): $(POLICY).config $(ASSEMBLY_NAME).snk Makefile
+ $(AL) -link:$(POLICY).config -out:$(DLLPOLICY) -keyfile:$(srcdir)/$(ASSEMBLY_NAME).snk
+
+
+$(POLICY1).config: $(POLICY1).config.in Makefile
+ sed -e "s|@ASSEMBLY_NAME@|$(ASSEMBLY_NAME)|" \
+ -e "s|@ASSEMBLY_VERSION@|$(ASSEMBLY_VERSION)|g" \
+ $< > $@
+
+$(DLLPOLICY1): $(POLICY1).config $(ASSEMBLY_NAME).snk Makefile
+ $(AL) -link:$(POLICY1).config -out:$(DLLPOLICY1) -keyfile:$(srcdir)/$(ASSEMBLY_NAME).snk
diff --git a/bindings/mono/app-indicator.sources.xml b/bindings/mono/app-indicator.sources.xml
index 2649eb4..6cf28e9 100644
--- a/bindings/mono/app-indicator.sources.xml
+++ b/bindings/mono/app-indicator.sources.xml
@@ -1,8 +1,8 @@
<gapi-parser-input>
<api filename="libappindicator-api.raw">
- <library name="libappindicator.so.0">
+ <library name="appindicator.dll">
<namespace name="AppIndicator">
- <file>../../src/app-indicator.c</file>
+ <file>app-indicator.c</file>
<file>../../src/app-indicator-enum-types.c</file>
<file>../../src/app-indicator-enum-types.h</file>
<file>../../src/app-indicator.h</file>
diff --git a/bindings/mono/appindicator-sharp.dll.config.in b/bindings/mono/appindicator-sharp.dll.config.in
index d0e9e1e..2d21d00 100644
--- a/bindings/mono/appindicator-sharp.dll.config.in
+++ b/bindings/mono/appindicator-sharp.dll.config.in
@@ -1,5 +1,5 @@
<configuration>
- <dllmap dll="appindicator-sharp.dll" target="libappindicator@LIB_PREFIX@.0@LIB_SUFFIX@"/>
+ <dllmap dll="appindicator.dll" target="libappindicator@LIB_PREFIX@.1@LIB_SUFFIX@"/>
<dllmap dll="libgtk-2.0-0.dll" target="libgtk-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
<dllmap dll="libglib-2.0-0.dll" target="libglib-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
<dllmap dll="libgobject-2.0-0.dll" target="libgobject-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
diff --git a/bindings/mono/examples/IndicatorExample.cs b/bindings/mono/examples/IndicatorExample.cs
index c34e020..c18a665 100644
--- a/bindings/mono/examples/IndicatorExample.cs
+++ b/bindings/mono/examples/IndicatorExample.cs
@@ -34,8 +34,8 @@ public class IndicatorExample
win.Add (label);
- ApplicationIndicator indicator = new ApplicationIndicator ("my-id",
- "my-name",
+ ApplicationIndicator indicator = new ApplicationIndicator ("Example",
+ "applications-microblogging-panel",
Category.ApplicationStatus);
indicator.Status = Status.Attention;
@@ -45,6 +45,7 @@ public class IndicatorExample
menu.Append (new MenuItem ("Bar"));
indicator.Menu = menu;
+ indicator.Menu.ShowAll ();
win.ShowAll ();
diff --git a/bindings/mono/libappindicator-api.metadata b/bindings/mono/libappindicator-api.metadata
index 8f9df53..ccf58f1 100644
--- a/bindings/mono/libappindicator-api.metadata
+++ b/bindings/mono/libappindicator-api.metadata
@@ -5,10 +5,14 @@
<attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_attention_icon']" name="cname">new-attention-icon</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_status']" name="name">NewStatus</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_status']" name="cname">new-status</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_label']" name="name">NewLabel</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_label']" name="cname">new-label</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='connection_changed']" name="name">ConnectionChanged</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='connection_changed']" name="cname">connection-changed</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_icon']" name="name">NewIcon</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_icon']" name="cname">new-icon</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_icon_theme_path']" name="name">NewIconThemePath</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/signal[@field_name='new_icon_theme_path']" name="cname">new-icon-theme-path</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_ID_S']" name="name">ID</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_CATEGORY_S']" name="hidden">true</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_STATUS_S']" name="hidden">true</attr>
@@ -18,6 +22,9 @@
<attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_MENU_S']" name="name">Menu</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_MENU_S']" name="type">GtkMenu*</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_CONNECTED_S']" name="name">Connected</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_LABEL_S']" name="name">Label</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_LABEL_GUIDE_S']" name="name">LabelGuide</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_ORDERING_INDEX_S']" name="name">OrderingIndex</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/method[@name='SetMenu']" name="name">SetMenu</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/constructor[@cname='app_indicator_new']/*/*[@name='id']" name="property_name">id</attr>
@@ -26,16 +33,26 @@
<attr path="/api/namespace/object[@cname='AppIndicator']/constructor[@cname='app_indicator_new_with_path']/*/*[@name='id']" name="property_name">id</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/constructor[@cname='app_indicator_new_with_path']/*/*[@name='icon_name']" name="property_name">icon-name</attr>
<attr path="/api/namespace/object[@cname='AppIndicator']/constructor[@cname='app_indicator_new_with_path']/*/*[@name='category']" name="property_name">category</attr>
- <attr path="/api/namespace/object[@cname='AppIndicator']/constructor[@cname='app_indicator_new_with_path']/*/*[@name='icon_path']" name="property_name">icon-theme-path</attr>
+ <attr path="/api/namespace/object[@cname='AppIndicator']/constructor[@cname='app_indicator_new_with_path']/*/*[@name='icon_theme_path']" name="property_name">icon-theme-path</attr>
+
+ <remove-node path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_X_LABEL_S']" />
+ <remove-node path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_X_LABEL_GUIDE_S']" />
+ <remove-node path="/api/namespace/object[@cname='AppIndicator']/property[@cname='PROP_X_ORDERING_INDEX_S']" />
<remove-node path="/api/namespace/object/method[@cname='app_indicator_get_id']" />
<remove-node path="/api/namespace/object/method[@cname='app_indicator_get_status']" />
<remove-node path="/api/namespace/object/method[@cname='app_indicator_get_icon']" />
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_get_icon_theme_path']" />
<remove-node path="/api/namespace/object/method[@cname='app_indicator_get_category']" />
<remove-node path="/api/namespace/object/method[@cname='app_indicator_get_attention_icon']" />
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_get_label']" />
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_get_label_guide']" />
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_get_ordering_index']" />
- <remove-node path="/api/namespace/object/method[@cname='app_indicator_set_id']" />
<remove-node path="/api/namespace/object/method[@cname='app_indicator_set_status']" />
<remove-node path="/api/namespace/object/method[@cname='app_indicator_set_icon']" />
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_set_icon_theme_path']" />
<remove-node path="/api/namespace/object/method[@cname='app_indicator_set_attention_icon']" />
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_set_label']" />
+ <remove-node path="/api/namespace/object/method[@cname='app_indicator_set_ordering_index']" />
</metadata>
diff --git a/bindings/mono/policy.0.0.appindicator-sharp.config.in b/bindings/mono/policy.0.0.appindicator-sharp.config.in
new file mode 100644
index 0000000..e1fe0db
--- /dev/null
+++ b/bindings/mono/policy.0.0.appindicator-sharp.config.in
@@ -0,0 +1,10 @@
+<configuration>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="@ASSEMBLY_NAME@" publicKeyToken="bcae265d1c7ab4c2" />
+ <bindingRedirect oldVersion="0.0.0.0-0.1.0.0" newVersion="@ASSEMBLY_VERSION@"/>
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
+</configuration>
diff --git a/bindings/mono/policy.0.1.appindicator-sharp.config.in b/bindings/mono/policy.0.1.appindicator-sharp.config.in
new file mode 100644
index 0000000..0a8f9b1
--- /dev/null
+++ b/bindings/mono/policy.0.1.appindicator-sharp.config.in
@@ -0,0 +1,10 @@
+<configuration>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="@ASSEMBLY_NAME@" publicKeyToken="bcae265d1c7ab4c2" />
+ <bindingRedirect oldVersion="0.1.0.0-@ASSEMBLY_VERSION@" newVersion="@ASSEMBLY_VERSION@"/>
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
+</configuration>
diff --git a/bindings/python/appindicator.defs b/bindings/python/appindicator.defs
index 98abe4c..5027a6d 100644
--- a/bindings/python/appindicator.defs
+++ b/bindings/python/appindicator.defs
@@ -49,7 +49,7 @@
'("const-gchar*" "id")
'("const-gchar*" "icon_name")
'("AppIndicatorCategory" "category")
- '("const-gchar*" "icon_path" (null-ok) (default "NULL"))
+ '("const-gchar*" "icon_theme_path" (null-ok) (default "NULL"))
)
)
@@ -62,6 +62,24 @@
)
)
+(define-method set_label
+ (of-object "AppIndicator")
+ (c-name "app_indicator_set_label")
+ (return-type "none")
+ (parameters
+ '("const-gchar*" "label" (null-ok))
+ '("const-gchar*" "guide" (null-ok) (default "NULL"))
+ )
+)
+
+(define-method set_ordering_index
+ (of-object "AppIndicator")
+ (c-name "app_indicator_set_ordering_index")
+ (parameters
+ '("guint32" "ordering_index")
+ )
+)
+
(define-method set_attention_icon
(of-object "AppIndicator")
(c-name "app_indicator_set_attention_icon")
@@ -89,6 +107,15 @@
)
)
+(define-method set_icon_theme_path
+ (of-object "AppIndicator")
+ (c-name "app_indicator_set_icon_theme_path")
+ (return-type "none")
+ (parameters
+ '("const-gchar*" "icon_theme_path" (null-ok))
+ )
+)
+
(define-method get_id
(of-object "AppIndicator")
(c-name "app_indicator_get_id")
@@ -107,12 +134,36 @@
(return-type "AppIndicatorStatus")
)
+(define-method get_label
+ (of-object "AppIndicator")
+ (c-name "app_indicator_get_label")
+ (return-type "const-gchar*")
+)
+
+(define-method get_label_guide
+ (of-object "AppIndicator")
+ (c-name "app_indicator_get_label_guide")
+ (return-type "const-gchar*")
+)
+
+(define-method get_ordering_index
+ (of-object "AppIndicator")
+ (c-name "app_indicator_get_ordering_index")
+ (return-type "guint32")
+)
+
(define-method get_icon
(of-object "AppIndicator")
(c-name "app_indicator_get_icon")
(return-type "const-gchar*")
)
+(define-method get_icon_theme_path
+ (of-object "AppIndicator")
+ (c-name "app_indicator_get_icon_theme_path")
+ (return-type "const-gchar*")
+)
+
(define-method get_attention_icon
(of-object "AppIndicator")
(c-name "app_indicator_get_attention_icon")