Coder Social home page Coder Social logo

freddycansic / nativefiledialog-cmake Goto Github PK

View Code? Open in Web Editor NEW

This project forked from exoskye/nativefiledialog-cmake

0.0 0.0 0.0 550 KB

A tiny, neat C library that portably invokes native file open and save dialogs.

License: zlib License

C++ 36.91% C 49.05% Objective-C 11.70% CMake 2.34%

nativefiledialog-cmake's Introduction

Native File Dialog CMake

In this fork I replaced Premake and other build system with CMake

For more information look at the original README.md

Example

An example of CMakeLists.txt

add_subdirectory(libs/nativefiledialog)
add_executable(mytarget main.cpp)
target_link_libraries(mytarget nativefiledialog)

and main.cpp

#include <nfd.h>
#include <stdio.h>
#include <stdlib.h>

int main( void )
{
    nfdchar_t *outPath = NULL;
    nfdresult_t result = NFD_OpenDialog( NULL, NULL, &outPath );
        
    if ( result == NFD_OKAY ) {
        puts("Success!");
        puts(outPath);
        free(outPath);
    }
    else if ( result == NFD_CANCEL ) {
        puts("User pressed cancel.");
    }
    else {
        printf("Error: %s\n", NFD_GetError() );
    }

    return 0;
}

See NFD.h for more options.

Screenshots

Windows 8 rendering an IFileOpenDialog GTK3 on Linux Cocoa on Yosemite

Changelog

release what's new date
1.0.0 initial oct 2014
1.1.0 premake5; scons deprecated aug 2016
1.1.1 mingw support, build fixes aug 2016
1.1.2 test_pickfolder() added aug 2016
1.1.3 zenity linux backend added nov 2017
1.1.3 fix char type in decls nov 2017
1.1.4 fix win32 memleaks dec 2018
1.1.4 improve win32 errorhandling dec 2018
1.1.4 macos fix focus bug dec 2018

nativefiledialog-cmake's People

Contributors

aarcangeli avatar ashkitten avatar dabbertorres avatar exoskye avatar extremeexploit avatar freddycansic avatar illusionman1212 avatar jgranick avatar minexew avatar mlabbe avatar mrsapps avatar therustmonk avatar wheybags avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.