adding sample/gio into the build
svn path=/trunk/gtk-sharp/; revision=126575
This commit is contained in:
parent
2a151534e7
commit
3b3af77895
5 changed files with 51 additions and 2 deletions
|
@ -269,6 +269,7 @@ sample/valtest/Makefile
|
|||
sample/valtest/valtest.exe.config
|
||||
sample/opaquetest/Makefile
|
||||
sample/opaquetest/opaquetest.exe.config
|
||||
sample/gio/Makefile
|
||||
])
|
||||
|
||||
if test "x$enable_mono_cairo" = "xyes"; then
|
||||
|
|
|
@ -11,7 +11,6 @@ glue_includes = gio/gio.h
|
|||
POLICY_VERSIONS=
|
||||
|
||||
sources = \
|
||||
AppInfoFactory.cs \
|
||||
FileFactory.cs \
|
||||
GioStream.cs
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
SUBDIRS = test GtkDemo pixmaps valtest opaquetest
|
||||
SUBDIRS = test GtkDemo pixmaps valtest opaquetest gio gtk-gio
|
||||
|
||||
if ENABLE_MONO_CAIRO
|
||||
cairo_ref=-r:$(top_builddir)/cairo/Mono.Cairo.dll
|
||||
|
|
30
sample/gio/AppInfo.cs
Normal file
30
sample/gio/AppInfo.cs
Normal file
|
@ -0,0 +1,30 @@
|
|||
using GLib;
|
||||
using System;
|
||||
|
||||
namespace TestGio
|
||||
{
|
||||
public class TestAppInfo
|
||||
{
|
||||
static void Main (string[] args)
|
||||
{
|
||||
if (args.Length != 1) {
|
||||
Console.WriteLine ("Usage: TestAppInfo mimetype");
|
||||
return;
|
||||
}
|
||||
GLib.GType.Init ();
|
||||
// Gtk.Application.Init ();
|
||||
Console.WriteLine ("Default Handler for {0}: {1}", args[0], AppInfoAdapter.GetDefaultForType (args[0], false).Name);
|
||||
Console.WriteLine();
|
||||
Console.WriteLine("List of all {0} handlers", args[0]);
|
||||
foreach (AppInfo appinfo in AppInfoAdapter.GetAllForType (args[0]))
|
||||
Console.WriteLine ("\t{0}: {1} {2}", appinfo.Name, appinfo.Executable, appinfo.Description);
|
||||
|
||||
AppInfo app_info = AppInfoAdapter.GetDefaultForType ("image/jpeg", false);
|
||||
Console.WriteLine ("{0}:\t{1}", app_info.Name, app_info.Description);
|
||||
|
||||
Console.WriteLine ("All installed AppInfos:");
|
||||
foreach (AppInfo appinfo in AppInfoAdapter.All)
|
||||
Console.WriteLine ("\t{0}: {1} ", appinfo.Name, appinfo.Executable);
|
||||
}
|
||||
}
|
||||
}
|
19
sample/gio/Makefile.am
Executable file
19
sample/gio/Makefile.am
Executable file
|
@ -0,0 +1,19 @@
|
|||
TARGETS = AppInfo.exe
|
||||
|
||||
DEBUGS = $(addsuffix .mdb, $(TARGETS))
|
||||
|
||||
assemblies = \
|
||||
$(top_builddir)/glib/glib-sharp.dll \
|
||||
$(top_builddir)/gio/gio-sharp.dll
|
||||
|
||||
references=$(addprefix /r:, $(assemblies))
|
||||
|
||||
noinst_SCRIPTS = $(TARGETS)
|
||||
CLEANFILES = $(TARGETS) $(DEBUGS)
|
||||
|
||||
.cs.exe: $(assemblies)
|
||||
$(CSC) /out:$@ $(references) $<
|
||||
|
||||
EXTRA_DIST = \
|
||||
AppInfo.cs
|
||||
|
Loading…
Reference in a new issue