From 23d06b4e39d534f4e8e5b204223d3beb0ef547c8 Mon Sep 17 00:00:00 2001 From: Bamidev Date: Sun, 3 Mar 2024 00:40:48 +0100 Subject: [PATCH] Fixed C & linking errors for webkitgtk. --- c/build.rs | 3 +++ c/src/application.h | 3 ++- c/src/application/edge2.c | 6 +----- c/src/application/other.c | 9 +++++++++ 4 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 c/src/application/other.c diff --git a/c/build.rs b/c/build.rs index fccab8a..924ab32 100644 --- a/c/build.rs +++ b/c/build.rs @@ -401,6 +401,9 @@ fn main() { .file("src/window/win32.c") .file("src/cookie/unsupported.c"); } + else { + build.file("src/application/other.c"); + } /************************************** * All other source files diff --git a/c/src/application.h b/c/src/application.h index 1afdea1..0abcf4b 100644 --- a/c/src/application.h +++ b/c/src/application.h @@ -10,7 +10,7 @@ extern "C" { -struct bw_Application; +typedef struct bw_Application bw_Application; typedef void (*bw_ApplicationDispatchFn)( struct bw_Application* app, void* data ); typedef bw_ApplicationDispatchFn bw_ApplicationReadyFn; @@ -24,6 +24,7 @@ typedef bw_ApplicationDispatchFn bw_ApplicationReadyFn; #include "application/gtk.h" #elif defined(BW_CEF_WINDOW) #include "application/cef_window.h" +#else #define BW_OTHER_IMPL #endif diff --git a/c/src/application/edge2.c b/c/src/application/edge2.c index 22623d8..99c4f5a 100644 --- a/c/src/application/edge2.c +++ b/c/src/application/edge2.c @@ -4,13 +4,9 @@ #include -void bw_ApplicationEngineImpl_free( bw_ApplicationEngineImpl* ) { - -} +void bw_ApplicationEngineImpl_free( bw_ApplicationEngineImpl* ) {} bw_Err bw_ApplicationEngineImpl_initialize( bw_ApplicationEngineImpl* impl, bw_Application* app, int argc, char** argv, const bw_ApplicationSettings* settings ) { CoInitializeEx(NULL, COINIT_APARTMENTTHREADED); - - BW_ERR_RETURN_SUCCESS; } \ No newline at end of file diff --git a/c/src/application/other.c b/c/src/application/other.c new file mode 100644 index 0000000..8827d26 --- /dev/null +++ b/c/src/application/other.c @@ -0,0 +1,9 @@ + +#include "impl.h" + + +void bw_ApplicationEngineImpl_free( bw_ApplicationEngineImpl* ) {} + +bw_Err bw_ApplicationEngineImpl_initialize( bw_ApplicationEngineImpl* impl, bw_Application* app, int argc, char** argv, const bw_ApplicationSettings* settings ) { + BW_ERR_RETURN_SUCCESS; +} \ No newline at end of file