bindings: Drop custom javascriptcore-4.0 and webkit2gtk-4.0 vapi
This commit is contained in:
parent
17551d17f6
commit
20cd9823a7
10 changed files with 7 additions and 306 deletions
|
|
@ -1,70 +0,0 @@
|
|||
# Custom VAPIs
|
||||
# NOTE: We can't directly use the dependencies returned by dependency() for
|
||||
# webkit2gtk (and the web extensions), since Meson then adds the packages from
|
||||
# the system directories. Since there might be conflicts with our custom VAPI's,
|
||||
# we need to glue pieces together. We satisfy GCC by looking up the relevant
|
||||
# include directories and we please the linker by using cc.find_library()
|
||||
|
||||
|
||||
girdir = gobject_introspection.get_pkgconfig_variable('girdir')
|
||||
webkit2gtk_include = include_directories(
|
||||
webkit2gtk_dep.get_pkgconfig_variable('includedir') + '/webkitgtk-4.0'
|
||||
)
|
||||
|
||||
javascriptcoregtk = declare_dependency(
|
||||
dependencies: [
|
||||
javascriptcoregtk_lib,
|
||||
javascriptcoregtk_vapi
|
||||
],
|
||||
include_directories: webkit2gtk_include
|
||||
)
|
||||
|
||||
webkit2gtk_vapi = gnome.generate_vapi('webkit2gtk-4.8',
|
||||
sources: join_paths(girdir, 'WebKit2-4.0.gir'),
|
||||
vapi_dirs: vapi_dir,
|
||||
metadata_dirs: metadata_dir,
|
||||
packages: [
|
||||
'gtk+-3.0',
|
||||
'libsoup-2.4',
|
||||
'javascriptcore-4.0',
|
||||
],
|
||||
)
|
||||
|
||||
webkit2gtk = declare_dependency(
|
||||
dependencies: [
|
||||
cc.find_library('webkit2gtk-4.0'),
|
||||
glib,
|
||||
gtk,
|
||||
javascriptcoregtk,
|
||||
libsoup,
|
||||
webkit2gtk_vapi
|
||||
],
|
||||
include_directories: webkit2gtk_include
|
||||
)
|
||||
|
||||
|
||||
webkit2gtk_web_extension_vapi = gnome.generate_vapi('webkit2gtk-web-extension-4.0',
|
||||
sources: [
|
||||
join_paths(girdir, 'WebKit2WebExtension-4.0.gir'),
|
||||
join_paths('metadata', 'WebKit2WebExtension-4.0-custom.vala'),
|
||||
],
|
||||
vapi_dirs: [vapi_dir, meson.current_build_dir()],
|
||||
metadata_dirs: metadata_dir,
|
||||
packages: [
|
||||
'gtk+-3.0',
|
||||
'libsoup-2.4',
|
||||
'javascriptcore-4.0',
|
||||
],
|
||||
)
|
||||
|
||||
webkit2gtk_web_extension = declare_dependency(
|
||||
dependencies: [
|
||||
cc.find_library('webkit2gtk-4.0'),
|
||||
glib,
|
||||
gtk,
|
||||
javascriptcoregtk,
|
||||
libsoup,
|
||||
webkit2gtk_web_extension_vapi,
|
||||
],
|
||||
include_directories: webkit2gtk_include
|
||||
)
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
AuthDomain.accepts skip
|
||||
AuthDomain.challenge skip
|
||||
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
|
||||
JavascriptResult
|
||||
.get_global_context nullable=false unowned=true
|
||||
.get_value nullable=false unowned=true
|
||||
|
||||
//Forward upstream
|
||||
Download
|
||||
.failed#signal.error type="WebKit.DownloadError"
|
||||
PrintCustomWidget
|
||||
.apply#signal skip
|
||||
.update#signal skip
|
||||
PrintOperation
|
||||
.failed#signal.error type="WebKit.PrintError"
|
||||
WebContext.initialize_notification_permissions#method skip
|
||||
WebResource
|
||||
.failed#signal.error type="GLib.Error"
|
||||
WebView
|
||||
.load_failed#signal.error type="GLib.Error"
|
||||
.show_option_menu#signal skip
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
namespace WebKit {
|
||||
namespace DOM {
|
||||
public delegate void EventTargetFunc (WebKit.DOM.EventTarget target, WebKit.DOM.Event event);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
DOM* parent="WebKit.DOM" name="DOM(.+)"
|
||||
|
||||
DOMEventTarget.add_event_listener skip
|
||||
_ContextMenu skip
|
||||
_ContextMenuItem skip
|
||||
|
||||
Frame.get_javascript_* nullable=false unowned=true
|
||||
|
||||
DOMEventTarget.add_event_listener_with_closure.handler type="owned WebKit.DOM.EventTargetFunc"
|
||||
|
|
@ -1,155 +0,0 @@
|
|||
/*
|
||||
* Copyright 2017 Michael Gratton <mike@vee.net>
|
||||
*
|
||||
* This software is licensed under the GNU Lesser General Public License
|
||||
* (version 2.1 or later). See the COPYING file in this distribution.
|
||||
*/
|
||||
|
||||
[CCode (cprefix = "JS",
|
||||
gir_namespace = "JavaScriptCore",
|
||||
gir_version = "4.0",
|
||||
lower_case_cprefix = "JS_",
|
||||
cheader_filename = "JavaScriptCore/JavaScript.h")]
|
||||
namespace JS {
|
||||
|
||||
[CCode (cname = "JSContextRef")]
|
||||
[SimpleType]
|
||||
public struct Context {
|
||||
|
||||
[CCode (cname = "JSEvaluateScript")]
|
||||
public Value evaluate_script(String script,
|
||||
Object? thisObject,
|
||||
String? sourceURL,
|
||||
int startingLineNumber,
|
||||
out Value? exception);
|
||||
|
||||
[CCode (cname = "JSCheckScriptSyntax")]
|
||||
public Value check_script_syntax(String script,
|
||||
String? sourceURL,
|
||||
int startingLineNumber,
|
||||
out Value? exception);
|
||||
|
||||
}
|
||||
|
||||
[CCode (cname = "JSGlobalContextRef")]
|
||||
[SimpleType]
|
||||
public struct GlobalContext : Context {
|
||||
|
||||
[CCode (cname = "JSGlobalContextRetain")]
|
||||
public bool retain();
|
||||
|
||||
[CCode (cname = "JSGlobalContextRelease")]
|
||||
public bool release();
|
||||
|
||||
}
|
||||
|
||||
[CCode (cname = "JSType", has_type_id = false)]
|
||||
public enum Type {
|
||||
|
||||
[CCode (cname = "kJSTypeUndefined")]
|
||||
UNDEFINED,
|
||||
|
||||
[CCode (cname = "kJSTypeNull")]
|
||||
NULL,
|
||||
|
||||
[CCode (cname = "kJSTypeBoolean")]
|
||||
BOOLEAN,
|
||||
|
||||
[CCode (cname = "kJSTypeNumber")]
|
||||
NUMBER,
|
||||
|
||||
[CCode (cname = "kJSTypeString")]
|
||||
STRING,
|
||||
|
||||
[CCode (cname = "kJSTypeObject")]
|
||||
OBJECT
|
||||
}
|
||||
|
||||
[CCode (cname = "JSObjectRef")]
|
||||
[SimpleType]
|
||||
public struct Object {
|
||||
|
||||
[CCode (cname = "JSObjectMakeFunction")]
|
||||
public Object.make_function(String? name,
|
||||
[CCode (array_length_pos=1.5)]
|
||||
String[]? parameterNames,
|
||||
String body,
|
||||
String? sourceURL,
|
||||
int startingLineNumber,
|
||||
out Value? exception);
|
||||
|
||||
[CCode (cname = "JSObjectCallAsFunction", instance_pos = 1.1)]
|
||||
public Value call_as_function(Context ctx,
|
||||
Object? thisObject,
|
||||
[CCode (array_length_pos=2.5)]
|
||||
Value[]? arguments,
|
||||
out Value? exception);
|
||||
|
||||
[CCode (cname = "JSObjectHasProperty", instance_pos = 1.1)]
|
||||
public bool has_property(Context ctx, String property_name);
|
||||
|
||||
[CCode (cname = "JSObjectGetProperty", instance_pos = 1.1)]
|
||||
public Value get_property(Context ctx,
|
||||
String property_name,
|
||||
out Value? exception);
|
||||
|
||||
}
|
||||
|
||||
[CCode (cname = "JSValueRef")]
|
||||
[SimpleType]
|
||||
public struct Value {
|
||||
|
||||
[CCode (cname = "JSValueGetType", instance_pos = 1.1)]
|
||||
public Type get_type(Context context);
|
||||
|
||||
[CCode (cname = "JSValueIsBoolean", instance_pos = 1.1)]
|
||||
public bool is_boolean(Context ctx);
|
||||
|
||||
[CCode (cname = "JSValueIsNumber", instance_pos = 1.1)]
|
||||
public bool is_number(Context ctx);
|
||||
|
||||
[CCode (cname = "JSValueIsObject", instance_pos = 1.1)]
|
||||
public bool is_object(Context ctx);
|
||||
|
||||
[CCode (cname = "JSValueIsString", instance_pos = 1.1)]
|
||||
public bool is_string(Context ctx);
|
||||
|
||||
[CCode (cname = "JSValueToBoolean", instance_pos = 1.1)]
|
||||
public bool to_boolean(Context ctx);
|
||||
|
||||
[CCode (cname = "JSValueToNumber", instance_pos = 1.1)]
|
||||
public double to_number(Context ctx, out Value exception);
|
||||
|
||||
[CCode (cname = "JSValueToObject", instance_pos = 1.1)]
|
||||
public Object to_object(Context ctx, out Value exception);
|
||||
|
||||
[CCode (cname = "JSValueToStringCopy", instance_pos = 1.1)]
|
||||
public String to_string_copy(Context ctx, out Value exception);
|
||||
|
||||
}
|
||||
|
||||
[CCode (cname = "JSStringRef")]
|
||||
[SimpleType]
|
||||
public struct String {
|
||||
|
||||
[CCode (cname = "JSStringCreateWithUTF8CString")]
|
||||
public String.create_with_utf8_cstring(string str);
|
||||
|
||||
[CCode (cname = "JSStringGetLength")]
|
||||
public int String.get_length();
|
||||
|
||||
[CCode (cname = "JSStringGetMaximumUTF8CStringSize")]
|
||||
public int String.get_maximum_utf8_cstring_size();
|
||||
|
||||
[CCode (cname = "JSStringGetUTF8CString")]
|
||||
public void String.get_utf8_cstring(string* buffer, int bufferSize);
|
||||
|
||||
[CCode (cname = "JSStringRetain")]
|
||||
public void String.retain();
|
||||
|
||||
[CCode (cname = "JSStringRelease")]
|
||||
public void String.release();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue