pub const __DARWIN_C_FULL: u32 = 900000;
pub const EFAULT: u32 = 14;
pub const EWOULDBLOCK: u32 = 35;
pub const EMULTIHOP: u32 = 95;
pub const EQFULL: u32 = 106;
pub const ULONG_MAX: i32 = -1;
pub const ULLONG_MAX: i32 = -1;
pub const RLIMIT_THREAD_CPULIMITS: u32 = 3;
pub const WAKEMON_SET_DEFAULTS: u32 = 8;
pub const IOPOL_DEFAULT: u32 = 0;
pub const TARGET_OS_SIMULATOR: u32 = 0;
pub const TARGET_IPHONE_SIMULATOR: u32 = 0;
pub const MACH_PORT_NULL: u32 = 0;
pub const MACH_PORT_QLIMIT_DEFAULT: u32 = 5;
pub const _POSIX_PRIORITY_SCHEDULING: i32 = -1;
pub const _POSIX_THREAD_PRIORITY_SCHEDULING: i32 = -1;
pub const _SC_PRIORITY_SCHEDULING: u32 = 35;
pub const _SC_THREAD_PRIORITY_SCHEDULING: u32 = 89;
pub const F_ULOCK: u32 = 0;
pub const SYNC_VOLUME_FULLSYNC: u32 = 1;
pub const F_FULLFSYNC: u32 = 51;
pub const DISPATCH_QUEUE_PRIORITY_DEFAULT: u32 = 0;
pub const KERN_DEFAULT_SET: u32 = 31;
pub const MACH_MSGH_BITS_CIRCULAR: u32 = 268435456;
pub const MACH_RCV_TRAILER_NULL: u32 = 0;
pub const KAUTH_EXTLOOKUP_RESULT: u32 = 1;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OpaqueJSContextGroup {
_unused: [u8; 0],
}
pub type JSContextGroupRef = *const OpaqueJSContextGroup;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OpaqueJSContext {
_unused: [u8; 0],
}
pub type JSContextRef = *const OpaqueJSContext;
pub type JSGlobalContextRef = *mut OpaqueJSContext;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OpaqueJSString {
_unused: [u8; 0],
}
pub type JSStringRef = *mut OpaqueJSString;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OpaqueJSClass {
_unused: [u8; 0],
}
pub type JSClassRef = *mut OpaqueJSClass;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OpaqueJSPropertyNameArray {
_unused: [u8; 0],
}
pub type JSPropertyNameArrayRef = *mut OpaqueJSPropertyNameArray;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OpaqueJSPropertyNameAccumulator {
_unused: [u8; 0],
}
pub type JSPropertyNameAccumulatorRef = *mut OpaqueJSPropertyNameAccumulator;
pub type JSTypedArrayBytesDeallocator = ::std::option::Option<
unsafe extern "C" fn(
bytes: *mut ::std::os::raw::c_void,
deallocatorContext: *mut ::std::os::raw::c_void,
),
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OpaqueJSValue {
_unused: [u8; 0],
}
pub type JSValueRef = *const OpaqueJSValue;
pub type JSObjectRef = *mut OpaqueJSValue;
extern "C" {
#[link_name = "\u{1}_JSEvaluateScript"]
pub fn JSEvaluateScript(
ctx: JSContextRef,
script: JSStringRef,
thisObject: JSObjectRef,
sourceURL: JSStringRef,
startingLineNumber: ::std::os::raw::c_int,
exception: *mut JSValueRef,
) -> JSValueRef;
}
extern "C" {
#[link_name = "\u{1}_JSCheckScriptSyntax"]
pub fn JSCheckScriptSyntax(
ctx: JSContextRef,
script: JSStringRef,
sourceURL: JSStringRef,
startingLineNumber: ::std::os::raw::c_int,
exception: *mut JSValueRef,
) -> bool;
}
extern "C" {
#[link_name = "\u{1}_JSGarbageCollect"]
pub fn JSGarbageCollect(ctx: JSContextRef);
}
pub const QOS_CLASS_USER_INTERACTIVE: _bindgen_ty_37 = 33;
pub const QOS_CLASS_USER_INITIATED: _bindgen_ty_37 = 25;
pub const QOS_CLASS_DEFAULT: _bindgen_ty_37 = 21;
pub const QOS_CLASS_UTILITY: _bindgen_ty_37 = 17;
pub const QOS_CLASS_BACKGROUND: _bindgen_ty_37 = 9;
pub const QOS_CLASS_UNSPECIFIED: _bindgen_ty_37 = 0;
pub type _bindgen_ty_37 = u32;
pub const JSType_kJSTypeUndefined: JSType = 0;
pub const JSType_kJSTypeNull: JSType = 1;
pub const JSType_kJSTypeBoolean: JSType = 2;
pub const JSType_kJSTypeNumber: JSType = 3;
pub const JSType_kJSTypeString: JSType = 4;
pub const JSType_kJSTypeObject: JSType = 5;
pub type JSType = u32;
pub const JSTypedArrayType_kJSTypedArrayTypeInt8Array: JSTypedArrayType = 0;
pub const JSTypedArrayType_kJSTypedArrayTypeInt16Array: JSTypedArrayType = 1;
pub const JSTypedArrayType_kJSTypedArrayTypeInt32Array: JSTypedArrayType = 2;
pub const JSTypedArrayType_kJSTypedArrayTypeUint8Array: JSTypedArrayType = 3;
pub const JSTypedArrayType_kJSTypedArrayTypeUint8ClampedArray: JSTypedArrayType = 4;
pub const JSTypedArrayType_kJSTypedArrayTypeUint16Array: JSTypedArrayType = 5;
pub const JSTypedArrayType_kJSTypedArrayTypeUint32Array: JSTypedArrayType = 6;
pub const JSTypedArrayType_kJSTypedArrayTypeFloat32Array: JSTypedArrayType = 7;
pub const JSTypedArrayType_kJSTypedArrayTypeFloat64Array: JSTypedArrayType = 8;
pub const JSTypedArrayType_kJSTypedArrayTypeArrayBuffer: JSTypedArrayType = 9;
pub const JSTypedArrayType_kJSTypedArrayTypeNone: JSTypedArrayType = 10;
pub type JSTypedArrayType = u32;
extern "C" {
#[link_name = "\u{1}_JSValueGetType"]
pub fn JSValueGetType(ctx: JSContextRef, value: JSValueRef) -> JSType;
}
extern "C" {
#[link_name = "\u{1}_JSValueIsUndefined"]
pub fn JSValueIsUndefined(ctx: JSContextRef, value: JSValueRef) -> bool;
}
extern "C" {
#[link_name = "\u{1}_JSValueIsNull"]
pub fn JSValueIsNull(ctx: JSContextRef, value: JSValueRef) -> bool;
}
extern "C" {
#[link_name = "\u{1}_JSValueIsBoolean"]
pub fn JSValueIsBoolean(ctx: JSContextRef, value: JSValueRef) -> bool;
}
extern "C" {
#[link_name = "\u{1}_JSValueIsNumber"]
pub fn JSValueIsNumber(ctx: JSContextRef, value: JSValueRef) -> bool;
}
extern "C" {
#[link_name = "\u{1}_JSValueIsString"]
pub fn JSValueIsString(ctx: JSContextRef, value: JSValueRef) -> bool;
}
extern "C" {
#[link_name = "\u{1}_JSValueIsObject"]
pub fn JSValueIsObject(ctx: JSContextRef, value: JSValueRef) -> bool;
}
extern "C" {
#[link_name = "\u{1}_JSValueIsObjectOfClass"]
pub fn JSValueIsObjectOfClass(
ctx: JSContextRef,
value: JSValueRef,
jsClass: JSClassRef,
) -> bool;
}
extern "C" {
#[link_name = "\u{1}_JSValueIsArray"]
pub fn JSValueIsArray(ctx: JSContextRef, value: JSValueRef) -> bool;
}
extern "C" {
#[link_name = "\u{1}_JSValueIsDate"]
pub fn JSValueIsDate(ctx: JSContextRef, value: JSValueRef) -> bool;
}
extern "C" {
#[link_name = "\u{1}_JSValueGetTypedArrayType"]
pub fn JSValueGetTypedArrayType(
ctx: JSContextRef,
value: JSValueRef,
exception: *mut JSValueRef,
) -> JSTypedArrayType;
}
extern "C" {
#[link_name = "\u{1}_JSValueIsEqual"]
pub fn JSValueIsEqual(
ctx: JSContextRef,
a: JSValueRef,
b: JSValueRef,
exception: *mut JSValueRef,
) -> bool;
}
extern "C" {
#[link_name = "\u{1}_JSValueIsStrictEqual"]
pub fn JSValueIsStrictEqual(ctx: JSContextRef, a: JSValueRef, b: JSValueRef) -> bool;
}
extern "C" {
#[link_name = "\u{1}_JSValueIsInstanceOfConstructor"]
pub fn JSValueIsInstanceOfConstructor(
ctx: JSContextRef,
value: JSValueRef,
constructor: JSObjectRef,
exception: *mut JSValueRef,
) -> bool;
}
extern "C" {
#[link_name = "\u{1}_JSValueMakeUndefined"]
pub fn JSValueMakeUndefined(ctx: JSContextRef) -> JSValueRef;
}
extern "C" {
#[link_name = "\u{1}_JSValueMakeNull"]
pub fn JSValueMakeNull(ctx: JSContextRef) -> JSValueRef;
}
extern "C" {
#[link_name = "\u{1}_JSValueMakeBoolean"]
pub fn JSValueMakeBoolean(ctx: JSContextRef, boolean: bool) -> JSValueRef;
}
extern "C" {
#[link_name = "\u{1}_JSValueMakeNumber"]
pub fn JSValueMakeNumber(ctx: JSContextRef, number: f64) -> JSValueRef;
}
extern "C" {
#[link_name = "\u{1}_JSValueMakeString"]
pub fn JSValueMakeString(ctx: JSContextRef, string: JSStringRef) -> JSValueRef;
}
extern "C" {
#[link_name = "\u{1}_JSValueMakeFromJSONString"]
pub fn JSValueMakeFromJSONString(ctx: JSContextRef, string: JSStringRef) -> JSValueRef;
}
extern "C" {
#[link_name = "\u{1}_JSValueCreateJSONString"]
pub fn JSValueCreateJSONString(
ctx: JSContextRef,
value: JSValueRef,
indent: ::std::os::raw::c_uint,
exception: *mut JSValueRef,
) -> JSStringRef;
}
extern "C" {
#[link_name = "\u{1}_JSValueToBoolean"]
pub fn JSValueToBoolean(ctx: JSContextRef, value: JSValueRef) -> bool;
}
extern "C" {
#[link_name = "\u{1}_JSValueToNumber"]
pub fn JSValueToNumber(ctx: JSContextRef, value: JSValueRef, exception: *mut JSValueRef)
-> f64;
}
extern "C" {
#[link_name = "\u{1}_JSValueToStringCopy"]
pub fn JSValueToStringCopy(
ctx: JSContextRef,
value: JSValueRef,
exception: *mut JSValueRef,
) -> JSStringRef;
}
extern "C" {
#[link_name = "\u{1}_JSValueToObject"]
pub fn JSValueToObject(
ctx: JSContextRef,
value: JSValueRef,
exception: *mut JSValueRef,
) -> JSObjectRef;
}
extern "C" {
#[link_name = "\u{1}_JSValueProtect"]
pub fn JSValueProtect(ctx: JSContextRef, value: JSValueRef);
}
extern "C" {
#[link_name = "\u{1}_JSValueUnprotect"]
pub fn JSValueUnprotect(ctx: JSContextRef, value: JSValueRef);
}
pub const kJSPropertyAttributeNone: _bindgen_ty_64 = 0;
pub const kJSPropertyAttributeReadOnly: _bindgen_ty_64 = 2;
pub const kJSPropertyAttributeDontEnum: _bindgen_ty_64 = 4;
pub const kJSPropertyAttributeDontDelete: _bindgen_ty_64 = 8;
pub type _bindgen_ty_64 = u32;
pub type JSPropertyAttributes = ::std::os::raw::c_uint;
pub const kJSClassAttributeNone: _bindgen_ty_65 = 0;
pub const kJSClassAttributeNoAutomaticPrototype: _bindgen_ty_65 = 2;
pub type _bindgen_ty_65 = u32;
pub type JSClassAttributes = ::std::os::raw::c_uint;
pub type JSObjectInitializeCallback =
::std::option::Option<unsafe extern "C" fn(ctx: JSContextRef, object: JSObjectRef)>;
pub type JSObjectFinalizeCallback =
::std::option::Option<unsafe extern "C" fn(object: JSObjectRef)>;
pub type JSObjectHasPropertyCallback = ::std::option::Option<
unsafe extern "C" fn(ctx: JSContextRef, object: JSObjectRef, propertyName: JSStringRef) -> bool,
>;
pub type JSObjectGetPropertyCallback = ::std::option::Option<
unsafe extern "C" fn(
ctx: JSContextRef,
object: JSObjectRef,
propertyName: JSStringRef,
exception: *mut JSValueRef,
) -> JSValueRef,
>;
pub type JSObjectSetPropertyCallback = ::std::option::Option<
unsafe extern "C" fn(
ctx: JSContextRef,
object: JSObjectRef,
propertyName: JSStringRef,
value: JSValueRef,
exception: *mut JSValueRef,
) -> bool,
>;
pub type JSObjectDeletePropertyCallback = ::std::option::Option<
unsafe extern "C" fn(
ctx: JSContextRef,
object: JSObjectRef,
propertyName: JSStringRef,
exception: *mut JSValueRef,
) -> bool,
>;
pub type JSObjectGetPropertyNamesCallback = ::std::option::Option<
unsafe extern "C" fn(
ctx: JSContextRef,
object: JSObjectRef,
propertyNames: JSPropertyNameAccumulatorRef,
),
>;
pub type JSObjectCallAsFunctionCallback = ::std::option::Option<
unsafe extern "C" fn(
ctx: JSContextRef,
function: JSObjectRef,
thisObject: JSObjectRef,
argumentCount: usize,
arguments: *const JSValueRef,
exception: *mut JSValueRef,
) -> JSValueRef,
>;
pub type JSObjectCallAsConstructorCallback = ::std::option::Option<
unsafe extern "C" fn(
ctx: JSContextRef,
constructor: JSObjectRef,
argumentCount: usize,
arguments: *const JSValueRef,
exception: *mut JSValueRef,
) -> JSObjectRef,
>;
pub type JSObjectHasInstanceCallback = ::std::option::Option<
unsafe extern "C" fn(
ctx: JSContextRef,
constructor: JSObjectRef,
possibleInstance: JSValueRef,
exception: *mut JSValueRef,
) -> bool,
>;
pub type JSObjectConvertToTypeCallback = ::std::option::Option<
unsafe extern "C" fn(
ctx: JSContextRef,
object: JSObjectRef,
type_: JSType,
exception: *mut JSValueRef,
) -> JSValueRef,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JSStaticValue {
pub name: *const ::std::os::raw::c_char,
pub getProperty: JSObjectGetPropertyCallback,
pub setProperty: JSObjectSetPropertyCallback,
pub attributes: JSPropertyAttributes,
}
#[test]
fn bindgen_test_layout_JSStaticValue() {
assert_eq!(
::std::mem::size_of::<JSStaticValue>(),
32usize,
concat!("Size of: ", stringify!(JSStaticValue))
);
assert_eq!(
::std::mem::align_of::<JSStaticValue>(),
8usize,
concat!("Alignment of ", stringify!(JSStaticValue))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JSStaticValue>())).name as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(JSStaticValue),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JSStaticValue>())).getProperty as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(JSStaticValue),
"::",
stringify!(getProperty)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JSStaticValue>())).setProperty as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(JSStaticValue),
"::",
stringify!(setProperty)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JSStaticValue>())).attributes as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(JSStaticValue),
"::",
stringify!(attributes)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JSStaticFunction {
pub name: *const ::std::os::raw::c_char,
pub callAsFunction: JSObjectCallAsFunctionCallback,
pub attributes: JSPropertyAttributes,
}
#[test]
fn bindgen_test_layout_JSStaticFunction() {
assert_eq!(
::std::mem::size_of::<JSStaticFunction>(),
24usize,
concat!("Size of: ", stringify!(JSStaticFunction))
);
assert_eq!(
::std::mem::align_of::<JSStaticFunction>(),
8usize,
concat!("Alignment of ", stringify!(JSStaticFunction))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JSStaticFunction>())).name as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(JSStaticFunction),
"::",
stringify!(name)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JSStaticFunction>())).callAsFunction as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(JSStaticFunction),
"::",
stringify!(callAsFunction)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JSStaticFunction>())).attributes as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(JSStaticFunction),
"::",
stringify!(attributes)
)
);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct JSClassDefinition {
pub version: ::std::os::raw::c_int,
pub attributes: JSClassAttributes,
pub className: *const ::std::os::raw::c_char,
pub parentClass: JSClassRef,
pub staticValues: *const JSStaticValue,
pub staticFunctions: *const JSStaticFunction,
pub initialize: JSObjectInitializeCallback,
pub finalize: JSObjectFinalizeCallback,
pub hasProperty: JSObjectHasPropertyCallback,
pub getProperty: JSObjectGetPropertyCallback,
pub setProperty: JSObjectSetPropertyCallback,
pub deleteProperty: JSObjectDeletePropertyCallback,
pub getPropertyNames: JSObjectGetPropertyNamesCallback,
pub callAsFunction: JSObjectCallAsFunctionCallback,
pub callAsConstructor: JSObjectCallAsConstructorCallback,
pub hasInstance: JSObjectHasInstanceCallback,
pub convertToType: JSObjectConvertToTypeCallback,
}
#[test]
fn bindgen_test_layout_JSClassDefinition() {
assert_eq!(
::std::mem::size_of::<JSClassDefinition>(),
128usize,
concat!("Size of: ", stringify!(JSClassDefinition))
);
assert_eq!(
::std::mem::align_of::<JSClassDefinition>(),
8usize,
concat!("Alignment of ", stringify!(JSClassDefinition))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JSClassDefinition>())).version as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(JSClassDefinition),
"::",
stringify!(version)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JSClassDefinition>())).attributes as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(JSClassDefinition),
"::",
stringify!(attributes)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JSClassDefinition>())).className as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(JSClassDefinition),
"::",
stringify!(className)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JSClassDefinition>())).parentClass as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(JSClassDefinition),
"::",
stringify!(parentClass)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JSClassDefinition>())).staticValues as *const _ as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(JSClassDefinition),
"::",
stringify!(staticValues)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<JSClassDefinition>())).staticFunctions as *const _ as usize
},
32usize,
concat!(
"Offset of field: ",
stringify!(JSClassDefinition),
"::",
stringify!(staticFunctions)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JSClassDefinition>())).initialize as *const _ as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(JSClassDefinition),
"::",
stringify!(initialize)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JSClassDefinition>())).finalize as *const _ as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(JSClassDefinition),
"::",
stringify!(finalize)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JSClassDefinition>())).hasProperty as *const _ as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(JSClassDefinition),
"::",
stringify!(hasProperty)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JSClassDefinition>())).getProperty as *const _ as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(JSClassDefinition),
"::",
stringify!(getProperty)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JSClassDefinition>())).setProperty as *const _ as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(JSClassDefinition),
"::",
stringify!(setProperty)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<JSClassDefinition>())).deleteProperty as *const _ as usize
},
80usize,
concat!(
"Offset of field: ",
stringify!(JSClassDefinition),
"::",
stringify!(deleteProperty)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<JSClassDefinition>())).getPropertyNames as *const _ as usize
},
88usize,
concat!(
"Offset of field: ",
stringify!(JSClassDefinition),
"::",
stringify!(getPropertyNames)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<JSClassDefinition>())).callAsFunction as *const _ as usize
},
96usize,
concat!(
"Offset of field: ",
stringify!(JSClassDefinition),
"::",
stringify!(callAsFunction)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<JSClassDefinition>())).callAsConstructor as *const _ as usize
},
104usize,
concat!(
"Offset of field: ",
stringify!(JSClassDefinition),
"::",
stringify!(callAsConstructor)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JSClassDefinition>())).hasInstance as *const _ as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(JSClassDefinition),
"::",
stringify!(hasInstance)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<JSClassDefinition>())).convertToType as *const _ as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(JSClassDefinition),
"::",
stringify!(convertToType)
)
);
}
extern "C" {
#[link_name = "\u{1}_kJSClassDefinitionEmpty"]
pub static kJSClassDefinitionEmpty: JSClassDefinition;
}
extern "C" {
#[link_name = "\u{1}_JSClassCreate"]
pub fn JSClassCreate(definition: *const JSClassDefinition) -> JSClassRef;
}
extern "C" {
#[link_name = "\u{1}_JSClassRetain"]
pub fn JSClassRetain(jsClass: JSClassRef) -> JSClassRef;
}
extern "C" {
#[link_name = "\u{1}_JSClassRelease"]
pub fn JSClassRelease(jsClass: JSClassRef);
}
extern "C" {
#[link_name = "\u{1}_JSObjectMake"]
pub fn JSObjectMake(
ctx: JSContextRef,
jsClass: JSClassRef,
data: *mut ::std::os::raw::c_void,
) -> JSObjectRef;
}
extern "C" {
#[link_name = "\u{1}_JSObjectMakeFunctionWithCallback"]
pub fn JSObjectMakeFunctionWithCallback(
ctx: JSContextRef,
name: JSStringRef,
callAsFunction: JSObjectCallAsFunctionCallback,
) -> JSObjectRef;
}
extern "C" {
#[link_name = "\u{1}_JSObjectMakeConstructor"]
pub fn JSObjectMakeConstructor(
ctx: JSContextRef,
jsClass: JSClassRef,
callAsConstructor: JSObjectCallAsConstructorCallback,
) -> JSObjectRef;
}
extern "C" {
#[link_name = "\u{1}_JSObjectMakeArray"]
pub fn JSObjectMakeArray(
ctx: JSContextRef,
argumentCount: usize,
arguments: *const JSValueRef,
exception: *mut JSValueRef,
) -> JSObjectRef;
}
extern "C" {
#[link_name = "\u{1}_JSObjectMakeDate"]
pub fn JSObjectMakeDate(
ctx: JSContextRef,
argumentCount: usize,
arguments: *const JSValueRef,
exception: *mut JSValueRef,
) -> JSObjectRef;
}
extern "C" {
#[link_name = "\u{1}_JSObjectMakeError"]
pub fn JSObjectMakeError(
ctx: JSContextRef,
argumentCount: usize,
arguments: *const JSValueRef,
exception: *mut JSValueRef,
) -> JSObjectRef;
}
extern "C" {
#[link_name = "\u{1}_JSObjectMakeRegExp"]
pub fn JSObjectMakeRegExp(
ctx: JSContextRef,
argumentCount: usize,
arguments: *const JSValueRef,
exception: *mut JSValueRef,
) -> JSObjectRef;
}
extern "C" {
#[link_name = "\u{1}_JSObjectMakeFunction"]
pub fn JSObjectMakeFunction(
ctx: JSContextRef,
name: JSStringRef,
parameterCount: ::std::os::raw::c_uint,
parameterNames: *const JSStringRef,
body: JSStringRef,
sourceURL: JSStringRef,
startingLineNumber: ::std::os::raw::c_int,
exception: *mut JSValueRef,
) -> JSObjectRef;
}
extern "C" {
#[link_name = "\u{1}_JSObjectGetPrototype"]
pub fn JSObjectGetPrototype(ctx: JSContextRef, object: JSObjectRef) -> JSValueRef;
}
extern "C" {
#[link_name = "\u{1}_JSObjectSetPrototype"]
pub fn JSObjectSetPrototype(ctx: JSContextRef, object: JSObjectRef, value: JSValueRef);
}
extern "C" {
#[link_name = "\u{1}_JSObjectHasProperty"]
pub fn JSObjectHasProperty(
ctx: JSContextRef,
object: JSObjectRef,
propertyName: JSStringRef,
) -> bool;
}
extern "C" {
#[link_name = "\u{1}_JSObjectGetProperty"]
pub fn JSObjectGetProperty(
ctx: JSContextRef,
object: JSObjectRef,
propertyName: JSStringRef,
exception: *mut JSValueRef,
) -> JSValueRef;
}
extern "C" {
#[link_name = "\u{1}_JSObjectSetProperty"]
pub fn JSObjectSetProperty(
ctx: JSContextRef,
object: JSObjectRef,
propertyName: JSStringRef,
value: JSValueRef,
attributes: JSPropertyAttributes,
exception: *mut JSValueRef,
);
}
extern "C" {
#[link_name = "\u{1}_JSObjectDeleteProperty"]
pub fn JSObjectDeleteProperty(
ctx: JSContextRef,
object: JSObjectRef,
propertyName: JSStringRef,
exception: *mut JSValueRef,
) -> bool;
}
extern "C" {
#[link_name = "\u{1}_JSObjectGetPropertyAtIndex"]
pub fn JSObjectGetPropertyAtIndex(
ctx: JSContextRef,
object: JSObjectRef,
propertyIndex: ::std::os::raw::c_uint,
exception: *mut JSValueRef,
) -> JSValueRef;
}
extern "C" {
#[link_name = "\u{1}_JSObjectSetPropertyAtIndex"]
pub fn JSObjectSetPropertyAtIndex(
ctx: JSContextRef,
object: JSObjectRef,
propertyIndex: ::std::os::raw::c_uint,
value: JSValueRef,
exception: *mut JSValueRef,
);
}
extern "C" {
#[link_name = "\u{1}_JSObjectGetPrivate"]
pub fn JSObjectGetPrivate(object: JSObjectRef) -> *mut ::std::os::raw::c_void;
}
extern "C" {
#[link_name = "\u{1}_JSObjectSetPrivate"]
pub fn JSObjectSetPrivate(object: JSObjectRef, data: *mut ::std::os::raw::c_void) -> bool;
}
extern "C" {
#[link_name = "\u{1}_JSObjectIsFunction"]
pub fn JSObjectIsFunction(ctx: JSContextRef, object: JSObjectRef) -> bool;
}
extern "C" {
#[link_name = "\u{1}_JSObjectCallAsFunction"]
pub fn JSObjectCallAsFunction(
ctx: JSContextRef,
object: JSObjectRef,
thisObject: JSObjectRef,
argumentCount: usize,
arguments: *const JSValueRef,
exception: *mut JSValueRef,
) -> JSValueRef;
}
extern "C" {
#[link_name = "\u{1}_JSObjectIsConstructor"]
pub fn JSObjectIsConstructor(ctx: JSContextRef, object: JSObjectRef) -> bool;
}
extern "C" {
#[link_name = "\u{1}_JSObjectCallAsConstructor"]
pub fn JSObjectCallAsConstructor(
ctx: JSContextRef,
object: JSObjectRef,
argumentCount: usize,
arguments: *const JSValueRef,
exception: *mut JSValueRef,
) -> JSObjectRef;
}
extern "C" {
#[link_name = "\u{1}_JSObjectCopyPropertyNames"]
pub fn JSObjectCopyPropertyNames(
ctx: JSContextRef,
object: JSObjectRef,
) -> JSPropertyNameArrayRef;
}
extern "C" {
#[link_name = "\u{1}_JSPropertyNameArrayRetain"]
pub fn JSPropertyNameArrayRetain(array: JSPropertyNameArrayRef) -> JSPropertyNameArrayRef;
}
extern "C" {
#[link_name = "\u{1}_JSPropertyNameArrayRelease"]
pub fn JSPropertyNameArrayRelease(array: JSPropertyNameArrayRef);
}
extern "C" {
#[link_name = "\u{1}_JSPropertyNameArrayGetCount"]
pub fn JSPropertyNameArrayGetCount(array: JSPropertyNameArrayRef) -> usize;
}
extern "C" {
#[link_name = "\u{1}_JSPropertyNameArrayGetNameAtIndex"]
pub fn JSPropertyNameArrayGetNameAtIndex(
array: JSPropertyNameArrayRef,
index: usize,
) -> JSStringRef;
}
extern "C" {
#[link_name = "\u{1}_JSPropertyNameAccumulatorAddName"]
pub fn JSPropertyNameAccumulatorAddName(
accumulator: JSPropertyNameAccumulatorRef,
propertyName: JSStringRef,
);
}
extern "C" {
#[link_name = "\u{1}_JSContextGroupCreate"]
pub fn JSContextGroupCreate() -> JSContextGroupRef;
}
extern "C" {
#[link_name = "\u{1}_JSContextGroupRetain"]
pub fn JSContextGroupRetain(group: JSContextGroupRef) -> JSContextGroupRef;
}
extern "C" {
#[link_name = "\u{1}_JSContextGroupRelease"]
pub fn JSContextGroupRelease(group: JSContextGroupRef);
}
extern "C" {
#[link_name = "\u{1}_JSGlobalContextCreate"]
pub fn JSGlobalContextCreate(globalObjectClass: JSClassRef) -> JSGlobalContextRef;
}
extern "C" {
#[link_name = "\u{1}_JSGlobalContextCreateInGroup"]
pub fn JSGlobalContextCreateInGroup(
group: JSContextGroupRef,
globalObjectClass: JSClassRef,
) -> JSGlobalContextRef;
}
extern "C" {
#[link_name = "\u{1}_JSGlobalContextRetain"]
pub fn JSGlobalContextRetain(ctx: JSGlobalContextRef) -> JSGlobalContextRef;
}
extern "C" {
#[link_name = "\u{1}_JSGlobalContextRelease"]
pub fn JSGlobalContextRelease(ctx: JSGlobalContextRef);
}
extern "C" {
#[link_name = "\u{1}_JSContextGetGlobalObject"]
pub fn JSContextGetGlobalObject(ctx: JSContextRef) -> JSObjectRef;
}
extern "C" {
#[link_name = "\u{1}_JSContextGetGroup"]
pub fn JSContextGetGroup(ctx: JSContextRef) -> JSContextGroupRef;
}
extern "C" {
#[link_name = "\u{1}_JSContextGetGlobalContext"]
pub fn JSContextGetGlobalContext(ctx: JSContextRef) -> JSGlobalContextRef;
}
extern "C" {
#[link_name = "\u{1}_JSGlobalContextCopyName"]
pub fn JSGlobalContextCopyName(ctx: JSGlobalContextRef) -> JSStringRef;
}
extern "C" {
#[link_name = "\u{1}_JSGlobalContextSetName"]
pub fn JSGlobalContextSetName(ctx: JSGlobalContextRef, name: JSStringRef);
}
pub type JSChar = ::std::os::raw::c_ushort;
extern "C" {
#[link_name = "\u{1}_JSStringCreateWithCharacters"]
pub fn JSStringCreateWithCharacters(chars: *const JSChar, numChars: usize) -> JSStringRef;
}
extern "C" {
#[link_name = "\u{1}_JSStringCreateWithUTF8CString"]
pub fn JSStringCreateWithUTF8CString(string: *const ::std::os::raw::c_char) -> JSStringRef;
}
extern "C" {
#[link_name = "\u{1}_JSStringRetain"]
pub fn JSStringRetain(string: JSStringRef) -> JSStringRef;
}
extern "C" {
#[link_name = "\u{1}_JSStringRelease"]
pub fn JSStringRelease(string: JSStringRef);
}
extern "C" {
#[link_name = "\u{1}_JSStringGetLength"]
pub fn JSStringGetLength(string: JSStringRef) -> usize;
}
extern "C" {
#[link_name = "\u{1}_JSStringGetCharactersPtr"]
pub fn JSStringGetCharactersPtr(string: JSStringRef) -> *const JSChar;
}
extern "C" {
#[link_name = "\u{1}_JSStringGetMaximumUTF8CStringSize"]
pub fn JSStringGetMaximumUTF8CStringSize(string: JSStringRef) -> usize;
}
extern "C" {
#[link_name = "\u{1}_JSStringGetUTF8CString"]
pub fn JSStringGetUTF8CString(
string: JSStringRef,
buffer: *mut ::std::os::raw::c_char,
bufferSize: usize,
) -> usize;
}
extern "C" {
#[link_name = "\u{1}_JSStringIsEqual"]
pub fn JSStringIsEqual(a: JSStringRef, b: JSStringRef) -> bool;
}
extern "C" {
#[link_name = "\u{1}_JSStringIsEqualToUTF8CString"]
pub fn JSStringIsEqualToUTF8CString(a: JSStringRef, b: *const ::std::os::raw::c_char) -> bool;
}
extern "C" {
#[link_name = "\u{1}_JSObjectMakeTypedArray"]
pub fn JSObjectMakeTypedArray(
ctx: JSContextRef,
arrayType: JSTypedArrayType,
length: usize,
exception: *mut JSValueRef,
) -> JSObjectRef;
}
extern "C" {
#[link_name = "\u{1}_JSObjectMakeTypedArrayWithBytesNoCopy"]
pub fn JSObjectMakeTypedArrayWithBytesNoCopy(
ctx: JSContextRef,
arrayType: JSTypedArrayType,
bytes: *mut ::std::os::raw::c_void,
byteLength: usize,
bytesDeallocator: JSTypedArrayBytesDeallocator,
deallocatorContext: *mut ::std::os::raw::c_void,
exception: *mut JSValueRef,
) -> JSObjectRef;
}
extern "C" {
#[link_name = "\u{1}_JSObjectMakeTypedArrayWithArrayBuffer"]
pub fn JSObjectMakeTypedArrayWithArrayBuffer(
ctx: JSContextRef,
arrayType: JSTypedArrayType,
buffer: JSObjectRef,
exception: *mut JSValueRef,
) -> JSObjectRef;
}
extern "C" {
#[link_name = "\u{1}_JSObjectMakeTypedArrayWithArrayBufferAndOffset"]
pub fn JSObjectMakeTypedArrayWithArrayBufferAndOffset(
ctx: JSContextRef,
arrayType: JSTypedArrayType,
buffer: JSObjectRef,
byteOffset: usize,
length: usize,
exception: *mut JSValueRef,
) -> JSObjectRef;
}
extern "C" {
#[link_name = "\u{1}_JSObjectGetTypedArrayBytesPtr"]
pub fn JSObjectGetTypedArrayBytesPtr(
ctx: JSContextRef,
object: JSObjectRef,
exception: *mut JSValueRef,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
#[link_name = "\u{1}_JSObjectGetTypedArrayLength"]
pub fn JSObjectGetTypedArrayLength(
ctx: JSContextRef,
object: JSObjectRef,
exception: *mut JSValueRef,
) -> usize;
}
extern "C" {
#[link_name = "\u{1}_JSObjectGetTypedArrayByteLength"]
pub fn JSObjectGetTypedArrayByteLength(
ctx: JSContextRef,
object: JSObjectRef,
exception: *mut JSValueRef,
) -> usize;
}
extern "C" {
#[link_name = "\u{1}_JSObjectGetTypedArrayByteOffset"]
pub fn JSObjectGetTypedArrayByteOffset(
ctx: JSContextRef,
object: JSObjectRef,
exception: *mut JSValueRef,
) -> usize;
}
extern "C" {
#[link_name = "\u{1}_JSObjectGetTypedArrayBuffer"]
pub fn JSObjectGetTypedArrayBuffer(
ctx: JSContextRef,
object: JSObjectRef,
exception: *mut JSValueRef,
) -> JSObjectRef;
}
extern "C" {
#[link_name = "\u{1}_JSObjectMakeArrayBufferWithBytesNoCopy"]
pub fn JSObjectMakeArrayBufferWithBytesNoCopy(
ctx: JSContextRef,
bytes: *mut ::std::os::raw::c_void,
byteLength: usize,
bytesDeallocator: JSTypedArrayBytesDeallocator,
deallocatorContext: *mut ::std::os::raw::c_void,
exception: *mut JSValueRef,
) -> JSObjectRef;
}
extern "C" {
#[link_name = "\u{1}_JSObjectGetArrayBufferBytesPtr"]
pub fn JSObjectGetArrayBufferBytesPtr(
ctx: JSContextRef,
object: JSObjectRef,
exception: *mut JSValueRef,
) -> *mut ::std::os::raw::c_void;
}
extern "C" {
#[link_name = "\u{1}_JSObjectGetArrayBufferByteLength"]
pub fn JSObjectGetArrayBufferByteLength(
ctx: JSContextRef,
object: JSObjectRef,
exception: *mut JSValueRef,
) -> usize;
}
pub type ULChar16 = ::std::os::raw::c_ushort;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct C_Config {
_unused: [u8; 0],
}
pub type ULConfig = *mut C_Config;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct C_Renderer {
_unused: [u8; 0],
}
pub type ULRenderer = *mut C_Renderer;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct C_View {
_unused: [u8; 0],
}
pub type ULView = *mut C_View;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct C_Bitmap {
_unused: [u8; 0],
}
pub type ULBitmap = *mut C_Bitmap;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct C_String {
_unused: [u8; 0],
}
pub type ULString = *mut C_String;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct C_Buffer {
_unused: [u8; 0],
}
pub type ULBuffer = *mut C_Buffer;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct C_RenderTarget {
_unused: [u8; 0],
}
pub type ULRenderTarget = *mut C_RenderTarget;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct C_KeyEvent {
_unused: [u8; 0],
}
pub type ULKeyEvent = *mut C_KeyEvent;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct C_MouseEvent {
_unused: [u8; 0],
}
pub type ULMouseEvent = *mut C_MouseEvent;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct C_ScrollEvent {
_unused: [u8; 0],
}
pub type ULScrollEvent = *mut C_ScrollEvent;
pub const ULMessageSource_kMessageSource_XML: ULMessageSource = 0;
pub const ULMessageSource_kMessageSource_JS: ULMessageSource = 1;
pub const ULMessageSource_kMessageSource_Network: ULMessageSource = 2;
pub const ULMessageSource_kMessageSource_ConsoleAPI: ULMessageSource = 3;
pub const ULMessageSource_kMessageSource_Storage: ULMessageSource = 4;
pub const ULMessageSource_kMessageSource_AppCache: ULMessageSource = 5;
pub const ULMessageSource_kMessageSource_Rendering: ULMessageSource = 6;
pub const ULMessageSource_kMessageSource_CSS: ULMessageSource = 7;
pub const ULMessageSource_kMessageSource_Security: ULMessageSource = 8;
pub const ULMessageSource_kMessageSource_ContentBlocker: ULMessageSource = 9;
pub const ULMessageSource_kMessageSource_Other: ULMessageSource = 10;
pub type ULMessageSource = u32;
pub const ULMessageLevel_kMessageLevel_Log: ULMessageLevel = 1;
pub const ULMessageLevel_kMessageLevel_Warning: ULMessageLevel = 2;
pub const ULMessageLevel_kMessageLevel_Error: ULMessageLevel = 3;
pub const ULMessageLevel_kMessageLevel_Debug: ULMessageLevel = 4;
pub const ULMessageLevel_kMessageLevel_Info: ULMessageLevel = 5;
pub type ULMessageLevel = u32;
pub const ULCursor_kCursor_Pointer: ULCursor = 0;
pub const ULCursor_kCursor_Cross: ULCursor = 1;
pub const ULCursor_kCursor_Hand: ULCursor = 2;
pub const ULCursor_kCursor_IBeam: ULCursor = 3;
pub const ULCursor_kCursor_Wait: ULCursor = 4;
pub const ULCursor_kCursor_Help: ULCursor = 5;
pub const ULCursor_kCursor_EastResize: ULCursor = 6;
pub const ULCursor_kCursor_NorthResize: ULCursor = 7;
pub const ULCursor_kCursor_NorthEastResize: ULCursor = 8;
pub const ULCursor_kCursor_NorthWestResize: ULCursor = 9;
pub const ULCursor_kCursor_SouthResize: ULCursor = 10;
pub const ULCursor_kCursor_SouthEastResize: ULCursor = 11;
pub const ULCursor_kCursor_SouthWestResize: ULCursor = 12;
pub const ULCursor_kCursor_WestResize: ULCursor = 13;
pub const ULCursor_kCursor_NorthSouthResize: ULCursor = 14;
pub const ULCursor_kCursor_EastWestResize: ULCursor = 15;
pub const ULCursor_kCursor_NorthEastSouthWestResize: ULCursor = 16;
pub const ULCursor_kCursor_NorthWestSouthEastResize: ULCursor = 17;
pub const ULCursor_kCursor_ColumnResize: ULCursor = 18;
pub const ULCursor_kCursor_RowResize: ULCursor = 19;
pub const ULCursor_kCursor_MiddlePanning: ULCursor = 20;
pub const ULCursor_kCursor_EastPanning: ULCursor = 21;
pub const ULCursor_kCursor_NorthPanning: ULCursor = 22;
pub const ULCursor_kCursor_NorthEastPanning: ULCursor = 23;
pub const ULCursor_kCursor_NorthWestPanning: ULCursor = 24;
pub const ULCursor_kCursor_SouthPanning: ULCursor = 25;
pub const ULCursor_kCursor_SouthEastPanning: ULCursor = 26;
pub const ULCursor_kCursor_SouthWestPanning: ULCursor = 27;
pub const ULCursor_kCursor_WestPanning: ULCursor = 28;
pub const ULCursor_kCursor_Move: ULCursor = 29;
pub const ULCursor_kCursor_VerticalText: ULCursor = 30;
pub const ULCursor_kCursor_Cell: ULCursor = 31;
pub const ULCursor_kCursor_ContextMenu: ULCursor = 32;
pub const ULCursor_kCursor_Alias: ULCursor = 33;
pub const ULCursor_kCursor_Progress: ULCursor = 34;
pub const ULCursor_kCursor_NoDrop: ULCursor = 35;
pub const ULCursor_kCursor_Copy: ULCursor = 36;
pub const ULCursor_kCursor_None: ULCursor = 37;
pub const ULCursor_kCursor_NotAllowed: ULCursor = 38;
pub const ULCursor_kCursor_ZoomIn: ULCursor = 39;
pub const ULCursor_kCursor_ZoomOut: ULCursor = 40;
pub const ULCursor_kCursor_Grab: ULCursor = 41;
pub const ULCursor_kCursor_Grabbing: ULCursor = 42;
pub const ULCursor_kCursor_Custom: ULCursor = 43;
pub type ULCursor = u32;
pub const ULBitmapFormat_kBitmapFormat_A8: ULBitmapFormat = 0;
pub const ULBitmapFormat_kBitmapFormat_RGBA8: ULBitmapFormat = 1;
pub type ULBitmapFormat = u32;
pub const ULKeyEventType_kKeyEventType_KeyDown: ULKeyEventType = 0;
pub const ULKeyEventType_kKeyEventType_KeyUp: ULKeyEventType = 1;
pub const ULKeyEventType_kKeyEventType_RawKeyDown: ULKeyEventType = 2;
pub const ULKeyEventType_kKeyEventType_Char: ULKeyEventType = 3;
pub type ULKeyEventType = u32;
pub const ULMouseEventType_kMouseEventType_MouseMoved: ULMouseEventType = 0;
pub const ULMouseEventType_kMouseEventType_MouseDown: ULMouseEventType = 1;
pub const ULMouseEventType_kMouseEventType_MouseUp: ULMouseEventType = 2;
pub type ULMouseEventType = u32;
pub const ULMouseButton_kMouseButton_None: ULMouseButton = 0;
pub const ULMouseButton_kMouseButton_Left: ULMouseButton = 1;
pub const ULMouseButton_kMouseButton_Middle: ULMouseButton = 2;
pub const ULMouseButton_kMouseButton_Right: ULMouseButton = 3;
pub type ULMouseButton = u32;
pub const ULScrollEventType_kScrollEventType_ScrollByPixel: ULScrollEventType = 0;
pub const ULScrollEventType_kScrollEventType_ScrollByPage: ULScrollEventType = 1;
pub type ULScrollEventType = u32;
extern "C" {
#[link_name = "\u{1}_ulCreateConfig"]
pub fn ulCreateConfig() -> ULConfig;
}
extern "C" {
#[link_name = "\u{1}_ulDestroyConfig"]
pub fn ulDestroyConfig(config: ULConfig);
}
extern "C" {
#[link_name = "\u{1}_ulConfigSetEnableImages"]
pub fn ulConfigSetEnableImages(config: ULConfig, enabled: bool);
}
extern "C" {
#[link_name = "\u{1}_ulConfigSetEnableJavaScript"]
pub fn ulConfigSetEnableJavaScript(config: ULConfig, enabled: bool);
}
extern "C" {
#[link_name = "\u{1}_ulConfigSetUseBGRAForOffscreenRendering"]
pub fn ulConfigSetUseBGRAForOffscreenRendering(config: ULConfig, enabled: bool);
}
extern "C" {
#[link_name = "\u{1}_ulConfigSetDeviceScaleHint"]
pub fn ulConfigSetDeviceScaleHint(config: ULConfig, value: f64);
}
extern "C" {
#[link_name = "\u{1}_ulConfigSetFontFamilyStandard"]
pub fn ulConfigSetFontFamilyStandard(config: ULConfig, font_name: ULString);
}
extern "C" {
#[link_name = "\u{1}_ulConfigSetFontFamilyFixed"]
pub fn ulConfigSetFontFamilyFixed(config: ULConfig, font_name: ULString);
}
extern "C" {
#[link_name = "\u{1}_ulConfigSetFontFamilySerif"]
pub fn ulConfigSetFontFamilySerif(config: ULConfig, font_name: ULString);
}
extern "C" {
#[link_name = "\u{1}_ulConfigSetFontFamilySansSerif"]
pub fn ulConfigSetFontFamilySansSerif(config: ULConfig, font_name: ULString);
}
extern "C" {
#[link_name = "\u{1}_ulConfigSetUserAgent"]
pub fn ulConfigSetUserAgent(config: ULConfig, agent_string: ULString);
}
extern "C" {
#[link_name = "\u{1}_ulConfigSetUserStylesheet"]
pub fn ulConfigSetUserStylesheet(config: ULConfig, css_string: ULString);
}
extern "C" {
#[link_name = "\u{1}_ulCreateRenderer"]
pub fn ulCreateRenderer(config: ULConfig) -> ULRenderer;
}
extern "C" {
#[link_name = "\u{1}_ulDestroyRenderer"]
pub fn ulDestroyRenderer(renderer: ULRenderer);
}
extern "C" {
#[link_name = "\u{1}_ulUpdate"]
pub fn ulUpdate(renderer: ULRenderer);
}
extern "C" {
#[link_name = "\u{1}_ulRender"]
pub fn ulRender(renderer: ULRenderer);
}
extern "C" {
#[link_name = "\u{1}_ulCreateView"]
pub fn ulCreateView(
renderer: ULRenderer,
width: ::std::os::raw::c_uint,
height: ::std::os::raw::c_uint,
transparent: bool,
) -> ULView;
}
extern "C" {
#[link_name = "\u{1}_ulDestroyView"]
pub fn ulDestroyView(view: ULView);
}
extern "C" {
#[link_name = "\u{1}_ulViewGetURL"]
pub fn ulViewGetURL(view: ULView) -> ULString;
}
extern "C" {
#[link_name = "\u{1}_ulViewGetTitle"]
pub fn ulViewGetTitle(view: ULView) -> ULString;
}
extern "C" {
#[link_name = "\u{1}_ulViewIsLoading"]
pub fn ulViewIsLoading(view: ULView) -> bool;
}
extern "C" {
#[link_name = "\u{1}_ulViewIsBitmapDirty"]
pub fn ulViewIsBitmapDirty(view: ULView) -> bool;
}
extern "C" {
#[link_name = "\u{1}_ulViewGetBitmap"]
pub fn ulViewGetBitmap(view: ULView) -> ULBitmap;
}
extern "C" {
#[link_name = "\u{1}_ulViewLoadHTML"]
pub fn ulViewLoadHTML(view: ULView, html_string: ULString);
}
extern "C" {
#[link_name = "\u{1}_ulViewLoadURL"]
pub fn ulViewLoadURL(view: ULView, url_string: ULString);
}
extern "C" {
#[link_name = "\u{1}_ulViewResize"]
pub fn ulViewResize(
view: ULView,
width: ::std::os::raw::c_uint,
height: ::std::os::raw::c_uint,
);
}
extern "C" {
#[link_name = "\u{1}_ulViewGetJSContext"]
pub fn ulViewGetJSContext(view: ULView) -> JSContextRef;
}
extern "C" {
#[link_name = "\u{1}_ulViewEvaluateScript"]
pub fn ulViewEvaluateScript(view: ULView, js_string: ULString) -> JSValueRef;
}
extern "C" {
#[link_name = "\u{1}_ulViewCanGoBack"]
pub fn ulViewCanGoBack(view: ULView) -> bool;
}
extern "C" {
#[link_name = "\u{1}_ulViewCanGoForward"]
pub fn ulViewCanGoForward(view: ULView) -> bool;
}
extern "C" {
#[link_name = "\u{1}_ulViewGoBack"]
pub fn ulViewGoBack(view: ULView);
}
extern "C" {
#[link_name = "\u{1}_ulViewGoForward"]
pub fn ulViewGoForward(view: ULView);
}
extern "C" {
#[link_name = "\u{1}_ulViewGoToHistoryOffset"]
pub fn ulViewGoToHistoryOffset(view: ULView, offset: ::std::os::raw::c_int);
}
extern "C" {
#[link_name = "\u{1}_ulViewReload"]
pub fn ulViewReload(view: ULView);
}
extern "C" {
#[link_name = "\u{1}_ulViewStop"]
pub fn ulViewStop(view: ULView);
}
extern "C" {
#[link_name = "\u{1}_ulViewFireKeyEvent"]
pub fn ulViewFireKeyEvent(view: ULView, key_event: ULKeyEvent);
}
extern "C" {
#[link_name = "\u{1}_ulViewFireMouseEvent"]
pub fn ulViewFireMouseEvent(view: ULView, mouse_event: ULMouseEvent);
}
extern "C" {
#[link_name = "\u{1}_ulViewFireScrollEvent"]
pub fn ulViewFireScrollEvent(view: ULView, scroll_event: ULScrollEvent);
}
pub type ULChangeTitleCallback = ::std::option::Option<
unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void, caller: ULView, title: ULString),
>;
extern "C" {
#[link_name = "\u{1}_ulViewSetChangeTitleCallback"]
pub fn ulViewSetChangeTitleCallback(
view: ULView,
callback: ULChangeTitleCallback,
user_data: *mut ::std::os::raw::c_void,
);
}
pub type ULChangeURLCallback = ::std::option::Option<
unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void, caller: ULView, url: ULString),
>;
extern "C" {
#[link_name = "\u{1}_ulViewSetChangeURLCallback"]
pub fn ulViewSetChangeURLCallback(
view: ULView,
callback: ULChangeURLCallback,
user_data: *mut ::std::os::raw::c_void,
);
}
pub type ULChangeTooltipCallback = ::std::option::Option<
unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void, caller: ULView, tooltip: ULString),
>;
extern "C" {
#[link_name = "\u{1}_ulViewSetChangeTooltipCallback"]
pub fn ulViewSetChangeTooltipCallback(
view: ULView,
callback: ULChangeTooltipCallback,
user_data: *mut ::std::os::raw::c_void,
);
}
pub type ULChangeCursorCallback = ::std::option::Option<
unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void, caller: ULView, cursor: ULCursor),
>;
extern "C" {
#[link_name = "\u{1}_ulViewSetChangeCursorCallback"]
pub fn ulViewSetChangeCursorCallback(
view: ULView,
callback: ULChangeCursorCallback,
user_data: *mut ::std::os::raw::c_void,
);
}
pub type ULAddConsoleMessageCallback = ::std::option::Option<
unsafe extern "C" fn(
user_data: *mut ::std::os::raw::c_void,
caller: ULView,
source: ULMessageSource,
level: ULMessageLevel,
message: ULString,
line_number: ::std::os::raw::c_uint,
column_number: ::std::os::raw::c_uint,
source_id: ULString,
),
>;
extern "C" {
#[link_name = "\u{1}_ulViewSetAddConsoleMessageCallback"]
pub fn ulViewSetAddConsoleMessageCallback(
view: ULView,
callback: ULAddConsoleMessageCallback,
user_data: *mut ::std::os::raw::c_void,
);
}
pub type ULBeginLoadingCallback = ::std::option::Option<
unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void, caller: ULView),
>;
extern "C" {
#[link_name = "\u{1}_ulViewSetBeginLoadingCallback"]
pub fn ulViewSetBeginLoadingCallback(
view: ULView,
callback: ULBeginLoadingCallback,
user_data: *mut ::std::os::raw::c_void,
);
}
pub type ULFinishLoadingCallback = ::std::option::Option<
unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void, caller: ULView),
>;
extern "C" {
#[link_name = "\u{1}_ulViewSetFinishLoadingCallback"]
pub fn ulViewSetFinishLoadingCallback(
view: ULView,
callback: ULFinishLoadingCallback,
user_data: *mut ::std::os::raw::c_void,
);
}
pub type ULUpdateHistoryCallback = ::std::option::Option<
unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void, caller: ULView),
>;
extern "C" {
#[link_name = "\u{1}_ulViewSetUpdateHistoryCallback"]
pub fn ulViewSetUpdateHistoryCallback(
view: ULView,
callback: ULUpdateHistoryCallback,
user_data: *mut ::std::os::raw::c_void,
);
}
pub type ULDOMReadyCallback = ::std::option::Option<
unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void, caller: ULView),
>;
extern "C" {
#[link_name = "\u{1}_ulViewSetDOMReadyCallback"]
pub fn ulViewSetDOMReadyCallback(
view: ULView,
callback: ULDOMReadyCallback,
user_data: *mut ::std::os::raw::c_void,
);
}
extern "C" {
#[link_name = "\u{1}_ulViewSetNeedsPaint"]
pub fn ulViewSetNeedsPaint(view: ULView, needs_paint: bool);
}
extern "C" {
#[link_name = "\u{1}_ulViewGetNeedsPaint"]
pub fn ulViewGetNeedsPaint(view: ULView) -> bool;
}
extern "C" {
#[link_name = "\u{1}_ulCreateString"]
pub fn ulCreateString(str: *const ::std::os::raw::c_char) -> ULString;
}
extern "C" {
#[link_name = "\u{1}_ulCreateStringUTF8"]
pub fn ulCreateStringUTF8(str: *const ::std::os::raw::c_char, len: usize) -> ULString;
}
extern "C" {
#[link_name = "\u{1}_ulCreateStringUTF16"]
pub fn ulCreateStringUTF16(str: *mut ULChar16, len: usize) -> ULString;
}
extern "C" {
#[link_name = "\u{1}_ulDestroyString"]
pub fn ulDestroyString(str: ULString);
}
extern "C" {
#[link_name = "\u{1}_ulStringGetData"]
pub fn ulStringGetData(str: ULString) -> *mut ULChar16;
}
extern "C" {
#[link_name = "\u{1}_ulStringGetLength"]
pub fn ulStringGetLength(str: ULString) -> usize;
}
extern "C" {
#[link_name = "\u{1}_ulStringIsEmpty"]
pub fn ulStringIsEmpty(str: ULString) -> bool;
}
extern "C" {
#[link_name = "\u{1}_ulCreateEmptyBitmap"]
pub fn ulCreateEmptyBitmap() -> ULBitmap;
}
extern "C" {
#[link_name = "\u{1}_ulCreateBitmap"]
pub fn ulCreateBitmap(
width: ::std::os::raw::c_uint,
height: ::std::os::raw::c_uint,
format: ULBitmapFormat,
) -> ULBitmap;
}
extern "C" {
#[link_name = "\u{1}_ulCreateBitmapFromPixels"]
pub fn ulCreateBitmapFromPixels(
width: ::std::os::raw::c_uint,
height: ::std::os::raw::c_uint,
format: ULBitmapFormat,
row_bytes: ::std::os::raw::c_uint,
pixels: *const ::std::os::raw::c_void,
size: usize,
should_copy: bool,
) -> ULBitmap;
}
extern "C" {
#[link_name = "\u{1}_ulCreateBitmapFromCopy"]
pub fn ulCreateBitmapFromCopy(existing_bitmap: ULBitmap) -> ULBitmap;
}
extern "C" {
#[link_name = "\u{1}_ulDestroyBitmap"]
pub fn ulDestroyBitmap(bitmap: ULBitmap);
}
extern "C" {
#[link_name = "\u{1}_ulBitmapGetWidth"]
pub fn ulBitmapGetWidth(bitmap: ULBitmap) -> ::std::os::raw::c_uint;
}
extern "C" {
#[link_name = "\u{1}_ulBitmapGetHeight"]
pub fn ulBitmapGetHeight(bitmap: ULBitmap) -> ::std::os::raw::c_uint;
}
extern "C" {
#[link_name = "\u{1}_ulBitmapGetFormat"]
pub fn ulBitmapGetFormat(bitmap: ULBitmap) -> ULBitmapFormat;
}
extern "C" {
#[link_name = "\u{1}_ulBitmapGetBpp"]
pub fn ulBitmapGetBpp(bitmap: ULBitmap) -> ::std::os::raw::c_uint;
}
extern "C" {
#[link_name = "\u{1}_ulBitmapGetRowBytes"]
pub fn ulBitmapGetRowBytes(bitmap: ULBitmap) -> ::std::os::raw::c_uint;
}
extern "C" {
#[link_name = "\u{1}_ulBitmapGetSize"]
pub fn ulBitmapGetSize(bitmap: ULBitmap) -> usize;
}
extern "C" {
#[link_name = "\u{1}_ulBitmapOwnsPixels"]
pub fn ulBitmapOwnsPixels(bitmap: ULBitmap) -> bool;
}
extern "C" {
#[link_name = "\u{1}_ulBitmapLockPixels"]
pub fn ulBitmapLockPixels(bitmap: ULBitmap) -> *mut ::std::os::raw::c_void;
}
extern "C" {
#[link_name = "\u{1}_ulBitmapUnlockPixels"]
pub fn ulBitmapUnlockPixels(bitmap: ULBitmap);
}
extern "C" {
#[link_name = "\u{1}_ulBitmapRawPixels"]
pub fn ulBitmapRawPixels(bitmap: ULBitmap) -> *mut ::std::os::raw::c_void;
}
extern "C" {
#[link_name = "\u{1}_ulBitmapIsEmpty"]
pub fn ulBitmapIsEmpty(bitmap: ULBitmap) -> bool;
}
extern "C" {
#[link_name = "\u{1}_ulBitmapErase"]
pub fn ulBitmapErase(bitmap: ULBitmap);
}
extern "C" {
#[link_name = "\u{1}_ulBitmapWritePNG"]
pub fn ulBitmapWritePNG(bitmap: ULBitmap, path: *const ::std::os::raw::c_char) -> bool;
}
extern "C" {
#[link_name = "\u{1}_ulCreateKeyEvent"]
pub fn ulCreateKeyEvent(
type_: ULKeyEventType,
modifiers: ::std::os::raw::c_uint,
virtual_key_code: ::std::os::raw::c_int,
native_key_code: ::std::os::raw::c_int,
text: ULString,
unmodified_text: ULString,
is_keypad: bool,
is_auto_repeat: bool,
is_system_key: bool,
) -> ULKeyEvent;
}
extern "C" {
#[link_name = "\u{1}_ulDestroyKeyEvent"]
pub fn ulDestroyKeyEvent(evt: ULKeyEvent);
}
extern "C" {
#[link_name = "\u{1}_ulCreateMouseEvent"]
pub fn ulCreateMouseEvent(
type_: ULMouseEventType,
x: ::std::os::raw::c_int,
y: ::std::os::raw::c_int,
button: ULMouseButton,
) -> ULMouseEvent;
}
extern "C" {
#[link_name = "\u{1}_ulDestroyMouseEvent"]
pub fn ulDestroyMouseEvent(evt: ULMouseEvent);
}
extern "C" {
#[link_name = "\u{1}_ulCreateScrollEvent"]
pub fn ulCreateScrollEvent(
type_: ULScrollEventType,
delta_x: ::std::os::raw::c_int,
delta_y: ::std::os::raw::c_int,
) -> ULScrollEvent;
}
extern "C" {
#[link_name = "\u{1}_ulDestroyScrollEvent"]
pub fn ulDestroyScrollEvent(evt: ULScrollEvent);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct C_App {
_unused: [u8; 0],
}
pub type ULApp = *mut C_App;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct C_Window {
_unused: [u8; 0],
}
pub type ULWindow = *mut C_Window;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct C_Monitor {
_unused: [u8; 0],
}
pub type ULMonitor = *mut C_Monitor;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct C_Overlay {
_unused: [u8; 0],
}
pub type ULOverlay = *mut C_Overlay;
extern "C" {
#[doc = ""]
#[doc = " Create the App singleton."]
#[doc = ""]
#[doc = " @param config Configuration settings to use."]
#[doc = ""]
#[doc = " @note You should only create one of these per application lifetime."]
#[doc = ""]
#[doc = " App maintains its own Renderer instance, make sure to set your"]
#[doc = " Config before creating App. (@see Platform::set_config)"]
#[doc = ""]
#[link_name = "\u{1}_ulCreateApp"]
pub fn ulCreateApp(config: ULConfig) -> ULApp;
}
extern "C" {
#[doc = ""]
#[doc = " Destroy the App instance."]
#[doc = ""]
#[link_name = "\u{1}_ulDestroyApp"]
pub fn ulDestroyApp(app: ULApp);
}
extern "C" {
#[doc = ""]
#[doc = " Set the main window. You must set this before calling ulAppRun."]
#[doc = ""]
#[doc = " @param window The window to use for all rendering."]
#[doc = ""]
#[doc = " @note We currently only support one Window per App, this will change"]
#[doc = " later once we add support for multiple driver instances."]
#[doc = ""]
#[link_name = "\u{1}_ulAppSetWindow"]
pub fn ulAppSetWindow(app: ULApp, window: ULWindow);
}
extern "C" {
#[doc = ""]
#[doc = " Get the main window."]
#[doc = ""]
#[link_name = "\u{1}_ulAppGetWindow"]
pub fn ulAppGetWindow(app: ULApp) -> ULWindow;
}
pub type ULUpdateCallback =
::std::option::Option<unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void)>;
extern "C" {
#[doc = ""]
#[doc = " Set a callback for whenever the App updates. You should update all app"]
#[doc = " logic here."]
#[doc = ""]
#[doc = " @note This event is fired right before the run loop calls"]
#[doc = " Renderer::Update and Renderer::Render."]
#[doc = ""]
#[link_name = "\u{1}_ulAppSetUpdateCallback"]
pub fn ulAppSetUpdateCallback(
app: ULApp,
callback: ULUpdateCallback,
user_data: *mut ::std::os::raw::c_void,
);
}
extern "C" {
#[doc = ""]
#[doc = " Whether or not the App is running."]
#[doc = ""]
#[link_name = "\u{1}_ulAppIsRunning"]
pub fn ulAppIsRunning(app: ULApp) -> bool;
}
extern "C" {
#[doc = ""]
#[doc = " Get the main monitor (this is never NULL)."]
#[doc = ""]
#[doc = " @note We\'ll add monitor enumeration later."]
#[doc = ""]
#[link_name = "\u{1}_ulAppGetMainMonitor"]
pub fn ulAppGetMainMonitor(app: ULApp) -> ULMonitor;
}
extern "C" {
#[doc = ""]
#[doc = " Get the underlying Renderer instance."]
#[doc = ""]
#[link_name = "\u{1}_ulAppGetRenderer"]
pub fn ulAppGetRenderer(app: ULApp) -> ULRenderer;
}
extern "C" {
#[doc = ""]
#[doc = " Run the main loop."]
#[doc = ""]
#[doc = " @note Make sure to call ulAppSetWindow before calling this."]
#[doc = ""]
#[link_name = "\u{1}_ulAppRun"]
pub fn ulAppRun(app: ULApp);
}
extern "C" {
#[doc = ""]
#[doc = " Quit the application."]
#[doc = ""]
#[link_name = "\u{1}_ulAppQuit"]
pub fn ulAppQuit(app: ULApp);
}
extern "C" {
#[doc = ""]
#[doc = " Get the monitor\'s DPI scale (1.0 = 100%)."]
#[doc = ""]
#[link_name = "\u{1}_ulMonitorGetScale"]
pub fn ulMonitorGetScale(monitor: ULMonitor) -> f64;
}
extern "C" {
#[doc = ""]
#[doc = " Get the width of the monitor (in device coordinates)"]
#[doc = ""]
#[link_name = "\u{1}_ulMonitorGetWidth"]
pub fn ulMonitorGetWidth(monitor: ULMonitor) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = ""]
#[doc = " Get the height of the monitor (in device coordinates)"]
#[doc = ""]
#[link_name = "\u{1}_ulMonitorGetHeight"]
pub fn ulMonitorGetHeight(monitor: ULMonitor) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = ""]
#[doc = " Create a new Window."]
#[doc = ""]
#[doc = " @param monitor The monitor to create the Window on."]
#[doc = ""]
#[doc = " @param width The width (in device coordinates)."]
#[doc = ""]
#[doc = " @param height The height (in device coordinates)."]
#[doc = ""]
#[doc = " @param fullscreen Whether or not the window is fullscreen."]
#[doc = ""]
#[doc = " @param window_flags Various window flags."]
#[doc = ""]
#[link_name = "\u{1}_ulCreateWindow"]
pub fn ulCreateWindow(
monitor: ULMonitor,
width: ::std::os::raw::c_uint,
height: ::std::os::raw::c_uint,
fullscreen: bool,
window_flags: ::std::os::raw::c_uint,
) -> ULWindow;
}
extern "C" {
#[doc = ""]
#[doc = " Destroy a Window."]
#[doc = ""]
#[link_name = "\u{1}_ulDestroyWindow"]
pub fn ulDestroyWindow(window: ULWindow);
}
pub type ULCloseCallback =
::std::option::Option<unsafe extern "C" fn(user_data: *mut ::std::os::raw::c_void)>;
extern "C" {
#[doc = ""]
#[doc = " Set a callback to be notified when a window closes."]
#[doc = ""]
#[link_name = "\u{1}_ulWindowSetCloseCallback"]
pub fn ulWindowSetCloseCallback(
window: ULWindow,
callback: ULCloseCallback,
user_data: *mut ::std::os::raw::c_void,
);
}
pub type ULResizeCallback = ::std::option::Option<
unsafe extern "C" fn(
user_data: *mut ::std::os::raw::c_void,
width: ::std::os::raw::c_int,
height: ::std::os::raw::c_int,
),
>;
extern "C" {
#[doc = ""]
#[doc = " Set a callback to be notified when a window resizes"]
#[doc = " (parameters are passed back in device coordinates)."]
#[doc = ""]
#[link_name = "\u{1}_ulWindowSetResizeCallback"]
pub fn ulWindowSetResizeCallback(
window: ULWindow,
callback: ULResizeCallback,
user_data: *mut ::std::os::raw::c_void,
);
}
extern "C" {
#[doc = ""]
#[doc = " Get window width (in device coordinates)."]
#[doc = ""]
#[link_name = "\u{1}_ulWindowGetWidth"]
pub fn ulWindowGetWidth(window: ULWindow) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = ""]
#[doc = " Get window height (in device coordinates)."]
#[doc = ""]
#[link_name = "\u{1}_ulWindowGetHeight"]
pub fn ulWindowGetHeight(window: ULWindow) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = ""]
#[doc = " Get whether or not a window is fullscreen."]
#[doc = ""]
#[link_name = "\u{1}_ulWindowIsFullscreen"]
pub fn ulWindowIsFullscreen(window: ULWindow) -> bool;
}
extern "C" {
#[doc = ""]
#[doc = " Get the DPI scale of a window."]
#[doc = ""]
#[link_name = "\u{1}_ulWindowGetScale"]
pub fn ulWindowGetScale(window: ULWindow) -> f64;
}
extern "C" {
#[doc = ""]
#[doc = " Set the window title."]
#[doc = ""]
#[link_name = "\u{1}_ulWindowSetTitle"]
pub fn ulWindowSetTitle(window: ULWindow, title: *const ::std::os::raw::c_char);
}
extern "C" {
#[doc = ""]
#[doc = " Set the cursor for a window."]
#[doc = ""]
#[link_name = "\u{1}_ulWindowSetCursor"]
pub fn ulWindowSetCursor(window: ULWindow, cursor: ULCursor);
}
extern "C" {
#[doc = ""]
#[doc = " Close a window."]
#[doc = ""]
#[link_name = "\u{1}_ulWindowClose"]
pub fn ulWindowClose(window: ULWindow);
}
extern "C" {
#[doc = ""]
#[doc = " Convert device coordinates to pixels using the current DPI scale."]
#[doc = ""]
#[link_name = "\u{1}_ulWindowDeviceToPixel"]
pub fn ulWindowDeviceToPixel(
window: ULWindow,
val: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = ""]
#[doc = " Convert pixels to device coordinates using the current DPI scale."]
#[doc = ""]
#[link_name = "\u{1}_ulWindowPixelsToDevice"]
pub fn ulWindowPixelsToDevice(
window: ULWindow,
val: ::std::os::raw::c_int,
) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = ""]
#[doc = " Create a new Overlay."]
#[doc = ""]
#[doc = " @param window The window to create the Overlay in. (we currently only"]
#[doc = " support one window per application)"]
#[doc = ""]
#[doc = " @param width The width in device coordinates."]
#[doc = ""]
#[doc = " @param height The height in device coordinates."]
#[doc = ""]
#[doc = " @param x The x-position (offset from the left of the Window), in"]
#[doc = " device coordinates."]
#[doc = ""]
#[doc = " @param y The y-position (offset from the top of the Window), in"]
#[doc = " device coordinates."]
#[doc = ""]
#[doc = " @note Each Overlay is essentially a View and an on-screen quad. You should"]
#[doc = " create the Overlay then load content into the underlying View."]
#[doc = ""]
#[link_name = "\u{1}_ulCreateOverlay"]
pub fn ulCreateOverlay(
window: ULWindow,
width: ::std::os::raw::c_int,
height: ::std::os::raw::c_int,
x: ::std::os::raw::c_int,
y: ::std::os::raw::c_int,
) -> ULOverlay;
}
extern "C" {
#[doc = ""]
#[doc = " Destroy an overlay."]
#[doc = ""]
#[link_name = "\u{1}_ulDestroyOverlay"]
pub fn ulDestroyOverlay(overlay: ULOverlay);
}
extern "C" {
#[doc = ""]
#[doc = " Get the underlying View."]
#[doc = ""]
#[link_name = "\u{1}_ulOverlayGetView"]
pub fn ulOverlayGetView(overlay: ULOverlay) -> ULView;
}
extern "C" {
#[doc = ""]
#[doc = " Get the width (in device coordinates)."]
#[doc = ""]
#[link_name = "\u{1}_ulOverlayGetWidth"]
pub fn ulOverlayGetWidth(overlay: ULOverlay) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = ""]
#[doc = " Get the height (in device coordinates)."]
#[doc = ""]
#[link_name = "\u{1}_ulOverlayGetHeight"]
pub fn ulOverlayGetHeight(overlay: ULOverlay) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = ""]
#[doc = " Get the x-position (offset from the left of the Window), in device"]
#[doc = " coordinates."]
#[doc = ""]
#[link_name = "\u{1}_ulOverlayGetX"]
pub fn ulOverlayGetX(overlay: ULOverlay) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = ""]
#[doc = " Get the y-position (offset from the top of the Window), in device"]
#[doc = " coordinates."]
#[doc = ""]
#[link_name = "\u{1}_ulOverlayGetY"]
pub fn ulOverlayGetY(overlay: ULOverlay) -> ::std::os::raw::c_int;
}
extern "C" {
#[doc = ""]
#[doc = " Move the overlay to a new position (in device coordinates)."]
#[doc = ""]
#[link_name = "\u{1}_ulOverlayMoveTo"]
pub fn ulOverlayMoveTo(overlay: ULOverlay, x: ::std::os::raw::c_int, y: ::std::os::raw::c_int);
}
extern "C" {
#[doc = ""]
#[doc = " Resize the overlay (and underlying View), dimensions should be"]
#[doc = " specified in device coordinates."]
#[doc = ""]
#[link_name = "\u{1}_ulOverlayResize"]
pub fn ulOverlayResize(
overlay: ULOverlay,
width: ::std::os::raw::c_int,
height: ::std::os::raw::c_int,
);
}
extern "C" {
#[doc = ""]
#[doc = " Whether or not the overlay is hidden (not drawn)."]
#[doc = ""]
#[link_name = "\u{1}_ulOverlayIsHidden"]
pub fn ulOverlayIsHidden(overlay: ULOverlay) -> bool;
}
extern "C" {
#[doc = ""]
#[doc = " Hide the overlay (will no longer be drawn)"]
#[doc = ""]
#[link_name = "\u{1}_ulOverlayHide"]
pub fn ulOverlayHide(overlay: ULOverlay);
}
extern "C" {
#[doc = ""]
#[doc = " Show the overlay."]
#[doc = ""]
#[link_name = "\u{1}_ulOverlayShow"]
pub fn ulOverlayShow(overlay: ULOverlay);
}
extern "C" {
#[doc = ""]
#[doc = " Whether or not an overlay has keyboard focus."]
#[doc = ""]
#[link_name = "\u{1}_ulOverlayHasFocus"]
pub fn ulOverlayHasFocus(overlay: ULOverlay) -> bool;
}
extern "C" {
#[doc = ""]
#[doc = " Grant this overlay exclusive keyboard focus."]
#[doc = ""]
#[link_name = "\u{1}_ulOverlayFocus"]
pub fn ulOverlayFocus(overlay: ULOverlay);
}
extern "C" {
#[doc = ""]
#[doc = " Remove keyboard focus."]
#[doc = ""]
#[link_name = "\u{1}_ulOverlayUnfocus"]
pub fn ulOverlayUnfocus(overlay: ULOverlay);
}