From 59526b689303cde25721d0a1fdcafdb371fdddba Mon Sep 17 00:00:00 2001 From: Cody Russell Date: Sat, 12 Dec 2009 12:20:52 -0600 Subject: Initial stab at setting up test/example fu --- bindings/mono/examples/IndicatorExample.cs | 36 +++++++++++++++++++++++++++++ bindings/mono/examples/Makefile.am | 12 ++++++++++ bindings/mono/examples/indicator-example.in | 2 ++ 3 files changed, 50 insertions(+) create mode 100644 bindings/mono/examples/IndicatorExample.cs create mode 100644 bindings/mono/examples/Makefile.am create mode 100755 bindings/mono/examples/indicator-example.in (limited to 'bindings/mono/examples') 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..cb7f268 --- /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): + $(CSC) $(CSFLAGS) -out:$(ASSEMBLY) -target:exe $(references) $(CSFILES) + +all: $(ASSEMBLY) \ No newline at end of file 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 -- cgit v1.2.3 From bb6fa61d8ddc76486533f01ffa645e7894705f6c Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 14 Dec 2009 09:59:29 -0600 Subject: Looking for the assembly files in the right location. --- bindings/mono/examples/Makefile.am | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bindings/mono/examples') diff --git a/bindings/mono/examples/Makefile.am b/bindings/mono/examples/Makefile.am index cb7f268..b929492 100644 --- a/bindings/mono/examples/Makefile.am +++ b/bindings/mono/examples/Makefile.am @@ -6,7 +6,7 @@ EXTRA_DIST = $(CSFILES) references = $(GTK_SHARP_LIBS) -r:$(top_builddir)/bindings/mono/appindicator-sharp.dll -$(ASSEMBLY): - $(CSC) $(CSFLAGS) -out:$(ASSEMBLY) -target:exe $(references) $(CSFILES) +$(ASSEMBLY): $(CSFILES) Makefile.am + $(CSC) $(CSFLAGS) -out:$(ASSEMBLY) -target:exe $(references) $(srcdir)/$(CSFILES) -all: $(ASSEMBLY) \ No newline at end of file +all: $(ASSEMBLY) -- cgit v1.2.3