aboutsummaryrefslogtreecommitdiff
path: root/bindings/mono/examples
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2009-12-14 10:00:49 -0600
committerTed Gould <ted@gould.cx>2009-12-14 10:00:49 -0600
commit985c449e8efe4e258d286857f6a71a7726b43561 (patch)
treefd06a516c7119a53bd1715613bf945be6fb2b567 /bindings/mono/examples
parentd3038937c5f5621da42952a026c61e1f5f74e83a (diff)
parentbb6fa61d8ddc76486533f01ffa645e7894705f6c (diff)
downloadayatana-indicator-application-985c449e8efe4e258d286857f6a71a7726b43561.tar.gz
ayatana-indicator-application-985c449e8efe4e258d286857f6a71a7726b43561.tar.bz2
ayatana-indicator-application-985c449e8efe4e258d286857f6a71a7726b43561.zip
Merging in mono bindings.
Diffstat (limited to 'bindings/mono/examples')
-rw-r--r--bindings/mono/examples/IndicatorExample.cs36
-rw-r--r--bindings/mono/examples/Makefile.am12
-rwxr-xr-xbindings/mono/examples/indicator-example.in2
3 files changed, 50 insertions, 0 deletions
diff --git a/bindings/mono/examples/IndicatorExample.cs b/bindings/mono/examples/IndicatorExample.cs
new file mode 100644
index 0000000..0cb72a1
--- /dev/null
+++ b/bindings/mono/examples/IndicatorExample.cs
@@ -0,0 +1,36 @@
+using Gtk;
+using AppIndicator;
+
+public class IndicatorExample
+{
+ public static void Main ()
+ {
+ Application.Init ();
+
+ Window win = new Window ("Test");
+ win.Resize (200, 200);
+
+ Label label = new Label ();
+ label.Text = "Hello, world!";
+
+ win.Add (label);
+
+ ApplicationIndicator indicator = new ApplicationIndicator ("my-id",
+ "my-name",
+ Category.ApplicationStatus);
+
+ indicator.Status = Status.Attention;
+
+ /*
+ Menu menu = new Menu ();
+ menu.Append (new MenuItem ("Foo"));
+ menu.Append (new MenuItem ("Bar"));
+
+ indicator.Menu = menu;
+ */
+
+ win.ShowAll ();
+
+ Application.Run ();
+ }
+} \ No newline at end of file
diff --git a/bindings/mono/examples/Makefile.am b/bindings/mono/examples/Makefile.am
new file mode 100644
index 0000000..b929492
--- /dev/null
+++ b/bindings/mono/examples/Makefile.am
@@ -0,0 +1,12 @@
+ASSEMBLY = IndicatorExample.exe
+CSFILES = IndicatorExample.cs
+CLEANFILES = $(ASSEMBLY)
+
+EXTRA_DIST = $(CSFILES)
+
+references = $(GTK_SHARP_LIBS) -r:$(top_builddir)/bindings/mono/appindicator-sharp.dll
+
+$(ASSEMBLY): $(CSFILES) Makefile.am
+ $(CSC) $(CSFLAGS) -out:$(ASSEMBLY) -target:exe $(references) $(srcdir)/$(CSFILES)
+
+all: $(ASSEMBLY)
diff --git a/bindings/mono/examples/indicator-example.in b/bindings/mono/examples/indicator-example.in
new file mode 100755
index 0000000..3eca155
--- /dev/null
+++ b/bindings/mono/examples/indicator-example.in
@@ -0,0 +1,2 @@
+#!/bin/sh
+MONO_PATH=@top_builddir@/bindings/mono @top_builddir@/bindings/mono/examples/IndicatorExample.exe