From 8c86c21b2fcd2c62a1f70b6d553983991a066889 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Fri, 19 Sep 2008 23:51:01 -0400 Subject: Added preliminary support for Textadept on Windows. --- src/textadept.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/textadept.c') diff --git a/src/textadept.c b/src/textadept.c index 26bce179..6872e872 100644 --- a/src/textadept.c +++ b/src/textadept.c @@ -2,6 +2,11 @@ #include "textadept.h" +#ifdef WIN32 +#include "Windows.h" +#define strcasecmp _stricmp +#endif + #define signal(o, s, c) g_signal_connect(G_OBJECT(o), s, G_CALLBACK(c), 0) // Textadept @@ -72,6 +77,18 @@ int main(int argc, char **argv) { return 0; } +#ifdef WIN32 +int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR lpCmdLine, int) { + // TODO: lpCmdLine contains command line string, pass to Lua + gtk_init(0, NULL); + l_init(0, NULL, false); + create_ui(); + l_load_script("init.lua"); + gtk_main(); + return 0; +} +#endif + /** * Creates the user interface. * The UI consists of: -- cgit v1.2.3