adding a null backend for nfd
This commit is contained in:
parent
d90d9276b2
commit
b89dcfd9e4
|
|
@ -31,15 +31,19 @@ pub fn build(b: *std.Build) void {
|
|||
});
|
||||
mod.linkSystemLibrary("ole32", .{});
|
||||
} else if (target.result.os.tag == .linux) {
|
||||
// mod.addCSourceFile(.{
|
||||
// .file = b.path("src/nfd_gtk.c"),
|
||||
// .flags = &.{},
|
||||
// });
|
||||
mod.addCSourceFile(.{
|
||||
.file = b.path("src/nfd_gtk.c"),
|
||||
.file = b.path("src/nfd_null.c"),
|
||||
.flags = &.{},
|
||||
});
|
||||
mod.linkSystemLibrary("gdk-3", .{});
|
||||
mod.linkSystemLibrary("atk-1.0", .{});
|
||||
mod.linkSystemLibrary("gtk-3", .{});
|
||||
mod.linkSystemLibrary("glib-2.0", .{});
|
||||
mod.linkSystemLibrary("gobject-2.0", .{});
|
||||
// mod.linkSystemLibrary("gdk-3", .{});
|
||||
// mod.linkSystemLibrary("atk-1.0", .{});
|
||||
// mod.linkSystemLibrary("gtk-3", .{});
|
||||
// mod.linkSystemLibrary("glib-2.0", .{});
|
||||
// mod.linkSystemLibrary("gobject-2.0", .{});
|
||||
}
|
||||
|
||||
const p2dep = b.dependency("p2", .{ .target = target, .optimize = optimize });
|
||||
|
|
|
|||
|
|
@ -0,0 +1,42 @@
|
|||
/*
|
||||
Native File Dialog
|
||||
|
||||
http://www.frogtoss.com/labs
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
#include "nfd.h"
|
||||
#include "nfd_common.h"
|
||||
|
||||
|
||||
const char INIT_FAIL_MSG[] = "gtk_init_check failed to initilaize GTK+";
|
||||
|
||||
nfdresult_t NFD_OpenDialog( const nfdchar_t *filterList,
|
||||
const nfdchar_t *defaultPath,
|
||||
nfdchar_t **outPath )
|
||||
{
|
||||
return NFD_CANCEL;
|
||||
}
|
||||
|
||||
|
||||
nfdresult_t NFD_OpenDialogMultiple( const nfdchar_t *filterList,
|
||||
const nfdchar_t *defaultPath,
|
||||
nfdpathset_t *outPaths )
|
||||
{
|
||||
return NFD_CANCEL;
|
||||
}
|
||||
|
||||
nfdresult_t NFD_SaveDialog( const nfdchar_t *filterList,
|
||||
const nfdchar_t *defaultPath,
|
||||
nfdchar_t **outPath )
|
||||
{
|
||||
return NFD_CANCEL;
|
||||
}
|
||||
|
||||
nfdresult_t NFD_PickFolder(const nfdchar_t *defaultPath,
|
||||
nfdchar_t **outPath)
|
||||
{
|
||||
return NFD_CANCEL;
|
||||
}
|
||||
Loading…
Reference in New Issue